[v6] Use WebCrypto for ed25519 and x25519 when available#1782
Merged
larabr merged 4 commits intoopenpgpjs:v6from Aug 21, 2024
Merged
[v6] Use WebCrypto for ed25519 and x25519 when available#1782larabr merged 4 commits intoopenpgpjs:v6from
larabr merged 4 commits intoopenpgpjs:v6from
Conversation
712fe9c to
a6b41c5
Compare
twiss
reviewed
Aug 13, 2024
As it implements a different RFC for non-deterministic signature generation
81b5136 to
dd28e0a
Compare
dd28e0a to
5c58334
Compare
twiss
approved these changes
Aug 19, 2024
Collaborator
Author
|
Randomly failing CI tests on Safari as part of EdDSA WebCrypto's key generation assumed to be due to bad randomness/insufficient entropy, see e.g. https://stackoverflow.com/questions/26021181/not-enough-entropy-to-support-dev-random-in-docker-containers-running-in-boot2d . Edit: will try to repro / investigate this further and find a fix as the CI is consistently (but randomly) failing. |
larabr
added a commit
that referenced
this pull request
Sep 9, 2024
…t scalar Fixes regression from changes in #1782, as the spec mandates that legacy x25519 store the secret scalar already clamped. Keys generated using v6.0.0-beta.3 are still expected to be functional, since the scalar is to be clamped before computing the ECDH shared secret.
larabr
added a commit
that referenced
this pull request
Sep 9, 2024
…t scalar Fixes regression from changes in #1782, as the spec mandates that legacy x25519 store the secret scalar already clamped. Keys generated using v6.0.0-beta.3 are still expected to be functional, since the scalar is to be clamped before computing the ECDH shared secret.
Collaborator
Author
|
We've temporarily reverted WebCrypto usage for X25519 (ccb040a) as Firefox has released support in v130, but something is broken with JWK imports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support for curve25519 in WebCrypto has shipped by Safari, and is behind experimental flags in other major browsers (see https://wpt.fyi/results/WebCryptoAPI/generateKey?label=master&label=experimental&aligned&q=25519 for support).
The tweetnacl import is still inlined as the library is always used for key validation (until the curve is more widely implemented natively).