Cryptography Reference
In-Depth Information
LINT
findprime (const LINT& pmin,
const LINT& pmax,
const LINT& f);
return a prime
p
with
pmin
≤
p
≤
pmax
and
gcd(
p
−
1
,
f
)=1
,
f
odd
LINT
findprime (USHORT l);
return a prime
p
of length
l
bits,
i.e.,
2
l
−
1
≤
p
<
2
l
LINT
findprime (USHORT l,
const LINT& f);
return a prime
p
of length
l
bits,
i.e.,
2
l
−
1
≤
p
<
2
l
and
gcd(
p
−
1
,
f
)=1
,
f
odd
LINT
gcd (const LINT& a,
const LINT& b);
return gcd of
a
and
b
LINT
introot (const LINT& a);
return the integer part of
a
LINT
introot (const LINT& a,
const USHORT b);
return the integer part of the
b
th
root of
a
LINT
inv (const LINT& a,
const LINT& b);
return the multiplicative inverse
of
a
mod
b
int
iseven (const LINT& a);
test
a
for divisibility by 2: true if
a
even
int
isodd (const LINT& a);
test
a
for divisibility by 2: true if
a
odd
int
isprime (const LINT& p
int nsp = 302, int rnds = 0);
test
p
for primality
LINT
issqr (const LINT& a);
test
a
for being a square