aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/aes_test.c
Commit message (Collapse)AuthorAgeFilesLines
* [test] Remove dummy initialisation vector for ECB-mode AES testsMichael Brown2024-02-071-8/+3
| | | | | | | | | | | | A block cipher in ECB mode has no concept of an initialisation vector, and any data provided to cipher_setiv() for an ECB cipher will be ignored. There is no requirement within our cipher algorithm abstraction for a dummy initialisation vector to be provided. Remove the entirely spurious dummy 16-byte initialisation vector from the ECB test cases. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add concept of authentication tag to cipher algorithmsMichael Brown2022-10-251-6/+6
| | | | | | | | Some ciphers (such as GCM) support the concept of a tag that can be used to authenticate the encrypted data. Add a cipher method for generating an authentication tag. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add concept of additional data to cipher algorithmsMichael Brown2022-10-251-6/+6
| | | | | | | | | | | Some ciphers (such as GCM) support the concept of additional authenticated data, which does not appear in the ciphertext but may affect the operation of the cipher. Allow cipher_encrypt() and cipher_decrypt() to be called with a NULL destination buffer in order to pass additional data. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add NIST self-tests for AES192 in ECB and CBC modesMichael Brown2015-07-271-1/+33
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add NIST self-tests for AES128 and AES256 in ECB modeMichael Brown2015-07-271-0/+38
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Define shortcuts for frequently-used NIST AES test vectorsMichael Brown2015-07-271-25/+30
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Generalise cipher tests and use okx()Michael Brown2015-07-271-0/+118
Generalise the existing support for performing CBC-mode block cipher tests, and update the code to use okx() for neater reporting of test results. Signed-off-by: Michael Brown <mcb30@ipxe.org>