1.7 KiB
1.7 KiB
KBKDF Key Derivation
Derives a key using the Key-Based Key Derivation Function (KBKDF) in Counter Mode.
Source library: cryptography
Overview
This node implements the KDF specified in NIST SP 800-108. It is designed to derive additional cryptographic keys from a single master key (Ki). The function uses a pseudorandom function (PRF), such as HMAC or CMAC, in a counter mode construction.
Parameters
- message: The master key (
Ki) to derive from, as aBYTESLIKEobject. - length: The desired length of the derived key in bytes.
- algorithm: The hash function to use for the underlying PRF (e.g.,
SHA256). - operation_mode: The PRF to use.
KBKDFHMAC: Uses HMAC as the PRF.KBKDFCMAC: Uses CMAC as the PRF. (Note: CMAC requires an underlying block cipher like AES, which is not exposed as an option in this node and may lead to errors if not configured correctly in the backend).
- location: The position of the counter within the data fed to the PRF (
BeforeFixed,AfterFixed,MiddleFixed). - rlen: The length of the counter field in bytes.
- llen: The length of the output key length field in bytes.
- label: (Optional) A
BYTESLIKEstring identifying the purpose of the derived key. - context: (Optional)
BYTESLIKEinformation related to the context of the derived key. - fixed: (Optional) Instead of
labelandcontext, you can supply fixed data in this field. If specified,labelandcontextare ignored. - break_location: (Optional) When
locationisMiddleFixed, this specifies the byte offset where the counter is inserted.
Outputs
- derived_key: The resulting derived key as a
BYTESLIKEobject.