瀏覽代碼

Do not perform bds_round for the last leaf

master
Joost Rijneveld 9 年之前
父節點
當前提交
f5a5231c72
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      xmss_fast.c

+ 4
- 1
xmss_fast.c 查看文件

@@ -690,7 +690,10 @@ int xmss_sign(unsigned char *sk, bds_state *state, unsigned char *sig_msg, unsig
// the auth path was already computed during the previous round
memcpy(sig_msg, state->auth, h*n);

bds_round(state, idx, sk_seed, params, (h - k) >> 1, pub_seed, ots_addr);
if (idx < (1 << h) - 1) {
bds_round(state, idx, sk_seed, params, (h - k) >> 1, pub_seed, ots_addr);
}

sig_msg += params->h*n;
*sig_msg_len += params->h*n;


Loading…
取消
儲存