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.
wolfssl/openssl/dsa.h@7:481bce714567, 2017-05-02 (annotated)
- Committer:
- wolfSSL
- Date:
- Tue May 02 08:44:47 2017 +0000
- Revision:
- 7:481bce714567
wolfSSL3.10.2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wolfSSL | 7:481bce714567 | 1 | /* dsa.h for openSSL */ |
wolfSSL | 7:481bce714567 | 2 | |
wolfSSL | 7:481bce714567 | 3 | |
wolfSSL | 7:481bce714567 | 4 | #ifndef WOLFSSL_DSA_H_ |
wolfSSL | 7:481bce714567 | 5 | #define WOLFSSL_DSA_H_ |
wolfSSL | 7:481bce714567 | 6 | |
wolfSSL | 7:481bce714567 | 7 | #include <wolfssl/openssl/ssl.h> |
wolfSSL | 7:481bce714567 | 8 | #include <wolfssl/openssl/bn.h> |
wolfSSL | 7:481bce714567 | 9 | |
wolfSSL | 7:481bce714567 | 10 | #ifdef __cplusplus |
wolfSSL | 7:481bce714567 | 11 | extern "C" { |
wolfSSL | 7:481bce714567 | 12 | #endif |
wolfSSL | 7:481bce714567 | 13 | |
wolfSSL | 7:481bce714567 | 14 | struct WOLFSSL_DSA { |
wolfSSL | 7:481bce714567 | 15 | WOLFSSL_BIGNUM* p; |
wolfSSL | 7:481bce714567 | 16 | WOLFSSL_BIGNUM* q; |
wolfSSL | 7:481bce714567 | 17 | WOLFSSL_BIGNUM* g; |
wolfSSL | 7:481bce714567 | 18 | WOLFSSL_BIGNUM* pub_key; /* our y */ |
wolfSSL | 7:481bce714567 | 19 | WOLFSSL_BIGNUM* priv_key; /* our x */ |
wolfSSL | 7:481bce714567 | 20 | void* internal; /* our Dsa Key */ |
wolfSSL | 7:481bce714567 | 21 | char inSet; /* internal set from external ? */ |
wolfSSL | 7:481bce714567 | 22 | char exSet; /* external set from internal ? */ |
wolfSSL | 7:481bce714567 | 23 | }; |
wolfSSL | 7:481bce714567 | 24 | |
wolfSSL | 7:481bce714567 | 25 | |
wolfSSL | 7:481bce714567 | 26 | WOLFSSL_API WOLFSSL_DSA* wolfSSL_DSA_new(void); |
wolfSSL | 7:481bce714567 | 27 | WOLFSSL_API void wolfSSL_DSA_free(WOLFSSL_DSA*); |
wolfSSL | 7:481bce714567 | 28 | |
wolfSSL | 7:481bce714567 | 29 | WOLFSSL_API int wolfSSL_DSA_generate_key(WOLFSSL_DSA*); |
wolfSSL | 7:481bce714567 | 30 | WOLFSSL_API int wolfSSL_DSA_generate_parameters_ex(WOLFSSL_DSA*, int bits, |
wolfSSL | 7:481bce714567 | 31 | unsigned char* seed, int seedLen, int* counterRet, |
wolfSSL | 7:481bce714567 | 32 | unsigned long* hRet, void* cb); |
wolfSSL | 7:481bce714567 | 33 | |
wolfSSL | 7:481bce714567 | 34 | WOLFSSL_API int wolfSSL_DSA_LoadDer(WOLFSSL_DSA*, const unsigned char*, int sz); |
wolfSSL | 7:481bce714567 | 35 | |
wolfSSL | 7:481bce714567 | 36 | WOLFSSL_API int wolfSSL_DSA_do_sign(const unsigned char* d, |
wolfSSL | 7:481bce714567 | 37 | unsigned char* sigRet, WOLFSSL_DSA* dsa); |
wolfSSL | 7:481bce714567 | 38 | |
wolfSSL | 7:481bce714567 | 39 | WOLFSSL_API int wolfSSL_DSA_do_verify(const unsigned char* d, |
wolfSSL | 7:481bce714567 | 40 | unsigned char* sig, |
wolfSSL | 7:481bce714567 | 41 | WOLFSSL_DSA* dsa, int *dsacheck); |
wolfSSL | 7:481bce714567 | 42 | |
wolfSSL | 7:481bce714567 | 43 | #define DSA_new wolfSSL_DSA_new |
wolfSSL | 7:481bce714567 | 44 | #define DSA_free wolfSSL_DSA_free |
wolfSSL | 7:481bce714567 | 45 | |
wolfSSL | 7:481bce714567 | 46 | #define DSA_generate_key wolfSSL_DSA_generate_key |
wolfSSL | 7:481bce714567 | 47 | #define DSA_generate_parameters_ex wolfSSL_DSA_generate_parameters_ex |
wolfSSL | 7:481bce714567 | 48 | |
wolfSSL | 7:481bce714567 | 49 | |
wolfSSL | 7:481bce714567 | 50 | #ifdef __cplusplus |
wolfSSL | 7:481bce714567 | 51 | } /* extern "C" */ |
wolfSSL | 7:481bce714567 | 52 | #endif |
wolfSSL | 7:481bce714567 | 53 | |
wolfSSL | 7:481bce714567 | 54 | #endif /* header */ |
wolfSSL | 7:481bce714567 | 55 |