Python Library for Nitrokey FIDO2 & Nitrokey Start.
Project description
Nitro-python
A command line interface for the Nitrokey FIDO2. Work in progress.
This is a fork of https://github.com/solokeys/solo-python (see README-parent.md).
Current state
Project is in alpha stage, not meant yet to be used by end-users (not everything was tested), although almost all features should work out-of-the-box. The strings referring to the device were not changed yet as well.
Differences:
- handle
status
command for displaying touch button status (2.0.0 firmware and later); - firmware signing adjusted for Nitrokey FIDO2 bootloader
- monitor command with timestamps
- disabled automatic update (however manual update works)
Firmware update (manual)
Nitrokey FIDO2
Automatic firmware update is not configured, since we plan to use browser-based application to do so. See https://update.nitrokey.com for details.
It is possible to run the update with this tool by hand, e.g. by executing:
# enter bootloader
nitropy fido2 util program aux enter-bootloader
nitropy fido2 util program aux bootloader-version
# download firmware by hand
wget https://github.com/Nitrokey/nitrokey-fido2-firmware/releases/download/1.1.0.nitrokey/fido2-firmware-1.1.0.nitrokey-app-signed.json
# and program it through the bootloader:
nitropy fido2 util program bootloader fido2-firmware-1.1.0.nitrokey-app-signed.json
nitropy fido2 util program aux leave-bootloader
# test key
nitropy fido2 verify
Nitrokey Start
Here is brief guide for the Nitrokey Start automatic firmware download and update:
# install package
$ pip3 install pynitrokey
# verify installation and device connection
$ nitropy version
0.3.0
$ nitropy start list
FSIJ-1.2.15-87042524: Nitrokey Nitrokey Start (RTM.10)
# starts update process, logs saved to upgrade.log, handy in case of failure
$ nitropy start update
# does not ask for confirmation nor the default Admin PIN, handy for batch calls
$ nitropy start update -p 12345678 -y
# following will flash files from the local disk, instead of downloading them
$ nitropy start update --regnual $(FIRMWARE_DIR)/regnual.bin --gnuk ${FIRMWARE_DIR}/gnuk.bin
License
Licensed similarly to upstream, under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pynitrokey-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4209275fa1c76cdd9494e80908d0f5eb784a52f626d3418e2f0c97cfaa4e5fb |
|
MD5 | d50b680de443781d08cfc577e953c7be |
|
BLAKE2b-256 | bbd26286af31cb2843811e291a9a19edf577f9a69db95017a568c1817d560624 |