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.

Contributors

pynitrokey development has been supported by these contributors:

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.5.0.post1.tar.gz (123.9 kB view details)

Uploaded Source

Built Distribution

pynitrokey-0.5.0.post1-py3-none-any.whl (155.6 kB view details)

Uploaded Python 3

File details

Details for the file pynitrokey-0.5.0.post1.tar.gz.

File metadata

  • Download URL: pynitrokey-0.5.0.post1.tar.gz
  • Upload date:
  • Size: 123.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for pynitrokey-0.5.0.post1.tar.gz
Algorithm Hash digest
SHA256 738a961170ca7f7b516893dd9ab76642f8526e7b182fdd2079be849ebfff3aca
MD5 4b43d263000c730cd71464195c2c3d86
BLAKE2b-256 46c6597bf0f8783d077fe02ead9e5c6c24e032ba1291630fe6edd38b2aeea2b1

See more details on using hashes here.

File details

Details for the file pynitrokey-0.5.0.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for pynitrokey-0.5.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 0e1811b2d58c33bfad0d83cf823dc970cf98d1bd083565deeaae1a0039c38c66
MD5 2b0992fdc6cbb59272dddd1536355f5f
BLAKE2b-256 04eb0fbae1967c6f0063d7dca3e5d944f9b60ad23c1ed5d705c1defc2d94f226

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