Skip to content

script: Implement SubtleCrypto.getPublicKey method with X25519 support#43073

Merged
TimvdLippe merged 1 commit intoservo:mainfrom
kkoyung:get-public-key
Mar 7, 2026
Merged

script: Implement SubtleCrypto.getPublicKey method with X25519 support#43073
TimvdLippe merged 1 commit intoservo:mainfrom
kkoyung:get-public-key

Conversation

@kkoyung
Copy link
Copy Markdown
Member

@kkoyung kkoyung commented Mar 7, 2026

Implement the getPublicKey method of the SubtleCrypto interface.

This patch includes:

  • Implementing the steps of the getPublicKey method.
  • Adding the new "getPublicKey" operation to the internal object supportedAlgorithms, for registering cryptographic algorithms that support "getPublicKey" operation, and used by the getPublicKey method to check whether the cryptographic algorithm supports "getPublicKey" operation and perform the operation if it is supported.
  • Implementing the "getPublicKey" operation of X25519 for demonstrating and testing the functionality of the getPublicKey method.

Specification: https://wicg.github.io/webcrypto-modern-algos/#SubtleCrypto-method-getPublicKey
Testing: Pass WPT tests that were expected to fail.
Fixes: Part of #43072

Implement the `getPublicKey` method of the `SubtleCrypto` interface.

This patch includes:

- Implementing the steps of the `getPublicKey` method.
- Adding the new "getPublicKey" operation to the internal object
  `supportedAlgorithms`, used for registering cryptographic algorithms
  that support "getPublicKey" operation. It is used by the
  `getPublicKey` method to check whether the cryptographic algorithm
  supports "getPublicKey" operation, and perform the operation if it is
  supported.
- Implementing the "getPublicKey" operation of X25519 for demonstrating
  and testing the functionality of the `getPublicKey` method.

Specification: <https://wicg.github.io/webcrypto-modern-algos/#SubtleCrypto-method-getPublicKey>
Testing: Pass WPT tests that were expected to fail.
Fixes: XXXXX

Signed-off-by: Kingsley Yung <[email protected]>
@kkoyung kkoyung requested a review from gterzian as a code owner March 7, 2026 06:45
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 7, 2026
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Mar 7, 2026
@TimvdLippe TimvdLippe added this pull request to the merge queue Mar 7, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 7, 2026
Merged via the queue into servo:main with commit 1c449ed Mar 7, 2026
33 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 7, 2026
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.

4 participants