quantum_crypto 0.0.2
quantum_crypto: ^0.0.2 copied to clipboard
An advanced, Post-Quantum Cryptography suite for Flutter, powered by Rust.
0.0.2 #
-
SLH-DSA (FIPS 205) stateless hash-based signatures —
SLH-DSA-SHA2-128f(Level 1),-192f(Level 3),-256f(Level 5) via a newslh_dsaAPI (QuantumCrypto.slhDsa). Detached signatures whose security rests solely on hash-function strength — no lattice assumptions. Only the fast-signingfparameter sets are exposed; see the Rust docs for the size/speed trade-off vs ML-DSA. -
XChaCha20-Poly1305 AEAD cipher — 24-byte random nonces, safe without a counter. Available in
aead,streaming, and secure-messaging APIs asAeadAlgorithm.xChaCha20Poly1305(wire format:24-byte nonce || ciphertext+tag). -
HKDF hash agility —
hkdfDeriveWithHash/hkdfDeriveMultiWithHashwith explicitHkdfHash.sha256 / sha384 / sha512selection (QuantumCrypto.kdf, optionalhashparameter, defaults to SHA-256). -
One-shot hash API — SHA-256/384/512 and SHA3-256/512 via a new
hashservice (QuantumCrypto.hash). -
benchmarkSlhDsaByName— per-variant SLH-DSA benchmarks; sign iterations are clamped to at most 5 (SLH-DSA signing is ~100× slower than ML-DSA by design). The Rust suite also covers XChaCha20-Poly1305 and the new hash algorithms. -
Refactored the Rust
api/layer to clean-code patterns: each module documents its FFI contract, DTO conversions useFromimpls, shared validation/payload/nonce helpers are extracted (kdf,secure_messaging,streaming), and the benchmark suite uses typed algorithm tables instead of stringly-typed dispatch. -
Unknown algorithm names in the benchmark API now return descriptive errors instead of silently falling back to a default variant.
-
hex_to_bytesaccepts an optional0xprefix and reports the offending byte position; Base64 decoders tolerate surrounding whitespace. -
bytes_to_hexno longer allocates per byte (lookup-table encoder). -
Eliminated needless secret-key cloning at the KEM/DSA/hybrid FFI boundary: key bytes are now moved out of their zeroizing containers via
into_bytes()/into_parts(), so no duplicate copies of secret material linger in memory.
0.0.1 #
- Initial release.