comparison signkey.h @ 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 06d52bcb8094
children ba6fc7afe1c5
comparison
equal deleted inserted replaced
1658:7402218141d4 1659:d32bcb5c557d
26 #define DROPBEAR_SIGNKEY_H_ 26 #define DROPBEAR_SIGNKEY_H_
27 27
28 #include "buffer.h" 28 #include "buffer.h"
29 #include "dss.h" 29 #include "dss.h"
30 #include "rsa.h" 30 #include "rsa.h"
31 #include "ed25519.h"
31 32
32 enum signkey_type { 33 enum signkey_type {
33 #if DROPBEAR_RSA 34 #if DROPBEAR_RSA
34 DROPBEAR_SIGNKEY_RSA, 35 DROPBEAR_SIGNKEY_RSA,
35 #endif 36 #endif
39 #if DROPBEAR_ECDSA 40 #if DROPBEAR_ECDSA
40 DROPBEAR_SIGNKEY_ECDSA_NISTP256, 41 DROPBEAR_SIGNKEY_ECDSA_NISTP256,
41 DROPBEAR_SIGNKEY_ECDSA_NISTP384, 42 DROPBEAR_SIGNKEY_ECDSA_NISTP384,
42 DROPBEAR_SIGNKEY_ECDSA_NISTP521, 43 DROPBEAR_SIGNKEY_ECDSA_NISTP521,
43 #endif /* DROPBEAR_ECDSA */ 44 #endif /* DROPBEAR_ECDSA */
45 #if DROPBEAR_ED25519
46 DROPBEAR_SIGNKEY_ED25519,
47 #endif
44 DROPBEAR_SIGNKEY_NUM_NAMED, 48 DROPBEAR_SIGNKEY_NUM_NAMED,
45 DROPBEAR_SIGNKEY_ECDSA_KEYGEN = 70, /* just "ecdsa" for keygen */ 49 DROPBEAR_SIGNKEY_ECDSA_KEYGEN = 70, /* just "ecdsa" for keygen */
46 DROPBEAR_SIGNKEY_ANY = 80, 50 DROPBEAR_SIGNKEY_ANY = 80,
47 DROPBEAR_SIGNKEY_NONE = 90, 51 DROPBEAR_SIGNKEY_NONE = 90,
48 }; 52 };
76 #endif 80 #endif
77 #if DROPBEAR_ECC_521 81 #if DROPBEAR_ECC_521
78 ecc_key * ecckey521; 82 ecc_key * ecckey521;
79 #endif 83 #endif
80 #endif 84 #endif
85 #if DROPBEAR_ED25519
86 dropbear_ed25519_key * ed25519key;
87 #endif
81 }; 88 };
82 89
83 typedef struct SIGN_key sign_key; 90 typedef struct SIGN_key sign_key;
84 91
85 sign_key * new_sign_key(void); 92 sign_key * new_sign_key(void);