Cryptography Reference
In-Depth Information
if (LT_L (a_l, b_l))
{
setmax_l (a_l);
msdptra_l = a_l + CLINTMAXDIGIT;
SETDIGITS_L (d_l, CLINTMAXDIGIT);
UFL = E_CLINT_UFL;
} else
{
SETDIGITS_L (d_l, DIGITS_L (a_l));
}
while (bptr_l <= msdptrb_l)
{
*dptr_l++ = (USHORT)(carry = (ULONG)*aptr_l++
- (ULONG)*bptr_l++ - ((carry & BASE) >> BITPERDGT));
}
while (aptr_l <= msdptra_l)
{
*dptr_l++ = (USHORT)(carry = (ULONG)*aptr_l++
- ((carry & BASE) >> BITPERDGT));
}
RMLDZRS_L (d_l);
The required addition of
(
minuend
+1)
to the difference
N
max
−
b_l
stored in
d_l
is carried out before the output of
d_l
.
if (UFL)
{
add_l (d_l, aa_l, d_l);
inc_l (d_l);
}
return UFL;
}
In addition to the functions
add_l()
and
sub_l()
two special functions for
addition and subtraction are available, which operate on a
USHORT
as the second
argument instead of a
CLINT
. These are called
mixed functions
and identified by a
function name with a prefixed “
u
,” as in the functions
uadd_l()
and
usub_l()
to
follow. The use of the function
u2clint_l()
for converting a
USHORT
value into a
CLINT
object follows in anticipation of its discussion in Chapter 8.