Cryptography Reference
In-Depth Information
Table 7-1. Values of a Boolean function
x
1
x
2
...
x
k
f
(
x
1
,...,x
k
)
00
...
0
0
10
...
0
1
01
...
0
0
.
.
.
.
.
11
...
1
1
For the bitwise relations between
CLINT
types we first regard the variables
as bit vectors
(
x
1
,...,x
n
)
, and furthermore, the function values of the Boolean
functions will be formed into a sequence. Thus we have functions
n
that map
n
-bit variables
x
1
:=
x
1
,x
2
,...,x
n
and
x
2
:=
x
1
,x
2
,...,x
n
by
f
(
x
1
, x
2
):=
f
1
(
x
1
, x
2
)
,f
2
(
x
1
, x
2
)
,...,f
n
(
x
1
, x
2
)
,
with
f
i
(
x
1
, x
2
):=
f
x
i
,x
i
, again to an
n
-bit variable
(
x
1
,...,x
n
)
, which is
then interpreted as a number of type
CLINT
.
Decisive for the operation of the function
f
is the definition of the partial
functions
f
i
, each of which is defined in terms of a Boolean function
f
. For the
CLINT
functions
and_l()
,
or_l()
,and
xor_l()
the Boolean functions that are
implemented are defined as in Tables 7-2 through 7-4.
n
n
f
:
{
0
,
1
}
×{
0
,
1
}
→{
0
,
1
}
Table 7-2. Values of the
CLINT
function
and_l()
x
1
x
2
f
(
x
1
,x
2
)
00
0
01
0
10
0
11
1
The implementations of these Boolean functions in the three C functions
and_l()
,
or_l()
, and
xor_l()
do not actually proceed bitwise, but process the
digits of
CLINT
variables by means of the standard C operators
&
,
|
,and
ˆ
. Each of
these functions accepts three arguments of
CLINT
type, where the first two are the
operands and the last the result variable.