blob: c19b5a965cbe59483dfe2072b320e40332794837 [file] [log] [blame]
Damien Millerd4a8b7e1999-10-27 13:42:43 +10001/*
2
3rsa.h
4
5Author: Tatu Ylonen <ylo@cs.hut.fi>
6
7Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 All rights reserved
9
10Created: Fri Mar 3 22:01:06 1995 ylo
11
12RSA key generation, encryption and decryption.
13
14*/
15
Damien Millerab18c411999-11-11 10:40:23 +110016/* RCSID("$Id: rsa.h,v 1.3 1999/11/10 23:40:23 damien Exp $"); */
Damien Miller7f6ea021999-10-28 13:25:17 +100017#include "config.h"
Damien Millerd4a8b7e1999-10-27 13:42:43 +100018
19#ifndef RSA_H
20#define RSA_H
21
Damien Miller7f6ea021999-10-28 13:25:17 +100022#ifdef HAVE_OPENSSL
Damien Millerd4a8b7e1999-10-27 13:42:43 +100023#include <openssl/bn.h>
24#include <openssl/rsa.h>
Damien Miller7f6ea021999-10-28 13:25:17 +100025#endif
26
27#ifdef HAVE_SSL
28#include <ssl/bn.h>
29#include <ssl/rsa.h>
30#endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +100031
32/* Calls SSL RSA_generate_key, only copies to prv and pub */
33void 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 Millerab18c411999-11-11 10:40:23 +110037void rsa_set_verbose(int verbose);
Damien Millerd4a8b7e1999-10-27 13:42:43 +100038
Damien Millerab18c411999-11-11 10:40:23 +110039int rsa_alive(void);
Damien Millerd4a8b7e1999-10-27 13:42:43 +100040
Damien Millerab18c411999-11-11 10:40:23 +110041void rsa_public_encrypt(BIGNUM *out, BIGNUM *in, RSA *prv);
42void rsa_private_decrypt(BIGNUM *out, BIGNUM *in, RSA *prv);
Damien Millerd4a8b7e1999-10-27 13:42:43 +100043
44#endif /* RSA_H */