aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/xmss/xmss_signature.h
diff options
context:
space:
mode:
authorMatthias Gierlings <[email protected]>2018-04-12 00:00:43 +0200
committerMatthias Gierlings <[email protected]>2018-04-12 21:42:45 +0200
commit03f46b98d57befa06a1c71190ec0b98ef21919ac (patch)
tree3f8eefdac505c1f19b0f111087c2fe0cf994add1 /src/lib/pubkey/xmss/xmss_signature.h
parent87c697920206ac7ab0f757d3ec0c5550defd2517 (diff)
Adds missing XMSS signature length check.
- Fixes out of bounds read in `XMSS_Signature` constructor when the raw signature data supplied as arguments is shorter than the signature size defined by the XMSS parameter set encoded in the `XMSS_PublicKey`. - Fixes valid signatures with arbitrary appended data to be verified as correct signature.
Diffstat (limited to 'src/lib/pubkey/xmss/xmss_signature.h')
-rw-r--r--src/lib/pubkey/xmss/xmss_signature.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pubkey/xmss/xmss_signature.h b/src/lib/pubkey/xmss/xmss_signature.h
index 838aae2e8..25e168fd8 100644
--- a/src/lib/pubkey/xmss/xmss_signature.h
+++ b/src/lib/pubkey/xmss/xmss_signature.h
@@ -117,7 +117,7 @@ class XMSS_Signature final
secure_vector<uint8_t> bytes() const;
private:
- size_t m_leaf_idx;
+ uint64_t m_leaf_idx;
secure_vector<uint8_t> m_randomness;
XMSS_WOTS_PublicKey::TreeSignature m_tree_sig;
};