diff --git a/spec/Overview-WebCryptoAPI.xml b/spec/Overview-WebCryptoAPI.xml index 71fe541..fc23119 100644 --- a/spec/Overview-WebCryptoAPI.xml +++ b/spec/Overview-WebCryptoAPI.xml @@ -3491,7 +3491,7 @@ dictionary CryptoKeyPair { - HKDF-CTR + HKDF @@ -14659,18 +14659,16 @@ dictionary HmacKeyGenParams : -

HKDF-CTR

-
+
+

HKDF

+

Description

This section is non-normative.

- The "HKDF-CTR" algorithm identifier is used to + The "HKDF" algorithm identifier is used to perform key derivation using the extraction-then-expansion approach described in - [NIST SP800-56C], using HMAC in counter mode, and - using the SHA hash functions defined in this specification - as described in Section 5.1 of - [NIST SP800-108]. + [RFC 5869] and + using the SHA hash functions defined in this specification.

Other specifications @@ -14678,11 +14676,11 @@ dictionary HmacKeyGenParams : +

Registration

The recognized algorithm name - for this algorithm is "HKDF-CTR". + for this algorithm is "HKDF".

@@ -14695,7 +14693,7 @@ dictionary HmacKeyGenParams : HkdfCtrParams + @@ -14706,25 +14704,25 @@ dictionary HmacKeyGenParams : -

HkdfCtrParams dictionary

+
+

HkdfParams dictionary

-dictionary HkdfCtrParams :
Algorithm { +dictionary HkdfParams : Algorithm { // The algorithm to use with HMAC (e.g.: SHA-256) - required HashAlgorithmIdentifier hash; - // A bit string that corresponds to the label that identifies the purpose for the derived keying material. - required BufferSource label; - // A bit string that corresponds to the context of the key derivation, as described in Section 5 of [NIST SP800-108] - required BufferSource context; + required HashAlgorithmIdentifier hash; + // A bit string that corresponds to the salt used in the extract step. + required BufferSource salt; + // A bit string that corresponds to the context and application specific context for the derived keying material. + required BufferSource info; };
-
+

Operations

Derive Bits
@@ -14745,50 +14743,42 @@ dictionary HkdfCtrParams : FIPS PUB 198-1] using the hash function - described by the hash member of - normalizedAlgorithm. -

- -
  • -

    - Let keyDerivationKey be the result of performing prf - using extractKey as the key and the secret represented by [[keyDerivationKey be the secret represented by [[handle]] internal slot of key as the message.

  • - Let result be the result of performing the KDF in counter - mode operation described in Section 5.1 of - [NIST SP800-108] using: + Let result be the result of performing the HKDF extract and then + the HKDF expand step described in Section 2 of + [RFC 5869] using:

  • - + @@ -14182,18 +14182,16 @@

    30.3. Operations

    -
    -

    31. HKDF-CTR

    -
    +
    +

    31. HKDF

    +

    31.1. Description

    This section is non-normative.

    - The "HKDF-CTR" algorithm identifier is used to + The "HKDF" algorithm identifier is used to perform key derivation using the extraction-then-expansion approach described in - [NIST SP800-56C], using HMAC in counter mode, and - using the SHA hash functions defined in this specification - as described in Section 5.1 of - [NIST SP800-108]. + [RFC 5869] and + using the SHA hash functions defined in this specification.

    Other specifications @@ -14201,11 +14199,11 @@

    31.1. Description

    Such specifications must define the digest operation for the additional hash algorithms.

    -
    +

    31.2. Registration

    The recognized algorithm name - for this algorithm is "HKDF-CTR". + for this algorithm is "HKDF".

    HkdfParams ArrayBuffer
    HKDF-CTRHKDF
    @@ -14218,7 +14216,7 @@

    31.2. Registration

    - + @@ -14229,25 +14227,25 @@

    31.2. Registration

    - +
    deriveBitsHkdfCtrParamsHkdfParams ArrayBuffer
    Get key length NoneInteger or nullnull
    -
    -

    31.3. HkdfCtrParams dictionary

    +
    +

    31.3. HkdfParams dictionary

    IDL
    
    -dictionary HkdfCtrParams : Algorithm {
    +dictionary HkdfParams : Algorithm {
       // The algorithm to use with HMAC (e.g.: SHA-256)
    -  required HashAlgorithmIdentifier hash;
    -  // A bit string that corresponds to the label that identifies the purpose for the derived keying material.
    -  required BufferSource label;
    -  // A bit string that corresponds to the context of the key derivation, as described in Section 5 of [NIST SP800-108]
    -  required BufferSource context;
    +  required HashAlgorithmIdentifier hash;
    +  // A bit string that corresponds to the salt used in the extract step.
    +  required BufferSource salt;
    +  // A bit string that corresponds to the context and application specific context for the derived keying material.
    +  required BufferSource info;
     };
               
    -
    +

    31.4. Operations

    Derive Bits
    @@ -14268,47 +14266,39 @@

    31.4. Operations

  • - Let prf be the MAC Generation function described in Section 4 of - [FIPS PUB 198-1] using the hash function - described by the hash member of - normalizedAlgorithm. -

    -
  • -
  • -

    - Let keyDerivationKey be the result of performing prf - using extractKey as the key and the secret represented by [[handle]] internal slot of key + Let keyDerivationKey be the secret represented by [[handle]] internal slot of key as the message.

  • - Let result be the result of performing the KDF in counter - mode operation described in Section 5.1 of - [NIST SP800-108] using: + Let result be the result of performing the HKDF extract and then + the HKDF expand step described in Section 2 of + [RFC 5869] using:

    • - prf as the Pseudo-Random Function, PRF, + the hash member of + normalizedAlgorithm as Hash,

    • - keyDerivationKey as the Key derivation key, - KI, + keyDerivationKey as the input keying material, + IKM,

    • - the contents of the label member of - normalizedAlgorithm as Label, + the contents of the salt member of + normalizedAlgorithm as salt,

    • - the contents of the context member of - normalizedAlgorithm as Context, + the contents of the info member of + normalizedAlgorithm as info,

    • @@ -14316,17 +14306,6 @@

      31.4. Operations

      length as the value of L,

    • -
    • -

      - 32 as the value of r, and -

      -
    • -
    • -

      - the 32-bit little-endian binary encoding of length - as the encoded length value [L]2. -

      -
  • @@ -14399,7 +14378,7 @@

    31.4. Operations

  • Set the name attribute of - algorithm to "HKDF-CTR". + algorithm to "HKDF".

  • @@ -14902,12 +14881,6 @@

    36.1. Normative References

    NIST Special Publication 800-56C: Recommendation for Key Derivation through Extraction-then-Expansion, November 2011, NIST. - -
    NIST SP 800-108
    -
    - - NIST Special Publication 800-108: Recommendation for Key Derivation Using - Pseudorandom Functions (Revised), October 2009, NIST.
    RFC 2119
    @@ -14959,7 +14932,13 @@

    36.1. Normative References

    Elliptic Curve Cryptography Subject Public Key Information, S. Turner, D. Brown, K. Yiu, R. Housley, T. Polk. IETF. -
    + +
    RFC 5869
    +
    + HMAC-based Extract-and-Expand Key + Derivation Function (HKDF)", + H. Krawczyk, P. Eronen. IETF. +
    RFC 5915
    Elliptic Curve Private Key Structure