Hi. I'm submitting this issue in regard to crypto_box_seal_open. Passing a [u8], with length less than 32 as ciphertext, results in a panic (range end index 32 out of range for slice).
let ephem_pk = X25519KeyPair::from_public_bytes(&ciphertext[..CBOX_KEY_LENGTH])?;
It should be checked if the array has the correct length, as it is checked in crypto_box_open:
if buf_len < CBOX_TAG_LENGTH {
return Err(err_msg!(Encryption, "Invalid size for encrypted data"));
}
Hi. I'm submitting this issue in regard to
crypto_box_seal_open
. Passing a [u8], with length less than 32 as ciphertext, results in a panic (range end index 32 out of range for slice).let ephem_pk = X25519KeyPair::from_public_bytes(&ciphertext[..CBOX_KEY_LENGTH])?;
It should be checked if the array has the correct length, as it is checked in
crypto_box_open
: