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