LPsLux Proposals
Q-Chain
LP-4130

lp-4130-curve25519-point-operations


lp: 4130 title: Curve25519 Point Operations description: EVM precompile exposing raw Edwards25519 point arithmetic — addition, scalar multiplication, basepoint multiplication and multi-scalar multiplication — for ring signatures, Bulletproofs and VRFs author: Lux Core Team (@luxfi) discussions-to: https://github.com/luxfi/lps/discussions status: Final implementation-rust: none implementation-cpp: none implementation-go: shipped type: Standards Track category: Core tags: [evm, precompile, curve25519, edwards25519, classical-curve, bulletproofs, vrf]

  • lp-9015

Abstract

This LP exposes raw Edwards25519 point arithmetic as an EVM precompile. It sits a level below X25519 (LP-4160), which only offers Diffie-Hellman and deliberately hides the group. Protocols that need the group itself — ring signatures, Bulletproofs range proofs, VRFs, and Ristretto255 constructions — cannot be built on a DH-only interface, so this precompile hands out point addition, scalar multiplication, constant-time basepoint multiplication, and multi-scalar multiplication directly.

Specification

Address

0x0000000000000000000000000000000000009204 — Privacy range.

Interface

The operation selector is the first byte of input. All points are 32-byte compressed Edwards form.

0x01 PointAdd:     P1(32) + P2(32) -> P3(32)
0x02 ScalarMul:    P(32) + scalar(32) -> P*s(32)
0x03 BasepointMul: scalar(32) -> B*s(32)    (constant-time)
0x04 MSM:          n*(point(32) + scalar(32)) -> sum(32)

Gas Schedule

OperationGas
PointAdd1,500
ScalarMul5,000
BasepointMul5,000
MSM (base)5,000
MSM (per additional pair)4,000

Security Considerations

  1. Implementation uses filippo.io/edwards25519 for constant-time arithmetic.
  2. Scalars are canonicalized; non-canonical inputs are clamped per RFC 7748.
  3. Security is roughly 128 bits — the Curve25519 group order is about 2^252. Not post-quantum.
  4. MSM uses a variable-time Straus/Pippenger routine internally. That is safe here and only here: every input to an EVM precompile is already public on-chain, so there is no secret for a timing channel to leak. BasepointMul is the one operation whose scalar is plausibly a secret key being converted to a public key, and it is constant-time.

References

Copyright (C) 2024-2026, Lux Industries Inc. All rights reserved.

Licensed under the MIT License.