Skip to content

Commit f6e00f8

Browse files
committed
chore: use *big.Int (convention)
1 parent 045e256 commit f6e00f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/generator/ecdsa/template/marshal.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (sig *Signature) SetBytes(buf []byte) (int, error) {
136136
// S, R < R_mod (to avoid malleability)
137137
frMod := fr.Modulus()
138138
zero := big.NewInt(0)
139-
var bufBigInt big.Int
139+
bufBigInt := new(big.Int)
140140
bufBigInt.SetBytes(buf[:sizeFr])
141141
if bufBigInt.Cmp(zero) == 0 {
142142
return 0, ErrZero

internal/generator/edwards/eddsa/template/marshal.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (sig *Signature) SetBytes(buf []byte) (int, error) {
119119
// P_mod = field of def of the twisted Edwards = Fr snark field
120120
fpMod := fr.Modulus()
121121
zero := big.NewInt(0)
122-
var bufBigInt big.Int
122+
bufBigInt := new(big.Int)
123123
bufCopy := make([]byte, fr.Bytes)
124124
for i := 0; i < sizeFr; i++ {
125125
bufCopy[sizeFr-1-i] = buf[i]

0 commit comments

Comments
 (0)