-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Support FIPS-compliant PKCS#12 files and create them by default in FIPS mode #24546
Comments
Current upstream approach doesn't check FIPS mode so I doubt |
There still is the the default property of |
At least in the command line utility we could try to fetch PKCS12KDF and if the fetch fails we could try PBMAC1. |
Apologies for derailing this completely, @tomato42 - is this headed for Java JCE PKCS12 KeyStore in any form? Interop between Java and OpenSSL is important for me. |
@space88man no, I haven't filed a bug against Java to have it implemented there. If you have a need for interoperability with Java in FIPS mode I think it would be better for you to file that issue. |
@tomato42 - this part of the RFC
is not clear to me: in the examples in appendix A where the password is IOW: I could validate the files if I used the 4-byte input to PBKDF2 and not the 10-byte version (which would be used with legacy PKCS#12 KDF). |
@space88man that would be rather unfortunate... at the same time, there are implementations of this algorithm in GnuTLS and in NSS that do read those test vectors so would be surprising if all three implementations didn't notice it and got it wrong when implementing... @beldmit could you double check? |
Yes, the passed bytes are |
https://github.com/beldmit/openssl/blob/pkcs12_pbmac1/crypto/pkcs12/p12_mutl.c#L206 is the test implementation where the pass is dumped |
@space88man filed erratum for the RFC: https://mailarchive.ietf.org/arch/msg/spasm/VzeheYfjEcmXjFvie6XwxPwncy4/ |
@tomato42 - thanks, that was fast! With PBES2 Java's SunJCE is already using UTF-8 without NULL terminator. Since these PKCS#12 keystores are compatible with OpenSSL, I presume OpenSSL is doing the same. Can you consider the following wording instead? It also comports with R Relyea's response to your errata email.
|
@space88man I think you are supposed to use BMPStrings even with PBES2, it's just that so many implementations get this wrong that basically everybody has a fallback where they try both UTF-16 and UTF-8. But I haven't looked at that code. |
hmm, at least GnuTLS always creates files with UTF-8, so I don't know... |
@t-j-h do you have any thoughts on this, could bouncy castle also support this? |
The
PKCS12KDF
is not FIPS approved, so it's missing from thefips
provider. Therefore it's not possible to create aPKCS #12
file that only uses FIPS approved algorithms in currently released versions of OpenSSL.I've just published RFC 9579 that documents how to use PBMAC1 and therefore the FIPS approved PBKDF2 for the purpose of whole file integrity check.
I'd like to ask for:
PKCS #12
)Related:
The text was updated successfully, but these errors were encountered: