-
Notifications
You must be signed in to change notification settings - Fork 43
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
bip-340: Reduce size of batch verification randomizers to 128 bits #219
Comments
That's a very neat way to spell out this argument and leaves no doubt. I polished it a little bit to help my understanding:
But is there a reason why we can't simply invoke the Schwartz–Zippel lemma? I think this would work directly:
|
I think we can. Initially I thought that the Schwartz-Zippel Lemma as stated on wikipedia required the indeterminates to be in the same field as the coefficients but after looking at it again, I can see that that's not actually the case. |
@sipa if you have no objections or concerns, I'd open a PR to the main BIP repo. |
You could also open a PR against this repo and we could batch a few changes. Not sure which is better, I'm fine with both options. |
For public keys
pk_1, ..., pk_u
, messagesm_1, ..., m_u
, signaturessig_1, ..., sig_u
, the probability thatBatchVerify(pk_1, ..., pk_u, m_1, ..., m_u, sig_1, ..., sig_u)
with 128-bit uniform randomizers succeeds and there existsi
in[1, u]
such thatVerify(pk_i, m_i, sig_i)
fails is less than2^-128
.This speeds up batch verification in libsecp by up to about 9%. If people agree that this is a good idea, I'll open a PR upstream.
Proof sketch
Ping @sipa @real-or-random
The text was updated successfully, but these errors were encountered: