Go to the source code of this file.
Classes | |
struct | _SW_U64 |
struct | _SW_LARGENUMBER |
struct | _SW_CRT |
struct | _SW_EXP |
struct | _SW_DSA |
struct | _SW_NVDATA |
struct | _SW_PARAM |
Macros | |
#define | SW_OK (0L) |
#define | SW_ERR_BASE (-10000L) |
#define | SW_ERR_NO_CARD (SW_ERR_BASE-1) /* The Card is not present */ |
#define | SW_ERR_CARD_NOT_READY (SW_ERR_BASE-2) /* The card has not powered */ |
#define | SW_ERR_TIME_OUT (SW_ERR_BASE-3) /* Execution of a command */ |
#define | SW_ERR_NO_EXECUTE (SW_ERR_BASE-4) /* The Card failed to */ |
#define | SW_ERR_INPUT_NULL_PTR (SW_ERR_BASE-5) /* a required pointer is */ |
#define | SW_ERR_INPUT_SIZE (SW_ERR_BASE-6) /* size is invalid, too */ |
#define | SW_ERR_INVALID_HANDLE (SW_ERR_BASE-7) /* Invalid SW_ACC_CONTEXT */ |
#define | SW_ERR_PENDING (SW_ERR_BASE-8) /* A request is already out- */ |
#define | SW_ERR_AVAILABLE (SW_ERR_BASE-9) /* A result is available. */ |
#define | SW_ERR_NO_PENDING (SW_ERR_BASE-10)/* No request is pending. */ |
#define | SW_ERR_NO_MEMORY (SW_ERR_BASE-11)/* Not enough memory */ |
#define | SW_ERR_BAD_ALGORITHM (SW_ERR_BASE-12)/* Invalid algorithm type */ |
#define | SW_ERR_MISSING_KEY (SW_ERR_BASE-13)/* No key is associated with */ |
#define | SW_ERR_KEY_CMD_MISMATCH (SW_ERR_BASE-14)/* Cannot perform requested */ |
#define | SW_ERR_NOT_IMPLEMENTED (SW_ERR_BASE-15)/* Not implemented */ |
#define | SW_ERR_BAD_COMMAND (SW_ERR_BASE-16)/* Bad command code */ |
#define | SW_ERR_BAD_ITEM_SIZE (SW_ERR_BASE-17)/* too small or too large in */ |
#define | SW_ERR_BAD_ACCNUM (SW_ERR_BASE-18)/* Bad accelerator number */ |
#define | SW_ERR_SELFTEST_FAIL (SW_ERR_BASE-19)/* At least one of the self */ |
#define | SW_ERR_MISALIGN (SW_ERR_BASE-20)/* Certain alogrithms require*/ |
#define | SW_ERR_OUTPUT_NULL_PTR (SW_ERR_BASE-21)/* a required pointer is */ |
#define | SW_ERR_OUTPUT_SIZE (SW_ERR_BASE-22)/* size is invalid, too */ |
#define | SW_ERR_FIRMWARE_CHECKSUM (SW_ERR_BASE-23)/* firmware checksum mismatch*/ |
#define | SW_ERR_UNKNOWN_FIRMWARE (SW_ERR_BASE-24)/* unknown firmware error */ |
#define | SW_ERR_INTERRUPT (SW_ERR_BASE-25)/* request is abort when */ |
#define | SW_ERR_NVWRITE_FAIL (SW_ERR_BASE-26)/* error in writing to Non- */ |
#define | SW_ERR_NVWRITE_RANGE (SW_ERR_BASE-27)/* out of range error in */ |
#define | SW_ERR_RNG_ERROR (SW_ERR_BASE-28)/* Random Number Generation */ |
#define | SW_ERR_DSS_FAILURE (SW_ERR_BASE-29)/* DSS Sign or Verify failure*/ |
#define | SW_ERR_MODEXP_FAILURE (SW_ERR_BASE-30)/* Failure in various math */ |
#define | SW_ERR_ONBOARD_MEMORY (SW_ERR_BASE-31)/* Error in accessing on - */ |
#define | SW_ERR_FIRMWARE_VERSION (SW_ERR_BASE-32)/* Wrong version in firmware */ |
#define | SW_ERR_ZERO_WORKING_ACCELERATOR (SW_ERR_BASE-44)/* All accelerators are bad */ |
#define | SW_ALG_CRT 1 |
#define | SW_ALG_EXP 2 |
#define | SW_ALG_DSA 3 |
#define | SW_ALG_NVDATA 4 |
#define | SW_CMD_MODEXP_CRT 1 /* perform Modular Exponentiation using */ |
#define | SW_CMD_MODEXP 2 /* perform Modular Exponentiation */ |
#define | SW_CMD_DSS_SIGN 3 /* perform DSS sign */ |
#define | SW_CMD_DSS_VERIFY 4 /* perform DSS verify */ |
#define | SW_CMD_RAND 5 /* perform random number generation */ |
#define | SW_CMD_NVREAD 6 /* perform read to nonvolatile RAM */ |
#define | SW_CMD_NVWRITE 7 /* perform write to nonvolatile RAM */ |
#define | SW_OS_INVALID_HANDLE (-1) |
#define | SW_CALLCONV |
Typedefs | |
typedef long | SW_STATUS |
typedef unsigned char | SW_BYTE |
typedef unsigned short | SW_U16 |
typedef unsigned long | SW_U32 |
typedef struct _SW_U64 | SW_U64 |
typedef SW_U32 | SW_ALGTYPE |
typedef SW_U32 | SW_STATE |
typedef SW_U32 | SW_COMMAND_CODE |
typedef SW_U32 | SW_COMMAND_BITMAP [4] |
typedef struct _SW_LARGENUMBER | SW_LARGENUMBER |
typedef int | SW_OSHANDLE |
typedef struct _SW_CRT | SW_CRT |
typedef struct _SW_EXP | SW_EXP |
typedef struct _SW_DSA | SW_DSA |
typedef struct _SW_NVDATA | SW_NVDATA |
typedef struct _SW_PARAM | SW_PARAM |
typedef SW_U32 | SW_CONTEXT_HANDLE |
typedef SW_STATUS SW_CALLCONV | t_swAcquireAccContext (SW_CONTEXT_HANDLE *hac) |
typedef SW_STATUS SW_CALLCONV | t_swAttachKeyParam (SW_CONTEXT_HANDLE hac, SW_PARAM *key_params) |
typedef SW_STATUS SW_CALLCONV | t_swSimpleRequest (SW_CONTEXT_HANDLE hac, SW_COMMAND_CODE cmd, SW_LARGENUMBER pin[], SW_U32 pin_count, SW_LARGENUMBER pout[], SW_U32 pout_count) |
typedef SW_STATUS SW_CALLCONV | t_swReleaseAccContext (SW_CONTEXT_HANDLE hac) |
#define SW_CMD_MODEXP 2 /* perform Modular Exponentiation */ |
#define SW_CMD_MODEXP_CRT 1 /* perform Modular Exponentiation using */ |
#define SW_CMD_NVREAD 6 /* perform read to nonvolatile RAM */ |
#define SW_CMD_NVWRITE 7 /* perform write to nonvolatile RAM */ |
#define SW_CMD_RAND 5 /* perform random number generation */ |
#define SW_ERR_AVAILABLE (SW_ERR_BASE-9) /* A result is available. */ |
#define SW_ERR_BAD_ACCNUM (SW_ERR_BASE-18)/* Bad accelerator number */ |
#define SW_ERR_BAD_ALGORITHM (SW_ERR_BASE-12)/* Invalid algorithm type */ |
#define SW_ERR_BAD_COMMAND (SW_ERR_BASE-16)/* Bad command code */ |
#define SW_ERR_BAD_ITEM_SIZE (SW_ERR_BASE-17)/* too small or too large in */ |
#define SW_ERR_CARD_NOT_READY (SW_ERR_BASE-2) /* The card has not powered */ |
#define SW_ERR_DSS_FAILURE (SW_ERR_BASE-29)/* DSS Sign or Verify failure*/ |
#define SW_ERR_FIRMWARE_CHECKSUM (SW_ERR_BASE-23)/* firmware checksum mismatch*/ |
#define SW_ERR_FIRMWARE_VERSION (SW_ERR_BASE-32)/* Wrong version in firmware */ |
#define SW_ERR_INPUT_NULL_PTR (SW_ERR_BASE-5) /* a required pointer is */ |
#define SW_ERR_INPUT_SIZE (SW_ERR_BASE-6) /* size is invalid, too */ |
#define SW_ERR_INTERRUPT (SW_ERR_BASE-25)/* request is abort when */ |
#define SW_ERR_INVALID_HANDLE (SW_ERR_BASE-7) /* Invalid SW_ACC_CONTEXT */ |
#define SW_ERR_KEY_CMD_MISMATCH (SW_ERR_BASE-14)/* Cannot perform requested */ |
#define SW_ERR_MISALIGN (SW_ERR_BASE-20)/* Certain alogrithms require*/ |
#define SW_ERR_MISSING_KEY (SW_ERR_BASE-13)/* No key is associated with */ |
#define SW_ERR_MODEXP_FAILURE (SW_ERR_BASE-30)/* Failure in various math */ |
#define SW_ERR_NO_CARD (SW_ERR_BASE-1) /* The Card is not present */ |
#define SW_ERR_NO_EXECUTE (SW_ERR_BASE-4) /* The Card failed to */ |
#define SW_ERR_NO_MEMORY (SW_ERR_BASE-11)/* Not enough memory */ |
#define SW_ERR_NO_PENDING (SW_ERR_BASE-10)/* No request is pending. */ |
#define SW_ERR_NOT_IMPLEMENTED (SW_ERR_BASE-15)/* Not implemented */ |
#define SW_ERR_NVWRITE_FAIL (SW_ERR_BASE-26)/* error in writing to Non- */ |
#define SW_ERR_NVWRITE_RANGE (SW_ERR_BASE-27)/* out of range error in */ |
#define SW_ERR_ONBOARD_MEMORY (SW_ERR_BASE-31)/* Error in accessing on - */ |
#define SW_ERR_OUTPUT_NULL_PTR (SW_ERR_BASE-21)/* a required pointer is */ |
#define SW_ERR_OUTPUT_SIZE (SW_ERR_BASE-22)/* size is invalid, too */ |
#define SW_ERR_PENDING (SW_ERR_BASE-8) /* A request is already out- */ |
#define SW_ERR_RNG_ERROR (SW_ERR_BASE-28)/* Random Number Generation */ |
#define SW_ERR_SELFTEST_FAIL (SW_ERR_BASE-19)/* At least one of the self */ |
#define SW_ERR_TIME_OUT (SW_ERR_BASE-3) /* Execution of a command */ |
#define SW_ERR_UNKNOWN_FIRMWARE (SW_ERR_BASE-24)/* unknown firmware error */ |
#define SW_ERR_ZERO_WORKING_ACCELERATOR (SW_ERR_BASE-44)/* All accelerators are bad */ |
typedef SW_U32 SW_ALGTYPE |
typedef SW_U32 SW_COMMAND_CODE |
typedef SW_U32 SW_CONTEXT_HANDLE |
typedef struct _SW_LARGENUMBER SW_LARGENUMBER |
typedef struct _SW_NVDATA SW_NVDATA |
typedef int SW_OSHANDLE |
typedef SW_STATUS SW_CALLCONV t_swAcquireAccContext(SW_CONTEXT_HANDLE *hac) |
typedef SW_STATUS SW_CALLCONV t_swAttachKeyParam(SW_CONTEXT_HANDLE hac, SW_PARAM *key_params) |
typedef SW_STATUS SW_CALLCONV t_swReleaseAccContext(SW_CONTEXT_HANDLE hac) |
typedef SW_STATUS SW_CALLCONV t_swSimpleRequest(SW_CONTEXT_HANDLE hac, SW_COMMAND_CODE cmd, SW_LARGENUMBER pin[], SW_U32 pin_count, SW_LARGENUMBER pout[], SW_U32 pout_count) |