Skip to content

Commit b4e7f08

Browse files
authored
feat(keys): make seed public also (#17)
1 parent d78141d commit b4e7f08

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/keys.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub const PK_SIZE: usize = 32;
99

1010
#[derive(Clone)]
1111
pub struct Key<PRFH: Hasher + Clone, MSGH: Hasher + Clone> {
12+
pub seed: [u8; SEED_SIZE],
1213
pub p_seed: [u8; SEED_SIZE],
1314
pub chains: Option<Vec<Vec<u8>>>,
1415
pub secret_key: Vec<u8>,
@@ -31,6 +32,7 @@ impl<PRFH: Hasher + Clone, MSGH: Hasher + Clone> Key<PRFH, MSGH> {
3132
let sk = calculate_secret_key::<PRFH, MSGH>(&params, &seed);
3233
let public_key = calculate_public_key(&params, &p_seed, &sk)?;
3334
Ok(Key::<PRFH, MSGH> {
35+
seed,
3436
p_seed,
3537
chains: None,
3638
secret_key: sk,

0 commit comments

Comments
 (0)