B.5 Modular Arithmetic: Member Functions

Team-Fly

B.5 Modular Arithmetic: Member Functions

 const LINT& mod (const LINT& m); 

remainder b = a.mod (m);

 const LINT& mod2 (const USHORT u); 

remainder modulo power of two 2u, b = a.mod (u);

 const int mequ (const LINT& b,      const LINT& m) const; 

comparison of a and b modulo m if (a.mequ (b, m)) ...

 const LINT& madd (const LINT& b,      const LINT& m); 

modular addition, c = a.madd (b, m);

 const LINT& msub (const LINT& b,      const LINT& m); 

modular subtraction, c = a.msub(b, m);

 const LINT& mmul (const LINT& b,      const LINT& m); 

modular multiplication, c = a.mmul (b, m);

 const LINT& msqr (const LINT& m); 

modular squaring, c = a.msqr (m);

 const LINT& mexp (const LINT& e,      const LINT& m); 

modular exponentiation with Montgomery reduction for odd modulus m,c = a.mexp (e, m);

 const LINT& mexp (const USHORT u,      const LINT& m); 

modular exponentiation with USHORT exponent, Montgomery reduction for odd modulus m, c = a.mexp (u, m);

 const LINT& mexp5m (const LINT& e,      const LINT& m); 

modular exponentiation with Montgomery reduction for odd modulus m,c = a.mexp5m (e, m);

 const LINT& mexpkm (const LINT& e,      const LINT& m); 

modular exponentiation with Montgomery reduction for odd modulus m, c = a.mexpkm (e, m);

 const LINT& mexp2 (const USHORT u,     const LINT& m); 

modular exponentiation with power of two exponent 2u, c = a.mexp2 (u, m);


Team-Fly


Cryptography in C and C++
Cryptography in C and C++
ISBN: 189311595X
EAN: 2147483647
Year: 2001
Pages: 127

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net