Skip to content

Commit

Permalink
sst/gen_key: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
aewag committed Sep 10, 2024
1 parent c27799b commit aa8c53d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sst/gen_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ pub fn prepare_sst_keygen<H: HashChain>(
&mut expanded_aux_data,
);

if let Some(expanded_aux_data) = expanded_aux_data.as_mut() {
hss_finalize_aux_data::<H>(expanded_aux_data, rfc_private_key.seed.as_slice());
}
hss_finalize_aux_data::<H>(
expanded_aux_data.as_mut().ok_or(Error::new())?,
rfc_private_key.seed.as_slice(),
);

let signing_key = SigningKey::from_bytes(&rfc_private_key.to_binary_representation())?;
Ok((signing_key, our_intermed_node_value))
Expand Down Expand Up @@ -196,9 +197,8 @@ mod tests {
)
.unwrap();

let mut interm_nodes =
ArrayVec::<[ArrayVec<[u8; MAX_HASH_SIZE]>; MAX_SSTS_SIGNING_ENTITIES]>::new();
let mut tmp_node = ArrayVec::<[u8; MAX_HASH_SIZE]>::new();
let mut interm_nodes = ArrayVec::<[Node; MAX_SSTS_SIGNING_ENTITIES]>::new();
let mut tmp_node = Node::new();
tmp_node.extend_from_slice(&interm_node);
for _ in 0..2usize.pow(L0_TOP_DIV) {
interm_nodes.push(tmp_node);
Expand Down

0 comments on commit aa8c53d

Please sign in to comment.