Commit 35d5af0
authored
AES-SIV support (128 and 256) as a composition of AES-CMAC and AES-CTR (#75)
* - Skeleton code to check for AES-CTR support, if available, AES-SIV is
also available.
- Completed encryption and decryption implementation with s2v routine to perform the
AES-CMAC operations.
- Currently working on testing & fixing bugs that I find along the way;
* Fixed various bugs in the SIV computation, encryption/decryption fully
works now, mainly these two:
- gnutls merged siv + cipher text, now we handle the splitting between
the two in the wrapper to decrypt correctly the cipher;
- gnutls merges all the aads, instead of handling them separately, which
we handle too in the wrapper by processing one single aads always
(multiple ones into one buffer), updated the test with the corrected
expected results;
- updated teh test to test against 128 (32 bytes key, 16 bytes for the
splitting), same for the key sizes for 256 (64 bytes);
Testing some more before testing against chrony.
* Skip A.1 test when running without provider (GNUTLS_NO_PROVIDER=1)
because Nettle requires nonce >=1 bytes, but A.1 uses empty nonce
* Minor updates of the comments in the test.
* - copying plain_size instead of encr_size - WC_AES_BLOCK_SIZE when
encr_size exceeds encr_size + WC_AES_BLOCK_SIZE (edge case not covered, caught
by the siv testsuite of chrony);
- addressing codespell from the CI/CD;
- updated the deb.yml workflow to also defined WOLFSSL_AES_COUNTER in
order to use AES-SIV.
- Fix identation (spaces instead of tabs).1 parent 2fe4d22 commit 35d5af0
7 files changed
Lines changed: 857 additions & 87 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
0 commit comments