]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * | |
3 | * rsa.h | |
4 | * | |
5 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | |
6 | * | |
7 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | |
8 | * All rights reserved | |
9 | * | |
10 | * Created: Fri Mar 3 22:01:06 1995 ylo | |
11 | * | |
12 | * RSA key generation, encryption and decryption. | |
13 | * | |
14 | */ | |
15 | ||
16 | /* RCSID("$Id$"); */ | |
17 | ||
18 | #ifndef RSA_H | |
19 | #define RSA_H | |
20 | ||
21 | #include "config.h" | |
22 | ||
23 | #ifdef HAVE_OPENSSL | |
24 | #include <openssl/bn.h> | |
25 | #include <openssl/rsa.h> | |
26 | #endif | |
27 | ||
28 | #ifdef HAVE_SSL | |
29 | #include <ssl/bn.h> | |
30 | #include <ssl/rsa.h> | |
31 | #endif | |
32 | ||
33 | /* Calls SSL RSA_generate_key, only copies to prv and pub */ | |
34 | void rsa_generate_key(RSA * prv, RSA * pub, unsigned int bits); | |
35 | ||
36 | /* | |
37 | * Indicates whether the rsa module is permitted to show messages on the | |
38 | * terminal. | |
39 | */ | |
40 | void rsa_set_verbose __P((int verbose)); | |
41 | ||
42 | int rsa_alive __P((void)); | |
43 | ||
44 | void rsa_public_encrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv)); | |
45 | void rsa_private_decrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv)); | |
46 | ||
47 | #endif /* RSA_H */ |