Logo ROOT  
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 
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
n_cmp
int n_cmp(rsa_INT *, rsa_INT *, int)
Definition: rsaaux.cxx:218
a_cmp
int a_cmp(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:233
init_rnd
void init_rnd(void)
Definition: rsaaux.cxx:1016
a_imult
void a_imult(rsa_NUMBER *, rsa_INT, rsa_NUMBER *)
Definition: rsaaux.cxx:401
inv
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:949
gen_number
void gen_number(int, rsa_NUMBER *)
Definition: rsaaux.cxx:994
a_div
void a_div(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:540
do_crypt
void do_crypt(char *, char *, int, rsa_NUMBER *)
Definition: rsaaux.cxx:1092
n_bitlen
int n_bitlen(rsa_NUMBER *)
Definition: rsaaux.cxx:721
n_div
void n_div(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:464
n_mult
int n_mult(rsa_INT *, rsa_INT, rsa_INT *, int)
Definition: rsaaux.cxx:379
a_assign
void a_assign(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:247
a_add
void a_add(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:263
p_prim
int p_prim(rsa_NUMBER *, int)
Definition: rsaaux.cxx:884
m_add
void m_add(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:631
m_init
void m_init(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:616
a_ggt
void a_ggt(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:668
m_mult
void m_mult(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:638
a_two
rsa_NUMBER a_two
Definition: rsaaux.h:39
a_mult
void a_mult(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:414
rsa_INT
unsigned short rsa_INT
Definition: rsadef.h:37
a_div2
void a_div2(rsa_NUMBER *)
Definition: rsaaux.cxx:560
m_exp
void m_exp(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:647
n_sub
int n_sub(rsa_INT *, rsa_INT *, rsa_INT *, int, int)
Definition: rsaaux.cxx:323
rsadef.h
n_bits
int n_bits(rsa_NUMBER *, int)
Definition: rsaaux.cxx:692
a_one
rsa_NUMBER a_one
Definition: rsaaux.cxx:199
rsa_NUMBER
Definition: rsadef.h:104
a_sub
void a_sub(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:369