From 63e211db589c5d260a10bd52a4a948e64eca11ff Mon Sep 17 00:00:00 2001
From: Daniel Huigens 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 + A byte sequence containing a bit string |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 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. + 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 an octet string of length |n|, where |n| * 8 + 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. + then return the [= byte sequence =] formed by considering each consecutive + sequence of 8 bits in that bit string as a byte.
Comparing two strings in a case-sensitive @@ -3860,7 +3858,7 @@
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 +6045,7 @@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 +6986,7 @@- 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|.
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,7 +8649,7 @@
- Let |data| be an [= octet string =] representing the Elliptic Curve + Let |data| be a [= byte sequence =] representing the Elliptic Curve point |Q| represented by {{CryptoKey/[[handle]]}} internal slot of |key| according to [[SEC1]] 2.3.3 using the uncompressed format.
@@ -8739,7 +8737,7 @@- 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.
@@ -9040,7 +9039,7 @@- 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 +10219,7 @@
- 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 +10288,7 @@
- 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 +11148,7 @@- 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 +11982,12 @@- Let |data| be the [= octet string =] contained in |keyData|. + Let |data| be the [= byte sequence =] contained in |keyData|.
- 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|.
- Let |data| be the [= octet string =] contained in |keyData|. + Let |data| be the [= byte sequence =] contained in |keyData|.
- 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|.
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.
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.
- Let |data| be the [= octet string =] contained in |keyData|. + Let |data| be the [= byte sequence =] contained in |keyData|.
- 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|.
- Let |data| be the [= octet string =] contained in |keyData|. + Let |data| be the [= byte sequence =] contained in |keyData|.
- 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|.
- Let |data| be the [= octet string =] contained in |keyData|. + Let |data| be the [= byte sequence =] contained in |keyData|.
- 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|.
- Let |data| be an [= octet string containing =] |bits|. + Let |data| be a [= byte sequence containing =] |bits|.
- Let |data| be the [= byte sequence =] contained in |keyData|. + Let |data| be |keyData|.
- Let |data| be the [= byte sequence =] contained in |keyData|. + Let |data| be |keyData|.
- Let |data| be the [= byte sequence =] contained in |keyData|. + Let |data| be |keyData|.
- Let |data| be the [= byte sequence =] contained in |keyData|. + Let |data| be |keyData|.
If the length in bits of |data| is not 128, 192 or 256 - then [= exception/throw =] a {{DataError}}.
@@ -14467,7 +14466,7 @@- Let |data| be the [= byte sequence =] contained in |keyData|. + Let |data| be |keyData|.
- 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 {{CryptoKey/[[handle]]}} internal slot of |key|.
- 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 {{CryptoKey/[[handle]]}} internal slot of |key|.
- 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 {{CryptoKey/[[handle]]}} internal slot of |key|.
- 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 {{CryptoKey/[[handle]]}} internal slot of |key|.
- A byte sequence containing a bit string |b| is the + 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 string is minimal and an integer multiple of 8 + 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.
@@ -625,9 +625,9 @@
Comparing two strings in a case-sensitive @@ -15064,8 +15064,8 @@
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.
Let |data| be a [= byte sequence =] representing the Elliptic Curve - point |Q| represented by {{CryptoKey/[[handle]]}} internal slot of + point |Q| represented by the {{CryptoKey/[[handle]]}} internal slot of |key| according to [[SEC1]] 2.3.3 using the uncompressed format.
Let |data| be a [= byte sequence =] containing - the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.
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]].
Let |data| be a [= byte sequence =] containing - the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.
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]].
Let |data| be a [= byte sequence =] containing - the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.
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]].
Let |data| be a [= byte sequence =] containing - the raw octets of the key represented by {{CryptoKey/[[handle]]}} internal slot of + the raw octets of the key represented by the {{CryptoKey/[[handle]]}} internal slot of |key|.
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]].
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|.
@@ -14306,7 +14306,7 @@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|.
@@ -14727,7 +14727,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|.
- 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|.
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
From f3bf2c3a767480a6e8fcce9435eb1700ab134f4c Mon Sep 17 00:00:00 2001
From: Daniel Huigens
The term [= byte sequence =] is defined in [[Infra]].
+ The length in bits of a [= byte sequence =]
+ is its [= byte sequence/length =] multiplied by 8.
+
A byte sequence containing a bit sequence |b| is the
[= byte sequence =] obtained by first appending zero or more
@@ -9030,7 +9034,7 @@ Terminology
Operations
Operations
- 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}}.
@@ -12300,17 +12304,17 @@- 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}}.
@@ -12843,17 +12847,17 @@- If |ciphertext| has a length less than |tagLength| bits, + If |ciphertext| has a [= length in bits =] less than |tagLength|, then [= exception/throw =] an {{OperationError}}.
@@ -13428,7 +13432,7 @@- 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}}.
@@ -13470,17 +13474,17 @@- 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}}.
@@ -13957,17 +13961,17 @@- Let |length| be equivalent to the length, in octets, of - |data|, multiplied by 8. + Let |length| be the [= length in bits =] of + |data|.
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}}.
@@ -12110,8 +12110,8 @@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}}.
@@ -12611,8 +12611,8 @@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}}.
@@ -12647,8 +12647,8 @@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}}.
@@ -13147,8 +13147,8 @@- 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}}.
@@ -13156,8 +13156,8 @@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}}.
@@ -13165,7 +13165,8 @@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}}. @@ -13249,8 +13250,8 @@
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}}.
@@ -13258,9 +13259,9 @@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}}.