Skip to content

Commit

Permalink
KVAC integration in proof system
Browse files Browse the repository at this point in the history
Signed-off-by: lovesh <[email protected]>
  • Loading branch information
lovesh committed Feb 15, 2024
1 parent 413b52d commit 9e075a1
Show file tree
Hide file tree
Showing 80 changed files with 2,784 additions and 1,070 deletions.
15 changes: 3 additions & 12 deletions bbs_plus/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,25 +394,16 @@ macro_rules! impl_keypair {
CanonicalDeserialize,
Serialize,
Deserialize,
Zeroize,
ZeroizeOnDrop,
)]
#[serde(bound = "")]
pub struct $name<E: Pairing> {
pub secret_key: SecretKey<E::ScalarField>,
#[zeroize(skip)]
pub public_key: $pk<E>,
}

impl<E: Pairing> Zeroize for $name<E> {
fn zeroize(&mut self) {
self.secret_key.zeroize();
}
}

impl<E: Pairing> Drop for $name<E> {
fn drop(&mut self) {
self.zeroize();
}
}

/// Create a secret key and corresponding public key
impl<E: Pairing> $name<E> {
impl_keypair_generation!(
Expand Down
1 change: 1 addition & 0 deletions kvac/src/bddt_2016/proof_cdh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ pub struct PoKOfMACProtocol<G: AffineRepr> {
#[derive(
Clone, PartialEq, Eq, Debug, CanonicalSerialize, CanonicalDeserialize, Serialize, Deserialize,
)]
#[serde(bound = "")]
pub struct PoKOfMAC<G: AffineRepr> {
#[serde_as(as = "ArkObjectBytes")]
pub B_0: G,
Expand Down
Loading

0 comments on commit 9e075a1

Please sign in to comment.