diff options
author | Jack Lloyd <[email protected]> | 2019-05-13 12:34:54 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-05-13 12:34:54 -0400 |
commit | e390adcd594621d846bf82eb6799e7cb15421d45 (patch) | |
tree | e100f16a5e31021f0c544a81f3f12a5c0bc54eb4 /src/lib | |
parent | 10630cc22a9665e5dc755dd63d9868e9cd9d30d9 (diff) |
Fix param names to match RFC
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 | 48 |
2 files changed, 25 insertions, 25 deletions
diff --git a/src/lib/pubkey/pk_algs.cpp b/src/lib/pubkey/pk_algs.cpp index e1ae18cb1..db4638fe1 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_10_512" : 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 f7d0f98ef..933072da6 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; @@ -170,7 +170,7 @@ XMSS_Parameters::XMSS_Parameters(xmss_algorithm_t oid) m_w = 16; m_len = 131; m_tree_height = 20; - m_name = "XMSS_SHAKE_20_512"; + m_name = "XMSS-SHAKE_20_512"; m_hash_name = "SHAKE-256(512)"; m_strength = 512; m_wots_oid = XMSS_WOTS_Parameters::ots_algorithm_t::WOTSP_SHAKE_512; |