diff options
author | Jack Lloyd <[email protected]> | 2019-05-10 10:40:27 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-05-10 10:40:27 -0400 |
commit | 10630cc22a9665e5dc755dd63d9868e9cd9d30d9 (patch) | |
tree | 6347cfc7ed6839c956d1b0bc52290c696e669313 /src/lib | |
parent | 6bbccffa70ac2e7764c0ea8f0d7c87880b9dc109 (diff) |
Fix param names
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/pubkey/pk_algs.cpp | 2 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_parameters.cpp | 46 |
2 files changed, 24 insertions, 24 deletions
diff --git a/src/lib/pubkey/pk_algs.cpp b/src/lib/pubkey/pk_algs.cpp index 6d7de60ad..e1ae18cb1 100644 --- a/src/lib/pubkey/pk_algs.cpp +++ b/src/lib/pubkey/pk_algs.cpp @@ -318,7 +318,7 @@ create_private_key(const std::string& alg_name, if(alg_name == "XMSS") { return std::unique_ptr<Private_Key>( - new XMSS_PrivateKey(XMSS_Parameters(params.empty() ? "XMSS_SHA2-512_W16_H10" : params).oid(), rng)); + new XMSS_PrivateKey(XMSS_Parameters(params.empty() ? "XMSS_SHA2_10_512" : params).oid(), rng)); } #endif diff --git a/src/lib/pubkey/xmss/xmss_parameters.cpp b/src/lib/pubkey/xmss/xmss_parameters.cpp index ed29cdfbe..f7d0f98ef 100644 --- a/src/lib/pubkey/xmss/xmss_parameters.cpp +++ b/src/lib/pubkey/xmss/xmss_parameters.cpp @@ -18,29 +18,29 @@ namespace Botan { XMSS_Parameters::xmss_algorithm_t XMSS_Parameters::xmss_id_from_string(const std::string& param_set) { - if(param_set == "XMSS-SHA2_10_256") + if(param_set == "XMSS_SHA2_10_256") { return XMSS_SHA2_10_256; } - if(param_set == "XMSS-SHA2_16_256") + if(param_set == "XMSS_SHA2_16_256") { return XMSS_SHA2_16_256; } - if(param_set == "XMSS-SHA2_20_256") + if(param_set == "XMSS_SHA2_20_256") { return XMSS_SHA2_20_256; } - if(param_set == "XMSS-SHA2_10_512") + if(param_set == "XMSS_SHA2_10_512") { return XMSS_SHA2_10_512; } - if(param_set == "XMSS-SHA2_16_512") + if(param_set == "XMSS_SHA2_16_512") { return XMSS_SHA2_16_512; } - if(param_set == "XMSS-SHA2_20_512") + if(param_set == "XMSS_SHA2_20_512") { return XMSS_SHA2_20_512; } - if(param_set == "XMSS-SHAKE_10_256") + if(param_set == "XMSS_SHAKE_10_256") { return XMSS_SHAKE_10_256; } - if(param_set == "XMSS-SHAKE_10_256") + if(param_set == "XMSS_SHAKE_10_256") { return XMSS_SHAKE_16_256; } - if(param_set == "XMSS-SHAKE_20_256") + if(param_set == "XMSS_SHAKE_20_256") { return XMSS_SHAKE_20_256; } - if(param_set == "XMSS-SHAKE_10_512") + if(param_set == "XMSS_SHAKE_10_512") { return XMSS_SHAKE_10_512; } - if(param_set == "XMSS-SHAKE_16_512") + if(param_set == "XMSS_SHAKE_16_512") { return XMSS_SHAKE_16_512; } - if(param_set == "XMSS-SHAKE_20_512") + if(param_set == "XMSS_SHAKE_20_512") { return XMSS_SHAKE_20_512; } throw Lookup_Error("Unknown XMSS algorithm param '" + param_set + "'"); } @@ -60,7 +60,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 67; m_tree_height = 10; - m_name = "XMSS-SHA2_10_256"; + m_name = "XMSS_SHA2_10_256"; m_hash_name = "SHA-256"; m_strength = 256; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHA2_256; @@ -70,7 +70,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 67; m_tree_height = 16; - m_name = "XMSS-SHA2_16_256"; + m_name = "XMSS_SHA2_16_256"; m_hash_name = "SHA-256"; m_strength = 256; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHA2_256; @@ -80,7 +80,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 67; m_tree_height = 20; - m_name = "XMSS-SHA2_20_256"; + m_name = "XMSS_SHA2_20_256"; m_hash_name = "SHA-256"; m_strength = 256; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHA2_256; @@ -90,7 +90,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 131; m_tree_height = 10; - m_name = "XMSS-SHA2_10_512"; + m_name = "XMSS_SHA2_10_512"; m_hash_name = "SHA-512"; m_strength = 512; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHA2_512; @@ -100,7 +100,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 131; m_tree_height = 16; - m_name = "XMSS-SHA2_16_512"; + m_name = "XMSS_SHA2_16_512"; m_hash_name = "SHA-512"; m_strength = 512; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHA2_512; @@ -110,7 +110,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 131; m_tree_height = 20; - m_name = "XMSS-SHA2_20_512"; + m_name = "XMSS_SHA2_20_512"; m_hash_name = "SHA-512"; m_strength = 512; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHA2_512; @@ -120,7 +120,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 67; m_tree_height = 10; - m_name = "XMSS-SHAKE_10_256"; + m_name = "XMSS_SHAKE_10_256"; m_hash_name = "SHAKE-128(256)"; m_strength = 256; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHAKE_256; @@ -130,7 +130,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 67; m_tree_height = 16; - m_name = "XMSS-SHAKE_16_256"; + m_name = "XMSS_SHAKE_16_256"; m_hash_name = "SHAKE-128(256)"; m_strength = 256; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHAKE_256; @@ -140,7 +140,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 67; m_tree_height = 20; - m_name = "XMSS-SHAKE_20_256"; + m_name = "XMSS_SHAKE_20_256"; m_hash_name = "SHAKE-128(256)"; m_strength = 256; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHAKE_256; @@ -150,7 +150,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 131; m_tree_height = 10; - m_name = "XMSS-SHAKE_10_512"; + m_name = "XMSS_SHAKE_10_512"; m_hash_name = "SHAKE-256(512)"; m_strength = 512; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHAKE_512; @@ -160,7 +160,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 131; m_tree_height = 16; - m_name = "XMSS-SHAKE_16_512"; + m_name = "XMSS_SHAKE_16_512"; m_hash_name = "SHAKE-256(512)"; m_strength = 512; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHAKE_512; |