This is a port of cyaSSL 2.7.0.

Dependents:   CyaSSL_DTLS_Cellular CyaSSL_DTLS_Ethernet

Committer:
ashleymills
Date:
Thu Sep 05 10:33:04 2013 +0000
Revision:
0:714293de3836
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ashleymills 0:714293de3836 1 /* dh.h for openSSL */
ashleymills 0:714293de3836 2
ashleymills 0:714293de3836 3
ashleymills 0:714293de3836 4 #ifndef CYASSL_DH_H_
ashleymills 0:714293de3836 5 #define CYASSL_DH_H_
ashleymills 0:714293de3836 6
ashleymills 0:714293de3836 7
ashleymills 0:714293de3836 8 #include <cyassl/openssl/ssl.h>
ashleymills 0:714293de3836 9 #include <cyassl/openssl/bn.h>
ashleymills 0:714293de3836 10
ashleymills 0:714293de3836 11
ashleymills 0:714293de3836 12 #ifdef __cplusplus
ashleymills 0:714293de3836 13 extern "C" {
ashleymills 0:714293de3836 14 #endif
ashleymills 0:714293de3836 15
ashleymills 0:714293de3836 16
ashleymills 0:714293de3836 17
ashleymills 0:714293de3836 18
ashleymills 0:714293de3836 19 typedef struct CYASSL_DH {
ashleymills 0:714293de3836 20 CYASSL_BIGNUM* p;
ashleymills 0:714293de3836 21 CYASSL_BIGNUM* g;
ashleymills 0:714293de3836 22 CYASSL_BIGNUM* pub_key; /* openssh deference g^x */
ashleymills 0:714293de3836 23 CYASSL_BIGNUM* priv_key; /* openssh deference x */
ashleymills 0:714293de3836 24 void* internal; /* our DH */
ashleymills 0:714293de3836 25 char inSet; /* internal set from external ? */
ashleymills 0:714293de3836 26 char exSet; /* external set from internal ? */
ashleymills 0:714293de3836 27 } CYASSL_DH;
ashleymills 0:714293de3836 28
ashleymills 0:714293de3836 29
ashleymills 0:714293de3836 30 CYASSL_API CYASSL_DH* CyaSSL_DH_new(void);
ashleymills 0:714293de3836 31 CYASSL_API void CyaSSL_DH_free(CYASSL_DH*);
ashleymills 0:714293de3836 32
ashleymills 0:714293de3836 33 CYASSL_API int CyaSSL_DH_size(CYASSL_DH*);
ashleymills 0:714293de3836 34 CYASSL_API int CyaSSL_DH_generate_key(CYASSL_DH*);
ashleymills 0:714293de3836 35 CYASSL_API int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* pub,
ashleymills 0:714293de3836 36 CYASSL_DH*);
ashleymills 0:714293de3836 37
ashleymills 0:714293de3836 38 typedef CYASSL_DH DH;
ashleymills 0:714293de3836 39
ashleymills 0:714293de3836 40 #define DH_new CyaSSL_DH_new
ashleymills 0:714293de3836 41 #define DH_free CyaSSL_DH_free
ashleymills 0:714293de3836 42
ashleymills 0:714293de3836 43 #define DH_size CyaSSL_DH_size
ashleymills 0:714293de3836 44 #define DH_generate_key CyaSSL_DH_generate_key
ashleymills 0:714293de3836 45 #define DH_compute_key CyaSSL_DH_compute_key
ashleymills 0:714293de3836 46
ashleymills 0:714293de3836 47
ashleymills 0:714293de3836 48 #ifdef __cplusplus
ashleymills 0:714293de3836 49 } /* extern "C" */
ashleymills 0:714293de3836 50 #endif
ashleymills 0:714293de3836 51
ashleymills 0:714293de3836 52 #endif /* header */