File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
prover/zkevm/prover/hash/keccak/base_conversion Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ func makeTestCaseBaseConversionOutput() (
53
53
}
54
54
return define , prover
55
55
}
56
+
56
57
func TestBaseConversionOutput (t * testing.T ) {
57
58
define , prover := makeTestCaseBaseConversionOutput ()
58
59
comp := wizard .Compile (define , dummy .Compile )
@@ -73,18 +74,15 @@ func (b *hashBaseConversion) assignInputs(run *wizard.ProverRuntime) {
73
74
sliceLoB [j ] = common .NewVectorBuilder (b .Inputs .LimbsLoB [j ])
74
75
}
75
76
77
+ // #nosec G404 -- we don't need a cryptographic PRNG for testing purposes
78
+ rng := rand .New (utils .NewRandSource (678988 ))
79
+
76
80
max := keccakf .BaseBPow4
77
81
for j := range sliceHiB {
78
82
for row := 0 ; row < size ; row ++ {
79
83
// generate a random value in baseB
80
- // #nosec G404 -- we don't need a cryptographic PRNG for testing purposes
81
- rng := rand .New (utils .NewRandSource (int64 (row * j )))
82
- // #nosec G404 -- we don't need a cryptographic PRNG for testing purposes
83
- rngm := rand .New (utils .NewRandSource (int64 ((row + 3 ) * j )))
84
- n := rng .IntN (max ) + 1
85
- m := rngm .IntN (max ) + 1
86
- sliceHiB [j ].PushInt (n )
87
- sliceLoB [j ].PushInt (m )
84
+ sliceHiB [j ].PushInt (rng .IntN (max ))
85
+ sliceLoB [j ].PushInt (rng .IntN (max ))
88
86
}
89
87
}
90
88
You can’t perform that action at this time.
0 commit comments