-
Notifications
You must be signed in to change notification settings - Fork 220
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
fix(tariscript): multisig ordered signatures and pubkeys #5961
fix(tariscript): multisig ordered signatures and pubkeys #5961
Conversation
bd50996
to
630b875
Compare
} | ||
|
||
for pk in pub_keys.by_ref() { | ||
if !sig_set.contains(s) && s.verify_raw_canonical(pk, &message) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of verify_raw_canonical
means that message
must safely bind the public key. In this case, it is identical across the full set of allowed public keys, which technically breaks Fiat-Shamir. In practice, it means that a forger would need to target any one of the public keys, the complexity of which depends on the number of public keys in the set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #5817 for a related issue.
Require the ordering of the pubkeys and signatures to matter. If the signatures or pubkeys are out of order the likelyhood of passing decreases.
Remove the check that a key has been validated previously. With ordered sigs and keys a key will only ever be checked once so we don't need to confirm if it's already provided a valid sig. It's also confusing because Alice can provide two sigs against her pub key but she has to provide the pubkey twice. The language here made that a litle confusing.
70e4b6d
to
8c36321
Compare
Description
Update the multisig op code checks to care about the order of keys and signatures. This is to assist with reducing the amount of iterations and processing a node is required to perform to validate a collection.
Motivation and Context
Low/Minor audit issue to reduce processing for nodes.
Closes: #5806
How Has This Been Tested?
Test suite / CI
What process can a PR reviewer use to test or verify this change?
Look at the test additions. They make it more clear what the effects of the changes are.
Breaking Changes