1. Introduction
Rijndael ByteSub transformation (or AES substitution byte) [1] transforms an input byte into another byte by two operations:
1) Finding a multiplicative inverse of an input byte
in the finite field GF (28).
2) Applying the following affine transform:
(1)
where
is resulting from the first operation,
.
In general, the multiplicative inverse is found by using the extended Euclidean algorithm [2] , instead of using it, we use an elegant technique which finds the multiplicative inverse in clear steps.
The transform of the second operation can be expressed in the matrix form as:
(2)
To solve this system, we use an unusual and more suitable technique which shows this multiplication of matrix (8 × 8) and matrix (8 × 1) as simple XOR operations, and we can find it directly from
.
2. The Methodology
For an input byte
, we find its multiplicative inverse
, and find
such that:
(3)
Then, we find the output
as:
(4)
First, we find a multiplicative inverse of
.
Let
,
, and represent the multiplicative inverse by T.
We seek for
and
satisfying:
(5)
where
[3] , (look at Table 1).
If
, then
.
If
, we let
and seek for
and
satisfying:
(6)
where
, and
(look at Table 2).
Whenever
, then
(7)
where
, and
.
Then, to find
, we write the system (3), as follows:
(8)
(9)
(10)
where
,
, and
(11)
(12)
(13)
Table 1. First step to find the multiplicative inverse.
Table 2. All steps to find the multiplicative inverse.
Then we compute
(14)
(15)
(16)
(17)
(18)
(19)
The result is
(20)
and this satisfies:
(21)
At the last, to find
, we add
to
.
3. Results
The matrices:
and
are just
with some XOR operations. When multiplying X by
or
, the result will be:
(first element, first + second, first + second + third, first + second + third+ fourth) of
or
, and when multiplying Y by
or
, starting from the fourth element, the result will be:
(First + second + third + fourth, second + third + fourth, third + fourth, fourth) of
or
.
So, we can find
from
directly.
4. Example
To encrypt:
Input: 32 43 F6 A8 88 5A 30 8D 31 31 98 A2 E0 37 07 34
Key: 2B 7E 15 16 28 AE D2 A6 AB F7 15 88 09 CF 4F 3C
using AES [1] .
Let us do the first step (Rijndael ByteSub transformation).
We just transform the element {19},
Computing the multiplicative inverse, (look at Table 3).
Since
,
Now, we take
, to do the second operation.
Then we add the result to
Table 3. Steps finish when
.
So,
5. Conclusion
The modern technique proposed in this work equivalently finds the Rijndael byte substitute transformation without a need to compute multiplicative inverses and matrices multiplication by traditional methods.