summaryrefslogtreecommitdiff
path: root/lib/crypto-backend.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2013-11-28 13:41:21 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2013-11-28 14:23:15 +0100
commit5d8cb9bfb11d4eeeaf1e6a7fe783605b19dc1481 (patch)
tree353f4631fddaa421bfc43d1aad3e1503f4555fef /lib/crypto-backend.h
parent8f387eff4f3825cdf2ee5751747fc3072400342e (diff)
downloadgnutls-5d8cb9bfb11d4eeeaf1e6a7fe783605b19dc1481.tar.gz
DH key exchange uses the _gnutls_pk_derive and _gnutls_pk_generate_key functions.
This allows handling DH key generation in the crypto backend files.
Diffstat (limited to 'lib/crypto-backend.h')
-rw-r--r--lib/crypto-backend.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/crypto-backend.h b/lib/crypto-backend.h
index e273c0da32..a497f56146 100644
--- a/lib/crypto-backend.h
+++ b/lib/crypto-backend.h
@@ -196,6 +196,7 @@ void gnutls_pk_params_init(gnutls_pk_params_st * p);
/* parameters should not be larger than this limit */
#define DSA_PUBLIC_PARAMS 4
+#define DH_PUBLIC_PARAMS 4
#define RSA_PUBLIC_PARAMS 2
#define ECC_PUBLIC_PARAMS 2
@@ -204,6 +205,7 @@ void gnutls_pk_params_init(gnutls_pk_params_st * p);
/* parameters should not be larger than this limit */
#define DSA_PRIVATE_PARAMS 5
+#define DH_PRIVATE_PARAMS 5
#define RSA_PRIVATE_PARAMS 8
#define ECC_PRIVATE_PARAMS 3
@@ -241,6 +243,8 @@ void gnutls_pk_params_init(gnutls_pk_params_st * p);
* [3] is y (public key)
* [4] is x (private key only)
*
+ * DH: as DSA
+ *
* ECC:
* [0] is prime
* [1] is order
@@ -263,6 +267,12 @@ void gnutls_pk_params_init(gnutls_pk_params_st * p);
#define DSA_Y 3
#define DSA_X 4
+#define DH_P 0
+#define DH_Q 1
+#define DH_G 2
+#define DH_Y 3
+#define DH_X 4
+
#define RSA_MODULUS 0
#define RSA_PUB 1
#define RSA_PRIV 2