diff --git a/spec/Overview.html b/spec/Overview.html index d1a1984..8d88155 100644 --- a/spec/Overview.html +++ b/spec/Overview.html @@ -612,24 +612,26 @@

Terminology

{{BufferSource}} are defined in [[WEBIDL]].

- An octet string is an ordered sequence of zero or more - integers, each in the range 0 to 255 inclusive. + The term [= byte sequence =] is defined in [[Infra]].

- An octet string containing a bit string |b| is the - [= octet string =] obtained by first appending zero or more - bits of value zero to |b| such that the length of the resulting bit string is minimal and an integer multiple of 8 - and then considering each consecutive sequence of 8 bits in that string as a binary integer, most significant - bit first. + The length in bits of a [= byte sequence =] + is its [= byte sequence/length =] multiplied by 8.

- When this specification says to convert a non-negative - integer |i| to an octet string of length |n|, where |n| * 8 + A byte sequence containing a bit sequence |b| is the + [= byte sequence =] obtained by first appending zero or more + bits of value zero to |b| such that the length of the resulting bit sequence is minimal and an integer multiple of 8 + and then considering each consecutive sequence of 8 bits in that string as a byte. +

+

+ When this specification says to convert a non-negative + integer |i| to a byte sequence of length |n|, where |n| * 8 is greater than the logarithm to base 2 of |i|, the user agent must first calculate the binary representation of |i|, most significant bit first, - prefix this with sufficient zero bits to form a bit string of length |n| * 8, and - then return the [= octet string =] formed by considering each consecutive - sequence of 8 bits in that bit string as a binary integer, most significant bit first. + prefix this with sufficient zero bits to form a bit sequence of length |n| * 8, and + then return the [= byte sequence =] formed by considering each consecutive + sequence of 8 bits in that bit sequence as a byte.

Comparing two strings in a case-sensitive @@ -3860,7 +3862,7 @@

Registration

sign None - [= octet string =] + [= byte sequence =] verify @@ -4929,7 +4931,7 @@

Registration

sign {{RsaPssParams}} - [= octet string =] + [= byte sequence =] verify @@ -5944,12 +5946,12 @@

Registration

encrypt {{RsaOaepParams}} - [= octet string =] + [= byte sequence =] decrypt {{RsaOaepParams}} - [= octet string =] + [= byte sequence =] generateKey @@ -5996,7 +5998,7 @@

Operations

  • Let |label| be the {{RsaOaepParams/label}} member of - |normalizedAlgorithm| or the empty octet string if the + |normalizedAlgorithm| or the empty byte sequence if the {{RsaOaepParams/label}} member of |normalizedAlgorithm| is not present.

    @@ -6047,7 +6049,7 @@

    Operations

  • Let |label| be the {{RsaOaepParams/label}} member of - |normalizedAlgorithm| or the empty octet string if the + |normalizedAlgorithm| or the empty byte sequence if the {{RsaOaepParams/label}} member of |normalizedAlgorithm| is not present.

    @@ -6988,7 +6990,7 @@

    Registration

    sign {{EcdsaParams}} - [= octet string =] + [= byte sequence =] verify @@ -7142,14 +7144,14 @@

    Operations

  • - Convert |r| to an octet string of - length |n| and append this sequence of bytes to |result|. + Convert |r| to a byte sequence of + length |n| and append it to |result|.

  • - Convert |s| to an octet string of - length |n| and append this sequence of bytes to |result|. + Convert |s| to a byte sequence of + length |n| and append it to |result|.

  • @@ -8260,7 +8262,7 @@

    Operations

    Let |keyData| be the - [= octet string =] that + [= byte sequence =] that represents the Elliptic Curve public key represented by the {{CryptoKey/[[handle]]}} internal slot of |key| according to the encoding rules specified in Section 2.2 of [[RFC5480]] and using the @@ -8651,8 +8653,8 @@

    Operations

    - Let |data| be an [= octet string =] representing the Elliptic Curve - point |Q| represented by {{CryptoKey/[[handle]]}} internal slot of + Let |data| be a [= byte sequence =] representing the Elliptic Curve + point |Q| represented by the {{CryptoKey/[[handle]]}} internal slot of |key| according to [[SEC1]] 2.3.3 using the uncompressed format.

    @@ -8739,7 +8741,7 @@

    Registration

    deriveBits {{EcdhKeyDeriveParams}} - [= octet string =] + [= byte sequence =] importKey @@ -8985,8 +8987,9 @@

    Operations

  • - Let |secret| be the result of applying the field element to - [= octet string =] conversion defined in Section + Let |secret| be a [= byte sequence =] containing + the result of applying the field element to + octet string conversion defined in Section 6.2 of [[RFC6090]] to the output of the ECDH primitive.

    @@ -9031,7 +9034,7 @@

    Operations

    - If the length of |secret| in bits is less than + If the [= length in bits =] of |secret| is less than |length|:
    @@ -9040,7 +9043,7 @@

    Operations

    Otherwise:
    - Return an [= octet string containing =] the first |length| bits of |secret|. + Return a [= byte sequence containing =] the first |length| bits of |secret|.
    @@ -9838,7 +9841,7 @@

    Operations

    - Let |keyData| be the [= octet string =] that + Let |keyData| be the [= byte sequence =] that represents the Elliptic Curve public key represented by the {{CryptoKey/[[handle]]}} internal slot of |key| according to the encoding rules specified in Section 2.3.3 of [[SEC1]] and using the @@ -10220,7 +10223,7 @@

    Operations

    - Let |data| be the [= octet string =] that + Let |data| be the [= byte sequence =] that represents the Elliptic Curve public key represented by the {{CryptoKey/[[handle]]}} internal slot of |key| according to the encoding rules specified in Section 2.3.3 of [[SEC1]] and using the @@ -10289,7 +10292,7 @@

    Registration

    sign None - [= octet string =] + [= byte sequence =] verify @@ -11089,7 +11092,7 @@

    Operations

  • - Let |data| be an [= octet string =] representing the Ed25519 + Let |data| be a [= byte sequence =] representing the Ed25519 public key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.

    @@ -11149,7 +11152,7 @@

    Registration

    deriveBits {{EcdhKeyDeriveParams}} - [= octet string =] + [= byte sequence =] generateKey @@ -11235,7 +11238,7 @@

    Operations

    Otherwise:
    - Return an [= octet string containing =] the first |length| bits of |secret|. + Return a [= byte sequence containing =] the first |length| bits of |secret|.
    @@ -11923,7 +11926,7 @@

    Operations

  • - Let |data| be an [= octet string =] representing the X25519 + Let |data| be a [= byte sequence =] representing the X25519 public key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.

    @@ -11983,12 +11986,12 @@

    Registration

    encrypt {{AesCtrParams}} - [= octet string =] + [= byte sequence =] decrypt {{AesCtrParams}} - [= octet string =] + [= byte sequence =] generateKey @@ -12067,8 +12070,8 @@

    Operations

  • If the {{AesCtrParams/counter}} member of - |normalizedAlgorithm| does not have length 16 - bytes, + |normalizedAlgorithm| does not have + a [= byte sequence/length =] of 16 bytes, then [= exception/throw =] an {{OperationError}}.

    @@ -12107,8 +12110,8 @@

    Operations

  • If the {{AesCtrParams/counter}} member of - |normalizedAlgorithm| does not have length 16 - bytes, + |normalizedAlgorithm| does not have + a [= byte sequence/length =] of 16 bytes, then [= exception/throw =] an {{OperationError}}.

    @@ -12254,12 +12257,12 @@

    Operations

    1. - Let |data| be the [= octet string =] contained in |keyData|. + Let |data| be |keyData|.

    2. - If the length in bits of |data| is not 128, 192 or 256 + If the [= length in bits =] of |data| is not 128, 192 or 256 then [= exception/throw =] a {{DataError}}.

      @@ -12295,23 +12298,23 @@

      Operations

    3. - Let |data| be the [= octet string =] obtained by decoding the + Let |data| be the [= byte sequence =] obtained by decoding the {{JsonWebKey/k}} field of |jwk|.

    4. -
      If |data| has length 128 bits:
      +
      If the [= length in bits =] of |data| is 128:
      If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A128CTR`", then [= exception/throw =] a {{DataError}}.
      -
      If |data| has length 192 bits:
      +
      If the [= length in bits =] of |data| is 192:
      If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A192CTR`", then [= exception/throw =] a {{DataError}}.
      -
      If |data| has length 256 bits:
      +
      If the [= length in bits =] of |data| is 256:
      If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A256CTR`", then [= exception/throw =] a {{DataError}}. @@ -12416,7 +12419,8 @@

      Operations

      1. - Let |data| be the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + Let |data| be a [= byte sequence =] containing + the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.

      2. @@ -12445,7 +12449,7 @@

        Operations

      3. Set the {{JsonWebKey/k}} attribute of |jwk| to be a string - containing the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + containing the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|, encoded according to Section 6.4 of JSON Web Algorithms [[JWA]].

      4. @@ -12559,12 +12563,12 @@

        Registration

        encrypt {{AesCbcParams}} - [= octet string =] + [= byte sequence =] decrypt {{AesCbcParams}} - [= octet string =] + [= byte sequence =] generateKey @@ -12607,8 +12611,8 @@

        Operations

      5. If the {{AesCbcParams/iv}} member of - |normalizedAlgorithm| does not have length 16 - bytes, + |normalizedAlgorithm| does not have + a [= byte sequence/length =] of 16 bytes, then [= exception/throw =] an {{OperationError}}.

        @@ -12643,8 +12647,8 @@

        Operations

      6. If the {{AesCbcParams/iv}} member of - |normalizedAlgorithm| does not have length 16 - bytes, + |normalizedAlgorithm| does not have + a [= byte sequence/length =] of 16 bytes, then [= exception/throw =] an {{OperationError}}.

        @@ -12796,12 +12800,12 @@

        Operations

        1. - Let |data| be the [= octet string =] contained in |keyData|. + Let |data| be |keyData|.

        2. - If the length in bits of |data| is not 128, 192 or 256 + If the [= length in bits =] of |data| is not 128, 192 or 256 then [= exception/throw =] a {{DataError}}.

          @@ -12837,23 +12841,23 @@

          Operations

        3. - Let |data| be the [= octet string =] obtained by decoding the + Let |data| be the [= byte sequence =] obtained by decoding the {{JsonWebKey/k}} field of |jwk|.

        4. -
          If |data| has length 128 bits:
          +
          If the [= length in bits =] of |data| is 128:
          If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A128CBC`", then [= exception/throw =] a {{DataError}}.
          -
          If |data| has length 192 bits:
          +
          If the [= length in bits =] of |data| is 192:
          If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A192CBC`", then [= exception/throw =] a {{DataError}}.
          -
          If |data| has length 256 bits:
          +
          If the [= length in bits =] of |data| is 256:
          If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A256CBC`", then [= exception/throw =] a @@ -12959,7 +12963,8 @@

          Operations

          1. - Let |data| be the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + Let |data| be a [= byte sequence =] containing + the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.

          2. @@ -12985,7 +12990,7 @@

            Operations

          3. Set the {{JsonWebKey/k}} attribute of |jwk| to be a string - containing the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + containing the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|, encoded according to Section 6.4 of JSON Web Algorithms [[JWA]].

          4. @@ -13091,12 +13096,12 @@

            Registration

            encrypt {{AesGcmParams}} - [= octet string =] + [= byte sequence =] decrypt {{AesGcmParams}} - [= octet string =] + [= byte sequence =] generateKey @@ -13142,8 +13147,8 @@

            Operations

            1. - If |plaintext| has a length greater than 2^39 - 256 - bytes, + If |plaintext| has a [= byte sequence/length =] + greater than 2^39 - 256 bytes, then [= exception/throw =] an {{OperationError}}.

              @@ -13151,8 +13156,8 @@

              Operations

            2. If the {{AesGcmParams/iv}} member of - |normalizedAlgorithm| has a length greater than 2^64 - 1 - bytes, + |normalizedAlgorithm| has a [= byte sequence/length =] + greater than 2^64 - 1 bytes, then [= exception/throw =] an {{OperationError}}.

              @@ -13160,7 +13165,8 @@

              Operations

            3. If the {{AesGcmParams/additionalData}} member - of |normalizedAlgorithm| is present and has a length + of |normalizedAlgorithm| is present and has a + [= byte sequence/length =] greater than 2^64 - 1 bytes, then [= exception/throw =] an {{OperationError}}. @@ -13186,8 +13192,8 @@

              Operations

            4. Let |additionalData| be the {{AesGcmParams/additionalData}} member of - |normalizedAlgorithm| if present or the empty octet - string otherwise. + |normalizedAlgorithm| if present or an empty [= byte sequence =] + otherwise.

            5. @@ -13236,7 +13242,7 @@

              Operations

            6. - If |ciphertext| has a length less than |tagLength| bits, + If |ciphertext| has a [= length in bits =] less than |tagLength|, then [= exception/throw =] an {{OperationError}}.

              @@ -13244,8 +13250,8 @@

              Operations

            7. If the {{AesGcmParams/iv}} member of - |normalizedAlgorithm| has a length greater than 2^64 - 1 - bytes, + |normalizedAlgorithm| has a [= byte sequence/length =] + greater than 2^64 - 1 bytes, then [= exception/throw =] an {{OperationError}}.

              @@ -13253,9 +13259,9 @@

              Operations

            8. If the {{AesGcmParams/additionalData}} member - of |normalizedAlgorithm| is present and has a length - greater than 2^64 - 1 - bytes, + of |normalizedAlgorithm| is present and has a + [= byte sequence/length =] + greater than 2^64 - 1 bytes, then [= exception/throw =] an {{OperationError}}.

              @@ -13275,8 +13281,8 @@

              Operations

            9. Let |additionalData| be the {{AesGcmParams/additionalData}} member of - |normalizedAlgorithm| if present or the empty octet - string otherwise. + |normalizedAlgorithm| if present or an empty [= byte sequence =] + otherwise.

            10. @@ -13422,12 +13428,12 @@

              Operations

              1. - Let |data| be the [= octet string =] contained in |keyData|. + Let |data| be |keyData|.

              2. - If the length in bits of |data| is not 128, 192 or 256 + If the [= length in bits =] of |data| is not 128, 192 or 256 then [= exception/throw =] a {{DataError}}.

                @@ -13463,23 +13469,23 @@

                Operations

              3. - Let |data| be the [= octet string =] obtained by decoding the + Let |data| be the [= byte sequence =] obtained by decoding the {{JsonWebKey/k}} field of |jwk|.

              4. -
                If |data| has length 128 bits:
                +
                If the [= length in bits =] of |data| is 128:
                If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A128GCM`", then [= exception/throw =] a {{DataError}}.
                -
                If |data| has length 192 bits:
                +
                If the [= length in bits =] of |data| is 192:
                If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A192GCM`", then [= exception/throw =] a {{DataError}}.
                -
                If |data| has length 256 bits:
                +
                If the [= length in bits =] of |data| is 256:
                If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A256GCM`", then [= exception/throw =] a @@ -13585,7 +13591,8 @@

                Operations

                1. - Let |data| be the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + Let |data| be a [= byte sequence =] containing + the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.

                2. @@ -13614,7 +13621,7 @@

                  Operations

                3. Set the {{JsonWebKey/k}} attribute of |jwk| to be a string - containing the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + containing the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|, encoded according to Section 6.4 of JSON Web Algorithms [[JWA]].

                4. @@ -13719,12 +13726,12 @@

                  Registration

                  wrapKey None - [= octet string =] + [= byte sequence =] unwrapKey None - [= octet string =] + [= byte sequence =] generateKey @@ -13908,13 +13915,12 @@

                  Operations

                  1. - Let |data| be the [= octet string =] contained in |keyData|. + Let |data| be |keyData|.

                  2. - If the length in bits of |data| is not 128, 192 or 256 - + If the [= length in bits =] of |data| is not 128, 192 or 256 then [= exception/throw =] a {{DataError}}.

                    @@ -13950,23 +13956,23 @@

                    Operations

                  3. - Let |data| be the [= octet string =] obtained by decoding the + Let |data| be the [= byte sequence =] obtained by decoding the {{JsonWebKey/k}} field of |jwk|.

                  4. -
                    If |data| has length 128 bits:
                    +
                    If the [= length in bits =] of |data| is 128:
                    If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A128KW`", then [= exception/throw =] a {{DataError}}.
                    -
                    If |data| has length 192 bits:
                    +
                    If the [= length in bits =] of |data| is 192:
                    If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A192KW`", then [= exception/throw =] a {{DataError}}.
                    -
                    If |data| has length 256 bits:
                    +
                    If the [= length in bits =] of |data| is 256:
                    If the {{JsonWebKey/alg}} field of |jwk| is present, and is not "`A256KW`", then [= exception/throw =] a @@ -14071,7 +14077,8 @@

                    Operations

                    1. - Let |data| be the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + Let |data| be a [= byte sequence =] containing + the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.

                    2. @@ -14100,7 +14107,7 @@

                      Operations

                    3. Set the {{JsonWebKey/k}} attribute of |jwk| to be a string - containing the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + containing the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|, encoded according to Section 6.4 of JSON Web Algorithms [[JWA]].

                    4. @@ -14212,7 +14219,7 @@

                      Registration

                      sign None - [= octet string =] + [= byte sequence =] verify @@ -14285,7 +14292,7 @@

                      Operations

                      Let |mac| be the result of performing the MAC Generation operation described in Section 4 of [[FIPS-198-1]] using - the key represented by {{CryptoKey/[[handle]]}} + the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|, the hash function identified by the {{HmacKeyAlgorithm/hash}} attribute of the {{CryptoKey/[[algorithm]]}} internal slot of |key| and |message| as the input data |text|.

                      @@ -14304,7 +14311,7 @@

                      Operations

                      Let |mac| be the result of performing the MAC Generation operation described in Section 4 of [[FIPS-198-1]] using - the key represented by {{CryptoKey/[[handle]]}} + the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|, the hash function identified by the {{HmacKeyAlgorithm/hash}} attribute of the {{CryptoKey/[[algorithm]]}} internal slot of |key| and |message| as the input data |text|.

                      @@ -14468,7 +14475,7 @@

                      Operations

                      1. - Let |data| be the [= octet string =] contained in |keyData|. + Let |data| be |keyData|.

                      2. @@ -14508,7 +14515,7 @@

                        Operations

                      3. - Let |data| be the [= octet string =] obtained by decoding the + Let |data| be the [= byte sequence =] obtained by decoding the {{JsonWebKey/k}} field of |jwk|.

                      4. @@ -14617,8 +14624,8 @@

                        Operations

                      5. - Let |length| be equivalent to the length, in octets, of - |data|, multiplied by 8. + Let |length| be the [= length in bits =] of + |data|.

                      6. @@ -14725,13 +14732,13 @@

                        Operations

                      7. - Let |bits| be the raw bits of the key represented by {{CryptoKey/[[handle]]}} internal slot of + Let |bits| be the raw bits of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.

                      8. - Let |data| be an [= octet string containing =] |bits|. + Let |data| be a [= byte sequence containing =] |bits|.

                      9. @@ -14932,7 +14939,7 @@

                        Registration

                        digest None - [= octet string =] + [= byte sequence =] @@ -15037,7 +15044,7 @@

                        Registration

                        deriveBits {{HkdfParams}} - [= octet string =] + [= byte sequence =] importKey @@ -15062,8 +15069,8 @@

                        HkdfParams dictionary

                        };

                        The hash member represents the algorithm to use with HMAC (e.g.: SHA-256).

                        -

                        The salt member represents a bit string that corresponds to the salt used in the extract step.

                        -

                        The info member represents a bit string that corresponds to the context and application specific context for the derived keying material.

                        +

                        The salt member represents the salt used in the extract step.

                        +

                        The info member represents application specific context for the derived keying material.

                        Operations

                        @@ -15078,7 +15085,7 @@

                        Operations

                      10. - Let |keyDerivationKey| be the secret represented by {{CryptoKey/[[handle]]}} internal slot of |key|. + Let |keyDerivationKey| be the secret represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.

                      11. @@ -15258,7 +15265,7 @@

                        Registration

                        deriveBits {{Pbkdf2Params}} - [= octet string =] + [= byte sequence =] importKey @@ -15318,7 +15325,7 @@

                        Operations

                        Let |result| be the result of performing the PBKDF2 operation defined in Section 5.2 of [[RFC8018]] using |prf| as the - pseudo-random function, |PRF|, the password represented by {{CryptoKey/[[handle]]}} internal slot of |key| + pseudo-random function, |PRF|, the password represented by the {{CryptoKey/[[handle]]}} internal slot of |key| as the password, |P|, the {{Pbkdf2Params/salt}} attribute of |normalizedAlgorithm| as the salt, |S|, the value of the {{Pbkdf2Params/iterations}} attribute of