Files
servo/components/script_bindings/codegen
Kingsley Yung 1c449ed53b script: Implement SubtleCrypto.getPublicKey method with X25519 support (#43073)
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

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-03-07 09:13:40 +00:00
..