Change group_hash to output points in the twisted Edwards form.

This commit is contained in:
Sean Bowe
2018-01-29 08:56:58 -07:00
parent 55598e4d4f
commit f00e8a8292
2 changed files with 9 additions and 7 deletions
+3 -1
View File
@@ -110,10 +110,12 @@ impl JubjubBls12 {
while pedersen_hash_generators.len() < 10 {
let gh = group_hash(&[cur], &tmp);
// We don't want to overflow and start reusing generators
assert!(cur != u8::max_value());
cur += 1;
if let Some(gh) = gh {
pedersen_hash_generators.push(edwards::Point::from_montgomery(&gh, &tmp));
pedersen_hash_generators.push(gh);
}
}