]> git.ipfire.org Git - thirdparty/openssl.git/commit
openssl-speed: support KMAC128 & KMAC256, refactor mac setup/teardown
authorJames Muir <james@openssl.org>
Fri, 17 Nov 2023 23:02:51 +0000 (18:02 -0500)
committerTomas Mraz <tomas@openssl.org>
Fri, 24 Nov 2023 12:58:14 +0000 (13:58 +0100)
commit55ca75dd8fc4cbceb65f4ef40c921b0f5b8f7b90
treeb04ae758a0c1780c03e5e2aa3cdb5c76c25c7e33
parente9241d16b47f24e27966bee0f8664a6b88994164
openssl-speed: support KMAC128 & KMAC256, refactor mac setup/teardown

Add ability to measure performance of the two kmac algorithms, and
reduce code duplication in mac testing by introducing mac_setup() and
mac_teardown().  Also, start accepting "cmac" as an algorithm string
(similar to how "hmac" is accepted).

We can now compare the performance of KMAC128, KMAC256 (mac algs) to
KECCAK-KMAC128, KECCAK-KMAC256 (digest/xof algs).

Fixes #22619

Testing:

  $ LD_LIBRARY_PATH=. ./apps/openssl speed kmac cmac hmac

  $ LD_LIBRARY_PATH=. ./apps/openssl speed kmac256
  $ LD_LIBRARY_PATH=. ./apps/openssl speed -evp KECCAK-KMAC256

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22764)
apps/speed.c