Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kanishkatn committed Nov 21, 2022
1 parent e854385 commit 65782e3
Show file tree
Hide file tree
Showing 12 changed files with 3,873 additions and 58 deletions.
15 changes: 0 additions & 15 deletions ed25519/lib/ed25519.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"github.com/bwesterb/go-ristretto/edwards25519"
"math/big"
"sync"

ed "filippo.io/edwards25519"
)

var ed25519Initonce sync.Once
Expand Down Expand Up @@ -173,16 +171,3 @@ func (curve *Ed25519Curve) Hash(msg []byte) (*big.Int, *big.Int) {
y.SetBytes(&yBytes)
return x.BigInt(), y.BigInt()
}

func bigInt2Ed25519Point(y *big.Int) (*ed.Point, error) {
b := y.Bytes()
var arr [32]byte
copy(arr[32-len(b):], b)
return ed.NewIdentityPoint().SetBytes(arr[:])
}

func bytesToPoint(b []byte) (*ed.Point, error) {
var arr [32]byte
copy(arr[:], b)
return ed.NewIdentityPoint().SetBytes(arr[:])
}
Loading

0 comments on commit 65782e3

Please sign in to comment.