A minimal, clean, fully native Python SDK for communicating with Keycard smart cards.
This SDK is under active development.
APDU commands are being implemented one by one.
- SELECT
- INIT
- IDENT
- OPEN SECURE CHANNEL
- MUTUALLY AUTHENTICATE
- PAIR
- UNPAIR
- GET STATUS
- VERIFY PIN
- CHANGE PIN
- UNBLOCK PIN
- LOAD KEY
- DERIVE KEY
- GENERATE MNEMONIC
- REMOVE KEY
- GENERATE KEY
- SIGN
- SET PINLESS PATH
- EXPORT KEY
- STORE DATA
- GET DATA
- FACTORY RESET
- Fully native Python implementation
- Clean API surface
- Easy to integrate
- Clear separation between transport, protocol, parsing, and crypto
- Fully tested, deterministic behavior
- Focused on correctness, clarity, and maintainability
git clone https://github.com/mmlado/keycard-py.git
cd keycard-py
python -m venv venv
source venv/bin/activate
pip install -e .
pytestMIT
Contributions are welcome as this SDK grows.