Add KMAC support to KBKDF.
authorslontis <shane.lontis@oracle.com>
Thu, 15 Dec 2022 08:57:09 +0000 (18:57 +1000)
committerTomas Mraz <tomas@openssl.org>
Fri, 16 Dec 2022 15:37:22 +0000 (16:37 +0100)
commita92a0097d07966c207ed78888e85b8a2a531acab
tree1348e373f721242ddbb47dab541567b295c5fd4c
parent47dec02433a95d45fc94c4dc097b3d5e0bb50f00
Add KMAC support to KBKDF.

Now that ACVP test vectors exist, support has been added for this mode.
See https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-108r1.pdf

Note that the test vectors used fairly large values for the input key
and the context, so the contraints for these has been increased from
256 to 512 bytes.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19916)

(cherry picked from commit 211c47ca1b1ac129dcee59d383cae44e36532bb9)
doc/man7/EVP_KDF-KB.pod
doc/man7/EVP_MAC-KMAC.pod
providers/implementations/kdfs/kbkdf.c
providers/implementations/macs/kmac_prov.c
test/evp_kdf_test.c
test/recipes/30-test_evp.t
test/recipes/30-test_evp_data/evpkdf_kbkdf_kmac.txt [new file with mode: 0644]
test/recipes/30-test_evp_data/evpmac_common.txt