Add some personalization and a generator.

This commit is contained in:
Sean Bowe 2018-02-22 07:29:55 -07:00
parent 1a89b3a486
commit 4b6623cf44
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
2 changed files with 6 additions and 2 deletions

View File

@ -13,7 +13,8 @@ use super::lookup::*;
// TODO: ensure these match the spec
pub enum Personalization {
NoteCommitment,
AnotherPersonalization
AnotherPersonalization,
MerkleTree(usize)
}
impl Personalization {
@ -30,6 +31,8 @@ impl Personalization {
vec![false, false, false, false, false, false],
Personalization::AnotherPersonalization =>
vec![false, false, false, false, false, true],
Personalization::MerkleTree(_) =>
vec![false, false, false, false, true, false],
}
}
}

View File

@ -71,7 +71,8 @@ pub enum FixedGenerators {
ProvingPublicKey = 1,
ValueCommitmentValue = 2,
ValueCommitmentRandomness = 3,
Max = 4
NullifierPosition = 4,
Max = 5
}
pub struct JubjubBls12 {