Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generating and importing ECDSA keys #2279

Merged
merged 1 commit into from
Dec 6, 2023
Merged

Conversation

cpetrov
Copy link
Member

@cpetrov cpetrov commented Nov 23, 2023

ECDSA and ECDH keys have the same internal representation on the native client but are used for different purposes - ECDSA for signing and ECDH for key exchange.

This commit adds support for ECDSA keys to the SubtleCrypto API. This prepares the way for supporting crypto.subtle.sign() and crypto.subtle.verify().

It also removes "ECDH" from the allowed string values for the algorithm parameter of crypto.subtle.importKey, because for ECDH and ECDSA algorithms, always an object that includes namedCurve must be provided 1.

  • Code is up-to-date with current master
  • Code is provided under the terms of the Tabris.js license

ECDSA and ECDH keys have the same internal representation on the native
client but are used for different purposes - ECDSA for signing and ECDH
for key exchange.

This commit adds support for ECDSA keys to the `SubtleCrypto` API. This
prepares the way for supporting `crypto.subtle.sign()` and
`crypto.subtle.verify()`.

It also removes `"ECDH"` from the allowed string values for the
`algorithm` parameter of `crypto.subtle.importKey`, because for ECDH and
ECDSA algorithms, always an object that includes `namedCurve` must be
provided [1].

[1]: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey
@cpetrov cpetrov merged commit 295fac2 into master Dec 6, 2023
1 check passed
@cpetrov cpetrov deleted the pr-ecdsa-keys branch December 6, 2023 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants