Cryptography Reference
In-Depth Information
if (status == E_LINT_INV) panic (E_LINT_VAL, "mexp", 1, __LINE__);
if (status == E_LINT_INV) panic (E_LINT_VAL, "mexp", 2, __LINE__);
err = mexp_l (n_l, e.n_l, n_l, m.n_l);
/* mexp_l() uses mexpk_l() or mexpkm_l() */
switch (error)
{
case 0:
status = E_LINT_OK;
break;
case E_CLINT_DBZ:
panic (E_LINT_DBZ, "mexp", 2, __LINE__);
break;
default:
panic (E_LINT_ERR, "mexp", error, __LINE__);
}
return *this;
}
Function:
Modular exponentiation
const LINT&
LINT::mexp (USHORT e, const LINT& m);
Syntax:
a.mexp (e, m);
Example:
const LINT& LINT::mexp (USHORT e, const LINT& m)
{
int err;
if (status == E_LINT_INV) panic (E_LINT_VAL, "mexp", 0, __LINE__);
if (status == E_LINT_INV) panic (E_LINT_VAL, "mexp", 1, __LINE__);
err = umexp_l (n_l, e, n_l, m.n_l);
switch (err)
{
// Code as above with mexp (const LINT& e, const LINT& m)
}
return *this;
}
 
Search WWH ::




Custom Search