Logo ROOT   6.14/05
Reference Guide
rsaaux.h
Go to the documentation of this file.
1 /* @(#)root/auth:$Id$ */
2 /* Author: Martin Nicolay 22/11/1988 */
3 
4 /******************************************************************************
5 Copyright (C) 2006 Martin Nicolay <m.nicolay@osm-gmbh.de>
6 
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later
11 version.
12 
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU Lesser General Public License for more details.
17 
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free
20 Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21 MA 02110-1301 USA
22 ******************************************************************************/
23 
24 /*******************************************************************************
25 * *
26 * Simple RSA public key code. *
27 * Adaptation in library for ROOT by G. Ganis, July 2003 *
28 * (gerardo.ganis@cern.ch) *
29 * *
30 * Header used by internal rsa functions *
31 * *
32 *******************************************************************************/
33 
34 #ifndef _RSAAUX_H
35 #define _RSAAUX_H
36 
37 #include "rsadef.h"
38 
39 extern rsa_NUMBER a_one,a_two;
40 
41 /*
42  * Prototypes
43  */
44 
49 void a_div2(rsa_NUMBER*);
58 int n_bits(rsa_NUMBER*, int);
60 int n_cmp(rsa_INT*, rsa_INT*, int);
61 int n_mult(rsa_INT*, rsa_INT, rsa_INT*, int);
62 int n_sub(rsa_INT*, rsa_INT*, rsa_INT*, int, int);
63 int n_bitlen(rsa_NUMBER*);
64 
65 
66 
67 /******************
68  * prim.h *
69  ******************/
70 
71 int p_prim(rsa_NUMBER*, int);
73 
74 
75 /******************
76  * rnd.h *
77  ******************/
78 
79 void gen_number(int, rsa_NUMBER*);
80 void init_rnd(void);
81 
82 
83 /******************
84  * aux.h *
85  ******************/
86 
87 void do_crypt(char *, char *, int, rsa_NUMBER *);
88 
89 /*
90 int get_clear(char *, FILE *);
91 int get_enc(char *, FILE *);
92 int put_clear(char *, FILE *);
93 int put_enc(char *, FILE *);
94 */
95 
96 #endif
int p_prim(rsa_NUMBER *, int)
Definition: rsaaux.cxx:884
int n_bits(rsa_NUMBER *, int)
Definition: rsaaux.cxx:692
unsigned short rsa_INT
Definition: rsadef.h:37
void n_div(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:464
void a_assign(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:247
void do_crypt(char *, char *, int, rsa_NUMBER *)
Definition: rsaaux.cxx:1092
void a_ggt(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:668
rsa_NUMBER a_one
Definition: rsaaux.cxx:199
int n_mult(rsa_INT *, rsa_INT, rsa_INT *, int)
Definition: rsaaux.cxx:379
void m_exp(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:647
void a_imult(rsa_NUMBER *, rsa_INT, rsa_NUMBER *)
Definition: rsaaux.cxx:401
void a_div(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:540
void a_add(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:263
void a_div2(rsa_NUMBER *)
Definition: rsaaux.cxx:560
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:949
void a_sub(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:369
int n_sub(rsa_INT *, rsa_INT *, rsa_INT *, int, int)
Definition: rsaaux.cxx:323
void m_init(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:616
rsa_NUMBER a_two
Definition: rsaaux.cxx:204
void m_add(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:631
void m_mult(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:638
void gen_number(int, rsa_NUMBER *)
Definition: rsaaux.cxx:994
void init_rnd(void)
Definition: rsaaux.cxx:1016
int n_bitlen(rsa_NUMBER *)
Definition: rsaaux.cxx:721
int n_cmp(rsa_INT *, rsa_INT *, int)
Definition: rsaaux.cxx:218
int a_cmp(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:233
void a_mult(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:414