Skip to content

Commit

Permalink
Fix utils/CheckBigIntInField (#67)
Browse files Browse the repository at this point in the history
Co-authored-by: 숭구리당당 <[email protected]>
  • Loading branch information
soon-haari and 숭구리당당 authored Nov 28, 2024
1 parent d59dca8 commit 625bf56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func HexDecodeInto(dst, h []byte) error {

// CheckBigIntInField checks if given *big.Int fits in a Field Q element
func CheckBigIntInField(a *big.Int) bool {
return a.Cmp(constants.Q) == -1
return (a.Cmp(constants.Q) == -1) && (a.Cmp(constants.Zero) != -1)
}

// CheckBigIntArrayInField checks if given *big.Int fits in a Field Q element
Expand Down

0 comments on commit 625bf56

Please sign in to comment.