Skip to content

feat(crypto): batch-verify BLS signatures via blst multi-pairing - #397

Merged
jadenfix merged 1 commit into
mainfrom
feat/agent5-bls-batch-verify
Apr 15, 2026
Merged

jadenfix merged 1 commit into
mainfrom
feat/agent5-bls-batch-verify

Conversation

@jadenfix

Copy link
Copy Markdown
Owner

Summary

  • Add verify_batch() to aether-crypto-bls using blst's verify_multiple_aggregate_signatures with randomized 64-bit scalars (Bellare et al. 2007). N verification equations collapse into one final exponentiation — blst parallelizes the miller loops across a thread pool internally.
  • Add HybridConsensus::batch_process_votes() that pre-validates votes, batch-verifies all BLS signatures in one call, then processes each through existing equivocation/dedup/quorum logic. Falls back to individual verification when the batch fails (identifies bad votes).
  • 9 new tests: 6 for verify_batch (valid, bad sig, empty, single, same-message, throughput), 3 for batch_process_votes (quorum, bad sig rejection, empty).

Blast radius

  • process_vote() is unchanged — batch_process_votes is purely additive.
  • BLS crate gains one new public function (verify_batch). No behavioral changes to existing API.
  • Touched crates: aether-crypto-bls, aether-consensus.
  • Downstream: aether-node tests pass (depends on consensus).

Security

Random 64-bit scalars in the linear combination prevent an attacker from crafting two invalid signatures whose pairing contributions cancel (standard batch verification security argument, Bellare-Garay-Rabin 2007). If the batch check fails, individual fallback verification identifies the bad vote(s).

Test plan

  • cargo test -p aether-crypto-bls --all-features — 30 pass, 2 ignored
  • cargo test -p aether-consensus --all-features — 156 pass
  • cargo test -p aether-node --all-features — all pass
  • cargo clippy on touched crates — clean
  • cargo fmt --check — clean
  • CI matrix (full workspace)
  • --ignored throughput benchmark: cargo test -p aether-crypto-bls -- verify_batch_throughput --ignored

🤖 Agent 5 — Cryptography & Refactor Lead

Add `verify_batch()` to `aether-crypto-bls` using blst's
`verify_multiple_aggregate_signatures` with randomized 64-bit scalars
(Bellare et al. 2007). N verification equations collapse into one final
exponentiation — blst parallelizes the miller loops internally.

Wire batch verification into consensus via `HybridConsensus::batch_process_votes()`:
pre-validate votes, batch-verify all BLS signatures in one call, then
process each through the existing equivocation/dedup/quorum logic.
Falls back to individual verification when the batch check fails
(identifies which specific vote has a bad signature).

Blast radius: consensus `process_vote()` is unchanged — batch_process_votes
is additive. BLS crate gains one new public function. No behavioral changes
to existing code paths. Node crate tests pass (depends on consensus).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jadenfix
jadenfix merged commit 40210c7 into main Apr 15, 2026
7 checks passed
@jadenfix
jadenfix deleted the feat/agent5-bls-batch-verify branch April 15, 2026 16:39
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.

1 participant