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

make mapToCurve public to allow for custom cofactor clearing #372

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading