1 /* rsa.h for openSSL */
7 #include <cyassl/openssl/ssl.h>
8 #include <cyassl/openssl/bn.h>
26 CYASSL_BIGNUM* dmp1; /* dP */
27 CYASSL_BIGNUM* dmq1; /* dQ */
28 CYASSL_BIGNUM* iqmp; /* u */
29 void* internal; /* our RSA */
30 char inSet; /* internal set from external ? */
31 char exSet; /* external set from internal ? */
35 CYASSL_API CYASSL_RSA* CyaSSL_RSA_new(void);
36 CYASSL_API void CyaSSL_RSA_free(CYASSL_RSA*);
38 CYASSL_API int CyaSSL_RSA_generate_key_ex(CYASSL_RSA*, int bits, CYASSL_BIGNUM*,
41 CYASSL_API int CyaSSL_RSA_blinding_on(CYASSL_RSA*, CYASSL_BN_CTX*);
42 CYASSL_API int CyaSSL_RSA_public_encrypt(int len, unsigned char* fr,
43 unsigned char* to, CYASSL_RSA*, int padding);
44 CYASSL_API int CyaSSL_RSA_private_decrypt(int len, unsigned char* fr,
45 unsigned char* to, CYASSL_RSA*, int padding);
47 CYASSL_API int CyaSSL_RSA_size(const CYASSL_RSA*);
48 CYASSL_API int CyaSSL_RSA_sign(int type, const unsigned char* m,
49 unsigned int mLen, unsigned char* sigRet,
50 unsigned int* sigLen, CYASSL_RSA*);
51 CYASSL_API int CyaSSL_RSA_public_decrypt(int flen, unsigned char* from,
52 unsigned char* to, CYASSL_RSA*, int padding);
53 CYASSL_API int CyaSSL_RSA_GenAdd(CYASSL_RSA*);
54 CYASSL_API int CyaSSL_RSA_LoadDer(CYASSL_RSA*, const unsigned char*, int sz);
57 #define RSA_new CyaSSL_RSA_new
58 #define RSA_free CyaSSL_RSA_free
60 #define RSA_generate_key_ex CyaSSL_RSA_generate_key_ex
62 #define RSA_blinding_on CyaSSL_RSA_blinding_on
63 #define RSA_public_encrypt CyaSSL_RSA_public_encrypt
64 #define RSA_private_decrypt CyaSSL_RSA_private_decrypt
66 #define RSA_size CyaSSL_RSA_size
67 #define RSA_sign CyaSSL_RSA_sign
68 #define RSA_public_decrypt CyaSSL_RSA_public_decrypt