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;