arrows-split-up-and-leftHKDF

HMAC-based Key Derivation Functionarrow-up-right (RFC 5869arrow-up-right). Derives a 32-byte cryptographic key from input key material. Commonly used to turn a shared secret (from ECDH) into an encryption key suitable for AES-GCM.

circle-info

The Seismic HKDF precompile uses hardcoded parameters: salt is None, info is a fixed internal string, and the output is always 32 bytes. The only user-supplied input is the raw key material.

Input

Field
Type
Description

input key material

bytes

Source key material (e.g., raw ECDH shared point)

Output

Bytes
Type
Description

derived key

32 bytes

Derived key material

Use cases

  • Deriving AES encryption keys from shared secrets

  • Key derivation with domain separation

Examples

Built-in helper

function hkdf(bytes memory input) view returns (bytes32);
bytes32 derivedKey = hkdf(inputKeyMaterial);

Manual usage

Last updated