From d278fcb5b33377df25be81ebd3b3bcee5c0e9918 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Fri, 25 Oct 2024 12:21:28 +0200 Subject: [PATCH] Explicitly set CryptoKey.type to "secret" in AES and HMAC operations (#378) Set `CryptoKey.type` to "secret" in the generate key and import key operations of AES and HMAC. These are strongly suggested to be "secret" anyway, per the description of https://w3c.github.io/webcrypto/#dom-keytype. However, it seems best to set them explicitly, as is done in the other algorithms. --- spec/Overview.html | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/spec/Overview.html b/spec/Overview.html index 90d7596..f57a0bf 100644 --- a/spec/Overview.html +++ b/spec/Overview.html @@ -10226,6 +10226,12 @@

Operations

|normalizedAlgorithm|.

+
  • +

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

    +
  • Set the {{CryptoKey/[[algorithm]]}} internal @@ -10379,6 +10385,12 @@

    Operations

    value |data|.

  • +
  • +

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

    +
  • Let |algorithm| be a new @@ -10760,6 +10772,12 @@

    Operations

    |normalizedAlgorithm|.

  • +
  • +

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

    +
  • Set the {{CryptoKey/[[algorithm]]}} internal @@ -10914,6 +10932,12 @@

    Operations

    object representing an AES key with value |data|.

  • +
  • +

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

    +
  • Let |algorithm| be a new @@ -11378,6 +11402,12 @@

    Operations

    |normalizedAlgorithm|.

  • +
  • +

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

    +
  • Set the {{CryptoKey/[[algorithm]]}} internal @@ -11532,6 +11562,12 @@

    Operations

    object representing an AES key with value |data|.

  • +
  • +

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

    +
  • Let |algorithm| be a new @@ -11854,6 +11890,12 @@

    Operations

    |normalizedAlgorithm|.

  • +
  • +

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

    +
  • Set the {{CryptoKey/[[algorithm]]}} internal @@ -12008,6 +12050,12 @@

    Operations

    representing an AES key with value |data|.

  • +
  • +

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

    +
  • Let |algorithm| be a new @@ -12392,6 +12440,12 @@

    Operations

    of |algorithm| to |hash|.

  • +
  • +

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

    +
  • Set the {{CryptoKey/[[algorithm]]}} internal @@ -12646,6 +12700,12 @@

    Operations

    bits of |data|.

  • +
  • +

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

    +
  • Let |algorithm| be a new