Menu

HKDF info is where protocol context becomes key identity
📰

HKDF info is where protocol context becomes key identity

DEV Community: security·StarkMan·about 22 hours ago
#vFxULPhe
#devtosecurity#devto#dev#secret#info
Reading 0:00
15s threshold

HKDF info is where protocol context becomes key identity

A key derivation function turns one secret into several keys. HKDF separates that work into an extract step and an expand step. RFC 5869 defines an optional info input for the expand step and describes it as context and application-specific information. The field is optional in the API. Treating it as optional in a shared-key deployment is a different decision.

The extract step computes a pseudorandom key from input keying material and an optional salt. The expand step uses that pseudorandom key, the info value, and an output length. If two applications use the same input secret and the same output length but different info values, they receive different output keys. The info value is not secret. Its job is to make the intended use unambiguous.

Make the context a fixed grammar

A useful info value identifies the protocol version, key purpose, sender or receiver role, algorithm, and any identifier that changes the key's meaning.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.