lp: 4365 title: Pedersen Hash Commitment description: EVM precompile for additively homomorphic Pedersen commitments over BN254, with the canonical domain-separation tags and golden generator vectors 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: [evm, precompile, pedersen, commitment, homomorphic, bn254, hash]
- lp-4150
- lp-9015
Abstract
This LP specifies Pedersen commitments over BN254 as an EVM precompile.
A Pedersen commitment C = v·G + r·H is hiding (the blinding r
makes C reveal nothing about v), binding under the discrete log
assumption (you cannot open C to a second value), and — the property
that makes it worth a precompile — additively homomorphic:
C(v₁, r₁) + C(v₂, r₂) = C(v₁ + v₂, r₁ + r₂)
You can add two commitments without opening either. Range proof systems (Bulletproofs), privacy pools, Zcash, and Aztec are all built on that one line.
Specification
Address
0x0500000000000000000000000000000000000006 — Hashing range.
Interface
The operation selector is the first byte of input. Values and blindings are 32-byte BN254 scalar field elements. Commitments are 32-byte compressed BN254 G1 points.
0x01 Commit: value(32) + blinding(32) -> commitment(32)
0x02 Verify: commitment(32) + value(32) + blinding(32) -> bool(32)
0x03 Add: c1(32) + c2(32) -> c1+c2(32)
0x04 VectorCommit: n(1) + values(n*32) + blinding(32) -> commitment(32)
Commit computes C = v·G + r·H. VectorCommit supports up to 32
values, each against its own generator G_i.
Generator derivation
The generators are derived deterministically by hash-to-curve, never chosen. The domain separation tags are normative — an implementation that uses different tags produces different generators and therefore commitments that no other implementation can verify:
| Generator | Domain separation tag |
|---|---|
NewGenerators G | PEDERSEN_G_V1 |
NewGenerators H | PEDERSEN_H_V1 |
NewGeneratorsFromSeed | PEDERSEN_SEEDED_GEN_V1 |
Hash-to-curve is BN254 G1 via RFC 9380 SVDW. BN254 G1 has cofactor 1, so there is no cofactor clearing step.
The seeded variant derives generator i from a 32-byte seed as:
msg_i = seed[32] || u64_le(i)
The tags name the algorithm, not the product. Pedersen over BN254 is Pedersen over BN254 whoever ships it; a vendor prefix in a domain separator would only guarantee that two correct implementations disagree.
Golden vectors
For seed = [0, 1, …, 31]:
G[0..31] = c563aa8a283f268b65b4210a0a78ee1341f76b59d94c1ac626effe1a5aa0c6b7
H[0..31] = e9ebf4392683dcb418584dd8ecd1e1dd16b486147e676dbf4b62779a340f3186
Any port — Rust, C++, GPU kernel — MUST hard-code the tags above and
reproduce these bytes exactly. The Go known-answer harness is
pedersen/pedersen_seed_test.go::TestNewGeneratorsFromSeed_GoldenVector.
The unseeded NewGenerators G/H are derived at init from
PEDERSEN_G_V1 / PEDERSEN_H_V1 and are not yet frozen as hard-coded
vectors. When the first non-Go known-answer test lands, freeze them in a
testdata/ JSON keyed by DST.
Gas Schedule
| Operation | Gas |
|---|---|
| Commit | 6,000 |
| Verify | 7,000 |
| Add | 500 |
| VectorCommit (base) | 6,000 |
| VectorCommit (per value) | 3,000 |
Security Considerations
- Hiding and binding both require that nobody knows the discrete log
relating G and H. That is exactly why the generators come from
hash-to-curve with fixed tags rather than from a trusted setup or a
hand-picked constant: nobody, including the implementer, can know
log_G H. - Security rests on BN254 discrete log hardness, roughly 100 bits. Not post-quantum.
- Vector commitments are capped at 32 elements; each
G_iis derived deterministically. Addis what makes range proof verification cheap — a verifier can combine commitments without ever learning an opening.
References
- T.P. Pedersen, Non-Interactive and Information-Theoretic Secure Verifiable Secret Sharing (CRYPTO 1991)
- RFC 9380 — Hashing to Elliptic Curves
- Source:
github.com/luxfi/precompile/pedersen/,github.com/luxfi/crypto/pedersen/
Copyright
Copyright (C) 2024-2026, Lux Industries Inc. All rights reserved.
Licensed under the MIT License.