-
Notifications
You must be signed in to change notification settings - Fork 66
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
X9.63 KDF with SHA-1 #1403
Comments
Agreed. Thanks. We'll fix this. |
As a side note, we (NIST/CMVP/CAVP) are encouraging vendors to move away from SHA-1 and are planning for a transition away from SHA-1. See https://csrc.nist.gov/news/2022/nist-transitioning-away-from-sha-1-for-all-apps |
Hi @livebe01 could you check ANSI X9.63-2001? SP 800-135r1 specifically references the 2001 version of the standard, not the 2011 version. |
I can. Do you have a client that wants their X9.63 KDF tested w/ SHA-1? |
Yes, I have. Specifically, it's OpenSSL 3 which implements the X9.63 KDF with a variety of hash functions, including SHA-1: https://www.openssl.org/docs/man3.0/man7/EVP_KDF-X963.html. Apart from SHA-1, it also seems to support the truncated SHA-512 hashes and SHA-3. What's interesting is that ACVP supports pretty much every hash for the X9.42 KDF (https://github.com/usnistgov/ACVP/blob/master/src/ans9.42/sections/05-capabilities.adoc), but only a specific subset for the X9.63 KDF (https://github.com/usnistgov/ACVP/blob/master/src/ans9.63/sections/05-capabilities.adoc). Do you know why there is a difference there? I would expect them to be consistent. |
This would be because of when x9.63 KDF was introduced by the CAVP. The x9.63 KDF was in CAVS originally which matched the definition provided in x9.63-2011. When we implemented CAVS algorithms in ACVTS, we copied the allowed parameters as well. The x9.42 KDF was not in CAVS (the algorithm was a functional duplicate of the TPM KDF I believe). It was introduced by the CAVP in ACVTS, and because it was "new", it made sense to support all reasonable hash algorithms. I would agree that the truncated SHAs and SHA-3 would make sense to add to the x9.63 KDF. I would not be inclined to add SHA-1. |
Hi @celic it would certainly be useful to add the truncated SHAs and SHA-3 to the X9.63 KDF as well. What is the reasoning behind not adding SHA-1? |
Because the x9.63 KDF standard our testing is based on does not allow SHA-1.
|
Well, the 2001 version of the standard (the one referenced in SP 800-135) does in fact allow SHA-1. A quote from Section 5.6.2:
|
I took a deeper read at x9.63-2001. It says that you'd only be allowed to use SHA-1 to generate 80-bit symmetric keys (see Table H-3). The requirement of 112-bits of security strength would likely take precedence here. I think there is no current practical use for x9.63 KDF with SHA-1 within FIPS 140. |
Adds SHA2-512/224, SHA2-512/256, SHA3-224, SHA3-256, SHA3-384 and SHA3-512 support to the ANSI X9.63 KDF testing usnistgov#1403
The fix for this is on Demo in release v1.1.0.28. |
The fix for this is on Prod in release v1.1.0.28. |
Protocol Section
https://github.com/usnistgov/ACVP/blob/master/src/ans9.63/sections/05-capabilities.adoc
Protocol Question
Why does the X9.63 KDF only support SHA-224, SHA-256, SHA-384, and SHA-512? According to SP 800-135r1, all hash functions specified in FIPS 180-3 are approved. This would include SHA-1.
The text was updated successfully, but these errors were encountered: