-
Notifications
You must be signed in to change notification settings - Fork 1
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
[dpi,aes] Allow partial last message blocks for AES-GCM #7
[dpi,aes] Allow partial last message blocks for AES-GCM #7
Conversation
if (impl == 0) { | ||
// The C model is currently not supported. | ||
printf( | ||
"ERROR: c_dpi_aes_crypt_message() currently supports OpenSSL/BoringSSL " | ||
"only\n"); | ||
} else { // OpenSSL/BoringSSL | ||
if (!op) { | ||
crypto_encrypt(ref_out, iv, ref_in, data_len, key, key_len, mode, aad_in, | ||
crypto_encrypt(ref_out, iv, ref_in, data_len, key, key_len, kCryptoAesGcm, aad_in, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Thank you. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me except for the point raised by @nasahlpa . Thanks for the PR @andrea-caforio !
Also, it currently fails lint. Can you please do a |
Unlike the existing AES modes, the new GCM mode allows for partial last message blocks. This commit adds this option to the `c_dpi` implementation, i.e., the automatic padding of partial blocks. Signed-off-by: Andrea Caforio <[email protected]>
d90e6d0
to
ab6695e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on that!
Unlike the existing AES modes, the new GCM mode allows for partial last message blocks.
This commit adds this option to the
c_dpi
implementation, i.e., the automatic padding ofpartial blocks.