Cryptography Reference
In-Depth Information
•
For
I
=
r,...,
1 compute
B = ((B-S
2i
+
1
)
>>> A)
⊕
A
A = ((A-S
2i
)
>>> B)
⊕
B
where
>>>
denotes the right rotation, analogous to the encryption.
•
Set
B=B- S
1
A=A-S
0
and put
A
and
B
together into the plaintext block.
Computing the Key
Initialize the key field (
S
i
):
•
If
w
is the word length in bits, i.e., 32 in this case, then define two constants,
P
w
and
Q
w
,by
P
w
= Odd(2
w
(e-2))
Q
w
= Odd(2
w
(φ
−
1))
where
e
is the basis of the natural logarithms (2.718 281 8
...
),
φ
is the golden
ratio
φ
=(
√
5 + 1)/2 = 1.681033...
and
Odd()
is the nearest uneven number.
•
Now set
S
0
=P
w
and
S
i
=S
i
−
1
+Q
w
for i=1,...,2r+1.
Figure 5.12:
(
continued
)