diff --git a/ed/algorithms/WebCryptoAPI.json b/ed/algorithms/WebCryptoAPI.json index bb70e6a3b53f..d5d32282ae99 100644 --- a/ed/algorithms/WebCryptoAPI.json +++ b/ed/algorithms/WebCryptoAPI.json @@ -95,10 +95,19 @@ "html": "
\n If array is not an Int8Array
, Uint8Array
, Uint8ClampedArray
,\n Int16Array
, Uint16Array
, Int32Array
, Uint32Array
,\n BigInt64Array
, or BigUint64Array
, then throw a\n TypeMismatchError
and\n terminate the algorithm.\n
\n If the byteLength
of array is greater than 65536, throw a\n QuotaExceededError
and\n terminate the algorithm.\n
\n Let byteLength be the byte length of array.\n
" }, { - "html": "\n Overwrite all elements of array with cryptographically strong random values of\n the appropriate type.\n
" + "html": "\n If byteLength is greater than 65536, throw a\n QuotaExceededError
and\n terminate the algorithm.\n
\n Let bytes be a byte sequence of length byteLength.\n
" + }, + { + "html": "\n Fill bytes with cryptographically secure random bytes.\n
" + }, + { + "html": "\n Write bytes into array.\n
" }, { "html": "\n Return array.\n
" @@ -183,7 +192,7 @@ "html": "\n Let algorithm and key be the\n algorithm
and key
parameters\n passed to the encrypt
()
method,\n respectively.\n
\n Let data be the result of\n getting a copy of the bytes held by the data
parameter passed to the\n encrypt
()
method.\n
\n Let data be the result of\n getting a copy of the bytes held by the data
parameter passed to the\n encrypt
()
method.\n
\n Let normalizedAlgorithm be the result of\n normalizing an algorithm, with\n alg
set to algorithm and op
set to\n \"encrypt
\".\n
\n Let algorithm and key be the\n algorithm
and key
parameters\n passed to the decrypt
()
method,\n respectively.\n
\n Let algorithm and key be the\n algorithm
and key
parameters\n passed to the decrypt
()
method,\n respectively.\n
\n Let data be the result of\n getting a copy of the bytes held by the data
parameter passed to the\n decrypt
()
method.\n
\n If the [[type]]
internal slot of\n key is not \"private
\", then throw an InvalidAccessError
.\n
\n Perform the signature generation operation defined in Section 8.2 of [RFC3447] with the key represented by the [[handle]]
internal slot of key\n as the signer's private key and the contents of message as\n M and using the hash function specified in the hash
attribute of the [[algorithm]]
internal slot of\n key as the Hash option for the EMSA-PKCS1-v1_5 encoding method.\n
\n Perform the signature generation operation defined in Section 8.2 of [RFC3447] with the key represented by the [[handle]]
internal slot of key\n as the signer's private key and message as\n M and using the hash function specified in the hash
attribute of the [[algorithm]]
internal slot of\n key as the Hash option for the EMSA-PKCS1-v1_5 encoding method.\n
\n If performing the operation results in an error,\n then throw an\n OperationError
.\n
\n If the [[type]]
internal slot of\n key is not \"public
\", then throw an InvalidAccessError
.\n
\n Perform the signature verification operation defined in Section 8.2 of\n [RFC3447] with the key represented by the\n [[handle]]
internal slot of\n key as the signer's RSA public key and the contents of message as\n M and the contents of\n signature as S and using the hash function specified\n in the hash
attribute of the\n [[algorithm]]
internal slot of\n key as the Hash option for the EMSA-PKCS1-v1_5 encoding method.\n
\n Perform the signature verification operation defined in Section 8.2 of\n [RFC3447] with the key represented by the\n [[handle]]
internal slot of\n key as the signer's RSA public key and message as\n M and\n signature as S and using the hash function specified\n in the hash
attribute of the\n [[algorithm]]
internal slot of\n key as the Hash option for the EMSA-PKCS1-v1_5 encoding method.\n
\n Let result be a boolean with value true if the\n result of the operation was \"valid signature\" and the value\n false otherwise.\n
" @@ -1643,7 +1652,7 @@ "html": "\n If the [[type]]
internal slot of\n key is not \"private
\", then throw an InvalidAccessError
.\n
\n Perform the signature generation operation defined in Section 8.1 of [RFC3447] with the key represented by the [[handle]]
internal slot of key\n as the signer's private key, K, and the contents of message as\n the message to be signed, M, and using the hash function specified\n by the hash
attribute of the\n [[algorithm]]
internal slot of\n key as the Hash option, MGF1 (defined in Section B.2.1 of [RFC3447]) as the MGF option and the saltLength member of\n normalizedAlgorithm as the salt length option for the\n EMSA-PSS-ENCODE operation.\n
\n Perform the signature generation operation defined in Section 8.1 of [RFC3447] with the key represented by the [[handle]]
internal slot of key\n as the signer's private key, K, and message as\n the message to be signed, M, and using the hash function specified\n by the hash
attribute of the\n [[algorithm]]
internal slot of\n key as the Hash option, MGF1 (defined in Section B.2.1 of [RFC3447]) as the MGF option and the saltLength member of\n normalizedAlgorithm as the salt length option for the\n EMSA-PSS-ENCODE operation.\n
\n If performing the operation results in an error,\n then throw an\n OperationError
.\n
\n If the [[type]]
internal slot of\n key is not \"public
\", then throw an InvalidAccessError
.\n
\n Perform the signature verification operation defined in Section 8.1 of\n [RFC3447] with the key represented by the\n [[handle]]
internal slot of\n key as the signer's RSA public key and the contents of message as\n M and the contents of\n signature as S and using the hash function specified\n by the hash
attribute of the\n [[algorithm]]
internal slot of\n key as the Hash option, MGF1 (defined in Section B.2.1 of [RFC3447]) as the MGF option and the saltLength member of\n normalizedAlgorithm as the salt length option for the\n EMSA-PSS-VERIFY operation.\n
\n Perform the signature verification operation defined in Section 8.1 of\n [RFC3447] with the key represented by the\n [[handle]]
internal slot of\n key as the signer's RSA public key and message as\n M and\n signature as S and using the hash function specified\n by the hash
attribute of the\n [[algorithm]]
internal slot of\n key as the Hash option, MGF1 (defined in Section B.2.1 of [RFC3447]) as the MGF option and the saltLength member of\n normalizedAlgorithm as the salt length option for the\n EMSA-PSS-VERIFY operation.\n
\n Let result be a boolean with the value true if the\n result of the operation was \"valid signature\" and the value\n false otherwise.\n
" @@ -2164,10 +2173,10 @@ "html": "\n If the [[type]]
internal slot of key\n is not \"public
\",\n then throw an\n InvalidAccessError
.\n
\n Let label be the contents of the label
member of\n normalizedAlgorithm or the empty octet string if the\n label
member of\n normalizedAlgorithm is not present.\n
\n Let label be the label
member of\n normalizedAlgorithm or the empty byte sequence if the\n label
member of\n normalizedAlgorithm is not present.\n
\n Perform the encryption operation defined in Section 7.1 of [RFC3447] with the key represented by key\n as the recipient's RSA public key, the contents of plaintext\n as the message to be encrypted, M and label\n as the label, L, and with the hash\n function specified by the hash
\n attribute of the [[algorithm]]
internal slot of\n key as the Hash option and MGF1 (defined in Section B.2.1 of\n [RFC3447]) as the MGF option.\n
\n Perform the encryption operation defined in Section 7.1 of [RFC3447] with the key represented by key\n as the recipient's RSA public key, plaintext\n as the message to be encrypted, M and label\n as the label, L, and with the hash\n function specified by the hash
\n attribute of the [[algorithm]]
internal slot of\n key as the Hash option and MGF1 (defined in Section B.2.1 of\n [RFC3447]) as the MGF option.\n
\n If performing the operation results in an error,\n then throw an\n OperationError
.\n
\n If the [[type]]
internal slot of key\n is not \"private
\",\n then throw an\n InvalidAccessError
.\n
\n Let label be the contents of the label
member of\n normalizedAlgorithm or the empty octet string if the\n label
member of\n normalizedAlgorithm is not present.\n
\n Let label be the label
member of\n normalizedAlgorithm or the empty byte sequence if the\n label
member of\n normalizedAlgorithm is not present.\n
\n Perform the decryption operation defined in Section 7.1 of [RFC3447] with the key represented by key\n as the recipient's RSA private key, the contents of ciphertext\n as the ciphertext to be decrypted, C, and label\n as the label, L, and with the hash\n function specified by the hash
\n attribute of the [[algorithm]]
internal slot of\n key as the Hash option and MGF1 (defined in Section B.2.1 of\n [RFC3447]) as the MGF option.\n
\n Perform the decryption operation defined in Section 7.1 of [RFC3447] with the key represented by key\n as the recipient's RSA private key, ciphertext\n as the ciphertext to be decrypted, C, and label\n as the label, L, and with the hash\n function specified by the hash
\n attribute of the [[algorithm]]
internal slot of\n key as the Hash option and MGF1 (defined in Section B.2.1 of\n [RFC3447]) as the MGF option.\n
\n If performing the operation results in an error,\n then throw an\n OperationError
.\n
\n Let n be the smallest integer such that n * 8 is greater than\n the logarithm to base 2 of the order of the base point of the elliptic curve identified\n by params.\n
" }, { - "html": "\n Convert r to an octet string of\n length n and append this sequence of bytes to result.\n
" + "html": "\n Convert r to a byte sequence of\n length n and append it to result.\n
" }, { - "html": "\n Convert s to an octet string of\n length n and append this sequence of bytes to result.\n
" + "html": "\n Convert s to a byte sequence of\n length n and append it to result.\n
" } ] }, @@ -3429,7 +3438,7 @@ "steps": [ { "case": "If the namedCurve attribute of the [[algorithm]] internal slot of key is \"P-256\", \"P-384\" or \"P-521\":", - "html": "Let keyData be the\n octet string that\n represents the Elliptic Curve public key represented by the[[handle]]
internal slot of\n key according to the encoding rules specified in\n Section 2.2 of [RFC5480] and using the\n uncompressed form. and keyData.",
+ "html": "Let keyData be the\n byte sequence that\n represents the Elliptic Curve public key represented by the [[handle]]
internal slot of\n key according to the encoding rules specified in\n Section 2.2 of [RFC5480] and using the\n uncompressed form. and keyData.",
"rationale": ".switch",
"steps": [
{
@@ -3640,7 +3649,7 @@
"html": "\n If the [[type]]
internal slot\n of key is not \"public
\", then throw an InvalidAccessError
.\n
namedCurve
\n attribute of the [[algorithm]]
internal slot\n of key is \"P-256
\", \"P-384
\"\n or \"P-521
\":\n \n Let data be an octet string representing the Elliptic Curve\n point Q represented by [[handle]]
internal slot of\n key according to [SEC1] 2.3.3 using the uncompressed format.\n
\n Perform any key export steps\n defined by other applicable\n specifications, passing format and the\n namedCurve
attribute of\n the [[algorithm]]
\n internal slot of key\n and obtaining namedCurve and data.\n
namedCurve
\n attribute of the [[algorithm]]
internal slot\n of key is \"P-256
\", \"P-384
\"\n or \"P-521
\":\n \n Let data be a byte sequence representing the Elliptic Curve\n point Q represented by the [[handle]]
internal slot of\n key according to [SEC1] 2.3.3 using the uncompressed format.\n
\n Perform any key export steps\n defined by other applicable\n specifications, passing format and the\n namedCurve
attribute of\n the [[algorithm]]
\n internal slot of key\n and obtaining namedCurve and data.\n
\n Let data be an octet string representing the Elliptic Curve\n point Q represented by [[handle]]
internal slot of\n key according to [SEC1] 2.3.3 using the uncompressed format.\n
\n Let data be a byte sequence representing the Elliptic Curve\n point Q represented by the [[handle]]
internal slot of\n key according to [SEC1] 2.3.3 using the uncompressed format.\n
\n Perform the ECDH primitive specified in [RFC6090] Section\n 4 with key as the EC private key d and the EC public\n key represented by the [[handle]]
\n internal slot of publicKey as the EC public key.\n
\n Let secret be the result of applying the field element to\n octet string conversion defined in Section\n 6.2 of [RFC6090]\n to the output of the ECDH primitive.\n
" + "html": "\n Let secret be a byte sequence containing\n the result of applying the field element to\n octet string conversion defined in Section\n 6.2 of [RFC6090]\n to the output of the ECDH primitive.\n
" } ] }, @@ -3817,7 +3826,7 @@ "html": "\n If performing the operation results in an error,\n then throw a\n OperationError
.\n
OperationError
.\n OperationError
.\n OperationError
.\n OperationError
.\n OperationError
."
},
{
"case": "Otherwise:",
- "html": "Return an octet string containing the first length bits of secret."
+ "html": "Return a byte sequence containing the first length bits of secret."
}
]
}
@@ -4350,7 +4359,7 @@
"steps": [
{
"case": "If the namedCurve attribute of the [[algorithm]] internal slot of key is \"P-256\", \"P-384\" or \"P-521\":",
- "html": "Let keyData be the octet string that\n represents the Elliptic Curve public key represented by the [[handle]]
internal slot of\n key according to the encoding rules specified in\n Section 2.3.3 of [SEC1] and using the\n uncompressed form.",
+ "html": "Let keyData be the byte sequence that\n represents the Elliptic Curve public key represented by the [[handle]]
internal slot of\n key according to the encoding rules specified in\n Section 2.3.3 of [SEC1] and using the\n uncompressed form.",
"rationale": ".switch",
"steps": [
{
@@ -4555,7 +4564,7 @@
"html": "\n If the [[type]]
internal slot\n of key is not \"public
\", then throw an InvalidAccessError
.\n
namedCurve
\n attribute of the [[algorithm]]
internal slot\n of key is \"P-256
\", \"P-384
\"\n or \"P-521
\":\n \n Let data be the octet string that\n represents the Elliptic Curve public key represented by the [[handle]]
internal slot of\n key according to the encoding rules specified in\n Section 2.3.3 of [SEC1] and using the\n uncompressed form.\n
\n Perform any key export steps\n defined by other applicable\n specifications, passing format and the\n namedCurve
attribute of\n the [[algorithm]]
\n internal slot of key\n and obtaining namedCurve and data.\n
namedCurve
\n attribute of the [[algorithm]]
internal slot\n of key is \"P-256
\", \"P-384
\"\n or \"P-521
\":\n \n Let data be the byte sequence that\n represents the Elliptic Curve public key represented by the [[handle]]
internal slot of\n key according to the encoding rules specified in\n Section 2.3.3 of [SEC1] and using the\n uncompressed form.\n
\n Perform any key export steps\n defined by other applicable\n specifications, passing format and the\n namedCurve
attribute of\n the [[algorithm]]
\n internal slot of key\n and obtaining namedCurve and data.\n
\n Let data be the octet string that\n represents the Elliptic Curve public key represented by the [[handle]]
internal slot of\n key according to the encoding rules specified in\n Section 2.3.3 of [SEC1] and using the\n uncompressed form.\n
\n Let data be the byte sequence that\n represents the Elliptic Curve public key represented by the [[handle]]
internal slot of\n key according to the encoding rules specified in\n Section 2.3.3 of [SEC1] and using the\n uncompressed form.\n
\n If the [[type]]
internal slot\n of key is not \"public
\", then throw an InvalidAccessError
.\n
\n Let data be an octet string representing the Ed25519\n public key represented by the [[handle]]
internal slot of\n key.\n
\n Let data be a byte sequence representing the Ed25519\n public key represented by the [[handle]]
internal slot of\n key.\n
\n Let result be data.\n
" @@ -5061,7 +5070,7 @@ "html": "\n If secret is the all-zero value,\n then throw a OperationError
.\n This check must be performed in constant-time, as per [RFC7748] Section 6.1.\n
OperationError
.\n OperationError
.\n OperationError
.\n OperationError
.\n \n If the [[type]]
internal slot\n of key is not \"public
\", then throw an InvalidAccessError
.\n
\n Let data be an octet string representing the X25519\n public key represented by the [[handle]]
internal slot of\n key.\n
\n Let data be a byte sequence representing the X25519\n public key represented by the [[handle]]
internal slot of\n key.\n
\n Let result be data.\n
" @@ -5517,13 +5526,13 @@ "rationale": "if", "steps": [ { - "html": "\n If the counter
member of\n normalizedAlgorithm does not have length 16\n bytes,\n then throw an\n OperationError
.\n
\n If the counter
member of\n normalizedAlgorithm does not have\n a length of 16 bytes,\n then throw an\n OperationError
.\n
\n If the length
member of\n normalizedAlgorithm is zero or is greater\n than 128,\n then throw an\n OperationError
.\n
\n Let ciphertext be the result of performing the CTR Encryption\n operation described in Section 6.5 of [NIST-SP800-38A] using AES as the block cipher, the contents of the counter
member of\n normalizedAlgorithm as the initial value of the counter block, the\n length
member of\n normalizedAlgorithm as the input parameter m to the\n standard counter block incrementing function defined in Appendix B.1 of\n [NIST-SP800-38A] and the contents of\n plaintext as the input plaintext.\n
\n Let ciphertext be the result of performing the CTR Encryption\n operation described in Section 6.5 of [NIST-SP800-38A] using AES as the block cipher, the counter
member of\n normalizedAlgorithm as the initial value of the counter block, the\n length
member of\n normalizedAlgorithm as the input parameter m to the\n standard counter block incrementing function defined in Appendix B.1 of\n [NIST-SP800-38A] and\n plaintext as the input plaintext.\n
\n Return ciphertext.\n
" @@ -5535,13 +5544,13 @@ "rationale": "if", "steps": [ { - "html": "\n If the counter
member of\n normalizedAlgorithm does not have length 16\n bytes,\n then throw an\n OperationError
.\n
\n If the counter
member of\n normalizedAlgorithm does not have\n a length of 16 bytes,\n then throw an\n OperationError
.\n
\n If the length
member of\n normalizedAlgorithm is zero or is greater\n than 128,\n then throw an\n OperationError
.\n
\n Let plaintext be the result of performing the CTR Decryption\n operation described in Section 6.5 of [NIST-SP800-38A] using AES as the block cipher, the contents of the counter
member of\n normalizedAlgorithm as the initial value of the counter block, the\n length
member of\n normalizedAlgorithm as the input parameter m to the\n standard counter block incrementing function defined in Appendix B.1 of\n [NIST-SP800-38A] and the contents of\n ciphertext as the input ciphertext.\n
\n Let plaintext be the result of performing the CTR Decryption\n operation described in Section 6.5 of [NIST-SP800-38A] using AES as the block cipher, the counter
member of\n normalizedAlgorithm as the initial value of the counter block, the\n length
member of\n normalizedAlgorithm as the input parameter m to the\n standard counter block incrementing function defined in Appendix B.1 of\n [NIST-SP800-38A] and\n ciphertext as the input ciphertext.\n
\n Return plaintext.\n
" @@ -5613,10 +5622,10 @@ "rationale": "let", "steps": [ { - "html": "\n Let data be the octet string contained in keyData.\n
" + "html": "\n Let data be keyData.\n
" }, { - "html": "\n If the length in bits of data is not 128, 192 or 256\n then throw a\n DataError
.\n
\n If the length in bits of data is not 128, 192 or 256\n then throw a\n DataError
.\n
\n If jwk does not meet the requirements of\n Section 6.4 of JSON Web Algorithms [JWA],\n then throw a\n DataError
.\n
\n Let data be the octet string obtained by decoding the\n k
field of jwk.\n
\n Let data be the byte sequence obtained by decoding the\n k
field of jwk.\n
alg
field of jwk is present, and is\n not \"A128CTR
\", then throw a DataError
.\n alg
field of jwk is present, and is\n not \"A192CTR
\", then throw a DataError
.\n alg
field of jwk is present, and is\n not \"A256CTR
\", then throw a DataError
.\n DataError
.alg
field of jwk is present, and is\n not \"A128CTR
\", then throw a DataError
.\n alg
field of jwk is present, and is\n not \"A192CTR
\", then throw a DataError
.\n alg
field of jwk is present, and is\n not \"A256CTR
\", then throw a DataError
.\n DataError
.alg
field of jwk is present, and is\n not \"A128CTR
\", then throw a DataError
."
},
{
- "case": "If data has length 192 bits:",
+ "case": "If the length in bits of data is 192:",
"html": "If the alg
field of jwk is present, and is\n not \"A192CTR
\", then throw a DataError
."
},
{
- "case": "If data has length 256 bits:",
+ "case": "If the length in bits of data is 256:",
"html": "If the alg
field of jwk is present, and is\n not \"A256CTR
\", then throw a DataError
."
},
{
@@ -5742,7 +5751,7 @@
"rationale": "let",
"steps": [
{
- "html": "\n Let data be the raw octets of the key represented by [[handle]]
internal slot of\n key.\n
\n Let data be a byte sequence containing\n the raw octets of the key represented by the [[handle]]
internal slot of\n key.\n
\n Let result be data.\n
" @@ -5761,7 +5770,7 @@ "html": "\n Set the kty
attribute of jwk to the\n string \"oct
\".\n
\n Set the k
attribute of jwk to be a string\n containing the raw octets of the key represented by [[handle]]
internal slot of\n key, encoded according to Section 6.4 of JSON Web Algorithms [JWA].\n
\n Set the k
attribute of jwk to be a string\n containing the raw octets of the key represented by the [[handle]]
internal slot of\n key, encoded according to Section 6.4 of JSON Web Algorithms [JWA].\n
length
attribute of\n key is 128:alg
attribute of jwk to\n the string \"A128CTR
\".length
attribute of\n key is 192:alg
attribute of jwk to\n the string \"A192CTR
\".length
attribute of\n key is 256:alg
attribute of jwk to\n the string \"A256CTR
\".\n If the iv
member of\n normalizedAlgorithm does not have length 16\n bytes,\n then throw an\n OperationError
.\n
\n If the iv
member of\n normalizedAlgorithm does not have\n a length of 16 bytes,\n then throw an\n OperationError
.\n
\n Let paddedPlaintext be the result of adding padding octets to\n the contents of plaintext\n according to the procedure defined in Section 10.3\n of [RFC2315], step 2, with a value of\n k of 16.\n
" + "html": "\n Let paddedPlaintext be the result of adding padding octets to\n plaintext\n according to the procedure defined in Section 10.3\n of [RFC2315], step 2, with a value of\n k of 16.\n
" }, { - "html": "\n Let ciphertext be the result of performing the CBC Encryption\n operation described in Section 6.2 of [NIST-SP800-38A] using AES as the block cipher, the contents of the iv
member of normalizedAlgorithm as\n the IV input parameter and paddedPlaintext\n as the input plaintext.\n
\n Let ciphertext be the result of performing the CBC Encryption\n operation described in Section 6.2 of [NIST-SP800-38A] using AES as the block cipher, the iv
member of normalizedAlgorithm as\n the IV input parameter and paddedPlaintext\n as the input plaintext.\n
\n Return ciphertext.\n
" @@ -5845,10 +5854,10 @@ "rationale": "if", "steps": [ { - "html": "\n If the iv
member of\n normalizedAlgorithm does not have length 16\n bytes,\n then throw an\n OperationError
.\n
\n If the iv
member of\n normalizedAlgorithm does not have\n a length of 16 bytes,\n then throw an\n OperationError
.\n
\n Let paddedPlaintext be the result of performing the CBC Decryption\n operation described in Section 6.2 of [NIST-SP800-38A] using AES as the block cipher, the contents of the iv
member of normalizedAlgorithm as\n the IV input parameter and the contents of\n ciphertext as the input ciphertext.\n
\n Let paddedPlaintext be the result of performing the CBC Decryption\n operation described in Section 6.2 of [NIST-SP800-38A] using AES as the block cipher, the iv
member of normalizedAlgorithm as\n the IV input parameter and\n ciphertext as the input ciphertext.\n
\n Let p be the value of the last octet of paddedPlaintext.\n
" @@ -5929,10 +5938,10 @@ "rationale": "let", "steps": [ { - "html": "\n Let data be the octet string contained in keyData.\n
" + "html": "\n Let data be keyData.\n
" }, { - "html": "\n If the length in bits of data is not 128, 192 or 256\n then throw a\n DataError
.\n
\n If the length in bits of data is not 128, 192 or 256\n then throw a\n DataError
.\n
\n If jwk does not meet the requirements of\n Section 6.4 of JSON Web Algorithms [JWA],\n then throw a\n DataError
.\n
\n Let data be the octet string obtained by decoding the\n k
field of jwk.\n
\n Let data be the byte sequence obtained by decoding the\n k
field of jwk.\n
alg
field of jwk is present, and is\n not \"A128CBC
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A192CBC
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A256CBC
\",\n then throw a\n DataError
.DataError
.\n alg
field of jwk is present, and is\n not \"A128CBC
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A192CBC
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A256CBC
\",\n then throw a\n DataError
.DataError
.\n alg
field of jwk is present, and is\n not \"A128CBC
\",\n then throw a\n DataError
."
},
{
- "case": "If data has length 192 bits:",
+ "case": "If the length in bits of data is 192:",
"html": "If the alg
field of jwk is present, and is\n not \"A192CBC
\",\n then throw a\n DataError
."
},
{
- "case": "If data has length 256 bits:",
+ "case": "If the length in bits of data is 256:",
"html": "If the alg
field of jwk is present, and is\n not \"A256CBC
\",\n then throw a\n DataError
."
},
{
@@ -6058,7 +6067,7 @@
"rationale": "let",
"steps": [
{
- "html": "\n Let data be the raw octets of the key represented by [[handle]]
internal slot of\n key.\n
\n Let data be a byte sequence containing\n the raw octets of the key represented by the [[handle]]
internal slot of\n key.\n
\n Let result be data.\n
" @@ -6077,7 +6086,7 @@ "html": "\n Set the kty
attribute of jwk to the\n string \"oct
\".\n
\n Set the k
attribute of jwk to be a string\n containing the raw octets of the key represented by [[handle]]
internal slot of\n key, encoded according to Section 6.4 of JSON Web Algorithms [JWA].\n
\n Set the k
attribute of jwk to be a string\n containing the raw octets of the key represented by the [[handle]]
internal slot of\n key, encoded according to Section 6.4 of JSON Web Algorithms [JWA].\n
length
attribute of\n key is 128:alg
attribute of jwk to\n the string \"A128CBC
\".length
attribute of\n key is 192:alg
attribute of jwk to\n the string \"A192CBC
\".length
attribute of\n key is 256:alg
attribute of jwk to\n the string \"A256CBC
\".\n If plaintext has a length greater than 2^39 - 256\n bytes,\n then throw an\n OperationError
.\n
\n If plaintext has a length\n greater than 2^39 - 256 bytes,\n then throw an\n OperationError
.\n
\n If the iv
member of\n normalizedAlgorithm has a length greater than 2^64 - 1\n bytes,\n then throw an\n OperationError
.\n
\n If the iv
member of\n normalizedAlgorithm has a length\n greater than 2^64 - 1 bytes,\n then throw an\n OperationError
.\n
\n If the additionalData
member\n of normalizedAlgorithm is present and has a length\n greater than 2^64 - 1 bytes,\n then throw an\n OperationError
.\n
\n If the additionalData
member\n of normalizedAlgorithm is present and has a\n length\n greater than 2^64 - 1 bytes,\n then throw an\n OperationError
.\n
tagLength
member of\n normalizedAlgorithm is not present:tagLength
member of\n normalizedAlgorithm is one of 32, 64, 96, 104, 112, 120 or 128:tagLength
member of\n normalizedAlgorithmOperationError
.\n \n Let additionalData be the contents of the additionalData
member of\n normalizedAlgorithm if present or the empty octet\n string otherwise.\n
\n Let additionalData be the additionalData
member of\n normalizedAlgorithm if present or an empty byte sequence\n otherwise.\n
\n Let C and T be the outputs that result from performing\n the Authenticated Encryption Function described in Section 7.1 of\n [NIST-SP800-38D] using AES as the block cipher, the contents of the iv
member of normalizedAlgorithm as\n the IV input parameter, the contents of\n additionalData as the A input parameter,\n tagLength as the t pre-requisite and the contents of\n plaintext as the input plaintext.\n
\n Let C and T be the outputs that result from performing\n the Authenticated Encryption Function described in Section 7.1 of\n [NIST-SP800-38D] using AES as the block cipher, the iv
member of normalizedAlgorithm as\n the IV input parameter,\n additionalData as the A input parameter,\n tagLength as the t pre-requisite and\n plaintext as the input plaintext.\n
\n Let ciphertext be equal to C | T,\n where '|' denotes concatenation.\n
" @@ -6216,13 +6225,13 @@ ] }, { - "html": "\n If ciphertext has a length less than tagLength bits,\n then throw an\n OperationError
.\n
\n If ciphertext has a length in bits less than tagLength,\n then throw an\n OperationError
.\n
\n If the iv
member of\n normalizedAlgorithm has a length greater than 2^64 - 1\n bytes,\n then throw an\n OperationError
.\n
\n If the iv
member of\n normalizedAlgorithm has a length\n greater than 2^64 - 1 bytes,\n then throw an\n OperationError
.\n
\n If the additionalData
member\n of normalizedAlgorithm is present and has a length\n greater than 2^64 - 1\n bytes,\n then throw an\n OperationError
.\n
\n If the additionalData
member\n of normalizedAlgorithm is present and has a\n length\n greater than 2^64 - 1 bytes,\n then throw an\n OperationError
.\n
\n Let tag be the last tagLength bits of\n ciphertext.\n
" @@ -6231,10 +6240,10 @@ "html": "\n Let actualCiphertext be the result of removing the last tagLength bits\n from ciphertext.\n
" }, { - "html": "\n Let additionalData be the contents of the additionalData
member of\n normalizedAlgorithm if present or the empty octet\n string otherwise.\n
\n Let additionalData be the additionalData
member of\n normalizedAlgorithm if present or an empty byte sequence\n otherwise.\n
iv
member of normalizedAlgorithm as\n the IV input parameter, the contents of\n additionalData as the A input parameter,\n tagLength as the t pre-requisite, the contents of\n actualCiphertext as the input ciphertext, C and the contents of tag as\n the authentication tag, T.",
+ "html": "Perform the Authenticated Decryption Function described in Section 7.2 of\n [NIST-SP800-38D] using AES as the block cipher,\n the iv
member of normalizedAlgorithm as\n the IV input parameter,\n additionalData as the A input parameter,\n tagLength as the t pre-requisite,\n actualCiphertext as the input ciphertext, C and tag as\n the authentication tag, T.",
"rationale": ".switch",
"steps": [
{
@@ -6322,10 +6331,10 @@
"rationale": "let",
"steps": [
{
- "html": "\n Let data be the octet string contained in keyData.\n
" + "html": "\n Let data be keyData.\n
" }, { - "html": "\n If the length in bits of data is not 128, 192 or 256\n then throw a\n DataError
.\n
\n If the length in bits of data is not 128, 192 or 256\n then throw a\n DataError
.\n
\n If jwk does not meet the requirements of\n Section 6.4 of JSON Web Algorithms [JWA],\n then throw a\n DataError
.\n
\n Let data be the octet string obtained by decoding the\n k
field of jwk.\n
\n Let data be the byte sequence obtained by decoding the\n k
field of jwk.\n
alg
field of jwk is present, and is\n not \"A128GCM
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A192GCM
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A256GCM
\",\n then throw a\n DataError
.DataError
.\n alg
field of jwk is present, and is\n not \"A128GCM
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A192GCM
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A256GCM
\",\n then throw a\n DataError
.DataError
.\n alg
field of jwk is present, and is\n not \"A128GCM
\",\n then throw a\n DataError
."
},
{
- "case": "If data has length 192 bits:",
+ "case": "If the length in bits of data is 192:",
"html": "If the alg
field of jwk is present, and is\n not \"A192GCM
\",\n then throw a\n DataError
."
},
{
- "case": "If data has length 256 bits:",
+ "case": "If the length in bits of data is 256:",
"html": "If the alg
field of jwk is present, and is\n not \"A256GCM
\",\n then throw a\n DataError
."
},
{
@@ -6451,7 +6460,7 @@
"rationale": "let",
"steps": [
{
- "html": "\n Let data be the raw octets of the key represented by [[handle]]
internal slot of\n key.\n
\n Let data be a byte sequence containing\n the raw octets of the key represented by the [[handle]]
internal slot of\n key.\n
\n Let result be data.\n
" @@ -6470,7 +6479,7 @@ "html": "\n Set the kty
attribute of jwk to the\n string \"oct
\".\n
\n Set the k
attribute of jwk to be a string\n containing the raw octets of the key represented by [[handle]]
internal slot of\n key, encoded according to Section 6.4 of JSON Web Algorithms [JWA].\n
\n Set the k
attribute of jwk to be a string\n containing the raw octets of the key represented by the [[handle]]
internal slot of\n key, encoded according to Section 6.4 of JSON Web Algorithms [JWA].\n
length
attribute of\n key is 128:alg
attribute of jwk to\n the string \"A128GCM
\".length
attribute of\n key is 192:alg
attribute of jwk to\n the string \"A192GCM
\".length
attribute of\n key is 256:alg
attribute of jwk to\n the string \"A256GCM
\".\n Let data be the octet string contained in keyData.\n
" + "html": "\n Let data be keyData.\n
" }, { - "html": "\n If the length in bits of data is not 128, 192 or 256\n\n then throw a\n DataError
.\n
\n If the length in bits of data is not 128, 192 or 256\n then throw a\n DataError
.\n
\n If jwk does not meet the requirements of\n Section 6.4 of JSON Web Algorithms [JWA],\n then throw a\n DataError
.\n
\n Let data be the octet string obtained by decoding the\n k
field of jwk.\n
\n Let data be the byte sequence obtained by decoding the\n k
field of jwk.\n
alg
field of jwk is present, and is\n not \"A128KW
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A192KW
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A256KW
\",\n then throw a\n DataError
.DataError
.\n alg
field of jwk is present, and is\n not \"A128KW
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A192KW
\",\n then throw a\n DataError
.alg
field of jwk is present, and is\n not \"A256KW
\",\n then throw a\n DataError
.DataError
.\n alg
field of jwk is present, and is\n not \"A128KW
\",\n then throw a\n DataError
."
},
{
- "case": "If data has length 192 bits:",
+ "case": "If the length in bits of data is 192:",
"html": "If the alg
field of jwk is present, and is\n not \"A192KW
\",\n then throw a\n DataError
."
},
{
- "case": "If data has length 256 bits:",
+ "case": "If the length in bits of data is 256:",
"html": "If the alg
field of jwk is present, and is\n not \"A256KW
\",\n then throw a\n DataError
."
},
{
@@ -6755,7 +6764,7 @@
"rationale": "let",
"steps": [
{
- "html": "\n Let data be the raw octets of the key represented by [[handle]]
internal slot of\n key.\n
\n Let data be a byte sequence containing\n the raw octets of the key represented by the [[handle]]
internal slot of\n key.\n
\n Let result be data.\n
" @@ -6774,7 +6783,7 @@ "html": "\n Set the kty
attribute of jwk to the\n string \"oct
\".\n
\n Set the k
attribute of jwk to be a string\n containing the raw octets of the key represented by [[handle]]
internal slot of\n key, encoded according to Section 6.4 of JSON Web Algorithms [JWA].\n
\n Set the k
attribute of jwk to be a string\n containing the raw octets of the key represented by the [[handle]]
internal slot of\n key, encoded according to Section 6.4 of JSON Web Algorithms [JWA].\n
length
attribute of\n key is 128:alg
attribute of jwk to\n the string \"A128KW
\".length
attribute of\n key is 192:alg
attribute of jwk to\n the string \"A192KW
\".length
attribute of\n key is 256:alg
attribute of jwk to\n the string \"A256KW
\".\n Let mac be the result of performing the MAC Generation operation\n described in Section 4 of [FIPS-198-1] using\n the key represented by [[handle]]
\n internal slot of key, the hash function identified by the hash
attribute of the [[algorithm]]
internal slot of\n key and message as the input data text.\n
\n Let mac be the result of performing the MAC Generation operation\n described in Section 4 of [FIPS-198-1] using\n the key represented by the [[handle]]
\n internal slot of key, the hash function identified by the hash
attribute of the [[algorithm]]
internal slot of\n key and message as the input data text.\n
\n Return mac.\n
" @@ -6852,7 +6861,7 @@ "rationale": "let", "steps": [ { - "html": "\n Let mac be the result of performing the MAC Generation operation\n described in Section 4 of [FIPS-198-1] using\n the key represented by [[handle]]
\n internal slot of key, the hash function identified by the hash
attribute of the [[algorithm]]
internal slot of\n key and message as the input data text.\n
\n Let mac be the result of performing the MAC Generation operation\n described in Section 4 of [FIPS-198-1] using\n the key represented by the [[handle]]
\n internal slot of key, the hash function identified by the hash
attribute of the [[algorithm]]
internal slot of\n key and message as the input data text.\n
\n Return true if mac is equal to signature and false\n otherwise.\n
" @@ -6959,7 +6968,7 @@ "rationale": "let", "steps": [ { - "html": "\n Let data be the octet string contained in keyData.\n
" + "html": "\n Let data be keyData.\n
" }, { "html": "\n Set hash to equal the hash
\n member of normalizedAlgorithm.\n
\n If jwk does not meet the requirements of\n Section 6.4 of JSON Web Algorithms [JWA],\n then throw a\n DataError
.\n
\n Let data be the octet string obtained by decoding the\n k
field of jwk.\n
\n Let data be the byte sequence obtained by decoding the\n k
field of jwk.\n
\n Set the hash to equal the hash
member of\n normalizedAlgorithm.\n
\n Let length be equivalent to the length, in octets, of\n data, multiplied by 8.\n
" + "html": "\n Let length be the length in bits of\n data.\n
" }, { "html": "\n If length is zero\n then throw a\n DataError
.\n
\n If the underlying cryptographic key material represented by the [[handle]]
internal slot of key\n cannot be accessed, then throw an OperationError
.\n
\n Let bits be the raw bits of the key represented by [[handle]]
internal slot of\n key.\n
\n Let bits be the raw bits of the key represented by the [[handle]]
internal slot of\n key.\n
\n Let data be an octet string containing bits.\n
" + "html": "\n Let data be a byte sequence containing bits.\n
" }, { "html": "raw
\":jwk
\":\n throw a\n NotSupportedError
.\n
\n If length is null or is not a multiple of 8, then throw an OperationError
.\n
\n Let keyDerivationKey be the secret represented by [[handle]]
internal slot of key.\n
\n Let keyDerivationKey be the secret represented by the [[handle]]
internal slot of key.\n
\n Let result be the result of performing the HKDF extract and then\n the HKDF expand step described in Section 2 of\n [RFC5869] using:\n
\n\n the hash
member of\n normalizedAlgorithm as Hash,\n
\n keyDerivationKey as the input keying material,\n IKM,\n
\n\n the contents of the salt
member of\n normalizedAlgorithm as salt,\n
\n the contents of the info
member of\n normalizedAlgorithm as info,\n
\n length divided by 8 as the value of L,\n
\n\n Let result be the result of performing the HKDF extract and then\n the HKDF expand step described in Section 2 of\n [RFC5869] using:\n
\n\n the hash
member of\n normalizedAlgorithm as Hash,\n
\n keyDerivationKey as the input keying material,\n IKM,\n
\n\n the salt
member of\n normalizedAlgorithm as salt,\n
\n the info
member of\n normalizedAlgorithm as info,\n
\n length divided by 8 as the value of L,\n
\n\n If the key derivation operation fails,\n then throw an\n OperationError
.\n
\n Let prf be the MAC Generation function described in Section 4 of\n [FIPS-198-1] using the hash function\n described by the hash
member of\n normalizedAlgorithm.\n
\n Let result be the result of performing the PBKDF2 operation defined\n in Section 5.2 of [RFC8018] using prf as the\n pseudo-random function, PRF, the password represented by [[handle]]
internal slot of key\n as the password, P, the\n contents of the salt
attribute of\n normalizedAlgorithm as the salt, S, the value of the iterations
attribute of\n normalizedAlgorithm as the iteration count, c, and\n length divided by 8 as the intended key length, dkLen.\n
\n Let result be the result of performing the PBKDF2 operation defined\n in Section 5.2 of [RFC8018] using prf as the\n pseudo-random function, PRF, the password represented by the [[handle]]
internal slot of key\n as the password, P,\n the salt
attribute of\n normalizedAlgorithm as the salt, S, the value of the iterations
attribute of\n normalizedAlgorithm as the iteration count, c, and\n length divided by 8 as the intended key length, dkLen.\n
\n If the key derivation operation fails,\n then throw an\n OperationError
.\n
If pendingBits is greather than remainingBudget, set shouldUseDefaultIndex to true.
" + "html": "If pendingBits is greater than remainingBudget, set shouldUseDefaultIndex to true.
" }, { "html": "If shouldUseDefaultIndex is true, set resultIndex to the default selectURL index.
" @@ -673,7 +673,7 @@ { "name": "set up the Private Aggregation scopes", "href": "https://wicg.github.io/shared-storage/#set-up-the-private-aggregation-scopes", - "html": "To set up the Private Aggregation scopes given an origin workletDataOrigin, a pre-specified report parameters or null preSpecifiedParams and an aggregation coordinator or null aggregationCoordinator, peform the following steps. They return an\n algorithm.", + "html": "To set up the Private Aggregation scopes given an origin workletDataOrigin, a pre-specified report parameters or null preSpecifiedParams and an aggregation coordinator or null aggregationCoordinator, perform the following steps. They return an\n algorithm.", "rationale": ".algorithm", "steps": [ { @@ -1098,7 +1098,7 @@ { "name": "check for script and context origin match", "href": "https://wicg.github.io/shared-storage/#check-for-script-and-context-origin-match", - "html": "To check for script and context origin match, given trusted origin type itemScriptOrigin, origin actualScriptOrigin, trusted origin type itemContextOrigin, and origin actualContextOrigin, peform the following steps:", + "html": "To check for script and context origin match, given trusted origin type itemScriptOrigin, origin actualScriptOrigin, trusted origin type itemContextOrigin, and origin actualContextOrigin, perform the following steps:", "rationale": ".algorithm", "steps": [ { @@ -1112,7 +1112,7 @@ { "name": "check for trusted origin match", "href": "https://wicg.github.io/shared-storage/#check-for-trusted-origin-match", - "html": "To check for trusted origin match, given trusted origin type itemOrigin and origin actualOrigin, peform the following steps:", + "html": "To check for trusted origin match, given trusted origin type itemOrigin and origin actualOrigin, perform the following steps:", "rationale": ".algorithm", "steps": [ { @@ -1135,7 +1135,7 @@ { "name": "check for trusted origin match on a string", "href": "https://wicg.github.io/shared-storage/#check-for-trusted-origin-match-on-a-string", - "html": "To check for trusted origin match on a string, given string itemOrigin and origin actualOrigin, peform the following steps:", + "html": "To check for trusted origin match on a string, given string itemOrigin and origin actualOrigin, perform the following steps:", "rationale": ".algorithm", "steps": [ { @@ -2725,7 +2725,7 @@ ] }, { - "html": "Otherwise, let entry be the result of dequeueing from iterator’s pending entries.
" + "html": "Otherwise, let entry be the result of dequeuing from iterator’s pending entries.
" }, { "html": "Queue a global task on the DOM manipulation task source, given realm’s global object, to resolve promise with entry.
" diff --git a/ed/algorithms/webrtc.json b/ed/algorithms/webrtc.json index bbd9ad42f2b9..8a3d2a4c0bd9 100644 --- a/ed/algorithms/webrtc.json +++ b/ed/algorithms/webrtc.json @@ -632,7 +632,7 @@ "rationale": "for", "steps": [ { - "html": "For each encoding in\n transceiver.[[Sender]]
.[[SendEncodings]]
,\n if encoding.codec
does not\n match any entry in codecs,\n remove encoding[codec
].
For each encoding in\n transceiver.[[Sender]]
.[[SendEncodings]]
,\n if encoding.codec
does not match any entry in\n codecs, using the codec dictionary match algorithm with ignoreLevels\n set to true
, remove encoding.codec
.
\n If\n transceiver.direction
\n is \"sendonly
\"\n or \"sendrecv
\",\n exclude any codecs not included in the\n list of implemented send codecs for\n kind.\n
\n If\n transceiver.direction
\n is \"sendonly
\"\n or \"sendrecv
\",\n exclude any codecs not included in the\n list of implemented send codecs for\n kind, using the codec dictionary match\n algorithm with ignoreLevels set to\n true
.
\n If\n transceiver.direction
\n is \"recvonly
\"\n or \"sendrecv
\",\n exclude any codecs not included in the\n list of implemented receive codecs for\n kind.\n
\n If\n transceiver.direction
\n is \"recvonly
\"\n or \"sendrecv
\",\n exclude any codecs not included in the\n list of implemented receive codecs for\n kind, using the codec dictionary match\n algorithm with ignoreLevels set to\n true
.\n
Let kind be transceiver's\n [[Receiver]]
's\n [[ReceiverTrack]]
's\n kind
.
\n If\n transceiver.direction
\n is \"sendonly
\"\n or \"sendrecv
\",\n exclude any codecs not included in the\n list of implemented send codecs for\n kind.\n
\n If\n transceiver.direction
\n is \"sendonly
\"\n or \"sendrecv
\",\n exclude any codecs not included in the\n list of implemented send codecs for\n kind, using the codec dictionary match\n algorithm with ignoreLevels set to\n true
.\n
\n If\n transceiver.direction
\n is \"recvonly
\"\n or \"sendrecv
\",\n exclude any codecs not included in the\n list of implemented receive codecs for\n kind.\n
\n If\n transceiver.direction
\n is \"recvonly
\"\n or \"sendrecv
\",\n exclude any codecs not included in the\n list of implemented receive codecs for\n kind, using the codec dictionary match\n algorithm with ignoreLevels set to\n true
.\n
\n If any encoding contains a read-only\n parameter other than\n rid
, throw\n an InvalidAccessError
.\n
\n If any encoding contains a\n codec
member whose value does\n not match any codec in RTCRtpSender
.getCapabilities
(kind)
.codecs
,\n throw an OperationError
.
\n If any encoding contains a\n codec
member whose value does\n not match any codec in RTCRtpSender
.getCapabilities
(kind)
.codecs
,\n throw an OperationError
.
If the user agent does not support changing codecs without negotiation or\n does not support setting codecs for individual encodings, return a promise\n rejected with a newly created OperationError
.
RTCRtpEncodingParameters
stored in\n sender.[[SendEncodings]]
."
},
{
- "html": "If any of the following conditions are met, return a\n promise rejected with a newly created InvalidModificationError
:\n encodings.length
is\n different from N.\n [[LastReturnedParameters]]
.\n Note that this also applies to\n transactionId.\n InvalidModificationError
:\n encodings.length
is\n different from N.\n [[LastReturnedParameters]]
.\n Note that this also applies to\n transactionId.\n true
.\n \n If transceiver kind is \"audio\"
, remove the\n scaleResolutionDownBy
and\n maxFramerate
\n members from all encodings that\n contain any of them.\n
\n If codecs is an empty list, set\n transceiver.[[PreferredCodecs]]
to\n codecs and abort these steps.\n
\n Remove any duplicate values in\n codecs, ensuring that the first occurrence of each\n value remains in place.\n
" + "html": "\n Remove any duplicate values in\n codecs, ensuring that the first occurrence of each\n value remains in place.\n
" }, { "html": "\n Let kind be the transceiver's transceiver kind.\n
" @@ -2831,7 +2831,7 @@ "rationale": "if", "steps": [ { - "html": "If codec does not match any codec\n in codecCapabilities, throw InvalidModificationError
.\n
If codec does not match any codec\n in codecCapabilities, throw InvalidModificationError
.\n
RTCRtpCodec
dictionaries\n first and second is as follows:",
+ "html": "\n The setCodecPreferences
method overrides the default\n codec preferences used by the user agent as input to\n negotiation. When generating a session description using\n either createOffer
or\n createAnswer
, the user agent MUST\n filter the preferred codecs on direction
\n and, if this results in a non-empty list, it MUST use the\n specified codecs in the order of the codecs\n argument, for the media section corresponding to this\n RTCRtpTransceiver
.\n
\n This method allows applications to disable the negotiation of\n specific codecs (including RTX/RED/FEC) by listing all codecs\n except for the ones to disable.\n
\n \n \n \n\n Codec preferences remain in effect for all calls to\n createOffer
and\n createAnswer
that include this\n RTCRtpTransceiver
until this method is called again.\n Setting codecs to an empty sequence, or one that\n becomes empty after direction
filtering,\n results in default codec preferences.\n
\n setCodecPreferences
will reject attempts to set\n codecs not matching\n codecs found in either\n RTCRtpSender
.getCapabilities
(kind)\n or\n RTCRtpReceiver
.getCapabilities
(kind),\n where kind is the kind of the\n RTCRtpTransceiver
on which the method is called.\n
\n When setCodecPreferences
()
is invoked, the user\n agent MUST run the following steps:\n
\n The codec dictionary match algorithm given two\n RTCRtpCodec
dictionaries first and second, and\n an ignoreLevels boolean defaulting to false
if not\n specified, is as follows:\n
\n If either (but not both) of first.channels
\n and second.channels
are missing,\n or if they both exist and first.channels
\n is different from second.channels
, return\n false
.\n
\n If either (but not both) of first.sdpFmtpLine
\n and second.sdpFmtpLine
are missing,\n or if they both exist and first.sdpFmtpLine
\n is different from second.sdpFmtpLine
, return\n false
.\n
\n If either (but not both) of first.sdpFmtpLine
\n and second.sdpFmtpLine
are missing,\n return false
.\n
sdpFmtpLine
and\n second.sdpFmtpLine
exist, run the following\n steps:",
+ "rationale": "if",
+ "steps": [
+ {
+ "html": "\n If either of first.sdpFmtpLine
and\n second.sdpFmtpLine
is not in key-value format,\n return the result of performing an equals comparison between\n first.sdpFmtpLine
and\n second.sdpFmtpLine
.\n
\n Let firstMediaFormat be a key-value map of the media formats constructed\n from first.sdpFmtpLine
and secondMediaFormat\n be a key-value map of the media formats constructed from\n second.sdpFmtpLine
.\n
\n If firstMediaFormat is not equal to secondMediaFormat, return\n false
.\n
\n If ignoreLevels is false
and the highest complying bitstream\n levels inferred from first.sdpFmtpLine
and\n second.sdpFmtpLine
are different, return false
.\n
\n Return true
.\n