Fix SHAKE AlgorithmIdentifier encodings

NIST CSOR specifies that the id-shake128 and id-shake256
algorithm identifiers, like the SHA-3 ones, do not carry
any parameters.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27190)
This commit is contained in:
Daniel Van Geest 2025-03-28 10:40:32 +00:00 committed by Tomas Mraz
parent 8e787b1028
commit bef03c6a24
2 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ const EVP_MD *EVP_shake##bitlen(void) \
NID_shake##bitlen, \ NID_shake##bitlen, \
0, \ 0, \
bitlen / 8, \ bitlen / 8, \
EVP_MD_FLAG_XOF, \ EVP_MD_FLAG_XOF | EVP_MD_FLAG_DIGALGID_ABSENT, \
EVP_ORIG_GLOBAL, \ EVP_ORIG_GLOBAL, \
LEGACY_EVP_MD_METH_TABLE(shake_init, sha3_int_update, sha3_int_final, \ LEGACY_EVP_MD_METH_TABLE(shake_init, sha3_int_update, sha3_int_final, \
shake_ctrl, (KECCAK1600_WIDTH - bitlen * 2) / 8), \ shake_ctrl, (KECCAK1600_WIDTH - bitlen * 2) / 8), \

View File

@ -20,7 +20,7 @@
#include "prov/implementations.h" #include "prov/implementations.h"
#define SHA3_FLAGS PROV_DIGEST_FLAG_ALGID_ABSENT #define SHA3_FLAGS PROV_DIGEST_FLAG_ALGID_ABSENT
#define SHAKE_FLAGS PROV_DIGEST_FLAG_XOF #define SHAKE_FLAGS (PROV_DIGEST_FLAG_XOF | PROV_DIGEST_FLAG_ALGID_ABSENT)
#define KMAC_FLAGS PROV_DIGEST_FLAG_XOF #define KMAC_FLAGS PROV_DIGEST_FLAG_XOF
/* /*