Python client 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.10 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
pynitrokey is licensed 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.
pynitrokey also contains code originating from these projects:
- gnuk by NIIBE Yutaka, GPL-3.0-or-later
- libnitrokey by Nitrokey GmbH, LGPL-3.0-only
- solo1-cli by SoloKeys Developers, Apache-2.0 or MIT
For more information, see the SDPX license headers in each file.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pynitrokey-0.11.3.tar.gz.
File metadata
- Download URL: pynitrokey-0.11.3.tar.gz
- Upload date:
- Size: 151.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f5369c3e1411bc4e2e558df8a9823799e6972e7e6fbb2baa9d845067993785b
|
|
| MD5 |
dcb58347893210a6a0a51d7414d1718e
|
|
| BLAKE2b-256 |
81a995e9ca154c1cca15eb1de8f7a32208972f6ec9918d53bdee40603ceb753f
|
Provenance
The following attestation bundles were made for pynitrokey-0.11.3.tar.gz:
Publisher:
cd-pypi.yaml on Nitrokey/pynitrokey
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pynitrokey-0.11.3.tar.gz -
Subject digest:
6f5369c3e1411bc4e2e558df8a9823799e6972e7e6fbb2baa9d845067993785b - Sigstore transparency entry: 844809766
- Sigstore integration time:
-
Permalink:
Nitrokey/pynitrokey@f211929d5b1abd241c1c5f7774e58a76f6c75c46 -
Branch / Tag:
refs/tags/v0.11.3 - Owner: https://github.com/Nitrokey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd-pypi.yaml@f211929d5b1abd241c1c5f7774e58a76f6c75c46 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pynitrokey-0.11.3-py3-none-any.whl.
File metadata
- Download URL: pynitrokey-0.11.3-py3-none-any.whl
- Upload date:
- Size: 187.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90a416637b2ad6519e3f9259632867ce3d7745aa60207c78a6decafbbfd604bb
|
|
| MD5 |
ed54d6ac7af0f70155c69eb341b6d4f8
|
|
| BLAKE2b-256 |
a5fec6226dc26923515a74b81c4cf522c0965e5a8e2461a502accda3222e2775
|
Provenance
The following attestation bundles were made for pynitrokey-0.11.3-py3-none-any.whl:
Publisher:
cd-pypi.yaml on Nitrokey/pynitrokey
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pynitrokey-0.11.3-py3-none-any.whl -
Subject digest:
90a416637b2ad6519e3f9259632867ce3d7745aa60207c78a6decafbbfd604bb - Sigstore transparency entry: 844809771
- Sigstore integration time:
-
Permalink:
Nitrokey/pynitrokey@f211929d5b1abd241c1c5f7774e58a76f6c75c46 -
Branch / Tag:
refs/tags/v0.11.3 - Owner: https://github.com/Nitrokey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd-pypi.yaml@f211929d5b1abd241c1c5f7774e58a76f6c75c46 -
Trigger Event:
release
-
Statement type: