-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
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
crypt_and_hash
program is not working with CHACHA20-POLY1305
or CCM or ECB
#5445
Comments
crypt_and_hash
program is not working with CHACHA20-POLY1305
ciphercrypt_and_hash
program is not working with CHACHA20-POLY1305
or CCM
crypt_and_hash
program is not working with CHACHA20-POLY1305
or CCMcrypt_and_hash
program is not working with CHACHA20-POLY1305
or CCM or ECB
An error also occurs with CCM. But GCM works. This program was evidently not intended for AEAD, but the API is similar enough that GCM works. For CCM, the problem is that the program doesn't call For ChaChaPoly and CCM and ECB, there's also the problem that the program passes a 16-byte IV, but these modes require a smaller IV (or none at all for ECB). It's weird that Possible solutions for
|
Actually The reason for For Chachapoly, it looks like the API does not support skipping a call to |
I wonder if this generic layer used in this example is still recommended as a generic approach to support multiple ciphers? |
We now recommend |
Summary
When running a
crypt_and_hash
example program without arguments, it lists alsoCHACHA20-POLY1305
as an available cipher.But when used, it throws:
mbedtls_cipher_update() returned error
from here:https://github.com/ARMmbed/mbedtls/blob/d2da19b8eb60b75962f45c38e0b8222d917696f6/library/chachapoly.c#L194-L198
I suppose it is not supported for use with the generic cipher api as it requires an unique nonce input for every encryption operation.
The text was updated successfully, but these errors were encountered: