Logo ROOT  
Reference Guide
rsaaux.cxx File Reference
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
#include "rsaaux.h"
#include "rsalib.h"
Include dependency graph for rsaaux.cxx:

Functions

void a_add (rsa_NUMBER *s1, rsa_NUMBER *s2, rsa_NUMBER *d)
 
void a_assign (rsa_NUMBER *d, rsa_NUMBER *s)
 
int a_cmp (rsa_NUMBER *c1, rsa_NUMBER *c2)
 
void a_div (rsa_NUMBER *d1, rsa_NUMBER *d2, rsa_NUMBER *q, rsa_NUMBER *r)
 
void a_div2 (rsa_NUMBER *n)
 
void a_ggt (rsa_NUMBER *a, rsa_NUMBER *b, rsa_NUMBER *f)
 
void a_imult (rsa_NUMBER *n, rsa_INT m, rsa_NUMBER *d)
 
void a_mult (rsa_NUMBER *m1, rsa_NUMBER *m2, rsa_NUMBER *d)
 
void a_sub (rsa_NUMBER *s1, rsa_NUMBER *s2, rsa_NUMBER *d)
 
static int aux_rand ()
 rand() implementation using /udev/random or /dev/random, if available More...
 
void do_crypt (char *s, char *d, int len, rsa_NUMBER *e)
 
void gen_number (int len, rsa_NUMBER *n)
 
void init_rnd ()
 
void inv (rsa_NUMBER *d, rsa_NUMBER *phi, rsa_NUMBER *e)
 
static int jak_f (rsa_NUMBER *)
 
static int jak_g (rsa_NUMBER *, rsa_NUMBER *)
 
static int jakobi (rsa_NUMBER *, rsa_NUMBER *)
 
void m_add (rsa_NUMBER *s1, rsa_NUMBER *s2, rsa_NUMBER *d)
 
void m_exp (rsa_NUMBER *x, rsa_NUMBER *n, rsa_NUMBER *z)
 
void m_init (rsa_NUMBER *n, rsa_NUMBER *o)
 
void m_mult (rsa_NUMBER *m1, rsa_NUMBER *m2, rsa_NUMBER *d)
 
int n_bitlen (rsa_NUMBER *n)
 
int n_bits (rsa_NUMBER *n, int b)
 
int n_cmp (rsa_INT *i1, rsa_INT *i2, int l)
 
void n_div (rsa_NUMBER *d1, rsa_NUMBER *z2, rsa_NUMBER *q, rsa_NUMBER *r)
 
int n_mult (rsa_INT *n, rsa_INT m, rsa_INT *d, int l)
 
int n_sub (rsa_INT *p1, rsa_INT *p2, rsa_INT *p3, int l, int lo)
 
int p_prim (rsa_NUMBER *n, int m)
 

Variables

rsa_NUMBER a_one
 
rsa_NUMBER a_two
 
static rsa_NUMBER g_mod_z2 [rsa_MAXBIT]
 

Function Documentation

◆ a_add()

void a_add ( rsa_NUMBER s1,
rsa_NUMBER s2,
rsa_NUMBER d 
)

Definition at line 263 of file rsaaux.cxx.

◆ a_assign()

void a_assign ( rsa_NUMBER d,
rsa_NUMBER s 
)

Definition at line 247 of file rsaaux.cxx.

◆ a_cmp()

int a_cmp ( rsa_NUMBER c1,
rsa_NUMBER c2 
)

Definition at line 233 of file rsaaux.cxx.

◆ a_div()

void a_div ( rsa_NUMBER d1,
rsa_NUMBER d2,
rsa_NUMBER q,
rsa_NUMBER r 
)

Definition at line 540 of file rsaaux.cxx.

◆ a_div2()

void a_div2 ( rsa_NUMBER n)

Definition at line 560 of file rsaaux.cxx.

◆ a_ggt()

void a_ggt ( rsa_NUMBER a,
rsa_NUMBER b,
rsa_NUMBER f 
)

Definition at line 668 of file rsaaux.cxx.

◆ a_imult()

void a_imult ( rsa_NUMBER n,
rsa_INT  m,
rsa_NUMBER d 
)

Definition at line 401 of file rsaaux.cxx.

◆ a_mult()

void a_mult ( rsa_NUMBER m1,
rsa_NUMBER m2,
rsa_NUMBER d 
)

Definition at line 414 of file rsaaux.cxx.

◆ a_sub()

void a_sub ( rsa_NUMBER s1,
rsa_NUMBER s2,
rsa_NUMBER d 
)

Definition at line 369 of file rsaaux.cxx.

◆ aux_rand()

static int aux_rand ( )
static

rand() implementation using /udev/random or /dev/random, if available

Definition at line 167 of file rsaaux.cxx.

◆ do_crypt()

void do_crypt ( char *  s,
char *  d,
int  len,
rsa_NUMBER e 
)

Definition at line 1092 of file rsaaux.cxx.

◆ gen_number()

void gen_number ( int  len,
rsa_NUMBER n 
)

Definition at line 994 of file rsaaux.cxx.

◆ init_rnd()

void init_rnd ( void  )

Definition at line 1016 of file rsaaux.cxx.

◆ inv()

void inv ( rsa_NUMBER d,
rsa_NUMBER phi,
rsa_NUMBER e 
)

Definition at line 949 of file rsaaux.cxx.

◆ jak_f()

static int jak_f ( rsa_NUMBER n)
static

Definition at line 797 of file rsaaux.cxx.

◆ jak_g()

static int jak_g ( rsa_NUMBER a,
rsa_NUMBER n 
)
static

Definition at line 811 of file rsaaux.cxx.

◆ jakobi()

static int jakobi ( rsa_NUMBER a,
rsa_NUMBER n 
)
static

Definition at line 827 of file rsaaux.cxx.

◆ m_add()

void m_add ( rsa_NUMBER s1,
rsa_NUMBER s2,
rsa_NUMBER d 
)

Definition at line 631 of file rsaaux.cxx.

◆ m_exp()

void m_exp ( rsa_NUMBER x,
rsa_NUMBER n,
rsa_NUMBER z 
)

Definition at line 647 of file rsaaux.cxx.

◆ m_init()

void m_init ( rsa_NUMBER n,
rsa_NUMBER o 
)

Definition at line 616 of file rsaaux.cxx.

◆ m_mult()

void m_mult ( rsa_NUMBER m1,
rsa_NUMBER m2,
rsa_NUMBER d 
)

Definition at line 638 of file rsaaux.cxx.

◆ n_bitlen()

int n_bitlen ( rsa_NUMBER n)

Definition at line 721 of file rsaaux.cxx.

◆ n_bits()

int n_bits ( rsa_NUMBER n,
int  b 
)

Definition at line 692 of file rsaaux.cxx.

◆ n_cmp()

int n_cmp ( rsa_INT i1,
rsa_INT i2,
int  l 
)

Definition at line 218 of file rsaaux.cxx.

◆ n_div()

void n_div ( rsa_NUMBER d1,
rsa_NUMBER z2,
rsa_NUMBER q,
rsa_NUMBER r 
)

Definition at line 464 of file rsaaux.cxx.

◆ n_mult()

int n_mult ( rsa_INT n,
rsa_INT  m,
rsa_INT d,
int  l 
)

Definition at line 379 of file rsaaux.cxx.

◆ n_sub()

int n_sub ( rsa_INT p1,
rsa_INT p2,
rsa_INT p3,
int  l,
int  lo 
)

Definition at line 323 of file rsaaux.cxx.

◆ p_prim()

int p_prim ( rsa_NUMBER n,
int  m 
)

Definition at line 884 of file rsaaux.cxx.

Variable Documentation

◆ a_one

rsa_NUMBER a_one
Initial value:
= {
1,
{ (rsa_INT)1, },
}
unsigned short rsa_INT
Definition: rsadef.h:37

Definition at line 199 of file rsaaux.cxx.

◆ a_two

rsa_NUMBER a_two
Initial value:
= {
1,
{ (rsa_INT)2, },
}

Definition at line 204 of file rsaaux.cxx.

◆ g_mod_z2

rsa_NUMBER g_mod_z2[rsa_MAXBIT]
static

Definition at line 611 of file rsaaux.cxx.