From 7c1914a4662e8802aaa1d333bf5e5ad819b65b05 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 10 Oct 2016 08:03:33 -0400 Subject: [PATCH] fix up key names --- README.md | 22 +++++++++++++--------- common/key.hpp | 9 +++------ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 637324f..e07f6e1 100644 --- a/README.md +++ b/README.md @@ -22,17 +22,21 @@ Make an destination key with a certain key type ./keygen privkey.dat +or -| key type | number | + ./keygen privkey.dat + + +| key name | number | | -------------------- | ------ | -| DSA SHA1 | 0 | -| ECDSA_SHA256_P256 | 1 | -| ECDSA_SHA384_P384 | 2 | -| ECDSA_SHA512_P521 | 3 | -| RSA_SHA256_2048 | 4 | -| RSA_SHA384_3072 | 5 | -| RSA_SHA512_4096 | 6 | -| EDDSA_SHA512_ED25519 | 7 | +| DSA-SHA1 | 0 | +| ECDSA-SHA256-P256 | 1 | +| ECDSA-SHA384-P384 | 2 | +| ECDSA-SHA512-P521 | 3 | +| RSA-SHA256-2048 | 4 | +| RSA-SHA384-3072 | 5 | +| RSA-SHA512-4096 | 6 | +| EDDSA-SHA512-ED25519 | 7 | diff --git a/common/key.hpp b/common/key.hpp index 859493a..d3358ad 100644 --- a/common/key.hpp +++ b/common/key.hpp @@ -55,14 +55,11 @@ uint16_t NameToSigType(const std::string & keyname) if(name.find("P384") != npos) return i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA384_P384; - if(name.find("RSA2048") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA256_2048; - if(name.find("RSA-2048") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA256_2048; + if(name.find("RSA-SHA265") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA256_2048; - if(name.find("RSA3072") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA384_3072; - if(name.find("RSA-3072") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA384_3072; + if(name.find("RSA-SHA384") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA384_3072; - if(name.find("RSA4096") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA512_4096; - if(name.find("RSA-4096") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA512_4096; + if(name.find("RSA-SHA512") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA512_4096; if(name.find("ED25519") != npos) return i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;