We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
New universal KDF uses KMAC-256 defined as:
byte[] Mac.kmac256(SecretKey key, byte[] data, byte[] custom, int outLength)
key
data
custom
outLength
Then KDF implementation is defined as:
SecretKey KDF.derive(SecretKey key, long index, byte[] context = null, int outLength = 32)
index
context
byte[] INDEX_BYTES = ByteUtils.encode(index); byte[] CTX; if (context != null) { CTX = ByteUtils.concat(INDEX_BYTES, ByteUtils.concatWithSizes(context)); } else { CTX = INDEX_BYTES; } byte[] K_DERIVED = Mac.kmac256(key, CTX, "PA4KDF", outLength);
Cover the new KDF by tests.
No response
The text was updated successfully, but these errors were encountered:
romanstrobl
No branches or pull requests
Description
New universal KDF uses KMAC-256 defined as:
byte[] Mac.kmac256(SecretKey key, byte[] data, byte[] custom, int outLength)
wherekey
(K) is a key of any lengthdata
(X) is the main input data. It may be of any length, including zero.custom
(S) is an optional customization string. Use UTF-8 to reinterpret string into bytes.outLength
(L) is an integer representing the requested output length in bytes.Then KDF implementation is defined as:
SecretKey KDF.derive(SecretKey key, long index, byte[] context = null, int outLength = 32)
key
- is key to be derivedindex
- is numeric index to distinguish multiple keys.context
- optional byte array containing the information related to the derived keying materialoutLength
- integer representing the requested output length in bytes.Cover the new KDF by tests.
Acceptance criteria
No response
Technical specification
No response
QA specification
No response
JIRA issue code
No response
The text was updated successfully, but these errors were encountered: