Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of wolfSSL by
dsa.h
00001 /* dsa.h for openSSL */ 00002 00003 00004 #ifndef WOLFSSL_DSA_H_ 00005 #define WOLFSSL_DSA_H_ 00006 00007 #include <wolfssl/openssl/bn.h> 00008 00009 #ifdef __cplusplus 00010 extern "C" { 00011 #endif 00012 00013 #ifndef WOLFSSL_DSA_TYPE_DEFINED /* guard on redeclaration */ 00014 typedef struct WOLFSSL_DSA WOLFSSL_DSA; 00015 #define WOLFSSL_DSA_TYPE_DEFINED 00016 #endif 00017 00018 typedef WOLFSSL_DSA DSA; 00019 00020 struct WOLFSSL_DSA { 00021 WOLFSSL_BIGNUM* p; 00022 WOLFSSL_BIGNUM* q; 00023 WOLFSSL_BIGNUM* g; 00024 WOLFSSL_BIGNUM* pub_key; /* our y */ 00025 WOLFSSL_BIGNUM* priv_key; /* our x */ 00026 void* internal; /* our Dsa Key */ 00027 char inSet; /* internal set from external ? */ 00028 char exSet; /* external set from internal ? */ 00029 }; 00030 00031 00032 WOLFSSL_API WOLFSSL_DSA* wolfSSL_DSA_new(void); 00033 WOLFSSL_API void wolfSSL_DSA_free(WOLFSSL_DSA*); 00034 00035 WOLFSSL_API int wolfSSL_DSA_generate_key(WOLFSSL_DSA*); 00036 WOLFSSL_API int wolfSSL_DSA_generate_parameters_ex(WOLFSSL_DSA*, int bits, 00037 unsigned char* seed, int seedLen, int* counterRet, 00038 unsigned long* hRet, void* cb); 00039 00040 WOLFSSL_API int wolfSSL_DSA_LoadDer(WOLFSSL_DSA*, const unsigned char*, int sz); 00041 00042 WOLFSSL_API int wolfSSL_DSA_do_sign(const unsigned char* d, 00043 unsigned char* sigRet, WOLFSSL_DSA* dsa); 00044 00045 WOLFSSL_API int wolfSSL_DSA_do_verify(const unsigned char* d, 00046 unsigned char* sig, 00047 WOLFSSL_DSA* dsa, int *dsacheck); 00048 00049 #define DSA_new wolfSSL_DSA_new 00050 #define DSA_free wolfSSL_DSA_free 00051 00052 #define DSA_generate_key wolfSSL_DSA_generate_key 00053 #define DSA_generate_parameters_ex wolfSSL_DSA_generate_parameters_ex 00054 00055 00056 #ifdef __cplusplus 00057 } /* extern "C" */ 00058 #endif 00059 00060 #endif /* header */ 00061
Generated on Tue Jul 12 2022 23:30:55 by
1.7.2
