Schnorr Batch Validation
A technique for verifying multiple Schnorr signatures simultaneously in less time than checking each individually.
Key Takeaways
- Schnorr batch validation combines multiple Schnorr signature checks into a single multi-scalar multiplication, reducing the total computation needed to verify a set of signatures.
- The technique uses random linear combinations to merge individual verification equations, as specified in BIP-340. If any single signature in the batch is invalid, the combined check fails with overwhelming probability.
- ECDSA signatures used in pre-Taproot Bitcoin transactions cannot be batch-validated because their verification equation relies on a modular inverse that breaks the linearity required for combining checks.
What Is Schnorr Batch Validation?
Schnorr batch validation is a cryptographic optimization that allows a verifier to check many Schnorr signatures at once, rather than verifying each one independently. Instead of performing a full elliptic curve verification for every signature in a block or message set, the verifier combines all the individual verification equations into a single equation and checks that equation in one pass.
This is possible because Schnorr signatures have a linear verification equation. The standard check for a single signature asks whether s·G = R + e·P, where s is the signature scalar, G is the generator point, R is the nonce point, e is the challenge hash, and P is the public key. Because this equation is a straightforward relationship between elliptic curve points, multiple equations can be summed together with random weights and verified as one combined operation.
BIP-340 formally specifies this batch verification algorithm as part of the Schnorr signature standard for Bitcoin. The algorithm became available when Taproot activated at block height 709,632 in November 2021, enabling all P2TR outputs to use Schnorr signatures.
How It Works
To understand batch validation, start with single-signature verification. For one Schnorr signature (R, s) on a message m with public key P, the verifier checks:
s·G = R + e·P
where e = hash(R || P || m)This requires two scalar-point multiplications and one point addition. Repeating this for n signatures means 2n scalar multiplications total.
The Batch Equation
BIP-340 defines the batch verification equation as follows. Given u signatures with public keys, messages, and signature pairs, the verifier generates random coefficients a₂, a₃, …, aᵤ and checks:
(s₁ + a₂·s₂ + … + aᵤ·sᵤ)·G
= R₁ + a₂·R₂ + … + aᵤ·Rᵤ
+ e₁·P₁ + (a₂·e₂)·P₂ + … + (aᵤ·eᵤ)·PᵤThe left side is a single scalar multiplication (the sum of all weighted s values times G). The right side is a multi-scalar multiplication across all the R and P points. Multi-scalar multiplication algorithms such as Strauss and Pippenger compute these combined operations faster than doing each multiplication independently.
Why Random Coefficients Matter
The random coefficients a₂ through aᵤ are critical for security. Without them, a malicious signer could craft two invalid signatures whose errors cancel each other out, causing the combined equation to hold despite neither signature being valid. The random weights make such cancellation overwhelmingly unlikely.
BIP-340 specifies that these coefficients are derived deterministically from a cryptographic hash of all inputs (public keys, messages, and signatures), seeded into a CSPRNG (the specification suggests ChaCha20). This ensures the verifier cannot be manipulated into choosing coefficients that favor a particular forgery. The probability of an invalid batch passing verification is negligible: on the order of 2⁻¹²⁸.
Step-by-Step Algorithm
The BIP-340 batch verification algorithm proceeds as follows:
- Seed a CSPRNG with the SHA-256 hash of all public keys, messages, and signatures. Generate
u − 1random integersa₂throughaᵤin the range1ton − 1(wherenis the curve order). The first signature implicitly hasa₁ = 1. - For each signature
i, decode the public key into an elliptic curve pointPᵢ, extract the nonce commitmentrᵢand scalarsᵢfrom the signature, and compute the challengeeᵢusing the tagged hash defined in BIP-340. - Lift each
rᵢto a full curve pointRᵢ. Reject the batch if any point fails to decode. - Evaluate the combined equation. If both sides are equal, all signatures in the batch are valid. If not, at least one is invalid.
Why ECDSA Cannot Be Batch-Validated
Pre-Taproot Bitcoin transactions use ECDSA signatures, which cannot benefit from batch validation. The reason is structural: ECDSA's verification equation involves a modular inverse and an x-coordinate extraction step that break the linearity Schnorr relies on.
In ECDSA, verification computes u₁·G + u₂·P and then extracts only the x-coordinate of the result to compare against the signature's r value. This x-coordinate extraction is not a group homomorphism: the x-coordinate of a sum of points is not the sum of their x-coordinates. Because of this, you cannot combine multiple ECDSA verification equations into a single check. Each signature must be verified independently.
This is one of the key reasons BIP-340 chose Schnorr over ECDSA for Taproot. As the specification notes: "This supports batch verification, as there are no elliptic curve operations inside the hashes."
Use Cases
Initial Block Download
When a new Bitcoin node joins the network, it must validate every historical block from the genesis block forward. This process, called initial block download (IBD), is heavily bottlenecked by signature verification. As Taproot adoption grows, an increasing share of signatures in each block will be Schnorr-based, making batch validation increasingly effective at reducing IBD time.
Signature verification typically accounts for a large portion of block validation CPU time. By batching all Schnorr signatures within a block into a single multi-scalar multiplication, nodes can process blocks significantly faster. The actual speedup depends on the share of Taproot transactions and batch size: larger batches yield greater efficiency gains because multi-scalar multiplication algorithms amortize their overhead across more points.
Block Validation During Normal Operation
Even after IBD, full nodes validate every new block as it arrives. Batch-verifying all Schnorr signatures in a block reduces the computational cost of staying in sync with the network. This is especially relevant for nodes running on constrained hardware, where any reduction in per-block CPU time helps maintain real-time sync.
Lightning and Layer 2 Protocols
Layer 2 systems that process many signatures in bulk can also benefit. For example, a Lightning channel factory closing multiple channels simultaneously, or a service validating a batch of Taproot Asset transfers, can use batch verification to reduce computational overhead.
Performance Characteristics
The performance gain from batch validation scales with batch size but is not linear. The dominant cost in the batch equation is the multi-scalar multiplication on the right side, which grows with the number of signatures but grows more slowly than running individual verifications. Algorithms like Pippenger's become particularly efficient at large batch sizes (hundreds or thousands of signatures).
For a deeper analysis of batch verification throughput and its impact on Bitcoin node performance, see the research article on Schnorr batch verification throughput.
| Property | Individual Verification | Batch Verification |
|---|---|---|
| Scalar multiplications per signature | 2 | Amortized via multi-scalar multiplication |
| Can identify which signature failed | Yes | No (requires bisection to find invalid signature) |
| Works with ECDSA | Yes | No (Schnorr only) |
| Deterministic result | Yes | Yes (coefficients derived from inputs) |
Risks and Considerations
No Fault Identification
When a batch verification check fails, the verifier knows that at least one signature in the batch is invalid, but not which one. To identify the specific invalid signature, the verifier must fall back to individual verification or use a bisection strategy: split the batch in half, batch-verify each half, and recursively narrow down the invalid signature. This adds complexity to implementations.
Adoption Dependency
Batch validation only applies to Schnorr signatures in Taproot transactions. Legacy, SegWit v0, and other pre-Taproot transaction types still use ECDSA and must be verified individually. The practical benefit of batch verification scales directly with Taproot adoption: at low adoption levels, the gains are modest because most signatures in a block remain ECDSA.
Implementation Complexity
Correct batch verification requires careful implementation. The random coefficient generation must use a cryptographically secure process tied to all inputs. Any weakness in randomness could allow an attacker to craft batches where invalid signatures pass. The libsecp256k1 library, which Bitcoin Core uses for all cryptographic operations, has been developing a batch verification module with thorough review to ensure correctness.
Non-Deterministic Failure Mode
As BIP-340 notes, batch verification is technically non-deterministic: if a batch contains an invalid signature, the check fails with overwhelming probability (not certainty). In practice, the failure probability for a forged signature is approximately 2⁻¹²⁸, making it negligible for all practical purposes. However, this means batch and individual verification could theoretically disagree, though the probability is astronomically small.
This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.