implement Zeroize where needed or skip where not needed (#301)
This commit is contained in:
parent
8f9b3e54c0
commit
850381fe24
|
@ -261,9 +261,11 @@ pub struct VerifiableSecretSharingCommitment<C: Ciphersuite>(
|
|||
#[derive(Clone, Zeroize)]
|
||||
pub struct SecretShare<C: Ciphersuite> {
|
||||
/// The participant identifier of this [`SecretShare`].
|
||||
#[zeroize(skip)]
|
||||
pub identifier: Identifier<C>,
|
||||
/// Secret Key.
|
||||
pub value: SigningShare<C>,
|
||||
#[zeroize(skip)]
|
||||
/// The commitments to be distributed among signers.
|
||||
pub commitment: VerifiableSecretSharingCommitment<C>,
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::{frost, Ciphersuite, Element, Error, Field, Group, Scalar};
|
|||
use super::{keys::SigningShare, Identifier};
|
||||
|
||||
/// A scalar that is a signing nonce.
|
||||
#[derive(Clone, PartialEq, Eq, Zeroize)]
|
||||
#[derive(Clone, PartialEq, Eq)]
|
||||
pub struct Nonce<C: Ciphersuite>(pub(super) Scalar<C>);
|
||||
|
||||
impl<C> Nonce<C>
|
||||
|
@ -71,6 +71,15 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<C> Zeroize for Nonce<C>
|
||||
where
|
||||
C: Ciphersuite,
|
||||
{
|
||||
fn zeroize(&mut self) {
|
||||
*self = Nonce(<<C::Group as Group>::Field>::zero());
|
||||
}
|
||||
}
|
||||
|
||||
// impl<C> Drop for Nonce<C>
|
||||
// where
|
||||
// C: Ciphersuite,
|
||||
|
|
Loading…
Reference in New Issue