blob: 672f20d49e518d118ff9bf448eccd96484784efe [file] [log] [blame]
Damien Millerd4a8b7e1999-10-27 13:42:43 +10001/*
Damien Miller4af51302000-04-16 11:18:38 +10002 *
Damien Miller95def091999-11-25 00:26:21 +11003 * rsa.h
Damien Miller4af51302000-04-16 11:18:38 +10004 *
Damien Miller95def091999-11-25 00:26:21 +11005 * Author: Tatu Ylonen <ylo@cs.hut.fi>
Damien Miller4af51302000-04-16 11:18:38 +10006 *
Damien Miller95def091999-11-25 00:26:21 +11007 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved
Damien Miller4af51302000-04-16 11:18:38 +10009 *
Damien Miller95def091999-11-25 00:26:21 +110010 * Created: Fri Mar 3 22:01:06 1995 ylo
Damien Miller4af51302000-04-16 11:18:38 +100011 *
Damien Miller95def091999-11-25 00:26:21 +110012 * RSA key generation, encryption and decryption.
Damien Miller4af51302000-04-16 11:18:38 +100013 *
Damien Millerd4a8b7e1999-10-27 13:42:43 +100014*/
15
Damien Miller5f056372000-04-16 12:31:48 +100016/* RCSID("$Id: rsa.h,v 1.9 2000/04/16 02:31:51 damien Exp $"); */
Damien Millerd4a8b7e1999-10-27 13:42:43 +100017
18#ifndef RSA_H
19#define RSA_H
20
21#include <openssl/bn.h>
22#include <openssl/rsa.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100023
24/* Calls SSL RSA_generate_key, only copies to prv and pub */
Damien Miller95def091999-11-25 00:26:21 +110025void rsa_generate_key(RSA * prv, RSA * pub, unsigned int bits);
Damien Millerd4a8b7e1999-10-27 13:42:43 +100026
Damien Miller5428f641999-11-25 11:54:57 +110027/*
28 * Indicates whether the rsa module is permitted to show messages on the
29 * terminal.
30 */
Damien Miller95def091999-11-25 00:26:21 +110031void rsa_set_verbose __P((int verbose));
Damien Millerd4a8b7e1999-10-27 13:42:43 +100032
Damien Miller95def091999-11-25 00:26:21 +110033int rsa_alive __P((void));
Damien Millerd4a8b7e1999-10-27 13:42:43 +100034
Damien Miller95def091999-11-25 00:26:21 +110035void rsa_public_encrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv));
36void rsa_private_decrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv));
Damien Millerd4a8b7e1999-10-27 13:42:43 +100037
Damien Miller95def091999-11-25 00:26:21 +110038#endif /* RSA_H */