diff options
author | Vladislav Grishenko <themiron@users.noreply.github.com> | 2020-03-11 21:09:45 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-12 00:09:45 +0800 |
commit | 3d12521735e7ef7e48be217af0f27d68e23050a7 (patch) | |
tree | 5e6a8afcc2ff403d235f0157095db5b80aa173b3 /gensignkey.c | |
parent | b2007beeb0203c8f9f3d6d07329d0d1fceea91c7 (diff) |
Add Ed25519 support (#91)
* Add support for Ed25519 as a public key type
Ed25519 is a elliptic curve signature scheme that offers
better security than ECDSA and DSA and good performance. It may be
used for both user and host keys.
OpenSSH key import and fuzzer are not supported yet.
Initially inspired by Peter Szabo.
* Add curve25519 and ed25519 fuzzers
* Add import and export of Ed25519 keys
Diffstat (limited to 'gensignkey.c')
-rw-r--r-- | gensignkey.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gensignkey.c b/gensignkey.c index 34b6f5a..674d81f 100644 --- a/gensignkey.c +++ b/gensignkey.c @@ -4,6 +4,7 @@ #include "ecdsa.h" #include "genrsa.h" #include "gendss.h" +#include "gened25519.h" #include "signkey.h" #include "dbrandom.h" @@ -69,6 +70,10 @@ static int get_default_bits(enum signkey_type keytype) case DROPBEAR_SIGNKEY_ECDSA_NISTP256: return 256; #endif +#if DROPBEAR_ED25519 + case DROPBEAR_SIGNKEY_ED25519: + return 256; +#endif default: return 0; } @@ -119,6 +124,11 @@ int signkey_generate(enum signkey_type keytype, int bits, const char* filename, } break; #endif +#if DROPBEAR_ED25519 + case DROPBEAR_SIGNKEY_ED25519: + key->ed25519key = gen_ed25519_priv_key(bits); + break; +#endif default: dropbear_exit("Internal error"); } |