Skip to main content

Python Library for Nitrokey devices.

Project description

pynitrokey

A command line interface for the Nitrokey FIDO2, Nitrokey Start, Nitrokey 3 and NetHSM.

Quickstart

$ pipx install pynitrokey
$ nitropy --help

Documentation

The user documentation for the nitropy CLI is available on docs.nitrokey.com. See also the product documentation for more information on the available commands:

Switching Nitrokey Start identities

Alternative MI switching method

pynitrokey installation is not always possible, hence describing below alternative method to change the Identity on the Nitrokey Start. It suffices to have any CCID application installed, and send the following APDU 00 85 00 {ID} (hex), where ID is in range [0;2]. After receiving this command Nitrokey Start will reboot with the selected identity.

Here is how to do it using GnuPG:

# Setting ID to 2
$ gpg-connect-agent --hex "scd apdu  00 85 00 02" /bye
ERR 65539 Unknown version in packet <Unspecified source>

# Alternative error messsage
ERR 65572 Bad certificate <Unspecified source>

The error message here is expected due to immediate reboot of the device, and with losing the connection.

When the ID change is attempted to be done immediately, the following response could be received:

ERR 100663406 Card removed <SCD>

To restore the communication, either kill the gpg-agent or run gpg --card-status again.

Tip: alternative gpg-connect-agent reloadagent /bye is not sufficient.

Compatibility

nitropy requires Python 3.9 or later.

Development

Information for developers and contributors can be found in the Developer Guide.

Maintainers

Current maintainers can be found in MAINTAINERS.md file.

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.4.35.tar.gz (281.0 kB view details)

Uploaded Source

Built Distribution

pynitrokey-0.4.35-py3-none-any.whl (626.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pynitrokey-0.4.35.tar.gz
Algorithm Hash digest
SHA256 8f7e80406852249f13e62cd108783f54c52d09b29c15465cb6ca484bfb87b0ad
MD5 c87e8f4006d740d225d5c8745bf73bc4
BLAKE2b-256 b3fb4ef7ffe2ad85624dce92d47730864ba26704be2850d0e70d646f20b5fd5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pynitrokey-0.4.35-py3-none-any.whl
  • Upload date:
  • Size: 626.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for pynitrokey-0.4.35-py3-none-any.whl
Algorithm Hash digest
SHA256 6e8ac49016d46c1d10b79292f9dbda4200b4b63585d6b958c6030a733cf7a4fe
MD5 831bbf84339853cb7e351962a85e9249
BLAKE2b-256 1ee20f7c05ccf2ad0f3a32c60ed7b13672d74c63565e16a6b25e8373968afbfc

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