From 420bb94deee580e0d3469d4ba92a84b92b855402 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Fri, 25 Oct 2024 11:49:53 +0200 Subject: [PATCH 1/2] Set CryptoKey.type to "secret" in AES and HMAC during generateKey These are strongly suggested to be 'secret' anyway, per this description: https://w3c.github.io/webcrypto/#dom-keytype However, it seems wiser to define this explicitly, instead of hoping for the best. --- spec/Overview.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/spec/Overview.html b/spec/Overview.html index 90d7596..7368082 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 @@ -10760,6 +10766,12 @@

    Operations

    |normalizedAlgorithm|.

  • +
  • +

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

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

    Operations

    |normalizedAlgorithm|.

  • +
  • +

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

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

    Operations

    |normalizedAlgorithm|.

  • +
  • +

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

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

    Operations

    of |algorithm| to |hash|.

  • +
  • +

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

    +
  • Set the {{CryptoKey/[[algorithm]]}} internal From e8e46556c04001ca4ceb9334df0fada707415513 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Fri, 25 Oct 2024 11:55:08 +0200 Subject: [PATCH 2/2] Set CryptoKey.type to "secret" in AES and HMAC during importKey These are strongly suggested to be 'secret' anyway, per this description: https://w3c.github.io/webcrypto/#dom-keytype However, it seems wiser to define this explicitly, instead of hoping for the best. --- spec/Overview.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/spec/Overview.html b/spec/Overview.html index 7368082..f57a0bf 100644 --- a/spec/Overview.html +++ b/spec/Overview.html @@ -10385,6 +10385,12 @@

    Operations

    value |data|.

  • +
  • +

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

    +
  • Let |algorithm| be a new @@ -10926,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 @@ -11550,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 @@ -12032,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 @@ -12676,6 +12700,12 @@

    Operations

    bits of |data|.

  • +
  • +

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

    +
  • Let |algorithm| be a new