comparison fuzz-common.c @ 1659:d32bcb5c557d

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
author Vladislav Grishenko <themiron@users.noreply.github.com>
date Wed, 11 Mar 2020 21:09:45 +0500
parents 35af85194268
children 1051e4eea25a
comparison
equal deleted inserted replaced
1658:7402218141d4 1659:d32bcb5c557d
110 type = DROPBEAR_SIGNKEY_ECDSA_NISTP256; 110 type = DROPBEAR_SIGNKEY_ECDSA_NISTP256;
111 if (buf_get_priv_key(b, svr_opts.hostkey, &type) == DROPBEAR_FAILURE) { 111 if (buf_get_priv_key(b, svr_opts.hostkey, &type) == DROPBEAR_FAILURE) {
112 dropbear_exit("failed fixed ecdsa hostkey"); 112 dropbear_exit("failed fixed ecdsa hostkey");
113 } 113 }
114 114
115 buf_setlen(b, 0);
116 buf_putbytes(b, keyed25519, keyed25519_len);
117 buf_setpos(b, 0);
118 type = DROPBEAR_SIGNKEY_ED25519;
119 if (buf_get_priv_key(b, svr_opts.hostkey, &type) == DROPBEAR_FAILURE) {
120 dropbear_exit("failed fixed ed25519 hostkey");
121 }
122
115 buf_free(b); 123 buf_free(b);
116 } 124 }
117 125
118 void fuzz_kex_fakealgos(void) { 126 void fuzz_kex_fakealgos(void) {
119 ses.newkeys->recv.crypt_mode = &dropbear_mode_none; 127 ses.newkeys->recv.crypt_mode = &dropbear_mode_none;