Cryptography Reference
In-Depth Information
switch (k)
{
case 1:
case 2:
case 4:
case 8:
digit = ((ULONG)(e_l[word + 1] ) >> bit) & k_mask;
break;
default:
digit = ((ULONG)(e_l[word + 1] | ((ULONG)e_l[word + 2]
<< BITPERDGT)) >> bit) & k_mask;
}
First run through step 2 of the algorithm, the case
digit
=
e
n
−
1
=0
.
if (digit != 0)
/* k-digit>0*/
{
cpy_l (acc_l, aptr_l[oddtab[digit]]);
of
p
2
t
;
t
is
of
e
n
−
1
via
twotab
[
e
n
−
1
]
;
p
is
Calculation
set
to
the
two-part
represented by
acc_l
.
t = twotab[digit];
for(;t>0;t--)
{
msqr_l (acc_l, acc_l, m_l);
}
}
else
/* k-digit == 0 */
{
SETONE_L (acc_l);
}
Loop over
noofdigits
beginning with
f −
1
.
for (--noofdigits, fk -= k; noofdigits >= 0; noofdigits--, fk -= k)
{