Cryptography Reference
In-Depth Information
if (shorts < CLINTMAXDIGIT)
{
SETDIGITS_L (n_l, MIN (DIGITS_L (n_l) + shorts, CLINTMAXDIGIT));
nptr_l = n_l + DIGITS_L (n_l);
msdptrn_l = n_l + shorts;
while (nptr_l > msdptrn_l)
{
*nptr_l = *(nptr_l - shorts);
--nptr_l;
}
while (nptr_l > n_l)
{
*nptr_l-- = 0;
}
RMLDZRS_L (n_l);
for (i = 0; i < bits; i++)
{
shl_l (n_l);
}
}
else
{
SETZERO_L (n_l);
}
}
return error;
}
7.2 All or Nothing: Bitwise Relations
The FLINT/C package contains functions that allow the built-in bitwise C
operators & , | ,and ˆ to be used for the type CLINT as well. However, before we
program these functions we would like to understand what their implementation
will net us.
From a mathematical viewpoint we are looking at relations of the generalized
Boolean functions f : { 0 , 1 }
k
→{ 0 , 1 }
that map a k -tuple ( x 1 ,...,x k )
k to the value 0 or 1 . The effect of a Boolean function is usually presented
in the form of a table of values such as that shown in Table 7-1.
{ 0 , 1 }
 
Search WWH ::




Custom Search