Cryptography Reference
In-Depth Information
Function:
calculate the least common multiple (lcm) of two
LINT objects
Syntax:
LINT
LINT::lcm (const LINT& b);
implicit argument a
factor b
Input:
lcm( a , b ) of the input values
Return:
Example:
c = a.lcm (b);
Function:
solution of a system of linear congruences
x ≡ a mod m , x ≡ b mod n ,
LINT
LINT::chinrem(const LINT& m, const LINT& b,
const LINT& n);
Syntax:
implicit argument a , modulus m ,
argument b , modulus n
Input:
solution x of the congruence system if all is ok
(Get_Warning_Status() == E_LINT_ERR indicates
that an overflow has occurred or that the
congruences have no common solution)
Return:
x = a.chinrem (m, b, n);
Example:
The friend function chinrem(int noofeq, LINT** coeff) accepts a
vector coeff of pointers to LINT objects, which are passed as coefficients
a 1 ,m 1 ,a 2 ,m 2 ,a 3 ,m 3 ,... of a system of linear congruences with “arbitrarily”
many equations x ≡ a i mod m i , i =1 ,..., noofeq (see Appendix B).
calculation of the Jacobi symbol of two LINT objects
Function:
Syntax:
int
LINT::jacobi (const LINT& b);
implicit argument a , second argument b
Input:
Return:
Jacobi symbol of the input values
i = a.jacobi (b);
Example:
 
Search WWH ::




Custom Search