add babyjub-eddsa Poseidon sign & verify

This commit is contained in:
arnaucube
2019-08-29 17:52:30 +02:00
parent c4b3b7a09c
commit 0bac1c84ba
3 changed files with 91 additions and 8 deletions

View File

@@ -171,10 +171,7 @@ func PackPoint(ay *big.Int, sign bool) [32]byte {
// Compress the point into a 32 byte array that contains the y coordinate in
// little endian and the sign of the x coordinate.
func (p *Point) Compress() [32]byte {
sign := false
if PointCoordSign(p.X) {
sign = true
}
sign := PointCoordSign(p.X)
return PackPoint(p.Y, sign)
}