Skip to content

Commit

Permalink
chore: use *big.Int (convention)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivokub committed Sep 27, 2023
1 parent 045e256 commit f6e00f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/generator/ecdsa/template/marshal.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (sig *Signature) SetBytes(buf []byte) (int, error) {
// S, R < R_mod (to avoid malleability)
frMod := fr.Modulus()
zero := big.NewInt(0)
var bufBigInt big.Int
bufBigInt := new(big.Int)
bufBigInt.SetBytes(buf[:sizeFr])
if bufBigInt.Cmp(zero) == 0 {
return 0, ErrZero
Expand Down
2 changes: 1 addition & 1 deletion internal/generator/edwards/eddsa/template/marshal.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (sig *Signature) SetBytes(buf []byte) (int, error) {
// P_mod = field of def of the twisted Edwards = Fr snark field
fpMod := fr.Modulus()
zero := big.NewInt(0)
var bufBigInt big.Int
bufBigInt := new(big.Int)
bufCopy := make([]byte, fr.Bytes)
for i := 0; i < sizeFr; i++ {
bufCopy[sizeFr-1-i] = buf[i]
Expand Down

0 comments on commit f6e00f8

Please sign in to comment.