-
Notifications
You must be signed in to change notification settings - Fork 155
Add EVP_CIPHER API for XAES-256-GCM with Key Commitment #2826
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
Changes from all commits
0a3768b
35defa9
28e379f
ff9b2ec
a7ccfc5
01a9681
d80c7d2
4e92f5d
e882576
c285850
417325b
cdfdb87
bfc193c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -532,6 +532,34 @@ Ciphertext = 986ec1832593df5443a17943 | |
| AAD = 633273702e6f72672f584145532d3235362d47434d | ||
| Tag = 7fd083bf3fdb41abd740a21f71eb769d | ||
|
|
||
| # Note: KC are our own test values | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to use the same set of tests as the ones without KC and the test harness just ignores it when it's plain XAES?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does that mean I should remove all changes that were made to
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, sorry, what I meant is if you were to unify the 2 sets of test vectors in this file (i.e. delete the ones above of XAES-256-GCM because they're superseded by the KC one), would they then work with both XAES and XAES-KC? It seems to me that XAES may not be tested in
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. It needs to have "Cipher = XAES-256-GCM-KC" to specify the cipher. |
||
| Cipher = XAES-256-GCM-KC | ||
| Key = 0101010101010101010101010101010101010101010101010101010101010101 | ||
| IV = 424242424242424242424242424242424242424242424242 | ||
| Plaintext = 48656c6c6f2c20584145532d3235362d47434d21 | ||
| Ciphertext = 01e5f78bc99de880bd2eeff2870d361f0eab5b2f | ||
| AAD = | ||
| Tag = c55268f34b14045878fe3668db980319 | ||
| KC = bf37571be1b43aeca64a95d99a2f162e24f8bfd79bbb71fa7d943e6fc060a8ae | ||
|
|
||
| Cipher = XAES-256-GCM-KC | ||
| Key = 0101010101010101010101010101010101010101010101010101010101010101 | ||
| IV = 4142434445464748494a4b4c4d4e4f505152535455565758 | ||
| Plaintext = 584145532d3235362d47434d | ||
| Ciphertext = ce546ef63c9cc60765923609 | ||
| AAD = | ||
| Tag = b33a9a1974e96e52daf2fcf7075e2271 | ||
| KC = 04076b6085eebab138855fe57811c04112eff989d44120dfff662d5475a383c3 | ||
|
|
||
| Cipher = XAES-256-GCM-KC | ||
| Key = 0303030303030303030303030303030303030303030303030303030303030303 | ||
| IV = 4142434445464748494a4b4c4d4e4f505152535455565758 | ||
| Plaintext = 584145532d3235362d47434d | ||
| Ciphertext = 986ec1832593df5443a17943 | ||
| AAD = 633273702e6f72672f584145532d3235362d47434d | ||
| Tag = 7fd083bf3fdb41abd740a21f71eb769d | ||
| KC = 5553cd21d1592b422e3129632a3187eee8a658cdca5c5b32ce86308dcc18e9d1 | ||
|
|
||
| # local add-ons, primarily streaming ghash tests | ||
| # 128 bytes aad | ||
| Cipher = AES-128-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.
Can the negative tests that were added for XAES (e.g. shorter nonces) be modified to also test XAES-KC?
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 made changes in
cipher_test.ccto test negative cases with invalid key/nonce, and shorter nonce for bothevp-xaes-256-gcmandevp-xaes-256-gcm-kc.