Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
extract sswu to hash2curve repo (#41)
Browse files Browse the repository at this point in the history
Signed-off-by: bytemare <[email protected]>
  • Loading branch information
bytemare authored Apr 21, 2023
1 parent c102921 commit b51f99f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 54 deletions.
52 changes: 0 additions & 52 deletions internal/h2c/sswu.go

This file was deleted.

3 changes: 1 addition & 2 deletions internal/nist/curve.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/bytemare/hash2curve"

"github.com/bytemare/crypto/internal/field"
"github.com/bytemare/crypto/internal/h2c"
)

type mapping struct {
Expand Down Expand Up @@ -59,7 +58,7 @@ func (c *curve[point]) hashXMD(input, dst []byte) point {
}

func (c *curve[point]) map2curve(fe *big.Int) point {
x, y := h2c.MapToCurveSSWU(&c.field, &nistWa, &c.b, &c.z, fe)
x, y := hash2curve.MapToCurveSSWU(&nistWa, &c.b, &c.z, fe, c.field.Order())
return c.affineToPoint(x, y)
}

Expand Down

0 comments on commit b51f99f

Please sign in to comment.