Skip to content

Commit

Permalink
Fix compile errors caused by sync
Browse files Browse the repository at this point in the history
  • Loading branch information
sfluhrer committed Dec 14, 2022
1 parent 333cecd commit 73310fd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion hss.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ struct hss_working_key *hss_load_private_key(
* we don't need to store it in our private key; we can recompute them
*/
bool hss_generate_root_seed_I_value(unsigned char *seed, unsigned char *I,
const unsigned char *master_seed) {
const unsigned char *master_seed,
param_set_t lm, param_set_t ots) {
#if SECRET_METHOD == 2
size_t seed_len = hss_seed_size(lm);
/* In ACVP mode, we use the master seed as the source for both the */
Expand Down
9 changes: 5 additions & 4 deletions hss_generate.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ bool hss_generate_working_key(
if (i == 0) {
/* The root seed, I value is derived from the secret key */
hss_generate_root_seed_I_value( tree->seed, tree->I,
private_key+PRIVATE_KEY_SEED );
private_key+PRIVATE_KEY_SEED,
tree->lm_type, tree->lm_ots_type );
/* We don't use the I_next value */
} else {
/* The seed, I is derived from the parent's values */
Expand All @@ -363,7 +364,7 @@ bool hss_generate_working_key(
parent->seed, len_parent_seed,
parent->I, len_child_seed,
index, parent->lm_type,
parent->lm_ots_type ) {
parent->lm_ots_type )) {
info->error_code = hss_error_internal;
goto failed;
}
Expand All @@ -375,7 +376,7 @@ bool hss_generate_working_key(
parent->seed_next, len_parent_seed,
parent->I_next, len_child_seed,
0, parent->lm_type,
parent->lm_ots_type) {
parent->lm_ots_type)) {
info->error_code = hss_error_internal;
goto failed;
}
Expand All @@ -385,7 +386,7 @@ bool hss_generate_working_key(
parent->seed, len_parent_seed,
parent->I, len_child_seed,
index+1, parent->lm_type,
parent->lm_ots_type) {
parent->lm_ots_type)) {
info->error_code = hss_error_internal;
goto failed;
}
Expand Down
3 changes: 2 additions & 1 deletion hss_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ int get_level0_lm_hash_len( const unsigned char *private_key );
/* private seed). We do this (rather than selecting them at random) so */
/* that we don't need to store them in our private key; we can recompute */
bool hss_generate_root_seed_I_value(unsigned char *seed, unsigned char *I,
const unsigned char *master_seed);
const unsigned char *master_seed,
param_set_t lm, param_set_t ots);

/* Internal function to generate the seed, I value for a child Merkle tree */
/* (based on the seed, I value of the parent. We do this (rather than */
Expand Down
4 changes: 2 additions & 2 deletions hss_sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ bool hss_generate_signature(
parent->seed_next, parent_seed_len,
parent->I_next, child_seed_len, 0,
parent->lm_type,
parent->lm_ots_type) {
parent->lm_ots_type)) {
info->error_code = hss_error_internal;
goto failed;
}
Expand All @@ -694,7 +694,7 @@ bool hss_generate_signature(
parent->seed, parent_seed_len,
parent->I, child_seed_len, index+1,
parent->lm_type,
parent->lm_ots_type) {
parent->lm_ots_type)) {
info->error_code = hss_error_internal;
goto failed;
}
Expand Down

0 comments on commit 73310fd

Please sign in to comment.