Cryptography Reference
In-Depth Information
LINT
root (void) const;
return
the
integer
part
of
the
square root of a
LINT
root (const LINT& p) const;
return the square root of a mod-
ulo an odd prime p
LINT
root (const LINT& p,
const LINT& q) const;
return the square root of a mod-
ulo p*q , where p and q are odd
primes
int
twofact (LINT& odd) const;
return the even part of a , odd
contains the odd part of a
LINT
xgcd (const LINT& b,
LINT& u, int& sign_u,
LINT& v, int& sign_v)
const;
extended Euclidean algorithm
with return of gcd of a and b ,
u and v contain the absolute
values of the factors of the linear
combination g = sign_u*u*a +
sign_v*v*b
B.10 Number-Theoretic Friend Functions
LINT
chinrem (unsigned noofeq,
LINT** coeff);
return a solution of a system of si-
multaneous linear congruences.
In coeff is passed a vector of
pointers to LINT objects as coef-
ficients a1 , m1 , a2 , m2 , a3 , m3 , ...
of the congruence system with
noofeq equations x
a i mod m i
LINT
extendprime (const LINT& pmin,
const LINT& pmax,
const LINT& a,
const LINT& q,
const LINT& f);
return a prime p with pmin
pmax ,with p a mod q and
gcd( p 1 , f )=1 , f odd
p
LINT
extendprime (USHORT l,
const LINT& a,
const LINT& q,
const LINT& f);
return a prime p of length l bits,
i.e., 2 l 1
p < 2 l ,with p
a mod q and gcd( p 1 , f )=1 ,
f odd
 
Search WWH ::




Custom Search