Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/poly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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: {:?} }}",
Expand Down