Skip to content

Commit bf46b15

Browse files
authored
Merge pull request #128 from shutter-network/fix/buffer-too-small
Fix/buffer too small
2 parents 35ba8f6 + 94c72f5 commit bf46b15

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

shlib/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/ethereum/go-ethereum v1.13.4
77
github.com/google/go-cmp v0.6.0
88
github.com/pkg/errors v0.9.1
9-
github.com/supranational/blst v0.3.11
9+
github.com/supranational/blst v0.3.12
1010
golang.org/x/crypto v0.14.0
1111
gotest.tools v2.2.0+incompatible
1212
gotest.tools/v3 v3.5.1

shlib/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
4646
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
4747
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
4848
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
49-
github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4=
50-
github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
49+
github.com/supranational/blst v0.3.12 h1:Vfas2U2CFHhniv2QkUm2OVa1+pGTdqtpqm9NnhUUbZ8=
50+
github.com/supranational/blst v0.3.12/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
5151
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
5252
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
5353
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=

shlib/shcrypto/encryption_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ func makeKeys(t *testing.T) (*EonPublicKey, *EpochSecretKey, *EpochID) {
219219
eonSecretKey := big.NewInt(0)
220220
for i := 0; i < n; i++ {
221221
eonSecretKey.Add(eonSecretKey, ps[i].Eval(big.NewInt(0)))
222+
eonSecretKey.Mod(eonSecretKey, order)
222223

223224
ss := []*big.Int{}
224225
for j := 0; j < n; j++ {

shlib/shcrypto/keys_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ func TestEonPublicKeyMatchesSecretKey(t *testing.T) {
165165
esk := big.NewInt(0)
166166
for _, p := range []*Polynomial{p1, p2, p3} {
167167
esk = esk.Add(esk, p.Eval(big.NewInt(0)))
168+
esk = esk.Mod(esk, order)
168169
}
170+
169171
epkExp := generateP2(esk)
170172

171173
gammas := []*Gammas{p1.Gammas(), p2.Gammas(), p3.Gammas()}

0 commit comments

Comments
 (0)