Skip to content

Commit

Permalink
optim: avoid div in millerLoopAndFinalExpResult (#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
shramee authored Dec 19, 2024
1 parent f3d9199 commit 3729f22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions std/algebra/emulated/sw_bn254/pairing.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,8 @@ func (pr Pairing) millerLoopAndFinalExpResult(P *G1Affine, Q *G2Affine, previous
t2 := pr.Ext12.Mul(&cubicNonResiduePower, res)

t1 := pr.FrobeniusCube(residueWitnessInv)
t0 := pr.FrobeniusSquare(residueWitnessInv)
t1 = pr.Ext12.DivUnchecked(t1, t0)
t0 := pr.FrobeniusSquare(residueWitness)
t1 = pr.Ext12.Mul(t1, t0)
t0 = pr.Frobenius(residueWitnessInv)
t1 = pr.Ext12.Mul(t1, t0)

Expand Down

0 comments on commit 3729f22

Please sign in to comment.