
202 Cryptography with Open-Source Software
To get a better understanding of the DDT, consider the element in row 62,
column 5, which is 4. This means that there are four different tuples
(x
1
, x
2
, y
1
, y
2
)
for which x
1
⊕ x
2
= x
′
= 62 = 0b111110, y
1
⊕ y
2
= y
′
= 5 = 0b0101, and
y
1
= S(x
1
), y
2
= S(x
2
). These can be found very easily:
sage: for x1 in range(64):
....: for x2 in range(64):
....: y1 = Sb1(x1)
....: y2 = Sb1(x2)
....: if x1^^x2 == 62 and y1^^y2 == 5:
....: print x1,x2,y1,y2
....:
8 54 2 7
21 43 12 9
43 21 9 12
54 8 7 2
Note that if (x
1
, x
2
, y
1
, y
2
) is a tuple satisfying the requirements, then so is
(x
2
, x
1
, y
2
, y
1
) by the commutativity of the exclusive-or (XOR) ...