-
Notifications
You must be signed in to change notification settings - Fork 24
Proposing a KMAC Mechanism #38
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
base: master
Are you sure you want to change the base?
Conversation
d9166f8
to
77866e9
Compare
Signed-off-by: Simo Sorce <[email protected]>
This commit adds documentation for the CKM_SHAKE_128 and CKM_SHAKE_256 extensible-output hash mechanisms. A new "SHAKE Hashing" section is added to define these mechanisms and their use with the extensible output digesting functions (e.g., C_XoHashInit). The main mechanism table has been updated to include these new definitions. Signed-off-by: Simo Sorce <[email protected]>
This design supports use of KMAC as a keyed XOF, but doesn't really suit its use as a MAC in an idiomatic way. I think only a small change is needed to fix this
|
So what you are saying is that you want to be able to use KMAC also through the C_sign/C_Verify interface but w/o XOF ? |
Yes, that's right. The current implementation of KMAC in nShield HSMs functions purely as a MAC, using the native equivalents of the PKCS#11 The XOF-style interface isn't currently supported for KMAC in nShield (though it could be added, if there is demand for it). |
And the signature size output is fully determined by the ulMacLength mechanism parameter in your implementation ? Do you have any limitations on the maximum size of that value ? |
That's right. Currently we require the MAC tag to be between 8 and 4096 bytes.
|
Just trying to asses what language the spec should use for this field, in the both the XOF and non XOF case. I think I will add langauge that says that implementation may put limits on what is an acceptable value but I want to also provide a "safe" space for interoperability where implentations must support at least a certain range. 8-4096 sound like ok, but I think the spec should mandate something narrower as base line like 32-256 and leave it open to any other value. |
I'd suggest a baseline of 16-256, since 16-byte output from KMAC128 is a very reasonable thing to want. Apart from that, sounds good. |
This PR proposes mechanism for the implementation of KMAC as described in NIST Special Publication 800-185
Fixes #37