why does the pkcs12 tool use such short mac salts?
Thomas Anderson <[email protected]>
| Newsgroups | gmane.comp.encryption.openssl.user |
|---|---|
| Message-ID | <CAEe4Dn9+LVW-Pwxx6xsokCyseFVrtOcXUJLRKjT=AApt2xrY-w@mail.gmail.com> |
I generated the attached *.P12 with the following command: openssl pkcs12 -export -out keyStore.p12 -inkey private.pem -in cert.pem (the password is blank) I then tried to run this command on it: openssl pkcs12 -info -in keyStore.p12 -noout Per that the MAC is using sha256 and the salt length is 8. https://www.rfc-editor.org/rfc/rfc7292#appendix-C says this of the salt length: This standard does not prescribe a length for the salt either. Ideally, the > salt is as long as the output of the hash function being used and consists > of completely random bits. My question is... why is OpenSSL using such a short salt? I know the PKCS12 standard leaves a lot to be desired, as elaborated by https://www.cs.auckland.ac.nz/~pgut001/pubs/pfx.html . Maybe the RFC's recommendations for salt length are best just ignored? Here's what openssl version returns: OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024) -- You received this message because you are subscribed to the Google Groups "openssl-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to openssl-users+unsubscribe-MCmKBN63+Bmbup2nOX2J7Q@public.gmane.org To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-users/CAEe4Dn9%2BLVW-Pwxx6xsokCyseFVrtOcXUJLRKjT%3DAApt2xrY-w%40mail.gmail.com.
keyStore.p12
(application/x-pkcs12, 1.3 KB) - not displayed