Skip to content

Commit

Permalink
Explicitly set CryptoKey.type to "secret" in AES and HMAC operations (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
BenWiederhake authored Oct 25, 2024
1 parent d68a54a commit d278fcb
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions spec/Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -10226,6 +10226,12 @@ <h4>Operations</h4>
|normalizedAlgorithm|.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[type]]}} internal slot of
|key| to {{KeyType/"secret"}}.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[algorithm]]}} internal
Expand Down Expand Up @@ -10379,6 +10385,12 @@ <h4>Operations</h4>
value |data|.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[type]]}} internal slot of
|key| to {{KeyType/"secret"}}.
</p>
</li>
<li>
<p>
Let |algorithm| be a new
Expand Down Expand Up @@ -10760,6 +10772,12 @@ <h4>Operations</h4>
|normalizedAlgorithm|.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[type]]}} internal slot of
|key| to {{KeyType/"secret"}}.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[algorithm]]}} internal
Expand Down Expand Up @@ -10914,6 +10932,12 @@ <h4>Operations</h4>
object representing an AES key with value |data|.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[type]]}} internal slot of
|key| to {{KeyType/"secret"}}.
</p>
</li>
<li>
<p>
Let |algorithm| be a new
Expand Down Expand Up @@ -11378,6 +11402,12 @@ <h4>Operations</h4>
|normalizedAlgorithm|.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[type]]}} internal slot of
|key| to {{KeyType/"secret"}}.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[algorithm]]}} internal
Expand Down Expand Up @@ -11532,6 +11562,12 @@ <h4>Operations</h4>
object representing an AES key with value |data|.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[type]]}} internal slot of
|key| to {{KeyType/"secret"}}.
</p>
</li>
<li>
<p>
Let |algorithm| be a new
Expand Down Expand Up @@ -11854,6 +11890,12 @@ <h4>Operations</h4>
|normalizedAlgorithm|.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[type]]}} internal slot of
|key| to {{KeyType/"secret"}}.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[algorithm]]}} internal
Expand Down Expand Up @@ -12008,6 +12050,12 @@ <h4>Operations</h4>
representing an AES key with value |data|.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[type]]}} internal slot of
|key| to {{KeyType/"secret"}}.
</p>
</li>
<li>
<p>
Let |algorithm| be a new
Expand Down Expand Up @@ -12392,6 +12440,12 @@ <h4>Operations</h4>
of |algorithm| to |hash|.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[type]]}} internal slot of
|key| to {{KeyType/"secret"}}.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[algorithm]]}} internal
Expand Down Expand Up @@ -12646,6 +12700,12 @@ <h4>Operations</h4>
bits of |data|.
</p>
</li>
<li>
<p>
Set the {{CryptoKey/[[type]]}} internal slot of
|key| to {{KeyType/"secret"}}.
</p>
</li>
<li>
<p>
Let |algorithm| be a new
Expand Down

0 comments on commit d278fcb

Please sign in to comment.