New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for SHA-3 based PRF to PBES2 #16237
Conversation
I'd like to see a revamp of the PBE infrastructure. What's there is pretty horrible and a bit of a kludge. Are there any test vectors for this? |
As safe as this is, I don't think it will make 3.0. |
I'm not aware of any |
I cant find any test vectors either.. |
Unravelling this is probably not as easy as it sounds. I think @jon-oracle may have tried to do this initially? |
Yes I did try but abandoned the attempt as getting it to work alongside the existing API was painful. It would be useful to deprecate the existing EVP_PBE_alg_add() API (which I'm not sure is even used/tested) so the new infrastructure can start from a clean slate. A big problem is the various *_keyivgen functions taking ASN1_TYPEs for the parameters. Rewriting them to use OSSL_PARAM and/or having some kind of utility to convert ASN.1 AlgorithmParameters to OSSL_PARAM and back might help. |
I'd like to have this change in 3.0.0 and some sort of PBE revamp after 3.0.0. @tomato42, did you test the interoperability for these algorithms between OpenSSL and any other implementations? |
It is a new feature so not 3.0.0 relevant. |
Sad but true |
It is also possible to add these from an application via |
No, GnuTLS doesn't support even SHA-512 as a PBKDF2 HMAC, I don't think NSS has SHA-3 implementation at all, and it can't import PKCS#12 files with SHA-3 MAC or KDF Update: yes, NSS doesn't implement SHA-3 at all: MZBZ#1342546 |
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.
4db7921
to
1b3e6d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request is ready to merge |
Merged, thanks! |
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 #16237)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #16237)
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 openssl#16237) (cherry picked from commit c73ba81)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from openssl#16237) (cherry picked from commit 5702392)
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 #16237) (cherry picked from commit c73ba81)
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.
Checklist