rsaaux.h

Go to the documentation of this file.
00001 /* @(#)root/auth:$Id: rsaaux.h 30749 2009-10-15 16:33:04Z brun $ */
00002 /* Author: Martin Nicolay  22/11/1988 */
00003 
00004 /******************************************************************************
00005 Copyright (C) 2006 Martin Nicolay <m.nicolay@osm-gmbh.de>
00006 
00007 This library is free software; you can redistribute it and/or
00008 modify it under the terms of the GNU Lesser General Public
00009 License as published by the Free Software Foundation; either
00010 version 2.1 of the License, or (at your option) any later
00011 version.
00012 
00013 This library is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU Lesser General Public License for more details.
00017 
00018 You should have received a copy of the GNU Lesser General Public
00019 License along with this library; if not, write to the Free
00020 Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
00021 MA  02110-1301  USA
00022 ******************************************************************************/
00023 
00024 /*******************************************************************************
00025 *                                                                                                                      *
00026 *       Simple RSA public key code.                                            *
00027 *       Adaptation in library for ROOT by G. Ganis, July 2003                  *
00028 *       (gerardo.ganis@cern.ch)                                                *
00029 *                                                                                                                           *
00030 *       Header used by internal rsa functions                                   *
00031 *                                                                                                                           *
00032 *******************************************************************************/
00033 
00034 #ifndef _RSAAUX_H
00035 #define _RSAAUX_H
00036 
00037 #ifndef _RSADEF_H
00038 #include "rsadef.h"
00039 #endif
00040 
00041 extern rsa_NUMBER a_one,a_two;
00042 
00043 /*
00044  * Prototypes
00045  */
00046 
00047 void    a_add(rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*);
00048 void    a_assign(rsa_NUMBER*, rsa_NUMBER*);
00049 int     a_cmp(rsa_NUMBER*, rsa_NUMBER*);
00050 void    a_div(rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*);
00051 void    a_div2(rsa_NUMBER*);
00052 void    a_ggt(rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*);
00053 void    a_imult(rsa_NUMBER*, rsa_INT, rsa_NUMBER*);
00054 void    a_mult(rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*);
00055 void    a_sub(rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*);
00056 void    m_init(rsa_NUMBER*, rsa_NUMBER*);
00057 void    m_add(rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*);
00058 void    m_mult(rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*);
00059 void    m_exp(rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*);
00060 int     n_bits(rsa_NUMBER*, int);
00061 void    n_div(rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*);
00062 int     n_cmp(rsa_INT*, rsa_INT*, int);
00063 int     n_mult(rsa_INT*, rsa_INT, rsa_INT*, int);
00064 int     n_sub(rsa_INT*, rsa_INT*, rsa_INT*, int, int);
00065 int     n_bitlen(rsa_NUMBER*);
00066 
00067 
00068 
00069 /******************
00070  * prim.h         *
00071  ******************/
00072 
00073 int     p_prim(rsa_NUMBER*, int);
00074 void    inv(rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*);
00075 
00076 
00077 /******************
00078  * rnd.h          *
00079  ******************/
00080 
00081 void    gen_number(int, rsa_NUMBER*);
00082 void    init_rnd(void);
00083 
00084 
00085 /******************
00086  * aux.h          *
00087  ******************/
00088 
00089 void   do_crypt(char *, char *, int, rsa_NUMBER *);
00090 
00091 /*
00092 int    get_clear(char *, FILE *);
00093 int    get_enc(char *, FILE *);
00094 int    put_clear(char *, FILE *);
00095 int    put_enc(char *, FILE *);
00096 */
00097 
00098 #endif

Generated on Tue Jul 5 14:26:29 2011 for ROOT_528-00b_version by  doxygen 1.5.1