Optimize CheckMultiSig by using public key recovery #12
willcl-ark
started this conversation in
Brainstorming
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I had a recent chat with @ sipa about an idea I had to reimplement the CheckMultiSig operations to use public key recovery without altering their semantics.
New new proposed implementation would proceed as follows.
The advantage of this proposed method over the current "try-and-fail" method is that the number of elliptic curve operations is now roughly proportional to k, the number of signatures, rather than n the number of pubkeys.
For non-n-of-n CheckMultiSig operations, I expect this method should be faster than the current implementation. For n-of-n CheckMultiSig operations, the proposed method is not likely to be faster than local (n signature) batch verification and certainly not faster than global batch verification (for OP_CHECKMULTISIGVERIFY).
Unfortunately, I don't have time to pursue a PR to implement this proposal at the moment, and maybe someone else would like to pick up this issue.
Beta Was this translation helpful? Give feedback.
All reactions