Binding support
| Feature | Rust | Python | C ABI | JS/WASM |
|---|---|---|---|---|
| ML-KEM-512 / 768 / 1024 and X-Wing | All | All | All | All |
| ML-DSA-44 / 65 / 87 and MLDSA65-Ed25519-SHA512 | All | All | All | All |
| SLH-DSA-SHAKE (128 / 192 / 256) | s and f | s and f | s and f | f |
| SHA3-256 / 512 and SHAKE128 / 256 | All four | All four | All four | SHA3-256 and SHAKE256 |
| Envelope, policy checks and key rotation | SDK | SDK | — | — |
| SPKI / PKCS#8 DER and PEM for ML-KEM, ML-DSA and SLH-DSA | SDK | SDK | — | — |
| Direct SHA-256, HMAC-SHA-256 and HMAC_DRBG calls | drbg crate | — | — | — |
Choose your interface: Rust crates · Python classes and exceptions · C functions and buffers · JS/WASM initialization and types.
Key representations depend on the entry point. For example, Python’s MlKem768.keygen() returns raw keys, while Envelope.generate_keypair() returns keys with algorithm-identifying headers. Use the matching reader when loading saved keys.
Rust SDK and Python share QuantAegis-specific formats for QAEN v1 envelopes and Agile keys and signatures. C and JS/WASM work with the individual algorithms’ raw keys, KEM ciphertexts and signatures. The standard key codecs cover the three non-hybrid families in the table. Python’s ML-KEM and ML-DSA PKCS#8 encoders take a 64-byte or 32-byte seed respectively. The expanded private key returned by keygen() cannot be passed to these encoders.
| Operation | Available interfaces |
|---|---|
| Streaming ML-DSA External-μ | Rust primitives and Python |
| Standalone KEM key validation | Rust typed parsing, Python and C. JS/WASM checks inputs during operations |
| Deterministic KEM test interfaces | Rust, C and Python support ML-KEM and X-Wing. JS/WASM exposes X-Wing in qa.hazmat |
| Streaming SHA-3 / SHAKE | Rust. The bindings provide one-shot calls. Python caps SHAKE output at 16 MiB per call |