Skip to content

Commit

Permalink
remove duplicated method
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Jan 16, 2025
1 parent 6bfb225 commit 6ffa023
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions std/algebra/emulated/sw_bn254/pairing.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,11 @@ func NewPairing(api frontend.API) (*Pairing, error) {
}, nil
}


func (pr Pairing) generators() *G2Affine {
if pr.g2gen == nil {
_, _, _, g2gen := bn254.Generators()
cg2gen := NewG2AffineFixed(g2gen)
pr.g2gen = &cg2gen
}
return pr.g2gen
}

// Pair calculates the reduced pairing for a set of points ∏ᵢ e(Pᵢ, Qᵢ).
//
// This function checks that the Qᵢ are in the correct subgroup, but does not
// check Pᵢ. See AssertIsOnG1.
func (pr Pairing) Pair(P []*G1Affine, Q []*G2Affine) (*GTEl, error) {
res, err := pr.MillerLoop(P, Q)
if err != nil {
return nil, fmt.Errorf("miller loop: %w", err)
}
return pr.g2gen
}
Expand Down

0 comments on commit 6ffa023

Please sign in to comment.