Remove old versions of OpenSSL.
[dragonfly.git] / crypto / openssl-0.9 / engines / vendor_defns / atalla.h
blob149970d441478788847c60b1962a669efc20994e
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.
9 * Thanks to the people at Atalla for letting me know these definitions are
10 * fine and that they can be reproduced here.
12 * Geoff.
15 typedef struct ItemStr
17 unsigned char *data;
18 int len;
19 } Item;
21 typedef struct RSAPrivateKeyStr
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;
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!
39 typedef int tfnASI_GetPerformanceStatistics(int reset_flag,
40 unsigned int *ret_buf);
42 typedef int tfnASI_GetHardwareConfig(long card_num, unsigned int *ret_buf);
44 typedef int tfnASI_RSAPrivateKeyOpFn(RSAPrivateKey * rsaKey,
45 unsigned char *output,
46 unsigned char *input,
47 unsigned int modulus_len);