RustCrypto / RustCrypto/traits
aead: marker trait + simpler encryption API for randomized nonces
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 755
- Forks
- 256
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 2
Description
We currently require an explicit nonce for all encryption APIs, including ones which automatically encode the nonce as part of the AEAD message.
For some AEADs we can use purely randomized nonces safely: AES-GCM-SIV, the XChaCha* variants, and the new XAES-256-GCM are all examples of AEAD algorithms which are safe to use with nonces derived from a CSPRNG.
For these constructions, it would be nice if we had APIs that completely delegate nonce generation to a CSPRNG so we could more easily avoid nonce reuse.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing AEAD encryption APIs and how they handle explicitly supplied nonces. Compare the nonce-safety requirements of AES-GCM-SIV, XChaCha variants, and XAES-256-GCM, then determine the trait and API changes needed; done means randomized-nonce encryption is safely supported without requiring callers to provide a nonce.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100