From 9ada5d32c9c675a225a83eb2ab855d97de503725 Mon Sep 17 00:00:00 2001 From: davidsemakula Date: Mon, 16 Oct 2023 11:01:42 +0300 Subject: [PATCH] zerorize zk proof secrets --- multi-party-ecdsa/src/utilities/zk_composite_dlog.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multi-party-ecdsa/src/utilities/zk_composite_dlog.rs b/multi-party-ecdsa/src/utilities/zk_composite_dlog.rs index 3725497..f69f39a 100644 --- a/multi-party-ecdsa/src/utilities/zk_composite_dlog.rs +++ b/multi-party-ecdsa/src/utilities/zk_composite_dlog.rs @@ -21,6 +21,7 @@ use merlin::Transcript; use serde::{Deserialize, Serialize}; use serde_repr::{Deserialize_repr, Serialize_repr}; use serde_with::serde_as; +use zeroize::ZeroizeOnDrop; /// Statistical security parameter (i.e. m=80 in CGGMP20). const STAT_SECURITY: usize = 80; @@ -32,7 +33,7 @@ pub struct CompositeDLogStatement { pub value: BigInt, } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize, ZeroizeOnDrop)] pub struct CompositeDLogWitness { pub exponent: BigInt, pub totient: BigInt,