aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/xmss/xmss_privatekey.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/xmss/xmss_privatekey.cpp')
-rw-r--r--src/lib/pubkey/xmss/xmss_privatekey.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/pubkey/xmss/xmss_privatekey.cpp b/src/lib/pubkey/xmss/xmss_privatekey.cpp
index 37dbd61e3..426ebeb61 100644
--- a/src/lib/pubkey/xmss/xmss_privatekey.cpp
+++ b/src/lib/pubkey/xmss/xmss_privatekey.cpp
@@ -50,8 +50,7 @@ XMSS_PrivateKey::XMSS_PrivateKey(const secure_vector<uint8_t>& raw_key)
unused_leaf = ((unused_leaf << 8) | *i);
}
- if(unused_leaf >= (1ull << (XMSS_PublicKey::m_xmss_params.tree_height() -
- 1)))
+ if(unused_leaf >= (1ull << XMSS_PublicKey::m_xmss_params.tree_height()))
{
throw Integrity_Failure("XMSS private key leaf index out of "
"bounds.");