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
File details
Details for the file pynitrokey-0.3.1.tar.gz
.
File metadata
- Download URL: pynitrokey-0.3.1.tar.gz
- Upload date:
- Size: 46.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.24.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2db5e4705e2029cde27bf839ec90af9907c3c2c75d75370109bf5c3d3e89a86c |
|
MD5 | 45921a9d5217c6b8f79ae6ed0259a5a1 |
|
BLAKE2b-256 | 8881c6227115dc8058e958ea00828a856e92fe59165a48c0e7525708de2f8e92 |
File details
Details for the file pynitrokey-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: pynitrokey-0.3.1-py3-none-any.whl
- Upload date:
- Size: 54.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.24.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37865688ea0bff40f0b57f938d912cbe50dc72b47d4d6488c549659def1e222d |
|
MD5 | a909fd5c998510a7458fd063b89dba87 |
|
BLAKE2b-256 | 223cc7684041c2e4ca56d3a66d2dcedba50517ea9b5d41b46ecf18de20fca70a |