Logo ROOT   6.16/01
Reference Guide
rsaaux.h
Go to the documentation of this file.
1/* @(#)root/auth:$Id$ */
2/* Author: Martin Nicolay 22/11/1988 */
3
4/******************************************************************************
5Copyright (C) 2006 Martin Nicolay <m.nicolay@osm-gmbh.de>
6
7This library is free software; you can redistribute it and/or
8modify it under the terms of the GNU Lesser General Public
9License as published by the Free Software Foundation; either
10version 2.1 of the License, or (at your option) any later
11version.
12
13This library is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU Lesser General Public License for more details.
17
18You should have received a copy of the GNU Lesser General Public
19License along with this library; if not, write to the Free
20Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21MA 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
49void a_div2(rsa_NUMBER*);
58int n_bits(rsa_NUMBER*, int);
60int n_cmp(rsa_INT*, rsa_INT*, int);
61int n_mult(rsa_INT*, rsa_INT, rsa_INT*, int);
62int n_sub(rsa_INT*, rsa_INT*, rsa_INT*, int, int);
64
65
66
67/******************
68 * prim.h *
69 ******************/
70
71int p_prim(rsa_NUMBER*, int);
73
74
75/******************
76 * rnd.h *
77 ******************/
78
79void gen_number(int, rsa_NUMBER*);
80void init_rnd(void);
81
82
83/******************
84 * aux.h *
85 ******************/
86
87void do_crypt(char *, char *, int, rsa_NUMBER *);
88
89/*
90int get_clear(char *, FILE *);
91int get_enc(char *, FILE *);
92int put_clear(char *, FILE *);
93int put_enc(char *, FILE *);
94*/
95
96#endif
int n_mult(rsa_INT *, rsa_INT, rsa_INT *, int)
Definition: rsaaux.cxx:379
int a_cmp(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:233
void init_rnd(void)
Definition: rsaaux.cxx:1016
void m_mult(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:638
int n_bitlen(rsa_NUMBER *)
Definition: rsaaux.cxx:721
void n_div(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:464
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:949
int p_prim(rsa_NUMBER *, int)
Definition: rsaaux.cxx:884
void m_add(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:631
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 a_div2(rsa_NUMBER *)
Definition: rsaaux.cxx:560
void a_ggt(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:668
void m_exp(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:647
int n_cmp(rsa_INT *, rsa_INT *, int)
Definition: rsaaux.cxx:218
rsa_NUMBER a_one
Definition: rsaaux.cxx:199
void a_assign(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:247
void do_crypt(char *, char *, int, rsa_NUMBER *)
Definition: rsaaux.cxx:1092
void m_init(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:616
void a_mult(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:414
rsa_NUMBER a_two
Definition: rsaaux.h:39
void a_imult(rsa_NUMBER *, rsa_INT, rsa_NUMBER *)
Definition: rsaaux.cxx:401
void gen_number(int, rsa_NUMBER *)
Definition: rsaaux.cxx:994
int n_bits(rsa_NUMBER *, int)
Definition: rsaaux.cxx:692
void a_add(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:263
void a_div(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsaaux.cxx:540
unsigned short rsa_INT
Definition: rsadef.h:37