RFC5869 HKDF

RFC5869 defines a HMAC-based Extract-and-Expand Key Derivation Function. This can be implemented using DeriveMech_NISTKDFmGeneric as follows:

  • prf should be the HMAC mechanism corresponding to the RFC5869 Hash parameter, e.g. Mech_HMACSHA256 for SHA-256.

  • iv should be the empty byte string.

  • label can be used to pass the RFC5869 info string.

  • n_fields should be 3 and fields should be { KDFField_Feedback, KDFField_Label, KDFField_Counter1r1 }