From 570fb64274ec68b9a9de3532577782d02dd903d7 Mon Sep 17 00:00:00 2001 From: Daniel Huigens Date: Fri, 25 Oct 2024 08:15:11 +0000 Subject: [PATCH] Remove superfluous text in the HKDF derive bits operation (#372) SHA: 4c8ebc796de3c9d96a86b4e0167f2c527ba03f3b Reason: push, by twiss Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 65 +++++++++++++++++++++++------------------------------- 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/index.html b/index.html index f94bb7d..39effc7 100644 --- a/index.html +++ b/index.html @@ -116,7 +116,7 @@ - + @@ -226,7 +226,7 @@

Web Cryptography API

-

W3C Editor's Draft

+

W3C Editor's Draft

More details about this document
@@ -13210,16 +13210,7 @@

Web Cryptography API

  • - Let extractKey be a key equal to n zero bits where - n is the size of the output of the hash function described by the - hash member of - normalizedAlgorithm. -

    -
  • -
  • -

    - Let keyDerivationKey be the secret represented by [[handle]] internal slot of key - as the message. + Let keyDerivationKey be the secret represented by [[handle]] internal slot of key.

  • @@ -13231,7 +13222,7 @@

    Web Cryptography API

    • - the hash member of + the hash member of normalizedAlgorithm as Hash,

    • @@ -13565,14 +13556,14 @@

      Web Cryptography API

      33.1 Generate a signing key pair, sign some data

      -
      var encoder = new TextEncoder('utf-8');
      +        
      var encoder = new TextEncoder('utf-8');
       
       // Algorithm Object
       var algorithmKeyGen = {
         name: "RSASSA-PKCS1-v1_5",
         // RsaHashedKeyGenParams
         modulusLength: 2048,
      -  publicExponent: new Uint8Array([0x01, 0x00, 0x01]),  // Equivalent to 65537
      +  publicExponent: new Uint8Array([0x01, 0x00, 0x01]),  // Equivalent to 65537
         hash: {
           name: "SHA-256"
         }
      @@ -13582,23 +13573,23 @@ 

      Web Cryptography API

      name: "RSASSA-PKCS1-v1_5" }; -window.crypto.subtle.generateKey(algorithmKeyGen, false, ["sign"]).then( - function(key) { - var dataPart1 = encoder.encode("hello,"); - var dataPart2 = encoder.encode(" world!"); +window.crypto.subtle.generateKey(algorithmKeyGen, false, ["sign"]).then( + function(key) { + var dataPart1 = encoder.encode("hello,"); + var dataPart2 = encoder.encode(" world!"); - return window.crypto.subtle.sign(algorithmSign, key.privateKey, [dataPart1, dataPart2]); + return window.crypto.subtle.sign(algorithmSign, key.privateKey, [dataPart1, dataPart2]); }, - console.error.bind(console, "Unable to generate a key") -).then( - console.log.bind(console, "The signature is: "), - console.error.bind(console, "Unable to sign") + console.error.bind(console, "Unable to generate a key") +).then( + console.log.bind(console, "The signature is: "), + console.error.bind(console, "Unable to sign") );

      33.2 Symmetric Encryption

      -
      var encoder = new TextEncoder('utf-8');
      -var clearDataArrayBufferView = encoder.encode("Plain Text Data");
      +        
      var encoder = new TextEncoder('utf-8');
      +var clearDataArrayBufferView = encoder.encode("Plain Text Data");
       
       var aesAlgorithmKeyGen = {
         name: "AES-CBC",
      @@ -13609,16 +13600,16 @@ 

      Web Cryptography API

      var aesAlgorithmEncrypt = { name: "AES-CBC", // AesCbcParams - iv: window.crypto.getRandomValues(new Uint8Array(16)) + iv: window.crypto.getRandomValues(new Uint8Array(16)) }; // Create a key generator to produce a one-time-use AES key to encrypt some data -window.crypto.subtle.generateKey(aesAlgorithmKeyGen, false, ["encrypt"]).then( - function(aesKey) { - return window.crypto.subtle.encrypt(aesAlgorithmEncrypt, aesKey, clearDataArrayBufferView); +window.crypto.subtle.generateKey(aesAlgorithmKeyGen, false, ["encrypt"]).then( + function(aesKey) { + return window.crypto.subtle.encrypt(aesAlgorithmEncrypt, aesKey, clearDataArrayBufferView); } -).then(console.log.bind(console, "The ciphertext is: "), - console.error.bind(console, "Unable to encrypt"));
      +).then(console.log.bind(console, "The ciphertext is: "), + console.error.bind(console, "Unable to encrypt"));

      33.3 Generate unique name for download

      @@ -14231,7 +14222,7 @@

      Web Cryptography API

      [FIPS-198-1]
      The Keyed-Hash Message Authentication Code (HMAC). NIST. July 2008. URL: http://csrc.nist.gov/publications/fips/fips198-1/FIPS-198-1_final.pdf
      [HTML]
      - HTML Standard. Anne van Kesteren; Domenic Denicola; Ian Hickson; Philip Jägenstedt; Simon Pieters. WHATWG. Living Standard. URL: https://html.spec.whatwg.org/multipage/ + HTML Standard. Anne van Kesteren; Domenic Denicola; Dominic Farolino; Ian Hickson; Philip Jägenstedt; Simon Pieters. WHATWG. Living Standard. URL: https://html.spec.whatwg.org/multipage/
      [infra]
      Infra Standard. Anne van Kesteren; Domenic Denicola. WHATWG. Living Standard. URL: https://infra.spec.whatwg.org/
      [JWA]
      @@ -17799,7 +17790,7 @@

      Web Cryptography API

    • § 31.3 HkdfParams dictionary
    • - § 31.4 Operations (2) + § 31.4 Operations