lp: 4190 title: Banderwagon — Bandersnatch Prime-Order Quotient description: The prime-order quotient group over the Bandersnatch curve, canonical commitment group for Verkle trees, IPA Bulletproofs and Pedersen vector commitments author: Lux Core Team (@luxfi) discussions-to: https://github.com/luxfi/lps/discussions status: Final implementation-rust: none implementation-cpp: partial implementation-go: shipped type: Standards Track category: Core tags: [banderwagon, bandersnatch, classical-curve, verkle, ipa, pedersen, prime-order]
- lp-4110
- lp-4010
Abstract
Banderwagon is the prime-order quotient group over the Bandersnatch curve — a twisted Edwards curve defined over the BLS12-381 scalar field. It is the canonical commitment group for Verkle trees (LP-4840), IPA Bulletproofs (LP-4845) and Pedersen vector commitments (LP-4365).
The reason for the quotient rather than the raw curve: Bandersnatch has
cofactor 4, and a cofactor is a standing invitation to small-subgroup
and malleability bugs. Banderwagon quotients by {±1, ±E} so the group
the protocol reasons about is genuinely prime-order and that entire class
of bug does not exist to be reasoned about.
Specification
Parameters
- Base curve: Bandersnatch, twisted Edwards over the BLS12-381 scalar field Fr
a = -5,d = 138827208126141220649022263972958607803 / 171449701953573178309673572579671231137- Subgroup order
r_bw = 13108968793781547619861935127046491459309155893440570251786403306729687672801 - Cofactor 4; Banderwagon = curve /
{±1, ±E} - Encoded length: 47 bytes (compressed
Element) Fp= the base curve's Fr = the BLS12-381 scalar field
Operations
Element: add, double, scalar_mul, MSM (windowed Pippenger, LP-4082)Fr: Montgomery REDC, modular inverse by addition chain onr_bw − 2
Known-answer tests
16 Element operation vectors plus 16 serialization vectors, byte-equal
to go-ipa. crypto/banderwagon/test/kat_*.json.
Implementation
Go canonical
luxfi/crypto/banderwagon — {fp,fr,element,msm}.go, first-party.
C++ CPU canonical
luxcpp/crypto/banderwagon/cpp/{fp,fr,element,msm}.{hpp,cpp} —
first-party Bandersnatch Fp/Fr Montgomery arithmetic plus Element.
C-ABI at banderwagon_capi.h, shipped as libbanderwagon.a.
GPU kernels
Metal, CUDA and WGSL kernels covering Element add/double/scalar_mul
and Pippenger MSM.
Determinism
CPU↔GPU byte-equality over N = 1000 random Element operations and MSM
at k = 64…4096: PASS.
Test oracles
crate-crypto/go-ipa, vendored as a test oracle and never linked into
libbanderwagon.a; arkworks-rs/banderwagon as an independent second
oracle and KAT generator.
Security Considerations
- Prime-order by the quotient construction — the cofactor is cleared structurally, so there is no small-subgroup attack surface to check for.
- MSM is variable-time (Pippenger). Prover-side IPA callers MUST use
MultiExpBlinded— multiplicative scalar blinding — to suppress the timing leak. Verifier-side MSM operates on public challenges and the variable-time path is correct there. Elementadd and double are constant-time for verifier-side operations.
References
- Hopwood, "Bandersnatch: a Twisted Edwards curve over the BLS12-381 scalar field" (2021)
- Sinha, Buterin, Hopwood, "Bandersnatch and Banderwagon: prime-order representation" (2022)
Copyright
Copyright (C) 2024-2026, Lux Industries Inc. All rights reserved.
Licensed under the MIT License.