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
I noticed that in the xchacha20poly1305 library version 0.10.1, the nonces used are 19 bytes long, whereas the XChaCha20-Poly1305 specification (RFC 7539) recommends nonces of 24 bytes. Why was this difference in nonce size chosen in this particular implementation?
I'm curious to understand the reasons behind this choice and whether there are specific security, performance, or interoperability considerations that led to this decision.
Thank you for your time and clarification on this matter.
let nonce:[u8;19] = generate_nonce();///should work with this code:///let nonce: [u8; 24] = generate_nonce();let key:[u8;32] = generate_key();let aead = XChaCha20Poly1305::new(key.as_ref().into());letmut stream_encryptor = stream::EncryptorBE32::from_aead(aead, nonce.as_ref().into());
The text was updated successfully, but these errors were encountered:
The STREAM encryptor manages a portion of the nonce for you. Namely the “BE32” flavor of STREAM uses a 32-bit counter and 1-byte last block flag. 24 - 4 - 1 = 19
Hello,
I noticed that in the xchacha20poly1305 library version 0.10.1, the nonces used are 19 bytes long, whereas the XChaCha20-Poly1305 specification (RFC 7539) recommends nonces of 24 bytes. Why was this difference in nonce size chosen in this particular implementation?
I'm curious to understand the reasons behind this choice and whether there are specific security, performance, or interoperability considerations that led to this decision.
Thank you for your time and clarification on this matter.
The text was updated successfully, but these errors were encountered: