forked from anoma/ferveo
-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
There's currently 2 versions of construct_tag_hash(), and on of them seems incorrect:
Lines 45 to 51 in 434fd5d
| fn construct_tag_hash(&self) -> Result<E::G2Affine> { | |
| let mut hash_input = Vec::<u8>::new(); | |
| self.commitment.serialize_compressed(&mut hash_input)?; | |
| hash_input.extend_from_slice(&self.ciphertext); | |
| hash_to_g2(&hash_input) | |
| } |
As you can see, the AAD is not there. It's also just used here:
Line 36 in 434fd5d
| let hash_g2 = E::G2Prepared::from(self.construct_tag_hash()?); |
This is part the function Ciphertext.check(), which is unused.
I propose removing both.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request