summaryrefslogtreecommitdiff
path: root/key.h
diff options
context:
space:
mode:
Diffstat (limited to 'key.h')
-rw-r--r--key.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/key.h b/key.h
index efa71176..6a049d27 100644
--- a/key.h
+++ b/key.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.h,v 1.39 2013/12/06 13:30:08 markus Exp $ */
+/* $OpenBSD: key.h,v 1.40 2013/12/06 13:39:49 markus Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -39,9 +39,11 @@ enum types {
KEY_RSA,
KEY_DSA,
KEY_ECDSA,
+ KEY_ED25519,
KEY_RSA_CERT,
KEY_DSA_CERT,
KEY_ECDSA_CERT,
+ KEY_ED25519_CERT,
KEY_RSA_CERT_V00,
KEY_DSA_CERT_V00,
KEY_UNSPEC
@@ -86,8 +88,13 @@ struct Key {
void *ecdsa;
#endif
struct KeyCert *cert;
+ u_char *ed25519_sk;
+ u_char *ed25519_pk;
};
+#define ED25519_SK_SZ crypto_sign_ed25519_SECRETKEYBYTES
+#define ED25519_PK_SZ crypto_sign_ed25519_PUBLICKEYBYTES
+
Key *key_new(int);
void key_add_private(Key *);
Key *key_new_private(int);
@@ -128,7 +135,7 @@ const EVP_MD *key_ec_nid_to_evpmd(int nid);
int key_ec_validate_public(const EC_GROUP *, const EC_POINT *);
int key_ec_validate_private(const EC_KEY *);
#endif
-char *key_alg_list(void);
+char *key_alg_list(int, int);
Key *key_from_blob(const u_char *, u_int);
int key_to_blob(const Key *, u_char **, u_int *);
@@ -145,6 +152,8 @@ int ssh_ecdsa_sign(const Key *, u_char **, u_int *, const u_char *, u_int);
int ssh_ecdsa_verify(const Key *, const u_char *, u_int, const u_char *, u_int);
int ssh_rsa_sign(const Key *, u_char **, u_int *, const u_char *, u_int);
int ssh_rsa_verify(const Key *, const u_char *, u_int, const u_char *, u_int);
+int ssh_ed25519_sign(const Key *, u_char **, u_int *, const u_char *, u_int);
+int ssh_ed25519_verify(const Key *, const u_char *, u_int, const u_char *, u_int);
#if defined(OPENSSL_HAS_ECC) && (defined(DEBUG_KEXECDH) || defined(DEBUG_PK))
void key_dump_ec_point(const EC_GROUP *, const EC_POINT *);