Post-Quantum Cryptography in Flutter
This repository is parameter selection and lightweight wrapper around a number of Rust cryptographic libraries. Its purpose isn't to implement primitives, rather to unify the API surface of existing libraries; limited to the tiny subset needed by the Dark Bio project.
The library is opinionated. Parameters and primitives were selected to provide matching levels of security in a post-quantum world. APIs were designed to make the library easy to use and hard to misuse. Flexibility will always be rejected in favor of safety.

- Certificates
- x509 (RFC-5280):
xDSA,xHPKE
- x509 (RFC-5280):
- Digital signatures
- Encryption
- Key derivation
- Serialization
Acknowledgements
Shoutout to Filippo Valsorda (@filosottile) for lots of tips and nudges on what kind of cryptographic primitives to use and how to combine them properly; and also for his work in general on cryptography standards.
Naturally, many thanks to the authors of all the libraries this project depends on.
Libraries
- argon2
- Argon2id cryptography wrappers and parametrization.
- cose
- COSE wrappers for xDSA and xHPKE.
- darkbio_crypto
- Post-quantum cryptography primitives.
- hkdf
- HKDF cryptography wrappers and parametrization.
- rand
- Cryptographically secure random number generation.
- rsa
- RSA cryptography wrappers and parametrization.
- stream
- I/O helper structs for age file encryption and decryption.
- xdsa
- Composite ML-DSA cryptography wrappers and parametrization.
- xhpke
- HPKE cryptography wrappers and parametrization.