OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Typedefs | Functions
ica_openssl_api.h File Reference

Go to the source code of this file.

Classes

struct  _ICA_KEY_RSA_MODEXPO
 
struct  _ICA_KEY_RSA_CRT
 

Macros

#define ICA_ADAPTER_HANDLE   int
 
#define MAX_EXP_SIZE   256
 
#define MAX_MODULUS_SIZE   256
 
#define MAX_MODEXP_SIZE   (MAX_EXP_SIZE + MAX_MODULUS_SIZE)
 
#define MAX_OPERAND_SIZE   MAX_EXP_SIZE
 
#define MAX_BP_SIZE   136
 
#define MAX_BQ_SIZE   128
 
#define MAX_NP_SIZE   136
 
#define MAX_NQ_SIZE   128
 
#define MAX_QINV_SIZE   136
 
#define MAX_RSACRT_SIZE   (MAX_BP_SIZE+MAX_BQ_SIZE+MAX_NP_SIZE+MAX_NQ_SIZE+MAX_QINV_SIZE)
 
#define RSA_GEN_OPERAND_MAX   256 /* bytes */
 
#define RSA_PUBLIC_MODULUS_EXPONENT   3
 
#define RSA_PKCS_PRIVATE_CHINESE_REMAINDER   6
 
#define KEYTYPE_MODEXPO   1
 
#define KEYTYPE_PKCSCRT   2
 
#define SZ_HEADER_MODEXPO   (sizeof(ICA_KEY_RSA_MODEXPO) - sizeof(ICA_KEY_RSA_MODEXPO_REC))
 
#define SZ_HEADER_CRT   (sizeof(ICA_KEY_RSA_CRT) - sizeof(ICA_KEY_RSA_CRT_REC))
 
#define CORRECT_ENDIANNESS(b)   (b)
 
#define CRT_KEY_TYPE   KEYTYPE_PKCSCRT
 
#define ME_KEY_TYPE   KEYTYPE_MODEXPO
 

Typedefs

typedef unsigned char ICA_KEY_RSA_MODEXPO_REC [MAX_MODEXP_SIZE]
 
typedef unsigned char ICA_KEY_RSA_CRT_REC [MAX_RSACRT_SIZE]
 
typedef struct _ICA_KEY_RSA_MODEXPO ICA_KEY_RSA_MODEXPO
 
typedef struct _ICA_KEY_RSA_CRT ICA_KEY_RSA_CRT
 

Functions

unsigned int icaOpenAdapter (unsigned int adapterId, ICA_ADAPTER_HANDLE *pAdapterHandle)
 
unsigned int icaCloseAdapter (ICA_ADAPTER_HANDLE adapterHandle)
 
unsigned int icaRsaModExpo (ICA_ADAPTER_HANDLE hAdapterHandle, unsigned int inputDataLength, unsigned char *pInputData, ICA_KEY_RSA_MODEXPO *pKeyModExpo, unsigned int *pOutputDataLength, unsigned char *pOutputData)
 
unsigned int icaRsaCrt (ICA_ADAPTER_HANDLE hAdapterHandle, unsigned int inputDataLength, unsigned char *pInputData, ICA_KEY_RSA_CRT *pKeyCrt, unsigned int *pOutputDataLength, unsigned char *pOutputData)
 
unsigned int icaRandomNumberGenerate (ICA_ADAPTER_HANDLE hAdapterHandle, unsigned int outputDataLength, unsigned char *pOutputData)
 

Macro Definition Documentation

#define CORRECT_ENDIANNESS (   b)    (b)

Definition at line 182 of file ica_openssl_api.h.

#define CRT_KEY_TYPE   KEYTYPE_PKCSCRT

Definition at line 183 of file ica_openssl_api.h.

#define ICA_ADAPTER_HANDLE   int

abstract data types for API

Definition at line 9 of file ica_openssl_api.h.

#define KEYTYPE_MODEXPO   1

Definition at line 57 of file ica_openssl_api.h.

#define KEYTYPE_PKCSCRT   2

Definition at line 58 of file ica_openssl_api.h.

#define MAX_BP_SIZE   136

Definition at line 40 of file ica_openssl_api.h.

#define MAX_BQ_SIZE   128

Definition at line 41 of file ica_openssl_api.h.

#define MAX_EXP_SIZE   256

Definition at line 27 of file ica_openssl_api.h.

#define MAX_MODEXP_SIZE   (MAX_EXP_SIZE + MAX_MODULUS_SIZE)

Definition at line 29 of file ica_openssl_api.h.

#define MAX_MODULUS_SIZE   256

Definition at line 28 of file ica_openssl_api.h.

#define MAX_NP_SIZE   136

Definition at line 42 of file ica_openssl_api.h.

#define MAX_NQ_SIZE   128

Definition at line 43 of file ica_openssl_api.h.

#define MAX_OPERAND_SIZE   MAX_EXP_SIZE

Definition at line 31 of file ica_openssl_api.h.

#define MAX_QINV_SIZE   136

Definition at line 44 of file ica_openssl_api.h.

Definition at line 45 of file ica_openssl_api.h.

#define ME_KEY_TYPE   KEYTYPE_MODEXPO

Definition at line 184 of file ica_openssl_api.h.

#define RSA_GEN_OPERAND_MAX   256 /* bytes */

Definition at line 47 of file ica_openssl_api.h.

#define RSA_PKCS_PRIVATE_CHINESE_REMAINDER   6

Definition at line 55 of file ica_openssl_api.h.

#define RSA_PUBLIC_MODULUS_EXPONENT   3

Definition at line 54 of file ica_openssl_api.h.

#define SZ_HEADER_CRT   (sizeof(ICA_KEY_RSA_CRT) - sizeof(ICA_KEY_RSA_CRT_REC))

Definition at line 126 of file ica_openssl_api.h.

#define SZ_HEADER_MODEXPO   (sizeof(ICA_KEY_RSA_MODEXPO) - sizeof(ICA_KEY_RSA_MODEXPO_REC))

Definition at line 87 of file ica_openssl_api.h.

Typedef Documentation

typedef unsigned char ICA_KEY_RSA_CRT_REC[MAX_RSACRT_SIZE]

Definition at line 49 of file ica_openssl_api.h.

typedef unsigned char ICA_KEY_RSA_MODEXPO_REC[MAX_MODEXP_SIZE]

Definition at line 33 of file ica_openssl_api.h.

Function Documentation

unsigned int icaCloseAdapter ( ICA_ADAPTER_HANDLE  adapterHandle)
unsigned int icaOpenAdapter ( unsigned int  adapterId,
ICA_ADAPTER_HANDLE pAdapterHandle 
)
unsigned int icaRandomNumberGenerate ( ICA_ADAPTER_HANDLE  hAdapterHandle,
unsigned int  outputDataLength,
unsigned char *  pOutputData 
)
unsigned int icaRsaCrt ( ICA_ADAPTER_HANDLE  hAdapterHandle,
unsigned int  inputDataLength,
unsigned char *  pInputData,
ICA_KEY_RSA_CRT pKeyCrt,
unsigned int *  pOutputDataLength,
unsigned char *  pOutputData 
)
unsigned int icaRsaModExpo ( ICA_ADAPTER_HANDLE  hAdapterHandle,
unsigned int  inputDataLength,
unsigned char *  pInputData,
ICA_KEY_RSA_MODEXPO pKeyModExpo,
unsigned int *  pOutputDataLength,
unsigned char *  pOutputData 
)