Skip to content

Commit 2da6b16

Browse files
make mapToCurve public to allow for custom cofactor clearing
1 parent 70133f1 commit 2da6b16

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+191
-191
lines changed

ecc/bls12-377/hash_to_g1.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecc/bls12-377/hash_to_g1_test.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecc/bls12-377/hash_to_g2.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecc/bls12-377/hash_to_g2_test.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecc/bls12-378/hash_to_g1.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecc/bls12-378/hash_to_g1_test.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecc/bls12-378/hash_to_g2.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

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

2626
var res G2Affine
2727

@@ -91,7 +91,7 @@ func svdwMapG2(u fptower.E2) G2Affine {
9191
// MapToG2 maps an fp.Element to a point on the curve using the Shallue and van de Woestijne map
9292
// https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-06#section-2.2.1
9393
func MapToG2(t fptower.E2) G2Affine {
94-
res := svdwMapG2(t)
94+
res := MapToCurve2(t)
9595
res.ClearCofactor(&res)
9696
return res
9797
}

ecc/bls12-381/hash_to_g1.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecc/bls12-381/hash_to_g1_test.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecc/bls12-381/hash_to_g2.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)