Document that Safari generates randomized Ed25519 signatures #24462
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.
Summary
Document the fact that for the Ed25519 algorithm in Web Crypto's
crypto.subtle.sign
function, Safari generates randomized signatures as per draft-irtf-cfrg-det-sigs-with-noise, instead of deterministic signatures as per RFC 8032.There is a discussion in WICG/webcrypto-secure-curves#28 to make this behavior legal, but as of now it isn't (although in most cases it shouldn't cause interoperability issues). Additionally, even if this becomes legal as per the Web Crypto spec, it may still be noteworthy for developers who (for some reason) require the deterministic behavior of Ed25519 as specified in RFC 8032.
Test results and supporting details
This behavior can be confirmed by running
In deterministic implementations, both signatures will be identical. In randomized implementations, they'll be different. I tested desktop and mobile Safari 17 and 18 and all of them implement the randomized variant.
Related issues
Relevant WebKit issue: https://bugs.webkit.org/show_bug.cgi?id=262499.