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 /* dsa.h for openSSL */
ashleymills 0:714293de3836 2
ashleymills 0:714293de3836 3
ashleymills 0:714293de3836 4 #ifndef CYASSL_DSA_H_
ashleymills 0:714293de3836 5 #define CYASSL_DSA_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 struct CYASSL_DSA {
ashleymills 0:714293de3836 19 CYASSL_BIGNUM* p;
ashleymills 0:714293de3836 20 CYASSL_BIGNUM* q;
ashleymills 0:714293de3836 21 CYASSL_BIGNUM* g;
ashleymills 0:714293de3836 22 CYASSL_BIGNUM* pub_key; /* our y */
ashleymills 0:714293de3836 23 CYASSL_BIGNUM* priv_key; /* our x */
ashleymills 0:714293de3836 24 void* internal; /* our Dsa Key */
ashleymills 0:714293de3836 25 char inSet; /* internal set from external ? */
ashleymills 0:714293de3836 26 char exSet; /* external set from internal ? */
ashleymills 0:714293de3836 27 };
ashleymills 0:714293de3836 28
ashleymills 0:714293de3836 29
ashleymills 0:714293de3836 30 CYASSL_API CYASSL_DSA* CyaSSL_DSA_new(void);
ashleymills 0:714293de3836 31 CYASSL_API void CyaSSL_DSA_free(CYASSL_DSA*);
ashleymills 0:714293de3836 32
ashleymills 0:714293de3836 33 CYASSL_API int CyaSSL_DSA_generate_key(CYASSL_DSA*);
ashleymills 0:714293de3836 34 CYASSL_API int CyaSSL_DSA_generate_parameters_ex(CYASSL_DSA*, int bits,
ashleymills 0:714293de3836 35 unsigned char* seed, int seedLen, int* counterRet,
ashleymills 0:714293de3836 36 unsigned long* hRet, void* cb);
ashleymills 0:714293de3836 37
ashleymills 0:714293de3836 38 CYASSL_API int CyaSSL_DSA_LoadDer(CYASSL_DSA*, const unsigned char*, int sz);
ashleymills 0:714293de3836 39 CYASSL_API int CyaSSL_DSA_do_sign(const unsigned char* d, unsigned char* sigRet,
ashleymills 0:714293de3836 40 CYASSL_DSA* dsa);
ashleymills 0:714293de3836 41
ashleymills 0:714293de3836 42 #define DSA_new CyaSSL_DSA_new
ashleymills 0:714293de3836 43 #define DSA_free CyaSSL_DSA_free
ashleymills 0:714293de3836 44
ashleymills 0:714293de3836 45 #define DSA_generate_key CyaSSL_DSA_generate_key
ashleymills 0:714293de3836 46 #define DSA_generate_parameters_ex CyaSSL_DSA_generate_parameters_ex
ashleymills 0:714293de3836 47
ashleymills 0:714293de3836 48
ashleymills 0:714293de3836 49 #ifdef __cplusplus
ashleymills 0:714293de3836 50 } /* extern "C" */
ashleymills 0:714293de3836 51 #endif
ashleymills 0:714293de3836 52
ashleymills 0:714293de3836 53 #endif /* header */