Logo ROOT   6.08/07
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 #ifndef _RSADEF_H
38 #include "rsadef.h"
39 #endif
40 
41 extern rsa_NUMBER a_one,a_two;
42 
43 /*
44  * Prototypes
45  */
46 
51 void a_div2(rsa_NUMBER*);
60 int n_bits(rsa_NUMBER*, int);
62 int n_cmp(rsa_INT*, rsa_INT*, int);
63 int n_mult(rsa_INT*, rsa_INT, rsa_INT*, int);
64 int n_sub(rsa_INT*, rsa_INT*, rsa_INT*, int, int);
65 int n_bitlen(rsa_NUMBER*);
66 
67 
68 
69 /******************
70  * prim.h *
71  ******************/
72 
73 int p_prim(rsa_NUMBER*, int);
75 
76 
77 /******************
78  * rnd.h *
79  ******************/
80 
81 void gen_number(int, rsa_NUMBER*);
82 void init_rnd(void);
83 
84 
85 /******************
86  * aux.h *
87  ******************/
88 
89 void do_crypt(char *, char *, int, rsa_NUMBER *);
90 
91 /*
92 int get_clear(char *, FILE *);
93 int get_enc(char *, FILE *);
94 int put_clear(char *, FILE *);
95 int put_enc(char *, FILE *);
96 */
97 
98 #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