From 3d12521735e7ef7e48be217af0f27d68e23050a7 Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Wed, 11 Mar 2020 21:09:45 +0500 Subject: 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 --- svr-kex.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'svr-kex.c') diff --git a/svr-kex.c b/svr-kex.c index 406ad97..af16d2f 100644 --- a/svr-kex.c +++ b/svr-kex.c @@ -122,6 +122,11 @@ static void svr_ensure_hostkey() { case DROPBEAR_SIGNKEY_ECDSA_NISTP521: 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; -- cgit v1.2.3