]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[crypto] Add concept of additional data to cipher algorithms
authorMichael Brown <mcb30@ipxe.org>
Mon, 24 Oct 2022 17:49:43 +0000 (18:49 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 25 Oct 2022 12:21:30 +0000 (13:21 +0100)
commit0c383bf00afbef1a9cfe02829d1bc6ee46e1c16b
treeac5e0bca148bd881a6e01fdb55591d5fb8ba9447
parent8e478e648fb68ac6f07e4e5cd80a5c1fefcb1cf5
[crypto] Add concept of additional data to cipher algorithms

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>
src/include/ipxe/crypto.h
src/tests/aes_test.c
src/tests/cipher_test.c
src/tests/cipher_test.h