RustCrypto / RustCrypto/traits

aead: marker trait + simpler encryption API for randomized nonces

Open
#1,666 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

aead
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.