Innovative-cryptography
Innovative-cryptography
Second Edition
This page intentionally left blank
INNOVATIVE CRYPTOGRAPHY
Second Edition
NICK MOLDOVYAN
ALEX MOLDOVYAN
Introduction xi
v
vi Contents
Index 377
This page intentionally left blank
Introduction
xi
xii Introduction
After completion of the AES contest, the number of newly suggested solutions
in the field of symmetric cryptography has considerably reduced; however, some
application still require further increase of the encryption speed both for software
and hardware implementations. At the same time, in the case of hardware imple-
mentation, it is important to meet the requirements of reducing the cost and energy
consumption (for example, when solving the problems of information security in
mobile networks). The efficiency of ciphers being developed specially for such ap-
plications can be considerably improved by using innovative approaches to cipher
design and abandoning the implementation universality; that is, orientation toward
the highest performance either for hardware or software orientation. This book
covers the issues of design and analysis of ciphers of this type based on the approach
including data-dependent transformation operations characterized by exceedingly
large numbers of potential modifications. Elements of this approach were earlier
known in such ciphers as DES, RC5, and RC6. However, in the aforementioned
ciphers, operations of this type had a small number of modifications possible to im-
plement, which reduced the efficiency of such primitives. To make variable opera-
tions applicable as a basic cryptographic primitive, the authors have suggested the
use of controlled substitution-permutation networks (CSPNs) and permutation
networks (PNs) for implementing data-dependent operations. Substantiation of
these primitives, and results of the research of several new hardware-oriented ci-
phers, are provided in a range of newly published articles. The obtained results are
generalized in this book.
Also covered are the issues of development and design of software-oriented ci-
phers, including ciphers based on the algorithm formed depending on the secret
key. The main primitive of these ciphers is the sample of subkeys depending on the
Introduction xiii
1
2 Innovative Cryptography, Second Edition
and revealed new directions for the development of cryptography and its unique
worth in the present context of rapidly developing electronic information tech-
nologies.
The technological basis of the transition to an information society is modern
microelectronic technology, which provides for a continuous growth in the quality
of computers, and in turn is the basis for their main design tendencies:
ways to secretly store and transmit information. The answers to these questions
have yet to be found by sociologists, psychologists, lawyers, and politicians.
As for research in the area of cryptography that can result in convenient and
practically secure algorithms, hindering it doesn’t seem to be reasonable. Law-
abiding citizens and organizations should be provided an equal opportunity to
protect their information, because criminals who use cryptographic advances
would thus be in a much better position if this were not the case.
Furthermore, limiting research in the field of cryptography would most likely
slow the development of cryptography, but it will by no means prevent criminals
from using modern cryptographic methods obtained, for example, from other
countries. As a result, law-abiding citizens’ and organizations’ rights will be most
seriously infringed upon. In many countries, this problem is fully understood,
which has increased the number of industrial countries in which rigid limits on
using encryption have been removed.
Regardless of the progress in developing cryptographic methods of data pro-
tection, the government can always require by law that all users of ciphers must reg-
ister their keys (or a necessary portion of key data) with specially organized
institutions. In this case, information is controlled, no matter how secure the algo-
rithms used are. This and other issues demonstrate that hindering research in the
area of cryptography is not objectively justified. As far back as the early 1970s, the
demands of practice in Western industrial countries aroused an interest in cryp-
tography in many researchers in different areas, and gave the impetus to public re-
search in this area, which was previously considered exclusive and was a matter of
concern only to intelligence services.
There are a number of examples in which secrecy in the field of cryptography
has led to significant failures in producing enciphering devices, and even to falling
behind scientific and technological progress. Intensive activities in such a “hot” do-
main of science created conditions ripe for increasing the quality of cryptographic
research, which thus allowed Diffie and Hellman to discover two-key cryptography.
Their ideas brought into existence new, nontraditional divisions of cryptography,
and made it one of the most rapidly developing trends in modern mathematics.
The discovery of two-key cryptography is a vivid example of the interaction be-
tween theory and practice, and an example of how politics influences theoretical
advances.
Hindering research in the realm of cryptography simplifies some problems for
intelligence services. However, the nation as a whole strongly suffers from it, and
the negative effect is related to falling behind in designing modern data protection
systems, spreading computer crimes, and so forth. Examples are found in global
computer networks, such as the Internet, which are revolutionary achievements of
computer technologies, but also are playgrounds for a great number of crimes and
infringements.
Cryptography in the Information Age 5
The word cryptography, taken from Greek, means “secret writing,” which well re-
flects its original purpose. Cryptographic methods that seem primitive from the
modern viewpoint have been known since antiquity, and have long been treated as
puzzles rather than as a strict branch of science. The classical cryptographic task is
to provide for a reversible transformation of an understandable plaintext (original
text) to a seemingly random character sequence called a ciphertext or a cryptogram.
The ciphertext can contain both new characters and those present in the original
message. Generally, the number of characters in a cryptogram and the number in
Cryptography in the Information Age 7
20th century, the intelligence services of most industrial countries began to regard
it as an essential tool for their activities.
When speaking about the historic aspects of scientific research in cryptography,
we must mention the fact that the whole period from ancient times to 1949 can be
called pre-scientific, since methods of making written information private had no
strict mathematical grounds. The turning point that made cryptography scientific
and set it off as an individual branch of mathematics was the publication of C. E.
Shannon’s article “Communication Theory of Secrecy Systems” in 1949. This work
was the basis for the emergence of one-key symmetric cryptosystems, in which it was
necessary to exchange secret keys between the correspondents. Later, due to some
peculiarities of their design, symmetrical ciphers were divided into two cryptosys-
tems: stream ciphers and block ciphers. A distinguishing feature of the former is that
individual characters in the input data stream are converted, whereas the latter
converts whole blocks of data.
A fundamental conclusion in Shannon’s work was that the reliability of an algo-
rithm depends on the size and quality of the secret key, and on the informational
redundancy of the original text. Shannon introduced the formal definition of infor-
mation and a key’s unreliability as a function of the number of known bits in cipher
text. Furthermore, he introduced the important notion of unicity distance as the min-
imum text size for which only one decryption of an original text is possible. He showed
that the unicity distance is in direct proportion to the key length and in inverse pro-
portion to the redundancy of the original text. One result of Shannon’s work was
proof of the possibility of perfectly secure ciphers, such as Vernam’s cryptosystem.
Another fundamental impetus in the development of cryptography was the
publication of Diffie and Hellman’s article “New Directions in Cryptography” in
1976. In this work, it was shown for the first time that information secrecy can be
provided without exchanging secret keys. This was the beginning of the epoch of
two-key asymmetric cryptosystems, which are manifest in digital signature systems,
online secret voting, protection against false messages creation, computerized coin-
tossing, remote user identification and authentication, and other systems.
Over the past few years, due to the progress in electronic technologies, a num-
ber of theoretical works have appeared in the area of quantum cryptography, based
on Heisenberg’s uncertainty principle.
In parallel with the development of cryptographic systems, methods have been
developed that make it possible to restore an original message based on the cipher-
text and other known information. These methods are collectively known as crypt-
analysis. Advances in cryptanalysis have led to tightening the requirements on
cryptographic algorithms. The reliability of cryptosystems has always been of fun-
damental importance. This problem has been treated differently throughout the
history of cryptography.
Cryptography in the Information Age 9
The Dutch cryptographer Kerkhoff (1835–1903) was the first to formulate the
cipher security rule, according to which the complete transformation mechanism is
assumed to be known by the opponent, and the security of an algorithm can only
be determined by the unknown value of a secret key. This means that an opponent
has no way of unlocking the protection, or of finding the true key in a time signif-
icantly shorter than the time it would take to try every possible secret key.
Apparently, one of the tasks for estimating a cipher’s security, according to
Kerkhoff, is testing cryptosystems under conditions more favorable for attacks than
the conditions under which a potential violator usually acts. Kerkhoff’s principle
stimulated the emergence of higher-quality ciphering algorithms. One could say
that here we have the first element of cryptography standardization, since it as-
sumes the development of public methods of transformation. At present, this rule
is more widely interpreted: it is assumed that all persistent elements of a security
system are known to the potential opponent. This last definition of a cryptosystem
includes security systems as a special case. The extended interpretation of Kerk-
hoff’s principle assumes that all elements of a cryptosystem are divided into two
categories—constant and easily changeable. Constant elements are those related to
the cryptosystem structure, and can only be changed by specialists. Easily change-
able elements of a cryptosystem are those intended for frequent modification in ac-
cordance with a specified procedure. For example, the easily changeable elements
of a cipher are the secret key, the password, the identifier, and so forth. Kerkhoff’s
principle reflects the fact that the required secrecy level must be achieved only by
using the secret easily changeable elements of the cipher.
According to modern requirements posed on cryptosystems with a secret key
of a limited size (128–256 bits), such ciphers must be secure when facing a crypt-
analysis based on a known algorithm, a great amount of plaintext, and its
corresponding ciphertext. Despite these general requirements, ciphers used by
intelligence organizations are usually kept secret. This is due to the necessity of
having an additional safety margin to protect secret information, since creating
cryptosystems with provable security is nowadays a developing theory, and a rather
complex problem. To avoid any possible weaknesses, a ciphering algorithm can be
built on the basis of much-studied and approved principles and methods of trans-
formation. Currently, no serious user will rely on simply keeping his algorithm
secret, since it is extremely difficult to guarantee that information about the algo-
rithm will remain unknown to a potential attacker.
Proving the reliability of systems being used is done both theoretically and
experimentally, by modeling cryptattacks with the help of a team of experienced
specialists to whom much more favorable conditions are given than the conditions
under which the cryptalgorithm will actually be used. For example, the cryptana-
lysts are provided not only with a ciphertext and a transformation algorithm, but
also with an original text or some part of it, several independent ciphertexts
10 Innovative Cryptography, Second Edition
obtained using the same key, or ciphertexts obtained from the given plaintext using
different keys. The security of the tested cryptosystem is estimated against all
known cryptanalytical methods, and ways of breaking the system are invented if
possible. If the cryptosystem appears secure, it is recommended for actual use.
Modern cryptanalysis considers attacks on encrypting systems based on the
following known data:
Ciphertext
Plaintext and its corresponding ciphertext
Chosen plaintext
Chosen ciphertext
Adapted plaintext
Adapted ciphertext
Hardware faults
Power consumption measurements
Calculation time measurements
who don’t know the secret key, but, according to their given rights, can use the en-
ciphering device to encrypt transmitted messages. To perform such an attack,
lower-level employees can also be involved, who can prepare document forms,
electronic spreadsheets, and so forth.
Chosen ciphertext cryptanalysis assumes that the opponent can use ciphertexts
created by him or her for deciphering. The texts were specially chosen to most easily
compute the secret key from texts obtained at the output of the deciphering device.
Adapted text cryptanalysis corresponds to a case in which the attacker repeat-
edly submits texts for encryption (or decryption), with each new portion being
chosen depending on previously obtained cryptanalysis results. This kind of attack
is the one most favorable for the opponent.
Currently, the most powerful kinds of attacks based on chosen or adapted texts
are differential cryptanalysis (DCA) and linear cryptanalysis (LCA), along with some
methods derived from them.
When testing new cryptosystems, of special interest are attacks based on a
known secret key, or an extended (working) key. We’ll make a distinction between
a secret key and a working key because the secret key isn’t necessarily used in trans-
forming a text being encrypted, but is often just used to create an extended key,
which is what is actually used in enciphering. There are ciphers (such as the GOST
block cipher) in which the secret key is used directly when enciphering data; in
other words, the secret key is also the working key. Obviously, the extended key is
a secret element. When carrying out a cryptanalysis based on known elements of
the key (whether it is secret or extended), it is assumed that the cryptanalyst
possesses some information about a part of the working key. The larger the known
portion of the key that still doesn't provide enough information to uniquely deter-
mine the plaintext using which the cipher remains secure, the less concern there
will be over the cipher in actual attack conditions, where the attacker doesn’t know
the key, but attempts to restore its elements. When comparing two ciphers, the
cipher that better meets the aforementioned criteria should be chosen.
One of the current trends in designing fast software-oriented ciphers is to have
the ciphering algorithm depend on the secret key. In such cryptosystems, a certain
ciphering algorithm is known to the attacker, and it is changed simultaneously
when the secret key is changed. Such ciphers are called non-deterministic or flexible
ciphers. When testing flexible ciphers, it seems reasonable to analyze their secure-
ness against attacks based on a chosen modification of the enciphering algorithm.
In this kind of cryptanalysis, the attacker has the possibility of choosing the weak-
est (in his opinion) modification of the cryptalgorithm among those that can be
implemented. Cryptanalysis is then carried out for the chosen algorithm modifica-
tion based on specially selected texts, with a variant of the attack where there is a
partially known ciphering key also conceivable. If the cryptanalyst fails to find the
12 Innovative Cryptography, Second Edition
The first application was discussed previously. We’ll now briefly explain the
other uses for cryptography. Data ciphering itself isn’t sufficient to protect against
creating false messages, but in many cases a valid receiver can easily detect that a
cryptogram has been modified or substituted; for example, while being transmitted
over the communication line. This can be done by analyzing the semantics of the
message. However, when digital data are distorted, and in some other cases, it is
extremely difficult to detect the fact that the data has been distorted judging by just
semantics. One of the methods of protection against creating false messages by
intentional or accidental ciphertext tainting is a message integrity check. Message
integrity check is a notion related to protecting against creating false messages by
generating some special additional information, depending on the secret key. This
information is called the message integrity detection code, and is transmitted with the
cryptogram. To compute the message integrity detection code, an algorithm is used
Cryptography in the Information Age 13
that specifies how the message integrity detection code depends on each bit of the
message. Here, two variants are possible: computing the message integrity detection
code from the plaintext, and computing the message integrity detection code from
the ciphertext. The longer the message integrity detection code, the higher the
probability that ciphertext distortion will be detected by the authorized (valid) re-
ceiver. An opponent can modify the ciphertext, but since he doesn’t know the secret
key, the new value of the message integrity detection code that corresponds to the
modified message can’t be computed. The opponent either doesn’t change the mes-
sage integrity detection code, or replaces it with a random value. If the algorithm
used for the message integrity detection code computation has good cryptographic
properties, the probability that the modification won’t be detected by the valid user
is P = 2–n, where n is the length of the message integrity detection code in bits.
Valid user authentication involves user recognition, after which the users are
provided with certain access permissions to the resources of computational and
automated information systems. Authentication is based on the fact that valid users
possess some information unknown to outsiders. A special case of the authenti-
cation procedure is password protection of logging in to a computer system. For
example, the user generates some random information and uses it as a password,
while keeping it secret. The password isn’t explicitly stored in the memory of a
computer or other device used to perform authentication. This requirement is
aimed at preventing a possible inside adversary from reading a user’s password and
misappropriating the user’s authorization. For a security system to be able to iden-
tify valid (authorized) users, the images of their passwords, which were computed
according to a special cryptographic algorithm that implements a so-called one-
way function—y = F(x)—are stored in the computer’s memory. The main re-
quirement to this function is that the complexity of computing its value from an
argument be low, but the complexity of computing the argument from a function
value be high (for example, it should be impossible to do in 10 years, provided all
the computational resources of humanity are used).
User authentication on a workstation can be carried out in the following way:
If F(P) = S, the security system gives the user the access rights (authorization)
corresponding to the NAME identifier. Otherwise, an attempt at unauthorized ac-
cess is registered in the user log. To pretend to be an authorized user, an intruder
has to enter a valid password. It is computationally impossible to find the P pass-
word from the S image. If the security system is provided with mechanisms pre-
venting the interception of a password by introducing software viruses or hardware
bugs, or with induced electromagnetic radiation, or through an acoustic or optic
channel, this user authentication method provides high-level protection against
the misappropriation of someone else’s access rights.
This example concerns user authentication on a workstation; in other words,
logging in to a computer. For mutual authentication of remote workstations, it is
important to assume that an eavesdropper is listening in on the communication
line, and, therefore, the described authentication method is unsuitable, because
password transmission via an unsecure channel is unacceptable. Remote worksta-
tion authentication can be done according to the following procedure, using the
E enciphering algorithm and the K secret key shared by remote stations A and B:
Only one who knows the secret key can correctly encrypt a random text. If a
violator intercepts correct cryptograms of random numbers with a key length of no
less than 64 bits, he won’t encounter two equal numbers in any reasonable amount
of time. Therefore, he won’t be able to replace a previously intercepted correct
cryptogram. In this scheme, a LAN server can take on the B workstation’s role.
We’d like to note that this scheme allows the B workstation to make sure the con-
nection is established to the A workstation. However, the A workstation can face a
similar problem authenticating the B workstation. In this case, a similar authenti-
cation procedure is carried out to let A authenticate B. Such a scheme of mutual
recognition by two remote parties (workstations) is called a handshake protocol.
Information integrity control means detecting any unauthorized modification of
information stored in a computer, such as data or programs. In fact, a message in-
tegrity check is an important special case of the integrity control of information
transmitted as a ciphertext. In practice, you often need to make sure that some pro-
grams, initial data, or databases haven’t been modified by some unauthorized
Cryptography in the Information Age 15
method when the data themselves aren’t secret and are stored in public. Informa-
tion integrity control is founded on using a cryptographic scheme to build a mod-
ification detecting code (MDC) that has a much smaller size than the information
being protected against modifications. The basic requirement of the MDC com-
puting algorithm is to specify how the MDC’s value will depend on each binary rep-
resentation bit of all the characters in the original text.
Checking that the information corresponds to its reference state (information
integrity control) is done as follows. When freezing a reference state, say, of the
FILE.EXE program, the MDC value that corresponds to this file is computed. The
value obtained is written in a table that will be used for every check of information
integrity. Suppose that the FILE.EXE program controls a complex and important
technological process, and its failure can lead to downtimes that result in financial
losses. If this is the case, it makes sense to check its integrity before every start. To
do so, we compute the MDC and compare it to the corresponding value stored in
the code table. This method is effective for detecting occasional data distortions.
This scheme of data integrity control isn’t suitable when information is modi-
fied intentionally, since a violator can get around it. He can change the data at will,
compute the new MDC value for the modified data, and substitute this value in the
code table for the reference one (which corresponds to the reference state of the
data). To prevent such an attack, you’ll have to use one of the following additional
techniques:
In the first case, it is difficult to keep the algorithm secret, since it is a constant
element of the cryptosystem. The third case requires significant effort in order to
provide organizational arrangements. The second variant is probably the best.
However, all three cases still require protection against spy programs.
Methods used for integrity control must ensure that the probability of inten-
tional or occasional data modification that will not affect the code’s representation
is extremely small. Here, the task of cryptanalysis is to study the weaknesses of the
MDC generating algorithm and modify the original information so that the control
code doesn’t change. MDC computing algorithms are called checksumming algo-
rithms, and the generated value is called a checksum. In modern cryptographic
protocols and systems, hash functions, which are a special case of checksumming
algorithms, are of great importance.
16 Innovative Cryptography, Second Edition
was built with the private key is verified with the public key, a procedure called dig-
ital signature verification. The probability that a message composed by an intruder
could be mistaken for a message signed by a subscriber to the DS system is ex-
tremely low—say, 10–30.
Thus, the DS verification procedure using a public key makes it possible to state
with a high degree of assurance that a received message was composed by the owner
of the private key. The public key is derived from the private key, or both are
simultaneously generated according to special procedures, computing the private
key from the public key being a computationally complex mathematical problem.
Computationally complex (hard-to-solve) problems definitely have a solution,
but finding it requires an extremely large number of computational operations
(performed by a computer or other device). The number must be large enough so
that using all the computational resources that might be involved in the process
won’t make it possible to find the solution with a significant probability (say, 0.001)
in a reasonable time (decades, centuries, millennia, etc.). The average number of
operations required to find the solution with the help of the best algorithm is used
as a quantitative measure of the complexity of a hard problem. The problem of
estimating the complexity is itself difficult because the complexity depends on the
algorithm used to solve the problem. In general, different complexity values are
obtained for different algorithms. Given a particular hard problem, it is difficult to
prove that the minimum-effort algorithm has been found (in other words, the best
algorithm). Using two-key ciphers is based on the assumption that hard problems
do exist—problems for which no solution can be achieved with comparatively little
effort.
Based on two-key cryptographic algorithms, computerized secret voting systems
use a blind signature mechanism, which makes it possible to sign a message with-
out knowing its contents. Various methods of computerized secret voting are very
promising when it comes to improving political systems in modern societies with
an advanced information infrastructure.
A blind signature protocol makes it possible to build various digital cash systems.
The difference between digital cash and payments using DS is that the former ensures
the purchaser’s secrecy. Also of social interest are computerized coin-tossing systems,
a variant of which is playing poker by telephone. In a broader approach, computer-
ized gambling houses can be opened, in which protection against cheating will be
guaranteed on a higher level than in conventional gambling houses.
Let’s consider the simplest variant of computerized coin tossing. Suppose A and
B are telephone subscribers who wish to play chess by telephone. They want to
fairly decide who gets to be white; in other words, to provide an equal probability
of the white color being selected for either player. Cryptography allows them to
implement such coin tossing according to the following procedure, in which the
18 Innovative Cryptography, Second Edition
y = F(x) one-way function is used. It is stipulated that the player who guesses the
result of an experiment with two equally probable results will move first.
If the result of the coin tossing is not to decide the color selection in an amateur
chess game, but to deal cards when playing poker for money by telephone (dealing
cards by telephone is only technically more complex), a DS system can be addi-
tionally provided to sign all messages concerning dealing cards and making bets by
telephone.
As an example of how computerized coin tossing can be economically justified,
consider it being used in world (European, etc.) soccer (basketball, volleyball, etc.)
championships. To make traditional lot-casting decisions, representatives of par-
ticipant teams and international sport organizations periodically come together at
the same place, spending a lot of time and money. If this procedure is replaced with
computerized coin tossing, time will be saved, and expenses will be kept to a min-
imum. Other examples of using coin tossing are organizing lotteries and fairly dis-
tributing limited resources.
Cryptographic protection against document forgery is the most reliable modern
method of preventing the forgery of documents, and so forth. It is based on the mi-
crostructural uniqueness of a particular physical medium. Given the appropriate
equipment (such as a high-resolution scanner to analyze the paper), it is possible to
reveal unique structural peculiarities of every piece from the same “factory lot.”
Cryptographic protection against forgery is done as follows. The unique peculiari-
ties of the particular medium are scanned, and a digital passport is created, which
includes the document’s contents and information about the paper’s (etc.) mi-
crostructure. Then, the legitimate document issuer uses his (or its) private key to
generate a digital signature for the passport, and writes the passport and the corre-
sponding digital signature to the medium.
Validation of the document is done by scanning the microstructure of the
medium on which the document is issued, reading the information it contains, and
verifying the digital signature of the issuer using a public key that was published,
Cryptography in the Information Age 19
Creating fast algorithms to encrypt data before writing them to the built-in
hard disk (transparent disk encryption algorithms)
Each of these algorithm types must satisfy particular requirements related to its
specific role in the security systems. The disk encryption procedure is very impor-
tant, due to how intensely it is used. Obviously, it must operate automatically and
in real time; that is, in transparent mode.
It is possible to give some requirements to computer security systems that
would correspond to the viewpoints of the various parties participating in creating
and using security systems. From an operator’s (user’s) point of view, a computer
security system should satisfy the following requirements:
Low cost
Ease of maintenance and operation that would allow you to decrease the tech-
nical staff
Full-scale functionality that would allow you to decrease the number of secu-
rity tools used to provide overall security
The possibility of enabling security tools without having to stop data pro-
cessing
Operating in real-time mode
The types of common computer security threats are shown in Figure 1.1. Ex-
ternal, internal, and combined threats are the reasons for the three main types of
potential losses: information privacy violation, information integrity violation, and
Cryptography in the Information Age 21
CS operation violation. In Figure 1.2, various types of external threats and their
goals are shown. Internal threats are oriented toward the same goals as external
ones, but are implemented in other ways, using other kinds of attacks (Figure 1.3).
Unauthorized access
during maintenance
Unauthorized modification Modification of programs
of programs and data
Modification of programs
Modification of data
Spy programs Introducting hidden
programs and viruses
FIGURE 1.2 The classification of external FIGURE 1.3 The classification of internal threats
threats and the analysis of their goals. and the analysis of their goals.
In general, computer security mechanisms must provide data privacy and in-
tegrity, and failure protection. The three main security mechanisms (Figure 1.4)
are data enciphering, controlling the bootstrap procedure, and using cryptographic
22 Innovative Cryptography, Second Edition
FIGURE 1.4 Security tasks and FIGURE 1.5 Additional protection mechanisms
mechanisms of their implementation. and their goals.
checksums. These mechanisms must be built into the security system in various
forms, depending on the peculiarities of its development for particular operating
conditions. The main mechanisms must be combined with additional ones (Figure
1.5), which will provide for the completeness of the security system and its effi-
ciency in technological data protection.
length is equal to the message length. To generate the key, let’s use a physical ran-
dom number generator that provides an equal probability for each element from
the {1, 2, ..., L} number set at its output. A number generated by this generator will
be taken as the index of the chosen key character. This source will provide equal
probability for any key having the n length. In this case, the probability of choosing
a given random key having a length of n is P(K = Ki) = L–n.
The ciphering method used can transform any message Mi into the cryptogram
Ci by using a Ki key whose value depends on M and Ci. Since P(K = Ki) = const
for every i, an arbitrary message Mi can be transformed into any cryptogram Mi and
Ci with equal probability; in other words, the P(M = Mi / C = Ci) = L–n con-
dition is true.
This last statement means that a given cryptogram with the length n can corre-
spond to any original message with the n length with the L–n probability. When en-
crypting a new message, we’ll take a new random key. The described encryption
procedures provide unconditional security. Cryptosystems that use an equally
probable random key having a length equal to the length of the message are called
ciphers with a one-time tape, or ciphers with an infinite keystream. In practice, such
cryptosystems are of limited use, since they require transmitting very long keys.
It can be clearly proven that, to achieve unconditional security, it is necessary
to use an equally probable random key having a length equal to the length of the
message, regardless of the encryption procedure used. This means that these cryp-
tographic transformation procedures play a secondary role for these types of ci-
phers, while it is principally important to use an infinite random key.
Cryptosystems of the second type have a feature that states that as the amount
of the cryptogram available to the cryptanalyst increases when n = n0, there is
only one solution to the cryptanalytic problem. The minimum amount of a cryp-
togram for which only one solution exists is called the unicity distance. With a one-
time tape, n0 tends to infinity: n0 → ∞. When the length of a private key is finite,
the n0 value is also finite. We know that for a given cryptogram having a length
greater than the unicity distance, it is possible to find the only solution to the crypt-
analytic problem. However, for a cryptanalyst possessing limited computational
resources, the probability of finding this solution (in the time for which the infor-
mation remains valuable) is extremely small (10–30 or less).
These type of ciphers are called conditionally secure. Their security is based on
the high computational complexity of the cryptanalytic problem.
The goal of a developer of secure cryptosystems is to decrease the costs of en-
crypting/decrypting procedures, and at the same time set such a level of complex-
ity for the cryptanalytic problem that finding its solution becomes economically
inexpedient. Problems that require such an amount of computations are called
hard or computationally complex, and their solutions are called computationally un-
feasible. Ciphers based on problems for which finding the solution is computation-
Cryptography in the Information Age 25
ally unfeasible are also called computationally secure. Computationally secure cryp-
tosystems are most commonly used.
By the security of cryptosystems of this type, we mean the complexity of solv-
ing the cryptanalytic problem under certain conditions. Shannon introduced the
notion of the work factor W(n) as the average amount of work required to compute
the key from n known characters of a cryptogram, provided the best cryptanalytic
algorithm is used. The amount of work can be measured, say, by the number of
operations needed to compute the key. This parameter is directly related to the key-
computing algorithm. The difficulty of determining W(n) is related to that of find-
ing the best algorithm. Of special interest is the limiting W(n) value, when n → ∞.
At present, no computationally secure cryptosystems are known for which the
lower boundary W(∞) has been definitely found. In light of the complexity of such
estimations, actual ciphers are characterized by an estimation of the W ′(∞) work
factor, which is obtained for the best of the known key computing methods.
Shannon suggested a model for estimating the unicity distance, from which the
equation n0 = H(K)/D is obtained, where H(K) is the entropy of the key (for a
random key, this is the key length in bits), and D is the redundancy of the language
in bits per character. This relation can be rewritten as H(K) ≤ nD, where H(K) is
the number of unknowns in the binary representation of the key, and nD is the
number of equations available for computing the key. If the number of equations
is less than the number of unknowns, there is no one solution to the system of
equations, and therefore the cryptosystem is unconditionally secure. If the number
of equations is greater than the number of unknowns, there is only one solution,
and the cryptosystem isn’t unconditionally secure. However, it can remain condi-
tionally secure when n >> n0. The security level of conditionally secure cryptosys-
tems heavily depends on the particular type of encrypting procedure (here we don’t
consider the case in which a very small private key is selected, where the complex-
ity of trying every possible key is low). Certain transformation procedures also
determine the profile of the work factor; in other words, the specific type of the
W(n) dependency. In the following sections, we’ll look at two-key ciphers, which
are determining modern trend in the development of cryptography. By their na-
ture, they are computationally, but not unconditionally, secure cryptosystems. The
assumption that computationally complex problems exist is fundamental in mod-
ern cryptography.
like to note that, when using an infinite key, there is no need for any complex pro-
cedures that transform the characters of the original text into the characters of the
ciphertext, since it will suffice to use the simple operation of applying key charac-
ters to the corresponding plaintext characters (for example, the operation of bitwise
addition modulo 2).
Practical secrecy most often means the work effort needed to solve the crypt-
analytic problem for ciphers with finite keys. This concerns a theoretical model of
a cryptosystem that is disassociated from specific conditions of cipher usage; in
other words, it has to do with a theoretical estimation of the computational com-
plexity of the cryptanalytic problem. It seems best to describe ciphers having finite
keys as computationally secure cryptosystems. This is because by practical secrecy
we can also mean secrecy that depends on a theoretical security level and on the
organizational and technical conditions of the cipher’s use. For example, when
using ciphers with infinite keys, practical secrecy is determined by various leakage
channels related to processing the original message in the cryptosystem. These tap-
ping channels can be used to intercept a part of the message or key. Actually, even
when these ciphers are used, there is some probability that the transmitted infor-
mation will become known to an interceptor.
In a broad sense, we can also understand practical security to mean the ci-
pher’s security, taking into account a great number of things that happen under the
actual operating conditions of a cryptosystem, and that are related to the integrity
control of all components of the actual cryptosystem. These are things like the
cryptographic protocol, the enciphering device, the secure channel used to transmit
the secret key, the key controlling procedures, and the environmental elements
(such as a protected premises, staff, physical and technical means of protection,
etc.). In the theoretical model of a cryptosystem, only security that is related to solv-
ing the cryptanalytic problem and that determines the maximum achievable secrecy
level is considered. (Under the actual operating conditions of cryptosystems, their
secrecy may be much lower than this limiting value.)
Since actual practical secrecy cannot guarantee complete security of informa-
tion, even when ciphers with an infinite keystream are used, using practically con-
venient cryptosystems with finite keys based on the high computational complexity
of the cryptanalytic problem is completely justified. The fact that computationally
secure ciphers can be decoded doesn’t indicate the work effort such disclosure would
take. When decoding a cipher in practice, the effort the cryptanalytic task takes is the
most important feature, because an attacker’s resources are limited in practice.
When using ciphers with keys that have a finite length, the specific choice of en-
ciphering algorithm is crucial to ensure practical security. The transformation pro-
cedures determine the complexity of the cryptanalysis. It is also important to keep
in mind that the key length must be large enough to prevent completely the
exhaustive search (i.e., to make it computationally impossible to try every possible
Cryptography in the Information Age 27
key when using modern computing systems). With a key length of 128 bits or more,
this requirement is satisfied.
If a computationally secure cipher doesn’t allow key disclosure with a proba-
bility greater than the probability of information leakage through the channels con-
nected to the actual operating conditions of a cryptosystem, using this cipher is
preferable. Besides which, there are a number of applications in which ciphers with
infinite keys cannot be used (for example, when protecting information that flows
in a computer system where all data stored on the hard drive is encrypted). In such
cases, it is better to use ciphers with finite keys (provided the computational secu-
rity of such cryptosystems is high enough).
When developing computationally secure ciphers, two general techniques are
used: confusion and diffusion.
Confusion is the extension of the influence of one character of a plaintext over
several characters of a ciphertext. This begins an avalanche effect (in the case of
block ciphers, it is necessary to extend the effect of every bit of an input text over all
bits of the output text). Diffusion is a ciphering transformation that destroys the re-
lationships between the statistical characteristics of the input and output texts; in
other words, obscures the statistical characteristics of the input message. An exam-
ple of a procedure that performs diffusion is a transposition of plaintext characters
that leads to an equal redundancy distribution over the entire text. (Note that the
redundancy of an original text plays a significant role in a cryptanalysis based on a
ciphertext. However, when performing a cryptanalysis based on a known or chosen
text, there is no point in considering this.)
To prevent the possibility of computing the key in parts, it is also commonplace
to implement a principle of extending the effect of one key character over many
characters of the cryptogram. In cryptosystems in which several successive simple
ciphering procedures are carried out, this principle is automatically implemented
during diffusion.
where EK(M) is a function of enciphering with the K key; in other words, a function
specified by enciphering procedures using the K enciphering key.
The enciphering function sets the correspondence between a plaintext block M
and a cryptogram block C, which is written as C = EK(M). For a given key, one
substitution is implemented. In general, different substitutions correspond to dif-
ferent keys. If a cipher uses a key that is k bits long, this cipher specifies no more
than 2k different substitutions, which is usually an extremely small portion of the
number of all possible substitutions, equal to 2n!. To implement all possible substi-
tutions, you need to use a key with the length of k = log2(2n!) ≈ n2n bits.
One of the statistical methods of breaking ciphers is a frequency cryptanalysis.
This method is based on the examination of the frequency of characters in the
cryptogram, and then making a correlation with the frequency of characters in the
original text. The frequency method makes it possible to break mono-alphabetic
substitution ciphers that correspond to block ciphering when small input blocks are
used (for example, when n = 8). As the input block size increases, the frequency
properties of the language of the plaintext become less pronounced, but even with
Cryptography in the Information Age 29
n = 16, the unevenness of the frequency properties of the original text can be ef-
fectively used to break the cipher. With n = 32, frequency cryptanalysis becomes
extremely complex, and a block cipher with such an input size can be used in some
cases. The minimum secure block length is considered to be n = 64. The greater
the input block size, the higher the security that can be achieved. However, for
large block sizes, manufacturing ciphering devices becomes more complex. When
developing the American DES standard, the choice of the n = 64 value was a cer-
tain compromise between security and implementation convenience. This size was
commonly used for over 25 years. Currently, the potentialities of microelectronics
have dramatically increased, and the n = 128 input block size is now standard.
A large input block size itself is simply a necessary condition for the high secu-
rity of the algorithm being developed. Designing secure block ciphers is associated
with using nonlinear transformations that have good diffusion and confusion
properties, or with combining linear and nonlinear transformations. The advan-
tages of linear transformations are ease of implementation, small operating time,
and the convenience of using the secret key as the transformation parameter. How-
ever, using only linear transformations isn’t sufficient to design secure ciphers.
One method of achieving good diffusion and confusion is building a com-
pound (product) cipher that includes a number of sequentially used simple ciphers,
each of which makes a small contribution to diffusion and confusion. The idea
of building product ciphers was suggested and justified by Shannon. In product
ciphers, ciphering procedures of one type alternate with those of another type.
For simple ciphers, substitutions (S), transpositions (T), and linear transforma-
tions (L) can be used. In such a case, the resulting cipher can be presented as
F = SnTnLn ... S2T2L2S1T1L1.
A secret key can be used with procedures of any one type (T, L, or S). The key
can be also used with procedures of all (or some) types.
The simplest product cipher is shown in Figure 1.6, where the S boxes denote
a substitution operation on 4-bit subblocks of the input message, T means a trans-
position on a 4k-bit data block being transformed, and L is a linear transformation
operation, using which the mixing of encrypted data is performed with a secret key
represented as the K1, K2, …, Kr subkey set. In this r-cascade cryptoscheme, the
encrypting procedure consists of r successive rounds of transformation using dif-
ferent round keys. A substitution operation involves replacing a 4-bit input binary
vector with a 4-bit output binary vector according to a substitution table. If we rep-
resent 4-bit binary vectors with their numeric values (i.e., interpret a binary vector
as a binary number), we can write the substitution table as
⎛ 0 1 2 ... 15 ⎞
⎜ α ,
⎝ 0 α1 α2 ... α15 ⎟⎠
30 Innovative Cryptography, Second Edition
where ∀i, αi∈{0, 1, …, 15}, and the columns set up a correspondence between
the 4-bit input value (the upper row) and the 4-bit output value (the lower row).
For an arbitrary substitution table, it is easy to write a table that specifies the in-
verse substitution. Similarly, the bit transposition operation T and the correspond-
ing inverse transposition T–1 can be specified. For the linear transformation L, it is
also easy to specify the corresponding inverse transposition L–1. The deciphering
procedure is performed according to the scheme shown in Figure 1.7.
The discussed cipher belongs to the so-called iterated ciphers, in which ciphering
is done in the form of repeatedly performing a standard transformation procedure
Cryptography in the Information Age 31
Feistel’s Cryptoscheme
Feistel’s cryptoscheme (Figure 1.8) is a general scheme for designing an n-bit
block cipher based on an arbitrary function F with the n/2 input block size. An
important advantage of this structure is that it specifies the same algorithm
for both encrypting and decrypting. Specifying a particular enciphering mode
is determined by the order of using the round keys. Changing the ciphering
mode is done by inverting the order of the round keys.
The security of ciphers designed using this scheme is determined by the
properties of the F round function. A great many various ciphers are known
that are designed according to this scheme, and only differ in the number of
rounds and the structure of the round function.
Common use
The variety of tasks fulfilled
The variety of operational conditions
Specialization to solve specific problems
The fact that contests for designing new ciphers take place in the United States
(the AES contest), Europe (the NESSIE contest), and Japan indicates the recogni-
tion of encryption’s technological role. The technological areas of application are so
varied that designing new specialized encryption algorithms will still be an urgent
topic for a long time. In modern cryptography, there is significant interest in look-
ing for new cryptographic primitives to build block ciphers that may prove promis-
ing for technological applications, and that will provide:
High speed
High security
A low complexity of implementation
tion is substitution, which is also the most general. This operation is the crypto-
graphic primitive on which the security of most block ciphers is based. The follow-
ing ways of implementing substitutions are known:
operations that are adjusted for cryptographic applications and possess the special
properties necessary for high security encryption algorithms. As a prototype for such
operations, we can use the data-dependent rotation operation that was used as a
basic cryptographic primitive in such ciphers as RC5, RC6, and MARS. Specifying
the current modification of such an operation depending on the data being trans-
formed determines its nonlinear properties. Despite the fact that the choice can only
be made from n different modifications (n is the length of the binary vector on
which the rotation is performed), this cryptographic primitive appears to be quite ef-
fective. Its merits are the simplicity of program implementation, nonlinearity, and
increasing the effective input size to log2n bits (this is the number of data bits that
specify the choice of the current modification; in other words, of control bits).
In general, controlled permutations (CP) and controlled binary operations (CBO)
seem to be more effective for cryptographic applications, since they include a very
large number of possible modifications, which makes it possible to implement a
control input with a size from n to 3n (and in some cases even more). Preliminary
investigations of algebraic and probability-statistical properties of CP and CBO
showed their usability for developing secure fast ciphers.
The structure and working principles of controlled permutations and con-
trolled adders are quite descriptive, so these variants of controlled operations are
thought of as an individual class of cryptographic primitives. Controlled operational
substitutions (COS) are an even wider class of controlled operations. However, this
type of operation isn’t so clearly perceived as an individual class of cryptographic
operations. In connection with this, it is worth stressing how controlled operations
differ from substitution operations of an m×n size, where m > n.
In essence, controlled operational substitutions are specially designed cryptog-
raphy-oriented operations performed over two or more binary vectors. They are
built according to a special rule that allows you to design operations for trans-
forming binary vectors of arbitrary size. These operations have a structure that
makes the complexity of their hardware implementation increase approximately
according to a linear law, while increasing the size of binary vectors being trans-
formed. COSs have the following features:
Use standard boolean functions that specify the relationship between the input
and output bits
The possibility of designing COSs to transform binary vectors that are from 32
to 256 bits
A low complexity of hardware implementation
High performance
The possibility of a theoretical justification for choosing a COS of a certain type
for an arbitrary input size
36 Innovative Cryptography, Second Edition
Controlled binary
Controlled substitutions operations (CBO)
Various types
Controlled rotations of CBOs
Controlled
permutational
Controlled one-cycle involutions
permutations
They make it possible to use all the bits of the data block being transformed
when a unified nonlinear operation is performed. They also make it possible to
reverse a direct operation by inverting a special bit that specifies the encryption
or decryption mode.
They make it possible to design new types of cryptoschemes that allow you to
change the transformation mode by changing the order of the subkeys used.
They make it possible to design effective mechanisms of internal key extension,
which provides a high encryption speed in applications with frequent changes
of secret keys.
Symmetric-key cryptosystems considered earlier in this chapter either use the same
key for encryption and decryption, or the key used for decryption is easily com-
puted on the basis of the encryption key. The main drawback of such ciphers is that
the two parties that exchange data must share a secret key, which results in diffi-
culties in initially establishing secret communications. Two-key cryptosystems (also
known as asymmetric key or public key cryptosystems) considered in this section are
free from this drawback
that is a permutation of the {1, 2, ..., p – 1} number set. (Such a number α is called
the primitive element modulo p.)
Even for a very large modulo p (for example, when k = 1024 bits), it is easy to
compute the value of this function from a given x. The procedure of computing the
function is called discrete exponentiation. To perform this procedure, it would suf-
fice to perform about 2log2p multiplications of k-bit numbers (or log2p multiplica-
tions and log2p divisions of 2k-bit numbers by k-bit numbers). The procedure of
discrete exponentiation is based on the preliminary computation of the α 1, α 2,
k–1
α 4, α 8, ..., α 2 values (modulo p).
The inverse function for the discrete exponentiation is the f-–1(y) function,
which sets the correspondence between the given value y and a value x for which the
α x = y (mod p) condition is true. The problem of finding such an x is called the
discrete logarithm problem (finding the discrete logarithm). Discrete logarithms are
hard to compute when the p – 1 number includes one large prime factor—for ex-
ample, when it can be presented as p – 1 = 2p′, where p′ is a prime number. Under
this condition, the complexity of the discrete logarithm problem is approximately
equal to performing p1/2 multiplied by modulo p. The solution to this problem is
computationally impossible for large k values (for example, when k ≥ 512), and
therefore, for the conditions posed on the choice of the p and α numbers, the dis-
crete exponentiation function is one-way.
The Diffie-Hellman method of public key distribution is the following method
of using discrete exponentiation to exchange private keys between network users,
using only public messages. A large prime number p is chosen, as well as the corre-
sponding primitive element α < p. (To provide for the security of the public en-
cryption system being discussed, the following requirement is posed on the p
number: the expansion of this number into factors must include at least one large
prime factor; the size of the p number must be no less than 512 bits.)
The mechanism of private key distribution over a public channel is as follows.
Every subscriber chooses a random private key x and computes the corresponding
public key y according to the formula y = α x (mod p).
It is easy to compute y from any value of x. However, when the size of the p
number is 512 bits or more, it is computationally impossible to find the discrete
logarithm, and therefore to find the number x for which α x mod p is equal to the
given y value. All subscribers place their public keys in a commonly available di-
rectory. This directory must be certified by a specially founded certification center,
in order to exclude possible attacks involving public key substitution or using false
public keys. If two subscribers, A and B, want to establish a secret connection, they
act in the following way. Subscriber A takes B’s public key from the directory, and
computes the shared private key using his (i.e., A’s) private key:
( )
xA
Z AB = ( yB )xA = α xB = α xB xA ( mod p )
Cryptography in the Information Age 39
where yA and yB are A and B’s public keys, and xA and xB are the corresponding pri-
vate keys. There is no need to transmit the shared private key ZAB over a commu-
nication network because subscriber B computes its value in a similar fashion from
A’s public key taken from the directory
The protocol must be correct—the set of actions specified by the protocol must
allow you to obtain the required result under all possible conditions.
Completeness and unambiguity—the protocol must specify the actions of each
participant for every possible situation.
Consistency—the results obtained by different participants mustn’t contradict
each other.
Awareness and agreement of all the participants—each subject must know the
protocol and all the steps he or she (or it) must perform; all the subjects must
agree to play their roles.
create conditions under which the correctness of using the algorithms and proto-
cols of the cryptosystem will be violated. If such actions are possible, it is said that
the cryptosystem is vulnerable with respect to such-and-such an attack. Two types
of adversaries can be distinguished by their actions: active and passive.
A passive adversary doesn’t take any action that causes the disorganization of a
cryptographic protocol. His goal is to intercept messages that pass over the cryp-
tosystem in order to read their contents, compute distributed keys, or discover the
results of a vote or a coin tossing. Using radio communication to transfer messages
creates conditions favorable for a passive adversary, under which an attack on the
cryptosystem can be detected only indirectly. When using a wired means of commu-
nication, unauthorized connections reveal a passive adversary. However, it must be
taken into account that he can use induced electromagnetic radiation.
An active adversary tries to create false messages, intercept and modify mes-
sages, get access to databases, widen his or her authorization, make a false public
key, forge a signature, and so forth. When using a wired telephone communication,
conditions are ripe for an active adversary, whereas, when using radio communi-
cation, the adversary’s actions can be easily detected. You will also need to foresee
cases in which an active adversary is a valid user of the system.
According to their relationships with the organization using the cryptosystems
(or other protection tools), adversaries can be divided into two types: internal and
external.
An internal adversary is a person with certain valid authorization inside the
organization he attacks, or a participant in a cryptographic protocol who tries to do
harm to other participants of the protocol. Both internal and external adversaries
can be active or passive. An attack by an internal adversary is called an internal
attack.
An attack in which only external adversaries are involved is called an external
attack. It is possible for external and internal adversaries to unite, thus creating the
most serious threat to the secure operation of the cryptosystem. If there is an ad-
versary among the developers, attacks that use trapdoors built into the algorithms
that compute the key parameters or hard-to-detect harmful software viruses will
also be possible.
computes the C = fzi(M) cryptogram, which he then sends to the ith subscriber.
Using the Dzi private algorithm, the ith subscriber computes the original plaintext:
fzi–1(C) = M.
The authors of this generalized scheme of public-key encryption proved that it
can be used to obtain digital signatures. In general, a digital signature is a number
with a specific structure that makes it possible to use a public key to verify that this
number was created for some message with the help of a private key. To implement
a digital signature, you have to choose a trapdoor one-way function fz so that for
every value of the z parameter, the area of the definition of the fz function coincides
with its area of values. With this requirement, for every message that can be repre-
sented as a number from the area of definition of the fz(x) function, the subscriber
i can use the private algorithm to compute the S = fzi–1(M) number. (If the message
is too long, it can be divided into parts of the necessary sizes, and each can be
signed independently.)
Each user of the cryptosystem can restore the M message from the S value. If M is
an understandable message, or if it can be correlated with such a message according to
a pre-specified rule, the S value can be considered the i subscriber’s digital signature of
the M message. Indeed, only the owner of the Dzi private algorithm can generate a
“plaintext” text S that is encrypted to the understandable cryptogram M with the help
of the Ezi algorithm, since only the i subscriber knows how to compute fzi–1.
The i subscriber can also send the j subscriber a signed secret message. To do
this, he encrypts S using the private algorithm Ezj, thus obtaining the C = Ezi(S)
cryptogram. Having received the encrypted message, the jth subscriber decrypts it
with his secret algorithm Dzj(C) = S and then decrypts the S number with the ith
subscriber’s public algorithm Ezi(S) = M. Therefore, the jth subscriber restores i’s
signature and the original message with the received cryptogram C.
Using protocols based on symmetric cryptographic methods assumes that the
two parties trust each other. Public-key cryptosystems (asymmetric cryptosystems)
make it possible to implement interaction protocols for parties that don’t trust each
other. Digital signature systems are one of the most important examples of these. To
effectively use a digital signature in actual business relationships, it is necessary to
legalize it. For this, it is necessary to adopt corresponding national (or interna-
tional) laws, and support public key exchanging with a regular legal procedure that
will provide protection against public key repudiation.
from number theory, for each relatively prime number M and n, where M < n, the
M ϕ(n) = 1 (mod n) equation is true.
For M, we’re going to take the original message that needs to be signed or en-
crypted. The requirement of relative primeness of the M and n numbers will be satisfied
by choosing an n equal to the product of two large prime factors. In this case, the prob-
ability that a random message won’t be relatively prime with the modulus is negligibly
small. For a one-way transformation, we’re going to take the modular exponentiation.
With an e value of the power, we have the E encryption function, which transforms the
original message M into the cryptogram C = E(M) = M e (mod n).
The e parameter is considered public. It is computationally difficult to find M
from a known value S with a known n and e. As the trapdoor of the corresponding
one-way enciphering function M e (mod n), we’re also going to use exponentiation,
but with another value for the power. The new power value d must be chosen so
that the deciphering function D(C) = C d (mod n) is the inverse of E(M) = M e(mod
n); in other words, the condition M = D[E(M)] = (M e)d = M ed (mod n) must be
true.
From this equation, it follows that ed = 1 (mod ϕ(n)). Thus, two exponentia-
tions of modulo n will be mutually inverse if the product of the powers equal one
modulo of the Euler function of the n number. The d parameter is the key to the
trapdoor, and therefore it is private. Now the problem is choosing the necessary
values for the e and d powers. Obviously, it is first necessary to find the value of the
Euler function of the n number. You can see that, for every prime number p, we
have ϕ(p) = p – 1. Since we choose n = pq where both factors are prime numbers,
then, using the multiplicative property of Euler’s function, we obtain: ϕ(n) = ϕ(pq)
= ϕ(p)ϕ(q) = (p–1)(q–1).
Even as far back as Euclid’s time, it was known that if integer numbers e and m
fit the conditions 0 < e < m and gcd(m, e) = 1, then there is only one d that meets
the conditions 0 < d < m and de = 1 (mod m). Besides which, d can be computed
using an extended Euclidean algorithm.
Let’s turn to the following operating scheme of the RSA cryptosystem.
(1) Each user chooses two large, unequal numbers p and q, finds their product
n = pq, and computes ϕ(n) = (p–1)(q–1).
One of the requirements for choosing p and q is that at least one of the num-
bers (p–1) or (q–1) must have one large prime factor. The size of the n value mod-
ulus must be no less than 512 bits. For important applications of an RSA system,
the recommended size of a modulus is 1,024 bits.
(2) Then, an integer e is chosen such that e < ϕ(n) and gcd(e, ϕ(n)) = 1, and a
d is calculated that complies to the ed = 1 (mod ϕ(n)) condition.
(3) A private key is a triplet of numbers—p, q, and d—that is kept secret.
(Actually, it will suffice to keep d secret, since the prime numbers p and q are only
44 Innovative Cryptography, Second Edition
necessary at the stage when the n modulo is chosen and the d number is computed.
After that, the p and q numbers can be destroyed.)
(4) The n and e pair of numbers is a public key that is available to all subscribers
of the RSA cryptosystem.
(5) The signing procedure for the M message is raising the M number to the d
power modulo n: S = M d (mod n).
(6) The verification procedure for the S signature corresponding to the M mes-
sage is raising the S number to the e integer power modulo n: M′ = S e (mod n).
If M′ = M, then the M message is recognized as signed by the user who previ-
ously provided the e public key. Obviously,
S e = (M d)e = M de = M Qϕ(n)+1 = M Qϕ(n)M = (M ϕ(n))QM = 1QM (mod n), that is,
it is possible to generate a cryptogram corresponding to a given public key and a
given message with only a known private key d.
The security of an RSA cryptosystem is based on the complexity of factoring
a modulus into two large prime factors. If the problem of such factoring were
solved, it would be easy to compute Euler’s function of the modulus and then com-
pute the private key from the public key, using Euclid’s algorithm.
Up to the present, no practical feasible general ways to solve this problem for
a modulus 512 bits long or greater have been found. However, for special cases of
prime numbers p and q, the complexity of this problem decreases drastically, and
so when generating a private key in an RSA cryptosystem, it is necessary to perform
a number of special tests. Another peculiarity of the RSA cryptosystem is its multi-
plicativity—E(M1, M2) = E(M1)E(M2) (mod n)—which makes it possible for an ad-
versary to use two signed messages to generate the signature of a third message M3
= M1M2 (mod n). Since M3 in the great majority of cases won’t be a comprehensi-
ble text, this peculiarity isn’t a disadvantage. In the RSA system, it is also necessary
to take into account the following possibility. Having chosen an arbitrary value S,
it is possible to compute the M′ = S e value; in other words, an arbitrary value can
be presented as the signature of a message. Of course, such forged messages are ran-
dom. However, in some applications, it is sometimes required that you sign ran-
dom messages. In such cases, the following scheme is used:
M → T || V.
S = M d (mod n).
Cryptography in the Information Age 45
One useful feature of the public-key encryption system being discussed is that,
when encrypting a message with two or more users, the encryption procedures can
have any order. For example, let C = E1[E2(M)]; then D1[D2(C)] = D2[D1(C)] = M.
This feature can be used in blind signature protocols or in computerized ballot
systems.
Thus, the private key is used to sign messages, and the public key is used to ver-
ify the signature. To send subscriber A a secret message, any user can use A’s pub-
lic key to generate the C = EA(M) cryptogram. Only subscriber A can restore the M
message with the C value, because only he knows the private key corresponding to
the public key used to create the cryptogram. In the RSA cryptosystem, signature
generation is the same as the decryption procedure, and signature verification is the
same as the encryption procedure.
The speed of encryption provided by two-key (asymmetric) ciphers is much
lower than the speed of one-key (symmetric) cryptosystems. This is why hybrid
cryptosystems, in which information is encrypted using one-key ciphers and dis-
tribution of session keys is performed via a public channel with the help of two-key
ciphers are most effective. For example, using the RSA cryptosystem, it is easy to ex-
change a session key with any subscriber, having encrypted the session key with his
public key. The encrypted session key can be easily transmitted over a nonsecure
communication channel, since the private key necessary for decryption belongs
only to the subscriber whose public key was used for encryption. To directly en-
crypt information, two-key ciphers are of limited usefulness.
Generate a random number k that fits the conditions: 0 < k < p–1 and
GCD(k, p–1) = 1.
Compute r = α k (mod p).
Compute s from the M = xAr + ks (mod (p–1)) equation.
From number theory, it is known that the last equation has a solution for s if
GCD(k, p–1) = 1. This equation is easily obtained by substituting the r = α k (mod
p) value into the signature verification equation: α M = α xArα ks = yArr s (mod p).
From the two last formulas, it is obvious that the owner of the private key can
sign the document, and his signature can be verified using the public key. Finding
the (r, s) pair of numbers without knowing the private key is computationally com-
plex. There can be many extremely different signatures corresponding to a given
document (note that k can have different values), but only the owner of the private
key can generate the correct signature. Possible signatures differ in their
r value, but it is practically impossible to find the corresponding s value for a given
r without knowing the private key. To compute the private key from the public one,
you need to solve a computationally complex discrete logarithm problem.
One peculiarity of the El Gamal digital signature is generating a random num-
ber k. In this cryptosystem, you aren’t allowed to use the same k value to generate
signatures for two different messages. This is connected with the fact that it is pos-
sible to compute the private key from two different signatures generated using the
same k values. In addition, the k values used during generation are to be destroyed.
If an adversary gets the k value, he will be able to compute the private key. Systems
that are actually used generate a random k number with a large size, and implement
a mechanism for destroying the number after generating the signature. In a pro-
gram implementation, a scheme of digital signing is provided in which the number
k only appears in the processor registers and the random-access memory, and the
Cryptography in the Information Age 47
3. Having generated the S′ signature, the signer cannot read the M d value,
since it was encrypted by applying the k one-time key to it. If the signer
could find out the M d value, he could easily compute M: (M d) e = M (mod
N). This means that, having obtained the M d (mod N) value (which is the
goal of the blind signature protocol), user A must keep it secret from the
signer.
4. Now, using the extended Euclidean algorithm, user A takes k and com-
putes its multiplicative inverse element (k–1) in the residue field modulo N,
and restores the signature for the M message:
Thus the goal is achieved—user A has generated B’s correct signature corre-
sponding to the M message, and he is sure the signer doesn’t know the contents of
the M message.
a signature with the public key, and the algorithm of computing the hash function
of the message being signed. The algorithms of generating the private and public
keys can also be said to have a mathematical foundation. Operating actual systems
also requires a legal, organizational, software, and hardware basis. The legal basis
includes adopting laws that legalize digital signatures. The organizational basis in-
cludes user registration in a trust center and the signing of documents between the
user and the trust center (or between two users) that states their responsibility for
the public keys exchanged. The software and hardware basis includes a set of soft-
ware and hardware tools that make it possible to perform complex computations
and provide for the security of a database containing signed documents and signa-
ture samples for them.
The possible types of attacks against a digital signature can be divided into sev-
eral groups:
tools and facilities that protect against unauthorized access must be certified by spe-
cial organizations.
One promising method of increasing the security of known ciphers is making the
enciphering process nondeterministic. This idea can be implemented by introduc-
ing random data into the message being transformed. If data-dependent operations
or procedures are used in an enciphering mechanism (as in the RC5 cipher), the
operations themselves will change randomly. The idea of introducing probabilistic
elements in the enciphering process pursues the goal of hampering the use of the
general principle of block cipher cryptanalysis that is based on attempts to reveal
the statistical properties of the encryption algorithm; for example, by choosing spe-
cial original texts or cryptograms.
clude that the average frequencies of all the characters of the output alphabet in a
cryptogram are equal. Decryption isn’t difficult: using a character of the cryp-
togram, we determine its corresponding subset, and from the subset, we determine
the letter of the original alphabet. The described encryption method requires using
f1 + f2 + ... + fL characters in the output alphabet. The most important feature of this
method is that the transformation includes a probabilistic process—
choosing a random element from the given subset.
The described method isn’t of great interest for practice now, but the basic
idea of introducing randomness into the encryption process can be used when
designing modern probabilistic block ciphers.
using the session key. The probabilistic encryption scheme makes it possible to
control decreasing the transformation speed. If the E function has the s0 initial
value of the transformation speed, the speed of the probabilistic encryption is
s = s0(b – r)/b.
There were a number of successful attacks on the DES, RC5, and Blowfish
cryptosystems when a small number of enciphering rounds was used. Obviously,
one can choose a size of a random block R that will make reduced versions of these
ciphers secure against known attacks. For this purpose, the r = b – 1 value will do.
Ciphers with a simple probabilistic mechanism have the following advantages:
RNG
R
B
K
E
where K is the encryption key. Since the size of the input block increases during
encryption, such encryption maps a given text T to a large set of ciphertext blocks
r
{C1, C2, ... ,Cn}, where n = 2 . When decrypting the block of the ciphertext, the valid
user who owns the private key restores the B = R||T block, after which the R value
is discarded, and the original message T is separated. When choosing various val-
ues of the b/t ratio, it is possible to control the encryption strength. The greater this
ratio, the greater the strength.
54 Innovative Cryptography, Second Edition
Obviously, the encryption speed decreases by a factor of b/t = 1 + r/t, and the
size of the C ciphertext increases by the same factor.
In the first variant of enhancing the probabilistic encryption, the decrease in
the r/t ratio, with a significant growth in security, can be achieved by using a non-
deterministic mix of random and data bits. To implement this idea, a random bi-
nary vector is divided into two parts with a pre-specified length: R = R1||R2. Then,
prior to carrying out encryption transformations over the R2||T binary vector, a bit
permutation is done, which depends on the R1 random value that specifies
randomly mixing the bits of the T message and those of the R2 random value. For
bit mixing, it is possible to use controlled operational permutation boxes P, used
earlier as a basic cryptographic primitive to design secure fast ciphers. The permu-
tation performed by a P box depends on the value of the control vector V that is
generated depending on R1. The sequence of transformations in a variant with a
random combination of data and random bits (Figure 1.12) is:
In typical P boxes, the length v of the V control vector is at least twice the
length of the R2||T (r2 + t) vector being transformed. In this case, it is assumed that
the r1 < r2 + t < v condition is true, so the control vector can be created, for
example, by repeatedly replicating the R1 vector (V = R1||...||R1||R1), or by alternat-
ing R1 and the K1 fragment of the private key (V = R1||K1||R1||K1). In the latter case,
mixing the bits of R2 and T is done probabilistically, depending on the private key.
Cryptography in the Information Age 55
Increasing the security against DCA and LCA is connected with the probabilistic
distribution of the data bits over the bit positions of the data block
being encrypted. For example, when performing a chosen-plaintext DCA, the
probability of getting two data blocks with a given difference is significantly small
for r1, r2 = 8. When b = 64 and 128, this corresponds to a rather small portion of
random bits (25% and 12%, respectively).
The second way to make a simple probabilistic encryption scheme more secure
is related to the idea of pre-encrypting an original text T using a randomly generated
value R as a one-time pre-encryption key (Figure 1.13). The transformation se-
quence is:
This case relates to the third variant of increasing security, and it is a general-
ization of the first variant, in which mixing up random and data bits can be con-
sidered a special case of encrypting transformation.
56 Innovative Cryptography, Second Edition
bilistic encryption mechanisms are used in two-key ciphers, a given original text is
mapped to a set of possible cryptograms {C1, C2, ..., CN}, each of which is decrypted
with a secret decryption algorithm Dz (a private key) to the same original text T:
T = Dz(C1) = Dz(C2) = ... = Dz(CN). This is only possible if the length of the cipher-
text is greater than that of the original text. If the length of the ciphertext is r bits
greater than the length of the original text, it is possible to design a probabilistic
mechanism, such that the number of ciphertexts corresponding to a given plaintext
r
is N = 2 . During probabilistic encryption, for the given text T, we generate one
of the possible cryptogram—for example, Ci, chosen from the {C1, C2, ..., CN} set
according to the probabilistic law.
A cryptanalyst can correctly choose the original text, but he cannot verify this
fact, since, when encrypting, he will generally obtain another cryptogram from the
set of possible variants. Having encrypted T, the cryptanalyst will get Cj = Ez(T).
The probability that Cj = Ci is 1/N. The cryptanalyst has to guess the original text,
and the value of a randomly selected parameter that controls the probabilistic
encryption process.
1. Choose a random number R that is reciprocally prime with the p–1 num-
ber.
2. Compute the C′ = α R (mod p) value.
3. Compute C′′ = y RT (mod p) from the ith user’s public key.
4. Send the ith user the (C′, C′′) cryptogram.
In this method, the length of the ciphertext is approximately twice the length of
the original text, and a given plaintext is matched by no less than 2 k different cryp-
tograms (k is the length of the p modulus in bits). Having received the (C′, C′′)
cryptogram, the user i can easily compute the T = C′′/(C′)x (mod p) original text.
Indeed,
T → B = R||T → C = Ez(R||T),
C → B = Dz(C) → R||T → T.
Any message can be divided into texts of the required size, and each can be en-
crypted using probabilistic encryption.
CSs are subject to a many potential threats to information, which makes it nec-
essary to provide a comprehensive range of possible protection tools and func-
tions. It makes the most sense to first protect the most informative channels of data
leakage, such as the possibility of quickly and easily copying data onto removable
high-capacity media, unsecure communication channels, and the theft of a hard
drive or a whole computer. The problem of barring these leakage channels is com-
plicated by the requirement that data protection procedures shouldn’t lead to a no-
ticeable decrease in the performance of the CS.
This places high requirements on ciphers oriented toward use in systems that
protect against UA and that operate in real time:
A modern computer security system oriented toward extensive use must be se-
cure, technologically effective, and ergonomic. Here are a number of basic proper-
ties that make such a system attractive to a wide circle of users:
Pertaining to global encryption, all information on the hard disk, including the
boot sector, the system and application software, and so forth, must be trans-
formed with a fast software cipher.
The platform operating system must be kept unchanged to provide high porta-
bility and compatibility.
A special cryptographic module should be used for the startup initialization to
provide complete control over the startup procedure.
The mechanisms listed are just the main ones. They should be supplemented
with a number of additional modules in order to perform standard tasks of securely
operating the CS, such as program and data integrity control, guaranteed destruc-
tion of the remaining information, locking the keyboard and display, protecting in-
formation transmitted through network communication lines, and so forth.
In modern software systems of computer security, a technology called trans-
parent protection is used. According to it, the user’s everyday working environment
doesn’t change, and he or she doesn’t feel uncomfortable as a consequence of the
protection tools being enabled. In other words, the security system, when working,
is invisible to the user. The basic technology of transparent protection is the
Cryptography in the Information Age 61
method of dynamic encryption of the private information with which the user is
working. Private information written on external media is automatically encrypted
using a key that depends on the user’s password. When being read by an authorized
user, this information is automatically decrypted. Since this dynamic encryption
isn’t noticed by the user, it is called transparent encryption, or transparent crypto-
graphic transformation.
In integrated computer security systems (such as the COBRA system that protects
against UA), one can note the subsystems shown in Figure 1.15. Among these are:
The subsystem
The access The file access The total
maintaining the
authorization demarcation encryption
reference state of the
subsystem subsystem subsystem
operating encirnoment
The file
The user’s The logging
encryption
special shell subsystem
subsystem
FIGURE 1.15 The structure of the COBRA system and the purpose of its main
components.
62 Innovative Cryptography, Second Edition
The information protection level provided depends both on the design quality
and completeness of the computer security system and the setup of its operating
modes, taking into account the opponent model. The security administrator must
set up the necessary protection scheme. By a protection scheme, we mean a set of ac-
tivated components of the security system, and their setup parameters and enabled
operating modes. To configure a particular scheme, the security administrator
must perform the following steps:
When performing the preceding steps, you need to take into account the fact
that effective protection should satisfy two mutually contradictory requirements:
Taking these requirements into account results in a more effective use of com-
puter security systems. After having determined the protection scheme, the security
administrator can proceed with the installation and setup of all the necessary com-
ponents of the protection scheme.
Typical features demarcating the users’ access to the computer resources that
are provided by security systems are:
Demarcation at the logical disk and I/O port level implemented by the autho-
rized access subsystem
Demarcation at the file and directory level implemented by the file access de-
marcation subsystem
Cryptography in the Information Age 63
Cipher testing is the most complex and expensive stage of cryptosystem devel-
opment. To increase confidence in the security of new ciphers, they are tested in
conditions favorable for solving the cryptanalytic problem. For example, versions
64 Innovative Cryptography, Second Edition
procedure decreases the archive’s size and simplifies creating work and backup
copies. It also makes sense to previously compress data when transmitting large
amounts of data over low-speed communication channels. Encryption transforms
an original text into a pseudo-random sequence that won’t compress, and so the
data compressing procedure must be performed prior to encryption. (One of the
tests used to qualitatively estimate cipher security is a test for cryptogram com-
pression. If a cryptogram compresses poorly, the cipher passes the test.)
Thus, when archiving secret data (or transmitting them over a telecommuni-
cation channel), the following sequence of transformations takes place:
1. Data compression
2. Enciphering
3. Writing on a medium (or sending over a communication channel)
1. Reading the ciphertext from a medium (or receiving encrypted data over a
communication channel)
2. Deciphering
3. Restoring (decompressing) the data
data being transmitted. For block cryptosystems, the enciphering and deciphering
procedures exhibit a pronounced diffusion of the influence of input characters over
many output characters, this influence being pseudo-random. In connection with
this, when using block cryptosystems, the interference-tolerant coding procedure
must be performed after enciphering on the sending side. As for the receiving side,
you must first decode and then decipher the message.
Error propagation during deciphering doesn’t take place when you use stream
enciphering, which involves the generation of a keystream by a secret key and syn-
chronous bitwise XORing of the keystream and transmitted message. In this case,
regardless of the order of the ciphering and coding procedures, deciphering and de-
coding on the receiving side can be successfully carried out. For example, when
sending and receiving, you can use the following sequence of data transmission:
coding-enciphering-deciphering-decoding.
showed itself in the early 1990s, when there was a boom in the need for using fast
software-oriented encryption methods.
The leading industrial countries pay much attention to developing new en-
cryption algorithms that satisfy modern technological requirements. In 1998–2000,
the United States, while retaining their leadership in this area, held a worldwide
contest (visit http://www.nist.gov/aes) for the adoption of their new standard—Ad-
vanced Encryption Standard (AES). A number of conferences were devoted to this
contest, in which the proposed ciphers were discussed. The leading world cryptog-
raphers were involved in this competition, and 15 AES candidates were presented.
The contest is now over. A Belgian cipher, Rijndael, was the winner. The RC6 and
TwoFish ciphers were also among the better competitors. Soon after, a similar Eu-
ropean contest was announced, which is currently in full swing. When distributing
encryption algorithms and data protection tools, the leading countries strengthen
their positions in the information security market by offering their products and
services; they increase their influence and, to some extent, acquire the possibility of
controlling the information resource security of other countries.
In Russia, the problem of developing fast ciphers satisfying modern require-
ments and trends has also been officially declared. One of these trends is the
increasing technological requirements for encryption algorithms. While the re-
quirements of providing guaranteed security remains urgent, there is also the prob-
lem of providing a high encryption speed, both with a software implementation
(more than 100 Mbit/sec) and a hardware one (more than 1000 Mbit/sec). At the
same time, the cost of enciphering devices should be affordable enough for the
average buyer. There is also the need to provide algorithm security against a num-
ber of nontraditional attacks, such as differential fault analysis.
The needs of software technology formed the public cryptographic school of
thought outside Russia in the mid-1970s. In Russia, public cryptography began to
actively develop in the mid-1990s. Currently, applied cryptography topics are com-
mon in many Russian scientific magazines. Russian cryptographers took out more
than 30 patents for enciphering. Enciphering issues are usually discussed at confer-
ences devoted to information security. At the end of 1999, a nonprofit organization
was founded in Russia—the “RusCrypto” association—which intends to propagate
cryptographic knowledge, increase the quality of the data protection tools devel-
oped in Russia, and expand Russian public research in the field of cryptography.
Russian approaches to the design of fast ciphers and certain particular ciphers
include important new elements. For example, some suggested encryption methods
based on data-dependent permutations (Russian patents Nos. 2140710, 2140714,
2140716, 2141729) are advantageous for hardware implementation. This approach
has sufficient theoretical and experimental justification, and it has led to the rise of
a new direction in applied cryptography related to the use of specially designed
cryptographic operations—controlled cryptographic primitives.
68 Innovative Cryptography, Second Edition
The prime requirement for encryption algorithms is high security; when this
isn’t satisfied, the other features are of no concern. A specialist familiar with the ba-
sics of cryptography and having sufficient skills in this area can design a secure al-
gorithm relatively quickly. However, there are other requirements on algorithms
intended for wide use. Here are some of them:
to compute the encryption key. One of the major issues of the wide usage of en-
cryption methods is gaining users’ confidence. In the DES algorithm, no trapdoors
have been found in more than 20 years, but many users still have doubts about this
point. Using secret substitutions in GOST complicates comprehensive trapdoor
investigations, which increases the distrust of independent users. How important
for users is the threat that trapdoor ciphers can be imposed on them? The discus-
sion of trapdoor issues in public cryptographic papers has been one-sided for a long
time. In particular, it was directed toward looking for trapdoors in ciphers that had
already been designed. Belgian scientists V. Rijmen and B. Preneel formulated the
trapdoor topic in another way: is it possible in principle to design ciphers for which
it would be computationally impossible to detect the presence of trapdoors? (Even
if the encryption algorithm is published and thoroughly explored by users and
cryptographers.) The Belgians’ research gave a positive answer. They revealed ways
of designing block DES-like ciphers containing trapdoors that nowadays would be
computationally impossible to detect. This result is rather disappointing for users.
If the risk of trapdoor presence in ciphers must be taken into account, is it possible
to avoid attacks based on trapdoors? It is difficult to guarantee protection against
such an attack. However, the following approaches that significantly diminish the
risks can be suggested:
The users or their proxies should take part in designing substitution boxes or
the whole cipher (this approach requires professional training; it also has an-
other disadvantage related to the confidence of other users in a cryptoscheme
designed in such a way).
The user can reject using a cryptosystem with predefined substitutions, and
choose ciphers in which substitutions (for example, substitution tables) are
generated from the user’s private key (such as Blowfish or TwoFish).
The user can reject using substitutions as a basic cryptographic primitive (for
example, the RC6 and SPECTR-H64 ciphers); this variant is also connected
with the trapdoor issue: will it be possible some day to build trapdoors in ci-
phers without substitutions as well?
It is possible to use cryptosystems in which controlled operations are used; in
other words, cryptographic primitives that specify transformations depending
on variable parameters of the encryption process—on the user’s private key
and/or on the message being encrypted. Using data-dependent operations as
cryptographic primitives gives a relatively secure guarantee that there aren’t
trapdoors in the ciphers used. Examples of such ciphers are RC5, RC6, MARS,
and SPECTR-H64 with data-dependent operations.
To neutralize trapdoors, it is possible to use simple probabilistic encryption
schemes, which are comprehensively described in Section 1.5 and Chapter 5.
To retain the original data size, you can compress the data beforehand (note
70 Innovative Cryptography, Second Edition
that this method significantly increases the encryption security at the same
time).
It is possible to use double encryption using two different algorithms, whose
developers are unlikely to be in collusion with each other. For example, you can
encrypt data first using DES and then using GOST (one cipher will neutralize
the trapdoor of the other cipher, and vice versa).
In the most general sense, any block cryptosystem is a method of specifying a kind
of substitution. The essence of encryption is the replacement of the block of the
plaintext by the block of ciphertext. Obviously, for ensuring strong encryption, it is
necessary to use sophisticated transformation procedures that, according to the
Kerckhoff’s principle, are assumed known to the attacker. In practice, ciphers with
64-bit and 128-bit input blocks are used most often. Although rarely, it is also pos-
sible to encounter 32-bit block ciphers and 512-byte block ciphers. Every block
cipher can formally be represented in the form of the set of substitution tables. Each
of these tables corresponds to one of the possible secret keys and specifies (for the
given key) the mapping of all possible input messages and their corresponding
71
72 Innovative Cryptography, Second Edition
cryptograms. However, the size of each of these tables is excessive (n2n bits), which
makes this method of specifying ciphers practically unusable.
Table description of ciphers is the most general. Ciphers specified in the form
of an algorithm are only a small part of possible substitutions; however, these sub-
stitutions are exactly the ones that can be used in practice because they are de-
scribed using a compact method. Thus, the block cipher represented in the form of
a certain transformation algorithm implements the method of choosing a specific
table for substituting the input block by the output block depending on the secret
key. Replacement of the secret key means replacement of the substitution table,
which must not be rebuilt completely. Working with the substitution table is com-
puting the output block by the specified input block if the encryption key is known.
The encryption algorithm characterized by high cryptographic strength speci-
fies a “pseudorandom” transformation; that is, a transformation that is practically
undistinguishable from a random one. For a good block algorithm, without know-
ing the secret key it is computationally difficult to choose such input texts for which
observing the corresponding ciphertexts would allow you to predict any relation-
ship between the result of transformation of the next specially chosen text with the
known output texts. In reality, such dependence has already been specified by the
encryption algorithm as such. However, for cryptographically strong transforma-
tion, this relation is pseudorandom. The first stage of cryptanalysis consists of de-
termining certain conditions under which the encrypting transformation can be
distinguished from a random transformation. If such conditions have been discov-
ered, this means that prerequisites for the cipher disclosure have been created.
However, it is necessary to bear in mind that the task of computing the secret key
might happen to be much more labor-intensive than the task of detecting the en-
cryption transformation and distinguishing it from a random transformation.
Knowing the transformation algorithm is a considerable help for the attacker,
because it allows the cryptanalyst to investigate statistical properties of the cipher.
If you discover specific statistical relationships between input and output texts,
you’ll create the prerequisites for disclosing (computing) the secret key. A natural
theoretical question arises: Is it possible to build cryptosystems with secret algo-
rithms that ensure unconditional security if the key of finite size is used? In this
chapter, it will be shown that ensuring unconditional security of ciphers with secret
algorithm is possible only under conditions of infinite complexity of encrypting
procedures. In this case, the encryption time of any text is infinite, which makes the
practical use of such ciphers meaningless.
Consider the issue of unconditional security of the cryptosystem with the secret
algorithm and finite encryption time. It is assumed that a potential intruder is
human, has access to many contemporary computers, and knows the language in
which the original message was written. Assume that the attacker wants to read a
cryptogram corresponding to the original text of the size that exceeds the key size
Flexible Software Ciphers 73
secret key. Such cryptosystems can be called nondeterministic or flexible. The first
term emphasizes the fact that the encryption algorithm is not known to the crypt-
analyst, while the second term stresses the fact that the encryption algorithm is
modified depending on the secret key.
In nondeterministic cryptosystems, the precomputations algorithm is a form of
specifying a large number of possible encryption algorithms. Because it is assumed
that the precomputation algorithm is known (this is a long-term cipher element),
then the description of possible modifications of encrypting functions is known to
the cryptanalyst. It is assumed that the cryptanalyst knows everything, except for
the choice of specific modification. In this chapter, we cover the practical schemes
of building nondeterministic ciphers, allowing for specifying a large number of dif-
ferent modifications of the encryption algorithm.
The encryption algorithm can be considered secret (in the sense of the uncer-
tainty of the choice of the encrypting procedures modification), despite that such
cryptosystems are investigated and discussed in detail in the open publications.
The secrecy of the algorithm is a specific form of improving the strength of the
cryptosystem, and can be successfully used for building new strong ciphers. The
presence of the precomputations stage is a factor that introduces several limitations
to the use in specific areas; for example, in cases when it is necessary to change the
key often (for example, once per second or fraction of second). In most applica-
tions, the use of the precomputations stage is allowable, therefore nondeterminis-
tic software ciphers are potentially promising for the wide areas of application.
In using the term software ciphers, we mean those that use operations with com-
puter words and take into account the features of data processing in computer
systems, making it possible to obtain high encryption speeds when using common
microprocessors. Considering the huge problem of protecting electronic informa-
tion, software ciphers have quite good possibilities when it comes to practical use.
Let’s look at the peculiarities of designing software ciphers. Ensuring the most
reliable secure data processing mode in computer systems is connected with the
enciphering of all data stored in the nonvolatile memory. In general, data process-
ing involves random requests for data reading and writing, so it is necessary to
encrypt individual data blocks independently.
Modern computers typically have a large volume of persistent memory, and
provide high speeds of reading and writing. These two features make serious de-
mands on ciphers oriented toward use in real-time systems that protect data from
unauthorized access:
Flexible Software Ciphers 75
To design fast software ciphers, it is suggested that you use pseudorandom sub-
key selection. For cryptoschemes with such a nondeterministic selection of subkeys,
elements of the cryptographic key used to transform input data blocks are typically
selected in accordance with the structure of the data block being transformed and
the structure of the encryption key. For ciphers based on such a cryptoscheme, sub-
key scheduling isn’t predetermined, which significantly increases the security of the
encryption. Due to this, the number of enciphering rounds can be decreased, thus
increasing the encryption speed. Ciphers with a data-dependent subkey selection
can be called pseudorandom thanks to this type of key selection.
Data-dependent subkey selection is generally just a formal mapping operation
(substitution) performed according to the table specified by the encryption key.
The encryption key consists of a set of numbered subkeys. An input block specifies
the number of the selected subkey, and the subkey specifies the value obtained as a
result of the mapping operation. The array of elements that implements the map-
ping operation is called an S-box (or a substitution box). We’re going to use the
term data-dependent subkey selection, since the transformed data subblock that
determines the currently selected subkey isn’t replaced by the selected subkey, but
rather both of them are used in subsequent transformations. In such cases, the
encryption process is easier to understand when it is described in terms close to the
procedures actually performed. The term substitution operation is best used in cases
in which the transformation procedure is limited to replacing an input block with
a value from the substitution table.
For software ciphers, the basic principle of diffusion and confusion is supple-
mented with the following mechanisms:
Despite the large number of various encryption mechanisms and their actual
implementations, in general, a block cipher can be considered a subset of substitu-
tions assigned to the set of possible input data blocks. The number of substitutions
does not exceed the number of different possible secret keys in the cipher. The
choice of a secret key corresponds to the choice of a particular substitution. Thus,
a block cipher is a way of specifying a simple substitution in a very large alphabet.
Due to the large size of the input alphabet (for n-bit input blocks, the number of
possible input blocks is 2n, and the number of possible permutations is 2n!), substi-
tutions cannot be specified in tabular form, and the only practical, convenient way
to specify them is algorithmically—in other words, by specifying a rule for com-
puting output blocks using input blocks.
The method of specifying substitutions in the form of procedures controlled by
the secret key determines that substitutions are randomly selected not from the (2n)
subset of all possible substitutions, but from the subset of 2k substitutions, where k
is the maximum length of the secret key in bits. Since it is assumed that the crypt-
analyst knows the encryption algorithm, this means that he also knows the subset
of substitutions implemented by this algorithm. The complexity of cryptanalysis re-
sults from the fact that the number of possible substitutions is extremely large, and
each can be only considered an algorithm describing it when the secret key has a
certain value.
The specific kind of the algorithm determines the rule for building the subset
of possible substitutions, and therefore, the block cipher has certain algebraic and
statistical properties that can be used when performing a cryptanalysis. The ques-
tion is only how complex a certain cryptanalytic method is for a particular encryp-
tion algorithm. While the encryption algorithm plays a secondary role in ensuring
the security of ciphers with infinite keys, for block ciphers with fixed secret keys, the
characteristics of the encryption mechanism are the most important. The principles
of cipher design and the specific kinds of the mechanisms used are oriented toward
specifying a pseudorandom substitution that is hard to distinguish from a random
one, provided the cryptanalyst has a large (but reasonable) amount of initial data to
launch an attack.
The complexity of the cryptanalysis is related to two different factors. When
encryption algorithms with good diffusion and confusion properties are used,
the work effort needed for a successful cryptanalysis depends on the complexity of
analyzing the enciphering procedures themselves. When the encryption algorithm
depends on the secret key, the complexity of the cryptanalytic problem significantly
increases due to the ambiguity of the interpretation of the statistical connections
between the original texts and their corresponding cryptograms. Ciphers in which the
encryption algorithm is built depending on the secret key are called flexible or non-
deterministic. In flexible ciphers, a given key corresponds to only one implemented
modification of the encryption algorithm. A limited set of keys means that a flexi-
Flexible Software Ciphers 77
ble cipher is a set of encryption algorithms described using an algorithm that spec-
ifies a rule for building an encryption algorithm depending on the secret key. Build-
ing secret substitution tables or an encryption algorithm assumes that software
ciphers use a precomputation stage, which is executed only once after entering the
secret key. This is the stage in which is initialized a cryptosystem that will later re-
peatedly perform the data encryption and decryption procedures.
As a rule, iterated ciphers use keys with a length of 56 to 256 bits. Currently, if you
have a key of 80 bits or more, an attack based on trying every possible key cannot
be launched by any organization, even one with many computational resources. To
ensure security against all the other known cryptanalytic methods, a large number
of transformation rounds are used, with transformation procedures that have good
diffusion and confusion properties being executed in each.
Obviously, when longer encryption keys are used, there are more possibilities
for designing fast encryption procedures. However, when using longer keys, it is
more difficult to control (generate, transfer, and store) them. In cryptosystems
intended for a software implementation, the possibility of using and storing long
encryption keys can be provided by special procedures of one-way transformation
of a relatively small initial secret key into an extended cryptographic key, whose size
can be anywhere from 1 to 64 KB. In this case, it would suffice to control the secret
keys because the encryption key can be generated from the secret key when needed
according to the known procedures. The stage of generating the encryption key is
a precomputation stage, executed only once when the enciphering device or com-
puter is switched on. When such a scheme of cipher design is used, the cryptanalyst
must choose between the two main variants of an attack:
He may assume that the extended key is chosen at random, and analyze
relatively simple encryption procedures with the aim of revealing their
vulnerabilities.
He may investigate significantly more complicated procedures of generating the
encryption key and try to solve the encryption equations for the secret keys.
An approximately equal influence of each bit of the secret key on all the bits of
the extended key being generated
A high computational complexity of finding the secret key using the known ex-
tended key
of times, we can easily obtain a unique extended text for every secret key. After en-
crypting this extended text, we obtain a ciphertext that can be used as an extended
key. When a nondeterministic cipher is required, build an input extended text
whose size is greater than the necessary length of the extended key. A portion of the
transformed text will be used as an extended encryption key, and the other portion
will be used to build the encryption algorithm.
In systems with a multipass encryption mode, you can use cryptoschemes with
fixed encryption procedures as one or more of the component algorithms. The se-
curity of these cryptoschemes can be estimated according to approved methods.
It is possible to design cryptoschemes that will allow for arbitrary modification
of a certain set of operations or transformation procedures; in other words,
cryptoschemes whose security is not sensitive to the modification of the set of
operations and procedures used.
The latter approach seems the most promising in designing practical, non-
deterministic ciphers.
Non-deterministic ciphers pose a basically new logical problem for the cryp-
tanalyst—algorithmic uncertainty, which can be quantitatively described with a
number of different potentially implementable modifications of the encryption
algorithm. In ciphers with a fixed algorithm, the uncertainty of the encryption
process for a cryptanalyst is related to the fact that he doesn’t know the secret
key, whose components (subkeys) are used as parameters in the transformation
procedures.
From the standpoint of the uncertainty of the encrypting transformations, flex-
ible ciphers can be presented as a form of specifying key components as adjustable
operations and encrypting transformation procedures. Obviously, it is possible to
design nondeterministic ciphers that use only such “functional” key components.
However, it is more reasonable to design flexible ciphers in which all modifications
of the encryption algorithm also use a regular encryption key that contains “para-
metric” key components. One feature of using “functional” key components is
specifying the uncertainty of the encryption procedures, which strongly hampers
giving a general analytic description of even elementary transformation steps.
With a high level of algorithmic uncertainty, the transformation of a given
block (or a number of blocks) can be described by the subset of all the possible
modifications of the encryption algorithm. From the point of view of quantitative
uncertainty characteristics, parametric and functional components are equivalent,
since the number of variants that can direct the encryption process depends only on
the number of key bits. However, algorithmic uncertainty introduces an important
qualitative feature—the difficulty of using analytic expressions when carrying out
a cryptanalysis. The uncertainty specified by parametric key elements is often re-
moved when mathematical formulas are used, whereas the uncertainty specified by
functional key elements is very difficult to generalize, and it is by no means obvious
as to how to write down the transformation equations. This significantly compli-
cates building a cryptanalytic algorithm that would make it possible to eliminate a
trial-and-error method of finding key elements.
It is especially advantageous to use combinations of functional and parametric
key components. The former give us logical complexity, while the latter give us
82 Innovative Cryptography, Second Edition
Ensuring high security for all possible modifications of the encrypting algo-
rithm against the keyless reading method
Specifying a large number of nonequivalent modifications
Providing an approximately equal probability of choosing a modification from
each subset of equivalent modifications
Providing for security against attacks based on a known and chosen modifica-
tion of the cryptalgorithm
Let’s consider a number of ideas that can be used as the basis for creating non-
deterministic ciphers.
resulting function that corresponds to such cases. For Fi1, any of 2n elements of the
{E1, E2, ..., En, D1, D2, ..., Dn} set can be chosen, while for Fi2, Fi3, ..., Fi2m, you can
choose one of the 2n–1 elements. Taking this into account, it is easy to calculate
the number of all possible modifications S of the resulting encryption function:
S = 2n(2n – 1)m–1.
If the encryption function has the form E = Fim ... Fi2 Fi1, its corresponding
decryption function will be
where C is the transformed value of the data subblock; K1, K2, …, K6 are 32-bit sub-
keys that are constants in the encryption program or variables selected
depending on the data being transformed; G is a binary vector that determines the
influence of the previous data subblocks on the transformation of the current sub-
block; the >>>x operator denotes a reserved unary operation (i.e., an operation
performed on one number—for example, W>>>x denotes a right circular shift by
x bits), the *n symbol denotes a binary operation such as modulo 232 addition (+),
modulo 232 subtraction (–), or bitwise addition modulo 2 (⊕), and n1, n2, ..., n7 are
the numbers of the reserved binary operations. It is suggested that you establish a
specific set of reserved operations in the precomputation stage depending on the
secret key.
The security of the cipher described in the preceding section is mainly based on the
following points:
The nature of the transformations is such that the numbers of the subkeys
selected during encryption make up a pseudorandom sequence—in other words,
the subkey selection depending on data seems random. For a general estimation of
the security of this type of cipher, we can use a combinational-probabilistic model
(CPM), which is expressed in the following assumptions:
The probability that the values of the used variables coincide for two transformed
words is P = M–3(R – 1) (CPM-1) and P = M–3(R – 2) (CPM-2), where M ≈ 232 is the num-
ber of different possible values taken by the U, V, and Y variables. Taking into account
the “birthday paradox,” the N ≈ P–1/2 value specifies the number of input words for
which, with a probability approximately equal to 0.5, there are two input words trans-
formed using the same values of the U, V, and Y variables in the rounds with the
numbers r ≥ 2 (CPM-1) or r ≥ 3 (CPM-2). The N value determines the volume of
texts necessary to launch a cryptanalytic attack. The minimum effort the attack takes,
Smin, is determined by trying half of the possible combinations of 2 out of N elements.
It is easy to obtain Smin ≈ sr M 3(R–1)/4 (for CPM-1), Smin ≈ sr M 3(R−2)/4 (for CPM-2),
where sr is equal to the complexity of some criterion of repetition detection (sr ≥ 1
operations). Here we assume the algorithm modification is known to the attacker.
The secrecy of the algorithm is considered an additional guarantee of security. To test
Flexible Software Ciphers 89
the factor related to the secrecy of the set of transformation operations, it is possible
to suggest an attack based on a specially chosen modification of the cryptalgorithm
that would allow a cryptanalyst to select the most convenient of the implementable
modifications.
Pseudorandom ciphers similar to those described earlier are secure against at-
tacks based on a known part of the extended key, even if the modification is known.
Let’s consider the issue of estimating security when an attacker knows a portion
of the extended key equal to Δ.
When the value of Δ is large enough, in a chosen-text attack (we are referring
to CMP-2) an attacker can choose an input text for which the subkeys will be se-
lected only from the known part of the extended key in the first round. This is why
the input text for the second round can be computed, but in the second and sub-
sequent rounds, the subkeys will be selected according to a pseudorandom law.
Therefore, in each selecting step, addressing an unknown part of the key will take
place with a probability of 1 – Δ. If this happens before completing the transfor-
mation of several words in the next to last round, the problem of computing the
subkey values will seem complicated, since, in this situation, the numbers of the se-
lected subkeys are unknown. The probability that, when transforming the current
word in the second and subsequent rounds, only subkeys from the known part of
the extended key will be selected is P1 = Δ3. The probability of selecting known sub-
keys in all the steps in rounds r = 2, 4, ..., R – 1 is P2 = Δ3e(R–2), where e is the num-
ber of words being transformed. If P2 is a small value Pa, say, Pa = 10–30, we can
consider the cipher secure against this attack variant. From the Pa value, it is possible
to compute a secure known portion of the extended key Δa. For e = 120, we can eas-
ily obtain from the previous formula that
ln Pa
Δ a = exp .
360( R − 2)
ln Pa
Δ a = exp .
360( R − 1)
For the algorithm described in Section 2.3.5, CPM-2 gives the following esti-
mate: Δa is about 0.82 (for R = 3) and 0.91 (for R = 4). Obviously, for the same R
value, the secure portion of the known key for CPM-1 is greater than Δa for CPM-2.
90 Innovative Cryptography, Second Edition
input 512-byte data block. A specific feature of the block ciphers characterized by
the large size of the input text is that they allow you to build such an encryption al-
gorithm, in which powerful avalanche effect evolves within a single encryption
round, when sequentially encrypting data subblocks, the number of which can be
large enough. For example, in the case of 512-byte ciphers, the input data block is
split into 256 16-bit subblocks or into 128 32-bit subblocks. The bottleneck of the
software-oriented ciphers of this type is that encryption of the first data subblock in
each round is carried out using fixed values of variables participating in the en-
cryption procedure. This circumstance makes it necessary to carry out additional
transformation of the initial and final data subblocks. In earlier versions of this
method, one or two additional rounds of transformations were carried out. In the
SPECTR-Z cipher, additional transformation is carried out only over eight 32-bit
data subblocks (four initial and four final) in the form of a reduced round made up
of 40 steps (five loops with eight iterations each) converting individual data sub-
blocks. The reduced round is intended for efficient and fast amplification of the
avalanche effect initiated by inversions of bits in extreme data subblocks. Actually,
a reduced round is executed three times faster than a complete round. Thanks to
the use of a reduced round of such a structure, the encryption procedure can be
limited only by two complete rounds. This allowed the SPECTR-Z algorithm
to reach the encryption speed exceeding 140 Mbps for the Pentium-II 266
microprocessor.
Criteria of Definition
An example of the fast encryption algorithm is SPECTR-Z used in the information
security product for protection against unauthorized access of the same name for
transforming the data stored on hard disks. When the SPECTR-Z algorithm was
initially designed, it was assumed that its main field of application would be ensur-
ing internal encryption in computer systems and used as part of security products
intended for protection against unauthorized access retaining high performance of
computer systems.
The procedure of encrypting the input 512-byte data block must be carried out
as a sequential transformation of 128 4-byte (in other words, 32-bit) words
using operations that require a minimum number of clocks (“+32,” “−32,” “⊕“,”
“>>>,” “<<<,” swapping data between registers, sampling data from RAM).
Every bit of all words transformed at previous stages of the encryption process
must have a significant influence on the process of conversion of all further
words. In other words, sequential transformation of words must be executed in
the concatenation mode. This will ensure a strong avalanche effect when pass-
ing from initial to the final words of the input block. Because it is assumed to
carry out 128 elementary steps for conversion of 32-bit words within one
round, this mechanism will play a considerable role in ensuring high crypto-
graphic strength with low number of encryption rounds.
To ensure efficient concatenation mode, the encryption algorithm must make
provision for at least two variables, the current values of which will be formed
depending on their previous values and on the value of the currently trans-
formed word.
As a basic mechanism of transformation, it is expedient to use the approved
sample of subkeys depending on the data being converted. This mechanism is
a variant of the table substitution using secret tables.
To strengthen the influence of the bits of the words being transformed on the en-
cryption process, it is expedient to execute some cyclic-shift operations depending
on the data being transformed. Contemporary commercial processors execute
these operations fast; furthermore, such operations were found highly efficient as
the basic cryptographic primitive in such ciphers as RC5, RC6, and MARS.
To obtain the possibility of building an efficient subkey sampling mechanism
depending on the data being converted, the size of the encryption key was cho-
sen to be equal to 2051 bytes. This allows for specifying the influence of 11 bits
of the word currently being transformed per one key access operation.
To form an extended encryption key, it is necessary to provide the procedures
of transforming the user’s secret key implemented as precomputations. In this
case, precomputations must ensure strong influence of each bit of the secret
key on the value of the extended key. Modification of any bit of the secret key
must result in the inversion of each bit of the extended key with the probabil-
ity of 50 percent.
oriented toward the use in computer systems in the form of software modules, the
precomputations procedure might be complicated enough, because it is assumed
this procedure will be executed only when the cryptographic system is initialized
(powered on). It is expedient that such a procedure be executed at the phase of the
bootstrap loading of the PC. Thus, in the variant under consideration, the crypto-
graphic algorithm doesn’t imply any considerable limitations on the duration of the
precomputations procedure. Consequently, no considerable limitations are im-
plied on the computer resources, because the precomputations subroutine is non-
resident. This means that it is possible to use multistep procedures that cause a
strong avalanche effect. In particular, this means that multiple use of the direct
encryption algorithms of the SPECTR-Z cryptographic system described in the
next section is also possible.
The use of precomputations forces the intruder to choose between two main
variants of the attack implementation:
The intruder can assume that the secret key is chosen arbitrarily and can consider
relatively simple encryption procedures to detect some kind of vulnerabilities.
The intruder can consider more sophisticated procedures of forming the en-
cryption key to discover the secret key by solving the encryption equation.
Approximately equiprobable influence of each bit of the secret key on all bits of
the extended key being formed
High computational complexity of discovering the secret key on the basis of
partially (for example, by 50 percent) disclosed extended key.
2.8.2 Precomputations
The SPECTR-Z algorithm uses the 2051-byte encryption key Q, which is formed at
the precomputations stage based on the user’s secret key. The extended key is an or-
dered byte sequence q[i]: Q = {q[i]}, where i = 0, 1, … , 2050. When forming the
encryption key, the Encrypt_Z procedure and specified table Z are interpreted as
the sequence ⎯Z = {z[i]}, where i = 0, 1, … , 2050 are used. Both the Encrypt_Z
procedure and the Z table are described here. The algorithm for generation of the
extended key consists in execution of the Form_Q procedure, which accepts the
user’s secret key as the input parameter. The length of the user’s secret key ranges
from 64 to 512 bits.
The ⎯Z table is a 2051-byte sequence:
where z[1024] = 9A, z[1025] = 05, z[1026] = 3C, z[1027] = 29, and the ⎯Z′ and⎯Z′′
sequences (⎯Z′′ differs from ⎯Z′ only in that the last five bytes are missing from
⎯Z′′) are represented by the ⎯G = {G0, G1, … , G512} sequence made up of 32-bit
words written in the form of hexadecimal numbers Gk = g4k+3||g4k+2||g4k+1||g4k, where
k = 0, 1, … , 256:
1. Repeat the user’s secret key the required number of times until the {p[i]}
2051-byte sequence is obtained, where i = 0, 1, … , 2050. Repeated records
must be separated by the bytes with the value 0.
2. Form a new sequence ⎯H = {h0, h1, … , h2050}, where hi = zi ⊕ pi for i = 0,
1, … , 2050, and zi are elements of the previously described ⎯Z sequence.
3. Form the ⎯R = {r0, r1, … , r511} sequence, where ri = pi for i = 0, 1, … , 511.
4. Using the byte sequence ⎯H as a key, call the Encrypt_Z procedure to carry
out the following transformations: R(0) := Encrypt_Z (⎯R); ⎯R(1) := En-
crypt_Z (⎯R(0)); R(2) := Encrypt_Z (⎯R(1));⎯R(3) := Encrypt_Z (⎯R(2)).
5. Form the following 2051-byte sequence: L = {⎯R(0),⎯R (1),⎯R (2),⎯R(3), r[0],
r[1], r[2]}.
6. Using the byte sequence⎯L as a key, call the Encrypt_Z procedure to carry
out the following transformations: C(0) := Encrypt_Z (⎯R); ⎯C(1) := En-
crypt_Z (⎯C ); C := Encrypt_Z (⎯C ); ⎯C := Encrypt_Z (⎯C(2)).
(0) (2) (1) (3)
Flexible Software Ciphers 99
The reduced round is executed in the form of five encryption loops for en-
crypting the 256-bit reduced data block. Each of the loops includes eight iterations
for transforming 32-bit words. These iterations are executed similarly to the trans-
formation iterations in the complete round. The second round consists in sequen-
tial transformation of the following words: T124, T125, T126, T127, T0, T1, T2, T3. Each
100 Innovative Cryptography, Second Edition
loop of encryption of the Each loop of the preceding eight words, except for the
last, is followed by exchanging values of the following pairs of words: T0 ↔ T127,
T1 ↔ T126, T2 ↔ T125, T3 ↔ T124. The complete encryption round consists of
the following. The block of plaintext ⎯T is split into 128 32-bit words Ti: T = {Ti},
i = 0, 1, … , 127. The words of the data block being transformed are converted ac-
cording to the following sequence: T0, T1, … , T127. The procedure for encrypting
the data block Encrypt_Z is provided next.
1. Set the counter value i := 0 and compute the initial value of internal
variables R := Q[9], V := Q[7], Y := Q[3], U := Q[9], N := Q[5], n := N +11 0.
2. Carry out the following transformations:
N := n ⊕ R; V := V +32 N;
n := N +11 0; V := (V +32 Q[n])>11>;
N := n ⊕ V; Y := Y +32 N;
n := N +11 0; Y := (Y +32 Q[n])>11>;
N := n +32 Y; n := N +11 0;
U := ((U ⊕ Q[n]) +32 R)>>>V; R := 0Ti.
3. Carry out the transformation of the next word of the text: Ti := ((Ti –32 V)
⊕ U)<<<V –32 Y.
4. Increment the counter i := i + 1. If i ≠ 128, then go to step 2, else STOP.
2. Set the value of the internal counter i:=124 and compute the initial values
of internal variables R := Q[9], V := Q[7], Y := Q[3], U := Q[9], N := Q[5],
n := N +11 0.
3. Carry out the following transformations:
N := n ⊕ R; V := V +32 N;
n := N +11 0; V := (V +32 Q[n])>>>11;
N := n ⊕ V; Y := Y +32 N;
n := N +11 0; Y := (Y +32 Q[n])>>>11;
N := n +32 Y; n := N +11 0;
U := ((U ⊕ Q[n]) +32 R)>>>V; R := Ti.
4. Carry out the transformation of the next word of the text:
Ti := ((Ti -32 Y)>>>V ⊕ U) -32 V.
5. Increment the counter i := i + 1 mod 128. If i ≠ 4, then go to step 3.
6. Decrement the external counter j := j - 1. If j = 0, then STOP.
7. Exchange the values of initial and final words of the text: T0 ↔ T127,
T1 ↔ T126, T2 ↔ T125, T3 ↔ T124.
8. Return to step 2.
Decryption of the encrypted text is carried out using the Decrypt_Z procedure.
1. Set the counter value i := 0 and compute the initial values of internal vari-
ables R := Q[9], V := Q[7], Y := Q[3], U := Q[9], N := Q[5], n := N +11 0.
2. Carry out the following transformations:
N := n ⊕ R; V := V + N;
n := N +11 0; V := (V +32 Q[n])>11>;
N := n ⊕ V; Y := Y +32 N;
n := N +11 0; Y := (Y +32 Q[n])>11>;
N := n +32 Y; n := N +11 0;
U := ((U ⊕ Q[n]) +32 R)>>>V.
102 Innovative Cryptography, Second Edition
3. Transform the next word of the text: Ti := ((Ti +32 Y)>>>V ⊕ U) +32 V.
4. Assign the value R := Ti and increment the counter i := i + 1. If i ≠ 128, then
go to step 2, else STOP.
Note that the structures of the encryption and decryption procedures are iden-
tical. In both cases, transformation of words in complete rounds starts with the
word T0, and proceeds in the order T0, T1, T2, … , T127. By analogy to the subkeys
of the extended key, which are related to the elements of the secret key by a sophis-
ticated functional dependency, the values of accumulating variables are functions
of the extended key and subblocks transformed at the previous steps. Such a mech-
anism is due to the fact that subkeys Q[j] are not used in the equation of the direct
transformation of the input block (step 3 of the complete round algorithm and step
3 of the reduced round algorithm). In addition, three accumulating variables that
take pseudorandom values participate in the direct transformation of the words of
the input block in each round. These factors influence the efficiency of transfor-
Flexible Software Ciphers 103
the computational strength against this attack that doesn’t exceed 109 operations.
High strength against this kind of cryptanalysis is achieved thanks to the following
factors:
The values of numbers of the chosen subkeys are never present in the cipher-
text. The numbers are formed as values of the internal variable of the encryp-
tion mechanism.
The error introduced at the last round into some word propagates using the
mechanism of forming the U, V, Y, and n variables. This error is introduced
into all these variables, and, at the same time, modifications of n result in the
change of the subkey sample. These changes are difficult to differentiate ac-
cording to their integral effect on the next word.
Variable U formed using the last subkey sample doesn’t participate in the trans-
formation of the words of the input text as an operand of the last operation,
which considerably distorts the statistics of subkey differences, because of the
superposition of variables Y (during encryption) and V (during decryption),
which are not known beforehand.
Disclosing nonuniformities in the subkey differences statistics is further com-
plicated. Because after superposition of a subkey on the initial value of variable
U, the value R is superimposed on it, after which the cyclic shift operation takes
place. This shift is carried out by the number of bits, which is not known to the
attacker beforehand.
at the steps corresponding to the transformation of the i-th word are marked with
index (i).
Procedures of a single encryption round can schematically be represented as
follows: depending on the values of the current input words being transformed, the
subkeys that will be used for forming the U, V, and Y variables are sampled. These
variables are used for transforming further words. The algorithm is designed so that
the change of any bit in an arbitrary input data block results in the modification of
the subkeys sample and the change of the key variables. This means that each input
message is transformed using unique sequences of the U, V, and Y variable values.
At the same time, during the first, and, partially, the second rounds (during the first
loop of the second round) at certain steps of the transformation, the values of U, V,
and Y might be predetermined to match for specially selected input messages. To
achieve this, it is necessary to choose two input messages differing only in the T127
word. As relates to the four last loops of the second round and all steps of the third
round, the values of internal variables for each pair of input messages might match
only occasionally.
Although conversion of 32-bit words is carried out in accordance with rela-
tively simple equations, the set of variable values is pseudorandom.
Determination of the values of subkeys Q[j] is related to finding the values
of U, V, and Y at certain steps of the transformation (for example, at the two near-
est sequential steps of the word transformation). Therefore, fixing the values of
U, V, and Y at specific steps is the prior condition for computation of subkeys
Q[j]. Fixing in this case must be interpreted as finding such words within the same
input message or in different input messages that were transformed using the val-
ues of U, V, and Y, related by a certain condition. For example, for two different
words, T and T′, the corresponding pairs of values of each of the accumulating
variables might be equal (U = U′, V = V′ , and Y = Y′), differ by a specified value
(U ⊕ U′ = const1, V ⊕ V′ = const2 and Y ⊕ Y′ = const3), or be related by a linear
relationship. Note that the concept of fixing includes any predefined dependencies
between the values of accumulating variables corresponding to the chosen pair of
words, which means that employment of differential and linear cryptanalysis is
covered by the combinatorial-probabilistic model as a particular case.
The equation describing the encryption of an individual word T (belonging to
the middle of the input data block; that is, excluding four starting and four final
words) in the general case is formulated by the expression C = f(T, U1, V1, Y1, U3,
V3, Y3), where index corresponds to the encryption round. Analysis of the experi-
mental statistics of the sequence of values taken by the U, V, and Y variables con-
firms that these variables take pseudo-random values.
To obtain generalized minimum evaluations, it is necessary to adopt a set of
assumptions, which the attacker cannot suggest under real-world conditions. As-
sume that the solution of the system of equations corresponding to transformation
Flexible Software Ciphers 107
of two different words is a problem with a low level of complexity, provided that
these words were transformed using fixed sets of accumulating variables U1, V1, Y1,
U3, V3, Y3. Assume that the complexity of cryptanalysis depends only on the detec-
tion of the pair of words that correspond to the fixing condition.
This corresponds to the general principles of attacking ciphers—recognition
(in case of known-plaintext attack) or specification (in case of chosen-plaintext
attack) of certain expectable relations between unknown parameters. In this case,
the search for pairs of words satisfying the fixing condition can be characterized
according to several generalized criteria:
The attacker must develop a certain criterion for recognizing words that satisfy
the fixing condition. Such a criterion can be related to the use of statistics of
certain computations carried out using a certain assumption. Assume that the
attacker has a simple and efficient criterion that for two specified words allows
the attacker to discover whether these words satisfy the fixing condition with
minimal labor expenses (within a single conventional operation).
The attacker cannot know beforehand the numbers of words that with a high
level of probability correspond to the adopted fixing condition; however, the
attacker can choose for testing words with specific numbers, for which the fix-
ing condition can be satisfied with higher probability.
To find the pair of words corresponding to the fixing condition, the attacker
tries pairs of words corresponding to increased probability of the fixing condi-
tion occurrence.
In case of known-plaintext attack for the tested pairs of words T and T′, the val-
ues of U1, V1, Y1, U3, V3, Y3 are different in general case. In the case of a chosen
plaintext attack, it is possible to choose such pairs of the input blocks, for which at
each specified step of the first round the same values of the U1, V1, Y1 variables are
formed (these variables will change from word to word; however, in the first round
for such pairs of input blocks this change will take place synchronously). Such pairs
of input messages can be easily obtained by means of modifying the Ti word in
the⎯T input block, where 0 < i < 127. In the pair of texts⎯T and⎯T′ obtained in this
way, the Tj words, where 0 ≤ j ≤ i, in the first round will be transformed using the
same values U1, V1, Y1. However, after execution of the reduced round, any change
in⎯T′ will result in the modification of all bits of words T0, T1, T2, T3, T124, T125,
T126, T127 with the probability equal to 0.5. The process of encryption in
the third round will be related to the pseudorandom values of the differences
U3(i) − U3(i)′, V3(i) – V3(i)′, and Y3(i) – Y3(i)′. In the pair of texts⎯T and⎯T′, the attacker
can exploit the fact of repetition in the first round the values U1, V1, Y1 for words Tj
and T′j, where 5 ≤ j ≤ 123. (Analysis of the four starting and four final words is less
108 Innovative Cryptography, Second Edition
efficient because the starting and ending words are additionally transformed in the
second round.)
With the account of these facts, two variants of the generalized combinational-
probabilistic model (CPM) were suggested:
Note that in the second case, the complexity of the cryptanalysis in case of
chosen ciphertext has approximately the same value as in case of chosen plaintext,
because encryption and decryption algorithms are practically identical. CPM-1 and
CPM-2 differ by the probability of the event in which two arbitrarily taken words
were transformed using the same values of accumulating variables. Such a pair of
words is called the target pair. The required probability for CPM-1 is p1 = M–6, and
for CPM-2 it is p2 = M–3, where M = 2–32 is the number of different values that vari-
ables U, V, and Y can take.
If there is a certain amount of known or chosen texts, in which there are L
words (related to words with indexes i = 4, 5, … , 123), it is possible to distinguish
2
C L different pairs, which in a first approximation can be considered independent.
With the account of the latter fact it is possible to evaluate the probability that
L –L
among given L words, there will be the target pair of words as P = 1 – AM M .
2
For the case P<0.6, it is possible to use the approximate formulae P1 ≈ p1 C L for
2
CPM-1 and P2 ≈ p2 C L for CPM-2. For P1 = P2 = 0.5, it is easy to obtain the values
L1 and L2, which can be considered minimal numbers of known or chosen words,
among which the target pair of words can be found with the probability of 0.5:
L1 ≈ p1–0.5 and L2 ≈ p2–0.5. These values correspond to the numbers of different
encrypted input data blocks: L1′ > 2-7L1 for CPM-1 and L2′ > 2-7L2 for CPM-2. If
such information is available for the cryptanalyst, the attacker can find the target
pair, using the criterion for recognizing repetitions.
The complexity of finding this pair W is taken for the complexity of crypt-
analysis; that is, for the cryptographic strength of the algorithm. In reality, con-
sidering individual pairs of words cannot ensure identification of a repetition;
however, with the model under consideration, this assumption is taken in favor
of the attacker because the goal of this evaluation is determining the lower limit of
the algorithm strength. Assume that the attacker has some additional condition
that needs to be checked for different pairs of arbitrarily chosen words. To find
the target pair with the probability of 0.5, it is necessary to check half of the total
2
number of possible combinations C L. Assuming that the attacker carries out one
check within a single operation, the cryptanalysis complexity can be evaluated as
W1 = 0.5p1-1 and W2 = 0.5p2-1.
Flexible Software Ciphers 109
P L, L’, W,
Attack variant words blocks operations
From the developer’s point of view, CPM provides a good generalized evaluation,
because it doesn’t overestimate the cryptographic strength. Comparison of the results
obtained using CPM-1 to the results of specialized cryptanalytical research carried out
for the COBRA system confirms these results. Actually, expert analysis using known
methods of cryptanalysis has produced the values L ≈ 6.1013 bytes and W ≈ 4⋅1015
operations, while CPM-1 produces considerably smaller values: L ≈ 107 bytes and
W ≈ 1014 operations. This, along with the fact that no cryptanalysis variants produc-
ing smaller value than the one determined according to CPM have been found for the
SPECTR-Z cipher, allows us to adopt the evaluation obtained according to CPM.
The file encryption key is some extended key formed based on the secret key.
With this being so, the procedure uses the precomputations algorithm that doesn’t
110 Innovative Cryptography, Second Edition
allow for computation of the secret key even if the extended key is known. The se-
cret key is common for encryption of all files of a given user. The user’s secret key
is formed at the PC bootstrap phase at the precomputation stage. The key is 1024-
bytes long, and represents a set of 256 32-bit subkeys Q[ j], j = 0, 1, … , 255.
The general scheme of file encryption consists of the generation of 8-bit elements
of the key range depending on the ordinal number of specific bytes in the file and on
the additional local key with subsequent superposition of the range elements over
corresponding bytes of the file. The local key is 64-bits long. It is formed when open-
ing the file depending on the secret file encryption key and a 64-bit label, presumably
known to the intruder. Local labels are generated arbitrarily and are assigned as at-
tributes to each file, for which encryption mode is specified. The probability of form-
ing the matching labels for different files is negligibly small (about 2–64).
Assume that M = U||V is a 64-bit label represented as a concatenation of two
32-bit words U = u4||u3||u2||u1 and V = v4||v3||v2||v1. In the further few sections, the
algorithm used for generation of the local key will be considered in more detail.
The value R = U||V after executing five rounds of the transformation will
represent the local key. File encryption is carried out according to the algorithm
described in the next section, where the following designations are used:
N = n4||n3||n2||n1 is the number of the currently transformed byte represented in the
form of concatenation of an 8-bit number, R = r8||r7||r6||r5||r4||r3||r2||r1 is the local
key represented in the form of concatenation of eight-bit subkeys, F = f4|| f3|| f2|| f1 is
a 32-bit variable, and j is the 8-bit number of the chosen subkey.
Flexible Software Ciphers 111
This algorithm is used for both encrypting and decrypting files. It ensures the
transformation rate of about 80 Mbps for the Pentium-II 266 microprocessor.
Obviously, this algorithm ensures independent encryption of each byte of the file
being encrypted. This ensures high flexibility when working with large files such as
database files, for example. The key range being generated g(N) is practically unique
for every file, because it is generated depending on the local key, which is formed on
the basis of an arbitrary label.
Note some specific features of the file encryption algorithm under considera-
tion. If some file is known to the cryptanalyst in the plaintext form and in the
encrypted form, he will easily compute the key range corresponding to this file.
However, disclosing the file encryption key by the key range is complicated, even if
the chosen plaintext is available. Because of this, disclosure of some files doesn’t
compromise the confidentiality of the others, and an attack based on the encryption
of the specially chosen files doesn’t provide the cryptanalyst with any additional
possibilities of computing the secret key. If storage media are stolen, the cryptana-
lyst can easily discover the label value; however, it will be impossible to compute the
local key, because this requires the attacker to know the file encryption key. The file
encryption algorithm is strong against known methods of cryptanalysis, including
attacks based on generating arbitrary hardware errors.
form of the software cryptographic module smaller than 100 bytes, which allows for
placing it within the protection system loader (which is only 512 bytes in size).
The general cryptoscheme of the mini-algorithms includes two stages:
After 35 rounds of encryption, the value A||B is the output value of the mini-
algorithm. The procedure of encrypting the operating system loader is carried out
when installing the protection system or changing the secret key. This procedure
can be easily built by the decryption algorithm.
Mini-algorithm ensures high strength against attacks based on known and cho-
sen text several KBs in size. This mechanism ensures an excellent balance between
the module size and cryptographic strength. It should be mentioned that a poten-
tial cryptanalyst does not have a sufficient amount of corresponding pairs of the
Flexible Software Ciphers 113
Building a software cipher with flexible input is an issue of practical interest. This
task can be accomplished based on the algorithm of the SPECTR-Z system, and, at
the same time, the variable block length must relate to that part of the block that is
transformed in two rounds. This will allow for obtaining high speeds for smaller
blocks. If the block size is small, the speed will be several times lower, because for
starting and terminating words of the input block the number of rounds cannot be
smaller than six because of security considerations.
The software block algorithm SPECTR-F considered in this section is a modi-
fied version of the SPECTR-Z algorithm, which differs from the original in that the
size of the input block is not fixed. Instead, the size of the input block in the mod-
ified algorithm can have the size from 128 bits or higher; however, this value must
be a multiple of 32 bits. Thanks to this, SPECTR-F provides the flexibility required
to optimize the selected block lengths for specific applications. This allows for
obtaining considerable improvement of the encryption speed when encrypting
large data blocks (up to 300 Mbps for contemporary commercial processors). For
encryption speeds about 100 Mbps, this algorithm ensures the possibility of en-
crypting data in 128-bit blocks, if necessary.
The SPECTR-F cryptosystem was developed based on the same criteria as the
ones used for the SPECTR-Z cryptosystem. Variable length of the input block en-
sures better flexibility of the SPECTR-F algorithm. The parameterized value 32m
(bits), where m is a natural number satisfying the inequality m ≥ 4, was chosen as
the input block size for the SPECTR-F algorithm.
Similar to other ciphers with extended key, in the SPECTR-F cryptosystem it is
assumed that the extended key is generated depending on the secret key of relatively
114 Innovative Cryptography, Second Edition
Precomputations
To carry out precomputations, the secret key (input parameter) is repeated the re-
quired number of times to obtain a 2051-byte sequence designated as ⎯Q′ = {q0′,
q1′, … , q′2050}. After that, the auxiliary key ⎯H = ⎯Q′ ⊕ ⎯Z is formed, where⎯Z is a
sequence formed using the Table_Z procedure. The Q′ key is then transformed sev-
eral times using the Encrypt512 procedure and the H key. The extended key⎯Q is
formed according to the FormKey procedure described here. In this procedure,⎯Q′
is interpreted as a sequence of four 512-byte blocks⎯Q(1),⎯Q(2),⎯Q(3),⎯Q(4) and three
bytes; that is, ⎯Q′={⎯Q(1),⎯Q(2),⎯Q(3),⎯Q(4), q(0), q(1), q(2)}, where q(0)=q′2048,
q(1)=q′2049 and q(2)=q′2050. The encryption key⎯Q is a sequence of bytes qi: ⎯Q = {qi},
where i=0,1,…,2050. In the course of data encryption the subkeys Qj =
qj+3||qj+2||qj+1||qj, where j = 0, 1, … , 2047, are used.
Transformation Algorithms
The SPECTR-F encryption algorithm includes two complete and four reduced
encryption rounds. The block of plaintext ⎯T is split into four 32-bit words
Ti: T = {Ti}, where i = 0, 1, … , m – 1 (m ≥ 4). The value of the natural number
m is set depending on the application area. In each encryption round, the input 32-
bit words T0, T1, T2, … , Tm-1 are transformed. Note that when m = 4, complete and
reduced rounds are identical. After each round, except for the last, the values are
exchanged in the pairs of words T0 ↔ T3 and T1 ↔ T2. Transformation algorithms
include the following two standard procedures: Initialize and Change_NVYU.
1. Set the value of the internal counter i := 0 and initial values of variables
R := Q[9], V := Q[7], Y := Q[3], U := Q[9], N := Q[5].
2. END.
1. N := N ⊕ R; V := V +32 N;
2. N :=N ⊗ F; n := N +11 0; V := (V +32 Q[n])>>>11;
3. N := N ⊕ V; Y := Y +32 N;
4. N :=N ⊗ F; n := N +11 0; Y := (Y +32 Q[n])>>>11;
5. N := N +32 Y; N := N ⊗ F; n := N +11 0;
6. U := ((U ⊕ Q[n]) +32 R)>>>V.
7. END.
FIGURE 2.4 The scheme illustrating the order of transformation of 32-bit words into
ciphertext in the SPECTR-F cipher.
pseudorandom, because they are formed in the course of execution of the starting
five rounds.
On all the other steps of transformation of the words T5, …, Tm-1 the values of
variables N and R are mutually dependent on N(4) and R(4), which together specify
64 independent bits. Taking into account that when changing from word to word
three new subkeys are used (the power of the set of implemented values of each
being equal to 211), it is possible to assume that for such a system of analysis an
exceeding amount of statistical data will be required. This is because the process of
encryption is influenced by some pseudorandom “generalized” 97-bit parameter.
Thus, this variant of attack corresponds well enough to CPM-2 under considera-
tion, which can be characterized by a 96-bit pseudorandom parameter represented
by a set of three variables (U6, V6, Y6).
3 Substitution—Permutation
Networks with Minimal
Controlled Element
123
124 Innovative Cryptography, Second Edition
suggested ciphers could not compete with other symmetric cryptosystems by the
speed of operation and simplicity of the schematic implementation. This is mainly
because key-dependent bit permutation remains a purely linear operation, because
it is fixed after the key input. The situation becomes principally different when the
permutation is a variable operation; that is, in cases when the result of its execution
depends on the value of the data block being transformed, which is a variable value
by its nature.
To execute variable permutations, the most suitable are CPNs with the layered
structure shown in Figure 3.1, where the main building block is a permutation
element P2/1, which can be called the elementary block of controlled permutations
(controlled permutations block, CPB), because it implements two different per-
mutations of two input bits x1 and x2 depending on one control bit v. An elemen-
tary block P2/1 is controlled by a single bit v and forms a two-bit output (y1,y2),
where y1 = x1+v and y2 = x2–v. Since there are only two permutations of this type, el-
ementary CPM implements all possible permutations. With the increase of the
CPB input size, implementation of all permutations becomes problematic, for
mostly all practically significant values of the input size n CPBs implementing all
possible n! permutations can be built. At the same time, such operating blocks are
fast enough to ensure high encryption speed based on variable permutations. In
layered CPBs, the number of active layers s is related to parameters m and n as
follows: s = 2m/n.
Assume that some CPB implements a set of different permutations corre-
sponding to different values of the controlling vector V. According to the number
of layers, vector V can be represented as a union of s vectors V1,V2,...,Vs ∈ GF(2)n/2;
that is, V = (V1, V2, …, Vs). When the value of the controlling vector is fixed, a cer-
tain permutation ∏V is implemented. The block of controlled permutations Pm/n
can be described using an ordered set of modifications {∏0, ∏1, …, ∏2m–1}, where
each modification ∏V, V = 0, 1, …, 2m–1 is a fixed permutation of n bits. Permuta-
tions ∏V will be called modifications of controlled permutation. Execution of the
controlled permutation Pm/n(V)(X) consists of the execution of the permutation ∏V
over X : Y = Pm/n(V)(X) = ∏V(X). For cryptographic applications, the most interest-
ing are values of n, which are natural powers of two. The most promising is de-
velopment of CPBs of different orders, because the number of active layers in a
CPB decreases with the decrease of the order, which results in the improvement of
CPB the operating speed.
Definition 3.1
Assume that for a given d ≤ n of arbitrary sets of indexes α1, α2, …, αh and β1, β2,
…, βh there exists at least one value of the controlling vector V such that input bits
xα1, xα2, …, xαh are transformed into output bits yβ1, yβ2, …, yβh, respectively. The
maximum possible value of d is called the order of the Pm/n CPB and is denoted
as h.
Definition 3.2
Blocks of controlled permutations Pm/n and P–1m/n are called mutually inverse, if
for all possible values of vector V modifications of bit permutations ∏V and ∏–1V
implemented by blocks Pm/n and P–1m/n , respectively, are mutually inverse.
The general scheme of constructing direct and inverse layered blocks of con-
trolled permutations is shown in Figure 3.2. The characteristic issue of such a
design is that the components of the controlling vector V = (V1, V2, …, Vs) are
126 Innovative Cryptography, Second Edition
distributed by active layers in different orders. In the case of a direct block, they are
distributed from top to bottom, starting from input to output, and in the case of an
inverse block, they are distributed from bottom to top (from output to input). At
the same time, the numbering of active cascades in both blocks goes similarly—
from input to output. Thus, according to the adopted agreement, the component
Vl controls the l-th active layer in the direct block, and (s – l + 1)-th active layer in
the inverse block. Layered P-box can be considered a matrix of elementary switch-
ing elements that are sequentially numbered from left to right and from top to bot-
tom in the direct P-box, and from left to right and from top to bottom in the
inverse P-box. The i-th bit of vector V controls i-th switching element of P2/1.
One active cascade can be considered a single-layered P-box Ln. Obviously,
P2/1 = P–12/1; therefore, the conversion carried out using an active cascade is an
involution. Thus, it is possible to obtain the result Ln = L–1n. The multilayered block
of controlled permutations Pm/n can be represented as a superposition:
The cryptosystem must be a block iterative 64-bit cipher ensuring high rate
of the data transformation combined with relatively low cost of the hardware
implementation.
The same algorithm must be used for encryption and decryption. The change
of the transformation mode must be ensured by quick change of the subkey use
schedule.
The cipher must ensure high performance with applications requiring frequent
change of the key. To achieve this, the key schedule must be easy enough. The
key schedule must not require any precomputations for building an extended
key (set of round subkeys).
The procedure of round encryption must be characterized by relatively high
parallelism of computations to ensure fast encryption speed.
Only variable permutations must be used as the main cryptographic primitive.
In addition to bit permutations and extension nodes implemented as simple
branching of wires, only one auxiliary operation can be used—modulo-2 bit by
bit summation (XOR).
As the prototype of the round transformation, the DDP-64 cipher uses the
round transformation procedure of the SPECTR-H64 cryptosystem, which is well
suited for implementation of the adopted design criteria. Nonlinear variable per-
mutations are carried out by the operating block F, the synthesis of which is based
on the use of “truncated” variable bit permutations carried out over the left data
subgroup. Another example of the use of variable bit permutations is represented
by permutations carried out using second-order controlled permutations blocks
P32/96(V) and P–132/96(V′) shown in Figure 3.3. The P32/96(V) and P–132/96(V′) blocks are
built on the basis of the P8/12 and P–18/12 blocks of controlled permutations shown
in Figure 3.3 (a, b). The cascade of P8/12 blocks is connected to the cascade of P–18/12
block using switching that specifies the following bit permutations representing an
involution:
(1)(2,9)(3,17)(4,25)(5)(6,13)(7,21)(8,29)(10)(11,18)(12,26)
(14)(15,22)(16,30)(19)(20,27)(23)(24,31)(28)(32).
Substitution—Permutation Networks with Minimal Controlled Element 129
FIGURE 3.3 The structure of controlled permutations blocks P8/12 (a), P–18/12 (b),
P32/96 (c), and P–18/12 (d).
Thanks to the symmetric structure of the P32/96 and P–132/96 blocks, they differ
only by the distribution of the controlling bits of vector V. Because these blocks use
the 96-bit controlling vector, and the left subgroup of the controlling data is 32 bits
in length, it is necessary to use the extension block E, for the synthesis of which the
following criteria were used:
For all values of the controlling vector, the permutation of each input bit of the
CPB must be defined by six different bits of L.
Exactly three bits of the controlling vector must depend on each bit of the con-
trolling data subgroup.
Assume that a 96-bit vector V = (V1, V2, V3, V4, V5, V6) is the output of the
block E, and a 32-bit vector X = (Xl, Xh), where Xl, Xh ∈ GF(2)16 is its input. The
DDP-64 cipher uses the extension block E'' that satisfies the previously provided
criteria. It is described by the following relationships:
130 Innovative Cryptography, Second Edition
Obviously, because the provided criteria have been met, each bit of the left data
subgroup L controls exactly six bits of the right data subgroup R (independently on
the value of the vector supplied to the input of the CPB) in each of the P32/96 and
P–132/96 blocks. It is also obvious that an arbitrarily specified input bit of the blocks in
each of the P32/96 and P–132/96 blocks moves to each of the output positions with equal
probability, provided that L is a uniformly distributed random value.
Operating blocks F represent a specific variant of specifying variable permuta-
tions. The design of each of the two F blocks used ensures the randomnicity of the
change of the output value parity. It should be mentioned that the P32/96(V) and
P–132/96(V′) CPBs are not characterized by such a property. To form an 80-bit con-
trolling vector of the F blocks, the extension block E′ is used, which is specified as
follows. Let the 80-bit vector W = (W1, W2, W3, W4, W5) be the output of the block
E, and the 32-bit vector X = (Xl, Xh), where Xl, Xh ∈ GF(2)16 be its output. Then, 16-
bit components W1, W2, W3, W4, W5 are defined by the following relations:
where M is the plaintext, C is the ciphertext (M, C ∈ GF(2)64), and K is the secret
key (K ∈ GF(2)128). The DDP-64 cipher uses a 128-bit secret key considered as a set
Substitution—Permutation Networks with Minimal Controlled Element 131
FIGURE 3.4 The general scheme of the DDP-64 cipher (a) and the procedure of
its round transformation Crypt(e) (b).
of four 32-bit subkeys Ki, i = 1, 2, 3, 4: K = (K1, K2, K3, K4). Each round key Qj is
made up of four independent round subkeys Gj , Sj , Tj , Uj ∈ GF(2)32, which means
that Qj = (Gj , Sj , Tj , Uj). Table 3.1 describes the key schedule using subkeys O1, O2,
O3, and O4, which are outputs of the subkeys permutation block shown in Figure
3.5a. The subkeys permutations block is made up of two P(e)2×32/1 CPBs. The first
P(e)2×32/1 is supplied with the pair of subkeys K1 and K3, and the second block accepts
the pair of subkeys K2 and K4. The output subkeys Oi depend on the value e. When
e = 0, Oi = Ki for i = 1, 2, 3, 4. If e = 0, then O1 = K3, O3 = K1, O2 = K4, and O4 = K2.
132 Innovative Cryptography, Second Edition
TABLE 3.1 Key Schedule and Specification of the Value of Bit E′ in the Encryption
(E = 0) and Decryption (E = 1) Modes
j= 1 2 3 4 5 6 7 8 9 10
Gj = O3 O2 O1 O4 O3 O3 O4 O1 O2 O3
Sj = O2 O1 O4 O3 O4 O4 O3 O4 O1 O2
Tj = O4 O3 O2 O1 O2 O2 O1 O2 O3 O4
Uj = O1 O4 O3 O2 O1 O1 O2 O3 O4 O1
e‘ (e = 0) 1 0 1 1 0 1 1 1 0 1
e‘ (e = 1) 0 1 0 0 0 1 0 0 1 0
FIGURE 3.5 Transposition of subkeys (a) and the structure of the switched
permutation (b).
The encryption procedure is carried out as follows. The input data block X is
divided into two 32-bit subgroups L and R. Then, the data encryption is carried out
according to the following algorithm:
Switched permutations Π(e′) is implemented using the P(e′)2×32/1 CPB and two
fixed mutually inverse permutations Π and Π–1, as shown in Figure 3.5b. From the
scheme provided in this illustration, it is clear that the following relationships take
place: Π(0)= Π and Π(1)= Π–1. The permutation Π being used is described as follows:
(1,4,7,2,5,8,3,6)(9,12,15,10,13,16,11,14)
(17,20,23,18,21,24,19,22)(25,28,31,26,29,32,27,30).
where Q11 − j = (Uj , Tj , Sj , Gj ), and the value was obtained using the Y = Crypt(0)(X, Q j)
transformation, where Qj = (Gj, Sj, Tj, Uj ). Table 3.1 specifies the values of bit e′ for
encryption (e = 0) and for decryption (e = 1).
The use of fixed permutations representing involutions is typical for the round
transformation of the DDP-64 cipher. The cyclic-shift operation <<< 16, carried
out over the left data subgroups is used for specifying the “symmetric” use of the
most significant (Lh) and the least significant (Ll) parts of the data subgroup L when
executing two variable bit permutations carried out using operational blocks F.
Permutation involution I2, carried out over the right data subgroup is used for
specifying the influence of each input bit of the block P32/96 on 31 output bits of
134 Innovative Cryptography, Second Edition
block P–132/96 in the case when V = V′. In this case, every i-th input bit doesn’t affect
only the i-th output bit. Note that if the I2 permutation is not used, then in the
aforementioned case, every input bit of P32/96 has the effect only to one output bit
of P–132/96. The I2 permutation has a simple structure and can be described by two
cyclic shifts by 8 bits:
Π′ = (1,33)(2,9)(3,17)(4,25)(5)(6,13)(7,21)(8,34,29,40)
(10,35)(11,18)(12,26)(14)(15,36,22,38)
(16,30)(19,37)(20,27)(23)(24,31)(28,39)(32).
second vector is used as part of the controlling vector when carrying out the P–132/48
operation. The output value of block P–132/48 is simultaneously the output of block
F.
The controlling vector W = (W1, W2, W3, W4, W5) of the block F, where W1, W2,
W3, W4, W5 ∈ GF(2)16, is used as follows. Binary vectors W1, W2, and W3 control the
first, second, and third active layers of block P32/48, respectively, and vectors W4 and
W3 control the first and second active layers of block P–132/48, respectively. Vector
W6, controlling the third layer of block P–132/48, is formed using an 8-bit vector H5
according to the expression W6 = (H5, H5).
As can be easily seen, having a fixed key, the left data subgroup defines the value
of vector (D1, D2, D3, D4); and two bits with arbitrary numbers from each of vectors
D1, D2, D3, D4 are moved to vector H5, being replaced by one 1 and one 0 bit of the
constant C. Each of the bits of vector (Z1, Z2, Z3, Z4) with the probability of 1/4 can
be replaced. The probability of the bit’s being replaced by zero bits is equal to 1/8,
and the probability of the bit’s being replaced by 1 bit is the same. As a result of such
a replacement, the permutation carried out by block F arbitrarily changes the par-
ity of the weight of its output value.
136 Innovative Cryptography, Second Edition
FIGURE 3.7 Controlled element (a) and its representation in the form of a pair
of boolean functions (b).
FIGURE 3.8 Schematic representation of the P2/1 block in the form of two
elementary bijective transformations carried out over a 2-bit vector (x1, x2)
provided that v = 0 (a) and v = 1 (b).
Nonlinear boolean functions of three variables have the same value of nonlin-
earity in the sense of the minimal distance to the set of affine boolean functions of
three variables. With the account of the aforementioned, it is possible to suggest the
following basic criteria for choosing CEs:
C1: Boolean functions y1 = f1(x1, x2, v) and y2 = f2(x1, x2, v) must have the max-
imum nonlinearity.
C2: Modifications of elementary transformations formed by F(v)2/1 controlled
elements—namely, F(0)2/1 and F(1)2/1—must be different and represent an ele-
mentary bijective transformation of the form (x1, x2) Æ (y1, y2).
C3: Each of the two modifications of the F(v)2/1 controlled element must be an
involution.
Although among 2×2 permutations there are only linear permutations, non-
linearity of each of the CE outputs is implemented because of the dependency of the
elementary modification on the controlling bit. Two variants of searching for CEs
might be used. The first method consists of exhaustive search of all possible pairs of
boolean functions y1 = f1(x1, x2, v) and y2 = f2(x1, x2, v), while the second consists of
exhaustive search of all possible pairs of F(0)2/1 and F(1)2/1 modifications, which can
be specified as substitution tables or schematically.
The latter representation is more illustrative and simple, because the search is
limited to trying 90 pairs of modifications out of 10 existing elementary involu-
tions, shown in Figure 3.9.
138 Innovative Cryptography, Second Edition
FIGURE 3.9 Schematic representation of all existing (x1, x2) → (y1, y2) transformations
representing involutions.
There are 256 possible different boolean functions (BFs) of three variables. To
limit the exhaustive search range, it is necessary to exploit the fact that from Crite-
rion 2 (C2), which requires the bijectivity of each of modifications of F(0)2/1 and
F(1)2/1, it follows that boolean functions must be balanced. This considerably limits
the possible variants for exhaustive search from the very beginning. Thus, when try-
ing the pairs of different boolean functions it is necessary to initially select the com-
plete set of balanced boolean functions, the number of which is 70, and then choose
all nonlinear ones, which limits the number of boolean functions that are of any
interest down to 56. After that, it only remains to carry out an exhaustive search
among 56×55 variants of pairs of nonlinear balanced boolean functions of three
variables. This number of variants, equal to 3080, is considerably greater than the
number of variants for exhaustive search by pairs of elementary involutions. When
using the first approach, the CE representation will be obtained in algebraic form,
while the second approach produces an illustrative schematic form. However, as
the result, the same CEs will be chosen, satisfying criteria C1–C3.
After choosing the required controlled elements using the second approach, the
algebraic representation can be easily derived using the following approach. For any
of the two possible modifications of the chosen CE, it is possible to write boolean
functions of two variables describing the outputs y1 and y2. For example, assume that
modification of F(0)2/1 is described by a pair of boolean functions y1 = f′1(x1, x2) and
y2 = f′2(x1, x2), and modification of F(1)2/1 is described by the pair y1 = f′′1(x1, x2) and
y2 = f′′2(x1, x2). Then, the pair of boolean functions of three variables describing CE
can easily be written in the form of the following two formulae:
Using the second approach, the complete set of CEs satisfying the C1–C3 crite-
ria was found. This set of criteria is represented in Table 3.2, the rows and columns
of which are labeled with lowercase Latin characters denoting 10 elementary invo-
lutions shown in Figure 3.9. The “+” or “⊕” sign at the intersection of rows and
columns specifies that modifications corresponding to the given row and column
make a pair that satisfies criteria C1–C3. The row identifies modification F(1)2/1, and
the column corresponds to modification F(0)2/1. From the provided set of CEs, two
variants denoted by the “⊕” sign correspond to switching elements. In particular,
the pair e/a corresponds to the elementary block P2/1, which initially was chosen as
a prototype. Let CE described as the pair a/e be denoted by P′2/1. These two switched
elements are related by the equations P(0)2/1 = P′(1)2/1 and P(1)2/1 = P′(0)2/1.
F(1)\F(0) a b c d e f g h i j
a ⊕ +
b + +
c + +
d + +
e ⊕ + + + + + + +
f + + + + + + + +
g + + + +
h + + + +
i + + + +
j + + + +
Thus, 40 variants of different CEs have been obtained, which can be used for
synthesis of data-dependent operations. Differential characteristics of crypto-
graphic primitives are among the most important.
Because differential characteristics of controlled operations depend on the size of
the input and the topology, describing such characteristics for practically important
variants of controlled operations built using each of the discovered CEs is an unreal-
istic job. However, this task can be solved for each individual CE. This is an interest-
ing task, because differential characteristics of the first standard design element define
differential characteristics for the given topology of the operational block. Figure 3.10
shows the variants of all possible differences related to a controlled element.
140 Innovative Cryptography, Second Edition
x1v and x2v, because their sum is a linear Boolean function and, consequently, such
CEs are linear cryptographic primitives. For CEs related to subset {S2/1}, boolean
functions y1 = f1(x1, x2, v) and y2 = f2(x1, x2, v) contain only one quadratic term;
therefore, quadratic terms in these functions are different. Because of this, the sum
y1 ⊕ y2 represents a nonlinear boolean function, and CEs as such are nonlinear
primitives. For CEs related to subset {R2/1}, one of the y1 = f1(x1, x2, v) and y2 = f2(x1,
x2, v) boolean functions contains only one quadratic term, while another function
contains two such terms, one of which matches the quadratic term of the first
Boolean function. The sum y1 ⊕ y2 is a nonlinear boolean function with one qua-
dratic term; that is, CEs of the R2/1 type are nonlinear cryptographic primitives.
Thus, CEs belonging to subsets {S2/1} and {R2/1} satisfy another important criterion:
C4: The sum of boolean functions of a CE, y1 = f1(x1, x2, v) and y2 = f2(x1, x2, v)
must represent a nonlinear boolean function with maximum possible nonlin-
earity.
142 Innovative Cryptography, Second Edition
In all cases, quadratic terms are products of the controlling bit v and one of the
input bits. This circumstance definitely shows that using only the key for forming
the controlling vector in CPBs or other operational blocks built based on S2/1 and
R2/1 CEs will result in the controlled operation carrying out linear transformation.
Only by specifying the control on the part of the data being transformed ensures
nonlinear mode for controlled operations built on the basis of substitution-
permutation networks with CEs of minimal size. In addition, it is obvious that S2/1
and R2/1 elements are preferred in comparison to Z2/1 CEs, including P2/1 elements,
both by the nonlinearity properties and by differential characteristics. This allows
for drawing a conclusion that elements of the S2/1 and R2/1 types can be used for
building promising controlled operational blocks for development of fast hard-
Substitution—Permutation Networks with Minimal Controlled Element 143
TABLE 3.4 The Complete Set of CEs that Are Controlled Nonlinear Involution
ANF TT ANF TT
→
144 Innovative Cryptography, Second Edition
ANF TT ANF TT
In the aforementioned technology, P2/1 CEs are implemented using the area of
3 sqmil and operate at frequencies up to 2.12 GHz. The comparison demonstrates
that among nonlinear CEs are elements that are close to P2/1 switching elements by
their operating speed, but at the same time more economical by their implemen-
tation. This allows us to conclude that with the account of the comparison of
nonlinearity properties and differential characteristics, it can be expected that char-
acteristics of hardware ciphers based on variable operations and built on the basis
of nonlinear CEs will considerably exceed the implementation characteristics of the
DDP-64, CIKS-1, and SPECTR-H64 ciphers.
In the previous section, the complete class of CEs that represent elementary con-
trolled involutions was built. However, there arises the problem of enumerating all
CEs of minimal size that can be used for building controlled operations similar to
CPBs by their cryptographic properties. That CEs are involutions is a useful prop-
erty that simplifies building of controlled operational blocks. However, the most
important topologies of CPBs can also be implemented using mutually inverse CEs.
For example, it is possible to use P32/96 blocks as the prototype. Therefore, the
Substitution—Permutation Networks with Minimal Controlled Element 145
promising strategy consists in searching for all possible variants of CEs that meet
the requirements of the C1 and C2 criteria, and then separating from this class a
subset of CEs that would satisfy the additional nonlinearity criterion (C4). Solving
this problem allows us to get the full pattern of all possible variants and provides the
possibility of choosing the most suitable elements for solving the problem of syn-
thesizing controlled operations.
The analysis of all possible combinations of two nonlinear balanced boolean
functions presented in Table 3.5 allowed for discovering 288 variants of CEs satis-
fying C1 and C2 criteria, and 192 variants of CEs meeting the requirements of the
C1, C2, and C3 criteria (Table 3.6).
TABLE 3.5 Main Characteristics of the Hardware Implementation of the S2/1 and R2/1
TABLE 3.6 Complete Class of Nonlinear CEs (the {S2/1, R2/1} subset)
TT TT TT TT
10 16 10 16 10 16 10 16
73 00100111 4B 145 10000111 87 217 11000110 C6
00100111 27 00011011 1B 00011110 1E
2 00011011 1B 218 11000110 C6
00101101 2D 00100111 27
3 00011011 1B 75 01001011 4B 147 10000111 87
00110110 36 00111001 39 00110110 36
4 00011011 1B 76 01001011 4B 220 11000110 C6
01100011 63 01101100 6C 01001011 4B
77 01001011 4B 149 10000111 87
01110010 72 01001110 4E
6 00011011 1B 150 10000111 87 222 11000110 C6
01111000 78 01100011 63 01110010 72
7 00011011 1B 151 10000111 87 223 11000110 C6
10000111 87 10011100 9C 10001101 8D
80 01001011 4B 152 10000111 87
10001101 8D 10110001 B1
9 00011011 1B 81 01001011 4B 225 11000110 C6
10011100 9C 10010011 93 10110100 B4
10 00011011 1B 82 01001011 4B 154 10000111 87
11001001 C9 11000110 C6 11001001 C9
11 00011011 1B 227 11000110 C6
11010010 D2 11011000 D8
84 01001011 4B 156 10000111 87 228 11000110 C6
11011000 D8 11100100 E4 11100001 E1
13 00011110 1E 229 11001001 C9
00100111 27 00011011 1B
86 01001110 4E 158 10001101 8D 230 11001001 C9
00101101 2D 00011110 1E 00101101 2D
15 00011110 1E 87 01001110 4E 159 10001101 8D
00111001 39 00110110 36 00111001 39
16 00011110 1E 88 01001110 4E 160 10001101 8D 232 11001001 C9
01101100 6C 01100011 63 01001011 4B 01001110 4E
17 00011110 1E
01110010 72
90 01001110 4E 162 10001101 8D 234 11001001 C9
01111000 78 01101100 6C 01111000 78
91 01001110 4E 163 10001101 8D 235 11001001 C9
10000111 87 10010011 93 10000111 87
20 00011110 1E
10001101 8D
21 00011110 1E 93 01001110 4E 165 10001101 8D 237 11001001 C9
10010011 93 10011100 9C 10110100 B4 10110001 B1
22 00011110 1E 94 01001110 4E 166 10001101 8D
11000110 C6 11001001 C9 11000110 C6
95 01001110 4E 167 10001101 8D 239 11001001 C9
11010010 D2 11100001 E1 11010010 D2
24 00011110 1E 240 11001001 C9
11011000 D8 11100100 E4
97 01100011 63 169 10010011 93 241 11010010 D2
00011011 1B 00011110 1E 00011011 1B
26 00100111 27 98 01100011 63 170 10010011 93
00011110 1E 00101101 2D 00100111 27
27 00100111 27 243 11010010 D2
00111001 39 00110110 36
28 00100111 27 100 01100011 63 172 10010011 93
01001011 4B 01001110 4E 01001011 4B
245 11010010 D2
01001110 4E
30 00100111 27 102 01100011 63 174 10010011 93 246 11010010 D2
01101100 6C 01111000 78 01110010 72 01100011 63
TT TT TT TT
10 16 10 16 10 16 10 16
37 00101101 2D 109 01101100 6C 181 10011100 9C
00011011 1B 00011110 1E 00011011 1B
110 01101100 6C 182 10011100 9C 254 11011000 D8
00100111 27 00101101 2D 00011110 1E
39 00101101 2D 255 11011000 D8
00110110 36 00111001 39
112 01101100 6C 184 10011100 9C 256 11011000 D8
01001011 4B 01001110 4E 01001011 4B
41 00101101 2D
01001110 4E
42 00101101 2D 114 01101100 6C 186 10011100 9C 258 11011000 D8
01100011 63 01110010 72 01111000 78 01101100 6C
43 00101101 2D 115 01101100 6C 187 10011100 9C 259 11011000 D8
10011100 9C 10001101 8D 10000111 87 10010011 93
44 00101101 2D
10110001 B1
117 01101100 6C 189 10011100 9C 261 11011000 D8
10110100 B4 10110001 B1 10110100 B4
46 00101101 2D 262 11011000 D8
11001001 C9 11000110 C6
119 01101100 6C 191 10011100 9C 263 11011000 D8
11011000 D8 11010010 D2 11100001 E1
48 00101101 2D 120 01101100 6C 192 10011100 9C
11100100 E4 11100001 E1 11100100 E4
49 00110110 36 265 11100001 E1
00011011 1B 00100111 27
50 00110110 36 122 01110010 72 194 10110001 B1
00101101 2D 00011110 1E 00101101 2D
123 01110010 72 195 10110001 B1 267 11100001 E1
00111001 39 00110110 36 00111001 39
52 00110110 36 124 01110010 72 196 10110001 B1 268 11100001 E1
01001110 4E 01001011 4B 01100011 63 01101100 6C
269 11100001 E1
01110010 72
54 00110110 36 126 01110010 72 198 10110001 B1
01111000 78 01101100 6C 01111000 78
55 00110110 36 127 01110010 72 199 10110001 B1
10000111 87 10010011 93 10000111 87
272 11100001 E1
10001101 8D
57 00110110 36 129 01110010 72 201 10110001 B1 273 11100001 E1
10110001 B1 10110100 B4 10011100 9C 10010011 93
130 01110010 72 202 10110001 B1 274 11100001 E1
11000110 C6 11001001 C9 11000110 C6
59 00110110 36 131 01110010 72 203 10110001 B1
11010010 D2 11100001 E1 11010010 D2
60 00110110 36 276 11100001 E1
11100100 E4 11011000 D8
61 00111001 39 133 01111000 78 205 10110100 B4
00011110 1E 00011011 1B 00100111 27
62 00111001 39 278 11100100 E4
00100111 27 00101101 2D
135 01111000 78 207 10110100 B4 279 11100100 E4
00110110 36 00111001 39 00110110 36
64 00111001 39 208 10110100 B4 280 11100100 E4
01001011 4B 01101100 6C 01100011 63
137 01111000 78 209 10110100 B4
01001110 4E 01110010 72
66 00111001 39 138 01111000 78 282 11100100 E4
01110010 72 01100011 63 01111000 78
67 00111001 39 139 01111000 78 283 11100100 E4
10001101 8D 10011100 9C 10000111 87
140 01111000 78 212 10110100 B4
10110001 B1 10001101 8D
69 00111001 39 213 10110100 B4 285 11100100 E4
10110100 B4 10010011 93 10011100 9C
142 01111000 78 214 10110100 B4 286 11100100 E4
11001001 C9 11000110 C6 11001001 C9
71 00111001 39 287 11100100 E4
11011000 D8 11010010 D2
72 00111001 39 144 01111000 78 216 10110100 B4
11100001 E1 11100100 E4 11011000 D8
148 Innovative Cryptography, Second Edition
CE examples l/h, l/i, l/m, l/n, g/o, h/p, o/l, o/m, p/k, q/i, q/m, r/i, r/m, f/u, f/w, j/v, j/x, n/
and type m/g, m/j, m/k, u/ m/p, a/r, b/t, a/x, d/w, t/h, t/n, k/v, k/x, q, n/r, u/k, v/l, x/l
i j k
q, v/s, w/t (S 2/1) t/c, u/b, w/d, p/n h/t (Z* 2/1) (Z **2/1)
(R 2/1)
1 0 1 1/2 1/2 1 0
1 2 0 1 1/2 1 1
2 2 0 0 1/2 0 0
1 2 1 1/2 1/2 0 1
Subsets of CEs related to the fifths and sixths columns presented in Table 3.7
are related to subsets {Z*2/1} and {Z**2/1}, respectively. Now it is natural to extend the
{Z2/1} subclass as follows: {Z2/1} = {Z′2/1, Z′′2/1, Z*2/1, Z**2/1}. This extension is natural,
because for all CEs from {Z2/1}, the sum of outputs represents a linear boolean
function. Characteristic circuit representations of CEs related to subsets {Z*2/1} and
{Z**2/1} are shown in Figures 3.17 and 3.18.
150 Innovative Cryptography, Second Edition
FIGURE 3.16 Typical CEs of the R2/1 type represented by pairs of elementary
modifications o/m (a), v/d (b), and c/x (c).
FIGURE 3.17 Typical CEs of the Z*2/1 type represented by pairs of elementary
modifications q/i (a), r/m (b), and g/v (c).
The first two assumptions are important for the design, because they demon-
strate that mutually inverse CEs of the S2/1 and R2/1 relate to the same subclass. Be-
cause of this, when building easily invertible operating blocks, if necessary, it is
possible to use pairs S2/1 and S–12/1 (R2/1 and R–12/1) without detriment to nonlin-
earity of the operating block being designed.
Controlled substitutions based on F2/1 elements represent one of the most efficient
cryptographic algorithms, because they can be easily implemented in custom and
programmable integrated circuits. Therefore, the issues of building controlled sub-
stitution-permutation networks based on such elements are of special importance.
This section concentrates on the principles of building controlled operational sub-
stitutions, and provides evaluations of their probabilistic characteristics. Also cov-
ered are the issues of hardware implementation complexity of such elements.
The use of such elements results in the increase of the number of possible vari-
ants of building blocks of controlled operating dependent on the value of the con-
trolling vector and including blocks of controlled substitutions as a particular case,
because the aggregate of boolean functions that carry out controlled permutation
of two bits is a variant of an elementary controlled substitution F2/1.
By combining the basic substitution blocks F2/1, it is possible to synthesize Fn/m
blocks, where n is the number of input (output) bits, and m is the number of con-
trolling bits. Such blocks specify the mapping of the type GF(2)n+m→GF(2)n. The
use of a layered building scheme, each layer of which is made up of 2n F2/1 elements
Substitution—Permutation Networks with Minimal Controlled Element 153
connected in parallel appears the most promising. Between the layers are fixed per-
mutations {P1, P2, …, Pk–1}, as shown in Figure 3.20. In this case, the Fn/m COSB can
be represented as a superposition of k substitution layers and k–1 fixed permuta-
tions, namely:
Basic element F2/1 has been used for synthesis of COSBs carrying out the map-
pings GF(2)112→GF(2)32, GF(2)256→GF(2)64, GF(2)576→GF(2)128. The layered
kn
structure of COSB with n = 2k-bit output of data has the controlled vector m = 2
bits long, where k is the number of base substitutions.
154 Innovative Cryptography, Second Edition
where pi is the probability of the occurrence of the event Ω in the i-th trial, and
qi=1–pi is the probability of nonoccurrence of the even Ω in the i-th trial. Expres-
sion above is equivalent to the following equality:
n n
∏ (qi + pi z ) = ∑ Pm,n z m ,
i =1 m= 0
where left and right parts represent the same generating function ϕn(z). The left
part represents this function as a mononomial, and the right part as a polynomial.
If you open the brackets in the left part and then collect the terms, you’ll get all
probabilities P0,n, P1,n, …, Pn,n in the form of coefficients at the power of 0,
1, … of the formal variable z.
For the S2/1 block, obtaining the generating function of the probability of the
occurrence of the difference with weights wt(Δy)=2 and wt(Δy)=1 at the output
provided that the difference wt(Δx)=1 is supplied to the input is a trivial task. If
these blocks correspond to blocks of the S type (see, for example, Table 3.4), then,
with the account of differential characteristics provided in Table 3.4, the generating
function will appear as follows:
ϕ 2 2/1 (z) = 1 z + 1 z 2.
S
2 2
This means that the probabilities of the occurrence of the differences with
weights wt(Δy) = 1 and 2 are equal to P1, 2 = P2, 2 = 0.5. With the account of the cas-
cading structure of a large COS, it is possible to obtain the generating probability
functions ϕnsn/m(z) by means of iteratively substituting the expressions for generat-
Substitution—Permutation Networks with Minimal Controlled Element 155
ing functions from the previous layer of COS into expressions of the generating func-
S 1
tion of the next layer. Thus, for n=4 ϕ 4 4/ 4 (z) = 2 ϕS4 4/4 ( z ) = 0.2 z + 0.4 z 2 + 0.2 z 3 + 0.2 z 4
and, having substituted previous expression into it, after collecting the terms, you’ll
get the expression for the generating function in the following form:
S
ϕ 4 4/ 4 (z)= 0.2z+0.4z2+0.2z3+0.2z4,
wt p
1 0.25
2 0.375
3 0.25
4 0.125
wt p wt p
1 0.125 5 0.125
2 0.219 6 0.078
3 0.219 7 0.038
4 0.195 8 0.008
Substitution—Permutation Networks with Minimal Controlled Element 157
wt p wt p wt p wt p
wt p wt p wt p wt p
wt p wt p wt p wt p
that is, the probability of the occurrence of the differences with weight wt(Δy) = 1
P1, 2 = 0.75, and wt(Δy) = 2 P2, 2 = 0.25. Using an iterative procedure, on the basis of
the expression above, it is possible to obtain several distributions of the probabili-
ties of occurrence of differences with different weights at the output of R blocks of
different dimensions provided that the difference with weight wt(Δx)=1 was sup-
plied to the block input (Tables 3.13 through 3.17).
Substitution—Permutation Networks with Minimal Controlled Element 159
wt p
1 0.56
2 0.33
3 0.094
4 0.016
wt p wt p
1 0.42 5 0.02
wt p wt p wt p wt p
wt p wt p wt p wt p
the input. Analysis of the obtained histograms allows us to conclude that S-type
COSs are preferred when designing block cryptographic algorithms, because they
have better difference properties.
wt p wt p wt p wt p
number of gates implementing the Fn/m circuit. Here, Ω = {&, v, –} is the complete
basis of simplest logical operations in use. One-bit boolean functions in the ele-
mentary F2/1 block in this basis have the complexity CΩ(F2/1) = 9. When evaluating
the speed parameters of a block of controlled operational substitutions, consider
the time required to execute the slowest operation called the delay clock τΩ. In the
preceding complete basis τΩ = τ&, for existing blocks of controlled operational per-
mutations, the time required to carry out the transformation is t(Fn/m) = kτ&, and
implementation complexity appears as CΩ(Fn/m) = mCΩ(F2/1) = 6m. Based on con-
temporary electronics technologies, this allows us to produce cryptochips imple-
menting block cryptoalgorithms, including blocks of controlled operational
substitutions with the large input size (n = 32, 64, 128, 256). Thanks to this, it is
possible to reach the encryption speed considerably exceeding 1 Gbps.
Despite initial orientation toward hardware implementation, efficient use of
controlled operations can result in considerable advances in the operating per-
formance of software-oriented ciphers. This is because some types of controlled
operations, such as controlled permutations, are highly efficient as cryptographic
primitives and are at the same time characterized by exceedingly low cost of circuit
implementation. Such a relationship between cost and efficiency makes the idea of
including new commands in the standard set of the processor command exceed-
ingly attractive for the manufacturers of commercial processors. The possibility of
ensuring the speed of software encryption up to 800–2000 Mbps considerably
increases the competitive capability of such processors while minimizing imple-
mentation costs. Implementation of a command of controlled bit permutation,
the practical application of which considerably exceeds the range of purely crypto-
graphic applications (data encryption and hashing algorithms), appears to be the
most promising. Variants of implementation of such a command will be consid-
ered in Chapter 4, “Switched Controlled Operations.”
FIGURE 3.24 Controlled element F2/2 (a) and its implementation using two boolean
functions (b).
Practical expediency of migration to the use of CEs with 2-bit controlling input
is related to their hardware implementation on the basis of programmable logical
matrices, where standard logical blocks usually have two logical cells representing
16-bit memory cells. Each of such memory cells allows for implementing an arbi-
trary boolean function of four variables. When implementing any CE of the F2/1
type, two cells are used, each of which implements specific boolean functions of
three variables. This means that only half of the resource of the memory cell is used
(in other words, only 50 percent of the cell size), because for implementing a
boolean function of three variables, 8-bit memory is enough. Apparently, it is im-
possible to efficiently use the remaining part of the memory.
Migration to CEs of the F2/2 type ensures the complete use of the cell’s poten-
tial. In addition, using extended controlling input creates the prerequisites for spec-
ifying stronger influence of the controlling data subgroup on the data being
transformed. In particular, this allows for increasing the nonlinearity of each of the
CE outputs, and increase of its algebraic degree of nonlinearity and intensification
of the avalanche effect in case of modification of single bits of the controlling data
subgroup. It is reasonable to assume that an appropriate choice of the F2/2-type CE
will allow for considerable increase of the cryptographic characteristics of the op-
erational block being synthesized. This will provide the possibility of reducing the
number of the transformation rounds while preserving high cryptographic strength
of the algorithms based on controlled operations. This, in turn, ensures the possi-
bility of reducing the complexity of the hardware implementation (in case of
pipelined architectures) and an increase in the encryption speed (in case of iterative
implementation architecture).
164 Innovative Cryptography, Second Edition
Any of the two outputs of an F2/2 block must represent a nonlinear Boolean
function of four variables: y1 = f1(x1, x2, v1, v2) and y2 = f2(x1, x2, v1, v2), each of
which must satisfy the degree of nonlinearity close to maximum.
Each of four elementary modifications of the F2/2 block—namely, F(0), F(1), F(2),
F(3)—must carry out a bijective transformation (x1, x2) → (y1, y2).
Each of the four modifications F(v) of the controlled element must represent an
involution.
It is possible to use two variants of searching for efficient F2/2 controlled ele-
ments satisfying the preceding criteria:
Exhaustive search of all possible pairs of boolean functions y1 = f1(x1, x2, v1, v2)
and y2 = f2(x1, x2, v1, v2).
Exhaustive search of all possible sets of modifications F(0), F(1), F(2), F(3), carry-
ing out the 2×2 transformation.
For the first variant, the number of computations required for choosing
elementary controlled elements of the F2/2 type satisfying the formulated criteria
is large enough. Obviously, there exist 216 various boolean functions of four vari-
ables. Consequently, in the general case it is necessary to try 216⋅(216–1) ≈ 4,3⋅109
Substitution—Permutation Networks with Minimal Controlled Element 165
n = 4 #{f(x1, ..., x4)}Bal = 12,870, determining this value for balanced functions with
even even n, the number of Boolean function will be 10,920. Consequently, in this
case it will be necessary to try H 1,2⋅108 sets of boolean functions, which also re-
quires considerable computational overhead.
TABLE 3.18 The Set of Boolean Functions f(x1, x2, x3, x4) : GF(2)4 → GF(2)
Nonlinearity of a
Boolean function 6 5 4 3 2 1 0
NL ( f )
Number of Boolean
896 14,336 28,000 17,920 3,840 512 32
functions
Number of balanced
0 0 10,920 0 1,920 0 30
Boolean functions
It is possible to slightly reduce the amount of computations, if you take into ac-
count the requirement to the linear combination of boolean functions implement-
ing an F2/2 block to be balanced (this requirement also follows from the second
criterion). Obviously, distribution of the Hamming weights in a linear combination
of boolean functions will be determined by the following expression:
#{F2/m : wt ( f1 ⊕ f2 ) = l} = #{F2 / m : wt ( f1 ⊕ f2 ) = 2 h − l} =
2 2
⎛ 2 h−1 ⎞ ⎛ 2h ⎞ ⎛ 2
h −1 ⎞
# f{ } ⎜ ⎟
Bal ⎜ h −1 l ⎟
=⎜ ⎟ ⎜
h −1 ⎜ h −1 l ⎟
⎟ ,
2 − ⎝ 2 ⎠ 2 −
⎝ 2⎠ ⎝ 2⎠
F(0), if v = (0, 0)
F(1), if v = (0, 1)
F(2), if v = (1, 0)
F(3), if v = (1, 1)
For example, for the elementary F2/2 block presented in Figure 3.25, the ob-
tained result appears as follows:
Consequently,
169
170 Innovative Cryptography, Second Edition
FIGURE 4.1 Typical scheme of the propagation of the input bits influence in R2/1
(a) and S2/1 (b) controlled elements.
From the scheme illustrating the propagation of the influence on two outputs
in elementary blocks R2/1 and S2/1 (Figure 4.1), it is clear that in R2/1 blocks, the in-
fluence of each input can propagate in cross directions depending on the value of
the control bit. In S2/1 elements, the left (right) input influences only the left (right)
output. This shows that R2/1 elements have more in common with P2/1, than with
S2/1. In the case of R2/1, similar to similar to P2/1, the influence of the left and the
right inputs can propagate in cross directions depending on the value of the con-
trol bit, which allows for drawing a conclusion on the expediency of introducing
the concept of order for R2/1 elementary blocks.
The order for Rn/m controlled substitution-permutation networks has the fol-
lowing meaning. Assume that an arbitrary mapping of k inputs xα1, xα2, …, xαk and
k outputs yα1, yα2, …, yαk is specified as follows:
(here the “↔” sign stands for switching (mapping) of the pair of inputs and out-
puts). Assume that there exists such a value of control vector, that for each i = 1, 2,
…, k, inversion of xαi results in inversion of yβi provided that all inputs except for
xαi.are fixed. At the same time, inversion of outer outputs, including outputs from
the set yα1, yα2, …, yαk, might or might not be inverted. The maximum value of k,
for which this condition has been satisfied, can be adopted as the value of order h.
Having adopted such interpretation of the order of a controlled substitution-
permutation network of the R type, then replacement of all P2/1 controlled elements
172 Innovative Cryptography, Second Edition
in a certain Pn/m block of order h by R2/1 elements results in forming an Rn/m con-
trolled substitution-permutation network of order h. In case of the aforementioned
replacement, it can be stated that a controlled permutations block and a controlled
substitution-permutation network of the R type have the same topology. The anal-
ogy between controlled substitution-permutation networks of the Sn/m type and
controlled permutations block is less obvious; however, to unify the approach to
different types of substitution-permutation networks, the following definition of
the order of Fn/m-type controlled substitution-permutation network will be adopted:
Definition 4.1
Assume that Fn/m controlled substitution-permutation network has been specified.
The Fn/m block has the order h, if it has the same topology as a certain controlled
permutations block of order h.
In the course of the propagation of the influence of inputs on the outputs, the
important property is the existence of the value V ensuring the influence of a given
input to the specified number of arbitrarily chosen outputs. The larger the number
of such output, the more pronounced the avalanche effect.
In most cryptoschemes based on controlled operations, mutually inverse oper-
ational blocks are used. Similarly to the case of building controlled permutations
block, for every controlled substitution-permutation network of the Fn/m type, it is
easy to synthesize the corresponding inverse block F–1n/m. In contrast to building in-
verse controlled permutations blocks, where only inverse fixed permutations were
required, building F–1n/m blocks in general case requires the use of inverse active lay-
ers; that is, active layers made up of inverse controlled elements. The general
scheme of mutually inverse F-blocks is shown in Figure 4.2.
The most interesting subclasses of controlled elements—namely, {R2/1} and
{S2/1}—for each specific type of controlled element also include its inverse element.
This means that direct and inverse blocks will be equivalent in a certain sense. In case
of controlled substitution-permutation network built based on Z2/1 controlled ele-
ments, switching to inverse blocks is in general related to the change of differential
and nonlinear properties. At the same time, depending on the Z2/1 element, proper-
ties of Z–12/1 elements turn out to be different even with the limits of {Z′2/1}, {Z′′2/1},
{Z*2/1}, and {Z**2/1} subclasses. Further on, the main attention will be drawn to con-
trolled substitution-permutation networks based on nonlinear controlled elements.
All the aforementioned demonstrates that topological structures developed for
controlled permutations blocks can be used also for controlled substitution-per-
mutation networks of the Rn/m and Sn/m types. Because of this, building controlled
substitution-permutation networks of the first order based on the recursive scheme
shown in Figure 4.3a, and inverse first-order controlled substitution-permutation
networks based on the recursive scheme of the second type.
Switched Controlled Operations 173
When considering the given pair of recursive design schemes, it is easy to show
that the minimum number of layers required to implement a first-order controlled
substitution-permutation network Fn/m makes
s' = log2n.
174 Innovative Cryptography, Second Edition
FIGURE 4.4 Structure of the R2n/2m+2n (a) and R4n/4m+8n (b) controlled
substitution-permutation networks.
Switched Controlled Operations 175
The latter formula allows for determining the number of layers for arbitrary
values of n and h ≤ n/4. The case h = n/2 doesn’t present any practical interest,
because it requires the use of the same number of active layers as in the case
of the controlled substitution-permutation network of order h = n, for which
S = 2log2n – 1. This specific feature can be easily explained, because in case of order
h = n/2 in the previously considered method of formal procedure of building a
CSPN, it is necessary to use the original CSPN with a 2-bit input, which has the order
h = 2, because according to the controllability definition it must implement at least
two different permutations of the input bits, and there are only two of them. With
the use of such an initial block (for example, F2/1 controlled element) at each step of
the recursive procedure, the block of minimum order is implemented.
Figure 4.5 shows examples of controlled substitution-permutation networks
Fn/m of orders h = 1, 2, …, n/4, n for the case when n = 32. The initial block of the
recursive building procedure with the duplication of order is enclosed by the
dashed frame. The design schemes considered here are universal for the input size
equal to natural powers of two. However, in certain particular cases other variants
of CSPN topology are preferred, which are characterized by bilateral symmetry and
higher structuredness, which simplifies their circuit implementation. In addition,
for symmetric blocks the mechanism of forming control vectors satisfying several
predefined criteria is simplified. The use of symmetric structure results in the most
significant simplification in case of building a switched controlled substitution-
permutation network.
Definition 4.2
A controlled substitution-permutation network is called switched, if it can imple-
ment both direct controlled operation and its inverse operation depending on the
value of some additional control bit.
Several reasons for which the use of controlled operation is the most promising
for the synthesis of block ciphers will be covered later. Also covered will be different
variants of building them based on controlled elements of different standard sizes.
176 Innovative Cryptography, Second Edition
At the same time, the important role of symmetric CSPN topologies and several dif-
ferences of this concept for the cases of use of different mechanisms for specifying
the switching property (which also can be called the invertibility property) will be
traced. For example, when using the invertibility mechanism at the cost of inversion
of the control bits, operational blocks are built using controlled elements, most ele-
mentary modification of which is divided into pairs of mutually inverse modifica-
tion. Symmetric (or bilaterally symmetric) CSPNs are defined as follows.
Definition 4.3
A controlled substitution-permutation network is called symmetric, if for each
i = 1, 2, …, s – 1, the following relationships are true: Li = Ls–i+1 and
πi = (πs–i)–1.
Switched Controlled Operations 177
Definition 4.4
Controlled substitution-permutation network is symmetric, if in this network
for each i = 1, 2, …, s − 1, the following relationships are true: Li = L–1s–i+1 and
πi = (πs–i)–1.
Statement 4.1
One step of the recursive procedure of building controlled substitution-permutation
networks of the third type preserves the property of splitting modifications of the
original controlled substitution-permutation network into pairs of mutually inverse
modifications provided that the original CSPN is characterized by such a property.
178 Innovative Cryptography, Second Edition
Proof
Consider an F2n/2m+2n block built according to the recursive scheme of the third type
of using the Fn/m original block (Figure 4.6). The block built this way can be repre-
sented as a superposition of single-layer L1 CPSP, F2n/2m CSPN representing a
cascade of two Fn/m blocks and single-layer CSPN LS. The F2n/2m block will be desig-
(W ) (W )
nated as (F 1 n/m|F 2 n/m), where W1 and W2 are control vectors corresponding to
the left and right Fn/m blocks. Control vectors of blocks L1 and LS are designated as
V1 and VS, respectively. Let original blocks Fn/m have the splitting property under
consideration. Then, for arbitrary W1 and W2 there exist values W′1 and W′2, such
that the following condition is satisfied:
(W′1) (W′2) (W1) −1 (W2) −1 (W1) (W2) −1
(F n/m|F n/m) = ((F n/m) |(F n/m) ) = (F n/m|F n/m) .
Theorem 4.1
For orders h = 1, 2, …, n/4, n and n = 2k, where k is a positive integer number,
controlled substitution-permutation networks build according to the recursive
scheme of the third type using a typical F2/1 controlled element representing an
involution, implement the set of modifications of the controlled operation
Fn/m, which can be split into pairs of mutually inverse modifications.
Proof
In the case of h = n, the statement follows directly from the bilateral symmetry of
the controlled substation-permutation network of the maximum order. In case of
h = 1, the proof can be easily carried out using the topological conversion for the
case F2/1 = P2/1, described in “Cryptography: Fast Ciphers” by A. A. Moldovyan, N.
A. Moldovyan, N. D. Goots, and B. V. Izotov. Because in controlled substitution-
permutation networks of orders h = 2, …, n/4 a first-order controlled operational
substitution is used, for which the splitting property takes place, then, according to
Statement 4.1, this property takes place for h = 2. By sequentially applying State-
ment 4.1, it is easy to prove that the same property takes place also for h = 4, …, n/4.
The proven fact allows for building switched controlled substitution-permutation
networks of different orders. However, to obtain more illustrative structuredness of
such a design, it is necessary to use symmetric controlled substitution-permutation
networks in particular cases or other design mechanism in the general case.
180 Innovative Cryptography, Second Edition
i/j, h/f
e/g, e/h, f/i, f/j 384 448 512 576 640 704
i/j, h/f
From the data provided in Tables 4.1 and 4.2, it is obvious that all considered
controlled substitution-permutation networks require reasonable hardware re-
sources, and, therefore can be used for implementing ciphers of different types.
32-bit F32/96 CSPNs and 64-bit F64/192 CSPNs characterized by low-circuit imple-
mentation complexity appear the most promising for this purpose. Evaluations
Switched Controlled Operations 181
provided in Tables 4.1 and 4.2 demonstrate that ciphers based on controlled sub-
stitution-permutation networks can be implemented economically enough. The
complexity of their implementation is approximately equal to, and, in some cases
(for certain types of controlled elements) considerably lower than implementation
of ciphers based on data-dependent permutations.
This book provides detailed coverage of controlled elements of the F2/1 and F2/2
types. However, similar ciphers based on controlled substitution-permutation net-
works of other size can be built; for example, F3/2, F4/1, F3/3, and F4/2. In the latter
case, the 6×4 S-boxes are practically used. For this purpose, it is possible to use
S-boxes employed in the DES cipher. They are covered in detail in many publica-
tions on cryptography, and therefore won’t be considered here. It is only necessary
to point out that the criteria of choice of F4/2 controlled elements must not neces-
sarily match the criteria of choice for 6×4 substitutions discussed earlier when
substantiating their choice for cryptographic applications.
This is because F4/2 elements are assumed to be used in cryptosystems of other
type; namely, in cases when control data subgroup and data subgroup being trans-
formed remain independent in the course of executing a controlled operation built
on their basis. In case of the DES algorithm 6×4, substitutions are used differently:
a cascade of eight such substitutions actually implements a fixed substitution car-
ried out over a 32-bit data subgroup by means of executing controlled operations
over 4-bit data subgroups (the choice of one of the four substitutions of the 4×4
type depending on the values of two bits belonging to other subgroups). Because of
the sharp growth of the number of controlled elements satisfying the criteria of
applicability of synthesis of controlled substitution-permutation networks, when
migrating from F2/1 to F2/2 and F3/1 elements it is possible to assume that there will
be many F4/2 elements suitable for synthesis of controlled substitution-permutation
networks, and their number would considerably exceed the number of 6×4 sub-
stitutions considered satisfying criteria of applicability in classical substitution-
permutation ciphers.
Thus, cryptoschemes based on the use of variable operations implemented
using substitution-permutation networks provide the following possibilities:
Controlled elements with minimal input size (F2/1 and F2/2) are minimal build-
ing blocks for the synthesis of cryptographic operations. Their application is expe-
dient because of the following reasons:
182 Innovative Cryptography, Second Edition
They have been tried and tested in multiple ciphers; in particular, in the ciphers
based on variable bit permutations.
The complete classification of F2/1 controlled elements has been built, and two
best subclasses of such elements have been found.
Criteria of the choice of F2/2 elements have been defined and their detailed
classification has been developed.
The use of such elements ensures considerably more economic hardware im-
plementation in comparison to building controlled substitution-permutation
networks with the input size of 4 bits or more.
The use of F3/1 elements also is interesting and promising and ensures building
of economic ciphers. Although 3-bit input introduces some limitations on the use
of such elements, they can be employed, for example, for synthesis of controlled
substitution-permutation networks oriented toward the following applications:
Including constants the values of which depend on the round number and
encryption mode into the round transformation. This method allows for elim-
inating both weak keys and similarity of all encryption rounds. A certain draw-
back of this approach is that at least one additional operation must be included
into each round, and, in addition, it is necessary to implement the mechanism
of appropriate change of the order of using constants when changing the en-
cryption mode.
The use of switched operations controlled by a bit specifying direct or inverse
order of the use of round keys (thanks to which the choice of the encryption or
decryption mode is ensured). This approach requires minimum additional
expenses for implementation of circuit resources and eliminates the need in
switching constant values in each round when changing the encryption mode.
Furthermore, it creates prerequisites for substantiating ciphers, in which the
change of the order of the round keys use is not required. The latter circum-
stance even allows for reducing the general cost of hardware implementation.
The comparison of all the previous approaches shows that the use of switched
controlled operation is of greatest interest. The main issue here consists in devel-
opment of switched operations satisfying the following requirements:
The switching property of the operation is in essence a special variant of the im-
plementation of the controllability property. This inspires the idea of implement-
ing switched controlled operations by means of appropriate modification of the
schemes used for building controlled operations. In addition, there are prerequi-
sites for efficient implementation of switched controlled operations, in which the
entire set of modifications that can potentially be implemented is split into pairs of
mutually inverse modifications. Assume that in some hypothetic controlled oper-
ation there is an additional 1-bit control input, to which bit e is supplied, specify-
ing the mode of operation. Assume that when e = 0 the direct controlled operation
is executed, and when e = 1 the inverse operation corresponding to it takes place.
This means that for each fixed value of the control vector the direct modification
will take place in the course of encryption (e = 0), and the corresponding inverse
operation will take place in the course of decryption (e = 1), which means that a
certain switched controlled operation is implemented. The idea of building a
switched controlled operation can be efficiently implemented based on symmetric
topologies of controlled permutation networks and controlled substitution-
Switched Controlled Operations 185
permutation networks. Subsequent few sections of this chapter will cover building
of switched controlled operations of different types.
Definition 4.5
Let {F1, F2,…, F2m} be a set of operations defined by the formula Y = Fi = Fi(X1,
X2,…, Xq), where i = 1, 2,…, 2m, X1, X2,…, Xq are input n-bit binary vectors
(operands), and Y is the output n-bit vector. Then, the operation F(V) dependent of
V and defined by the formula Y = F(V)(X1, X2,…, Xq) = FV(X1, X2,…, Xq), where
V is m-bit control vector is called controlled q-bit operation. Operations F1, F2,…,
F2m will be called modifications of controlled operation F(V).
Definition 4.6
Let {F1, F2,…, F2m} be a set of modifications of the controlled operation F(V).
Operation (F(V))–1 containing modifications F1–1, F2–1,..., F2m–1 is called inverse in
relation to the controlled operation F(V), if for all V modifications FV–1 and FV are
mutually inverse.
Definition 4.7
Let F′(e), where e ∈ {0,1} be some operation depending on e, and containing two
modifications: F′(0) = F ′1 and F′(1) = F′2, where F′2 = F′–11. Then operation F′(e) is
called switched operation.
Definition 4.8
Let two modifications of the switched operation F′(e) represent a pair of mutually
inverse controlled operations F′(0) = F(V) and F ′(1) = (F(V))–1. Then F ′(e) is called
switched controlled operation F(V,e).
186 Innovative Cryptography, Second Edition
For the first time, a particular case of switched controlled operations, namely,
switched controlled permutations were built based on permutation networks with
symmetric structure. Building controlled operations based on controlled substitu-
tion-permutation networks considerably extends the class of switched controlled
operations and provides new possibilities of designing fast block ciphers oriented
toward efficient hardware implementation. It is possible to suggest several ap-
proaches to implementation of switched controlled operations based on substitu-
tion-permutation networks. The main approaches among them are based on the
use of:
In the first case, the internal node of switched controlled operation is imple-
mented as some switching block that changes the distribution of control bits so that
for the specified control vector the modification being implemented switches from
direct to inverse one. This case ensures the possibility of using the control vector,
in which every bit is independent. In the second case, internal nodes of switched
controlled operations are implemented as 1) the switching block of smaller size and
implemented with lower overhead for circuit resources and 2) the extension block
implemented as simple branching of wires and introducing practically no addi-
tional expenses for the hardware. In the first variant, the extension block is not re-
quired, although in particular cases of the use of switched controlled operations it
can be used, for example, for forming the control vector of large size based on a
data subgroup of small size. The symmetry of the topological structure of a certain
switched controlled operation assumes that controlled elements located in sym-
metric positions are either involutions of mutually inverse controlled elements of a
generally type.
When using special types of controlled elements, the switching mechanism con-
sists of inversion of all bits of the control vector instead of stepwise redistribution of
control bits over controlled elements of the controlled substitution-permutation
network. To implement this switching mechanism, the controlled element is de-
signed so all its modifications are split into pairs of mutually inverse modifications.
If such controlled elements are included into symmetric topology, switching of the
direct controlled operation to the inverse operation is carried out by means of in-
verting each bit of the control vector.
Switched Controlled Operations 187
result, the F′2n/2m+n block is formed. At the first step of the recursive building pro-
cedure of the second type, F2/1 controlled elements are used as F′n/m blocks. The
F′2n/2m+n. block is bilaterally symmetric in relation to the F2n/2m+n block obtained
using the recursive scheme of the first type (Figure 4.8).
This means that if in the bits of the control vectors in F′2n/2m+n blocks are dis-
tributed by controlled elements according to the rule corresponding to inverse con-
trolled substitution-permutation networks, the result will be F′2n/2m+n = (F′2n/2m + n) –1.
Because modifications of F2n/2m+n blocks are split into pairs of mutually inverse
modifications, from the latter relationship it follows that this property also takes
place for F′2n/2m+n controlled substitution permutation networks. The first and the
second types of the recursive building procedure at each step result in the synthe-
sis of first-order substitution-permutation networks.
Two previously considered variants of the building procedure can be used for
building mutually inverse blocks when using F2/1 controlled elements of the general
Switched Controlled Operations 189
type. In this case, the first-type recursive procedure is carried out using direct F2/1
elements, and the recursive procedure of the second type is carried out using cor-
responding inverse (F2/1)–1 elements as shown in Figure 4.9.
The use of the third type of recursive procedure of building controlled permu-
tation blocks ensuring synthesis of networks of maximum order is also of interest
for synthesis of controlled substitution-permutation networks. This variant can be
represented as a combination of the first two. Within a single step, the F2n/2m+2n
block is formed on the basis of two Fn/m blocks and two active Ln cascades (Figure
4.10). In this case, both the input size of the CSPN input and its order are dupli-
cated. At the first step of the building procedure, two controlled F2/1 elements and
two active cascades of the L2 type are used. Because F2/1 elements have the maxi-
mum order, each step of recursion results in the synthesis of a CSPN of maximum
order with the duplicated input size. In all three types of recursive building proce-
dures, the use of controlled elementary involutions F2/1 is assumed to ensure that
190 Innovative Cryptography, Second Edition
implemented modifications are split into the pairs of mutually inverse modifica-
tions (in case of the general building procedure, this condition is not mandatory).
Such a splitting serves as evidence of the principal possibility of building switched
controlled operations, although the issue of the complexity of this synthesis de-
serves to be considered separately.
Because of the internal bilateral symmetry of F2n/2m+2n blocks, the existence of the
aforementioned splitting for them is obvious. Actually, for each value of the control
vector V = (V1, V2, ..., Vs), a modification is implemented, which is inverse in relation
to the modification corresponding to the control vector V′ = (Vs, Vs–1, ..., V1)
obtained on the basis of V by writing V1, V2, ..., Vs components in the inverse order.
Similarly, it is possible to show that the aforementioned splitting can be implemented
for every symmetric substitution-permutation network. Symmetric controlled sub-
stitution-permutation networks (and controlled permutations blocks as a particular
case) are convenient for synthesis of switched controlled operations of different types.
That being so, in symmetric controlled substitution-permutation networks it is
possible to use controlled elementary involutions, and pairs of mutually inverse F2/1
elements of the general type, located in symmetric positions. For example, if at the
first step of the third-type recursive building procedure two controlled elementary
involutions F*2/1 are used, and at each step of the recursive procedure cascades built
on the basis of direct F2/1 elements and corresponding inverse (F2/1)–1 elements are
employed as upper Ln and lower L–1n active cascades, a new wide class of symmetric
controlled substitution-permutation networks will be obtained. This scheme is pre-
sented in Figure 4.11.
Switched Controlled Operations 191
Using the property of the order duplication implemented in the third type of
the recursive building procedure, it is possible to build controlled substitution-
permutation networks of orders 2, 4, …, n/4. This operation is carried out by anal-
ogy to the synthesis of controlled permutations blocks of the same orders, described
earlier in the “Cryptography: Fast Ciphers” publication by A. A. Moldovyan, N. A.
Moldovyan, N. D. Goots, and B. V. Izotov. The minimal number of active cascades
required for implementation of a first-order controlled substitution-permutation
network makes smin = log2n. This can be easily discovered by considering the first or
the second variants of the recursive building procedure. By carrying out the recur-
sion step of the third type when using two Fn/m blocks of the first order, you’ll obtain
the F2n/2m +2n block of the second order with the following number of layers:
where 2n is the size of the synthesized block of the second order; that is, for this
input size the minimum number of active cascades required for implementation of
the second-order controlled substitution-permutation network is greater by one
than the smin value for the first-order controlled substitution-permutation network.
If the initial Fn/m block has the order h, the third-type recursion step ensures
building of the F2n/2m+2n block of order 2h. It can be easily shown that for the given
values n and h ≤ n /4 the smin value makes smin = log2nh. The case h = n/2 can be
implemented; however, it is of no practical interest, because its implementation
requires you to use smin = 2log2n – 1 active cascades, which is equal to the number
of active cascades in a controlled substitution-permutation network of order n.
Now it is necessary to prove that the controlled substitution-permutation net-
works of orders 2, 4, …, n/4 have the property of modifications splitting into two
subsets of mutually inverse modifications. Figure 4.12 illustrates the structure of the
F block of order 2h, where internal blocks F′ and F′′ have the order h and are char-
acterized by this property. At the first step of recursion, it is possible, for example,
to take mutually inverse first-order controlled substitution-permutation networks
built using elementary controlled involutions according to the first and the second
recursive building schemes. In the particular case, it is possible to take the pair
of F′2/1 and F′′2/1 controlled elements as original blocks F′ and F′′. For F′2/1 and
F′′2/1 controlled elements, the following relations are true: F′(0)2/1 = (F′(1)2/1)–1 and
F′′(0)2/1 = (F′′(1)2/1)–1, which means that the recursive procedure uses controlled
elements with the set of modifications that can be split into two subsets of mutu-
ally inverse modifications. For such controlled elements, it is possible to take CEs
described as the following pairs of elementary modifications: q/u, v/s, u/q, x/r, w/t,
r/x, s/v, and t/v.
The control vector V corresponding to block F can be represented in the form
of concatenation of elements V1, V2, V3, V4, which are control vectors of the upper
cascade Ln, block F′, block F′′ and lower cascade Ln, respectively: V = (V1, V2, V3, V4).
For an arbitrary control vector V, because of the assumed properties of blocks F′ and
F′′, it is possible to specify another control vector V′ = (V4, V′2, V′3, V1), where V′2 is
such a control vector of block F′, for which the latter implements the modification
inverse in relation to the modification implemented at V2; and V′3 is such a control
vector of block F′′, for which the latter implements the modification that is inverse
in relation to the modification implemented with V3. Because of the bilateral sym-
metry of the inclusion of the upper and lower cascades Ln, block F with V′ = (V4, V′2,
V′3, V1) implements the modification that is inverse in relation to the modification,
which it implements having V = (V1, V2, V3, V4). Actually, it is possible to represent
the F2n/2m +2n controlled substitution-permutation network as a superposition of a
single-layered Ln controlled substitution-permutation network, F′2n/2m controlled
substitution-permutation network representing a cascade of two blocks, F′n/m and
F′′n/m, and a single-layered controlled substitution-permutation network Ln–1.
(V ) (V )
Denote block F′2n/2m as (F′ 2 n/m|F′′ 3 n/m), where V2 and V3 are control vectors
corresponding to the left and right internal blocks.
Now, convert the input vector X according to the following scheme:
(V1) (V2) (V3) –1 (V4)
Y = (X) Ln • (F′n/m|F′′ n/m) • (Ln ) ;
(V4) (V′2) (V′3) (V )
Y′ = (Y) Ln • (F′ n/m|F′′ n/m) • (Ln–1) 1 =
(V ) (V ) (V ) (V ) (V ) (V′ ) (V′ ) (V )
= ((X) Ln 1 •(F′ 2 n/m|F′′ 3 n/m)•(Ln–1) 4 ) Ln 4 •(F′ 2 n/m|F′′ 3 n/m)•(Ln–1) 1
(V ) (V ) (V ) (V ) (V ) (V′ ) (V′ ) (V )
= (X) Ln 1 •(F′ 2 n/m|F′′ 3 n/m)•(Ln–1) 4 •Ln 4 •(F′ 2 n/m|F′′ 3 n/m)•(Ln–1) 1
(V ) (V ) (V ) (V ) (V ) −1 (V )
= (X) Ln 1 •(F′ 2 n/m|F′′ 3 n/m) • (F′ 2 n/m|F′′ 3 n/m) • (Ln–1) 1
(V ) (V )
= (X) Ln 1 • (Ln–1) 1 = X.
Thus, for an arbitrary value of the control vector V, it is possible to specify the
value V′, such that the following relationship is true F(V′)2n/2m+2n = (F(V)2n/2m+2n)–1,
which is exactly what was required to prove.
194 Innovative Cryptography, Second Edition
If internal blocks F′ and F′′ are built according to the recursive scheme of the
first or second type, they are characterized by the splitting property being consid-
ered. Consequently, this property has been proven for second-order F blocks.
Using such second-order blocks, according to the scheme under consideration, it is
possible to build blocks of order 4, characterized by this splitting property. Further,
it is possible to consider blocks of orders 8, 16, and higher orders.
Thus, in the example of three types of a recursive procedure of building Fn/m
blocks, it is principally possible to build switched controlled operational substitu-
tion of orders 1, 2, …, n; however, symmetric topology providing a convenient im-
plementation of the mechanism of inverting a controlled operation is implemented
only in the case of maximum order. In case of orders 2, 4, …, n/4 the development
of the switching mechanisms for distribution of control bits requires detailed elab-
oration considering each step of the recursive building procedures used in the
course of synthesizing Fn/m blocks. In further sections, particular cases of building
symmetric switched controlled operations of the first and second orders will be
used, along with another scheme of order duplication allowing for simplification of
the synthesis of switched controlled operations of orders 1, 2, 4, …, n/4 for an
arbitrary value of n representing a natural power of two.
(1)(2,9)(3,17)(4,25)(5)(6,13)(7,21)(8,29)(10)
(11,18)(12,26)(14)(15,22)(16,30)(19)(20,27)(23)(24,31)(28)(32).
(1)(2,9,3,17,4,25,5,33,6,41,7,49,8,57)(10)
(11,18,12,26,13,34,14,42,15,50,16,58)(19)
(20,27,21,35,22,43,23,51,24,59)(28)(29,36,30,44,31,52,32,60)(37)
(38,45,39,53,40,61)(46)(47,54,48,62)(55)(56,63)(64).
Because of bilateral symmetry of blocks F32/96 and F64/192, inverse blocks F–132/96
and F–164/192 corresponding to them are different only in that the components of the
control vector V = (V1, V2, ..., V6) are distributed over active cascade in the inverse
order. In the case of direct controlled substitution-permutation networks, they are
Switched Controlled Operations 197
distributed from top to bottom, and in the case of inverse controlled substitution-
permutation networks, they are distributed from bottom to top. Because of the
symmetry of the F32/96 and F64/192 blocks, modifications implemented by them with
control vector V = (V1, V2, ..., V6) are inverse in relation to modifications imple-
mented with control vector V′ = (V6, V5, ..., V1), where for i = 1, 2, …, 6 compo-
nents Vi are 16 bits in length for F32/96 and 32 bits in length for F64/192. This property
is true also for the pair of blocks F–132/96 and F–164/192. This is because the Vi com-
ponent controls the i-th active layer in case of F32/96 and F64/192 and (7 – i)-th active
layer in case of F–132/96 and F–164/192. This, in turn, means that by changing the order
in which the components of control vector are used, it is possible to specify the
switching from direct controlled substitution-permutation network to the inverse
one. Obviously, this method of building switched controlled operational substitu-
tions is suitable for an arbitrary symmetric structure of a controlled substitution-
permutation network. In other words, the problem of building switched controlled
operational substitution can be solved by previously building a controlled substi-
tution-permutation network with symmetric topology.
If every value Vi, where i = 1, 2,…, s, is formed before the data bits pass the
i-th layer, the delay time of the controlled substitution-permutation network will
be defined by the number of active layers. The delay time of one active layer fits
within the limits between τ and 2τ depending on the variant of circuit implemen-
tation of controlled elements. Here, τ is the delay time of the XOR operation de-
noted as ⊕, which approximately corresponds to the delay of the signal passing
through one gate. The delay time of switched controlled operational substitution is
practically equal to the delay of controlled substitution-permutation network of
normal type.
For building a switched block F(V,e)32/96, it is possible to supply the components
of the control vector to active cascades of block F(V)32/96 through the P(e)96/1 block of
permutation of 16-bit components Vi, as shown in Figure 4.15. The P(e)96/1 block is
implemented as a single-cascade controlled permutation block made up of three
parallel single-layer P(e)2×16/1 blocks (Figure 4.15a). Each of the P(e)2×16/1 blocks has
16-bit left and 16-bit right inputs and outputs. The P(e)2×16/1 block represents 16 par-
allel blocks P(e)2/1, controlled by the same bit e. The right (left) input (output) bit of
each of 16 parallel P(e)2/1 blocks forms the right (left) 16-bit input (output) of the
P(e)2×16/1 block. The control vector V = (V1, V2, ..., V6) is supplied to the input of
block P(e)96/1. Each of the P(e)2×16/1 blocks, depending on e, carries out a permutation
of some pair of 16-bit components of the control vector V, so that when e = 0, com-
ponents V1, V2, ..., V6 are distributed from top to bottom, and when e = 1, these
components are distributed from bottom to top. This mechanism ensures imple-
mentation of the direct F32/96 operation having e = 0, and inverse operation F–132/96
having e = 1. The structure of the switched block F(e)32/96 is shown in Figure 4.15b.
198 Innovative Cryptography, Second Edition
If the Fn/m block has order h, then the F–1n/m block also has order h, and, with all
this being so, implementation of controlled permutations blocks Fn/m and F–1n/m of
the same order requires the use of the same minimum number of active layers.
Thus, the method represented in Figure 4.17 allows for creating a switched
controlled substitution-permutation network F(V,e)2n/2(m + n) of order 2h using two
mutually inverse controlled substitution-permutation networks Fn/m and F–1n/m of
the same order h. Here, V = (V1, V2, V3, V4) is the control vector of the newly-built
controlled substitution-permutation network. It can be easily shown that for all
values of V the following relationships are true:
X = F(V,1)2n/2(m+n)(Y), if Y = F(V,0)2n/2(m+n)(X),
X = F(V,0)2n/2(m+n)(Y), if Y = F(V,1)2n/2(m+n)(X).
If n = 2k, where k is some natural number, the minimum number of active lay-
ers in block Fn/m (or F–1n/m) of order h = 1, 2,…, n/4 makes
smin = log2hn.
smin = log2hn–1.
Switched Controlled Operations 201
s′min = log2h′n′–1.
If n = 2k, it is easy to create a block F(V)n/m of maximum order with the sym-
metric structure. Consequently, a switched block F(V,e)n/m of maximum order can
also be built using the method described in Section 4.4.
extended controlling data subgroup of one or more subkeys. In this case, the cur-
rently implemented CSPN modification is dependent on the data subgroup and the
secret key.
If the control vector is an equiprobable random value, it is possible to use
arbitrary distribution of control bits over controlled elements of the controlled sub-
stitution-permutation network. If there is a dependency between control bits, the dis-
tribution is chosen based on specific criteria ensuring the uniformity of the influence
of all bits of the controlling subgroup on the choice of the current modification of the
controlled operation. Distribution of control bits satisfying specific criteria can most
easily be built for certain specific topological structures of controlled substitution-
permutation networks. For example, symmetric structures of the F32/96 and F64/192
blocks described in the previous section can serve as examples. In case of 64- and 128-
bit ciphers, achieving independence of the bits in control vector is related to splitting
the input data block into subgroups of different size. At the same time, the control-
ling subgroup must have the size two or three times greater than the data subgroup
being transformed. Such splitting is not typical, and requires specialized cryp-
toschemes to be developed. In addition, in this case a larger number of rounds are
required to ensure the influence of each input data bit on each output bit.
Because dependence of control bits in vector V cannot be eliminated in a rea-
sonable way, it is expedient to try to find more economic mechanisms of switching
the distribution of control bits resulting in inversion of controlled substitution-
permutation networks; that is, in change of the direct operation to the inverse one.
Actually, it is possible to assume that it is enough to carry out a certain permutation
of n bits in the controlling data subgroup that will result in redistribution of m bits
of vector V depending on the operation mode bit e. It is also possible to assume that
the implementation of such a method of inverting the controlled operation must be
based on the use of the symmetry of the CSPN topological structure, and on the
corresponding symmetry of the bit distribution in the controlling data subgroup.
Now it is time to consider the method of inverting controlled substitution-permu-
tation networks demonstrating practical applicability of this approach. The most
considerable advantage of the discussed methods of switching bit distribution in
the controlling data subgroup is that their implementation requires using only n/2
P2/1 switching elements instead of m/2 elements, as was the case of switching arbi-
trary distribution of bits in control vector V. In case of implementation of switched
controlled substitution-permutation networks F(e)32/96 and F(e)64/192, the number of
required P2/1 blocks will be smaller by 32 and 64 elements, respectively. This will
allow us to reduce the cost of circuit implementation down to the values of
1.03–1.17 of the implementation complexity of F32/96 and F64/192 controlled sub-
stitution-permutation networks that do not have the switching property. The
previously specified dispersion of values relates to different complexity of imple-
mentation different types of F2/1 control elements and to the possibility of different
Switched Controlled Operations 203
inverse blocks Fn/m′ and F–1n/m′. This scheme illustrates the procedure of building
switched operational blocks in the case when all control bits are independent (a),
and in case of extension of the controlling data subgroup for forming the control
vector (b). In the latter case, control bits of vectors V′1 and V′2 are distributed over
blocks Fn/m′ and F–1n/m′ according to the bilateral symmetry, thanks to which in the
case of permutation of vectors L1 and L2, correct switching of the controlled sub-
stitution-permutation network from direct controlled operation to inverse control
operation is ensured.
Switched controlled substitution-permutation networks F(e)32/96 and F(e)64/192
can be easily built according to the design scheme oriented toward economical
hardware implementation (Figure 4.18b). In comparison to normal controlled sub-
stitution-permutation networks F32/96 and F64/192, the F(e)32/96 and F(e)64/192 blocks
used in the previously described variant of implementation require 16 and 32
additional P2/1 elementary switches, respectively.
the bits from the second half. This nonuniformity is not critical; however, it must
be taken into account when developing switched controlled operational substitu-
tions intended for use in specific ciphers. A certain drawback of the method of
inverting controlled substitution-permutation network by means of inverting con-
trol bits is that the aforementioned symmetric distribution of control bits makes it
impossible to implement one of the useful criteria of forming control vectors. This
criterion can be formulated as follows: control bits must be distributed so that
neither of the bits of the data subgroup being transformed is exposed to the influ-
ence of the same bit of the control data subgroup twice.
Despite the aforementioned specific features, the CSPN inversion method
under consideration is of practical importance, because it provides another way of
economic implementation of the mechanism of switching between direct and in-
verse operations. Consider the variants of building switched controlled operational
substitutions of this type using different types of controlled elements.
y = f (x , x , v) y = f (x , x , v) y ⊕y
1 1 1 2 2 2 1 2 1 2
It is necessary to mention that when fixing one control bit (v1 or v2) in the
m/e/e/n element, it turns into an element of the S2/1 type. Consider several
examples of controlled elements with four different modifications. Element q/k/l/u
is described by the following boolean functions (Figure 4.20a):
One of the most important goals of using switched controlled operational substi-
tutions is elimination of the homogeneity of iterative encryption when using rela-
Switched Controlled Operations 209
tively short keys in case of a simple key use schedule. To achieve this goal of having
only one switched operation in the procedure of a single encryption round, it is
possible to set different values of the operation mode switching bit in sequential
rounds, so that they form a periodic sequence of one and zero values. A more effi-
cient variant is using several switched controlled operational substitutions in the
same round. This allows for ensuring more significant difference in the procedures
of sequential rounds. Recurrence of the encryption rounds takes place only when
bits on the switching input of all switched controlled operational substitutions are
repeated. It is possible to develop a cryptoscheme with a larger number of switched
operations carried out in parallel over reduced data subgroups. This will ensure the
possibility of using a large number of independent switching bits; however, the
efficiency of controlled operations grows considerably when such operations are
used for transforming large data subgroups. Consequently, the use of large number
of switched operations within one round is not proposed.
Nevertheless, the idea of introducing more considerable differences into the
neighboring rounds and into the rounds separated by several steps from each other
also deserves attention. This task can be solved by means of developing switched
controlled operational substitutions with an extended switching range, where
switching is carried out using switching vector E with the length equal; for example,
to k = 4 – 8 bits instead of a single switching bit. It is possible to assume that for a
given value E = (e1, e1, …, ek), some controlled operation will be executed, and that
E = (e1 ⊕ 1, e1 ⊕ 1, …, ek ⊕ 1) will correspond to the inverse controlled opera-
tion. This produces 2k/2 pairs of mutually inverse controlled operations.
Implementation of switched controlled operational substitution with an ex-
tended switching range is also based on the stepwise modifications of the distribu-
tion of control bits over elementary controlled substitution blocks F2/1 for a certain
fixed topology. The type of controlled substitution-permutation network is deter-
mined by the topology of interrelations between controlled elements and distribu-
tion of the control bits. Earlier, switched controlled operational substitutions with
two-variant distribution were covered, which were switched by a single bit e. By
analogy, it is possible to build switched controlled operational substitutions with
multivariant distribution of control bits. Evaluation of the maximum length of the
switching vector E is not a difficult task. To achieve this, it is necessary to account
for the following specific features characteristic of switched controlled operational
substitutions based on redistribution of control bits:
Two bits supplied to the input of the same elementary switch P2/1, which is a
part of a certain switching block of control bits P(E)m/g (in case of all indepen-
dent bits in control vector) or P(E)n/g (in case of economic implementation of a
switched controlled operational substitution when using permutation of the
bits of controlling data subgroup), where g is the length of vector E, must be
supplied to the input of one or more pairs of symmetrically placed controlled
elements F2/1 in the Fn/m block.
SUMMARY
One of the most important problems related to designing ciphers with simple key
use schedule is preventing the occurrence of weak keys. In this chapter, it was
shown that the use of data-dependent operations is a prerequisite for the develop-
ment of inexpensive hardware-oriented ciphers. This chapter also suggested an
approach for solving the problem of weak keys based on using switched controlled
operations. Several variants of methods of building switched controlled operations
have been suggested. Being a particular case of the controllability property, the
switching property can be easily and seamlessly built into various types of con-
trolled operations.
Another problem is related to so-called slide attacks covered in “Advanced
Slide Attacks” by A. Biryukov and D. Wagner. This type of attack is based on the
Switched Controlled Operations 213
periodicity of the recurrent subkeys use, which results in occurrence of the same
round transformations. The potential possibility of implementing such attacks
must be taken into account when designing ciphers of the type under considera-
tion. The use of long secret key (128…256 bits) allows us to easily build the sched-
ule of key use, free from any periodicity, thus eliminating the prerequisite to
implementation of slide attacks. However, when using short keys, a situation fre-
quently encountered in practical application, simple key schedule actually repre-
sents the use of the same subkeys in each round. This case is the most favorable for
slide attacks. Thus, the need for ensuring the possibility of eliminating repetitions
of round transformations by means of using some other mechanisms irrelevant to
the key length is obvious.
The switching property allows for suggesting three variants of such mechanisms:
T
his chapter deals only with the block cipher algorithms developed by the au-
thors of the book. All terms and designations used here correspond to those
in the two previous chapters, unless otherwise specified.
215
216 Innovative Cryptography, Second Edition
Y = F(X, Q(e)),
where Q(e) = H(K, e) is the extended key, a function of the 256-bit secret key K and
the encryption mode e (e = 0—encryption, e = 1—decryption). In encryption
mode, X is the initial block of binary data (plaintext), and in decryption mode, it is
the transformed block of binary data (ciphertext). In encryption mode, the result-
ing value Y is ciphertext, and in decryption mode, it is plaintext.
The secret key K is represented as a combination of eight 32-bit subkeys;
namely, K = K1||K2||…||K8, where K1, K2, …, K8 ∈ GF(2)32.
The encryption algorithm (the F function) is described in Section. 5.1.2, and
the procedure for building the Q(e) = H(K, e) working key is in Section 5.1.3.
Initial transformation—IT.
12 rounds (loops) of transformations using the Crypt procedure.
Final transformation—FT.
The Y block is divided into two subblocks of the same length—L0 and R0; in
other words, (L0, R0) = Y, where L0, R0 ∈ GF(2)32. Then, 12 rounds of transforma-
tion are performed with the Crypt procedure according to the formulas:
L j = Crypt( R j −1 , L j −1 , Q (j e ) );
Rj = Lj–1 ( j = 1, 2, …, 12).
After the 12th round over the X = (R12, L12) block, the final transformation, FT,
is performed according to the formula:
Y = FT( X , QFT
(e )
).
Designing Fast Ciphers Based on Controlled Operations 217
X
Initial
(e)
transformation IT QIT
L0 R0
Crypt Q1(e)
1st round
L1 R1
2nd round Crypt Q2(e)
L2 .. R2 ..
...
. .
Crypt Qr(e)
rth round
Lr Rr
Final FT Q (e)
F
T
transformation
Y
Initial Transformation
The initial transformation IT is as follows:
Y = IT(X, A),
TABLE 5.1 The Time Base for Performing an Operation in the Crypt Procedure
5 5÷6 R=R⊕X
6 6÷7 R = R ⊕ X′
7 7 ÷ 12
As it follows from Table 5.1, most operations are performed concurrently, and
the total time required for the performance of the procedure is equal to the con-
secutive performance of 12 operations of the XOR type.
The formal parameters A and B correspond to the formal parameters A(3) and
(4)
A of the Crypt procedure. In vector form, the G function is determined by the
formula:
X' = M(0) ⊕ M(1) ⊕ (M(2) ⊗ A) ⊕ (M(2) ⊗ M(5) ⊗ B) ⊕ (M(3) ⊗ M(5)) ⊕ (M(4) ⊗ B).
The binary vectors M(0), M(1), …, M(5) are expressed recursively via W; namely,
and ∀ j = 1, 2, …, 5,
where ϕ(z1, z2, …, z6) = z1z2 z3 ⊕ z1z4 ⊕ z2z5 ⊕ z3z6 is a bent function, defined as
follows.
Definition 5.1
A boolean function f(X) (X ∈ GF(2)n) is called perfect nonlinear, or a bent func-
*
tion [76], if for ∀ α ∈GF(2)", the following equality is true: U α ( f ) = ±2 n / 2 .
In differential, linear, and other types of cryptanalysis, the leading role belongs
to the notion of the Walsh-Hadamard transformation, which is a modification of
the discrete Fourier transform.
Definition 5.2
A Walsh-Hadamard transformation (WHT) of a real function f(X) ∈ GF(2) over
an α vector (X, α ∈ GF(2)n) is a linear transformation, which takes its values from
the set of real numbers, and has the following form:
222 Innovative Cryptography, Second Edition
Uα ( f ) = ∑ f ( X )(−1)α• X
X ∈ GF ( 2 ) n
A transition from the general form of the g function to certain generator func-
tions of a controlled substitution operation sequential model is performed by the
following substitution of variables:
⎛ z1 z2 z3 z4 z5 z6 z7 z8 ⎞
⎜⎜ ⎟,
⎝ xi − 2 xi−5 bi ai x i −3 xi − 4 xi−1 xi ⎟⎠
where xi, ai, and bi are the components of vectors X, A, B∈GF(2)32, and the initial
conditions correspond to the vector (x–4, x–3, x–2, x–1, x0) = (1, 1, 1, 1, 1).
In cryptographic primitives, linear transformations of original vectors are often
used as intermediate transformations. In connection with this, to increase the
effectiveness of estimating such primitives, the following properties of transfor-
mations should be taken into account:
Designing Fast Ciphers Based on Controlled Operations 223
Statement 5.1
If B is a nonsingular matrix of the order n over the GF(2) field, and the
g(X) = f(XB) relationship is true for a boolean function f(X), f(X) and g(X)
have the same algebraic degree (deg(f) = deg(g)) and nonlinearity (N(f) = N(g),
N*(f) = N*(g)), and they also have the same dimension.
Statement 5.2
If a boolean function has the form f(X) = haff(X1) ⊕ hbent(X2), where
haff(X1) (X1 ∈ GF(2)') and hbent(X2)(X2 ∈ GF(2)n–l, n – l is even) are affine and
bent functions, respectively, the original function has the linear dimension l and a
nonlinearity value of N(f) = 2n–1 – 21/2(n+l)–1.
According to the scheme of the Crypt procedure (Figure 5.4), the G function is
preceded by a linear transformation X = L ⊕ A that does not change either the ini-
tial values of nonlinearity or the degree of the algebraic normal form of generator
functions (see Statement 5.1), but does complicate the resulting appearance of the
generator functions. The function G' = G(L ⊕ A) is bijective by L at various fixed
values of the A and B parameters.
The same E extension procedure is used for the box P32−1/80,, but, due to the spe-
−1
cial numeration of box P32 /80‘s control bits, Table 5.2 is transformed into Table 5.3.
The E procedure provides for:
−1
TABLE 5.3 Control Bit Values for the P32 / 80 Box
Final Transformation
The FT procedure is a transformation that is the opposite of the IT procedure.
This transformation looks as follows:
Y = FT(X, A),
Initially, each even bit of the input block is inverted (see Figure 5.5), and then
each pair of the X input block with indices 2j–1 and 2j (j = 1, 2, …, 32) is either per-
muted (aj = 1) or not (aj = 0).
The bit values of the Y vector are calculated with the use of the following
formulas:
y2j–1 = (x2j–1 ⊕ x2j ⊕ 1)aj ⊕ x2j–1 and y2j = (x2j–1 ⊕ x2j ⊕ 1)aj ⊕ x2j ⊕ 1.
Q(e ) = (QIT
(e )
, Q1(e ) , Q2(e ) ,..., Q12
(e ) (e )
, QFT ),
(e ) (e )
The correspondence of subkeys QIT , QFT , Q(j1,e ), Q(j 2,e ), ..., Q(j 6,e ) (j = 1, 2, …, 12)
is specified in Table 5.4.
For example, for the fifth round ( j = 5), the subkey sequence K1||K2||O7||
O6||K4||K3 corresponds to the formal parameters A(1), A(2), …, A(6) of the Crypt
procedure; namely,
(e ) (e )
For the initial and final transformations, the keys QIT and QFT look as
follows:
(e )
QIT = O1 and QFT
(e )
= O2 .
That is,
(e )
QIT = K 1+e and QFT
(e )
= K 2 −e .
This algorithm is a practical implementation of the main ideas for synthesis of a fast
block cipher based on controlled operations and considered in previous chapters, and
it is aimed at high-speed information processing with a 64-bit data exchange bus.
Y = F(X, Q(e)),
where Q(e) = H (K, e) is an extended key that is a function of a 256-bit secret key K
and the encryption mode e (e = 0—encryption, e = 1—decryption), while in the
encryption mode X is the initial block of binary data (plaintext), and in the de-
cryption mode it is a transformed block of binary data (ciphertext). In encryption
mode, the resulting value Y is ciphertext, and in decryption mode, it is plaintext.
The secret key K is represented as a combination of four 64-bit subkeys;
namely, K = K1||K2||K3||K4, where K1, K2, K3, K4 ∈ GF(2)64.
The encryption algorithm (the F function) is described in Section. 5.2.2, and
the procedure for building the Q(e) = H(K, e) working key is in Section 5.2.3.
228 Innovative Cryptography, Second Edition
After the 12th round, the final transformation FT is performed over the block
X = (R12, L12) according to the formula:
Y = FT( X, QFT
(e )
).
Initial Transformation
The initial transformation IT looks as follows:
Y = IT(X, A),
The elements A(1), A(2), A(3), and A(4) are formal parameters of the key informa-
tion; in other words, Q (j i ,e ) is an element of the round key Q(j e ) = (Q(j1,e ), Q(j 2,e ), Q(j 3,e ),
Q (j 4 ,e ) ), and corresponds to parameter A(i). Accordingly, R and L are the formal
parameters for the left and right parts of the input data block.
One feature of such an implementation of the Crypt procedure is the use of
four subkeys with a length of 64 in one round—all the bits of 256-bit secret key K
are used. In addition, a more complicated vector boolean function G is used.
The procedure employs:
A two-stage Clos network C<8, 8> is used as P64/192 and P64−1/192 boxes (Figure 5.7)
when the first layer is made up of R3 boxes, and the second is made up of R 3−1 boxes.
Since the structure of the P64/192 and P64−1/192 boxes are the same, in Figure 5.7, col-
umn (I) corresponds to a control vector for the direct transformation, and column
(II) to a reverse transformation.
The sequence of transformations and their interaction are shown in Figure 5.8.
The time base of operations in the Crypt procedure is presented in Table 5.5.
230 Innovative Cryptography, Second Edition
TABLE 5.5 The Time Base for Operations in the Crypt Procedure
(τ⊕ )
R = P –1
64/192(V") (R)
As it follows from Table 5.5, most of the operations are performed concur-
rently, and the total time required for the performance of the procedure is equal to
the consecutive performance of 14 operations of the XOR type.
Designing Fast Ciphers Based on Controlled Operations 231
The formal parameters A and B correspond to the formal parameters A(3) and
A(4) of the Crypt procedure. In vector form, the G function is determined by the
formula:
and ∀j = 0, 1, ..., 5,
where ϕ(z1, z2, …, z10) = z1z2 ⊕ z3z4 ⊕ z5z6 ⊕ z7z8 ⊕ z9z10 ⊕ z1z5z9 ⊕ z1z3z7z9 is a bent
function (see Definition 5.1. A Walsh-Hadamard transformation (see Definition
5.2) of the g function consists of 1024 elements possessing the value |U*α(g)| = 128
for all vectors α = (α1, α2, …, α10, 0, 0), and for the rest of the 3072 elements, they
have the value U*α(g) = 0. With respect to the selected structure and properties of
bent functions, we have the following characteristics of the g function:
A transition from the general form of the g function to certain generator func-
tions of a sequential model of a controlled substitution operation is performed by
the following substitution of variables:
where lj, aj, bj are the components of vectors L, A, B∈GF(2)64, and the initial con-
ditions correspond to the vector (x–4, x–3, x–2, x–1, x0) = (1, 1, 1, 1, 1).
Table 5.6 The Correspondence between the U and V Vector Bits for the P64/192 Box
Similarly, Table 5.7 shows the correspondence of bit numbers for vectors V and
A; the table’s analysis proves that V1 does not depend on A.
Table 5.7 The Correspondence between the A and V Vector Bits for the P64/192 Box
The extension is done in such a way that the 32 high order bits of vector A con-
trol only R3 boxes, and those of the lower order control only boxes R 3−1 , whereas in
234 Innovative Cryptography, Second Edition
each box R3 and R 3−1 all bit numbers of vectors U and A are different. Moreover,
there are no two P2/1 boxes with control bits of the same expression of the ui ⊕ aj
type.
The E procedure provides for:
Final Transformation
The FT procedure is a transformation that is the reverse of the IT procedure. This
transformation looks as follows:
Y = FT(X, A),
y2j–1 = (x2j–1 ⊕ x2j ⊕ 1)aj ⊕ x2j–1 and y2j = (x2j–1 ⊕ x2j ⊕ 1)aj ⊕ x2j ⊕ 1.
Q(e ) = (QIT
(e )
, Q1(e ), Q2(e ),..., Q12
(e ) (e )
, QFT ),
The elements of the extended key Q(e) are determined via Oi parameters, which
are calculated, in turn, by the formulas:
(e ) (e )
The subkey correspondence QIT , QFT , Q(j1,e ), Q(j 2,e ), Q(j 3,e ), Q (j 4 ,e ) (∀j = 1, 2, …,
12) is given in Table 5.8.
For example, for the fifth round (j = 5), the subkey sequence O3, O1, O2, O4 cor-
responds to formal parameters A(1), A(2), A(3), A(4) of the Crypt procedure; namely,
That is,
Q5(0) = (K 3 , K 1 , K 2 , K 4 ),
Q5(1) = (K 4 , K 2 , K 1 , K 3 ).
(e )
For the initial and final transformations, the keys QIT and QFT
(e )
look like:
(e )
QIT = O4 and QFT
(e )
= O3 .
That is,
(e )
QIT = K 4−e and QFT
(e )
= K 3+e .
The CIKS-128 algorithm is a type of iterated block cipher that uses the scheme of
Russian patent No. 2140714 as the basic scheme for one round. Compared to
SPECTR-128, the round structure function is changed. In particular, instead of a
controlled P64/192 permutation box and a nonlinear vector boolean G function, two
identical nonlinear vector boolean G functions are used.
Like SPECTR-128, the CIKS-128 algorithm is a practical implementation of
basic ideas of synthesizing a fast block cipher based on controlled operations, which
we considered in the previous chapters. It is aimed at high-speed information pro-
cessing with a 64-bit data exchange bus.
Y = F(X, Q(e)),
Designing Fast Ciphers Based on Controlled Operations 237
where Q(e) = H(K, e) is an extended key, which is a function of a 256-bit secret key
K and encryption mode e (e = 0—encryption, e = 1—decryption). In encryption
mode, X is the initial block of binary data (plaintext), and in decryption mode, it is
a transformed block of binary data (ciphertext). In encryption mode, the resulting
value Y is ciphertext, and in decryption mode it is plaintext.
The secret key K is represented as a combination of four 64-bit subkeys;
namely, K = K1||K2||K3||K4, where K1, K2, K3, K4 ∈ GF(2)64.
The encryption algorithm (F function) is described in Section 5.3.2, and the
building procedure for the Q(e) = H(K, e) working key can be found in Section
5.3.3.
Initial transformation—IT
12 rounds (loops) of transformations using the Crypt procedure
Final transformation—FT
After the 12th round, the final transformation FT is performed over the block
X = (R12, L12) according to the formula:
Y = FT( X , QFT
(e )
).
Y = IT(X, A) = X ⊕ A
and
Y = FT(X, B) = X ⊕ B,
where X, Y, A, B ∈ GF(2)128.
238 Innovative Cryptography, Second Edition
(e )
The formal A parameter corresponds to the QIT key, and the B parameter cor-
(e )
responds to the QFT key.
A two-stage Clos network C<8, 8> is used as P64/192 and P64−1/192 boxes (Figure 5.7),
where the first layer is compiled of R3 boxes, and the second is made up of R 3−1
boxes. Since the structure of boxes P64/192 and P64−1/192 is the same, in Figure 5.7,
column (I) corresponds to a control vector for direct transformation, and column
(II) corresponds to one for a reverse transformation.
The sequence of the transformations and their interaction is shown in Figure
5.10.
The time base for performing operations in the Crypt procedure is presented in
Table 5.9.
Designing Fast Ciphers Based on Controlled Operations 239
TABLE 5.9 The Time Base for Performing Operations in the Crypt Procedure
(τ⊕ )
R = P –1
64/192(V") (R)
It follows from Table 5.9 that most operations are performed concurrently, and
the total time required for the procedure’s performance is equal to the consecutive
performance of 14 operations of the XOR type.
240 Innovative Cryptography, Second Edition
π = (1, 50, 9, 42, 17, 34, 25, 26, 33, 18, 41, 10, 49, 2, 57, 57)
(3, 64, 43, 24, 19, 48, 59, 8, 35, 32, 11, 56, 51, 16, 27, 40)
(4, 7, 28, 47, 52, 23, 12, 63, 36, 39, 60, 15, 20, 55, 44, 31)
(5, 14, 13, 6, 21, 62, 29, 54, 37, 46, 45, 38, 53, 30, 61, 22)
Y = I(X) = (X6>>>4||X5>>>4||X4>>>4||X3>>>4||X2>>>4||X1>>>4||X8>>>4||X7>>>4),
where X = (X1, X2, X3, X4, X5, X6, X7, X8) and X1, X2, …, X8∈ GF(2)8. In other words,
there is a byte permutation, and each byte shifts by 4.
To make sure involution is specified, it is sufficient to perform the I2 transfor-
mation; namely,
I2(X) = I((X6)>>>4||(X5)>>>4||(X4)>>>4||(X3)>>>4||(X2)>>>4||(X1)>>>4||(X8)>>>4||
(X7)>>>4) = I(((X1)>>>4)>>>4||((X2)>>>4)>>>4||((X3)>>>4)>>>4||((X4)>>>4)>>>4||
||((X5)>>>4)>>>4||((X6)>>>4)>>>4||((X7)>>>4)>>>4||((X8)>>>4)>>>4) =
(X1, X2, X3, X4, X5, X6, X7, X8) = X.
when the values of jth bits of vectors W and W' (j = 1, 2, …, 64) are calculated by
the following formulas:
X = U(0) ⊕ A(0) ⊕ (U(1) ⊗ B(0)) ⊕ (U(2) ⊗ U(5)) ⊕ (U(6) ⊗ A(1)) ⊕ (A(2) ⊗ B(1)) ⊕
⊕ (U(3) ⊗ U(4)) ⊕ (U(1) ⊗ U(4) ⊗ U(6)) ⊕ (U(2) ⊗ U(6) ⊗ B (1)) ⊕
⊕ (U(1) ⊗ U(2) ⊗ U(4) ⊗ B(1)),
where gi are certain generator boolean functions. A single unified boolean function
of 12 variables will be considered a generator functions prototype. It looks as follows:
where ϕ (z1, z2, …, z10) = z1z2 ⊕ z3z4 ⊕ z5z6 ⊕ z7z8 ⊕ z9z10 ⊕ z1z5z9 ⊕ z3z5z7 ⊕ z1z3z7z9
is a bent function (see Definition 5.1). A Walsh-Hadamard transformation (see De-
finition 5.2) of the g function consists of 1024 elements possessing the value of
|U*α(g)| = 128 for all vectors α = (α1, α2, …, α10, 0, 0), and for the rest of the 3072
elements it has a value of U#α(g) = 0. With respect to the selected structure and
properties of bent functions, we have the following characteristics of the g function:
242 Innovative Cryptography, Second Edition
A transition from the general form of the g function to certain generator func-
tions of the sequential model of the controlled substitution operation is done using
the following substitution of variables:
where lj, aj, and bj are the components of vectors L, A, B∈GF(2)64, and the initial
conditions correspond to the vector (x–4, x–3, x–2, x–1, x0) = (1, 1, 1, 1, 1).
where for the P64/192 box, the transformations Pπ1, Pπ2, …, Pπ6 implement the fixed
permutations of bits specified in Table 5.10.
For example, 32 in the first line, corresponding to vector V1, means the value
u32 is used as the control bit v (21) of V1; in other words, v2 of V. 22 in the second line
( 2)
corresponds to the control bit v32 = u22 ⊕ a22 , and 53 in the sixth line corresponds
(6)
to the control bit 9v = u53
⊕ b 53.
The E extension procedure is done in such a way that the 32 higher order bits
of the U vector participate in controlling only R 3−1 boxes, whereas the lower order
bits control only R3 boxes, all bit numbers of vectors U, A, and B being different in
each R 3−1 and R3 box.
The control vector extension procedure provides for:
Q(e ) = (QIT
(e )
, Q1(e ), Q2(e ), ..., Q12
(e ) (e )
, QFT ),
where Q j = (Q j , Q j , Q j , Q j ), ∀j = 1, 2, …, 12,
(e ) (1,e ) ( 2 ,e ) ( 3,e ) ( 4 ,e )
when QIT(e )
, QFT(e )
∈ GF(2)128, but Q (j h ,e ) ∈ GF(2)64 , ∀h =1, 2, 3, 4.
(e)
The Q extended key is a series of 52 64-bit binary vectors, each being one of
four secret subkeys—K1, K2, K3, K4.
The elements of the Q(e) extended key are determined via the Oi parameters,
which are calculated, in turn, by the formulas:
For example, for the fifth round (j = 5), the subkey sequence O2, O4, O1, O3
corresponds to the formal parameters A(1), A(2), A(3), A(4) of the Crypt procedure;
namely,
That is,
For the encryption mode Q5(0) = (K 2 , K 4 , K 1 , K 3 ), and for the decryption mode
Q5(1) = (K 1 , K 3 , K 2 , K 4 ).
For the initial and final transformations, the keys QIT (e )
and QFT
(e )
look as follows:
(e )
QIT = (O1 || O3 ) and QFT
(e )
= (O2 || O4 ).
That is,
(e )
QIT = (K 1+e || K 3+e ) and QFT
(e )
= (K 2−e || K 4−e ).
Scheme Universality
To prove the universality of the scheme, it is sufficient to demonstrate the univer-
sality (reversibility) of one round scheme, or rather, the universality of the transfor-
mation highlighted in gray in Figure 5.10. Here are the formulas for e = 0 and e = 1:
Since fiber-optic channels provide for data transfer with very high speed, processor
developers consider the issue of integration (on a hardware level) of a cryptographic
means of information transformation into the processors, one that implements
one of the universally accepted algorithms meeting modern requirements of stabil-
ity and speed. One drawback of this trend is that the transformation algorithm is
forced on customers, limiting the user’s freedom of choice, and regardless of whether
the user trusts the particular algorithm.
An alternative trend in solving this problem is the extension of the list of com-
mands implementing cryptographic-like transformations with a high speed, and
created as special instructions. In particular, the implementation of controlled bit
permutation operations is rather interesting. The dimension of controlled permuta-
tion boxes that implement such operations should correspond to the bit capacity of
the processor used.
For example, for processors operating with 32-bit binary vectors (figures, words),
bit permutations are effectively implemented using a P32/96 box of the second order
of controlled permutations (Figure 5.12).
In this chapter, we consider the description of this command and how to effi-
ciently use it in software block ciphers.
(U , e )
The result of applying the P32 / 32
command is the permutation of the 32-bit
binary vector X. In other words, the command DDP32 implements the mapping of
GF(2)32 × GF(2)32 × GF(2)→ GF(2)32; namely,
Y = P32/32(X, U, e).
Since the second order box P32/96(V) is used as the operation prototype, in which
the bit capacity of the control vector is equal to 96, in a new command, you must
implement the control vector V = E(U) expansion procedure, and the P32/96(V) box;
namely,
E: GF(2)32 → GF(2)96),
which provides the commutation of each bit of the U binary vector with three dif-
ferent bits of the 96-bit binary vector V.
−1
To perform a reverse transformation P32 / 96 (V ) in box P32/96, you have to reverse
−1
the order of vectors V1, V2, ..., V6; in other words, P32 / 96(V ) = P32 / 96(V ′ ) , where
V = (V1, V2, ..., V6) and V' = (V6, V5, ..., V1). This reversal is effectively imple-
( e)
mented using the one-layer P96 /1
box, shown in Figure 5.13.
(U , e )
Thus, the operational box implementing the P32 / 32
command looks like the one
shown in Figure 5.14.
(U , e )
Thanks to such a structure, the P32 / 32 box performs either a direct controlled
permutation operation (e = 0), or a reverse permutation operation (e = 1).
248 Innovative Cryptography, Second Edition
( e)
FIGURE 5.13 The P96 /1 box for
controlling the data transformation
(U ,e )
mode in the P32 /32 command.
(U ,e )
FIGURE 5.14 The P32 /32 controlled
permutations box.
TABLE 5.12 Correspondence between the Bits of Vectors U and V for the P32/96 Box
For example, in the first row corresponding to vector V1, 10 means that the
value u10 is fed to the input v (21) controlling the second box P2/1, whereas 10 in the
( 2)
second row corresponds to the value v15 = u10 , and 26 in the sixth row corresponds
to the value v7( 6 ) = u26 .
In a hardware implementation, an elementary switch that uses no more than 12
(U , e )
transistors is implemented. Accordingly, to implement a P32 / 32
operational box, no
more than 1800 transistors will be needed. Therefore, if you include the DDP32
command into the set of the standard operations of a contemporary processor, it
will not considerably complicate the circuit implementation of such processors. The
availability of such a command will help to enhance the speed of software ciphers
using this operation (up to 1 Gbit/s and more). This will make it possible to solve
many urgent problems in developing computer security systems that provide real-
time information security in contemporary, highly efficient automation systems.
This chapter also deals with two block ciphers (DDP-S64 and DDP-S128), which
significantly differ from the SPECTR-Z software cipher in their structure, and thus,
using the name DDP-S for the cipher being considered is not quite correct.
B ≡ {0,1}8 and u ∈ B.
The term “word” designates 32-bit binary vectors marked by uppercase letters
in italics. For example, U = (u0, u1, …, u31), where ∀i = 0, 1, …, 31, ui ∈ {0,1}.
It is obvious that U = (u0, u1, u2, u3), where ∀j = 0, 1 …, 3, uj ∈ B, and U ∈ B4.
To designate byte sequences larger than 4, uppercase letters in bold italics will
be used; for example, Q ∈ B2051, where Q = (q0, q1, …, q2050).
The operations “+m” and “–m” are designated, respectively, as “2m congruence
addition” and “2m congruence subtraction.”
The operation “W ↔ V” designates a value exchange operation for words W
and V.
The designations “+m” and “−m” have not yet been generally adopted, but we think
that such expressions are a natural development of index symbols for sets of vari-
ables, and so forth. There is no doubt that the expressions “+2m” and “−2m” are
more common, since they allow you to consider any p module, and not only a
power of 2 (e.g., “+p” and “−p”). This difference, however, is less important than
the representations of the expressions (X + Y)mod 2m and X +m Y.
α = 0Dx, α ∈ B
β = FFFF07FFx , β ∈ B4
γ = B25D28A7 1A62D775x, γ ∈ B8
δ = 98915E7E C8265EDF CDA31E88 F24809DD
B064BDC7 285DD50D 7289F0AC 6F49DD2Dx, δ ∈ B32
The index “x” means that the hexadecimal number representation is used, and
the lower order bit is to the right. For example, the byte α = 0Dx can be represented
in the vector form as:
Cipher Structure
The SPECT-SZ software cipher is usually implemented as two modules (Figure 5.15):
The initialization module (used for program settings and the formation of all
necessary parameters, including the Q extended key)
252 Innovative Cryptography, Second Edition
The resident module, which serves other applications’ requests for data encryp-
tion and decryption
The Q (Q ∈ B2051) extended key, designed using the secret key K, is formed by
the initialization module in two cases:
The resident module consists of two Encrypt and Decrypt subprograms, which
are intended for the encryption and decryption of information represented as data
blocks with m 32-bit words in each, respectively.
The next step is the use of the Table_H(Q') procedure to form the
H (H ∈ B2051) auxiliary key.
The extended key Q is finally formed with the use of the Form_Key procedure;
namely, Q = Form_Key(Q', H), when the sequence Q' is interpreted as a combina-
tion of four 512-byte sequences (data blocks)—Q'(1), Q'(2), Q'(3), Q'(4)—and three
bytes; namely,
Q' = Q'(1)||Q'(2)||Q'(3)||Q'(4)||q'2048||q'2049||q'2050.
One of two programs of the resident module is used in the FormKey procedure;
namely, the Encrypt procedure. The latter depends on three parameters, the first
one determining the length of the data block being transformed (expressed in 32-
bit words), the second determining the transformed data block itself, and the third
determining the extended key.
Thus, the expanded encryption key Q is a sequence of 2051 bytes: Q = {q0, q1,
q2, …, q2047, q2048, q2049, q2050}.
three parameters, the first determining the length of the data block being trans-
formed (expressed in 32-bit words), the second determining the transformed data
block itself, and the third determining the extended key.
So, the length of the data block subject to transformation is determined by the
m parameter (m ≥ 4). The value of m is chosen depending on the area in which it is
used. For example, this value may be determined by the hard disk sector size, or the
size of the clipboard. In particular, for m = 128, the length of the transformed data
block (in bytes) is equal to 4m; in other words, 512 bytes.
32-bit words (subkeys) with the following appearance are used during encryption:
Qj = qj ||qj+1||qj+2||qj+3,
where j = 0, 1, …, 2047.
The Encrypt procedure includes two full and four reduced transformation
rounds (Figure 5.16). If m = 4, the full and reduced rounds are identical.
6. Transform Ti := Ti +32 N.
7. Increase the counter value: i := i + 1. If i ≠ 4, go to step 3.
8. Perform operations T0 ↔ T3 and T1 ↔ T2. Increase the counter value:
j := j + 1.
9. If j ≠ 4, go to step 2.
10. STOP.
The second item needs a little explanation. The Encrypt procedure is such that
for two data blocks T and T' that differ in the ith word (Ti ≠ T'i) the values of the R
and R' variables are different in the first round already, during the transformation
of the words Ti and T'i. In the next step, the difference between the R and R' vari-
ables generates a difference between the variables N and N' and between V and V ',
and consequently, between Ti+1 and T'i+1. Accordingly, all subsequent values of the
32-bit words Tj and T'j are different, and such a difference has an avalanche-like
character when moving on to the next words to be transformed. Transformations
of subsequent rounds propagate differences at each 32-bit word of the data being
transformed.
Thanks to the many transformation steps performed in one round, a strong
avalanche effect can be gained by performing only two full encryption rounds.
Reduced encryption rounds are aimed at implementing a strong avalanche
effect when differences occur only in the last word Tm–1.
The DDP32 operation, controlling the vector depending on the data block
being transformed, contributes much to the avalanche effect’s propagation when
the words Ti and variable V are transformed.
According to the estimations for the combinatory probabilistic model consid-
ered in Chapter 2, the security of the SPECTR-SZ cipher is no less than 2190 (295)
operations, on the condition that the attacker has a specially chosen input text with
a volume of no less than 2100 (250) bytes and corresponding ciphertext.
The option of parametrically specifying the transformed data block size en-
hances the range of practical uses of the SPECTR-SZ block cipher and makes its
universality clear.
When speaking about the prospects of the new DDP32 command, we must
mention that it can be used to create high-speed software hashing functions. The
hashing speed becomes much higher than that of the SPECTR-SZ cipher because
the hashing algorithms can be created in such a way that you need only access the
memory once. Using the DDP32 operation, you can provide a hashing speed of 1–2
Gbit/s. Just to compare: there are three memory access operations used for one
32-bit transformed word in SPECTR-SZ:
258 Innovative Cryptography, Second Edition
Since the DDP32 operation is for use in cryptographic applications, there are
objective conditions for the creation of high-speed encryption and hashing algo-
rithms that possess the necessary practical security.
Y = F(e)(X, Q(e)),
where Q(e) = H(K, e) is an extended key, and a function of the 128-bit K key and the
encryption mode e (F(0)—encryption, F(1)—decryption), when in encryption mode
X (X ∈ GF(2)32) is the incoming block of binary data (plaintext), and in decryption
mode it is the transformed block of binary data (ciphertext). In encryption mode,
the resulting value Y (Y ∈ GF(2)32) is a ciphertext, and in decryption mode, it is
plaintext.
Taking into account contemporary principles of developing block ciphers, an
extended key, Q(e) = H(K, e), should be formed using a cryptographically secure
extended key generation procedure. Actually, it is sufficient simply to create a
Designing Fast Ciphers Based on Controlled Operations 259
where i = 1, 2 and j = 1, 2, …, r.
Initially, the block X is divided into two subblocks of the same length—L0 and
R0; in other words, (L0, R0) = X, where L0, R0 ∈ GF(2)32. Then, r rounds of trans-
formations are performed using the Crypt(e) procedure according to the formulas:
After the rth round, the final transformation FT is performed over block X =
(Rr, Lr) according to the formula:
Y = FT( X, QFT
(e )
).
The final transformation FT for the algorithm COBRA-F64a looks like this:
And for the COBRA-F64b algorithm, the FT transformation looks like this:
High indices for the speed and cryptographic security of ciphers, where the
DDP32 command is used, allow us to hope that microprocessor developers will in-
clude this command in the set of standard operations of multipurpose processors.
The advantages of program ciphers were already considered in previous chapters.
Therefore, here we will just mention the feasibility of the procedure of program cipher
creation. Indeed, integration of an encryption algorithm (even a generally recognized
one) into a processor on the circuit level actually gives users no choice. Such unifica-
tion additionally stimulates potential violators to develop effective methods of crack-
ing the cipher, since, in case of success, unauthorized access to information stored in
computer systems and secured by this cipher would then be possible on a wide scale.
It is more profitable to analyze one cipher instead of ten or a hundred, right?
A software implementation of a new command (cryptographic primitive) re-
quires only minimal circuit costs and does not lead to a rise in the cost of modern-
ized processors. However, the possibility of creating a whole series of high-speed
algorithms is thus heightened. However, if an algorithm is discredited, it is very easy
to change it for another one, which is impossible with a hardware implementation.
We already mentioned that controlled bit permutations of a general type can be
used for solving other urgent information security tasks, such as developing high-
speed integrity algorithms and hashing functions. Another promising trend in the
area of applied bit permutations is their integration on a microprogramming level,
which provides minimum use of circuit resources, but retains a high speed for the
cryptographic transformations performed both for data integrity control and for
information security (hashing and encryption).
Y = F(e)(X, Q(e)),
264 Innovative Cryptography, Second Edition
where Q(e) = H(K, e) is an extended key that is a function of the 256-bit K key and
the encryption mode e (F(0)—encryption, F(1)—decryption). In encryption mode,
X is the incoming block of binary data (plaintext), and in decryption mode, it is the
transformed block of binary data (ciphertext). In encryption mode, the resulting
value Y is ciphertext, and in decryption mode, it is plaintext.
Everything that was said previously relating to the necessity of using a crypto-
graphically secure extended key generation procedure is applicable to the ciphers
considered in this section. We just need to create a pseudorandom sequence
S = Q(0)= H(K, 0) with a length depending on the number of rounds and the total
length of one round key, and the extended key Q(1) will turn out to be a permuta-
tion of the Q(0) extended key elements. This permutation is determined by the con-
structive features of the scheme, including the initial and final transformations.
You can also use the algorithms built based on controlled permutations for the ex-
tended key generation procedure.
When describing the algorithms, a case of using a key schedule that is especially
efficient for the frequent key change mode is considered.
Initial transformation—IT
r rounds (loops) of transformations using the Crypt(e) procedure
Final transformation—FT
FIGURE 5.19 The general encryption scheme (b) and one transformation round (a) in
the DDP-S64 algorithm.
Designing Fast Ciphers Based on Controlled Operations 265
Initially, block X is divided into two subblocks of the same length—Xlo and
Xhi; in other words, (Xlo, Xhi) = X, where Xlo, Xhi ∈ GF(2)32, and the IT procedure is
performed:
After the rth round, the final transformation FT is performed over block
X = (Br, Ar) according to the formula:
A := A +32 P(U ,0 ) ( B ).
V := P(U ,e ) ( A).
B := P(V ,e ) (U ).
A := V −32 Qi(1,e ) .
STOP.
The schedule of using subkeys in the DDP-S64 cipher is shown in Table 5.14.
266 Innovative Cryptography, Second Edition
FIGURE 5.20 The general encryption scheme (b) and one transformation round (a)
in the DDP-S128 algorithm.
over the subblocks A and D within one round. The superposition of controlled
( B, e) (C , e)
permutations P32 / 32 and P32 / 32 is a block of maximum order.
The DDP-S128 block cipher algorithm (Figure 5.20b) is implemented using the
following procedures:
Initial transformation—IT
r rounds (loops) of transformations with the use of Crypt(e) procedure
Final transformation—FT
(U , e )
In the Crypt(e) procedure, the controlled permutation operation P32 / 32
is des-
U,e
ignated as P( ).
Initially, block X is divided into four subblocks of the same length—
A, B, C, and D; in other words, (A, B, C, D) = X , where A, B, C D ∈ GF(2)32, and
the IT procedure is performed:
( A0 , B0 , C0 , D0 ) = IT ( A || B || C || D, QIT
(e )
)=
( A ⊕ Q1(1,e ), B ⊕ Q2(1,e ), C ⊕ Q3(1,e ), D ⊕ Q4(1,e ) ).
268 Innovative Cryptography, Second Edition
After the rth round, the final transformation FT is performed over block
X = (Br , Ar) according to the formula:
Y = FT(Br , Ar , Dr , Cr , QFT
(e )
) = (Br ⊕ Qr( 2,e ) , Ar ⊕ Qr(−21,e ) , Dr ⊕ Qr(−2,2e ) , Cr ⊕ Qr(−23,e ) ).
V := B.
A := A ⊕ (B +32 C ).
B := B +32 Qi(1,e ) .
C := P( B ,0 ) (C ).
D := D ⊕ (V +32 C ).
A := P( C ,0 ) ( A); D := P( C ,1) ( D ).
STOP.
As in the previous algorithms, the key use schedule is employed. In the jth
round (1 ≤ j ≤ r) two 32-bit subkeys are used; namely,
The extended key Q(0) = S is shown in Table 5.15, where the 32-bit keys K0,
K1, …, K7 are the subsettings of the secret key K (K = K0|| K1||…|| K7), and the values
Designing Fast Ciphers Based on Controlled Operations 269
of round keys Q j = (Q j , Q j ) for the encryption and decryption modes are de-
(e ) (1, e ) (2, e )
In the initial and final transformations of the DDP-S128 algorithm, four 32-bit
subkeys are used in each; namely,
(e )
QIT = (Q1(1,e ), Q2(1,e ), Q3(1,e ), Q4(1,e ) ), QFT
(e )
= (Qr( 2,e ), Qr(−21,e ), Qr(−2,2e ), Qr(−23,e ) ),
blocks B and C. In this case, when calculating each sum with a probability of 0.5, the
differences for blocks B and C are mutually eliminated. If the probability of this
event is designated as p2, then justifying the value p2 ≈ 2–32 can be easily done. The
difference indicated passes two rounds with a probability of p(2) = p1p2 ≈ 2–32, and
eight rounds with a probability of p(8) = p1p2 ≈ 2–128.
For 10 and 12 rounds, such probabilities have values of p(10) ≈ 2–160 and
p(12) ≈ 2–192, respectively. Thus, if the number of rounds is r ≥ 8, it is possible to
state that the DDP-S128 block cipher is secure against differential cryptanalysis.
To check the statistic properties of block algorithms, it is advised that you test them
according to the method offered by the New European Project for creating base
primitives with the purpose of future standardization (NESSIE, New European
Schemes for Signature, Integrity, and Encryption).
The average number of output bits changed when changing input bit—1
The degree of completeness—2
The degree of avalanche effect—3
The degree of strict avalanche criterion—4
The ||aij||n×m matrix reflects the dependence of the jth bit of the output vector
on the ith bit of the input vector. The degree of completeness (criterion 2) is esti-
mated by the formula:
#{( i, j ) | aij = 0}
dc = 1 −
nm
Designing Fast Ciphers Based on Controlled Operations 271
and the degree of strict avalanche criterion (Criterion 4) can be estimated using
the formula:
n m
2 aij
∑ i=1 ∑ j =1 | −1 |
dsa = 1 − N ,
nm
where N = #U = #{U}.
To obtain an accurate estimation, a complete set of samples of all U vector
values is needed. However, taking into account the integral character of these esti-
mations, in order to obtain approximated values, you need just use the Monte
Carlo method; in other words, a rather small set of samples of input values.
Criteria 1 and 3 use the ||bij||n×m distance matrix; namely,
m
∑ j =1 jbij
d1 = 1 ∑ in=1
n N
and the degree of avalanche effect (criterion 3) can be estimated by the formula:
n 1 m
∑ i=1 | ∑ 2 jb − m |
da = 1 − N j=1 ij .
nm
The next two sections contain the results of testing the SPECTR-128 block cipher.
The results of the rest of the testing algorithms are obtained in a similar manner.
5.5.2 Estimating the Influence of Incoming Text Bits on the Transformed Text
The criteria for estimating the influence of the plaintext text bits on the trans-
formed text are intended for detecting possible weak sides of an algorithm that
might be used in cryptanalysis based on a chosen plaintext, or by using the differ-
ential cryptanalysis method. For the criteria described in Section 5.5.1, we consider
the case when avalanche vector Y(i) is formed by the input vectors U = X||K and
U = X(i)||K, where X(i) = X ⊕ Ei.
272 Innovative Cryptography, Second Edition
The following values are specified as parameters: q for keys, t for incoming
texts. N = qt. The values of q and t depend on the values of n and m and the
computational resources available. The ||aij||n×m dependence matrix and the ||bij||n×m
distance matrix look like this:
Keys and incoming texts are built using a random number monitor.
For the SPECTR-128 algorithm, integral estimates both for a declared number
of rounds and for a reduced number of rounds were obtained. Similar to the test
results of the five finalists of the contest for New American Standard of block
encryption held by the USA National Institute of Standards and Technologies—the
“one key and 10,000 texts” variant was implemented, as well as “100 keys and 100
texts” (Table 5.16).
The results of testing the SPECTR-128 algorithm correspond to the test results
for the contest finalists. They prove that the given transformation algorithm pos-
sesses good scattering properties, even with a small number of rounds, and may be
treated as a good generator of pseudorandom substitutions, even with a small num-
ber of rounds. In particular, the completeness criterion, according to which “each
input bit should influence each output bit,” is implemented already after two en-
cryption rounds. For example, in the DES and GOST algorithms, this criterion is
implemented in no less than four encryption rounds, which is determined only by
the Feistel scheme used.
aij = #{ X ∈ X , K ∈K | (F ( X , K ( i ) )) j ≠ (F ( X , K )) j } ,
bij = #{ X ∈ X, K ∈K | w(F( X , K ( i ) ) ⊕ F( X , K )) = j}.
The test data for the SPECTR-128 algorithm (Table 5.17) prove that a rather
strong diffusion influence of each key bit upon all bits of the transformed text is
provided for, even without a secure procedure for generating an extended key.
We must mention that these criteria are efficient tools for detecting weak sides
in separately developed procedures and transformations, in making up the sched-
ule for using round keys, and when an optimal number of rounds are chosen.
Designing Fast Ciphers Based on Controlled Operations 273
TABLE 5.16 Values of Influence Criteria 1–4 of the Incoming Text on the Transformed
Text (for Various Numbers of Rounds)
TABLE 5.17 The Values for Criteria 1–4 on the Influence of Key Bits on Transformed
Text (for Various Numbers of Rounds)
274 Innovative Cryptography, Second Edition
Main Results
The following can be considered the main results of our discussion on designing
fast ciphers based on controlled operations.
We presented basic schemes for building universal iterated block ciphers based
on controlled operations.
We gave concrete models of block ciphers, both for a hardware and a software
implementation.
We considered the prospects of using controlled permutational and substi-
tutional operations as cryptographic primitives. In particular, we offered a new
command to processor developers, implementing a controlled permutation
operation that can be efficiently used in developing program ciphers if imple-
mented as a special instruction.
We presented specific schemes and constructions of applying one-stage con-
trolled permutation blocks not only for round key selection control, but also in
forming control vectors for inverse transformation implementation in controlled
permutation blocks of a special type.
Since block ciphers might possess only practical security (and not theoretical),
it is necessary to strictly observe their contemporary development principles.
The statistical tests described in this chapter are a well-tested tool, allowing you
to detect obvious weak sides of an algorithm.
The second task, cipher security estimation, is usually done by the developer.
As a rule, the conditions for solving the first task are less pleasant than those of the
second task. The latter, however, is no less complicated, since the cipher developer
has to find the lowest security level for the cipher being developed for each crypt-
analysis method he knows, including methods that are currently impossible to im-
plement but that are theoretically justified. The cryptosystem developer tries to
obtain an estimation corresponding to the minimal number of operations needed
to solve a cryptanalysis task using the best cryptanalysis algorithm. Since it is not al-
ways possible to determine the best cryptanalysis algorithm, a minimum estimation
is given to the best of the known cryptanalysis algorithms. The developer can also
estimate the cipher’s security as the labor expenditure needed to determine how it
is different from a random cipher.
Thus, the estimations gained in the course of solving the first task should be
higher than those gained in the course of solving the second task. In practice, how-
ever, this condition is not always observed, since much depends on the subjective
conditions of solving each task.
During cryptanalysis, it is usually assumed that the integrity of the encryption
device is sufficient when the algorithm is not modified during the encryption
process, and the violator has no way to read the key information from any kind of
leakage (feed circuit inducing, side electromagnetic radiations, computation time
measurement, machine errors, etc.). Lately, however, attacks on encryption device
integrity are considered more often. This is due to the expanding application of en-
cryption, in which these devices are used to solve various tasks in various operating
conditions. Be aware that the cryptographic analysis of special purpose ciphers
always used to include the study of the violation of the encryption device’s in-
tegrity. The active study of such forms of attack started when encryption began to
be widely used as an element of information security in computer-aided systems.
Estimating the security of flexible ciphers—those where the use of a concrete
cryptalgorithm is determined by the secret key—is of special interest. Note that in
this type of cipher, the Kerckhoff principle, according to which the only unknown el-
ement is the secret key, can be implemented by using pre-computations that include
a building procedure for the encryption algorithm that depends on the user’s secret
key. In this case, a concrete encryption algorithm is an easily changeable element. It
is automatically changed when the secret key is changed. If the number of possible
modifications of the cryptalgorithm is large (e.g., 1020), then it is rather difficult to
analyze each of them. Therefore, when flexible ciphers are built, a base mechanism
is developed in which certain principles that determine the general properties of all
modifications are fixed. As a rule, the developer estimates the level of security for a
limited set of algorithms by assuming that the cryptanalyst knows the particular
modification. To obtain the lowest security level of a cipher, it is advisable to find the
same estimate for the “weakest” modification. Another important way to analyze
Designing Fast Ciphers Based on Controlled Operations 277
flexible algorithms assumes that the encryption key is known, with only the cryptal-
gorithm modification remaining unknown. It makes sense to only use flexible ci-
phers with high security against all variants of cryptanalysis mentioned previously.
The confidentiality of the cryptalgorithm modification in flexible ciphers
should not be treated as the main factor of high security, but rather as a mechanism
to determine the additional security reserve. Indeed, if a cryptanalyst does not know
the modification of the cryptalgorithm, the cryptographic task will be considerably
more complex.
The universal method of cryptanalyzing flexible ciphers is by keyless reading and
trying the entire possible key space. These methods do not require knowledge of the
concrete modification of a cryptalgorithm, but the first one is efficient only when de-
crypting relatively weak ciphers, and the second one when using small keys.
For the flexible program ciphers described in Chapter 2, using these universal
methods does not allow you to actually decrypt a cryptoscheme. Using more effi-
cient methods based on the availability of statistical mechanisms in the samplings
gained during studies of certain transformations requires much more labor expen-
diture if the modification of a cryptalgorithm is unknown, compared to the labor
needed to decrypt well known transformation procedures.
To gain the minimal security estimation for ciphers based on the data-dependent
subkey selection, the combinatory-probabilistic model was introduced. This model
and methods of its use were described in Chapter 2 when estimating the security of
some software-oriented 512-byte algorithms. The reason for using this model to get
the minimal security estimation is that one encryption round includes a large num-
ber of operations (128k, where k = 2, 4, 6), where at least half are performed in com-
plex dependence on each bit of the plaintext and each bit of the secret key. The
selected keys are not used directly in the transformation of the current data subblock,
but rather are elements of the procedure for forming accumulating key variables.
These variables are transformed within one round in concatenation mode,
which determines the influence of the current (including the initial) value of each
of these variables upon all its subsequent values. The concatenation method ex-
plains the inclusion of each accumulating variable in the transformation and, con-
sequently, in the transformation of each data subblock—long chains of subkeys
selected pseudorandomly. Trying to compute such chains based on source and
transformed texts using algebraic relationships leads to the formation of a nonlin-
ear boolean equation system with many unknowns, which is very hard to solve.
Generating equations that can be solved using reasonable computing resources
necessitates the inclusion of some pseudorandom values of accumulating variables
in such equations. Assuming some pseudorandom parameters in the relationships
used for cryptanalysis is generally done for many statistical types of attacks, includ-
ing both linear and differential methods recognized as the most general and effi-
cient methods used in block cryptosystem analysis. Currently, except for the
278 Innovative Cryptography, Second Edition
ciphers in this chapter that two permutation operations are normally used in one
encryption round, these operations depending on the data being transformed and
their superposition forming a permutation of the maximal order. The active then
bits become arbitrary. This is the reason why increasing the number of active bits
leads to a considerable reduction in the probability of obtaining the expected dif-
ference at the outcome of one round. This is shown in the DC of specific ciphers
earlier in this chapter.
It is rather easy to establish the main differential characteristics of an elemen-
tary box P2/1, which have nonzero probabilities. These characteristics are shown in
Figure 5.21, where the superscript of a difference Δ indicates its correspondence to
input (x), output (y), or control input (v), and the subscript indicates the number
of nonzero bits in the difference. Using these properties of an elementary switch
that is the base element of more complex boxes of controlled permutations, and
taking into account the bit distribution of the control data subblock, it is easy to
compute the probabilities of differential characteristics for the most important
types of controlled permutation boxes.
Let’s consider a case of using expansion box E, which provides for the influence
of each bit of control data subblock L on q (q = 2, 3) different bits at output E, and
the strictly one-time influence of each control bit on all input bits of the controlled
permutations box.
The general scheme shown in Figure 5.22 can contain boxes P16/32 (q = 2), P32/96
(q = 3), or P64/192 (q = 3) as box Pn/m. Designate the number of nonzero bits of the
Designing Fast Ciphers Based on Controlled Operations 281
difference going through the control data subblock L as z, and the number of ele-
mentary events related to the generation of a pair of active bits in an elementary box
P2/1, whose control input is fed with a nonzero difference (Figure 5.22c), as w.
These P2/1 boxes will be called active.
If the input of an expansion box is fed with the difference Δ1L with one active
bit, then the difference ΔVq with q active bits appears at the control input of the
controlled permutations box. If a zero difference Δ0X is fed to the input of the
controlled permutations box, then—depending on the specific bit values entering
the inputs of the elementary switches corresponding to active bits of difference ΔVq
—a zero difference ΔY0 or a nonzero difference ΔY2w (w ≤ q) with an even number
of active bits may occur at the output of the controlled permutations box. Taking
into account the probability of a zero difference transformation while passing
through an active elementary switch P2/1, it is easy to get the following formula:
qz
p( Δ 2X → ΔY0 / Δ zL ) ≈ 21−qz
n( n − 1)
This formula is derived for the case of averaging all possible values of the
number of active bits i and j of the input difference Δ 2|X i , j (assuming that both
i and j are random equiprobable values). The considered mechanism of active bit
“annihilation” proves that the simultaneous zeroing of two and more pairs of active
bits has a considerably smaller probability. Some values of the probability
p( Δ X → ΔY / Δ zL ) are shown in Tables 5.18 and 5.19.
X Y L
TABLE 5.18 Probability Values p( Δ → Δ / Δ1 ) for the P64/192 Box
It is worth mentioning that the preceding formulas for computing the proba-
bility for events related to either class of differences and that are characterized
mainly by different Hamming weights provide integral estimations within a rather
large class of differences. If additional active bits are generated, then there is no
binding of active bits to specific numbers of bits. However “annihilation” includes
the binding of the second bit to a specific position because it is the fact of two ac-
tive bits going to the input of the same active elementary switch that is considered.
Assuming that the previous estimations are correct for both direct and inverse layered
284 Innovative Cryptography, Second Edition
tion is implemented), the total number of active bits can increase (up to 18), and
can decrease (to 0).
Because we are interested in a situation where a zero difference (the absence of
the active bits’ “propagation”) is implemented at the output of box P32−1/ 80 , a case in
which the number of such active bits after the XOR operation is performed is equal
either to zero or two is of the greatest interest for us. It is for these probability val-
−1
ues that the probabilities of obtaining a zero difference at the output of box P32 / 80
are especially important.
These arguments enable us to form the two-round differential characteristic
shown in Figure 5.23 with the use of the following designations:
ΔL and ΔR—the difference in the left (L) and right (R) subblock
ΔF and Δ(F)—the input and output differences that correspond to the F operation
Δ(2G|i ,)i+1 —the difference with a subscript indicating: the total number of active
bits first and, after the vertical line, the numbers of active bits
With such a designation, the Δ2|i,j and Δ2 entries have the following meaning:
the first one designates a specific difference with two active bits, and the second
indicates only one of the differences with two active bits.
Taking into account the design philosophy of the P32/80 box, used in one round
of the SPECTR-H64 cipher, the li active bits of data subblock L control a different
number of P2/1 boxes, depending on the i ordinal number and on the L data sub-
block’s cycle shift value before the expansion procedure is performed. The number
of P2/1 boxes controlled by one bit li will be designated as q.
Figure 5.23 shows the main variants of one active bit passing in the ith order of
the left arm without generating active bits at the output of box P''.
Event A1
1. The difference Δ(2G|i ,)i+1 is formed at the output of operation G with a proba-
bility of p2(i ).
2. The difference Δ(2P|i ,')i+1 is formed at the output of box P' with a probability of
p3( i , i+1) .
3. The difference Δ(0P′′ ) is formed at the output of box P'' with a probability of
p1( i ) = 2− q .
4. After two XOR operations are performed, a zero difference is formed at the
input of box P , passing through this box with a probability of p4( i ) = 2− q.
–1
Event A2
(G)
1. The difference Δ 2|i ,i+1 is formed at the output of operation G with a proba-
bility of p2(i ) .
286 Innovative Cryptography, Second Edition
2. The difference Δ(0P ') is formed at the output of box P' with a probability of
p3( i ) = 2− q .
′′
3. The difference Δ(2P|i ,i+) 1 is formed at the output of box P'' with a probability
( i , i+1)
of p1 .
4. After two XOR operations are performed, a zero difference is formed at the
input of box P–1, passing through this box with a probability of p4( i ) = 2− q .
Event A3
1. The difference Δ(2G|i ,)i+1 is formed at the output of operation G with a proba-
bility of p2(i ).
2. The difference Δ(0P ') is formed at the output of box P' with a probability of
p3(i ) .
3. The difference Δ(0P ') is formed at the output of box P'' with a probability of
p1( i ) .
4. After two XOR operations are performed, the D2|i,i+1 difference is formed
at the input of box P–1 that is zeroed in this box with a probability of p4( i , i+1).
where ai and bi are subkey bits. From this last relationship, it is easy to derive the
following formulas that characterize the changes in the yi, yi+1, yi+2, yi+3, yi+4, yi+5
output bits, stipulated by changing the single input bit xi (Δxi = 1); namely,
and for k = 2, 3, 4, 5:
Then, assuming that subkeys A and B are random equiprobable values, the
value of p2(i ) is determined by the formula:
pi2 = p(Δyi = 1/Δxi = 1) p(Δyi+1 = 1/Δxi = 1) p(Δyi+2 = 0/Δxi = 1) ... p(Δyi+5 = 0/Δxi = 1).
In the formula, you must take into account the limits on the maximum possible val-
ues of the indices i and i + k of the co-factors with Δyi+k, which should not exceed 32.
The p2(i ) probabilities for various values of the i index are set forth here:
p2( i ) = 0 for i = 1, 2 because in these cases no less than three active bits are
formed in the output difference.
p2( i ) = 2−4 for 3 ≤ i ≤ 27; this value, derived by the multiplication of all six
co-factors, is present in the preceding formula.
288 Innovative Cryptography, Second Edition
To compute the probability of event A1, we can use the table of the influence
distribution of the L subblock’s bits on the elementary switches of box P'. Such a
table can be easily created from the description of the SPECTR-H64 algorithm
(Table 5.20), where cells mean P2/1 boxes, and the numbers in them (i) mean the
numbers of the corresponding bits in subblock L.
TABLE 5.20 The Distribution of the Influence of Control Subblock L Bits in the P' Box
Using this table, you can determine all values of i for which the difference
Δ(2P|i ,′i+
)
1
can appear at the output of box P', and also determine the value of the prob-
ability of this event; namely,
For example, at i = 28, the elementary boxes P2(1/1) , P2(/321 ) , and P2(/441 ) are active,
and at the output of each of them with a probability of 0.5 a pair of active bits can
appear (the superscript in designation P2(/j1) corresponds to the elementary box
number). Only for box P2(1/1) can an output pair of active bits simultaneously enter
into orders i and i + 1.
We are interested in the case of active bits appearing at the output of P2(1/1) , with
the simultaneous absence of active bits at the outputs of P2(/321 ) and P2(/441 ) . The prob-
ability of this event is equal to p3( i , i+1) = 2−32−4 2−4 = 2−11, since the left and the right
output bits of box P2(1/1) will fall at the 28th and 29th bits, respectively, at the output
of box P' with a probability of 2–4.
Designing Fast Ciphers Based on Controlled Operations 289
Altogether, four bits of the left subblock (numbers 4, 8, 18, and 28) satisfy the
situation described previously. For i = 4, 8, and 28, we have the probabilities
p3( 4, 5) = p3(8, 9 ) = p3( 28, 29 ) = 2−11 , and for i = 18, we have a probability of p3(18,19 ) = 2−4 .
Note that the order i = 18 contributes the most in forming the value of the proba-
bility of the A1 event.
The probability of the difference Δ1R falling at the specified ith bit at the output
of the first round is equal to p(i) = 2–5. The probability that no active bits in digits
i + 2, i + 3, i + 4, i + 5 will be formed at the output of the G function (for 3 ≤ i ≤ 27
and averaging by random round keys) is equal to p2( i ) = 2−4. Accordingly, for i = 28,
p2( 28,29 ) = 2−3.Thus, we have the following integrated probability for the A1 event:
i=32
P ' = ∑ p ( i ) p1( i ) p2( i ) p3( i ,i+1) p4( i ) = ∑ p ( i ) p1( i ) p2( i ) p3( i ,i+1) p4( i ) ≈ 2−17.
i=1 i = 4 ,8,18,28
The predominant contribution to the value of P' is made by the 18th bit in the
left subblock, for which the probability values are higher— p1(18) , p4(18), and p3(18, 19 )
( p1(18) = p4(18) = 2−2 , and p3(18, 19 ) = 2−4).
In the A1 event, for all values of i, we have p1( i ) = 2−3, and for events A1 and A2,
we have p ( i ) = 2−5 and p4( i ) = 2−3.
–1
With respect to the full symmetry of the direct (P') and inverse (P ) controlled
permutations transforming the right data subblock in one round of the SPECTR-
H64 cipher, the probabilities of the A1 and A3 events are the same; that is:
P'''=P' ≈ 2–17.
Assuming that the key element at the input of box P'' is an equiprobable ran-
dom value, it is easy to compute the probability of the A2 event using the following
formula, which is similar to the previous one:
i =32
P′′ = ∑ p ( i ) p1( i ,i+1) p2( i ) p3( i ) p4( i ) = ∑ p ( i ) p1( i ,i+1) p2( i ) p3( i ) p4( i ) ≈ 2−15.
i =1 i= 4 ,8,12 ,16 ,21
In the A2 event, for all values of i, we have p3(i) = 2–3. However, when p1( i , i+1) val-
ues are computed, Table 6.4 should be used instead of Table 5.21. Because before
the left subblock enters the E expansion box, it is subject to transformation by a
cycle shift operation not by 11, but by 17 bits. The predominant contribution to the
value of the probability of P'' is made by the 21st order, for which p1( 21,22 ) = 2−2 and
p3( 21) = p4( 21) = 2−2 .
Thus, the probability of the difference (0, Δ1R) passing through two rounds is
equal to P(2) ≈ P' + P'' + P''' ≈ 1.5 ⋅ 2–15.
290 Innovative Cryptography, Second Edition
TABLE 5.21 The Distribution of the Influence of Control Subblock L Bits in the P" Box
In this value of P(2), the contribution of the events corresponding to the ap-
pearance of four or six active bits in the output difference of the G function is not
taken into account, nor are the events with two active bits leading to the simultane-
′
ous formation of three differences Δ(2G|i ,)i+1 , Δ(2|Pi , )z , and Δ(2P|i+''1), z that meet the condition:
difference of Δ132G
|
is performed. In the third round, also with a probability of 2–9,
three controlled permutation operations will not generate new active bits. Taking
into account the given scheme of the ( Δ0L , Δ1R ) difference’s distribution in three
rounds, we have the following probability value for it: P(3) ≈ 2–28 (the “approxi-
mately equal” symbol takes into account the fact that we neglect the contribution of
events where intermediary differences with several active bits in the right subblock
are formed). Accordingly, for six rounds, the probability of the ( Δ0L , Δ1R ) difference
passing with the given three-round characteristic is equal to P''(6) ≈ (2–28)2 = 2–56,
and with the two-round characteristic, it is P'(6) ≈ (1.5 × 2–15)3 ≈ 1.7 × 2–44 >> P''(6).
Thus, when a six-round characteristic with one active bit is formed, a two-round
characteristic is more efficient for analyzing the SPECTR-H64 encryption algorithm.
It is possible to derive the following probability values using a two-round char-
acteristic for building differential characteristics with an even number of rounds:
a small number of active bits also have the largest probabilities. The largest proba-
bility has a characteristic corresponding to the difference ( Δ0L , Δ1R ) passing through
two rounds. The mechanism of its distribution is analogous to that of SPECTR-
H64. However, due to the peculiarities of the G operation and the bigger size of the
subblocks being transformed, computations are more intricate. When differential
cryptanalysis is performed, you must take account of the fact that, if only one input
bit of the G operation is changed, one bit will be surely changed at its output, cor-
responding to the same order as the changed input bit. Besides which, six more bits
can be changed with a probability of 0.5. The main variants of a two-round char-
acteristic formation are connected with the appearance of the differences Δ(2G|i ,)i+1,
Δ(2G|i ,)i+3 , Δ(2G|i ,)i+6 , Δ(2G|i ,)i+7 , Δ(2G|i ,)i+8 , and Δ(2G|i ,)i+9 at the output of the G operation. Each of
these differences contributes to the value of the probability of the two-round char-
acteristic. This contribution is computed in a manner similar to that used in the
SPECTR-H64 algorithm for the specified i, and when an output difference Δ(2G|i ,)i+1
with two active bits is considered. The possibility of the appearance of different dif-
ferences at the output of the G operation can be taken into account in events A1,
A2, and A3, which is done here. Using the dependence of the output bits values ex-
pressed as a boolean function, it is easy to derive formulas expressing the changes
in the output bits having numbers i + k, where k = 0, 1, 2, … , 9 (Table 5.22).
Let’s consider events A1, A2, and A3 (Figure 5.24) for SPECTR-128.
TABLE 5.22 The Probability of Active Bit Generation at the Output of the G Operation in
the (i + k)th Order, When the ith Input Bit Is Changed
Designing Fast Ciphers Based on Controlled Operations 293
Event A1
1. The difference Δ(2|Gi ,)i+ k is formed at the output of operation G with a prob-
ability of p2(i ,i+ k ) , where k∈{1, 3, 6, 7, 8, 9}.
2. The difference Δ(2|Pi ,′i)+ k is formed at the output of box P' with a probability
of p3(i , i+ k ) .
3. The difference Δ(0P'' ) is formed at the output of box P'' with a probability of
p1( i ) = 2−3 .
4. After two XOR operations are performed, a zero difference is formed at the
input of box P64−1/192 , passing through this box with a probability of
p4( i ) = 2−3.
Event A2
1. The difference Δ(2|Gi ,)i+ k is formed at the output of operation G with a prob-
ability of p2(i ,i+ k ) .
2. The difference Δ(0P' ) is formed at the output of box P' with a probability of
p3( i ) = 2−3 .
3. The difference Δ(2|P''i ,i+) k is formed at the output of box P'' with a probability
of p1( i , i+ k ) .
294 Innovative Cryptography, Second Edition
4. After two XOR operations are performed, a zero difference is formed at the
−1
input of box P64 /192 , passing through this box with a probability of
(i) −3
p4 = 2 .
Event A3
1. The difference Δ(2|Gi ,)i+ k is formed at the output of operation G with a prob-
ability of p2(i ,i+ k ) .
2. The difference Δ(0P' ) is formed at the output of box P' with a probability of
p3( i ) = 2−3.
3. The difference Δ(0P'' ) is formed at the output of box P'' with a probability of
p1( i ) = 2−3.
4. After two XOR operations are performed, the Δ2|i,i+k difference is formed at
the input of box P–1, which is zeroed in this box with a probability of p4(i , i+ k ).
As in the case with the SPECTR-H64 algorithm, due to the symmetry of events
A1 and A3, they have the same probabilities. Therefore, it will suffice to determine
probabilities of events A1 and A2.
Using the description of the SPECTR-128 algorithm to compute events A1 and
A2, we will compile the tables of the distribution of the left subblock bits in control
of the elementary switches of boxes P' and P'' (Tables 5.23 and 5.24).
TABLE 5.23 Distribution of Subblock L Bits in the P' Box of the SPECTR-128 Cipher
Designing Fast Ciphers Based on Controlled Operations 295
TABLE 5.24 Distribution of Subblock L Bits in the P'' Box of the SPECTR-128 Cipher
where p(i) = 2–6 is the probability of the transition of the active bit of the difference
into the ith order after the first round. Using the structure of box P64−1/192 and Tables
5.23 and 5.24, it is easy to determine the probability values included in this sum. In
addition, the variant corresponding to the active bit in the 43rd order of the left
subblock, for which the probability is p3( 43,44 ) = 2−3 (about 70 percent of the value of
P') contributes the most to the probability value. About 15 percent fall on numbers
i = 33 and 34, for which p3( 33,39 ) = p3( 33,40 ) . The remaining share falls on values where
i = 3, 7, 8, 11, 12, 15, 16, 20, and 54.
The probability of event A2 is computed by the formula:
64 9
P′′ = ∑∑ p (i)
p1( i ,i+ k ) p2( i ,i+ k ) p3( i ) p4( i ) ≈ 1.3 ⋅ 2−21.
i=1 k =1
The cases where i = 54 and 57 ( p1(54,55) = p1(57 ,60 ) = 2−5 ), and i = 9, 10, 11, 44
= p1( 9,16 ) = p1(10,13) = p1(10,16 ) = p1(11,14 ) = p1( 44,45) = p1( 44,47 ) = 2−7 ), are the main
( p1( 9,15)
contributors to the probability of P". The probability of the difference ( Δ0L , Δ1R )
passing through two rounds is P(2) ≈ P' + P'' + P''' ≈ 1.1 × 2–19.
296 Innovative Cryptography, Second Edition
p = 2–6 for i = 1, 2, …, 55
p = 2–5 for i = 56
p = 2–4 for i = 57
p = 2–3 for i = 58
p = 2–2 for i = 59, 60, 61
p = 2–1 for i = 62, 63
p = 1 for i = 64
In the second and third rounds, one active bit is distributed in the left arm. In
each of these rounds, the probability of nongeneration of the active bit pairs at the
outputs of three controlled permutation boxes is 2–9. In addition, in the second
round, an active bit in the right subblock is generated because of the G operation.
In the third round, the active bit of the right branch is zeroed by the active bit of the
difference Δ1|(Gh ) with a probability of 2–6 (this is the probability of shifting the right
subblock’s active bit to the specified hth order by the operation P64/192). With re-
spect to these remarks, it easy to have P(3) ≈ 2–32.
The contribution of the three-round characteristic to the probability of the dif-
ference ( Δ0L , Δ1R ) passing through six rounds is P''(6) < (2–32)2 = 2–64. The two-
round characteristic contribution is P'(6) ≈ (1.1⋅2–19)3 ≈ 1.3⋅2–57 >> P''(6). Thus,
when the security of the SPECTR-128 cipher is determined, a two-round charac-
teristic is more efficient.
It is possible to derive the following probabilities using the value of the proba-
bility P(2):
of the ( Δ0L , Δ1R ) output difference is approximately equal to 2–113. Therefore, with
the use of the ( Δ0L , Δ1R ) difference considered here, it is possible to distinguish the
SPECTR-128 cipher from a random one. However, you will have to perform an un-
realizable number of encryption operations with 128-bit data blocks. For example,
for the 10-round variant of the SPECTR-128 cipher, it would be necessary to per-
form more than 294 encryption operations with 128-bit data blocks.
This cipher can be reinforced either by adding two supplementary encryption
rounds, or by optimizing the E expansion box and the G operation. The second
variant enables you to reduce the value of P(2) down to a value of 2–25.
Differential cryptanalysis of the SPECTR-H64 and SPECTR-128 ciphers is one
of the steps in designing ciphers based on controlled operations. Depending on the
differential characteristic values obtained and the peculiarities of difference distri-
bution revealed, this step requires amendments aimed at improving the considered
characteristics, after which a differential cryptanalysis should be performed again.
TABLE 5.25 Bit Distribution at the Output of the Expansion Box (the Numbers of Bits
and of the Binary Vector Entering Expansion Box E’s Input Are Indicated)
respectively.
Event C includes the occurrence of two active bits with numbers i and t (or i + k
–1
and t) at the input of box P , and the “annihilation” of this pair of active bits in one
–1
of three active elementary P2/1 boxes within box P .
300 Innovative Cryptography, Second Edition
Since Event C is “symmetric” to Event B, then P' = P(C) = P(B) = P''. That is,
the contribution of Events B and C to the probability of the two-round character-
istic P(2) is the same.
The derived value does not exceed the probability value of the specified occur-
rence of the difference for a random cipher, and so the application of the consid-
Designing Fast Ciphers Based on Controlled Operations 301
is completed with the permutation of subblocks Δ1A and Δ1B that form an output
difference that coincides with the input one.
In this mechanism, one of the active bits is subjected to arithmetic operations
four times. The active bit passes through each of these operations without forming
a carry bit with a probability ≈ 2–1. When four controlled permutation operations
are performed, the control input of the corresponding controlled permutation box
is fed with one active bit. The probability that no active bits are generated during
the performance of one controlled permutation operation is approximately equal
to 2–3 (the fact that a nonzero difference passes through the controlled permutation
box is considered). In addition, taking into account the probabilities of all these
events related to passing the difference through one round, we compute the prob-
ability of the one-round characteristic:
The two-round characteristic ( Δ1A , Δ0B ) is more efficient, and this should be
remembered when the number of encryption rounds is selected in order to obtain
a pseudorandom transformation. The scheme of this difference passing through
two rounds is shown in Figure 5.27.
Designing Fast Ciphers Based on Controlled Operations 303
The algorithm of this difference passing through two rounds goes like this:
1. An active bit of the left subblock generates an active bit in the right one in the
end of the first round when a modulo 232 subtraction operation is performed.
2. Then, the difference ( Δ1A , Δ1B ) enters the input of the second round.
3. At the start of the second round, the active bit of the left subblock is zeroed
after the modulo 232 addition operation is performed.
4. A zero difference is distributed around the left branch of the second round.
In the first round, the active bit is subjected to three arithmetic operations, and
influences the performance of two controlled permutation operations, which de-
termines the formation of the probability of the difference ( Δ1A , Δ1B ) at the output
of the first round as equal to P' ≈ (2–1)3⋅(2–3)2 = 2–9. In the second round, three
arithmetic operations are performed with the participation of the active bits. In ad-
dition, two controlled permutation operations are performed with one active bit
available at the control input. This determines the probability P'' of the formation
of difference ( Δ1A , Δ0B ) at the output of the second round:
304 Innovative Cryptography, Second Edition
With a probability equal to 1, the differences Δ1A and Δ1D pass through the first
round and, after the subblocks are permuted, turn to the differences Δ1B and Δ1C ,
respectively. Thus, the input difference of the first round, ( Δ1A , Δ0B , Δ0C , Δ1D ), with a
probability equal to 1 is transformed into the input difference ( Δ0A , Δ1B , Δ1C , Δ0D ) of
the second round. In the second round, two internal subblocks with one active bit
are summed up twice by module 2–32 at different stages in the transformation of
subblocks B and C.
When each addition operation is performed, an output difference with a prob-
ability of 2–6 will not contain active bits, since with a probability of 2–5, the active
bits in different subblocks turn out to have the same number, and no carry bit is
generated with a probability of 2–1. In this case, XOR operations performed over
A D
subblocks A and D do not add active bits in the differences Δ and Δ .
In addition, each of the active bits participates in the performance of three dif-
ferent controlled permutation operations. In other words, you must consider six
independent events, each consisting of the fact that no pair of active bits with an
approximate probability of 2–3 is generated in the corresponding controlled per-
mutation boxes. It is also necessary to take into account the fact that each of two
operations of summing the internal sub boxes with round subkeys with a proba-
bility close to 2–1 generates no additional active bit (due to the carry bit).
Taking into account all these elementary events related to the mechanism of two-
round characteristic formation, we can derive the following value for its probability:
Determine the number of rounds for which the DDP-S128 cipher is indistin-
guishable from a random transformation during differential analysis. To do this,
r/2
use the relationship 2–128 ≥ P (2) ≈ 2–16r, from which it follows that r ≥ 8.
Summing up the results of the differential cryptanalysis of several ciphers based
on controlled permutation, the following common property becomes evident. An ac-
tive bit entering the input of the controlled permutation operation does not con-
tribute to the avalanche effect. The property of the avalanche effect being introduced
by a controlled permutation operation is related to the availability of active bits in the
subblocks used for forming control vectors. At the same time, if you consider not the
bits of the differences, but rather the data bits, it is easy to see that each bit at the input
of controlled permutation box influences all the input bits of this operation.
It is necessary to find such characteristics when intermediary differences also have the
minimal number of active bits in their formation schemes. Indeed, the availability of
one active bit at the control input of a controlled permutation box gives a multiplier
of 2–3 in an expression for the probability, while the availability of one active bit at the
input of the controlled permutation box gives a multiplier of 2–5 when an event related
to its transition into the specified digit is expected (this is needed to zero a pair of ac-
tive bits when addition operations are performed; otherwise, the number of active bits
will be increased avalanche-like). You can build characteristics for the COBRA-F64a
and COBRA-F64b algorithms in which all intermediary differences contain no more
than one active bit in the left and right subblock. Obviously, such characteristics pos-
sess a maximum probability.
The formation schemes for the differential characteristics of the COBRA-F64a
and COBRA-F64b ciphers are shown in Figure 5.29. In both ciphers, the most effi-
cient characteristics are related to the difference ( Δ0L , Δ1R ) passing through two or
three rounds. In one round of the COBRA-F64a cipher, the active bit of difference
is carried once from the right branch into the left one when the XOR operation is
performed. Therefore, to return to the initial difference in the COBRA-F64a cryp-
toscheme, you must perform three rounds, where the second round is related to the
event of the right and left subblocks’ active bits entering into the same digit.
These examples demonstrate that, for different variants, the ratio of the resul-
tant probability values for the whole cipher may be 26. This circumstance is worth
noting when the minimal number of rounds is selected with the purpose of accel-
erating the encryption procedure.
From the COBRA-F64b two-round characteristic formation scheme where the
input difference ( Δ0L , Δ1R ) is used, it is easy to see that probability of the formation
of the difference ( Δ1L , Δ0R ) at the second round input is equal to:
This probability is determined by the active bit passing through the subtraction
operation of the first round and the generation of one active bit in the left branch
(co-factor ≈ 2–1), the coincidence of the order numbers corresponding to the active
bits of the right and left subblocks (co-factor 2–5), and the active bits passing
through the addition operation in the left branch leading to the zeroing of the active
bit in the left subblock (co-factor 2–1).
L R
When the difference ( Δ1 , Δ0 ) passes through the second round (including the
swapping data subblocks), it is transformed into the difference ( Δ0L , Δ1R ) , with a
probability of P'' = P{( Δ1L , Δ0R ) → ( Δ0L , Δ1R )} = 2−5 . The probability of the two-
round characteristic is equal to:
L R
P( r ) = P{( Δ132
|
, Δ132
|
) → ( Δ1L , Δ0R )} = 2−6 r +5 for an even r
L R
P( r ) = P{( Δ132
|
, Δ132
|
) → ( Δ1L , Δ0R )} = 2−6( r −1) for an odd r
From the condition P(r) ≤ 2–64, the minimal recommended number of encryp-
tion rounds for the COBRA-F64b algorithm is: rmin = 12. If r ≥ rmin, the transfor-
mation specified by this algorithm is indistinguishable from a random one.
Table 5.26 is the summary table of the differential properties of the considered
algorithms.
The differential cryptanalysis performed is part of the complex investigations
carried out during cipher design with the purpose of optimizing certain primitives,
and substantiating its cryptographic security.
TABLE 5.26 Comparative Data for Differential Characteristics of Block Ciphers Based on
Controlled Operations
* Modified variant.
** Contribution of the characteristic to the probability of the difference passing through r rounds.
1. First, the general criteria for the table’s compilation are formulated.
2. The differential characteristics are computed, and as a result, the numbers
of the most contributing bits are determined.
310 Innovative Cryptography, Second Edition
Thus, to complete the differential analysis of the considered ciphers, the last
three items should be performed. It may turn out, however, that the experimental
probability values considerably exceed the theoretical values. This would mean that
certain mechanisms that make a considerable contribution are not taken into ac-
count in the characteristic formation models.
There is no doubt that an enterprising reader will be able to complete on his
own the differential analysis cycle and find the necessary refinements of the previ-
ous models used to estimate the security of the SPECTR-H64, SPECTR-128,
COBRA-F64a, COBRA-F64, DDP-S64, and DDP-S128 ciphers.
in order to cause hardware faults, and compare the resulting output data with those
we obtained without faults. The cryptanalyst may feed the input specially selected
texts. It is assumed that access to the memory area containing the key parameters
and the encryption algorithm cannot be realized without their being erased. This
assumption is based on the fact that modern technology enables us to produce mi-
croelectronic devices with a secure memory. Thus, the cryptanalyst may have an en-
cryption device with the entered secret key, but cannot decrypt it. Neither can he
make intentional amendments to the encryption algorithm.
The intensity level of the external action (e.g., heating, high frequency, or ion-
izing radiation) the cryptanalyst uses with the encryption device is such that it
causes one or more individual errors in the microprocessor registers during the en-
cryption of one data block. It is impossible to specify the place where the error will
be generated beforehand, but after many experiments, errors of specified types will
occur in some of them; for example, the inversion of one of the register’s binary
digits after the ith encryption round is completed and before the (i + 1)th one.
Therefore, an expected error is characterized by both spatial and physical localiza-
tion. For many known ciphers, there is the option of recognizing the experiments
where the expected event occurred, which consists of trying input blocks with a spe-
cial structure and analyzing the differences in the output block structure caused by
errors. The computational complexity of this recognition may vary within a wide
range, and depends on the specific encryption mechanism. In some ciphers, many
errors are recognized trivially.
Hardware faults during encryption may be divided into two main types:
Actually, errors of the second type may lead to the formation of the encryption
key at the encryption device output, but the probability of events occurring in which
the executable code after a random modification corresponds to an application use-
ful for the cryptanalyst is very low. We will consider cases of error generation in the
data area. (The results of the experiments in which error generation of the second
type took place may be neglected.) For example, random errors in the 8-bit areas of
registers containing values of 32-bit subblocks being transformed may be used, and
the errors are expected during a certain stage of the encryption procedure (usually
during the execution of one or more commands of the microprocessor).
Let’s assume that experiments have helped you choose an external action in-
tensity in which, on average, one error is generated for the full encryption time of
one block. Make an approximate estimate of the average number of experiments
necessary to generate one expected error; in other words, the one occurring in the
specified register containing a data subblock, in the specified transformation stage.
312 Innovative Cryptography, Second Edition
Let’s also assume that the probability of error generation is proportional to the time
of exposure of the corresponding registers that are in a state favorable for error
occurrence and have the number of binary digits within the range of which
the error is expected. With such an assumption, it is easy to estimate the probabil-
ity of the expected error generation p within one experiment; in other words, dur-
ing the encryption of one block —p512 ≈ pd/RZ—where pd is the probability of error
generation in the data area during one data block encryption procedure, R is the
number of transformation rounds, and Z is the number of elementary transforma-
tion steps within one round. Because an error is expected during the time it takes
to perform an encryption step, the probability of the occurrence of the necessary
error is inversely proportional to the total number of encryption steps. (That is
why, for 512-bit ciphers, the value of p is considerably lower than with 64- and 128-
bit ciphers.) The cryptanalyst can use pulse radiation synchronized with the en-
cryption procedure. In this case, it is possible to use a higher radiation intensity and
a length of pulse excitation equal to the time for which the transformed data sub-
blocks are in a state favorable to the cryptanalyst.
When impulse excitation and synchronization with the encryption process are
used, the indicated probabilities may be enhanced significantly. The expected labor
expenditure employed to form a sufficient number of necessary errors does not
seem high in any of the cases. There is no basic difference among cases in which im-
pulse and stationary action are used upon the encryption device. The main thing is
that the possibility of the purposeful generation of random hardware errors in the
data registers is real. From now on, we will assume that stationary action is used on
the encryption device.
For a software implementation of a cipher as a set of standard cycle repetitions,
you must use the encryption rounds counter. This requires taking into account the
possibility of the generation of an error in the register containing the current num-
ber of performed cycles. To prevent the completion of encryption after a small
number of encryption rounds is performed (e.g., one round), the condition of ex-
iting from the cycle should be properly arranged for. The most reliable method of
preventing the pre-term completion of the encryption procedure is the repetition
of round encryption R times, even if this increases the size of the encryption appli-
cation. Let’s consider the security of some fast ciphers against this type of assault.
Provided in the RC5 cipher is the option of selecting the input block length
(2n) and a different number of encryption rounds (R). There are precomputations
used in this cryptosystem that provide for the formation of an extended key by the
secret key as a series of n-bit subkeys S0, S1, S2, ..., S2r+1.
The RC5 cipher is described by the following pseudocode:
A := A + S0 (mod 2n),
B := B + S1 (mod 2n),
for i = 1 to R do
where A and B are the left and the right n-bit data subblocks, and “W<b<“ indi-
cates a cycle shift to the left of word W by b bits. Assume that an external action’s
intensity is experimentally selected, which generates one error on average for the
full time of one data block’s encryption. After a comparatively small number of
experiments, it is possible to generate an error in the register containing subblock
A after performing the transformation using A := (A ⊕ B)<B< + S2i (mod 2n)at
i = R. The fact that an error occurred on this step is easily recognized by the block
structure of the ciphertext obtained from the given input block without entering
errors (C = A||B) and with entering errors ( C = A || B ).
It is very easy to derive the following relationship from B := [(B ⊕ A)<A<] + S2i+1
(mod 2n):
In the latter formula, the only unknown quantity is S2R+1. With a high proba-
bility, it is possible to derive A mod 25 = A mod 25. In this case, expression
A ⊕ A = {( B − S2 R+1 )> A> ⊕ ( B − S2 R+1 )> A> }mod 2 n is transformed to have the fol-
lowing appearance:
It is easy to compute the part of the subkey S2R+1 using the last relationship. You
can determine the full value of the S2R+1 subkey by forming various errors. Then, by
forming the errors in subblock B, it is possible to compute the S2R subkey after the
transformations specified by B := [(B ⊕ A)<A<] + S2i+1 (mod 2n) and corresponding
to round i = R – 1 are performed. The formation of these errors is easily recognized
with the known subkey S2R+1, which provides the cryptanalyst with the option of
314 Innovative Cryptography, Second Edition
restoring the value of subblock B after the (R – 1)th round. If you act sequentially,
this is a very good method for easily computing subkeys S2R–1, S2R–2, ..., S0. For
R = 10 ÷ 30, the labor expenditure for the computation of all subkeys does not
exceed 108 operations. Also of interest is that an attack based on the generation of
hardware errors is rather efficient for the decryption of flexible ciphers in which an
encryption algorithm is formed depending on the secret key—in other words, it is
unknown to the cryptanalyst.
XOR
Modulo 232 addition
Modulo 232 subtraction
In the precomputations stage, depending on the secret key in various encryp-
tion rounds, the independent values ci and “*j” are specified in identical positions,
which creates a large number of various modifications of the cryptalgorithm. The
abbreviation SS denotes the subkey selection procedure. The output of the SS func-
tion is the value of the 32-bit subkey that is currently selected.
Designate the intermediate values of the data subblocks being transformed as Xi,
Yj. Assume that an external action on the encryption device is selected where, on av-
erage, a single error is generated during the time of one data block encryption. To ob-
tain an error in subblocks Xi and Yj at the specified steps of transformation, the
encryption of a certain number of input blocks will be needed. Some of these blocks
may be the same. First, encrypt plaintext P1 and obtain ciphertext C10. Then, provid-
ing that there is an external action forming single errors, perform a multiple encryp-
tion of block P1. In these experiments, ciphertexts will be recorded in which, with
permanent values of subblocks ( x37 , x27 , x17 ), the value in subblock x47 is erroneous.
Designate as C11, C12, ..., C1n the ciphertexts corresponding to the first plaintext P1 and
the occurrence of a single error only in subblock x47 . Now, subkey differences can be
computed δ x7 x 7 = Qx7 *8 Qx 7 , where x47 is a subblock without errors, x47 are subblocks
4 4 4 4
containing errors (subblocks x47 are part of ciphertexts C11, C12, ..., C1n, subblock x47 is
a part of C10), and *8 is a group operation that is the reverse of operation *8 ).
According to our attack scheme, all the x47 and x47 subblocks correspond to the
same plaintext P1.
7
Designate differences where i = x47 and j = x4 as δij. If i is a fixed value, the total
number of such differences is equal to n = 255. There is no need to expect the oc-
currence of all possible values of j for a given i. To determine all the possible subkey
differences, you can use other plaintexts P2, P3, ..., Pn, and observe the ciphertexts
C20, C30, ..., Cn0 that correspond to them. Since the encryption algorithm specifies
pseudorandom values of x47 in these ciphertexts, we should take on average 256(1 +
1 1 1
2 + 3 + ... + 256 ) ≈ 1618 plaintexts to obtain all the possible values (there are 256 of
them) for subblock x 74 . Now, designate the plaintexts corresponding to various val-
ues of x47 as P1, P2, ..., P256. Encrypt each plaintext P1, P2, ..., P256 under the conditions
of the generation of n hardware errors, and obtain the sets of ciphertexts C11, C12, ...,
C1n, where l = 2, 3, ..., 256, that contain errors only in subblock x47 .
The computed differences δ i , j = Qx47 *8 Qx47 that correspond to plaintexts P2,
P3, ..., P256 will contain arbitrary pairs of index values. This enables you to use a group
property of operation “*8” and compute 256 various differences corresponding to
the same value of index i. For this purpose, use the formula δij = δik*8δkj.
It is easy to see that with a full set of values of subblock x47 , the δij = δik*8δkj re-
lationship enables us to find an i0 that provides a full set of differences δ i j , j = 0, 1,
0
316 Innovative Cryptography, Second Edition
2, ..., 255. This gives us the option of computing all subkeys by trying the values of
the Qi subkey. There are only 232 variants, which can be quickly tried. However,
0
directly trying variants by known values of the plaintext and ciphertext is impeded
by the fact that the “*1” ... “*8” and “> c1 >” ...“> c12 >” operations are unknown,
and it is necessary to find them first. This can be done in parts, using the fact that,
while guessing the correct combination of operations, the differences of the com-
puted δij subkey will depend only on the indices (i, j), and not on the incoming text.
There are 93 various combinations of operations “*8” and “> c12 >,” and so it is easy
to find the correct values of both operations that meet the previous condition.
After operations “*8” and “> c12 >” are determined, we can move on to deter-
mining the extended key. Select a value Qi . This specifies all subkeys (Q0, Q1, ...,
0
Q255), since the differences δ i j , j = 0, 1, 2, ..., 255 are already determined. When the
0
extended key is computed, and the operations “*8” and “> c12 >” are known, it is
possible to compute Y 4 (as well as subblock y44 ) for any given plaintext P, and de-
termine subkey Q y4 . Then, encrypt plaintext P for conditions of hardware error
generation, and observe ciphertext ( X 7 || Y 6 ). If the Qi subkey has been guessed
4
correctly, we will find a single error in subblock y44 , with a rather high probability.
0
If the current value Qi is false, there is a low probability of a single error occurrence
0
in subblock Y 4, since the latter will be computed using a false value of subkey Qx47 .
This fact may be used as a criterion for selecting the correct Qi value.
0
Knowing the true extended key, it is easy to determine the rest of the unknown
operations. To determine operation “*7,” generate an error in subblock y44 under the
condition of error-free ( y34 , y24 , y14 ). Such an event can be selected, since subblock Y4
can be computed with a known Y6. If “*7” is guessed correctly, then the value X6
computed with a known X7 and Q y4 is the same both with error availability, and the
4
absence of it for the same plaintext P. This is the criterion for recognizing the true
‘‘ “*7” operation independently of the value of the operations in the previous steps of
encryption. Using an analogous method, we can sequentially determine operations
“*6, ” “*5”, and so forth, until all operations in all rounds have been determined (for
a multiround DDSS-1 cryptoscheme, the attack described is connected with the last
round). Note that we do not need to perform an encryption operation with simulta-
neous error generation, since the required cases can already be found in the available
set of experimental data. These are cases that were unnecessary for the previous steps
of assault. Now they can be used because we have the option of computing previous
values of subblocks Xi and Yj. It is easily noticed that the most difficult computational
step of the attack is finding the right value of the Qi subkey, which requires, on
0
average, consideration of 231 variants. This step requires the implementation of about
≈ 232l0 operations, where l0 is the number of attempts necessary to obtain an error in
the required place. Considerably enhancing the security (e.g., up to 1030 times) against
this type of assault by increasing the value l0, means a special implementation of the
DDSS-1 algorithm. Therefore, this cipher cannot be treated as secure against an as-
sault based on the generation of hardware errors.
Designing Fast Ciphers Based on Controlled Operations 317
tions, cannot in itself provide high security against an attack based on the generation
of random hardware errors. To provide high security against such an attack, you
must use algorithms with a special transformation structure. Taking into account the
peculiarities of such an assault, we can assume that the 512-byte algorithms described
in Chapter 2 that use a more efficient mechanism of the data-dependent subkey se-
lection has a high security against assaults based on random hardware error genera-
tion. This is connected with the following features of the transformation mechanism:
The indices of the selected subkeys are not specified directly by the data sub-
blocks being transformed.
The subkeys are not directly used during the transformation of the data sub-
blocks, but serve only to modify accumulating variables.
Nondeterministic 512-byte algorithms do not allow you to perform computa-
tion of the components of individual unknown operations used in one en-
cryption round.
L ← L;
R ← F(L) ⊕ P(V)32/80(R),
where “←” stands for the assignment operation, R and L are right and left data
subgroups, F is the round function, and V is the controlling vector formed de-
pending on the left subgroup.
The advantage of the improved cryptographic scheme is increase of the paral-
lelism level of the encrypting transformations. To preserve the possibility of de-
crypting a block of ciphertext using the same algorithm that carries out the
encryption (the universality property), it is necessary to carry out an inverse con-
trolled permutation P–132/80 after superimposing the round function over the trans-
formed right block. Both aforementioned operations, P32/80 and P–132/80, are carried
out in dependence of the left data subgroup, which determines its participation in
each operation carried out within the encryption round. Despite active use of the
left data subgroup, this subgroup as such is not subject to transformation in the
course of the execution of the encryption round. Because of this, there arises the
problem of forming different values of controlling vectors for the P32/80 and P–132/80
operations. This problem consists in that in case of equality of controlling vectors,
the execution of two P32/80 and one P–132/80 operations is reduced to the execution
of one P–132/80 operation carried out over the computed value of the round function.
In the SPECTR-H64 cipher, this problem is solved by using different subkeys in ad-
dition to L when forming controlling vectors for P32/80 and P–132/80. The complete
round of the transformation appears as follows:
L ← L;
R ← F(L) ⊕ P(V)32/80(R);
R ← (P–1)(V' )32/80(R).
if there are any, and consider the possibility of their elimination. The use of relatively
large number of subkeys—six 32-bit ones—is a certain drawback of the SPECTR-
H64 cryptosystem. This implies the requirement of using key extension procedures
or relatively long secret keys—for example, the SPECTR-H64 algorithm uses 256-bit
secret key. Thus, when building ciphers based on mutually inverse blocks of con-
trolled permutations, the developer must face the specific problem of implementing
an efficient mechanism of forming various control vectors corresponding to mutu-
ally inverse blocks of controlled permutations. At the same time, it is necessary to en-
sure the properties of universality and high transformation parallelism.
To solve this problem, a method was suggested that doesn’t require the use of aux-
iliary subkeys. This method consists of the use of fixed permutations carried out over
the left and/or the right subgroup of the data. The perseverance of the universality
property of the encryption algorithm is achieved because two identical round functions
are used for such a transformation. In addition to this, the following elements are used:
This mechanism is based on that the transformation of the right branch is the
P(V)n/m • Π (e) • (P–1n/m)(V) superposition, which actually is an operating block con-
trolled by vector V and carrying out variable permutations having the structure of
the cyclic permutation Π(e).
Obviously, in this superposition intended for implementing only permutations
with the cyclic structure Π(e), the natural requirement is the equality of controlling
vectors corresponding to direct Pn/m block or to inverse block P–1n/m. In the general
case, for different values of the left subgroup (different values of the controlling data
subgroup L), different modifications of permutations with the specified cyclic struc-
ture are implemented. The advantage of this variant of the cryptoscheme design is
the possibility of using the extension block, which is implemented as a simple
branching of conductors. This allows us to economize on the hardware resources. In
addition, there is no need to use additional keys for forming various controlling vec-
tors. The possibilities of encryption and decryption using the same algorithm is en-
sured because both operations G are identical, and for the inverted fixed
–1
permutation the following condition is satisfied: Π(e=1)=(Π(e=0)) . Both in the course
of encryption and decryption, the aforementioned superposition implements per-
mutations with the specified cycle structure; for example, one-cycle permutations.
In the particular case of one-cycle permutation Π(e), the mechanism of opti-
mization consists in that the bit from the j-th position at the input of the Pn/m block
with approximately the same probability falls into all positions at the output of the
P–1n/m block, except for the j-th bit, into which it won’t fall with any value of the
controlling vector. The similar property is ensured by any permutation that does-
n’t contain loops of the length 1. To ensure approximately uniform influence of
each input bit of the P32/96 operational block to the values of all output bits of
block P–132/96, it is possible to use the invertible permutation containing only one
cycle of length 1.
For example, an invertible permutation can be implemented using a single-
layered controlled permutations block containing 32 elementary switches. The
same bit e is supplied to the controlling input of all elementary switches. The struc-
ture of permutation Π(e), implementing the classical cyclic right (e = 1) or left
(e = 0) shift is shown in Figure 5.32. The delay time corresponding to the execution
of this operation is determined by the time required to the signal to pass through
one active layer. This time is approximately equal to the delay time of the operation
of modulo-2 bit-by-bit summation (t⊕). The delay time corresponding to the op-
erations of bit permutations provided that P32/96 and P–132/96 controlled permuta-
tions blocks are used, makes 6t⊕. The execution time of one round then makes 15t⊕.
This variant of solving the problem of forming control vectors can be applied
for controlled permutations, and for the pairs of mutually inverse variable opera-
tions of other types built on the basis of controlled SP-networks (that is, for the case
of using Fn/m and F–1n/m blocks).
322 Innovative Cryptography, Second Edition
shift if e = 0, and left shift if e = 1). In the cryptoscheme shown in Figure 5.31 the ex-
tinguishing of the avalanche effect is eliminated by means of executing a fixed permu-
tation operation over the right data subgroup after executing the first G operation, but
before executing the second one. Thus, the fixed permutation used for the right branch
of the cryptoscheme plays the double role. It coordinates the two similar G operations
in a certain way, and ensures optimization of the mechanism of forming controlling
vectors for the controlled permutations block.
Nevertheless, there is another important feature related to the mechanism rep-
resented in Figure 5.31 and including two identical operations G. This feature con-
sists in that each bit of the left subgroup both in the first and in the second G
operations influences the output bits belonging to the same positions. These bits
are divided by the fixed bit permutation in the right branch; however, the proba-
bilities of generation of the active difference bits in identical positions of both G
operations are dependent, because the keys are fixed elements. This feature results
in a certain increase of the probability of encryption according to the scheme of en-
crypting differences with a small weight. To eliminate this drawback, it is possible
to execute the fixed permutation involution I over the left data subgroup. The use
of such an operation also implements the second goal—improvement of the mech-
anism of forming controlling vectors.
Permutation involution I is chosen with the account of the structure of opera-
tion G. Let this operation have such a property that the i-th input bit xi influences
four output bits yi, yi+1, yi+2, and yi+3. This means that the i-th output bit is influ-
enced by input bits with the numbers i–1, i–2, i–3 (for G operational with initial
conditions the values i = 1, 2, and 3 are exceptions). For such operation G, it is nat-
ural to choose such a permutation involution, which for each i would shift bits
li - 1, li – 2, li – 3 of the left data subgroup to the distance no less than four steps from
the shifted bit li. This criterion ensures the dependency of the pair of output bits of
the upper and lower operation G, belonging to the same predefined bit; for example,
to the j-th bit, on seven different bits of the left data subgroup for the maximum
number of different values j (in case of operations G without initial conditions, this
is true for all values of j). For the case of 32-bit subgroups, this condition is satis-
fied, for example, by the following permutation:
I = (1,17)(2,21)(3,25)(4,29)(5,18)(6,22)(7,26)(8,30)(9,19)
(10,23)(11,27)(12,31)(13,20)(14,24)(15,28)(16,32).
FIGURE 5.34A Encryption round using FIGURE 5.34B Encryption round using
transformation of the left data subgroup left and right data subgroups using fixed
using fixed permutation involutions. permutation involutions.
Statistical studies of the influence of the input bits of the Fn/m block on the out-
put bits of the F–1n/m lock has shown that even for the simple mechanism shown in
Figure 5.34a, it is possible to find a permutation involution simple enough to en-
sure the uniform influence.
Similar investigations of the scheme shown in Figure 5.34b have demonstrated
that the simultaneous use of permutation involutions carried out over the left and
the right subgroups also can be used, because the effects introduced by these two
mechanisms do not neutralize one another.
A similar mechanism is shown in Figure 5.35, where in the left branch a switched
permutation is used instead of the fixed one, which allows for using general-type
permutations. At the same time, this switched operation doesn’t introduce any
time delays, because after execution of the upper G operation the XOR operation
is executed, thanks to which the output value of the lower G operation is formed
simultaneously with the forming of the output value of permutation I.
To decrease the amount of key material used within a round, it is possible to
apply the scheme shown in Figure 5.36, where two controlled operations S32/32 are
used for forming the round function. Instead of S32/32 blocks, in this scheme it is
possible to use S32/96 blocks, which, when implementing programmable LICs, will
be coordinated by the delay time with the R32/96 block that carries out transforma-
tion of the right data subgroup. Such a structure of the round transformation
allows for easy evaluation of differential characteristics with differences of small
326 Innovative Cryptography, Second Edition
FIGURE 5.35 Structure of the Crypt(e) FIGURE 5.36 The structure of the Crypt(e)
procedure with switched permutation procedure with the transformation of the
in the left branch of the cryptoscheme. cryptoscheme by means of superposition
of the subkey over it.
weight, which are the most efficient when implementing a differential attack. This
variant demonstrates the possibility of using minimal key material within a single
encryption round.
In the previously considered examples of internal optimization of the distrib-
ution of control bits over elementary controlled units of controlled operational
blocks Fn/m and F–1n/m, an intermediate reversible transformation was carried out
over the left subgroup, which either didn’t introduce any delay at all, or introduced
the delay approximately equal to the time required to execute a XOR operation.
Principally, it was possible to apply more complicated transformations of the left
subgroup. However, such transformations result in the increase of the critical path
of the combinational scheme carrying out the round transformation. In addition to
increased hardware requirements for manufacturing the encrypting devices, this
also reduces the encryption speed. Obviously, more sophisticated transformations
carried out over the left subgroup allow for efficient elimination of the problem of
forming control vectors, and provide the possibility of reducing the number of
rounds. Potentially, this might result in the performance gain and reduction of the
implementation cost. The possibility of reducing the number of rounds is due to
the fact that two subgroups will be transformed within the same round (in other
words, the entire data block is going to be transformed). However, to implement
this idea, it is necessary to develop other building procedures with high parallelism
of transformations execution.
Designing Fast Ciphers Based on Controlled Operations 327
FIGURE 5.37A The round encryption FIGURE 5.37B The round encryption
mechanism with transformation of both mechanism with transformation of both
data subgroups using two identical data subgroups using three identical
operations G. operations Rn/m.
328 Innovative Cryptography, Second Edition
Although these two apparently elegant schemes ensure building strong ciphers
with the number of rounds from 6 to 12 for different variants of operational blocks,
their critical path is approximately 1.5 times longer than critical paths of earlier
considered cryptoschemes, because the first of the two sequentially executed oper-
ations cannot be executed simultaneously with the pair of operations executed in
parallel. As a result, the execution time of the encryption round is approximately
equal to 6mt⊕/n + 2. In the previously considered cryptoschemes, the parallelism
level can be evaluated by the value 2 (on average, two operations are executed in
parallel—first, three operations are executed in parallel, after which the fourth op-
eration is executed), and in the latter two cryptoschemes the parallelism is evalu-
ated by the value 4/3 (two operations are executed in parallel, then the third and the
fourth operations are executed sequentially). In the next section, more efficiently
designed schemes of the round transformation will be covered. They transform
both data subgroups and are characterized by the parallelism level 2.
It should be mentioned that after building efficient mechanisms of forming
control vectors that do not require using round subkeys, it is possible to return to
using rounds subkeys, as it becomes necessary due to some design considerations.
In this case, some statistical nonuniformities of the influence of the bits from the
right subgroup can be eliminated. Such nonuniformities might take place when ex-
ecuting one round of the SPECTR-H64 encryption algorithm even when using dif-
ferent subkeys for forming P32/80 and P–132/80 controlled operations. Note that for the
previously considered mechanisms, such nonuniformities are smoothed even with-
out using different subkeys for forming control vectors.
To ensure the universality of the cryptoscheme, the left data subgroup is trans-
formed using an operation representing an involution or switched controlled
operation. For the same purpose, the control vector used when executing the
controlled operation over the right data subgroup is formed by the initial value
of the left data subgroup in the course of encryption, and by the transformed
value of the left data subgroup in the course of decryption.
In this cryptoscheme, there are two pairs of operations Sn/m and Rn/m. Opera-
tions of the first pair are executed over the left data subgroup (Sn/m) and subkey Gr
(Rn/m), and operations of the second pair are carried out over the right data sub-
group (Sn/m) and subkey Tr (Rn/m). At the same time, only the operation carried out
over the left subgroup is fixed after establishing the key. All the other controlled op-
erations are variable, because they depend on the left data subgroup. In this cryp-
toscheme, it is assumed that the extension blocks are built so that no bit of the left
data subgroup influences any bit of the binary vector being transformed (subkey or
data subgroup) more than once. Operations depending on the left data subgroup
specify nonlinear transformation, and the operation executed over the left sub-
group is linear, if operation Sn/m is built using controlled elements of the F2/1 type
(when using controlled elements with the size F3/1 or more, this operation also
becomes nonlinear). Operation Sn/m ensures good avalanche effect, and three
330 Innovative Cryptography, Second Edition
Controlled involutions
Switched controlled operations of the general type
Thus, the first scheme implements the controlled operation that represents an
involution. For the second scheme, the transformation appears as follows:
This means that in the second case, we also are dealing with controlled involu-
tion having an arbitrary Fn/m block.
Another variant of cryptoscheme with high parallelism level is obtained by
means of replacing operations used for round keys transformation by G operations.
Modification of the operation carried out over the left subgroup also presents a
great interest. For this operation, it is possible to enforce the nonlinearity property
by means of using the transformation shown in Figure 5.40 instead of using larger
controlled elements. This transformation consists of splitting the left subgroup L
into two subgroups L1 and L2, of the half size, and sequential transformation of
these subgroups using mutually inverse controlled operations followed by permu-
tation of subgroups L1 and L2. Since the control vector is formed based on one of
the data subgroups when executing each controlled operation, each specifies non-
linear transformation. Consequently, the resulting transformation as a whole also
is nonlinear. In addition, this Hn/m transformation is an involution, which can be
shown by transforming the output value L'=(L'1, L'2):
332 Innovative Cryptography, Second Edition
because V'' = V. Concatenation of the input and output values of the Fn'/m' opera-
tion in the course of the transformation of block L is L* = (L'2, L2), and when trans-
forming block L' the same concatenation is equal to L** = (L2, L'2). Thus, the
resulting nonlinear operational block based on two variable operations also forms
the binary vector, where components L2 and L'2 are transposed in the course of re-
peated transformation of the same output value using the same block.
operation G, the number of rounds can be reduced. This allows for increasing the
encryption speed in case of iterative implementation or reducing the implementa-
tion complexity in case of the pipelined implementation. Another task that had to
be solved when designing the COBRA-H64 system was simplification of the key use
schedule and reduction of the key length.
where X ∈{0, 1}64 – is the plaintext (input block), Y ∈{0, 1}64 is the ciphertext (out-
put block); K ∈{0, 1}128 is the secret key; T(e) is the data block transformation func-
tion; e∈{0, 1} is the parameter defining the modes of encryption (e = 0) and
decryption (e = 1).
The secret key is considered as the concatenation of four subkeys K = (K1, K2,
K3, K4), where Ki ∈{0, 1}32 for all i = 1, 2, 3, 4. The general scheme of encryption
represents the 10-round iterative structure with easy initial and final transforma-
tions (see Figure 5.42). When executing each j-th round (j = 1, 2, …, 10), the round
key Qj(e) is used. This key is formed on the basis of direct use of all four subkeys K1,
K2, K3, K4 without using any special transformations (extension) of the secret key.
Designing Fast Ciphers Based on Controlled Operations 335
This means that each Qj(e) key is formed as a sequence of secret keys Ki, used ac-
cording to the order specified by relatively simple key schedule.
1. The input block X is split into two 32-bit subgroups of equal size, L and R:
X = (L, R).
2. Initial transformation IT is carried out according to the following formulae:
L0 = L ⊕ O3 and R0 = R ⊕ O4.
3. For j = 1, 2, …, 9, the following procedure is executed sequentially:
{ (Lj, Rj) := Crypt(e)(Lj – 1, Rj – 1, Qj(e)), M := Rj, Rj := Lj, Lj := M; }.
4. The last encryption round is executed:
( e)
(L10, R10) := Crypt(e)(L9, R9, Q 10 ) .
5. The final transformation FT is carried out according to the following
formulae:
L' = Lr ⊕ O1 and R' = Rr ⊕ O2.
In the course of encryption, round keys Qj(0) = (A(1), A(2), A(3), A(4))j(0) are
used, where j = 1, …, 10, and in the case of decryption, the keys in use are
Qj(1) = (A(1), A(2), A(3), A(4))j(1). For correct encryption for j = 1, …, 10 the following
conditions must be satisfied:
338 Innovative Cryptography, Second Edition
(0) (0)
(A(1))j(1) = (A(3)) 11− j , (A(2))j(1) = (A(4)) 11− j ,
(0) (0)
(A(3))j(1) = (A(1)) 11− j , (A(4))j(1) = (A(2)) 11−j.
Using Figure 5.44 and Table 5.27, it is easy to write the schedule of keys K1, K2,
K3, K4 in explicit form for the cases of encryption (Table. 5.28) and decryption
(Table 5.29). It can be easily seen that the provided conditions have been satisfied.
j 1 2 3 4 5 6 7 8 9 10
Aj(1) K1 K4 K3 K2 K1 K1 K2 K3 K4 K1
Aj(2) K2 K1 K4 K3 K4 K4 K3 K4 K1 K2
Aj(3) K3 K2 K1 K4 K3 K3 K4 K1 K2 K3
Aj(4) K4 K3 K2 K1 K2 K2 K1 K2 K3 K4
Aj(1) K3 K2 K1 K4 K3 K3 K4 K1 K2 K3
Aj(2) K4 K3 K2 K1 K2 K2 K1 K2 K3 K4
Aj(3) K1 K4 K3 K2 K1 K1 K2 K3 K4 K1
Aj(4) K2 K1 K4 K3 K4 K4 K3 K4 K1 K2
Variable Permutations
Data-dependent permutations are carried out using blocks of controlled permuta-
−1
tions P32/96 and P 32 / 96 . The current permutation carried out over the right 32-bit
data subgroup depends on the 96-bit control vector V∈{0, 1}96. Vector V is formed
on the basis of the left data subgroup using extension block E, representing a sim-
ple circuit branching. The control vector can be represented as V = (V1, V2, V3, V4,
V5, V6), where each component controls one of the six active layers of controlled
permutations blocks. Transformation in block E is carried out according to the fol-
lowing formulae:
where Llo = (l1, l2, …, l16)∈{0, 1}16, Lhi = (l17, ln/2+2, …, l32)∈{0, 1}16 and “>>> k”
stands for the cyclic shift by k bits (for the bit representation of binary vectors being
used this is the left shift). This rule of forming control vectors corresponds to
criteria of forming control vectors, and permutation of each input bit in the P32/96
controlled permutation depends on six different bits from L. At the same time,
under any conditions none of the bits of the controlling subgroup influences any
bit of the data being transformed more than once.
Switched permutation π(e) ensures the influence of each input bit of the P32/96
−1
controlled permutations block on each output bit of the P 32 / 96 controlled permu-
tations block even in case when there is no permutation involution I in the left
branch; that is, even when the values of control vectors corresponding to blocks
−1
P32/96 and P 32 / 96 of the same round are equal. Thus, the goal of switched permuta-
tion consists of:
340 Innovative Cryptography, Second Edition
Fixed Permutation I
Bit permutation I, executed over the left data subgroup, is an involution. It is in-
tended for increasing the avalanche effect propagating the modifications of the bits
of the data subgroup L while simultaneously executing two nonlinear transforma-
tions G(1) and G(2). Permutation I has the following cyclic structure:
I = (1, 17)(2, 21)(3, 25)(4, 29)(5, 18)(6, 22)(7, 26)(8, 30)(9, 19)
(10, 23)(11, 27)(12, 31)(13, 20)(14, 24)(15, 28)(16, 32).
Criteria for building involution I are related to specific structure of the G op-
eration. Assume that the output bits yk and yl of the I operation correspond to
input bits xi and xj. When choosing the permutation involution I the following
principles were used:
Applying involution I and inversion of one bit in subgroup L results in the in-
version of several bits (from 2 to 8) at the output of the block R after the output
blocks G(1)(L) and G(2)(I(L)) are summed with the initial block R using the “⊕”
operation.
Nonlinear Operation G
Nonlinear operations G(1) and G(2) have the same structure and are defined
according to the following formula:
where:
X, A, B∈{0, 1}32
AX denotes bit-by-bit modulo-2 multiplication of vectors A and X
For all i = 1, 2, 3 vector Xi is defined as Xi = X →i⊕X(0) ←(3 − i), where X(0) = (1, 1,
1, 0, …, 0)∈{0, 1}32 is a fixed block of initial conditions, “→k” and “←k” are
logical shifts of the vector operand by k positions left or right (the released
positions are filled with zeros)
Designing Fast Ciphers Based on Controlled Operations 341
A1 = A→1 ⊕ A(0), where A(0) = (1, 0, …, 0)∈{0, 1}32 is a fixed block of initial
conditions
B1 = B→1⊕B(0), where B(0) = (1, 0, …, 0)∈{0, 1}32 is a fixed block of initial
conditions
Operations G(1) and G(2) are intended for increasing the nonlinearity of the
Crypt(e) procedure and strengthening the avalanche effect propagating modifica-
tions of the input data bits at the output of the procedure. When considering the in-
fluence of one bit of the input vector X of the operation G on the bits of its output
vector Y = G(X), the following formula describing the influence of individual out-
put bits on the input bits is useful:
TABLE 5.30 Schedule of the Round Keys of the COBRA-H128 Cipher in Encryption
Mode (e = 0)
TABLE 5.31 Schedule of the R Keys of the COBRA-H128 Cipher in Decryption Mode
Designing Fast Ciphers Based on Controlled Operations 343
Controlled Permutations
Variable permutations in COBRA-H128 are implemented using first-order P64/192
and P–164/192 blocks, shown in Figure 5.47.
Fixed Permutations
Permutation I is an involution described by the following formula:
(1, 50, 9, 42, 17, 34, 25, 26, 33, 18, 41, 10, 49, 2, 57, 58)
(3, 32, 11, 56, 51, 16, 27, 40)
(4, 7, 28, 47, 52, 23, 12, 63, 36, 39, 60, 15, 20, 55, 44, 31)
(5, 14, 13, 6, 21, 62, 29, 54, 37, 46, 45, 38, 53, 30, 61, 22).
TABLE 5.32 Distribution of the Influence of the Bits of Control Subgroup L in the P64/192
Block
V1 31 32 3 4 5 6 7 8 9 10 11 12 13 14 15 16
V2 10 24 25 26 29 13 27 16 1 2 31 32 3 4 19 6
V3 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
V4 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
V5 55 56 57 58 59 60 61 62 63 64 33 34 35 36 37 38
V6 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 V1
7 8 9 23 11 12 28 15 14 30 17 18 5 20 21 22 V2
29 30 31 32 1 2 3 4 5 6 7 8 12 10 11 9 V3
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 V4
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 V5
61 62 63 64 33 34 35 36 37 38 39 40 41 42 43 44 V6
Nonlinear Operation G
Nonlinear operations G(1) and G(2) have the same structure and are defined ac-
cording to the following formula:
Designing Fast Ciphers Based on Controlled Operations 345
X, A, B∈{0, 1}64
AB denotes bit-by-bit modulo-e multiplication of vectors A, B
For i = 1, 2, 3, 4, 5, 60, we have Xi = X>>>64 − i.
For i = 1, 2, we have Ai = A→i ⊕A(0)←(2 − i), where A(0) = (1, 1, 0, …, 0)∈{0, 1}64
is a fixed block of initial conditions, “→k” and “←k” are logical shifts of the
vector by k positions right or left (the released positions are filled with zeros) .
B1 = B→1⊕B(0), where B(0) = (1, 0, …, 0)∈{0, 1}64 is a fixed block of initial con-
ditions.
yi = xi ⊕ ai ⊕ bixi − 1 ⊕ xi − 2 xi − 5 ⊕ ai − 1 xi − 6 ⊕ ai − 2bi − 1 ⊕ xi − 3 xi − 4 ⊕ xi − 1 xi − 4 xi
− 6 ⊕ bi − 1 xi − 2 xi − 6 ⊕ bi − 1 xi − 1 xi − 2 xi − 4,
where (x −5, x −4, x −3, x −2, x −1, x0) = (x59, x60, x61, x62, x63, x64); a0 = a −1 = b0 = 1.
Investigation of statistical properties of the COBRA-H128 cipher was carried
out according to the standard tests earlier used for evaluation of the influence of the
bits of the source text of the AES contest finalists and bits of the key on the cipher-
text in such ciphers as SPECTR-H64 and SPECTR-128. The obtained results have
shown that COBRA-H128 has statistical properties similar to AES candidates,
SPECTR-H64, and SPECTR-128. Experimental results are provided in Tables 5.33
and 5.34, where the “*” sign denotes the “1 key and 40,000 texts” experiment, the
“**” sign stands for “200 keys and 200 texts” experiment, and the «+» sign corre-
sponds to the case «4,000 keys and one text». From the results of experiments it is
clearly seen that after six rounds of the COBRA–H128 algorithm, statistical criteria
are satisfied completely both for the influence of the bits of the source text, and for
the influence of the key bits. Investigation of statistical properties of the influence
of the key bits for this cipher is of high importance, because this cipher uses very
simple key schedule.
1. Assign i:=1 and carry out the initial transformation: A := A ⊕ Z4, B : = B ⊕ Z3.
2. Execute the round transformation and, if i < R, transpose A and B sub-
blocks.
3. Assign i := i + 1 and, if i ≤ R, go to step 2.
4. Execute the final transformation: A := A ⊕ Z2, B := B ⊕ Z1.
TABLE 5.35 Pairs of Boolean functions Used as Elementary F2/1 Blocks for Building
Algorithms Intended for Encrypting 128-bit Data Blocks
x2x3⊕x1 x1x3⊕x1⊕x2
x2x3⊕x1⊕x2 x1x3⊕x2
x2x3⊕x1⊕x3 x1x3⊕x1⊕x2
x2x3⊕x1⊕x2⊕x3⊕1 x1x3⊕x2
x2x3⊕x1⊕x2 x1x3⊕x2⊕x3
x2x3⊕x1 x1x3⊕x1⊕x2⊕x3⊕1
x2x3⊕x1⊕x3 x1x3⊕x1⊕x2⊕x3⊕1
x2x3⊕x1⊕x2⊕x3⊕1 x1x3⊕x2⊕x3
where Y(i), Y'(i) are the results of execution of i transformation rounds over X and
X', respectively. For the sequence of s differences, consider the probability of the
s-round characteristic
1 ≤ s ≤ r, assuming that X, X' are random elements with even distribution over the
entire set of plaintexts, and k1, k2, …, kr are random round keys uniformly distrib-
uted over the entire set of keys. For Markovian encryption algorithms, the proba-
bility of s-round differential is determined by the following equality:
Pr {ΔY ( s) = β ( s) | ΔX = α } =
s
∑ ∑ ∑ ∏ Pr {ΔY (i) = β(i) | ΔY (i − 1) = β(i − 1)}
β(1) β( 2 ) β( s−1) i=1
The goal of attack is reconstruction of the round key kr . Before doing this, it is
necessary to discover (r-1) – round characteristic (α, β (r-1)) with the maximum
probability p. Then, by carrying out N experiments, the cryptanalyst generates ran-
Xj, computes Xj' = Xj ≈ α and determines Yj, Yj', where j = 1, …, N. The
dom plaintexts
k
assessment of the unknown round key kr is chosen to be equal to the following
value:
N
k = arg max ∑ I
k ∈K j =1
{ F (Y ) ⊕ F (Y ) = β(r − 1) }
k
−1
j k
−1 '
j
where I{•} is the indicator of a random event. I{Θ} = 1, if event Θ takes place; oth-
erwise, I{Θ} = 0. The preceding operations are repeated the required number of
times, until the actual round key is discovered as the most probable one.
The computational complexity of the attack using differential analysis is no less
1
than Wmin ≥≥ p of Y = Fk Fk … Fk ( X ) transformation operations.
r r −1 1
When considering the strength of the DDP-64 cipher against differential crypt-
analysis the result was obtained, which is typical for ciphers based on data-dependent
permutations. This result is that the differential characteristics with the differences
having the smallest weight have the highest probabilities. Let’s use the following
notation. Let ΔWh be the difference containing h active (that is, nonzero) bits and
corresponding to vector W. Let Δh|i1,…in be the difference with active bits in positions
i1, …, in. In contrast to the previous designation, the second one fixes the positions,
to which active bits belong. In the first case the sets of differences with specified num-
ber of active bits are considered (in individual variants of differences ΔWh active bits
belong to different positions in the general case). Let p(Δ → Δ'/P) be the probability
of the case when the input difference Δ, having passed through operation P, is trans-
formed into the output difference Δ'.
The avalanche effect corresponding to operations P32/96 and P–132/96 is due to the
use of the data subgroup L for specifying values V and V'. Each bit of the left data
subgroup influences three bits of each of these control vectors. Each control bit in-
fluences two bits of the right data subgroup. Thus, thanks to controlled permuta-
tions carried out over the right data subgroup R using P32/96 and P–132/96 blocks, one
bit of L influences approximately 12 bits of R. In the case when a certain difference
with one active bit Δ'' = Δ1/i passes through the left branch of the cryptoscheme, it
influences three elementary switching elements that transpose six different bits of
the right data subgroup. For example, if the input difference of the P32/96 block
Designing Fast Ciphers Based on Controlled Operations 351
controlled permutations block doesn’t contain active bits (this is the case of zero
difference), then the difference ΔL1/i can cause the following events depending on
the right data subgroup:
Active bits in controlled permutation block are not formed (that is, the output
difference Δ'0 is formed) with the probability equal to 2–3.
The output difference Δ'2 is formed at the output of the controlled permuta-
tions block with the probability of 3⋅2–3.
The output difference Δ'4 is formed with the probability of 3⋅2–3.
The output difference Δ'6 is formed with the probability of 2–3.
In both F blocks, the active bit is moved into one of the eight bits of vector
H5 at the output of permutation Π' (the probability of this event is
p1 = 2–2 ⋅ 2–2 = 2–4).
In both F blocks, the active bit doesn’t generate any pairs of active bits in
the P32/48 and P–132/48 operational blocks (the probability of this event is
p2 = 2–2 ⋅ 2–3 ⋅ (2–2)2 = 2–9).
In the P32/96 block, the active bit of the left data subgroup doesn’t generate any
additional active bits in the right data subgroup (the probability of this event is
p3 = 2–3).
In the P–132/96 block, the active bit doesn’t generate active bits (the probability
of this event is p4 = 2–3).
In both F blocks, the active bit is moved at the output of the permutation Π'
into one of the 32 bits of vector (H1, H2, H3, H4) (the probability of this event
is p'1 = (1 − 2–2)2 ≈ 1.12⋅2–1).
In both F blocks, the active bit of the left branch doesn’t result in generation of
the pairs of active bits in blocks P32/48 and P–132/48 (the probability of this event
is p'2 = 2–2 ⋅ 2–3 = 2–5).
Designing Fast Ciphers Based on Controlled Operations 353
In block P32/96, the active bit of the left data subgroup doesn’t generate addi-
tional active bits in the right subgroup (the probability of this event is p'3 = 2–3).
In block P–132/96 , the active bit of the left data subgroup doesn’t generate active
bits (the probability of this event is p'4 = 2–3).
At the output of the top and bottom F blocks, the difference Δ'1|i and
Δ'1|j, respectively, are generated, where i = I2(j) (the probability of this event is
p'5 = 2–5).
There are several other possible mechanisms of obtaining zero difference at the
output of the right branch of the cryptoscheme; however, their contribution into
the probability of iterative two-round characteristics is considerably smaller than
that of Cases 1 and 2—therefore, this contribution can be neglected. Thus, the
most significant cases produce the probability P(2) = P' + P'' = 1.37 ⋅ 2–17. The dif-
ference (ΔL1, ΔR0) passes one round with the probability P(2) = 1.37 ⋅ 2–17 . After
transposition of the data blocks at the input of the second round, we’ll have the
difference (ΔL0, ΔR1), which passes it with the probability 1 and after transposition
of the data subgroups produces the initial difference (ΔL1, ΔR0). As the result, for
the two-round characteristic function the following probability is obtained:
P(2) ≈ P = 1.37 ⋅ 2–17.
Characteristics with differences (ΔL0, ΔR1) and (ΔL1, ΔR0) appear to be the best.
Consideration of other differential characteristics with different numbers of active
bits in corresponding differences allows us to discover that adding active bits con-
siderably reduces the probability of characteristics. The difference (ΔL1, ΔR0) passes
eight or ten rounds of the DDP-64 cipher with the following probability:
The use of linear cryptanalysis for detecting the difference of the DDP-64
cipher from a random one is less efficient in comparison to differential attack. In-
vestigations have shown that linear characteristics with small number of active bits
have the greatest offset, and maximum offset is typical for linear characteristics
with two active bits, which are built with the account of events that take into ac-
count the facts of replacement of the bits of data being transformed by the bits of
the C = (10101010) constant. Let A = (AL, AR) and B = (BL, BR) be the input and
output masks, respectively. The L and R superscripts designate the left and right
parts of the mask, respectively. Because of the idea implemented when designing
the DDP-64 cipher, linear characteristics with masks A = B = (111…1) have very
low offset, because F-blocks implement the transformation with high nonlinearity.
Using the formulae for computing linear characteristics provided in “Cryptog-
raphy: Fast Ciphers” by A. A. Moldovyan, N. A. Moldovyan, N. D. Goots, and B. V.
Izotov, it is easy to compute that the offset of the linear characteristic with the
number of active bits z ≤ 31 has the value b ≤ 2–6 for each of the blocks P32/96,
P–132/96, and F. Maximum value b = 2–6 corresponds to the case z = 1. Computation
of linear characteristics of controlled permutations blocks can be conveniently car-
ried out by means of considering “physical” movement of data by the permutations
network. Because the DDP-64 cipher is mainly built based on permutation opera-
tions, this approach also can be applied for its analysis. Let’s introduce subscript in-
dices in designation of masks, which, by analogy with designation of differential
characteristics, will specify the number of active (nonzero) bits and positions to
which active bits belong. For example, A2 and A2|5,7 designate an arbitrary mask
with two active bits, and the mask with two active bits located in the fifth and sev-
enth positions counted from left to right, respectively.
Consider a single-round linear characteristic with masks A = (AL1|i, AR1|j) and B
= (BL1|i', BR1|g), where the value i' is determined by the value i (i' is the number of the
position into which the i-th bit of the left subgroup is moved at the input of the first
round). The offset of the aforementioned linear characteristic is determined by the
fact that there exists the probability of the event when the active bit of the left sub-
group will be used twice with the active bit of the right subgroup when carrying out
the XOR operation. For this to occur, this bit must be moved by the top F-block
into the same position, into which the active bit of the right data subgroup falls at
the output of the P32/96 operation (the probability of this event is p1 = 2–5). The
active bit of the left subgroup also must be moved by the bottom F-block into the
position, into which the active bit of the right subgroup falls at the output of the op-
eration I (the probability of this event is p2 ≈ 0.75 ⋅ 2–5). After that, the active bit in
the right branch must fall into position g at the output of the P–132/96 block (proba-
bility of this elementary event is p3 = 2–5). Thus, two bits separated at the input of
the first round fall into the known positions at the output with the probability
Designing Fast Ciphers Based on Controlled Operations 355
P(1) = p1p2p3 ≈ 0.75 ⋅ 2–15. Knowing this probability, it is easy to compute the offset
b(1) of the single-round characteristic ((AL1|i, AR1|j); (BL1|i', BR1|g); b(1)):
For r-round characteristic ((AL1|i, AR1|j); (BL1|i', BR1|g); b(r)), proceeding in a sim-
ilar way, it is possible to obtain the following evaluation:
From the obtained evaluations, it follows that three encryption rounds of the
DDP-64 cipher are enough for preventing linear cryptanalysis.
It is necessary to mention that the value of the constant C = (10101010) is
chosen so that its weight φ(C) is equal to 4. This value was chosen because for
any other weight, another mechanism of forming linear characteristic ((AL0, AR1|j);
(BL0', BR1|g); b(2)) takes the prevailing role. This mechanism is due to the different
probability of the replacement of the active bit passing from the left branch of the
round transformation into the right branch by zero and one values. This mecha-
nism determines the following value of the offset of the aforementioned two-round
linear characteristic:
From this formula, it can be clearly seen that having φ(C) ≠ 4 linear crypt-
analysis becomes considerably more efficient. Thanks to the aforementioned choice
of the weight φ(C), it is possible to ensure high strength of the DDP-64 cipher
against linear cryptanalysis.
Now it is time to consider several other types of attacks. Algebraic attacks at the
DDP-64 algorithm are impossible because of high degree of the algebraic normal
form. The complexity of boolean functions (containing more than 100,000 terms)
describing the round transformation of the DDP-64 algorithm further complicate
such attacks. Despite a very simple key schedule, DDP-64 is strong against slide at-
tacks on ciphers that do not use key precomputation procedures. This is achieved
because the cipher under consideration uses the following:
In particular, the latter factor prevents slide attacks in the case when all subkeys
have the same values. Despite the simplicity of the key schedule, “symmetric” keys
K'' = (X, Y, Y, X) and K'' = (X, X, X, X) are neither weak, nor semi-weak, because
decryption requires appropriate switching of the Π(e') operation. For example, by
considering the round transformation, it is easy to notice that T(e=0)(C, K') M, where
C = T(e=0)(M, K″ ). Finding semi-weak pairs of keys for DDP-64 is difficult, if ever
possible.
The latter notes allow for drawing the following important conclusion: per-
mutations dependent on e play an important role in DDP-64, which doesn’t in-
clude the procedure of key precomputation. For comparison, note that for the
SPECTR-H64 cipher, where there are no switched operations, for every value X the
256-bit key K = (X, X, X, X, X, X, X, X) is weak. In addition, using such a key cre-
ates prerequisites for successful implementation of slide attacks.
sui). The convenient way to express the cipher performance is to present it in the
number of bits transformed during the time τ.
From the data provided in Table 5.37, it can be clearly seen that the fastest
implementation corresponds to the 128-bit Rijndael cipher (the performance is
approximately f ≈ 1.35 bit/τ), which is achieved by relatively high implementation
cost. The cheapest implementation corresponds to DDP-64 (453 – 547 gates/bit).
The DDP-64 cipher has the performance f ≈ 0.42 – 0.52 bit/τ, which exceeds the
performance values of most widely used cryptoschemes, such as RC6 (f ≈ 0.15
bit/τ), Triple-DES (f ≈ 0.29 bit/τ), and TwoFish (f ≈ 0.27 bit/τ). It is remarkable that
implementation of DDP-64 requires considerably fewer circuit resources in com-
parison to DES. These results show that the DDP-64 cryptoscheme is well suited for
building into intellectual chips and microcontrollers of different types. Thanks to
the low cost of circuit implementation, efficiency of the cryptographic primitive,
and general importance of various operations of bit permutations, the controlled
permutation operation is a good candidate for implementation in the form of a
new fast command for building into the standard command set of general-purpose
processors.
For obtaining more general patterns of the parameters of hardware implemen-
tations of different ciphers, special research was conducted for designing encrypt-
ing devices on the basis of various algorithms based on data-dependent permutations.
The following two variants of implementation have been chosen:
Using programmable logical matrices of the FPGA type from Xilinx Vitrex
Using custom chips designed and implemented using the 0.33-mkm technology
358 Innovative Cryptography, Second Edition
This research was carried out in cooperation with the Patras University
(Greece). Implementation parameters of the DDP-64, CIKS-1, and SPECTR-H64
were studied. Implementation was carried out for the following two architectures:
Circuit implementation of one round and its use for carrying out all encryption
rounds with changing round keys (iterative architecture—IA).
Pipelined implementation with the number of levels equal to the number of
encryption rounds, implementing full number of encryption rounds at the cir-
cuit level (pipelined architecture—PA).
*Configurable Logic Blocks (CLB) are standard logical elements of this type of VLSI circuits.
**The area of the used surface of the semiconductor chip is specified in sqmil units;1 sqmil = 7.45 10–4 mm2.
Designing Fast Ciphers Based on Controlled Operations 359
The DDP-64 and COBRA-64 ciphers are characterized by smaller hardware ex-
penses in comparison to the SPECTR-H64 cryptosystems for all variants of imple-
mentation, which is ensured by individual features of building of the encryption
round. By performance, they exceed the SPECTR-H64 cryptoscheme in any case.
Nevertheless, all three ciphers based on variable permutations have very close
parameters and give an estimate of the efficiency of hardware implementation of
such ciphers.
Thus, it is possible to draw the following conclusions in relation to the DDP-
64 cipher:
X Y L
Table 5.40 Values of Probabilities p( Δ → Δ / Δ1 ) for Block P32/64
Designing Fast Ciphers Based on Controlled Operations 361
output values on the right subgroup using the modulo-e summation operation.
Each with the probability 2−3 introduces only one bit, and the probability of intro-
ducing only two active bits into the right branch is 2−6. The main contribution into
the forming of two-round characteristic is due to the following two cases.
Event A
Top operation G generates only one active bit at its output with the probabil-
ity p1 = 2–3.
Bottom operation G generates only one active bit at its output with the proba-
bility p1 = 2–3.
Because of the presence of the difference of the control vector generated by dif-
ference Δ1|iL , the P32/96 block forms difference Δ 2|Ri, j ' , where j' = π(e ⊕ 1)(I(i)), with
the probability p3 depending on i.
R
Difference Δ 2|i, j ' after summation with active bits formed at the output of op-
erations G is transformed into zero difference that passes the P−132/96 block
without modification with the probability p4 = 2−3.
Event B
Difference Δ0R passes the P32/96 controlled permutations block without modifi-
cation with the probability p3 = 2−3.
Top operation G generates only one active bit at its output with the probabil-
ity p1 = 2−3.
Bottom operation G generates only one active bit at its output with the proba-
bility p2 = 2−3.
Because of the presence of the difference at the control input of block P−132/96,
the latter resets to zero both active bits of the difference Δ 2|Ri ', j , where i' = π(e)(i),
supplied at its input, with the probability p3 dependent on i.
considered. When studying Event B, we consider the probability of two active bits
present in positions j and i' = π(e)(i) at the output of the bottom controlled permu-
tations block falling to the input of the same active switching element of block
P−132/96. Because of the topological symmetry of blocks P32/96 and P−132/96, consider-
ation of Event B can be reduced to consideration of Event A, in which the opera-
tional block P32/96 forms the difference Δ 2|Ri' , j at its output provided that the
difference Δ1|L j is present in the left branch.
Consider the computation of the probability P' using the scheme of forming
two-round characteristic shown in Figure 5.49. The difference of the left subgroup
L
Δ1|i , which at the same time is the input difference of the permutation involution
L
I, after the operation I is transformed into difference Δ1| j . Because of this, the top
operation G introduces the active bit belonging to i-th position into the right
branch, and the bottom operation G introduces the active bit belonging to position j.
The probability of the event in which the top (bottom) operation G forms only
one active bit of the difference at its output is equal to the value p1 (p2), which is de-
pendent on i (j). One of the three active switches of the top controlled permutations
block can generate a pair of active bits, which can fall into positions i and j as they
propagate to the output.
Probability of this event (p3) depends on i. As the result of summation with the
active bit introduced by the top operation G, only j'-th active bit remains at the
input of the switched permutation π(e). This bit, after execution of operation π(e),
falls into position with the number equal to π(e)(j') = π(e)(π(e ⊕ 1)(j)) = j, where it an-
nihilates with the active bit introduced by the bottom operation G. As the result,
zero difference is formed at the input of the bottom controlled permutations block,
which passes it with the probability p4 = 2−3. Values of probabilities p1, p2, p3, and
p4 are listed in Table 5.42. Note the specific feature of the case i = 13, for which ac-
tive bits generated by both operations G can cancel each other. Because of the lat-
ter circumstance, in case i = 13 the following output differences of the top
controlled permutations block bring a considerable contribution into the proba-
R
bility P': Δ 213 R
| ,15 , Δ 213
Δ R| ,17 and Δ 213
| ,16, 213
R
| ,18. For this case, Table 5.42 provides
several averaged integral values of p1, p2, and p3. Probability P' can be computed
according to the following formula:
i=32 i=32
P' ≈ ∑ p( i ) p
1
p2 p3 p4 = p( i ) p4 ∑p 1
p2 p3 ≈ 1.33 ⋅ 2−20 ,
i=1 i=1
where the first sign of approximate equality accounts for neglecting of the weak de-
pendency between events to which probabilities p3 and p4 are related. Values of
probability p3 are computed with the account of the distribution of bits of the con-
trol left data subgroup over elementary switches of the top block of controlled per-
mutations; that is, with the account of the structure of extension block E. For
example, in case i = 5 we have j = 18 and j' = 15; in which case, switching elements
with numbers 5, 31, and 41 are active.
Also, it is necessary to account for the following three cases when the top block
of controlled permutations generates difference Δ 2R|5,13 :
1. Depending on the value of the right data subgroup R, the fifth switching el-
ement forms at its output a pair of active bits with the probability (this
happens in the case when two of its input bits are different). Element 31
forms zero difference at its output with the probability 0.5, and the proba-
bility of zero difference appearing at the output of element 41 is also 0.5
(this takes place when both input bits of the corresponding element are
equal).
2. Switches 5 and 41 form zero difference at their outputs with the probabil-
ity 0.5, and switch 31 produces two active bits with the probability 0.5.
3. Switching elements with numbers 5 and 31 with the probability 0.5 form
zero difference at their outputs, and element 41 produces two active bits.
Designing Fast Ciphers Based on Controlled Operations 365
Taking into account the structure of block E, each bit of the L subgroup con-
trols permutation of six different bits of the R subgroup. Because of this, the prob-
ability of each of the preceding listed three events is exactly equal to 2-3. One of the
output bits of element 5 with the probability 2–5 (it passes five active layers of block
P32/96) falls into position five at the output of the P32/96 operation. The second out-
put bit of element 5 falls into position 13 with the same probability. As the result,
the first event forms the difference Δ 2R|5,13 with the probability p(1) = 2–3(2–5)2 = 2–13.
The second even cannot result in forming such a difference at the output of
the P32/96 block, which means that p(2) = 0. For the third even, the result appears as
follows: p(3) = 2–3(2–3)2 = 2–9. Thus, for i = 5 the probability will be p3 = p(1) + p(2) +
+ p(3) ≈ 1.06 ⋅ 2–9. Proceeding the same way, it is possible to compute the probabil-
ity values of all the other values of i. Note that cases with values 17 ≤ i ≤ 32 intro-
duce zero contribution into probability P2.
For Event B, it is possible to obtain the probability value P22 H 2 20, proceed-
ing the similar way, and then compute the value P(2):
For the cases of 8 and 10 encryption rounds of the COBRA-H64 cipher, the fol-
lowing values are obtained: P(8) = P4(2) ≈ 1.82 ⋅ 2–76 and P(10) = P5(2) ≈ 1.05 ⋅ 2–94.
Taking into account that for random transformation a single-bit difference
(0, Δ1R ) is formed at the output, with the probability P = 32 ⋅ 2–64 = 2–59 > P(8) > P(10),
it is possible to conclude that COBRA-H64 is strong against differential cryptanaly-
sis, because it is undistinguishable from a random transformation using characteris-
tics with the greatest probabilities.
The use of switched operation π(e) eliminates weak and semi-weak keys. This
makes the use of simple key schedule more secure. The use of different values of
parameter e in different encryption rounds ensures elimination of the periodicity of
the encryption procedure. Consequently, it ensures protection against slide attacks
even in the case of using the same round keys in all rounds, which can take place in
the case of secret keys having structures like K = (X, X, …, X).
of its passing through the encryption procedure is similar to that of the COBRA-
H64 cipher. The difference is that dimensions of the used controlled permutations
blocks and G operations are different.
Active bit passes the first round with the probability 1. In this case, it is moved
into another position; however, for the case when positions are not specified when
denoting the difference, any output difference with the specified number of active
bits will present interest (no matter what the numbers of the positions of active bits
might be). This means that in this case, we will consider sets of all differences with
the specified number of active bits instead of individual differences. When only one
input bit of the G operation is modified, only one bit will change at its output,
which corresponds to the same position as the modified input bit. In addition, six
more output bits can change with the probability 0.5. Main variants of forming dif-
ferent variants of two-round characteristic are related to consideration of occur-
rence of differences Δ(2G|i,)i+1 , Δ(2G|i ,)i+2, Δ(2G|i ,)i+3 , Δ(2G|i ,)i+4, Δ(2G|i ,)i+5 , and Δ(2G|i ,)i+6 at the
output of operation G (for i > 58 indices i + k have values that exceed 64; for such
indices it is necessary to adopt the value i + k – 64). By specifying operation G
through boolean functions, it is easy to write the formulae describing modification
of the output bits in position i + k, where k = 0, 1, …, 6 (see Table 5.43).
TABLE 5.43 Probabilities of Generation of the Active Bit at the Output of Function
G in the Case of Modification of the i-th Input Bit
Described here are events A1 and A2, the contribution of which into the prob-
ability of two-round characteristic of the COBRA-H128 cipher is the most signifi-
cant. Consider the mechanism of forming two-round characteristic with the
difference (0, Δ1R ) shown in Figure 5.50. The difference Δ1R after the execution of
R
the first round will transform into difference Δ1|i with the probability p' = 2–6, and
L
after transposition of data subblocks the difference will transform to Δ1|i ; that is, the
L
(
difference 1|iΔ , 0 ) is supplied to the input of the second round with the probabil-
Designing Fast Ciphers Based on Controlled Operations 367
ity p = 2–6. The active bit from the left branch passes through the top operation G
G
with probability 2–6, generating difference Δ1|i at the output of this operation. The
active bit from the left branch also passes through the bottom operation G; how-
ever, before doing this it passes through the fixed permutation Π and transforms
into difference Δ1| j , where j = Π(i). Difference Δ1| j passes through bottom opera-
tion G with the probability 2–6. In this case, thanks to permutation Π, in the course
of execution of operations G different bits of the left data subgroup influence the
generation of new active bits in positions i + k (for the top operation G) and posi-
tions j + k (for the bottom operation G), where k = 0, 1, …, 6. Thus, the two events
G
just considered are independent. Differences Δ1|i and Δ1|Gj are superimposed of the
right subgroup. If a pair of active bits is generated in the top controlled permuta-
tions block, and these bits fall into positions i and j, they will be superimposed over
one bits introduced from the left branch of the cryptoscheme and reset them to
zero, thus forming zero difference at the input of the bottom controlled permuta-
tions block. Generation of active bits in controlled permutation block can take
place, because the active bit from the left subgroup generates three unit differences
of the control vector V; that is, the difference ΔV3 will appear at the control input of
the controlled permutations block. If the zero difference of the right subgroup
passes the top controlled permutations block, then two active bits introduced from
the left branch can annihilate in the bottom controlled permutations block pro-
vided they simultaneously are moved to the same elementary switch, to whose con-
trol input unit bit from the control vector is supplied.
There also are other mechanisms of forming two-round characteristic with dif-
ference (0, Δ1R ); however, their contribution into the probability of the characteris-
tic is considerably smaller. There are only two events with significant contribution.
Event A2:
With the probability p1 = 2–6, difference is formed at the output of the top
G
operation G, which, after passing operation I, turns into difference Δ1|i , where
i' = I(i).
Zero difference passes the top controlled permutations block with the proba-
bility p3 = 2–3.
G
Difference Δ1|i is formed at the output of the bottom operation G with the
probability p2 = 2–6.
Difference Δ 2|Ri' , j is reset to zero when passing the lower controlled permuta-
tions block with the probability p4(i',j).
The probability of event A1, in the case if the active bit of the left subblock
belongs to position i, is designated as P(i) = p1p2p3(i,j')p4. Accounting for the depen-
dency of the probability P(i) on the value i, the contribution of event A1 into the
probability of two-round characteristic can be written as follows:
i=64 i=64
P ' = p ' ∑ P( i ) = p ' p1 p2 p4 ∑ p3( i, j ') ≈ 1.125 ⋅ 2−30 ,
i=1 i=1
where p2 = 2–6 is the probability of the event in case of which the active bit of the dif-
ference falls into position i after the first round. Events A1 and A2 are symmetric.
Computation of the contribution of the second event into the probability of two-
round characteristic P'' = 1.125~2–30 is carried out in a similar way. Thus, the prob-
ability of the two-round characteristic takes the following value:
Probability of the event when differences with one active bit pass the complete
number of rounds is equal to P(12) = P6(2) ≈ 2–173. For 10 rounds of the COBRA-
H128 cipher, the result will be as follows: P(10) = P5(2) ≈ 2–144. Accounting that for
a random transformation 1-bit difference (0, Δ1R ) is formed at the output with the
probability P = 64 ⋅ 2–128 = 2–122 > P(10) > P(12), it is possible to conclude that
COBRA-H128 is strong against the attack under consideration, because in relation
to this attack, the cipher is not distinguishable from a random transformation.
The use of switched operation Π(e) eliminates weak and semi-weak keys. This
makes the use of simple key schedule more secure. Employing different values of
parameter e in different rounds of encryption (and decryption) ensures elimination
of periodicity and protection against slide attacks in the case when the same round
keys are used in all rounds; consequently, the protection is also ensured for the case
of secret keys having the structure like K = (X, X, …, X).
370 Innovative Cryptography, Second Edition
SUMMARY
TABLE 5.45 Comparison of Cryptographic Strength of the Various Fast Ciphers Against
Differential Cryptanalysis
371
372 Innovative Cryptography, Second Edition
SOFTWARE CIPHERS
377
378 Index