RFC 8619

Algorithm Identifiers for the HMAC-based Extract-and-Expand Key Derivation Function (HKDF)

πŸ“… published June 2019, from ietf

Introduction ✨

Internet Engineering Task Force (IETF) πŸŽ€ Β· R. Housley Β· Vigil Security Β· Standards Track πŸ’… Β· June 2019 🌸 Β· ISSN: 2070-1721 πŸ¦‹

okay bestie, this is RFC 8619, and it's titled "Algorithm Identifiers for the HMAC-based Extract-and-Expand Key Derivation Function (HKDF)" 🧚 It was written by Russell Housley at Vigil Security and it's a Standards Track document, so it's official IETF Internet Standards material πŸ‘‘ It was published in June 2019, and it doesn't obsolete or update anything, it just adds new stuff πŸ’œ

The whole point is giving HKDF some names it can be called by. πŸ’–


Abstract

okay so RFC 5869 is the spec for HKDF, and this doc is like "cool, now here are algorithm identifiers for HKDF with three popular one-way hash functions" 🫢 Those three hash functions are SHA-256, SHA-384, and SHA-512 πŸ”₯

Status of This Memo

this is an Internet Standards Track doc πŸ¦‹ It's a product of the IETF, it has consensus from the IETF community, it went through public review, and the IESG approved it for publication πŸ’… If you want more on Internet Standards, check out Section 2 of RFC 7841 ✨

info about the current status, any errata, and where to give feedback lives at https://www.rfc-editor.org/info/rfc8619 🌈

Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved. 🌸

this doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as they were on the publication date 🫢 Read them carefully because they cover your rights and restrictions 😭 Any Code Components pulled out of this document MUST include the Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, per the Simplified BSD License πŸ’€

heads up: the requirement above is about the Code Components, so keep the Simplified BSD License text attached whenever you copy code out of here πŸ™ˆ

Table of Contents πŸŽ€

1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
  1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   2
  1.2.  ASN.1 . . . . . . . . . . . . . . . . . . . . . . . . . .   2
2.  HKDF Algorithm Identifiers  . . . . . . . . . . . . . . . . .   2
3.  ASN.1 Module  . . . . . . . . . . . . . . . . . . . . . . . .   3
4.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   4
6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   5
  6.1.  Normative References  . . . . . . . . . . . . . . . . . .   5
  6.2.  Informative References  . . . . . . . . . . . . . . . . .   6
Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   6

1. Introduction πŸ¦‹

the HKDF algorithm [RFC5869] is a key derivation function built on the Hashed Message Authentication Code (HMAC) πŸ’– This doc gives algorithm identifiers to HKDF used with three common one-way hash functions 🧚 These identifiers are needed so HKDF can be used in some security protocols, like the Cryptographic Message Syntax (CMS) [RFC5652] ✨

1.1. Terminology

the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be read as described in BCP 14 [RFC2119] [RFC8174] only when they're in ALL CAPS, like shown here 🫢

1.2. ASN.1

in this spec, values get generated with ASN.1 [X.680] using the Basic Encoding Rules (BER) and the Distinguished Encoding Rules (DER) [X.690] 🌈


2. HKDF Algorithm Identifiers πŸ‘‘

this section gives three algorithm identifiers to HKDF [RFC5869] when it's used with the three common one-way hash functions specified in [SHS]: SHA-256, SHA-384, and SHA-512 πŸ”₯ When any of these three object identifiers show up inside the ASN.1 type AlgorithmIdentifier, the parameters component of that type SHALL be absent πŸ’…

the spec for AlgorithmIdentifier is in [RFC5911], which grew out of the original definition in X.509 [X.509-88] πŸ¦‹

the assigned object identifiers are:

id-alg-hkdf-with-sha256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 28 }

id-alg-hkdf-with-sha384 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 29 }

id-alg-hkdf-with-sha512 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 30 }

3. ASN.1 Module 🧚

this section has the ASN.1 module for the HKDF algorithm identifiers πŸ’– It imports types from other ASN.1 modules defined in [RFC5912] ✨

HKDF-OID-2019
  { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
    smime(16) modules(0) id-mod-hkdf-oid-2019(68) }

DEFINITIONS IMPLICIT TAGS ::=
BEGIN

-- EXPORTS All

IMPORTS

AlgorithmIdentifier{}, KEY-DERIVATION
  FROM AlgorithmInformation-2009  -- [RFC5912]
    { iso(1) identified-organization(3) dod(6) internet(1)
      security(5) mechanisms(5) pkix(7) id-mod(0)
      id-mod-algorithmInformation-02(58) } ;

--
-- Object Identifiers
--

id-alg-hkdf-with-sha256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 28 }

id-alg-hkdf-with-sha384 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 29 }

id-alg-hkdf-with-sha512 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 30 }

--
-- Key Derivation Algorithm Identifiers
--

KeyDevAlgs KEY-DERIVATION ::= {
  kda-hkdf-with-sha256 |
  kda-hkdf-with-sha384 |
  kda-hkdf-with-sha512,
  ... }

kda-hkdf-with-sha256 KEY-DERIVATION ::= {
    IDENTIFIER id-alg-hkdf-with-sha256
    PARAMS ARE absent
    SMIME-CAPS { IDENTIFIED BY id-alg-hkdf-with-sha256 } }

kda-hkdf-with-sha384 KEY-DERIVATION ::= {
    IDENTIFIER id-alg-hkdf-with-sha384
    PARAMS ARE absent
    SMIME-CAPS { IDENTIFIED BY id-alg-hkdf-with-sha384 } }

kda-hkdf-with-sha512 KEY-DERIVATION ::= {
    IDENTIFIER id-alg-hkdf-with-sha512
    PARAMS ARE absent
    SMIME-CAPS { IDENTIFIED BY id-alg-hkdf-with-sha512 } }

END

4. Security Considerations πŸ’€

okay, security time, and this part is SERIOUS 😭 HKDF is simple, but a LOT of security stuff went into how it was designed and analysed πŸ”₯ Going through all of it is way beyond this doc πŸ™ˆ If you want the full rationale behind the HKDF design, check out [EPRINT] πŸ’œ


5. IANA Considerations 🌸

one object identifier for the ASN.1 module in Section 3 got assigned in the "SMI Security for S/MIME Module Identifiers (1.2.840.113549.1.9.16.0)" registry [IANA-MOD] πŸŽ€

id-mod-hkdf-oid-2019 OBJECT IDENTIFIER ::= {
   iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
   pkcs-9(9) smime(16) mod(0) 68 }

Three object identifiers for the HKDF algorithm identifiers got assigned in the "SMI Security for S/MIME Algorithms (1.2.840.113549.1.9.16.3)" registry [IANA-ALG] πŸ¦‹

id-alg-hkdf-with-sha256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 28 }

id-alg-hkdf-with-sha384 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 29 }

id-alg-hkdf-with-sha512 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 30 }

6. References ✨

6.1. Normative References πŸ‘‘

[SHS]      National Institute of Standards and Technology (NIST),
           "Secure Hash Standard (SHS)", FIPS PUB 180-4,
           DOI 10.6028/NIST.FIPS.180-4, August 2015.

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119,
           DOI 10.17487/RFC2119, March 1997,
           <https://www.rfc-editor.org/info/rfc2119>.

[RFC5652]  Housley, R., "Cryptographic Message Syntax (CMS)", STD 70,
           RFC 5652, DOI 10.17487/RFC5652, September 2009,
           <https://www.rfc-editor.org/info/rfc5652>.

[RFC5869]  Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand
           Key Derivation Function (HKDF)", RFC 5869,
           DOI 10.17487/RFC5869, May 2010,
           <https://www.rfc-editor.org/info/rfc5869>.

[RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
           2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
           May 2017, <https://www.rfc-editor.org/info/rfc8174>.

[X.680]    ITU-T, "Information technology -- Abstract Syntax Notation
           One (ASN.1): Specification of basic notation",
           ITU-T Recommendation X.680, ISO/IEC 8824-1:2015, August
           2015.

[X.690]    ITU-T, "Information technology -- ASN.1 encoding rules:
           Specification of Basic Encoding Rules (BER), Canonical
           Encoding Rules (CER) and Distinguished Encoding Rules
           (DER)", ITU-T Recommendation X.690, ISO/IEC 8825-1:2015,
           August 2015.

6.2. Informative References 🌈

[EPRINT]   Krawczyk, H., "Cryptographic Extraction and Key
           Derivation: The HKDF Scheme", Proceedings of CRYPTO 2010,
           August 2010, <https://eprint.iacr.org/2010/264.pdf>.

[IANA-ALG] IANA, "SMI Security for S/MIME Algorithms
           (1.2.840.113549.1.9.16.3)",
           <https://www.iana.org/assignments/smi-numbers/>.

[IANA-MOD] IANA, "SMI Security for S/MIME Module Identifier
           (1.2.840.113549.1.9.16.0)",
           <https://www.iana.org/assignments/smi-numbers/>.

[RFC5911]  Hoffman, P. and J. Schaad, "New ASN.1 Modules for
           Cryptographic Message Syntax (CMS) and S/MIME", RFC 5911,
           DOI 10.17487/RFC5911, June 2010,
           <https://www.rfc-editor.org/info/rfc5911>.

[RFC5912]  Hoffman, P. and J. Schaad, "New ASN.1 Modules for the
           Public Key Infrastructure Using X.509 (PKIX)", RFC 5912,
           DOI 10.17487/RFC5912, June 2010,
           <https://www.rfc-editor.org/info/rfc5912>.

[X.509-88] CCITT, "Recommendation X.509: The Directory -
           Authentication Framework", 1988.

Author's Address πŸ’–

Russell Housley
Vigil Security, LLC
515 Dranesville Road
Herndon, VA 20170
United States of America

Email: housley@vigilsec.com
πŸ“¦ where this page comes from