63 }
while ( !prim.
n_len );
66 a_mult( &prim, &a_three, &prim );
74 a_add( &prim, &a_four, &prim );
88 if ( !
a_cmp( &p1, &p2) )
return 1;
90 if (
a_cmp( &p1, &p2) > 0)
171 memcpy(bufin,bufout,lout);
206 memcpy(bufin,bufout,lout);
250static const char *
gHEX=
"0123456789ABCDEF";
251static const char *
ghex=
"0123456789abcdef";
269 for ( i=1; i<16; i++)
278#if rsa_MAXINT == ( (1 << rsa_MAXBIT) - 1 )
285 ab = 4 - (bi + 3) % 4 -1;
286 p = &
n->n_part[
n->n_len -1];
288 if ( (bi+3) / 4 >=
l )
294 b |= (
unsigned long)*
p--;
299 b &= ( 1L << (ab - 4)) -1L;
315 int i,
b,
p,
len,low,high;
325 for (;
q.n_len &&
len > 1;
len --) {
327 for (
p=8,
b=0, i=3; i >= 0; i--,
p /= 2) {
359 for (j=0,
np=n_print; *
np ;
np++, j++) {
376#if rsa_MAXINT == ( (1 << rsa_MAXBIT) - 1 )
386 p = &
n->n_part[ i -1 ];
394 if ( (hp = strchr(
gHEX, *s )) )
396 else if ((hp = strchr(
ghex, *s )) )
403 b |= (
unsigned long)i;
433 while ( (
c = *s++ & 0xFF)) {
434 if (
p= strchr(
gHEX,
c) )
436 else if (
p= strchr(
ghex,
c) )
458 while ( (
c=getc(
f)) != EOF && ( isxdigit(
c) || isspace(
c)) ) {
480 if ( (
l=
c1->n_len) !=
c2->n_len)
481 return(
l -
c2->n_len);
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
int a_cmp(rsa_NUMBER *, rsa_NUMBER *)
int n_bitlen(rsa_NUMBER *)
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
int p_prim(rsa_NUMBER *, int)
void a_sub(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
void a_ggt(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
int n_cmp(rsa_INT *, rsa_INT *, int)
void a_assign(rsa_NUMBER *, rsa_NUMBER *)
void do_crypt(char *, char *, int, rsa_NUMBER *)
void m_init(rsa_NUMBER *, rsa_NUMBER *)
void a_mult(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
void gen_number(int, rsa_NUMBER *)
void a_add(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
void a_div(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
static TRSA_fun g_rsa_init & rsa_genprim
int rsa_genrsa(rsa_NUMBER p1, rsa_NUMBER p2, rsa_NUMBER *n, rsa_NUMBER *e, rsa_NUMBER *d)
int rsa_num_fget(rsa_NUMBER *n, FILE *f)
int rsa_num_sput(rsa_NUMBER *n, char *s, int l)
int rsa_decode(char *bufin, int lin, rsa_NUMBER n, rsa_NUMBER e)
int rsa_cmp(rsa_NUMBER *c1, rsa_NUMBER *c2)
int rsa_num_fput(rsa_NUMBER *n, FILE *f)
void rsa_assign(rsa_NUMBER *d, rsa_NUMBER *s)
int rsa_encode_size(rsa_NUMBER n)
static rsa_NUMBER gbits[9]
int rsa_num_sget(rsa_NUMBER *n, char *s)
int rsa_encode(char *bufin, int lin, rsa_NUMBER n, rsa_NUMBER e)
static rsa_NUMBER gint16[16]
rsa_INT n_part[(300 *8/(16+1))]