Implementation of pkey_rsa_verify. Some constification.
[openssl.git] / engines / vendor_defns / atalla.h
1 /* This header declares the necessary definitions for using the exponentiation
2  * acceleration capabilities of Atalla cards. The only cryptographic operation
3  * is performed by "ASI_RSAPrivateKeyOpFn" and this takes a structure that
4  * defines an "RSA private key". However, it is really only performing a
5  * regular mod_exp using the supplied modulus and exponent - no CRT form is
6  * being used. Hence, it is a generic mod_exp function in disguise, and we use
7  * it as such.
8  *
9  * Thanks to the people at Atalla for letting me know these definitions are
10  * fine and that they can be reproduced here.
11  *
12  * Geoff.
13  */
14
15 typedef struct ItemStr
16         {
17         unsigned char *data;
18         int len;
19         } Item;
20
21 typedef struct RSAPrivateKeyStr
22         {
23         void *reserved;
24         Item version;
25         Item modulus;
26         Item publicExponent;
27         Item privateExponent;
28         Item prime[2];
29         Item exponent[2];
30         Item coefficient;
31         } RSAPrivateKey;
32
33 /* Predeclare the function pointer types that we dynamically load from the DSO.
34  * These use the same names and form that Ben's original support code had (in
35  * crypto/bn/bn_exp.c) unless of course I've inadvertently changed the style
36  * somewhere along the way!
37  */
38
39 typedef int tfnASI_GetPerformanceStatistics(int reset_flag,
40                                         unsigned int *ret_buf);
41
42 typedef int tfnASI_GetHardwareConfig(long card_num, unsigned int *ret_buf);
43
44 typedef int tfnASI_RSAPrivateKeyOpFn(RSAPrivateKey * rsaKey,
45                                         unsigned char *output,
46                                         unsigned char *input,
47                                         unsigned int modulus_len);
48