summaryrefslogtreecommitdiffstats
path: root/ncr.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-27 16:43:11 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-27 16:43:11 +0200
commit9a2369d426b23f77884b01666370140d10b41c19 (patch)
tree075830ece81547905f07cf77a68fa4071bab1ef9 /ncr.h
parent3e9e7a872a76e085499b15089e16ad8c3a2d68fd (diff)
downloadcryptodev-linux-9a2369d426b23f77884b01666370140d10b41c19.tar.gz
cryptodev-linux-9a2369d426b23f77884b01666370140d10b41c19.tar.xz
cryptodev-linux-9a2369d426b23f77884b01666370140d10b41c19.zip
Implemented Diffie Hellman Key exchange.
Diffstat (limited to 'ncr.h')
-rw-r--r--ncr.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/ncr.h b/ncr.h
index 5d0f6b4..01fd413 100644
--- a/ncr.h
+++ b/ncr.h
@@ -7,9 +7,8 @@
#endif
#define NCR_CIPHER_MAX_BLOCK_LEN 32
-#define NCR_CIPHER_MAX_KEY_LEN 64
+#define NCR_CIPHER_MAX_KEY_LEN 512
#define NCR_HASH_MAX_OUTPUT_SIZE 64
-#define NCR_PK_MAX_OBJECT 640
typedef enum {
NCR_ALG_NONE,
@@ -132,8 +131,8 @@ struct ncr_key_params_st {
size_t iv_size;
} cipher;
struct {
- uint8_t peer_public[NCR_PK_MAX_OBJECT];
- size_t peer_public_size;
+ uint8_t __user *pub;
+ size_t pub_size;
} dh;
struct {
ncr_rsa_type_t type;
@@ -147,7 +146,13 @@ struct ncr_key_params_st {
} params;
};
+typedef enum {
+ NCR_DERIVE_DH=1,
+} ncr_derive_t;
+
struct ncr_key_derivation_params_st {
+ ncr_derive_t derive; /* the derivation algorithm */
+
ncr_key_t newkey;
unsigned int keyflags; /* for new key */