Cryptography Reference
In-Depth Information
Function:
modular exponentiation
( 2 5 -ary method, Montgomery reduction)
Syntax:
const LINT& LINT::mexp5m (const LINT& e,
const LINT& m);
Input:
implicit argument (base)
e (exponent)
m (odd modulus)
Return:
pointer to the implicit argument, which contains
the power modulo m
a.mexp5m (e, m);
Example:
Function:
left/right shift
const LINT& LINT::shift (int noofbits);
Syntax:
Input:
implicit argument (multiplicand/dividend)
(+/-) noofbits (number of bit positions to be
shifted)
Return:
pointer to the implicit argument, which contains
the result of the shift operation
a.shift (512); executes the operation a <<= 512;
Example:
Function:
test for divisibility by 2 of a LINT object
int
LINT::iseven (void);
Syntax:
test candidate a as implicit argument
Input:
1if a is odd, 0 otherwise
Return:
if(a.iseven ()) // ...
Example:
 
Search WWH ::




Custom Search