Skip to content

Commit

Permalink
export PH
Browse files Browse the repository at this point in the history
  • Loading branch information
eschorn1 committed Oct 1, 2024
1 parent da602ef commit 00f69a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ mod types;

/// All functionality is covered by traits, such that consumers can utilize trait objects as desired.
pub mod traits;
pub use crate::types::Ph;

// Applies across all security parameter sets
const Q: i32 = 8_380_417; // 2^23 - 2^13 + 1 = 0x7FE001; See https://oeis.org/A234388
Expand Down
5 changes: 5 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
use zeroize::{Zeroize, ZeroizeOnDrop};


/// Supported hash functions for `hash_sign()` and `hash_verify()` functions
pub enum Ph {
/// Use SHA256 as the pre-hash function
SHA256,
/// Use SHA512 as the pre-hash function
SHA512,
/// Use Shake128 as the pre-hash function
SHAKE128,
}


/// Correctly sized private key specific to the target security parameter set. <br>
/// Implements the [`crate::traits::Signer`] and [`crate::traits::SerDes`] trait.
#[derive(Clone, Zeroize, ZeroizeOnDrop)]
Expand Down

0 comments on commit 00f69a7

Please sign in to comment.