Key Derivation

Index

kdf/bytes-max kdf/bytes-min kdf/context-bytes kdf/derive-from-key kdf/key-bytes kdf/keygen

Reference

kdf/bytes-maxnumber 65535

Maximum number of bytes allowed in kdf generated key.

kdf/bytes-minnumber 16

Minimum number of bytes allowed in kdf generated key.

Number of bytes in context argument to jhydro/kdf functions.

(kdf/derive-from-key sublen subid ctx key)

Generate a subkey from a master key. Takes a subid, which is a positive integer that represents the key id, and ctx, which is an 8 byte string that is usually an application constant. Finally, the last parameter is the master key. Returns a string of length sublen.

kdf/key-bytesnumber 32

Number of bytes in a kdf key.

kdf/keygencfunction
(kdf/keygen &opt buf)

Generate a key for use in KDFs. Returns the modified buf if provided, or a new random buffer.