Cryptography Reference
In-Depth Information
decrement a CLINT object by 1
Function:
int dec_l (CLINT a_l);
Syntax:
a_l (minuend)
Input:
a_l (difference)
Output:
E_CLINT_OK if all is ok
E_CLINT_UFL if underflow
Return:
int
dec_l (CLINT a_l)
{
clint *msdptra_l, *aptr_l = LSDPTR_L (a_l);
ULONG carry = DBASEMINONE;
if (EQZ_L (a_l))
/* underflow ? */
{
setmax_l (a_l);
/* reduce modulo max_l */
return E_CLINT_UFL;
}
msdptra_l = MSDPTR_L (a_l);
while ((aptr_l <= msdptra_l) && (carry & (BASEMINONEL << BITPERDGT)))
{
*aptr_l = (USHORT)(carry = (ULONG)*aptr_l - 1L);
aptr_l++;
}
RMLDZRS_L (a_l);
return E_CLINT_OK;
}
4.2 Multiplication
If the individual summands n 1 ,n 2 ,n 3 ,...,n r are all equal to one and the
same integer n , then one calls the addition “multiplication of the integer n by
the multiplier r ” and sets n 1 + n 2 + n 3 + ··· + n r = rn .
—Leopold Kronecker, On the Idea of Number
Multiplication is one of the most critical functions of the entire FLINT/C package
due to the computation time required for its execution, since together with
division it determines the execution time of many algorithms. In contrast to our
 
Search WWH ::




Custom Search