summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorHubert Kario <hkario@redhat.com>2021-08-05 22:41:11 +0200
committerTomas Mraz <tomas@openssl.org>2022-11-21 10:49:52 +0100
commit5b8b7bcbab15dd9620a2e592aeae061f9c4bf841 (patch)
tree3345e9aafae7a085aff5b88a200bb672a116bbaa /crypto
parente12f0f11b3051e403736ea349aa47c3e5e7364d1 (diff)
add support for SHA-3 based PRF to PBES2
As there are no limitations for HMACs used in PBKDF2 inside PBES2, as more specifically the SHA-3 hashes are drop-in replacements for SHA-2 hashes, we can easily add support for SHA-3 here. Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16237) (cherry picked from commit c73ba81899c291d60851321e6de8913d4800c456)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/evp/evp_pbe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/evp/evp_pbe.c b/crypto/evp/evp_pbe.c
index 5f6720d2c3..c42c161289 100644
--- a/crypto/evp/evp_pbe.c
+++ b/crypto/evp/evp_pbe.c
@@ -77,6 +77,10 @@ static const EVP_PBE_CTL builtin_pbe[] = {
NID_id_GostR3411_2012_256, 0},
{EVP_PBE_TYPE_PRF, NID_id_tc26_hmac_gost_3411_2012_512, -1,
NID_id_GostR3411_2012_512, 0},
+ {EVP_PBE_TYPE_PRF, NID_hmac_sha3_224, -1, NID_sha3_224, 0},
+ {EVP_PBE_TYPE_PRF, NID_hmac_sha3_256, -1, NID_sha3_256, 0},
+ {EVP_PBE_TYPE_PRF, NID_hmac_sha3_384, -1, NID_sha3_384, 0},
+ {EVP_PBE_TYPE_PRF, NID_hmac_sha3_512, -1, NID_sha3_512, 0},
{EVP_PBE_TYPE_PRF, NID_hmacWithSHA512_224, -1, NID_sha512_224, 0},
{EVP_PBE_TYPE_PRF, NID_hmacWithSHA512_256, -1, NID_sha512_256, 0},
{EVP_PBE_TYPE_KDF, NID_id_pbkdf2, -1, -1, PKCS5_v2_PBKDF2_keyivgen, &PKCS5_v2_PBKDF2_keyivgen_ex},