|
@@ -948,8 +948,10 @@ int xmssmt_sign(unsigned char *sk, bds_state *states, unsigned char *wots_sigs, |
|
|
|
|
|
|
|
|
SET_LAYER_ADDRESS(addr, 0); |
|
|
SET_LAYER_ADDRESS(addr, 0); |
|
|
SET_TREE_ADDRESS(addr, (idx_tree + 1)); |
|
|
SET_TREE_ADDRESS(addr, (idx_tree + 1)); |
|
|
// mandatory update for NEXT_0 (does not count towards h-k/2) |
|
|
|
|
|
bds_state_update(&states[params->d], sk_seed, &(params->xmss_par), pub_seed, addr); |
|
|
|
|
|
|
|
|
// mandatory update for NEXT_0 (does not count towards h-k/2) if NEXT_0 exists |
|
|
|
|
|
if ((1 + idx_tree) * (1 << tree_h) + idx_leaf < (1UL << h)) { |
|
|
|
|
|
bds_state_update(&states[params->d], sk_seed, &(params->xmss_par), pub_seed, addr); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
for (i = 0; i < params->d; i++) { |
|
|
for (i = 0; i < params->d; i++) { |
|
|
// check if we're not at the end of a tree |
|
|
// check if we're not at the end of a tree |
|
|