Renesas / SecureDweet
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers dsa.h Source File

dsa.h

00001 /* dsa.h for openSSL */
00002 
00003 
00004 #ifndef WOLFSSL_DSA_H_
00005 #define WOLFSSL_DSA_H_
00006 
00007 #include <wolfssl/openssl/ssl.h>
00008 #include <wolfssl/openssl/bn.h>
00009 
00010 #ifdef __cplusplus
00011     extern "C" {
00012 #endif
00013 
00014 struct WOLFSSL_DSA {
00015     WOLFSSL_BIGNUM* p;
00016     WOLFSSL_BIGNUM* q;
00017     WOLFSSL_BIGNUM* g;
00018     WOLFSSL_BIGNUM* pub_key;      /* our y */
00019     WOLFSSL_BIGNUM* priv_key;     /* our x */
00020     void*          internal;     /* our Dsa Key */
00021     char           inSet;        /* internal set from external ? */
00022     char           exSet;        /* external set from internal ? */
00023 };
00024 
00025 
00026 WOLFSSL_API WOLFSSL_DSA* wolfSSL_DSA_new(void);
00027 WOLFSSL_API void wolfSSL_DSA_free(WOLFSSL_DSA*);
00028 
00029 WOLFSSL_API int wolfSSL_DSA_generate_key(WOLFSSL_DSA*);
00030 WOLFSSL_API int wolfSSL_DSA_generate_parameters_ex(WOLFSSL_DSA*, int bits,
00031                    unsigned char* seed, int seedLen, int* counterRet,
00032                    unsigned long* hRet, void* cb);
00033 
00034 WOLFSSL_API int wolfSSL_DSA_LoadDer(WOLFSSL_DSA*, const unsigned char*, int sz);
00035 
00036 WOLFSSL_API int wolfSSL_DSA_do_sign(const unsigned char* d,
00037                                     unsigned char* sigRet, WOLFSSL_DSA* dsa);
00038 
00039 WOLFSSL_API int wolfSSL_DSA_do_verify(const unsigned char* d,
00040                                       unsigned char* sig,
00041                                       WOLFSSL_DSA* dsa, int *dsacheck);
00042 
00043 #define DSA_new wolfSSL_DSA_new
00044 #define DSA_free wolfSSL_DSA_free
00045 
00046 #define DSA_generate_key           wolfSSL_DSA_generate_key
00047 #define DSA_generate_parameters_ex wolfSSL_DSA_generate_parameters_ex
00048 
00049 
00050 #ifdef __cplusplus
00051     }  /* extern "C" */ 
00052 #endif
00053 
00054 #endif /* header */
00055