CLI for managing Cryptnox multi-applet ID smart cards
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.
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 |
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.
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).
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-cliPlain pip also works where the environment allows it (e.g. Windows):
pip install cryptnox-id-cliA 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.
git clone https://github.com/cryptnox/cryptnox-id-cli.git
cd cryptnox-id-cli
pip install .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.
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 reachabilityinfo and doctor are read-only and safe to run any time.
- Run
cryptnox-id piv quickstarton a contact reader. - 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).
- 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. - 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.
- Run
cryptnox-id genuine verifyon a contact reader. - 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.
cryptnox-id shell # run subcommands without re-typing the prefixcryptnox-id remote inspect # what the service sees: applet, security domain, key versions
cryptnox-id remote attest --slot 9C # a key generated through the service, with its attestation
cryptnox-id remote reset # wipe and reinstall the PIV function (irreversible, gated)The card stays in your reader; the tool relays the service's commands under a policy that keeps the other card functions out of reach, and shows what the service asserted apart from what it verified locally.
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.
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.
To measure coverage locally, the same way CI does:
pytest -q -m "not real_card" --cov --cov-report=term-missingCI enforces two floors: a project-wide one from fail_under in pyproject.toml,
and a tighter one over src/cryptnox_id_cli/cli/commands/. Because branch
coverage is enabled, both compare the combined statement-and-branch
percentage that coverage report prints, which sits below line coverage alone.
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.mdfor details)
The documentation is licensed CC BY-NC-ND 4.0.
For commercial inquiries, contact: contact@cryptnox.com
