SSL/TLS Library
CyaSSL is SSL/TLS library for embedded systems.
cyassl/openssl/dh.h@0:9d17e4342598, 2014-04-20 (annotated)
- Committer:
- wolfSSL
- Date:
- Sun Apr 20 12:40:57 2014 +0000
- Revision:
- 0:9d17e4342598
CyaSSL SSL/TLS Library 2.9.4;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wolfSSL | 0:9d17e4342598 | 1 | /* dh.h for openSSL */ |
wolfSSL | 0:9d17e4342598 | 2 | |
wolfSSL | 0:9d17e4342598 | 3 | |
wolfSSL | 0:9d17e4342598 | 4 | #ifndef CYASSL_DH_H_ |
wolfSSL | 0:9d17e4342598 | 5 | #define CYASSL_DH_H_ |
wolfSSL | 0:9d17e4342598 | 6 | |
wolfSSL | 0:9d17e4342598 | 7 | |
wolfSSL | 0:9d17e4342598 | 8 | #include <cyassl/openssl/ssl.h> |
wolfSSL | 0:9d17e4342598 | 9 | #include <cyassl/openssl/bn.h> |
wolfSSL | 0:9d17e4342598 | 10 | |
wolfSSL | 0:9d17e4342598 | 11 | |
wolfSSL | 0:9d17e4342598 | 12 | #ifdef __cplusplus |
wolfSSL | 0:9d17e4342598 | 13 | extern "C" { |
wolfSSL | 0:9d17e4342598 | 14 | #endif |
wolfSSL | 0:9d17e4342598 | 15 | |
wolfSSL | 0:9d17e4342598 | 16 | |
wolfSSL | 0:9d17e4342598 | 17 | |
wolfSSL | 0:9d17e4342598 | 18 | |
wolfSSL | 0:9d17e4342598 | 19 | typedef struct CYASSL_DH { |
wolfSSL | 0:9d17e4342598 | 20 | CYASSL_BIGNUM* p; |
wolfSSL | 0:9d17e4342598 | 21 | CYASSL_BIGNUM* g; |
wolfSSL | 0:9d17e4342598 | 22 | CYASSL_BIGNUM* pub_key; /* openssh deference g^x */ |
wolfSSL | 0:9d17e4342598 | 23 | CYASSL_BIGNUM* priv_key; /* openssh deference x */ |
wolfSSL | 0:9d17e4342598 | 24 | void* internal; /* our DH */ |
wolfSSL | 0:9d17e4342598 | 25 | char inSet; /* internal set from external ? */ |
wolfSSL | 0:9d17e4342598 | 26 | char exSet; /* external set from internal ? */ |
wolfSSL | 0:9d17e4342598 | 27 | } CYASSL_DH; |
wolfSSL | 0:9d17e4342598 | 28 | |
wolfSSL | 0:9d17e4342598 | 29 | |
wolfSSL | 0:9d17e4342598 | 30 | CYASSL_API CYASSL_DH* CyaSSL_DH_new(void); |
wolfSSL | 0:9d17e4342598 | 31 | CYASSL_API void CyaSSL_DH_free(CYASSL_DH*); |
wolfSSL | 0:9d17e4342598 | 32 | |
wolfSSL | 0:9d17e4342598 | 33 | CYASSL_API int CyaSSL_DH_size(CYASSL_DH*); |
wolfSSL | 0:9d17e4342598 | 34 | CYASSL_API int CyaSSL_DH_generate_key(CYASSL_DH*); |
wolfSSL | 0:9d17e4342598 | 35 | CYASSL_API int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* pub, |
wolfSSL | 0:9d17e4342598 | 36 | CYASSL_DH*); |
wolfSSL | 0:9d17e4342598 | 37 | |
wolfSSL | 0:9d17e4342598 | 38 | typedef CYASSL_DH DH; |
wolfSSL | 0:9d17e4342598 | 39 | |
wolfSSL | 0:9d17e4342598 | 40 | #define DH_new CyaSSL_DH_new |
wolfSSL | 0:9d17e4342598 | 41 | #define DH_free CyaSSL_DH_free |
wolfSSL | 0:9d17e4342598 | 42 | |
wolfSSL | 0:9d17e4342598 | 43 | #define DH_size CyaSSL_DH_size |
wolfSSL | 0:9d17e4342598 | 44 | #define DH_generate_key CyaSSL_DH_generate_key |
wolfSSL | 0:9d17e4342598 | 45 | #define DH_compute_key CyaSSL_DH_compute_key |
wolfSSL | 0:9d17e4342598 | 46 | |
wolfSSL | 0:9d17e4342598 | 47 | |
wolfSSL | 0:9d17e4342598 | 48 | #ifdef __cplusplus |
wolfSSL | 0:9d17e4342598 | 49 | } /* extern "C" */ |
wolfSSL | 0:9d17e4342598 | 50 | #endif |
wolfSSL | 0:9d17e4342598 | 51 | |
wolfSSL | 0:9d17e4342598 | 52 | #endif /* header */ |