blob: 485a94dcdeeaf77a8215a9b4c0ec656193aa74da [file] [log] [blame]
Damien Millerd4a8b7e1999-10-27 13:42:43 +10001/*
Damien Miller95def091999-11-25 00:26:21 +11002 *
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 *
Damien Millerd4a8b7e1999-10-27 13:42:43 +100014*/
15
Damien Miller5428f641999-11-25 11:54:57 +110016/* RCSID("$Id: rsa.h,v 1.5 1999/11/25 00:54:59 damien Exp $"); */
Damien Millerd4a8b7e1999-10-27 13:42:43 +100017
18#ifndef RSA_H
19#define RSA_H
20
Damien Miller95def091999-11-25 00:26:21 +110021#include "config.h"
22
Damien Miller7f6ea021999-10-28 13:25:17 +100023#ifdef HAVE_OPENSSL
Damien Millerd4a8b7e1999-10-27 13:42:43 +100024#include <openssl/bn.h>
25#include <openssl/rsa.h>
Damien Miller7f6ea021999-10-28 13:25:17 +100026#endif
27
28#ifdef HAVE_SSL
29#include <ssl/bn.h>
30#include <ssl/rsa.h>
31#endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +100032
33/* Calls SSL RSA_generate_key, only copies to prv and pub */
Damien Miller95def091999-11-25 00:26:21 +110034void rsa_generate_key(RSA * prv, RSA * pub, unsigned int bits);
Damien Millerd4a8b7e1999-10-27 13:42:43 +100035
Damien Miller5428f641999-11-25 11:54:57 +110036/*
37 * Indicates whether the rsa module is permitted to show messages on the
38 * terminal.
39 */
Damien Miller95def091999-11-25 00:26:21 +110040void rsa_set_verbose __P((int verbose));
Damien Millerd4a8b7e1999-10-27 13:42:43 +100041
Damien Miller95def091999-11-25 00:26:21 +110042int rsa_alive __P((void));
Damien Millerd4a8b7e1999-10-27 13:42:43 +100043
Damien Miller95def091999-11-25 00:26:21 +110044void rsa_public_encrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv));
45void rsa_private_decrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv));
Damien Millerd4a8b7e1999-10-27 13:42:43 +100046
Damien Miller95def091999-11-25 00:26:21 +110047#endif /* RSA_H */