Extract-and-Expand Key Derivation
Separate extraction from context-specific expansion and derive keys for distinct purposes from a shared secret.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Extraction accepts input keying material
An extract-and-expand function such as HKDF uses an extraction step to produce a pseudorandom key under its assumptions about the input. A salt helps define this step and can be public. Extraction does not create entropy absent in the input and is not a substitute for a dedicated password hashing design. Inputs such as a group shared secret require the protocol to specify both representation and validation.
Expansion labels a key’s intended use
Use distinct context strings for independent sending and receiving roles, protocol versions, or encryption purposes, following the chosen protocol’s format. Deriving each with a distinct label and correct output length separates the keys under the function’s security model. If one keying material is reused across sessions, bind the session context as required. Diffie–Hellman supplies a shared value, while hybrid encryption packages key derivation together with authenticated encryption.[1][2]