]> git.ipfire.org Git - thirdparty/openssl.git/commit
speed: Fix regression of measuring shake with -evp
authorIngo Franzki <ifranzki@linux.ibm.com>
Wed, 22 May 2024 14:15:34 +0000 (16:15 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 28 May 2024 06:48:36 +0000 (08:48 +0200)
commit184d29dbabbb6c7a5cc829d3ac4b966f781d2b2e
treec3952b8308c97e9777b28449367821754a9b671b
parent05faa4ffee7f20fcee129f77d153f2dcc609bdc8
speed: Fix regression of measuring shake with -evp

After commit b911fef216d1386210ec24e201d54d709528abb4 speed with shake128 or
shake256 does not run anymore:

  # openssl speed -seconds 1 -evp shake128 -bytes 256
  Doing shake128 ops for 1s on 256 size blocks: shake128 error!
  000003FF9B7F2080:error:1C8000A6:Provider routines:keccak_final:invalid digest
                     length:providers/implementations/digests/sha3_prov.c:117:
  version: 3.4.0-dev
  ...
  type            256 bytes
  shake128             0.00

Function EVP_Digest_loop() must use EVP_DigestInit_ex2(), EVP_DigestUpdate(),
and EVP_DigestFinalXOF() in case of shake instead of just EVP_Digest() to get
around this.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24462)
apps/speed.c