crypto: support deterministic ECDSA/DSA signatures#62252
crypto: support deterministic ECDSA/DSA signatures#62252panva wants to merge 1 commit intonodejs:mainfrom
Conversation
Add dsaNonceType option to sign/verify node:crypto APIs. When set to 'deterministic', uses deterministic digital signature generation procedure per RFC 6979.
|
Review requested:
|
|
Leaving this at draft PR unless there's user interest. |
|
cc @paulmillr you might be interested / have an opinion on this |
See RFC6979 3.6 and https://paulmillr.com/posts/deterministic-signatures/. The suggestion is to switch to deterministic by default + add an ability to pass either specific randomness Buffer, or make node auto-generate random buffer:
|
|
|
https://docs.openssl.org/master/man7/provider-signature/#signature-parameters > OSSL_SIGNATURE_PARAM_NONCE_TYPE that's what this is, exposed as an opt-in option, not a new default IIUC there are no other options available to us |
|
The question is about how "random nonces" work, not about how deterministic one works Upd:
This is... bad. |
|
0 / random = current behaviour, csprng -> k, not changed by this PR noisy / hedged is not an option in OpenSSL, draft-irtf-cfrg-det-sigs-with-noise would need to be finished and published as RFC first for OpenSSL to consider it. |
Add dsaNonceType option to sign/verify node:crypto APIs. When set to 'deterministic', uses deterministic digital signature generation procedure per RFC 6979.