Skip to main content

cryptnox-id-cli

CLI for managing Cryptnox multi-applet ID smart cards



PyPI Python versions docs License: LGPL v3

cryptnox-id-cli is a command-line interface for managing the Cryptnox ID multi-applet smart card: PIV identity credentials, FIDO2 passkeys, and MIFARE DESFire contactless applications — three independent functions on one physical card, driven by one tool.


Supported hardware

Cryptnox ID smart cards

One card, four applets, reachable over two interfaces:

Function Interface Notes
PIV (SP 800-73 keys + X.509 certificates) Contact (admin), contact/contactless (use) All personalization is contact-only
FIDO2 / CTAP 2.1 (passkeys / WebAuthn) Contactless (NFC) Windows requires an Administrator terminal
MIFARE DESFire (incl. EV3 Secure Dynamic Messaging) Contactless (NFC) Needs a DESFire-capable reader
Genuineness (factory attestation) Contact Read-only; proves the card is genuine Cryptnox hardware

Smart card readers

Works with Cryptnox readers and any other standard PC/SC smart card reader:

Reader Type Interface
Cryptnox® Smartcard Reader Contact (ID-1 + SIM) USB-A
Compact USB Mini Smartcard Reader Contact (ID-1) USB-A
Cryptnox NFC Contactless Reader Contactless (NFC/ISO 14443) USB-C

Verified third-party readers: ACS ACR39U (contact), ACS ACR1252 (contactless, native DESFire OK). The HID OMNIKEY 5422CL does not support DESFire.

[!IMPORTANT] MIFARE DESFire requires a contactless reader that passes native DESFire commands — not all contactless readers do.


Installation

[!IMPORTANT] This is only a minimal setup. Additional packages may be required depending on your operating system. See Installation in the documentation.

Requirements: Python 3.10+ and a PC/SC stack (built into Windows and macOS; on Linux install pcscd + libccid).

From PyPI

Recommended: pipx — makes cryptnox-id available globally while keeping its dependencies isolated, and works on current Linux distributions where installing into the system Python is blocked (PEP 668):

pipx install cryptnox-id-cli

Plain pip also works where the environment allows it (e.g. Windows):

pip install cryptnox-id-cli

A virtual environment works too, but the command is then only available while the venv is activated — fine for development, not for day-to-day use.

Three interchangeable console commands are installed: cryptnox-id, the short cnx-id, and cryptnox-id-card.

From source

git clone https://github.com/cryptnox/cryptnox-id-cli.git
cd cryptnox-id-cli
pip install .

Quick usage examples

[!TIP] The examples below are only a subset of available commands. The complete list of commands and detailed usage instructions is described in the official documentation.

1. Inspect the card

cryptnox-id readers     # list readers, card presence, ATR
cryptnox-id info        # detect the card + all functions on one screen
cryptnox-id doctor      # PC/SC service, reader, per-function reachability

info and doctor are read-only and safe to run any time.

2. Provision a PIV credential

  1. Run cryptnox-id piv quickstart on a contact reader.
  2. The card gets a key, a certificate, a CHUID and a CCC — usable by standard PIV tooling (yubico-piv-tool, OpenSC, OS smart-card stacks).

3. Create a passkey and prove the whole loop

  1. Run cryptnox-id fido credential self-test — registers a credential, requests an assertion, and verifies the returned signature: the full WebAuthn round trip against the real authenticator.
  2. For a resident, PIN-verified credential: cryptnox-id fido pin set, then re-run the self-test with --rk. On Windows, run from an Administrator terminal.

4. Prove the card is genuine

  1. Run cryptnox-id genuine verify on a contact reader.
  2. The card signs a fresh nonce and the on-card certificate is chained to the pinned Cryptnox root — the verdict is GENUINE only when both checks pass.

5. Work interactively

cryptnox-id shell       # run subcommands without re-typing the prefix

Documentation

The full User & Developer documentation is available at the Cryptnox ID CLI Documentation. It covers installation and setup, quick starts and usage guides for every card function (PIV, FIDO2, MIFARE DESFire, genuineness), the complete CLI command reference, JSON output and exit codes, and factory/provisioning notes.


Development

pip install -e ".[dev]"
ruff check src tests && ruff format --check src tests
mypy
pytest -q -m "not real_card"

Unit tests use a mock transport — no reader or card required. Real-card tests are opt-in (-m real_card) and never run in CI.


License

cryptnox-id-cli is dual-licensed:

  • LGPL-3.0 for open-source projects and proprietary projects that comply with LGPL requirements (see LICENSE)
  • Commercial license for projects that require a proprietary license without LGPL obligations (see COMMERCIAL.md for details)

The documentation is licensed CC BY-NC-ND 4.0.

For commercial inquiries, contact: contact@cryptnox.com

Release files for cryptnox-id-cli 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cryptnox-id-cli 1.0.2
File Size Uploaded
cryptnox_id_cli-1.0.2.tar.gz 145.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cryptnox-id-cli 1.0.2
File Interpreter ABI Platform
cryptnox_id_cli-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 319.1 kB

Release files / cryptnox_id_cli-1.0.2.tar.gz

Download URL cryptnox_id_cli-1.0.2.tar.gz
Size 145.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1a2ecd6692c04fdebec2f0606f9e2ebe418f88ca2639640a2102bc0962fdcf35
BLAKE2b-256 checksum
How to use checksums
0d0f4cfdde60cc36868fdb9c05e457d123f6e962ca993b96414694747b308ab6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / cryptnox_id_cli-1.0.2-py3-none-any.whl

Download URL cryptnox_id_cli-1.0.2-py3-none-any.whl
Size 173.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22f183a4283790c47d4d78b1332e857bf36ef385c69dc2981b707e9601447300
BLAKE2b-256 checksum
How to use checksums
0c0801e7a91e5a354ff51941934806f0597d62870434124e19a2092069e4d813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.3

2 release files

This release

1.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page