Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 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 | |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 16 | /* RCSID("$Id: rsa.h,v 1.3 1999/11/10 23:40:23 damien Exp $"); */ |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 17 | #include "config.h" |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 18 | |
| 19 | #ifndef RSA_H |
| 20 | #define RSA_H |
| 21 | |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 22 | #ifdef HAVE_OPENSSL |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 23 | #include <openssl/bn.h> |
| 24 | #include <openssl/rsa.h> |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 25 | #endif |
| 26 | |
| 27 | #ifdef HAVE_SSL |
| 28 | #include <ssl/bn.h> |
| 29 | #include <ssl/rsa.h> |
| 30 | #endif |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 31 | |
| 32 | /* Calls SSL RSA_generate_key, only copies to prv and pub */ |
| 33 | void rsa_generate_key(RSA *prv, RSA *pub, unsigned int bits); |
| 34 | |
| 35 | /* Indicates whether the rsa module is permitted to show messages on |
| 36 | the terminal. */ |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 37 | void rsa_set_verbose(int verbose); |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 38 | |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 39 | int rsa_alive(void); |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 40 | |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 41 | void rsa_public_encrypt(BIGNUM *out, BIGNUM *in, RSA *prv); |
| 42 | void rsa_private_decrypt(BIGNUM *out, BIGNUM *in, RSA *prv); |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 43 | |
| 44 | #endif /* RSA_H */ |