Add anti nonce-sidechannel protocol to schnorrsigs #572
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.
Based on #588.
Adding anti nonce-sidechannel functionality was a request in the schnorrsig module PR. The use case is to prevent a signing device from exfiltrating the secret signing keys through biased signature nonces, for example after a bad firmware update. It uses sign-to-contract commitments to host supplied randomness which forces the signer to randomize the nonce.
In order to add more sign-to-contract commitments the host can create a merkle tree of data to be committed and randomness and send that to the signing device as "host randomness".
See https://github.com/bitcoin-core/secp256k1/pull/572/files#diff-b19c5ee427283d4d82bc5beb4e2f4777R59 for the workflow.