]> git.ipfire.org Git - thirdparty/openssl.git/commit - test/build.info
Add EVP_DigestSqueeze() API.
authorslontis <shane.lontis@oracle.com>
Fri, 21 Jul 2023 05:05:38 +0000 (15:05 +1000)
committerTomas Mraz <tomas@openssl.org>
Fri, 10 Nov 2023 12:27:00 +0000 (13:27 +0100)
commit536649082212e7c643ab8d7bab89f620fbcd37f0
treed5f28d382eb86111b2d2672db4f7ab0a836bc9c5
parent9257a89b6f25dfa5aeee7114baec8ea992fcf5e5
Add EVP_DigestSqueeze() API.

Fixes #7894

This allows SHAKE to squeeze multiple times with different output sizes.

The existing EVP_DigestFinalXOF() API has been left as a one shot
operation. A similar interface is used by another toolkit.

The low level SHA3_Squeeze() function needed to change slightly so
that it can handle multiple squeezes. This involves changing the
assembler code so that it passes a boolean to indicate whether
the Keccak function should be called on entry.
At the provider level, the squeeze is buffered, so that it only requests
a multiple of the blocksize when SHA3_Squeeze() is called. On the first
call the value is zero, on subsequent calls the value passed is 1.

This PR is derived from the excellent work done by @nmathewson in
https://github.com/openssl/openssl/pull/7921

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21511)
24 files changed:
crypto/evp/digest.c
crypto/evp/legacy_sha.c
crypto/sha/asm/keccak1600-armv4.pl
crypto/sha/asm/keccak1600-armv8.pl
crypto/sha/asm/keccak1600-ppc64.pl
crypto/sha/asm/keccak1600-x86_64.pl
crypto/sha/keccak1600.c
crypto/sha/sha3.c
doc/life-cycles/digest.dot
doc/man3/EVP_DigestInit.pod
doc/man7/EVP_MD-BLAKE2.pod
doc/man7/EVP_MD-SHAKE.pod
doc/man7/img/digest.png
doc/man7/life_cycle-digest.pod
doc/man7/provider-digest.pod
include/crypto/evp.h
include/internal/sha3.h
include/openssl/core_dispatch.h
include/openssl/evp.h
providers/implementations/digests/sha3_prov.c
test/build.info
test/evp_xof_test.c [new file with mode: 0644]
test/recipes/30-test_evp_xof.t [new file with mode: 0644]
util/libcrypto.num