Skip to content
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 randomizers to 128 bit and provide argument #222

Open
wants to merge 1 commit into
base: bip-taproot
Choose a base branch
from

Conversation

jonasnick
Copy link

This (currently) speeds up batch verification in libsecp256k1 by up to 9%.

Reopen of #220 which was automatically closed. Closes #219.

  • Consider replacing Schwartz-Zippel with proof by induction.

Applying Schwartz-Zippel may be detrimental if we want to allow a more general approach where randomizer a_i only depend on pk_1..pk_i, m_1..m_i and sig_1..sig_i and not all pubkeys messages and sigs (this is actually currently implemented in bitcoin-core/secp256k1#1087. Hence, one can choose pk_{i+1} and therefore bias a_{i+1} after computing a_i. SZ on the other hand requires the randomizers to be drawn random independently and uniformly.

The proof sketch in the issue does not use SZ but instead a proof by induction that appears to be better suited for dependent a_i.

This (currently) speeds up batch verification in libsecp256k1 by up to 9%.
@real-or-random
Copy link

I'm not sure if the distinction between invoking SZ and the inductive proof makes a difference with respect to the incremental derivation of randomizers. Already with the SZ proof and the non-incremental variant, the fact that randomizers are actually deterministic is outside the scope of the proof. So the attacker can bias all a_i by choosing pk_1

But I need to think more about it...

@jonasnick
Copy link
Author

So the attacker can bias all a_i by choosing pk_1

Yes, but those a_i are all independent of each other. With incremental derivation, the attacker can choose a_{i+1} dependent on a_i.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bip-340: Reduce size of batch verification randomizers to 128 bits
2 participants