Construction and analysis of models of increasing reliability
for modular encryption algorithm
R. BIYASHEV, N. KAPALOVA, S. NYSSANBAYEVA, A. HAUMEN
Institute of Information and Computational Technologies
Ministry of Education and Science of the Republic of Kazakhstan
125 Pushkin str., Almaty, 050010
REPUBLIC OF KAZAKHSTAN
Abstract: - This paper describes the development of a model of symmetric block encryption algorithm using
nonpositional polynomial notation systems. Computer model this algorithm was created and its properties were
investigated. In order to increase the cryptostrength of the algorithm simple substitution and gamming cipher
modes were used, methods of the application of these modes are shown. As a continuation of this work, a
computer model for managing keys in the encryption algorithm is being developed.
Key-Words: - encryption, nonpositional polynomial notations, encryption model, software implementation
1 Introduction
In order to improve the strength of the encryption
algorithm based on nonpositional polynomial
notations (NPNs, hereinafter referred to as “the
encryption algorithm”), for encryption of data with
different structure proposed a modification of the
algorithm using gamming cipher and substitution
table [1-3]. As components of the modified
encryption algorithm these procedures solve the
following tasks.
First, a processing message could have a
structure with some patterns, for example, large
blocks of consecutive zeros or ones. To solve such
problems, the gamming procedure is included, in
which to generate a key gamma sequence the
pseudo-random sequence generation (PRSG)
algorithm is used. The intermediate results in this
PRSG algorithm are not stored. Therefore, there is
no need to store the gamma sequence of the same
length as the plaintext, as it is sufficient to maintain
the input data (the seed) of the generator [4].
Reliability of the gamming procedure based on the
fact that the use of statistical safe keys ensures a
good ciphertext for any plaintext.
Claude Shannon proved that under certain
properties of a gamma this encryption method is
completely resistant [5]. In other words, the
ciphertext does not contain any information about
the plaintext. In the proposed model, the application
of the gamming removes any patterns encountered
in plain text.
Second, the cipher may be sensitive to a linear
cryptanalysis, as the encryption algorithm uses the
multiplication operation. In practice, these problems
are solved by using the substitution table.
2 Creation of the model of the
encryption algorithm based on NPNs
In accordance with the known principles of
Shannon [6], symmetric cryptographic algorithms
use nonlinear operations for mixing and linear
transformations for dispersion. Multiple consistent
use of mixing and dispersion allows to achieve a
high level of cryptographic strength. Nodes of
nonlinear replacement in modern symmetrical
primitives are usually realized in the form of
substitution tables or the S-boxes. Most of the
modern block algorithms (Rijndael, Camellia, DES,
etc.) use a single linear operation (addition modulo
2) to introduce round keys and combine inter-round
values. S-boxes are an element that determine the
non-linearity of ciphering transformation and the
level of its resistance to cryptanalytic attacks.
Given the properties of nonlinear substitution
nodes, the required number of rounds of block
ciphers is calculated ensuring resistance to known
types of cryptographic analysis. Thus, the resistance
of most modern cryptographic symmetric primitives
is largely dependent on the properties of S-boxes
selected. Based on the foregoing, it is proposed to
apply non-linear substitution nodes implemented as
WSEAS TRANSACTIONS on COMMUNICATIONS
DOI: 10.37394/23204.2022.21.7
R. Biyashev, N. Kapalova,
S. Nyssanbayeva, A. Haumen
E-ISSN: 2224-2864
34
Volume 21, 2022
substitution tables, to improve the resistance of the
encryption algorithm based on NPNs.
For the implementation of algorithms of
cryptographic protection based on NPNs, computer
program called “KorganCrypt v1.1” was developed.
The purpose of this software implementation is to
study properties of the model of the encryption
algorithm. Modular arithmetic operations have been
grouped in individual software modules, which can
later be used in other software implementations that
use modular arithmetic.
Using the created computer program files with
any information in electronic form can be encrypted
and decrypted. During studying the efficiency of the
computer program, files of different types and sizes
were used, on which processes of encryption and
decryption were tested.
The program KorganCrypt v1.1” is a test
version of the considered algorithm model. All keys
for encryption and decryption are stored in a
separate file and during encryption the program
reads data from the file.
3 Stages of the implementation of the
encryption algorithm model
Implementation and analysis of the proposed
model were conducted in 4 stages:
Stage 1 – encryption based on NPNs;
Stage 2 application of the substitution table to
the nonpositional encryption algorithm;
Stage 3 addition of the gamming procedure to
the Stage 1;
Stage 4 research of the encryption algorithm
model using procedures 2 and 3.
These models are designed to analyze the
statistical properties of the resulting ciphertexts at
each stage.
Stage 1. During computer study it was revealed
that the "zero" bytes in the source file after
encryption remained as "zero" bytes. The reason for
this is as follows. The coefficients of polynomials
used in the algorithm are expressed in binary form,
and during encrypting the byte values, that contain
only zeros, remain zero.
Fig. 1 and Fig. 2 show the digital appearance of
plain and encrypted files (in HEX editor). Here we
see that four zero bytes of the source file after
encryption remain zero. This example shows how
the cryptographic strength of the cipher can be
reduced. In order to eliminate this disadvantage, we
have decided to apply the method of "tabular
substitution", that is used in known encryption
standards.
Stage 2. Substitution tables or S-boxes perform
mixing operation using non-linear substitutions.
The computer program uses two substitution
Fig. 1 Appearance of the source file
Fig. 2 Appearance of the encrypted file
WSEAS TRANSACTIONS on COMMUNICATIONS
DOI: 10.37394/23204.2022.21.7
R. Biyashev, N. Kapalova,
S. Nyssanbayeva, A. Haumen
E-ISSN: 2224-2864
35
Volume 21, 2022
tables of the length of 16 bits. These tables were
designed on the basis of substitution tables of the
one of versions of DES [6].
Before encryption every byte passes through the
S-box. 8 bits are divided into two parts, each part
separately replaced by the other two numbers
according to the substitution table. The left side is
replaced through S-Box-1, right - through the S-
Box-2. After the replacement, these two parts are
joined and new byte is obtained. Obtained new
bytes are sent to the encryption module.
In the process of decryption INV-S-Box
substitution tables are used, which are inverse to S-
Box. These inverse tables restore the original file
bytes. The design of the S-Boxes is shown in Table
I and Table II.
Fig. 3 shows a mapping of the original "zero"
bytes to the new "non-zero" bytes (in HEX editor).
This indicates that this procedure eliminates the
zeroed blocks, but the patterns of occurrence of
elements in the ciphertext remains unchanged. For
example, in a mode of simple substitution when
encrypting two identical blocks of plaintext, the
same ciphertext blocks are received and vice versa.
These properties allow a cryptanalyst make the
conclusion about the presence of identical blocks of
input data, if there are identical blocks in the array
of encrypted data.
Stage 3. As it shown in Fig. 3, blocks of zero
bytes of the same size are displayed as identical
non-zero bytes. To eliminate this pattern the
gamming mode is used: the plain text is XORed
with a gamma sequence obtained from the PRSG. In
this case for zero bytes non-zero different bytes are
obtained.
Stage 4. The scheme of the model of the
encryption algorithm based on NPNs applying
procedures 2 and 3 is shown in Fig. 4.
As seen in Fig. 5, after the encryption in this
Table I. S-box substitution tables.
S-BOX-1
1
2
4
5
6
7
9
10
11
12
13
14
15
4
13
2
15
11
8
10
6
14
5
9
12
0
S-BOX-2
1
2
4
5
6
7
9
10
11
12
13
14
15
12
15
9
4
7
1
11
3
14
10
0
6
13
Table II. INV-S-box substitution tables.
INV-S-BOX-1
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
15
3
4
8
1
12
10
0
7
13
9
6
14
2
11
5
INV-S-BOX-2
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
13
7
3
10
5
8
14
6
0
4
12
9
1
15
11
2
Fig. 3 Encrypted file using the S-box replacement table
WSEAS TRANSACTIONS on COMMUNICATIONS
DOI: 10.37394/23204.2022.21.7
R. Biyashev, N. Kapalova,
S. Nyssanbayeva, A. Haumen
E-ISSN: 2224-2864
36
Volume 21, 2022
gamming mode all statistical patterns, that were
observed on other stages, are eliminated.
4 Conclusion
To determine the best modification of the
encryption algorithm, a study of statistical
properties of ciphertexts, produced at each stage, is
performed. For this purpose, the developed
Automated system of statistical and graphical tests
selection software complex is used. The
dependence of speed on the type and size of files
during encryption and decryption is studied.
Acknowledgment
Ongoing studies are funded by the Ministry of
Education and Science of the Republic of
Kazakhstan
References:
[1] Biyashev, R.G.: Development and investigation
of methods of the overall increase in reliability
in data exchange systems of distributed ACSs.
Doctoral Dissertation in Technical Sciences,
Moscow (1985).
[2] Biyashev, R.G. and Nyssanbayeva, S.E.:
Algorithm for Creation a Digital Signature with
Error Detection and Correction, Cybernetics
and Systems Analysis. 4, 489-497 (2012).
[3] Biyashev, R.G., Kalimoldayev M.N.,
Nyssanbayeva S.E., Kapalova N.A., Khakimov
R.A.: Program Modeling of the Cryptography
Algorithms on Basis of Polynomial Modular
Arithmetic / The 5th International Conference
on Society and Information Technologies
(ICSIT 2014, march 4-7, 2014- Orlando,
Florida, USE) – IIIS. pp. 49-54
Fig. 4 The scheme of the algorithm with gamming
Fig. 5 File encrypted with gamming mode
WSEAS TRANSACTIONS on COMMUNICATIONS
DOI: 10.37394/23204.2022.21.7
R. Biyashev, N. Kapalova,
S. Nyssanbayeva, A. Haumen
E-ISSN: 2224-2864
37
Volume 21, 2022
[4] Kapalova N.A., Nyssanbayeva, S.E. Analysis
of the statistical properties of the algorithm for
generating pseudo-random sequences //
Proceedings of the X International Scientific
Conference “Information Security” – Taganrok,
Russia, 2008.- Part 2. - PP. 169-172.
[5] Shannon, C.E. Communication Theory of
Secrecy Systems // Bell Syst. Tech. Journal.-
1949. – Vol.2
[6] W. Stallings, Cryptography and Network
Security: Principles and Practice [Russian
Translation], William Publishing, Moscow
(2001)
Creative Commons Attribution License 4.0
(Attribution 4.0 International, CC BY 4.0)
This article is published under the terms of the Creative
Commons Attribution License 4.0
https://creativecommons.org/licenses/by/4.0/deed.en_US
WSEAS TRANSACTIONS on COMMUNICATIONS
DOI: 10.37394/23204.2022.21.7
R. Biyashev, N. Kapalova,
S. Nyssanbayeva, A. Haumen
E-ISSN: 2224-2864
38
Volume 21, 2022