The encryption algorithm GOST28147–89–RFWKPES8–4
The structure of the encryption algorithm GOST28147–89–RFWKPES8–4
In the encryption algorithm GOST28147–89–RFWKPES8–4 length of the
subblocks
0
X
,
1
X
, …,
7
X
, the length of the round keys
)
1
(
8
i
K
,
1
)
1
(
8
i
K
, …,
11
)
1
(
8
i
K
,
1
...
1
n
i
,
8
8
n
K
,
5
8
n
K
, ...,
11
8
n
K
, as well as the length of the input and output units round function is
equal to 32 bits. In this algorithm the encryption round function of GOST 28147–89
is used twice and in each round functions used eight S–box, i.e. the total number of
S–box is 16. The structure of the encryption algorithm GOST28147–89–
RFWKPES8–4 is shown in Figure 1.
Consider the round function of a encryption algorithm GOST28147–89–PES8–
4. First 32 bit subblocks
0
T
,
1
T
,
2
T
,
3
T
divided into eight four bit subblocks, i.e.
0
7
0
6
0
5
0
4
0
3
0
2
0
1
0
0
0
||
||
||
||
||
||
||
t
t
t
t
t
t
t
t
T
,
1
7
1
6
1
5
1
4
1
3
1
2
1
1
1
0
1
||
||
||
||
||
||
||
t
t
t
t
t
t
t
t
T
,
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
2
||
||
||
||
||
||
||
t
t
t
t
t
t
t
t
T
,
3
7
3
6
3
5
3
4
3
3
3
2
3
1
3
0
3
||
||
||
||
||
||
||
t
t
t
t
t
t
t
t
T
. The four bit subblocks
0
i
t
,
1
i
t
,
2
i
t
,
3
i
t
,
7
...
0
i
converted to S–box:
)
(
||
)
(
||
)
(
||
)
(
||
)
(
||
)
(
||
)
(
||
)
(
0
7
7
0
6
6
0
5
5
0
4
4
0
3
3
0
2
2
0
1
1
0
0
0
0
t
S
t
S
t
S
t
S
t
S
t
S
t
S
t
S
R
,
||
)
(
||
)
(
1
1
9
1
0
8
1
t
S
t
S
R
)
(
||
)
(
||
)
(
||
)
(
||
)
(
||
)
(
1
7
15
1
6
14
1
5
13
1
4
12
1
3
11
1
2
10
t
S
t
S
t
S
t
S
t
S
t
S
,
)
(
||
)
(
||
)
(
||
)
(
||
)
(
||
)
(
||
)
(
||
)
(
2
7
23
2
6
22
2
5
21
2
4
20
2
3
19
2
2
18
2
1
17
2
0
16
2
t
S
t
S
t
S
t
S
t
S
t
S
t
S
t
S
R
,
)
(
||
)
(
||
)
(
||
)
(
||
)
(
||
)
(
||
)
(
||
)
(
3
7
31
3
6
30
3
5
29
3
4
28
3
3
27
3
2
26
3
1
25
3
0
24
0
t
S
t
S
t
S
t
S
t
S
t
S
t
S
t
S
R
.
Received 32 bit subblocks
0
R
,
1
R
,
2
R
,
3
R
cyclically shifted to the left by 11 bits
and get the subblocks
0
Y
,
1
Y
,
2
Y
,
3
Y
:
11
0
0
R
Y
,
11
1
1
R
Y
,
11
2
2
R
Y
,
11
3
3
R
Y
. The S–
box of the encryption algorithm are shown in Table 1.
Consider the process of encryption in the encryption algorithm GOST28147–
89–RFWKPES4–2. First 256 bit block of plaintext is divided into 32 bit subblocks
0
0
X
,
1
0
X
, …,
7
0
X
and runs the following steps:
1.
sublocks
0
0
X
,
1
0
X
, …,
7
0
X
summarized by XOR with the corresponding
round keys
8
8
n
K
,
9
8
n
K
,
10
8
n
K
, ...,
15
8
n
K
:
j
n
j
j
K
X
X
8
8
0
0
,
7
...
0
j
.
364
2.
sublocks
0
0
X
,
1
0
X
, …,
7
0
X
are multiplied and summed accordingly with
round keys
)
1
(
8
i
K
,
1
)
1
(
8
i
K
,
2
)
1
(
8
i
K
, ...,
7
)
1
(
8
i
K
and calculates a 32 bit subblocks
0
T
,
1
T
,
2
T
,
3
T
.
This
step
can
be
represented
as
follows:
)
(
)
(
4
)
1
(
8
4
1
)
1
(
8
0
1
0
i
i
i
i
K
X
K
X
T
,
)
(
)
(
5
)
1
(
8
5
1
1
)
1
(
8
1
1
1
i
i
i
i
K
X
K
X
T
,
)
(
)
(
6
)
1
(
8
6
1
2
)
1
(
8
2
1
2
i
i
i
i
K
X
K
X
T
,
)
(
)
(
7
)
1
(
8
7
1
3
)
1
(
8
3
1
3
i
i
i
i
K
X
K
X
T
,
1
i
3.
to the
0
T
,
1
T
,
2
T
,
3
T
sublocks apply the round function and get the 32
bit subblocks
0
Y
,
1
Y
,
2
Y
,
3
Y
.
4.
subblocks
0
Y
,
1
Y
,
2
Y
,
3
Y
are summed by XOR with subblocks
0
1
i
X
,
1
1
i
X
,
…,
7
1
i
X
, i.е.
0
1
2
3
0
1
0
1
Y
Y
Y
Y
X
X
i
i
,
0
1
2
1
1
1
1
Y
Y
Y
X
X
i
i
,
0
1
2
1
2
1
Y
Y
X
X
i
i
,
0
3
1
3
1
Y
X
X
i
i
,
0
1
2
3
4
1
4
1
Y
Y
Y
Y
X
X
i
i
,
0
1
2
5
1
5
1
Y
Y
Y
X
X
i
i
,
0
1
6
1
6
1
Y
Y
X
X
i
i
,
0
7
1
7
1
Y
X
X
i
i
,
1
i
.
5.
at the end of the round subblocks swapped, i.e,
4
1
0
i
i
X
X
,
5
1
1
i
i
X
X
,
6
1
2
i
i
X
X
,
7
1
3
i
i
X
X
,
0
1
4
i
i
X
X
,
1
1
5
i
i
X
X
,
2
1
6
i
i
X
X
,
3
1
7
i
i
X
X
,
1
i
.
6.
repeating the steps 2–5
n
time, i.e.
n
i
...
2
, obtained the subblocks
0
n
X
,
1
n
X
,
…,
7
n
X
7.
in output transformation round keys
n
K
8
,
1
8
n
K
,
2
8
n
K
, ...,
7
8
n
K
are multiplied
and summed into subblocks
0
n
X
,
1
n
X
, …,
7
n
X
, i.e.
n
n
n
K
X
X
8
0
0
1
,
1
8
1
1
1
n
n
n
K
X
X
,
2
8
2
2
1
n
n
n
K
X
X
,
3
8
3
3
1
n
n
n
K
X
X
,
4
8
4
4
1
n
n
n
K
X
X
,
5
8
5
5
1
n
n
n
K
X
X
,
6
8
6
6
1
n
n
n
K
X
X
,
7
8
7
7
1
n
n
n
K
X
X
.
8.
subblocks
0
1
n
X
,
1
1
n
X
, ...,
7
1
n
X
are summed by XOR with the round keys
16
8
n
K
,
17
8
n
K
,
18
8
n
K
, ..,
23
8
n
K
:
j
n
j
n
j
n
K
X
X
16
8
1
1
,
7
...
0
j
. As ciphertext receives the combined 32
bit subblocks
7
1
2
1
1
1
0
1
||
...
||
||
||
n
n
n
n
X
X
X
X
.
365
Figure 2. The scheme n–rounded encryption algorithm GOST28147–89–
RFWKPES8–4
In the encryption algorithm GOST28147–89–RFWKPES8–4 when encryption
and decryption using the same algorithm, only when decryption calculates the inverse
of round keys depending on operations and are applied in reverse order. One
important goal of encryption is key generation.
366
Key generation of the encryption algorithm GOST28147–89–RFWKPES8–4.
In the n–round encryption algorithm GOST28147–89–RFWKPES8–4 used in
each round 8 round keys of 32 bits and the output transformation of 8 round keys of
32 bits. In addition, prior to the first round and after the output transformation is
applied 8 round keys on 32 bits. The total number of 32–bit round keys is equal to
8 n+24. Hence, if n=8 then necessary 88, if n=12 then 120 and if n=16 then 152 to
generate round keys. When encryption in Fig.1 instead of
i
K
used the round keys
c
i
K
,
and when decryption the round keys
d
i
K
.
The key length of the encryption algorithm
l
(
1024
256
l
) bits is divided into
32–bit round keys
c
K
0
,
c
K
1
, ...,
c
Lenght
K
1
,
32
/
l
Lenght
, here
}
,...,
,
{
1
1
0
l
k
k
k
K
,
}
,...,
,
{
31
1
0
0
k
k
k
K
c
,
}
,...,
,
{
63
33
32
1
k
k
k
K
c
, ...,
}
,...,
,
{
1
31
32
1
l
l
l
c
Lenght
k
k
k
K
. Then calculated
c
Lenght
c
c
L
K
K
K
K
1
1
0
...
. If
0
L
K
then as
L
K
selected 0xC5C31537, i.e.
0xC5C31537
L
K
. Round keys
c
i
K
,
23
8
...
n
Lenght
i
calculated as follows:
L
c
Lenght
i
c
Lenght
i
c
i
K
K
RotWord
SBox
K
SBox
K
))
(
(
32
)
(
32
1
1
0
. After each generation of
round keys value
L
K
cyclically shifted left by 1 bit.
Decryption round keys
d
i
K
calculated on the basis of encryption round keys
c
i
K
and decryption keys output transformation associated with the encryption keys as
follows:
).
,
,
,
,
)
(
,
)
(
,
)
(
,
)
((
)
,
,
,
,
,
,
,
(
7
6
5
4
1
3
1
2
1
1
1
0
7
8
6
8
5
8
4
8
3
8
2
8
1
8
8
c
c
c
c
c
c
c
c
d
n
d
n
d
n
d
n
d
n
d
n
d
n
d
n
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
Similarly, the decryption keys of the first, second, third and n–round are
associated with the keys of the encoding as follows:
.
...
1
),
,
,
,
,
)
(
,
)
(
,
)
(
,
)
((
)
,
,
,
,
,
,
,
(
7
)
1
(
8
6
)
1
(
8
5
)
1
(
8
4
)
1
(
8
1
3
)
1
(
8
1
2
)
1
(
8
1
1
)
1
(
8
1
)
1
(
8
7
)
1
(
8
6
)
1
(
8
5
)
1
(
8
4
)
1
(
8
3
)
1
(
8
2
)
1
(
8
1
)
1
(
8
)
1
(
8
n
i
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
c
i
n
c
i
n
c
i
n
c
i
n
c
i
n
c
i
n
c
i
n
c
i
n
d
i
d
i
d
i
d
i
d
i
d
i
d
i
d
i
Decryption round keys applied to the first round and after the conversion of the
output associated with encryption keys as follows:
c
j
n
d
j
n
K
K
16
8
8
8
,
c
j
n
d
j
n
K
K
8
8
16
8
,
7
...
0
j
.
Достарыңызбен бөлісу: |