We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
When encrypting in CCM mode, if the nonce is too short, it triggers an assertion failure.
In contrast, the corresponding error message when decrypting is a nicer invalid_arg "CCM: nonce length %d" nsize.
invalid_arg "CCM: nonce length %d" nsize
let () = let key = Nocrypto.Cipher_block.AES.CCM.of_secret ~maclen:16 (Cstruct.create 16) in let nonce = Cstruct.empty in ignore (Nocrypto.Cipher_block.AES.CCM.encrypt ~key ~nonce Cstruct.empty)
Output:
Fatal error: exception "Assert_failure src/ccm.ml:8:2"
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
When encrypting in CCM mode, if the nonce is too short, it triggers an assertion failure.
In contrast, the corresponding error message when decrypting is a nicer
invalid_arg "CCM: nonce length %d" nsize
.Output:
Thanks!
The text was updated successfully, but these errors were encountered: