Initial revision
[silc.git] / lib / silccrypt / rsa.h
1 /*
2
3   rsa.h
4
5   Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
6
7   Copyright (C) 1997 - 2000 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; either version 2 of the License, or
12   (at your option) any later version.
13   
14   This program is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   GNU General Public License for more details.
18
19 */
20
21 #ifndef RSA_H
22 #define RSA_H
23
24 #include "rsa_internal.h"
25
26 /* Data context for RSA */
27 typedef struct {
28   SilcInt src;
29   SilcInt dst;
30   SilcInt exp;
31   SilcInt mod;
32 } RsaDataContext;
33
34 RsaDataContext *silc_rsa_data_context;
35
36 /*
37  * SILC PKCS API for RSA
38  */
39
40 SILC_PKCS_API_INIT(rsa);
41 SILC_PKCS_API_CLEAR_KEYS(rsa);
42 SILC_PKCS_API_GET_PUBLIC_KEY(rsa);
43 SILC_PKCS_API_GET_PRIVATE_KEY(rsa);
44 SILC_PKCS_API_SET_PUBLIC_KEY(rsa);
45 SILC_PKCS_API_SET_PRIVATE_KEY(rsa);
46 SILC_PKCS_API_CONTEXT_LEN(rsa);
47 SILC_PKCS_API_DATA_CONTEXT_LEN(rsa);
48 SILC_PKCS_API_SET_ARG(rsa);
49 SILC_PKCS_API_ENCRYPT(rsa);
50 SILC_PKCS_API_DECRYPT(rsa);
51 SILC_PKCS_API_SIGN(rsa);
52 SILC_PKCS_API_VERIFY(rsa);
53
54
55 #endif