Skip to content

Commit

Permalink
make mapToCurve public to allow for custom cofactor clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Apr 5, 2023
1 parent f93a56c commit 86feb5e
Show file tree
Hide file tree
Showing 41 changed files with 191 additions and 191 deletions.
12 changes: 6 additions & 6 deletions ecc/bls12-377/hash_to_g1.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ecc/bls12-377/hash_to_g1_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions ecc/bls12-377/hash_to_g2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ecc/bls12-377/hash_to_g2_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions ecc/bls12-378/hash_to_g1.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ecc/bls12-378/hash_to_g1_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ecc/bls12-378/hash_to_g2.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

// https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-06#section-4.1
// Shallue and van de Woestijne method, works for any elliptic curve in Weierstrass curve
func svdwMapG2(u fptower.E2) G2Affine {
func MapToCurve2(u fptower.E2) G2Affine {

var res G2Affine

Expand Down Expand Up @@ -91,7 +91,7 @@ func svdwMapG2(u fptower.E2) G2Affine {
// MapToG2 maps an fp.Element to a point on the curve using the Shallue and van de Woestijne map
// https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-06#section-2.2.1
func MapToG2(t fptower.E2) G2Affine {
res := svdwMapG2(t)
res := MapToCurve2(t)
res.ClearCofactor(&res)
return res
}
Expand Down
12 changes: 6 additions & 6 deletions ecc/bls12-381/hash_to_g1.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ecc/bls12-381/hash_to_g1_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions ecc/bls12-381/hash_to_g2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ecc/bls12-381/hash_to_g2_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 86feb5e

Please sign in to comment.