1 /**********************************************************************/
3 /* Prototypes of the CCA verbs used by the 4758 CCA openssl driver */
5 /* Maurice Gittens <maurice@gittens.nl> */
7 /**********************************************************************/
9 #ifndef __HW_4758_CCA__
10 #define __HW_4758_CCA__
13 * Only WIN32 support for now
17 #define CCA_LIB_NAME "CSUNSAPI"
19 #define CSNDPKX "CSNDPKX_32"
20 #define CSNDKRR "CSNDKRR_32"
21 #define CSNDPKE "CSNDPKE_32"
22 #define CSNDPKD "CSNDPKD_32"
23 #define CSNDDSV "CSNDDSV_32"
24 #define CSNDDSG "CSNDDSG_32"
25 #define CSNBRNG "CSNBRNG_32"
27 #define SECURITYAPI __stdcall
30 Find out the values of these constants for other platforms.
32 #define CCA_LIB_NAME "CSUNSAPI"
34 #define CSNDPKX "CSNDPKX"
35 #define CSNDKRR "CSNDKRR"
36 #define CSNDPKE "CSNDPKE"
37 #define CSNDPKD "CSNDPKD"
38 #define CSNDDSV "CSNDDSV"
39 #define CSNDDSG "CSNDDSG"
40 #define CSNBRNG "CSNBRNG"
46 * security API prototypes
49 /* PKA Key Record Read */
50 typedef void (SECURITYAPI
*F_KEYRECORDREAD
)
53 long * exit_data_length
,
54 unsigned char * exit_data
,
55 long * rule_array_count
,
56 unsigned char * rule_array
,
57 unsigned char * key_label
,
58 long * key_token_length
,
59 unsigned char * key_token
);
61 /* Random Number Generate */
62 typedef void (SECURITYAPI
*F_RANDOMNUMBERGENERATE
)
65 long * exit_data_length
,
66 unsigned char * exit_data
,
68 unsigned char * random_number
);
70 /* Digital Signature Generate */
71 typedef void (SECURITYAPI
*F_DIGITALSIGNATUREGENERATE
)
74 long * exit_data_length
,
75 unsigned char * exit_data
,
76 long * rule_array_count
,
77 unsigned char * rule_array
,
78 long * PKA_private_key_id_length
,
79 unsigned char * PKA_private_key_id
,
82 long * signature_field_length
,
83 long * signature_bit_length
,
84 unsigned char * signature_field
);
86 /* Digital Signature Verify */
87 typedef void (SECURITYAPI
*F_DIGITALSIGNATUREVERIFY
)(
90 long * exit_data_length
,
91 unsigned char * exit_data
,
92 long * rule_array_count
,
93 unsigned char * rule_array
,
94 long * PKA_public_key_id_length
,
95 unsigned char * PKA_public_key_id
,
98 long * signature_field_length
,
99 unsigned char * signature_field
);
101 /* PKA Public Key Extract */
102 typedef void (SECURITYAPI
*F_PUBLICKEYEXTRACT
)(
105 long * exit_data_length
,
106 unsigned char * exit_data
,
107 long * rule_array_count
,
108 unsigned char * rule_array
,
109 long * source_key_identifier_length
,
110 unsigned char * source_key_identifier
,
111 long * target_key_token_length
,
112 unsigned char * target_key_token
);
115 typedef void (SECURITYAPI
*F_PKAENCRYPT
)
118 long * exit_data_length
,
119 unsigned char * exit_data
,
120 long * rule_array_count
,
121 unsigned char * rule_array
,
122 long * key_value_length
,
123 unsigned char * key_value
,
124 long * data_struct_length
,
125 unsigned char * data_struct
,
126 long * RSA_public_key_length
,
127 unsigned char * RSA_public_key
,
128 long * RSA_encipher_length
,
129 unsigned char * RSA_encipher
);
132 typedef void (SECURITYAPI
*F_PKADECRYPT
)
135 long * exit_data_length
,
136 unsigned char * exit_data
,
137 long * rule_array_count
,
138 unsigned char * rule_array
,
139 long * enciphered_key_length
,
140 unsigned char * enciphered_key
,
141 long * data_struct_length
,
142 unsigned char * data_struct
,
143 long * RSA_private_key_length
,
144 unsigned char * RSA_private_key
,
145 long * key_value_length
,
146 unsigned char * key_value
);