diff --git a/spec/Overview.html b/spec/Overview.html index 8f8fd42..4607ada 100644 --- a/spec/Overview.html +++ b/spec/Overview.html @@ -3654,6 +3654,36 @@

Algorithm Overview

+ + Ed448 + + + ✔ + ✔ + + ✔ + + + ✔ + ✔ + + + + + X448 + + + + + + ✔ + ✔ + ✔ + ✔ + ✔ + + + AES-CTR ✔ @@ -12027,21 +12057,21 @@
Export Key
-
-

AES-CTR

-
+
+

Ed448

+

Description

- The "`AES-CTR`" algorithm identifier is used to perform - encryption and decryption using AES in Counter mode, - as described in [[NIST-SP800-38A]]. + The "`Ed448`" algorithm identifier is used to perform signing + and verification using the Ed448 algorithm specified in + [[RFC8032]].

-
+

Registration

- The [= recognized algorithm name =] for - this algorithm is "`AES-CTR`". + The [= recognized algorithm name =] + for this algorithm is "`Ed448`".

@@ -12053,19 +12083,19 @@

Registration

- - + + - - - + + + - - + + @@ -12077,261 +12107,2048 @@

Registration

- - - - -
encrypt{{AesCtrParams}}sign{{ContextParams}} [= byte sequence =]
decrypt{{AesCtrParams}}[= byte sequence =]verify{{ContextParams}}boolean
generateKey{{AesKeyGenParams}}{{CryptoKey}}None{{CryptoKeyPair}}
importKey None object
get key length{{AesDerivedKeyParams}}Integer
-
-

AesCtrParams dictionary

-
-dictionary AesCtrParams : Algorithm {
-  required BufferSource counter;
-  required [EnforceRange] octet length;
-};
-          
-

The counter member contains the initial value of the counter block. {{AesCtrParams/counter}} MUST be 16 bytes (the AES block size). The counter bits are the rightmost length - bits of the counter block. The rest of the counter block is for - the nonce. The counter bits are incremented using the standard - incrementing function specified in NIST SP 800-38A Appendix B.1: - the counter bits are interpreted as a big-endian integer and - incremented by one.

-

The length member contains the length, in bits, of the rightmost part of the counter block that is incremented.

-
-
-

AesKeyAlgorithm dictionary

-
-dictionary AesKeyAlgorithm : KeyAlgorithm {
-  required unsigned short length;
-};
-          
-

The length member represents the length, in bits, of the key.

-
-
-

AesKeyGenParams dictionary

-
-dictionary AesKeyGenParams : Algorithm {
-  required [EnforceRange] unsigned short length;
-};
-          
-

The length member represents the length, in bits, of the key.

-
-
-

AesDerivedKeyParams dictionary

+
+

ContextParams dictionary

-dictionary AesDerivedKeyParams : Algorithm {
-  required [EnforceRange] unsigned short length;
+dictionary ContextParams : Algorithm {
+  BufferSource context;
 };
           
-

The length member represents the length, in bits, of the key.

+

The context member represents the optional context data to associate with the message.

- -
+

Operations

- -
-
Encrypt
- +
+
Sign
  1. - If the {{AesCtrParams/counter}} member of - |normalizedAlgorithm| does not have - a [= byte sequence/length =] of 16 bytes, - then [= exception/throw =] an - {{OperationError}}. + If the {{CryptoKey/[[type]]}} internal slot of + |key| is not {{KeyType/"private"}}, then [= exception/throw =] an {{InvalidAccessError}}.

  2. - If the {{AesCtrParams/length}} member of - |normalizedAlgorithm| is zero or is greater - than 128, - then [= exception/throw =] an - {{OperationError}}. + Let |context| be the result of + [= get a copy of the buffer source | + getting a copy of the bytes held by =] + the {{ContextParams/context}} member of |normalizedAlgorithm| + or the empty byte sequence if the {{ContextParams/context}} member of + |normalizedAlgorithm| is not present.

  3. - Let |ciphertext| be the result of performing the CTR Encryption - operation described in Section 6.5 of [[NIST-SP800-38A]] using AES as the block cipher, the {{AesCtrParams/counter}} member of - |normalizedAlgorithm| as the initial value of the counter block, the - {{AesCtrParams/length}} member of - |normalizedAlgorithm| as the input parameter |m| to the - standard counter block incrementing function defined in Appendix B.1 of - [[NIST-SP800-38A]] and - |plaintext| as the input plaintext. + If |context| has a length greater than 255 bytes, + then [= exception/throw =] an {{OperationError}}.

  4. - Return |ciphertext|. + Let |result| be the result of performing the Ed448 + signing process, as specified in [[RFC8032]], + Section 5.2.6, with |message| as |M| + and |context| as |C|, + using the Ed448 private key associated with |key|. +

    +

    + Some implementations may (wish to) generate randomized signatures + as per draft-irtf-cfrg-det-sigs-with-noise + instead of deterministic signatures as per [[RFC8032]]. +

    +
  5. +
  6. +

    + Return |result|.

- -
-
Decrypt
- +
+
Verify
  1. - If the {{AesCtrParams/counter}} member of - |normalizedAlgorithm| does not have - a [= byte sequence/length =] of 16 bytes, - then [= exception/throw =] an - {{OperationError}}. + If the {{CryptoKey/[[type]]}} internal slot of + |key| is not {{KeyType/"public"}}, then [= exception/throw =] an {{InvalidAccessError}}.

  2. - If the {{AesCtrParams/length}} member of - |normalizedAlgorithm| is zero or is greater - than 128, - then [= exception/throw =] an - {{OperationError}}. + Let |context| be the result of + [= get a copy of the buffer source | + getting a copy of the bytes held by =] + the {{ContextParams/context}} member of |normalizedAlgorithm| + or the empty byte sequence if the {{ContextParams/context}} member of + |normalizedAlgorithm| is not present.

  3. - Let |plaintext| be the result of performing the CTR Decryption - operation described in Section 6.5 of [[NIST-SP800-38A]] using AES as the block cipher, the {{AesCtrParams/counter}} member of - |normalizedAlgorithm| as the initial value of the counter block, the - {{AesCtrParams/length}} member of - |normalizedAlgorithm| as the input parameter |m| to the - standard counter block incrementing function defined in Appendix B.1 of - [[NIST-SP800-38A]] and - |ciphertext| as the input ciphertext. + If |context| has a length greater than 255 bytes, + then [= exception/throw =] an {{OperationError}}.

  4. - Return |plaintext|. + If the key data of |key| represents an invalid point or a small-order element + on the Elliptic Curve of Ed448, return `false`. +

    +

    + Not all implementations perform this check.

  5. -
-
- -
-
Generate Key
- -
  1. - If |usages| contains any entry which is not - one of "`encrypt`", "`decrypt`", - "`wrapKey`" or "`unwrapKey`", - then [= exception/throw =] a - {{SyntaxError}}. + If the point R, encoded in the first half of |signature|, + represents an invalid point or a small-order element + on the Elliptic Curve of Ed448, return `false`. +

    +

    + Not all implementations perform this check.

  2. - If the {{AesKeyGenParams/length}} member of - |normalizedAlgorithm| is not equal to one of - 128, 192 or 256, - then [= exception/throw =] an - {{OperationError}}. + Perform the Ed448 verification steps, as specified in [[RFC8032]], + Section 5.2.7, using the cofactorless (unbatched) equation, + `[S]B = R + [k]A'`, on the |signature|, with |message| as |M| + and |context| as |C|, + using the Ed448 public key associated with |key|.

  3. -
  4. - Generate an AES key of length - equal to the {{AesKeyGenParams/length}} member of - |normalizedAlgorithm|. + Let |result| be a boolean with the value `true` if the signature is valid + and the value `false` otherwise.

  5. - If the key generation step fails, - then [= exception/throw =] an - {{OperationError}}. + Return |result|.

  6. +
+
+
+
Generate Key
+
  1. - Let |key| be a new - {{CryptoKey}} object representing the - generated AES key. + If |usages| contains a value which is not + one of "`sign`" or "`verify`", + then [= exception/throw =] a + {{SyntaxError}}.

  2. - Let |algorithm| be a new - {{AesKeyAlgorithm}}. + Generate an Ed448 key pair, as defined in [[RFC8032]], section 5.1.5. +

    +
  3. +
  4. +

    + Let |algorithm| be a new {{KeyAlgorithm}} object.

  5. Set the {{KeyAlgorithm/name}} attribute of - |algorithm| to "`AES-CTR`". + |algorithm| to "`Ed448`".

  6. - Set the {{AesKeyAlgorithm/length}} attribute of - |algorithm| to equal the - {{AesKeyGenParams/length}} member of - |normalizedAlgorithm|. + Let |publicKey| be a new {{CryptoKey}} associated with the + [= relevant global object =] + of `this` [[HTML]], and + representing the public key of the generated key pair.

  7. Set the {{CryptoKey/[[type]]}} internal slot of - |key| to {{KeyType/"secret"}}. + |publicKey| to "`public`"

  8. Set the {{CryptoKey/[[algorithm]]}} internal - slot of |key| to |algorithm|. + slot of |publicKey| to |algorithm|.

  9. Set the {{CryptoKey/[[extractable]]}} internal - slot of |key| to be |extractable|. + slot of |publicKey| to true.

  10. Set the {{CryptoKey/[[usages]]}} internal slot of - |key| to be |usages|. + |publicKey| to be the [= usage intersection =] + of |usages| and `[ "verify" ]`.

  11. - Return |key|. + Let |privateKey| be a new {{CryptoKey}} associated with the + [= relevant global object =] + of `this` [[HTML]], and + representing the private key of the generated key pair.

  12. -
-
- -
-
Import Key
- -
  1. - If |usages| contains an entry which is not - one of "`encrypt`", "`decrypt`", - "`wrapKey`" or "`unwrapKey`", - then [= exception/throw =] a - {{SyntaxError}}. + Set the {{CryptoKey/[[type]]}} internal slot of + |privateKey| to {{KeyType/"private"}}

  2. -
    -
    If |format| is {{KeyFormat/"raw"}}:
    -
    -
      -
    1. +

      + Set the {{CryptoKey/[[algorithm]]}} internal + slot of |privateKey| to |algorithm|. +

      +
    2. +
    3. +

      + Set the {{CryptoKey/[[extractable]]}} internal + slot of |privateKey| to |extractable|. +

      +
    4. +
    5. +

      + Set the {{CryptoKey/[[usages]]}} internal slot of + |privateKey| to be the [= usage intersection =] + of |usages| and `[ "sign" ]`. +

      +
    6. +
    7. +

      + Let |result| be a new {{CryptoKeyPair}} + dictionary. +

      +
    8. +
    9. +

      + Set the {{CryptoKeyPair/publicKey}} attribute + of |result| to be |publicKey|. +

      +
    10. +
    11. +

      + Set the {{CryptoKeyPair/privateKey}} attribute + of |result| to be |privateKey|. +

      +
    12. +
    13. +

      + Return the result of converting |result| to an ECMAScript Object, as + defined by [[WebIDL]]. +

      +
    14. +
    +
+
+
Import Key
+
    +
  1. +

    Let |keyData| be the key data to be imported.

    +
  2. +
  3. +
    +
    If |format| is {{KeyFormat/"spki"}}:
    +
    +
      +
    1. +

      + If |usages| contains a value which is not + "`verify`" + then [= exception/throw =] a + {{SyntaxError}}. +

      +
    2. +
    3. +

      + Let |spki| be the result of running the + [= parse a subjectPublicKeyInfo =] + algorithm over |keyData|. +

      +
    4. +
    5. +

      + If an error occurred while parsing, + then [= exception/throw =] a + {{DataError}}. +

      +
    6. +
    7. +

      + If the `algorithm` object identifier field of the + `algorithm` AlgorithmIdentifier field of |spki| is + not equal to the `id-Ed448` + object identifier defined in [[RFC8410]], + then [= exception/throw =] a + {{DataError}}. +

      +
    8. +
    9. +

      + If the `parameters` field of the `algorithm` + AlgorithmIdentifier field of |spki| is present, + then [= exception/throw =] a + {{DataError}}. +

      +
    10. +
    11. +

      + Let |publicKey| be the Ed448 public key identified by + the `subjectPublicKey` field of |spki|. +

      +
    12. +
    13. +

      + Let |key| be a new {{CryptoKey}} associated with the + [= relevant global object =] + of `this` [[HTML]], and + that represents |publicKey|. +

      +
    14. +
    15. +

      + Set the {{CryptoKey/[[type]]}} internal slot + of |key| to "`public`" +

      +
    16. +
    17. +

      + Let |algorithm| be a new {{KeyAlgorithm}}. +

      +
    18. +
    19. +

      + Set the {{KeyAlgorithm/name}} attribute of + |algorithm| to "`Ed448`". +

      +
    20. +
    21. +

      + Set the {{CryptoKey/[[algorithm]]}} + internal slot of |key| to |algorithm|. +

      +
    22. +
    +
    +
    If |format| is {{KeyFormat/"pkcs8"}}:
    +
    +
      +
    1. +

      + If |usages| contains a value which is not + "`sign`" + then [= exception/throw =] a + {{SyntaxError}}. +

      +
    2. +
    3. +

      + Let |privateKeyInfo| be the result of running the + [= parse a privateKeyInfo =] + algorithm over |keyData|. +

      +
    4. +
    5. +

      + If an error occurs while parsing, + then [= exception/throw =] a + {{DataError}}. +

      +
    6. +
    7. +

      + If the `algorithm` object identifier field of the + `privateKeyAlgorithm` PrivateKeyAlgorithm field of + |privateKeyInfo| is not equal to the + `id-Ed448` object identifier defined in [[RFC8410]], + then [= exception/throw =] a + {{DataError}}. +

      +
    8. +
    9. +

      + If the `parameters` field of the + `privateKeyAlgorithm` PrivateKeyAlgorithmIdentifier field + of |privateKeyInfo| is present, + then [= exception/throw =] a + {{DataError}}. +

      +
    10. +
    11. +

      + Let |curvePrivateKey| be the result of performing the [= parse an ASN.1 structure =] + algorithm, with |data| as the `privateKey` field + of |privateKeyInfo|, |structure| as the ASN.1 + `CurvePrivateKey` structure specified in Section 7 of [[RFC8410]], and |exactData| set to true. +

      +
    12. +
    13. +

      + If an error occurred while parsing, + then [= exception/throw =] a + {{DataError}}. +

      +
    14. +
    15. +

      + Let |key| be a new {{CryptoKey}} associated with the + [= relevant global object =] + of `this` [[HTML]], and + that represents the Ed448 private key identified by |curvePrivateKey|. +

      +
    16. +
    17. +

      + Set the {{CryptoKey/[[type]]}} internal slot + of |key| to {{KeyType/"private"}} +

      +
    18. +
    19. +

      + Let |algorithm| be a new {{KeyAlgorithm}}. +

      +
    20. +
    21. +

      + Set the {{KeyAlgorithm/name}} attribute of + |algorithm| to "`Ed448`". +

      +
    22. +
    23. +

      + Set the {{CryptoKey/[[algorithm]]}} + internal slot of |key| to |algorithm|. +

      +
    24. +
    +
    +
    If |format| is {{KeyFormat/"jwk"}}:
    +
    +
      +
    1. +
      +
      If |keyData| is a {{JsonWebKey}} dictionary:
      +

      Let |jwk| equal |keyData|.

      +
      Otherwise:
      +

      [= exception/Throw =] a {{DataError}}.

      +
      +
    2. +
    3. +

      + If the {{JsonWebKey/d}} field is present and |usages| contains + a value which is not + "`sign`", or, + if the {{JsonWebKey/d}} field is not present and |usages| contains + a value which is not + "`verify`" + then [= exception/throw =] a + {{SyntaxError}}. +

      +
    4. +
    5. +

      + If the {{JsonWebKey/kty}} field of |jwk| is not + "`OKP`", + then [= exception/throw =] a + {{DataError}}. +

      +
    6. +
    7. +

      + If the {{JsonWebKey/crv}} field of |jwk| is not + "`Ed448`", + then [= exception/throw =] a + {{DataError}}. +

      +
    8. +
    9. +

      + If the {{JsonWebKey/alg}} field of |jwk| is present and is + not "`Ed448`" or "`EdDSA`", + then [= exception/throw =] a + {{DataError}}. +

      +
    10. +
    11. +

      + If |usages| is non-empty and the {{JsonWebKey/use}} field of |jwk| is present and is + not "`sig`", + then [= exception/throw =] a + {{DataError}}. +

      +
    12. +
    13. +

      + If the {{JsonWebKey/key_ops}} field of |jwk| is present, and + is invalid according to the requirements of JSON Web + Key [[JWK]], or it does not contain all of the specified |usages| + values, + then [= exception/throw =] a + {{DataError}}. +

      +
    14. +
    15. +

      + If the {{JsonWebKey/ext}} field of |jwk| is present and + has the value false and |extractable| is true, + then [= exception/throw =] a + {{DataError}}. +

      +
    16. +
    17. +
      +
      If the {{JsonWebKey/d}} field is present:
      +
      +
        +
      1. +

        + If |jwk| does not meet the requirements of + the JWK private key format described in Section 2 + of [[RFC8037]], then [= exception/throw =] a {{DataError}}. +

        +
      2. +
      3. +

        + Let |key| be a new {{CryptoKey}} object that represents the + Ed448 private key identified by interpreting + |jwk| according to Section 2 of [[RFC8037]]. +

        +
      4. +
      5. +

        + Set the {{CryptoKey/[[type]]}} + internal slot of |Key| to {{KeyType/"private"}}. +

        +
      6. +
      +
      +
      Otherwise:
      +
      +
        +
      1. +

        + If |jwk| does not meet the requirements of + the JWK public key format described in Section 2 + of [[RFC8037]], then [= exception/throw =] a {{DataError}}. +

        +
      2. +
      3. +

        + Let |key| be a new {{CryptoKey}} object that represents the + Ed448 public key identified by interpreting + |jwk| according to Section 2 of [[RFC8037]]. +

        +
      4. +
      5. +

        + Set the {{CryptoKey/[[type]]}} + internal slot of |Key| to {{KeyType/"public"}}. +

        +
      6. +
      +
      +
      +
    18. +
    19. +

      + Let |algorithm| be a new instance of a {{KeyAlgorithm}} object. +

      +
    20. +
    21. +

      + Set the {{KeyAlgorithm/name}} attribute of + |algorithm| to "`Ed448`". +

      +
    22. +
    23. +

      + Set the {{CryptoKey/[[algorithm]]}} + internal slot of |key| to |algorithm|. +

      +
    24. +
    +
    +
    If |format| is {{KeyFormat/"raw"}}:
    +
    +
      +
    1. +

      + If |usages| contains a value which is not + "`verify`" + then [= exception/throw =] a + {{SyntaxError}}. +

      +
    2. +
    3. +

      + Let |data| be |keyData|. +

      +
    4. +
    5. +

      + If the [= length in bits =] of |data| is not 448 then [= exception/throw =] a {{DataError}}. +

      +
    6. +
    7. +

      + Let |algorithm| be a new {{KeyAlgorithm}} object. +

      +
    8. +
    9. +

      + Set the {{KeyAlgorithm/name}} attribute of + |algorithm| to "`Ed448`". +

      +
    10. +
    11. +

      + Let |key| be a new {{CryptoKey}} associated with the + [= relevant global object =] + of `this` [[HTML]], and that represents |data|. +

      +
    12. +
    13. +

      + Set the {{CryptoKey/[[type]]}} internal slot + of |key| to "`public`" +

      +
    14. +
    15. +

      + Set the {{CryptoKey/[[algorithm]]}} + internal slot of |key| to |algorithm|. +

      +
    16. +
    +
    +
    Otherwise:
    +
    +

    + [= exception/throw =] a + {{NotSupportedError}}. +

    +
    +
    +
  4. +
  5. +

    + Return |key| +

    +
  6. +
+
+
+
Export Key
+
    +
  1. +

    + Let |key| be the {{CryptoKey}} to be + exported. +

    +
  2. +
  3. +

    + If the underlying cryptographic key material represented by the {{CryptoKey/[[handle]]}} internal slot of |key| + cannot be accessed, then [= exception/throw =] an {{OperationError}}. +

    +
  4. +
  5. +
    +
    If |format| is {{KeyFormat/"spki"}}:
    +
    +
      +
    1. +

      + If the {{CryptoKey/[[type]]}} internal slot + of |key| is not "`public`", then [= exception/throw =] an {{InvalidAccessError}}. +

      +
    2. +
    3. +

      + Let |data| be an instance of the `subjectPublicKeyInfo` + ASN.1 structure defined in [[RFC5280]] + with the following properties: +

      +
        +
      • +

        + Set the |algorithm| field to an + `AlgorithmIdentifier` ASN.1 type with the following + properties: +

        +
          +
        • +

          + Set the |algorithm| object identifier to the + `id-Ed448` OID defined in [[RFC8410]]. +

          +
        • +
        +
      • +
      • +

        + Set the |subjectPublicKey| field to |keyData|. +

        +
      • +
      +
    4. +
    5. +

      + Let |result| be a new {{ArrayBuffer}} associated with the + [= relevant global object =] + of `this` [[HTML]], and containing + |data|. +

      +
    6. +
    +
    +
    If |format| is {{KeyFormat/"pkcs8"}}:
    +
    +
      +
    1. +

      + If the {{CryptoKey/[[type]]}} internal slot + of |key| is not {{KeyType/"private"}}, then [= exception/throw =] an {{InvalidAccessError}}. +

      +
    2. +
    3. +

      + Let |data| be an instance of the `privateKeyInfo` + ASN.1 structure defined in [[RFC5208]] + with the following properties: +

      +
        +
      • +

        + Set the |version| field to `0`. +

        +
      • +
      • +

        + Set the |privateKeyAlgorithm| field to a + `PrivateKeyAlgorithmIdentifier` ASN.1 type with the + following properties: +

        +
          +
        • +

          + Set the |algorithm| object identifier to the + `id-Ed448` OID defined in [[RFC8410]]. +

          +
        • +
        +
      • +
      • +

        + Set the |privateKey| field to the result of DER-encoding + a `CurvePrivateKey` ASN.1 type, as defined in Section 7 of [[RFC8410]], that represents the + Ed448 private key represented by the {{CryptoKey/[[handle]]}} internal slot of + |key| +

        +
      • +
      +
    4. +
    5. +

      + Let |result| be a new {{ArrayBuffer}} associated with the + [= relevant global object =] + of `this` [[HTML]], and containing + |data|. +

      +
    6. +
    +
    +
    If |format| is {{KeyFormat/"jwk"}}:
    +
    +
      +
    1. +

      + Let |jwk| be a new {{JsonWebKey}} + dictionary. +

      +
    2. +
    3. +

      + Set the `kty` attribute of |jwk| to + "`OKP`". +

      +
    4. +
    5. +

      + Set the `alg` attribute of |jwk| to + "`Ed448`". +

      +
    6. +
    7. +

      + Set the `crv` attribute of |jwk| to + "`Ed448`". +

      +
    8. +
    9. +

      + Set the {{JsonWebKey/x}} attribute of |jwk| according to the + definition in Section 2 of [[RFC8037]]. +

      +
    10. +
    11. +
      +
      + If the {{CryptoKey/[[type]]}} internal slot + of |key| is {{KeyType/"private"}} +
      +
      + Set the {{JsonWebKey/d}} attribute of |jwk| according to the + definition in Section 2 of [[RFC8037]]. +
      +
      +
    12. +
    13. +

      + Set the `key_ops` attribute of |jwk| to the {{CryptoKey/usages}} attribute of |key|. +

      +
    14. +
    15. +

      + Set the `ext` attribute of |jwk| to the {{CryptoKey/[[extractable]]}} internal slot + of |key|. +

      +
    16. +
    17. +

      + Let |result| be the result of converting |jwk| + to an ECMAScript Object, as defined by [[WebIDL]]. +

      +
    18. +
    +
    +
    + If |format| is {{KeyFormat/"raw"}}: +
    +
    +
      +
    1. +

      + If the {{CryptoKey/[[type]]}} internal slot + of |key| is not "`public`", then [= exception/throw =] an {{InvalidAccessError}}. +

      +
    2. +
    3. +

      + Let |data| be a [= byte sequence =] + representing the Ed448 public key represented by the {{CryptoKey/[[handle]]}} + internal slot of |key|. +

      +
    4. +
    5. +

      + Let |result| be a new {{ArrayBuffer}} associated with the + [= relevant global object =] + of `this` [[HTML]], and containing + |data|. +

      +
    6. +
    +
    +
    Otherwise:
    +
    +

    + [= exception/throw =] a + {{NotSupportedError}}. +

    +
    +
    +
  6. +
  7. +

    + Return |result|. +

    +
  8. +
+
+
+
+ +
+

X448

+
+

Description

+

+ The "`X448`" algorithm identifier is used to perform + key agreement using the X448 algorithm specified in + [[RFC7748]]. +

+
+
+

Registration

+

+ The [= recognized algorithm name =] + for this algorithm is "`X448`". +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OperationParametersResult
deriveBits{{EcdhKeyDeriveParams}}[= byte sequence =]
generateKeyNone{{CryptoKeyPair}}
importKeyNone{{CryptoKey}}
exportKeyNoneobject
+
+ +
+

Operations

+ +
+
Derive Bits
+
    +
  1. +

    + If the {{CryptoKey/[[type]]}} internal slot of + |key| is not {{KeyType/"private"}}, then [= exception/throw =] an {{InvalidAccessError}}. +

    +
  2. +
  3. +

    + Let |publicKey| be the + {{EcdhKeyDeriveParams/public}} member of + |normalizedAlgorithm|. +

    +
  4. +
  5. +

    + If the {{CryptoKey/[[type]]}} internal slot of + |publicKey| is not "`public`", then [= exception/throw =] an {{InvalidAccessError}}. +

    +
  6. +
  7. +

    + If the {{KeyAlgorithm/name}} attribute of + the {{CryptoKey/[[algorithm]]}} internal slot of + |publicKey| is not equal to the {{KeyAlgorithm/name}} property of the {{CryptoKey/[[algorithm]]}} internal slot of + |key|, then [= exception/throw =] an {{InvalidAccessError}}. +

    +
  8. +
  9. +

    + Let |secret| be the result of performing the X448 function specified in + [[RFC7748]] Section 5 with |key| as the X448 private key |k| + and the X448 public key represented by the {{CryptoKey/[[handle]]}} + internal slot of |publicKey| as the X448 public key |u|. +

    +
  10. +
  11. +

    + If |secret| is the all-zero value, + then [= exception/throw =] a {{OperationError}}. + This check must be performed in constant-time, as per [[RFC7748]] Section 6.2. +

    +
  12. +
  13. +
    +
    If |length| is null:
    +
    Return |secret|
    +
    Otherwise:
    +
    +
    +
    + If the length of |secret| in bits is less than + |length|: +
    +
    + [= exception/throw =] an + {{OperationError}}. +
    +
    Otherwise:
    +
    + Return a [= byte sequence containing =] the first |length| bits of |secret|. +
    +
    +
    +
    +
  14. +
+
+
+
Generate Key
+
    +
  1. +

    + If |usages| contains an entry which is not + "`deriveKey`" or "`deriveBits`" + then [= exception/throw =] a + {{SyntaxError}}. +

    +
  2. +
  3. +

    + Generate an X448 key pair, with the private key being 56 random bytes, + and the public key being `X448(a, 5)`, + as defined in [[RFC7748]], section 6.2. +

    +
  4. +
  5. +

    + Let |algorithm| be a new {{KeyAlgorithm}} object. +

    +
  6. +
  7. +

    + Set the {{KeyAlgorithm/name}} attribute of + |algorithm| to "`X448`". +

    +
  8. +
  9. +

    + Let |publicKey| be a new {{CryptoKey}} associated with the + [= relevant global object =] + of `this` [[HTML]], and + representing the public key of the generated key pair. +

    +
  10. +
  11. +

    + Set the {{CryptoKey/[[type]]}} internal slot of + |publicKey| to "`public`" +

    +
  12. +
  13. +

    + Set the {{CryptoKey/[[algorithm]]}} internal + slot of |publicKey| to |algorithm|. +

    +
  14. +
  15. +

    + Set the {{CryptoKey/[[extractable]]}} internal + slot of |publicKey| to true. +

    +
  16. +
  17. +

    + Set the {{CryptoKey/[[usages]]}} internal slot of + |publicKey| to be the empty list. +

    +
  18. +
  19. +

    + Let |privateKey| be a new {{CryptoKey}} associated with the + [= relevant global object =] + of `this` [[HTML]], and + representing the private key of the generated key pair. +

    +
  20. +
  21. +

    + Set the {{CryptoKey/[[type]]}} internal slot of + |privateKey| to {{KeyType/"private"}} +

    +
  22. +
  23. +

    + Set the {{CryptoKey/[[algorithm]]}} internal + slot of |privateKey| to |algorithm|. +

    +
  24. +
  25. +

    + Set the {{CryptoKey/[[extractable]]}} internal + slot of |privateKey| to |extractable|. +

    +
  26. +
  27. +

    + Set the {{CryptoKey/[[usages]]}} internal slot of + |privateKey| to be the + [= usage intersection =] of + |usages| and `[ "deriveKey", "deriveBits" ]`. +

    +
  28. +
  29. +

    + Let |result| be a new {{CryptoKeyPair}} + dictionary. +

    +
  30. +
  31. +

    + Set the {{CryptoKeyPair/publicKey}} attribute + of |result| to be |publicKey|. +

    +
  32. +
  33. +

    + Set the {{CryptoKeyPair/privateKey}} attribute + of |result| to be |privateKey|. +

    +
  34. +
  35. +

    + Return the result of converting |result| to an ECMAScript Object, as + defined by [[WebIDL]]. +

    +
  36. +
+
+ +
+
Import Key
+
    +
  1. +

    Let |keyData| be the key data to be imported.

    +
  2. +
  3. +
    +
    If |format| is {{KeyFormat/"spki"}}:
    +
    +
      +
    1. +

      + If |usages| is not empty + then [= exception/throw =] a + {{SyntaxError}}. +

      +
    2. +
    3. +

      + Let |spki| be the result of running the + [= parse a subjectPublicKeyInfo =] + algorithm over |keyData|. +

      +
    4. +
    5. +

      + If an error occurred while parsing, + then [= exception/throw =] a + {{DataError}}. +

      +
    6. +
    7. +

      + If the `algorithm` object identifier field of the + `algorithm` AlgorithmIdentifier field of |spki| is + not equal to the `id-X448` + object identifier defined in [[RFC8410]], + then [= exception/throw =] a + {{DataError}}. +

      +
    8. +
    9. +

      + If the `parameters` field of the `algorithm` + AlgorithmIdentifier field of |spki| is present, + then [= exception/throw =] a + {{DataError}}. +

      +
    10. +
    11. +

      + Let |publicKey| be the X448 public key identified by + the `subjectPublicKey` field of |spki|. +

      +
    12. +
    13. +

      + Let |key| be a new {{CryptoKey}} associated with the + [= relevant global object =] + of `this` [[HTML]], and + that represents |publicKey|. +

      +
    14. +
    15. +

      + Set the {{CryptoKey/[[type]]}} internal slot + of |key| to "`public`" +

      +
    16. +
    17. +

      + Let |algorithm| be a new {{KeyAlgorithm}}. +

      +
    18. +
    19. +

      + Set the {{KeyAlgorithm/name}} attribute of + |algorithm| to "`X448`". +

      +
    20. +
    21. +

      + Set the {{CryptoKey/[[algorithm]]}} + internal slot of |key| to |algorithm|. +

      +
    22. +
    +
    +
    If |format| is {{KeyFormat/"pkcs8"}}:
    +
    +
      +
    1. +

      + If |usages| contains an entry which is not + "`deriveKey`" or "`deriveBits`" + then [= exception/throw =] a + {{SyntaxError}}. +

      +
    2. +
    3. +

      + Let |privateKeyInfo| be the result of running the + [= parse a privateKeyInfo =] + algorithm over |keyData|. +

      +
    4. +
    5. +

      + If an error occurs while parsing, + then [= exception/throw =] a + {{DataError}}. +

      +
    6. +
    7. +

      + If the `algorithm` object identifier field of the + `privateKeyAlgorithm` PrivateKeyAlgorithm field of + |privateKeyInfo| is not equal to the + `id-X448` object identifier defined in [[RFC8410]], + then [= exception/throw =] a + {{DataError}}. +

      +
    8. +
    9. +

      + If the `parameters` field of the + `privateKeyAlgorithm` PrivateKeyAlgorithmIdentifier field + of |privateKeyInfo| is present, + then [= exception/throw =] a + {{DataError}}. +

      +
    10. +
    11. +

      + Let |curvePrivateKey| be the result of performing the [= parse an ASN.1 structure =] + algorithm, with |data| as the `privateKey` field + of |privateKeyInfo|, |structure| as the ASN.1 + `CurvePrivateKey` structure specified in Section 7 of [[RFC8410]], and |exactData| set to true. +

      +
    12. +
    13. +

      + If an error occurred while parsing, + then [= exception/throw =] a + {{DataError}}. +

      +
    14. +
    15. +

      + Let |key| be a new {{CryptoKey}} associated with the + [= relevant global object =] + of `this` [[HTML]], and + that represents the X448 private key identified by |curvePrivateKey|. +

      +
    16. +
    17. +

      + Set the {{CryptoKey/[[type]]}} internal slot + of |key| to {{KeyType/"private"}} +

      +
    18. +
    19. +

      + Let |algorithm| be a new {{KeyAlgorithm}}. +

      +
    20. +
    21. +

      + Set the {{KeyAlgorithm/name}} attribute of + |algorithm| to "`X448`". +

      +
    22. +
    23. +

      + Set the {{CryptoKey/[[algorithm]]}} + internal slot of |key| to |algorithm|. +

      +
    24. +
    +
    +
    If |format| is {{KeyFormat/"jwk"}}:
    +
    +
      +
    1. +
      +
      If |keyData| is a {{JsonWebKey}} dictionary:
      +

      Let |jwk| equal |keyData|.

      +
      Otherwise:
      +

      [= exception/Throw =] a {{DataError}}.

      +
      +
    2. +
    3. +

      + If the {{JsonWebKey/d}} field is present and if |usages| + contains an entry which is not + "`deriveKey`" or "`deriveBits`" + then [= exception/throw =] a + {{SyntaxError}}. +

      +
    4. +
    5. +

      + If the {{JsonWebKey/d}} field is not present and if |usages| is not + empty + then [= exception/throw =] a + {{SyntaxError}}. +

      +
    6. +
    7. +

      + If the {{JsonWebKey/kty}} field of |jwk| is not + "`OKP`", + then [= exception/throw =] a + {{DataError}}. +

      +
    8. +
    9. +

      + If the {{JsonWebKey/crv}} field of |jwk| is not + "`X448`", + then [= exception/throw =] a + {{DataError}}. +

      +
    10. +
    11. +

      + If |usages| is non-empty and the {{JsonWebKey/use}} field of |jwk| is present + and is not equal to "`enc`" then [= exception/throw =] a + {{DataError}}. +

      +
    12. +
    13. +

      + If the {{JsonWebKey/key_ops}} field of |jwk| is present, and + is invalid according to the requirements of JSON Web + Key [[JWK]], or it does not contain all of the specified |usages| + values, + then [= exception/throw =] a + {{DataError}}. +

      +
    14. +
    15. +

      + If the {{JsonWebKey/ext}} field of |jwk| is present and + has the value false and |extractable| is true, + then [= exception/throw =] a + {{DataError}}. +

      +
    16. +
    17. +
      +
      If the {{JsonWebKey/d}} field is present:
      +
      +
        +
      1. +

        + If |jwk| does not meet the requirements of + the JWK private key format described in Section 2 + of [[RFC8037]], then [= exception/throw =] a {{DataError}}. +

        +
      2. +
      3. +

        + Let |key| be a new {{CryptoKey}} object that represents the + X448 private key identified by interpreting + |jwk| according to Section 2 of [[RFC8037]]. +

        +
      4. +
      5. +

        + Set the {{CryptoKey/[[type]]}} + internal slot of |Key| to {{KeyType/"private"}}. +

        +
      6. +
      +
      +
      Otherwise:
      +
      +
        +
      1. +

        + If |jwk| does not meet the requirements of + the JWK public key format described in Section 2 + of [[RFC8037]], then [= exception/throw =] a {{DataError}}. +

        +
      2. +
      3. +

        + Let |key| be a new {{CryptoKey}} object that represents the + X448 public key identified by interpreting + |jwk| according to Section 2 of [[RFC8037]]. +

        +
      4. +
      5. +

        + Set the {{CryptoKey/[[type]]}} + internal slot of |Key| to {{KeyType/"public"}}. +

        +
      6. +
      +
      +
      +
    18. +
    19. +

      + Let |algorithm| be a new instance of a {{KeyAlgorithm}} object. +

      +
    20. +
    21. +

      + Set the {{KeyAlgorithm/name}} attribute of + |algorithm| to "`X448`". +

      +
    22. +
    23. +

      + Set the {{CryptoKey/[[algorithm]]}} + internal slot of |key| to |algorithm|. +

      +
    24. +
    +
    +
    If |format| is {{KeyFormat/"raw"}}:
    +
    +
      +
    1. +

      + If |usages| is not empty + then [= exception/throw =] a + {{SyntaxError}}. +

      +
    2. +
    3. +

      + Let |data| be |keyData|. +

      +
    4. +
    5. +

      + If the [= length in bits =] of |data| is not 448 then [= exception/throw =] a {{DataError}}. +

      +
    6. +
    7. +

      + Let |algorithm| be a new {{KeyAlgorithm}} object. +

      +
    8. +
    9. +

      + Set the {{KeyAlgorithm/name}} attribute of + |algorithm| to "`X448`". +

      +
    10. +
    11. +

      + Let |key| be a new {{CryptoKey}} associated with the + [= relevant global object =] + of `this` [[HTML]], and that represents |data|. +

      +
    12. +
    13. +

      + Set the {{CryptoKey/[[type]]}} internal slot + of |key| to "`public`" +

      +
    14. +
    15. +

      + Set the {{CryptoKey/[[algorithm]]}} + internal slot of |key| to |algorithm|. +

      +
    16. +
    +
    +
    Otherwise:
    +
    +

    + [= exception/throw =] a + {{NotSupportedError}}. +

    +
    +
    +
  4. +
  5. +

    + Return |key| +

    +
  6. +
+
+ +
+
Export Key
+
    +
  1. +

    + Let |key| be the {{CryptoKey}} to be + exported. +

    +
  2. +
  3. +

    + If the underlying cryptographic key material represented by the {{CryptoKey/[[handle]]}} internal slot of |key| + cannot be accessed, then [= exception/throw =] an {{OperationError}}. +

    +
  4. +
  5. +
    +
    If |format| is {{KeyFormat/"spki"}}:
    +
    +
      +
    1. +

      + If the {{CryptoKey/[[type]]}} internal slot + of |key| is not "`public`", then [= exception/throw =] an {{InvalidAccessError}}. +

      +
    2. +
    3. +

      + Let |data| be an instance of the `subjectPublicKeyInfo` + ASN.1 structure defined in [[RFC5280]] + with the following properties: +

      +
        +
      • +

        + Set the |algorithm| field to an + `AlgorithmIdentifier` ASN.1 type with the following + properties: +

        +
          +
        • +

          + Set the |algorithm| object identifier to the + `id-X448` OID defined in [[RFC8410]]. +

          +
        • +
        +
      • +
      • +

        + Set the |subjectPublicKey| field to |keyData|. +

        +
      • +
      +
    4. +
    5. +

      + Let |result| be a new {{ArrayBuffer}} associated with the + [= relevant global object =] + of `this` [[HTML]], and containing + |data|. +

      +
    6. +
    +
    +
    If |format| is {{KeyFormat/"pkcs8"}}:
    +
    +
      +
    1. +

      + If the {{CryptoKey/[[type]]}} internal slot + of |key| is not {{KeyType/"private"}}, then [= exception/throw =] an {{InvalidAccessError}}. +

      +
    2. +
    3. +

      + Let |data| be an instance of the `privateKeyInfo` + ASN.1 structure defined in [[RFC5208]] + with the following properties: +

      +
        +
      • +

        + Set the |version| field to `0`. +

        +
      • +
      • +

        + Set the |privateKeyAlgorithm| field to a + `PrivateKeyAlgorithmIdentifier` ASN.1 type with the + following properties: +

        +
          +
        • +

          + Set the |algorithm| object identifier to the + `id-X448` OID defined in [[RFC8410]]. +

          +
        • +
        +
      • +
      • +

        + Set the |privateKey| field to the result of DER-encoding + a `CurvePrivateKey` ASN.1 type, as defined in Section 7 of [[RFC8410]], that represents the + X448 private key represented by the {{CryptoKey/[[handle]]}} internal slot of + |key| +

        +
      • +
      +
    4. +
    5. +

      + Let |result| be a new {{ArrayBuffer}} associated with the + [= relevant global object =] + of `this` [[HTML]], and containing + |data|. +

      +
    6. +
    +
    +
    If |format| is {{KeyFormat/"jwk"}}:
    +
    +
      +
    1. +

      + Let |jwk| be a new {{JsonWebKey}} + dictionary. +

      +
    2. +
    3. +

      + Set the `kty` attribute of |jwk| to + "`OKP`". +

      +
    4. +
    5. +

      + Set the `crv` attribute of |jwk| to + "`X448`". +

      +
    6. +
    7. +

      + Set the {{JsonWebKey/x}} attribute of |jwk| according to the + definition in Section 2 of [[RFC8037]]. +

      +
    8. +
    9. +
      +
      + If the {{CryptoKey/[[type]]}} internal slot + of |key| is {{KeyType/"private"}} +
      +
      + Set the {{JsonWebKey/d}} attribute of |jwk| according to the + definition in Section 2 of [[RFC8037]]. +
      +
      +
    10. +
    11. +

      + Set the `key_ops` attribute of |jwk| to the {{CryptoKey/usages}} attribute of |key|. +

      +
    12. +
    13. +

      + Set the `ext` attribute of |jwk| to the {{CryptoKey/[[extractable]]}} internal slot + of |key|. +

      +
    14. +
    15. +

      + Let |result| be the result of converting |jwk| + to an ECMAScript Object, as defined by [[WebIDL]]. +

      +
    16. +
    +
    +
    + If |format| is {{KeyFormat/"raw"}}: +
    +
    +
      +
    1. +

      + If the {{CryptoKey/[[type]]}} internal slot + of |key| is not "`public`", then [= exception/throw =] an {{InvalidAccessError}}. +

      +
    2. +
    3. +

      + Let |data| be a [= byte sequence =] representing the X448 + public key represented by the {{CryptoKey/[[handle]]}} internal slot of + |key|. +

      +
    4. +
    5. +

      + Let |result| be a new {{ArrayBuffer}} associated with the + [= relevant global object =] + of `this` [[HTML]], and containing + |data|. +

      +
    6. +
    +
    +
    Otherwise:
    +
    +

    + [= exception/throw =] a + {{NotSupportedError}}. +

    +
    +
    +
  6. +
  7. +

    + Return |result|. +

    +
  8. +
+
+
+
+ +
+

AES-CTR

+
+

Description

+

+ The "`AES-CTR`" algorithm identifier is used to perform + encryption and decryption using AES in Counter mode, + as described in [[NIST-SP800-38A]]. +

+
+
+

Registration

+

+ The [= recognized algorithm name =] for + this algorithm is "`AES-CTR`". +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OperationParametersResult
encrypt{{AesCtrParams}}[= byte sequence =]
decrypt{{AesCtrParams}}[= byte sequence =]
generateKey{{AesKeyGenParams}}{{CryptoKey}}
importKeyNone{{CryptoKey}}
exportKeyNoneobject
get key length{{AesDerivedKeyParams}}Integer
+
+ +
+

AesCtrParams dictionary

+
+dictionary AesCtrParams : Algorithm {
+  required BufferSource counter;
+  required [EnforceRange] octet length;
+};
+          
+

The counter member contains the initial value of the counter block. {{AesCtrParams/counter}} MUST be 16 bytes (the AES block size). The counter bits are the rightmost length + bits of the counter block. The rest of the counter block is for + the nonce. The counter bits are incremented using the standard + incrementing function specified in NIST SP 800-38A Appendix B.1: + the counter bits are interpreted as a big-endian integer and + incremented by one.

+

The length member contains the length, in bits, of the rightmost part of the counter block that is incremented.

+
+
+

AesKeyAlgorithm dictionary

+
+dictionary AesKeyAlgorithm : KeyAlgorithm {
+  required unsigned short length;
+};
+          
+

The length member represents the length, in bits, of the key.

+
+
+

AesKeyGenParams dictionary

+
+dictionary AesKeyGenParams : Algorithm {
+  required [EnforceRange] unsigned short length;
+};
+          
+

The length member represents the length, in bits, of the key.

+
+
+

AesDerivedKeyParams dictionary

+
+dictionary AesDerivedKeyParams : Algorithm {
+  required [EnforceRange] unsigned short length;
+};
+          
+

The length member represents the length, in bits, of the key.

+
+ +
+

Operations

+ +
+
Encrypt
+ +
    +
  1. +

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

    +
  2. +
  3. +

    + If the {{AesCtrParams/length}} member of + |normalizedAlgorithm| is zero or is greater + than 128, + then [= exception/throw =] an + {{OperationError}}. +

    +
  4. +
  5. +

    + Let |ciphertext| be the result of performing the CTR Encryption + operation described in Section 6.5 of [[NIST-SP800-38A]] using AES as the block cipher, the {{AesCtrParams/counter}} member of + |normalizedAlgorithm| as the initial value of the counter block, the + {{AesCtrParams/length}} member of + |normalizedAlgorithm| as the input parameter |m| to the + standard counter block incrementing function defined in Appendix B.1 of + [[NIST-SP800-38A]] and + |plaintext| as the input plaintext. +

    +
  6. +
  7. +

    + Return |ciphertext|. +

    +
  8. +
+
+ +
+
Decrypt
+ +
    +
  1. +

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

    +
  2. +
  3. +

    + If the {{AesCtrParams/length}} member of + |normalizedAlgorithm| is zero or is greater + than 128, + then [= exception/throw =] an + {{OperationError}}. +

    +
  4. +
  5. +

    + Let |plaintext| be the result of performing the CTR Decryption + operation described in Section 6.5 of [[NIST-SP800-38A]] using AES as the block cipher, the {{AesCtrParams/counter}} member of + |normalizedAlgorithm| as the initial value of the counter block, the + {{AesCtrParams/length}} member of + |normalizedAlgorithm| as the input parameter |m| to the + standard counter block incrementing function defined in Appendix B.1 of + [[NIST-SP800-38A]] and + |ciphertext| as the input ciphertext. +

    +
  6. +
  7. +

    + Return |plaintext|. +

    +
  8. +
+
+ +
+
Generate Key
+ +
    +
  1. +

    + If |usages| contains any entry which is not + one of "`encrypt`", "`decrypt`", + "`wrapKey`" or "`unwrapKey`", + then [= exception/throw =] a + {{SyntaxError}}. +

    +
  2. +
  3. +

    + If the {{AesKeyGenParams/length}} member of + |normalizedAlgorithm| is not equal to one of + 128, 192 or 256, + then [= exception/throw =] an + {{OperationError}}. +

    +
  4. + +
  5. +

    + Generate an AES key of length + equal to the {{AesKeyGenParams/length}} member of + |normalizedAlgorithm|. +

    +
  6. +
  7. +

    + If the key generation step fails, + then [= exception/throw =] an + {{OperationError}}. +

    +
  8. +
  9. +

    + Let |key| be a new + {{CryptoKey}} object representing the + generated AES key. +

    +
  10. +
  11. +

    + Let |algorithm| be a new + {{AesKeyAlgorithm}}. +

    +
  12. +
  13. +

    + Set the {{KeyAlgorithm/name}} attribute of + |algorithm| to "`AES-CTR`". +

    +
  14. +
  15. +

    + Set the {{AesKeyAlgorithm/length}} attribute of + |algorithm| to equal the + {{AesKeyGenParams/length}} member of + |normalizedAlgorithm|. +

    +
  16. +
  17. +

    + Set the {{CryptoKey/[[type]]}} internal slot of + |key| to {{KeyType/"secret"}}. +

    +
  18. +
  19. +

    + Set the {{CryptoKey/[[algorithm]]}} internal + slot of |key| to |algorithm|. +

    +
  20. +
  21. +

    + Set the {{CryptoKey/[[extractable]]}} internal + slot of |key| to be |extractable|. +

    +
  22. +
  23. +

    + Set the {{CryptoKey/[[usages]]}} internal slot of + |key| to be |usages|. +

    +
  24. +
  25. +

    + Return |key|. +

    +
  26. +
+
+ +
+
Import Key
+ +
    +
  1. +

    + If |usages| contains an entry which is not + one of "`encrypt`", "`decrypt`", + "`wrapKey`" or "`unwrapKey`", + then [= exception/throw =] a + {{SyntaxError}}. +

    +
  2. +
  3. +
    +
    If |format| is {{KeyFormat/"raw"}}:
    +
    +
      +
    1. Let |data| be |keyData|.

      @@ -16033,6 +17850,33 @@

      Algorithm mappings

      +{ kty: "OKP",
      +  crv: "Ed448",
      +  alg: "Ed448" }
      +
      + + +
      +{ name: "Ed448" }
      +
      + + + + +
      +{ kty: "OKP",
      +  crv: "X448" }
      +
      + + +
      +{ name: "X448" }
      +
      + + + + +
       { kty: "oct",
         alg: "A128CTR" }
       
      @@ -16358,6 +18202,26 @@

      Mapping between Algorithm and SubjectPublicKeyInfo

      [[RFC8410]] + + id-Ed448 (1.3.101.113) + BIT STRING + + "`Ed448`" + + + [[RFC8410]] + + + + id-X448 (1.3.101.111) + BIT STRING + + "`X448`" + + + [[RFC8410]] + +
      @@ -16426,6 +18290,26 @@

      Mapping between Algorithm and PKCS#8 PrivateKeyInfo

      [[RFC8410]] + + id-Ed448 (1.3.101.113) + CurvePrivateKey + + "`Ed448`" + + + [[RFC8410]] + + + + id-X448 (1.3.101.111) + CurvePrivateKey + + "`X448`" + + + [[RFC8410]] + +