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
At this line there's a check that aead tag fits into output buffer, although the tag is not necessarily appended to the message. E.g. in the Noise_NN_25519_AESGCM_SHA256 handshake first message size is 32 bytes, but this code fails:
staticPATTERN:&'static str = "Noise_NN_25519_AESGCM_SHA256";letmut initiator = snow::Builder::new(PATTERN.parse()?).build_initiator()?;letmut responder = snow::Builder::new(PATTERN.parse()?).build_responder()?;letmut first_msg = [0u8;32];// this line yields `Err(snow::Error::Input)`let len = initiator.write_message(&[],&mut first_msg)?;
But if we supply buffer of length 48 bytes, then this code works, but only 32 bytes are written to the output buffer
Requiring output buffer to be 48 bytes length but using only 32 of them seems to be a buggy to me. I'd update the check to require buffer to fit the tag only if there's encryption key.
The text was updated successfully, but these errors were encountered:
At this line there's a check that aead tag fits into output buffer, although the tag is not necessarily appended to the message. E.g. in the
Noise_NN_25519_AESGCM_SHA256
handshake first message size is 32 bytes, but this code fails:But if we supply buffer of length 48 bytes, then this code works, but only 32 bytes are written to the output buffer
Requiring output buffer to be 48 bytes length but using only 32 of them seems to be a buggy to me. I'd update the check to require buffer to fit the tag only if there's encryption key.
The text was updated successfully, but these errors were encountered: