Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bn254 Curve #548

Closed
4 of 5 tasks
MauroToscano opened this issue Sep 5, 2023 · 3 comments
Closed
4 of 5 tasks

Bn254 Curve #548

MauroToscano opened this issue Sep 5, 2023 · 3 comments

Comments

@MauroToscano
Copy link
Collaborator

MauroToscano commented Sep 5, 2023

Add BN254 to Lambdaworks (ethereum altbn128)

  • Add the finite field used by the curve, using MontgomeryBackend
  • Add the curve
  • Add the degree 2 extensión finite field
  • 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 MauroToscano changed the title Bn254 Bn254 Curve Sep 5, 2023
@dbejarano820
Copy link
Contributor

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

@skaunov
Copy link

skaunov commented Mar 1, 2024

Does anybody doing the last part of this one?

Am looking into it.

@diegokingston
Copy link
Contributor

Solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants