diff options
author | Matthias Gierlings <[email protected]> | 2018-08-24 16:26:10 +0200 |
---|---|---|
committer | Matthias Gierlings <[email protected]> | 2018-08-24 16:26:10 +0200 |
commit | 88213d27a3601639d75cd977c0642f7ac19bd7cf (patch) | |
tree | 8e835a6eb7acceb097367ecbb80317a75fa942f3 /src | |
parent | 2de92b238374fd37ba5001aaabac68782bae77b1 (diff) |
Implements correct XMSS signature size calculation
Implements the correct signature size calculation for XMSS, required by #1641.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/pubkey/xmss/xmss_signature_operation.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/pubkey/xmss/xmss_signature_operation.cpp b/src/lib/pubkey/xmss/xmss_signature_operation.cpp index d6a57bb08..8c53cd924 100644 --- a/src/lib/pubkey/xmss/xmss_signature_operation.cpp +++ b/src/lib/pubkey/xmss/xmss_signature_operation.cpp @@ -54,8 +54,10 @@ XMSS_Signature_Operation::sign(const secure_vector<uint8_t>& msg_hash, size_t XMSS_Signature_Operation::signature_length() const { - // TODO bound this by the params - return 128*1024; + return sizeof(uint64_t) + // size of leaf index + m_xmss_params.element_size() + + m_xmss_params.len() * m_xmss_params.element_size() + + m_xmss_params.tree_height() * m_xmss_params.element_size(); } wots_keysig_t |