-
Notifications
You must be signed in to change notification settings - Fork 500
Fix AES 192 kdf #765
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
Fix AES 192 kdf #765
Conversation
The test vectors are generated based on RFC 6188 section 7.4 . It demonstrates that the kdf for AES 192 is currently broken. It mistakenly uses the kdf in AES 256 mode as described in cisco#763.
8e3f563 to
f0064c8
Compare
Set the kdf key length to be the determined input key length. This will set it correctly for AES ICM 128/192/256. In the case of AES GCM 128 & 256 it needs to be increased by 2 to match the corresponding AES ICM cipher. fixes cisco#763
f0064c8 to
6ad7749
Compare
|
|
||
| srtp_err_status_t srtp_validate_aes_256(void); | ||
|
|
||
| #ifdef GCM |
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.
I don't think this ifdef is needed here, you may want to run this test even when GCM is not enabled
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.
The GCM is miss used in this context, it indicates that the crypto engine is external as there is no internal implementation of AES 192 :( ... this should also be changed at some point.
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.
sorry I missed that trick.
paulej
left a comment
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.
LGTM
Fix AES 192 kdf
The kdf for AES 192 is currently broken, it mistakenly uses the kdf in AES 256 mode as described in #763.
First will commit a failing test and then the fix.