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 /svr-kex.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 'svr-kex.c')
-rw-r--r-- | svr-kex.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -123,6 +123,11 @@ static void svr_ensure_hostkey() { fn = ECDSA_PRIV_FILENAME; break; #endif +#if DROPBEAR_ED25519 + case DROPBEAR_SIGNKEY_ED25519: + fn = ED25519_PRIV_FILENAME; + break; +#endif default: dropbear_assert(0); } @@ -219,7 +224,8 @@ static void send_msg_kexdh_reply(mp_int *dh_e, buffer *ecdh_qs) { { struct kex_curve25519_param *param = gen_kexcurve25519_param(); kexcurve25519_comb_key(param, ecdh_qs, svr_opts.hostkey); - buf_putstring(ses.writepayload, (const char*)param->pub, CURVE25519_LEN); + + buf_putstring(ses.writepayload, param->pub, CURVE25519_LEN); free_kexcurve25519_param(param); } break; |