Structure of an encryption algorithm AES–RFWKIDEA16–2
51
Scheme n–round encryption algorithm AES–RFWKIDEA16–2 is shown in
Figure 6, and the length of the sub–blocks
0
X
,
1
X
, …,
1 5
X
, the length of the round
keys
)
1
(
1 6
i
K
,
1
)
1
(
16
i
K
, ...,
15
)
1
(
16
i
K
,
1
...
1
n
i
,
16
16
n
K
,
17
16
n
K
, ...,
47
16
n
K
equal to 32 bits.
In contrast from the encryption algorithm AES–IDEA16–2 in the encryption
algorithm AES–RFWKIDEA16–2 as are used in the transformation round function
SubBytes(), ShiftRows(), MixColumns() encryption algorithm AES. Like the
encryption algorithm AES–IDEA16–2, in algorithm AES–RFWKIDEA16–2 32 bit
subblocks
0
T
,
1
T
, ...,
7
T
are divided into 8 bit subblocks
0
0
t
,
0
1
t
, ...,
0
1 5
t
and
1
0
t
,
1
1
t
, ...,
1
1 5
t
.
Then performed transformation SubBytes(), ShiftRows(), MixColumns(). After
transformation MixColumns() get 32 bit subblocks
0
Y
,
1
Y
, ...,
7
Y
, here
0
Y
=
0
3
0
2
0
1
0
0
| |
| |
| |
p
p
p
p
,
1
Y
=
0
7
0
6
0
5
0
4
||
||
||
p
p
p
p
,
2
Y
=
0
11
0
10
0
9
0
8
| |
| |
| |
p
p
p
p
,
3
Y
=
0
15
0
14
0
13
0
12
| |
| |
| |
p
p
p
p
,
4
Y
=
1
3
1
2
1
1
1
0
||
||
||
p
p
p
p
,
5
Y
=
1
7
1
6
1
5
1
4
| |
| |
| |
p
p
p
p
,
6
Y
=
1
11
1
10
1
9
1
8
| |
| |
| |
p
p
p
p
,
7
Y
=
1
15
1
14
1
13
1
12
| |
| |
| |
p
p
p
p
.
The S–boxes SubBytes() transformation is given in Table 3 and 4 and the only
nonlinear transformation. The length of the input and output blocks of S–boxes is
equal to eight bits. The first S–box used in the first round function and the second S–
box used in the second round function.
Table 3. The first S–block of an encryption algorithm AES–RFWKIDEA16–2
0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xA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
3
0x6
4
0xA
4
0x4
5
0xC
8
0xB
B
0xE
8
0x9
2
0x3
F
0x1
D
0x0
0
0xC
F
0x0
E
0x1
7
0x
E
0x4
9
0x8
E
0x4
B
0x2
0
0xF
2
0xD
8
0x1
A
0x6
5
0xF
3
0xB
6
0xD
0
0x5
3
0x5
9
0x5
7
0x6
1
0x8
4
0x
F
0x7
2
0x0
A
0x9
6
0x0
3
0x4
1
0xC
5
0xD
6
0x2
2
0x6
E
0x9
B
0x8
5
0x6
B
0xD
7
0x8
7
0x7
5
0xA
C
54
Consider encryption process in the encryption algorithm AES–RFWKIDEA16–
2. First 512 bit block of plaintext
X
is partitioned into 32 bit sub–block
0
0
X
,
1
0
X
, …,
1 5
0
X
and the following steps:
1.
subblocks
0
0
X
,
1
0
X
, …,
1 5
0
X
are summed to XOR with the corresponding round
keys
16
16
n
K
,
17
16
n
K
, ...,
31
16
n
K
:
i
n
i
i
K
X
X
16
16
0
0
,
15
...
0
i
.
2.
subblocks
0
0
X
,
1
0
X
, …,
1 5
0
X
multiplied and added to the same round keys
)
1
(
1 6
i
K
,
1
)
1
(
16
i
K
, ...,
15
)
1
(
16
i
K
and computed
0
T
,
1
T
, ...,
1 5
T
as follows
)
(
)
(
8
)
1
(
16
8
1
)
1
(
16
0
1
0
i
i
i
i
K
X
K
X
T
,
)
(
)
(
9
)
1
(
16
9
1
1
)
1
(
16
1
1
1
i
i
i
i
K
X
K
X
T
,
)
(
)
(
10
)
1
(
16
10
1
2
)
1
(
16
2
1
2
i
i
i
i
K
X
K
X
T
,
)
(
)
(
11
)
1
(
16
11
1
3
)
1
(
16
3
1
3
i
i
i
i
K
X
K
X
T
,
)
(
)
(
12
)
1
(
16
12
1
4
)
1
(
16
4
1
4
i
i
i
i
K
X
K
X
T
,
)
(
)
(
13
)
1
(
16
13
1
5
)
1
(
16
5
1
5
i
i
i
i
K
X
K
X
T
,
)
(
)
(
14
)
1
(
16
14
1
6
)
1
(
16
6
1
6
i
i
i
i
K
X
K
X
T
,
)
(
)
(
15
)
1
(
16
15
1
7
)
1
(
16
7
1
7
i
i
i
i
K
X
K
X
T
,
1
i
.
55
Fig. 6. The structure of n–round encryption algorithm AES–RFWKIDEA16–2
3.
subblocks
0
T
,
1
T
, ...,
1 5
T
written in two arrays State and performed SubBytes(),
ShiftRows(),
MixColumns(),
AddRoundKey()
transformation.
After
the
transformation will turn 32 bit subblocks
0
Y
,
1
Y
, ...,
7
Y
.
56
4.
subblocks
0
Y
,
1
Y
, ...,
7
Y
are summed to XOR with the corresponding
subblocks
j
i
X
1
i.e.
j
j
i
j
i
Y
X
X
7
1
1
,
j
j
i
j
i
Y
X
X
7
8
1
8
1
,
7
...
0
j
,
1
i
.
5.
at the end of round except subblocks
0
i
X
and
1 6
1
i
X
all subblocks will be
swapped
j
i
j
i
X
X
7
1
,
j
i
j
i
X
X
1
7
7
...
1
j
,
1
i
6.
repeating steps 2–5 n times, ie,
n
i
...
2
, the 32 bit subblocks
0
n
X
,
1
n
X
, …,
3 1
n
X
is
obtained.
7.
in the output transformation round keys
n
K
16
,
1
16
n
K
, ...,
15
16
n
K
are multiplied and
summed with the corresponding subblocks
n
n
n
K
X
X
16
0
0
1
,
1
16
14
1
1
n
n
n
K
X
X
,
2
16
13
2
1
n
n
n
K
X
X
,
3
16
12
3
1
n
n
n
K
X
X
,
4
16
11
4
1
n
n
n
K
X
X
,
5
16
10
5
1
K
X
X
n
n
,
6
16
9
6
1
n
n
n
K
X
X
,
7
16
8
7
1
n
n
n
K
X
X
,
8
16
7
8
1
n
n
n
K
X
X
,
9
16
6
9
1
n
n
n
K
X
X
,
10
16
5
10
1
n
n
n
K
X
X
,
11
16
4
11
1
n
n
n
K
X
X
,
12
16
3
12
1
n
n
n
K
X
X
,
13
16
2
13
1
n
n
n
K
X
X
,
14
16
1
14
1
n
n
n
K
X
X
,
15
16
15
15
1
n
n
n
K
X
X
.
8.
subblocks
0
1
n
X
,
1
1
n
X
, …,
1 5
1
n
X
are summed to XOR with the corresponding
round keys
32
16
n
K
,
33
16
n
K
, ...,
47
16
n
K
:
j
n
j
n
j
n
K
X
X
32
16
1
1
,
15
...
0
j
. As ciphertext plaintext
X
are accepted combining 32 bit subblocks
15
1
1
1
0
1
| |
...
| |
| |
n
n
n
X
X
X
.
Достарыңызбен бөлісу: |