diff --git a/src/lib.rs b/src/lib.rs index e0ad902..0c5850c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -487,6 +487,7 @@ impl SecretKey { /// Generates a non-redacted debug string. This method differs from /// the `Debug` implementation in that it *does* leak the secret prime /// field element. + #[cfg(debug_assertions)] pub fn reveal(&self) -> String { let uncomp = self.public_key().0.into_affine().into_uncompressed(); let bytes = uncomp.as_ref(); @@ -580,6 +581,7 @@ impl SecretKeyShare { /// Generates a non-redacted debug string. This method differs from /// the `Debug` implementation in that it *does* leak the secret prime /// field element. + #[cfg(debug_assertions)] pub fn reveal(&self) -> String { let uncomp = self.0.public_key().0.into_affine().into_uncompressed(); let bytes = uncomp.as_ref(); diff --git a/src/poly.rs b/src/poly.rs index 5b63358..78e9f85 100644 --- a/src/poly.rs +++ b/src/poly.rs @@ -699,6 +699,7 @@ impl Poly { /// Generates a non-redacted debug string. This method differs from /// the `Debug` implementation in that it *does* leak the secret prime /// field elements. + #[cfg(debug_assertions)] pub fn reveal(&self) -> String { format!("Poly {{ coeff: {:?} }}", self.coeff) } @@ -982,6 +983,7 @@ impl BivarPoly { /// Generates a non-redacted debug string. This method differs from the /// `Debug` implementation in that it *does* leak the the struct's /// internal state. + #[cfg(debug_assertions)] pub fn reveal(&self) -> String { format!( "BivarPoly {{ degree: {}, coeff: {:?} }}",