Regarding HKDF (RFC 5869) - HKDF has two steps, extract and expand.

Some answers on this site suggest that you can extract once, and then generate multiple keys from the resulting PRK by multiple invocations of HKDF-expand (with different info strings).

Other answers say this is not how HKDF should be used, and possibly not safe. However, using HKDF-expand to generate a longer key (say, 256 bits) and then splitting it would be ok. (See D.W.'s answer in Which risks are associated with deriving multiple keys from the same DH secret Z? for example).

When I originally read the RFC I got the impression that it is fine to generate multiple keys from the same PRK using different info strings, but re-reading it, I can't see this being substantiated anywhere, i.e., the RFC does not explicitly allow multiple HKDF-expands on the same PRK (and implicitly seems to not support it).


  • can HKDF-expand be used multiple times on the same PRK/HKDF-extract result?
  • if not, is it safe to generate a longer key using expand and split it?
  • 1
    $\begingroup$ The original paper (PDF; see D.3 on page 29) seems to imply it's safe to use HKDF multiple times with the same SKM and different "context info" values $\endgroup$
    – Tim McLean
    Dec 30, 2014 at 6:14

1 Answer 1


Taken directly from the RFC:

The second stage "expands" the pseudorandom key to the desired
length; the number and lengths of the output keys depend on the
specific cryptographic algorithms for which the keys are needed.

The use of the plural here suggests (at least to me) that yes, it's ok to expand the same PRK several times with different contexts. Can you provide any links (within SE or otherwise) that suggest otherwise?

Also from the RFC, regarding the 'info' parameter of the expand step:

In particular, it may prevent the derivation of the same keying material for different contexts (when the same input key material (IKM) is used in such different contexts).

  • $\begingroup$ added link to question $\endgroup$ Jul 19, 2013 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.