You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Are there any protocols used in practice which append nonces to ciphertext?
We potentially could add an inout type with reserved header of fixed size. It also could be useful for a more efficient set of prefix encrypt/decrypt methods.
Building towards a full solution to #1666, this adds an initial API
which supports explicit nonces, implemented as a prefix to the AEAD
message.
Putting the nonce in any other position than the message prefix doesn't
make sense. Nothing else works that way. There are multiple possible
permutations like putting the nonce between the ciphertext, or at the
end, but nobody does that, and the best thing we can do for users is
eliminate unnecessary choices.
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.
The text was updated successfully, but these errors were encountered: