Skip to main content

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

at your option.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynitrokey-0.3.2.tar.gz (46.3 kB view details)

Uploaded Source

Built Distribution

pynitrokey-0.3.2-py3-none-any.whl (54.5 kB view details)

Uploaded Python 3

File details

Details for the file pynitrokey-0.3.2.tar.gz.

File metadata

  • Download URL: pynitrokey-0.3.2.tar.gz
  • Upload date:
  • Size: 46.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.24.0

File hashes

Hashes for pynitrokey-0.3.2.tar.gz
Algorithm Hash digest
SHA256 7ad3f71d4d0949d70a0245b658126c0b79eed63aced1286b17d2182c99acd4f0
MD5 680d0d88bd666acc68af125509fa6838
BLAKE2b-256 6578d95f11fa9b91a04d4a6be1feacf500c47dae854258151897729a89142b4e

See more details on using hashes here.

File details

Details for the file pynitrokey-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: pynitrokey-0.3.2-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

Hashes for pynitrokey-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b4209275fa1c76cdd9494e80908d0f5eb784a52f626d3418e2f0c97cfaa4e5fb
MD5 d50b680de443781d08cfc577e953c7be
BLAKE2b-256 bbd26286af31cb2843811e291a9a19edf577f9a69db95017a568c1817d560624

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page