lambdaworks icon indicating copy to clipboard operation
lambdaworks copied to clipboard

Bn254 Curve

Open MauroToscano opened this issue 2 years ago • 2 comments
trafficstars

Add BN254 to Lambdaworks (ethereum altbn128)

  • [x] Add the finite field used by the curve, using MontgomeryBackend
  • [x] Add the curve
  • [x] Add the degree 2 extensión finite field
  • [x] Add the twist
  • [ ] Add the pairing

References:

Pairing friendly elliptic curves Succinct Non-Interactive Zero Knowledge for a von Neumann Architecture Bn 254 for the rest of us Bn 254 Gnark Docs Bn 254 Gnark Implementation Bn 254 Arkworks Docs

Constants:

Fr:

$21888242871839275222246405745257275088696311157297823662689037894645226208583$ -> $0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47$

Fp:

$21888242871839275222246405745257275088696311157297823662689037894645226208583$ -> $0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47$

Curve equation:

$Y²=X³+3$ -> $a = 0, b = 3$

Twist:

$Y² = X³+3/(u+9)$

$G1 = (1,2)$ $G2 = ([10857046999023057135944570762232829481370756359578518086990519993285655852781,11559732032986387107991004021392285783925812861821192530917403151452391805634] , [8495653923123431417604973247489272438418190587263600148770280649306958101930,4082367875863433681332203403145435568316851327593401208105741076214120093531]$

MauroToscano avatar Sep 05 '23 19:09 MauroToscano

I'll look into this one as I progress through the Sparkling Water bootcamp

dbejarano820 avatar Sep 12 '23 20:09 dbejarano820

Does anybody doing the last part of this one?

Am looking into it.

skaunov avatar Mar 01 '24 15:03 skaunov

Solved

diegokingston avatar Oct 01 '24 14:10 diegokingston