Cryptography Reference
In-Depth Information
while (ISEVEN_L (a_l) && ISEVEN_L (b_l))
{
++k;
shr_l (a_l);
shr_l (b_l);
}
Step 2.
while (ISEVEN_L (a_l))
{
shr_l (a_l);
}
while (ISEVEN_L (b_l))
{
shr_l (b_l);
}
Step 3: Here we have the case that the difference of a_l and b_l can be negative.
This situation is caught by a comparison between a_l and b_l . The absolute value
ofthedifferenceisstoredin t_l , and the sign of the difference is stored in the
integer variable sign_of_t .If t_l == 0 . Then the algorithm is terminated.
do
{
if (GE_L (a_l, b_l))
{
sub_l (a_l, b_l, t_l);
sign_of_t = 1;
}
else
{
sub_l (b_l, a_l, t_l);
sign_of_t = -1;
}
if (EQZ_L (t_l))
{
cpy_l (cc_l, a_l); /* cc_l <- a */
shift_l (cc_l, (long int) k);
/* cc_l <- cc_l*2**k */
return;
}
Search WWH ::




Custom Search