-
Notifications
You must be signed in to change notification settings - Fork 23
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
Native Ed25519 signatures in Safari are non-deterministic #77
Comments
Thank you for the pointer about Safari. // Repro
(async () => {
const { privateKey } = await crypto.subtle.generateKey("Ed25519", false, [
"sign",
"verify",
]);
const message = new Uint8Array([1, 2, 3]);
console.log(
'A', new Uint8Array(await crypto.subtle.sign("Ed25519", privateKey, message))
);
console.log(
'B', new Uint8Array(await crypto.subtle.sign("Ed25519", privateKey, message))
);
console.log(
'C', new Uint8Array(await crypto.subtle.sign("Ed25519", privateKey, message))
);
})(); |
Can you say a bit more about what problem randomized signatures would create? |
They are actually better and more secure, however, no one uses them, which could create compat issues. Even the spec has no test vectors |
Which issues could you imagine? |
Overall verifier doesn't know whether signature was deterministic or not, so they would not be able to distinguish those. |
Got it. Solana doesn't use a transaction's signature to prevent double-spending, so hedged signatures won't present a problem there. Thanks for the discussion! Good to see you again. |
Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up. |
README says:
Does this look like "most modern JavaScript runtimes"?
The text was updated successfully, but these errors were encountered: