Cache fewer pedersen hash generators.
This commit is contained in:
parent
7a9879eb54
commit
63c6830429
|
@ -149,7 +149,7 @@ mod test {
|
|||
let mut rng = XorShiftRng::from_seed([0x3dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
|
||||
let params = &JubjubBls12::new();
|
||||
|
||||
for length in 1..1000 {
|
||||
for length in 0..751 {
|
||||
for _ in 0..5 {
|
||||
let mut input: Vec<bool> = (0..length).map(|_| rng.gen()).collect();
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ impl JubjubBls12 {
|
|||
let mut cur = 0;
|
||||
let mut pedersen_hash_generators = vec![];
|
||||
|
||||
while pedersen_hash_generators.len() < 10 {
|
||||
while pedersen_hash_generators.len() < 5 {
|
||||
let gh = group_hash(&[cur], ::PEDERSEN_HASH_GENERATORS_PERSONALIZATION, &tmp);
|
||||
// We don't want to overflow and start reusing generators
|
||||
assert!(cur != u8::max_value());
|
||||
|
|
Loading…
Reference in New Issue