]>
Commit | Line | Data |
---|---|---|
8efc0c15 | 1 | /* |
5260325f | 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 | * | |
8efc0c15 | 14 | */ |
15 | ||
16 | /* RCSID("$Id$"); */ | |
17 | ||
18 | #ifndef RSA_H | |
19 | #define RSA_H | |
20 | ||
5260325f | 21 | #include "config.h" |
22 | ||
5881cd60 | 23 | #ifdef HAVE_OPENSSL |
8efc0c15 | 24 | #include <openssl/bn.h> |
25 | #include <openssl/rsa.h> | |
69c76614 | 26 | #include <openssl/rand.h> |
5881cd60 | 27 | #endif |
28 | ||
29 | #ifdef HAVE_SSL | |
30 | #include <ssl/bn.h> | |
31 | #include <ssl/rsa.h> | |
69c76614 | 32 | #include <ssl/rand.h> |
5881cd60 | 33 | #endif |
8efc0c15 | 34 | |
35 | /* Calls SSL RSA_generate_key, only copies to prv and pub */ | |
5260325f | 36 | void rsa_generate_key(RSA * prv, RSA * pub, unsigned int bits); |
8efc0c15 | 37 | |
aa3378df | 38 | /* |
39 | * Indicates whether the rsa module is permitted to show messages on the | |
40 | * terminal. | |
41 | */ | |
5260325f | 42 | void rsa_set_verbose __P((int verbose)); |
8efc0c15 | 43 | |
5260325f | 44 | int rsa_alive __P((void)); |
8efc0c15 | 45 | |
5260325f | 46 | void rsa_public_encrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv)); |
47 | void rsa_private_decrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv)); | |
8efc0c15 | 48 | |
5260325f | 49 | #endif /* RSA_H */ |