AVALANCHE CHARACTERISTICS OF CRYPTOGRAPHIC FUNCTIONS OF TERNARY LOGIC

.


ABBREVIATIONS
SAC is a Strict Avalanche Criterion.

NOMENCLATURE
, f f ′ are many-valued logic function examples; 1 2 , x x are arguments of many-valued logic function; 1 2 , d d are effects on the inputs of many-valued logic function; N is a length of many-valued logic function or S-box, based on many-valued logic functions; 0 , , K K K − + are numbers of symbols 0, -and + in ternary function; δ is a transformation of change in ternary function output values; u is a vector of change in ternary function argument; ν( ) u is a number of non-zero values of a vector u ; D u f is an derivative of ternary logic function; m is an order of propagation criterion; X is a vector of ternary function input arguments; , , J J J are numbers of S-boxes that can be produced by using Rule 1, Rule 2 and Rule 3 correspondingly; α is a coding sequence used in Rule 3 to perform sign encodings of ternary functions; J is a cardinality of the class of S-boxes of length 9 N = , satisfying strict avalanche criterion;

INTRODUCTION
Block symmetric cryptographic algorithms are the very important part of modern information protection systems.A further increase in the computing power of computer systems, as well as the emergence of new methods of cryptanalysis give rise to the need to increase the cryptographic strength of existing and new cryptographic algorithms.
Further development of existing algorithms and the creation of new ones requires the availability of highquality cryptographic primitives, in particular, S-boxes.
At the same time, the application of the mathematical apparatus of many-valued logic functions is promising, both from the point of view of quantum cryptography and from the point of view of traditional cryptography.
A special place, especially from the point of view of quantum cryptography, among the functions of manyvalued logic is occupied by the functions of three-valued logic.
The creation of new cryptographic primitives based on many-valued logic functions requires the generalization of cryptographic quality criteria, the main of which are: nonlinearity, correlation immunity, propagation criterion and a strict avalanche criterion which is particular case of the propagation criterion.
In this paper, the propagation criterion and strict avalanche criterion are generalized to the case of three-valued logic functions, and effective methods for synthesizing 3functions and S-blocks of arbitrary length that satisfy the strict avalanche criterion are proposed.
The object of research is the process of improving the efficiency of cryptographic algorithms based on many-valued logic functions.
The subject of research is the synthesis methods of S-boxes based on many-valued logic functions with good avalanche characteristics.
The purpose of the work is to generalize the error propagation criterion and the strict avalanche criterion to the case of functions of three-valued logic that will allow us to develop a recursive method for synthesizing S-boxes satisfying the strict avalanche criterion.

PROBLEM STATEMENT
Let the function ( )  f X of three-valued logic to be given.The scientific problem is to build a method for determining the probability of a change in the output values of a function when its input values change.
Another important task solved in this paper is the development of a method for synthesizing the functions ( ) f X which the uniform probability of a change in output values when one of the input values is changing (such functions are called as satisfying the strict avalanche criterion).
We also solve the problem of constructing S-boxes on the basis of 3-functions satisfying SAC, that can be used in modern cryptographic algorithms based on the principles of many-valued logic.

REVIEW OF THE LITERATURE
The development of methods of many-valued logic, occurring at the present time [1], causes the emergence of new algorithms for the cryptographic data protection [2].Functions of many-valued logic are the excellent basis for the construction of quantum cryptoalgorithms [3…5].
Although many-valued logic algorithms can have an effective hardware implementation [6], by the reason of better realization of the concepts of diffusion and confusion [7], functions of many-valued logic are of considerable interest from the point of view of implementation on binary computers.Thus, in [8] a block symmetric cryptoalgorithm based on the methods of ternary logic was synthesized.The researches performed show that the use of these methods of ternary logic for the construction of cryptoalgorithms allows us to obtain a high level of diffusion and confusion even when using the simple block replacement (Electronic Codebook [9]) mode at the cost of a small loss of computational efficiency.
The highly nonlinear many-valued functions, that can be, in particular, used in S-boxes construction schemes like modernized Kim's construction [10] was developed in [11] and [12].
Method for constructing S-boxes of ternary logic satisfying the criterion of zero correlation between the output and input vectors is proposed in [13], and method for constructing highly nonlinear S-boxes based on the Nyberg construction is developed in [14].
A method for estimating the non-linearity distance of many-valued logic functions based on the Vilenkin-Chrestenson transform was proposed in [15].
Nevertheless, such an important criterion of the cryptographic quality of S-boxes, as the propagation criterion and the strict avalanche criterion (SAC) remains outside the framework of modern researches devoted to S-boxes based on functions of many-valued logic.
In the binary case, the strict avalanche criterion as a characteristic of resistance to differential cryptoanalysis is one of the basic in the synthesis of S-boxes [16,17].The physical interpretation of the error propagation criterion is to measure the degree of change in the output values of a Boolean function when its input values change [18].

MATERIALS AND METHODS
The most important problem is the development of a technique for measuring the differential properties of functions of many-valued logic, in particular, 3-functions.
Let's consider an example.Let the truth table of a 3function of two variables to be given In order to research the effect of each of the inputs of the 3-function on its output, we connect the summators (Fig. 1) to the inputs, to which we apply the effects  , d d , we obtain the rearranged values of the initial 3function (1), presented in Table 1 (symbol ⊕ means addition modulo 3).
Table 1 shows the change in the value of a function when its arguments are changed.Note, that for the binary case this question is trivial, since operating with values from the set {0,1} makes it easy to infer the output value: it has changed / has not changed.In the case of ternary logic, obviously, the nature of the change in the output value also plays an important role.
Possible options are: 1.The function value has not changed.Denote this event as 0.
We denote this transformation by the symbol δ and introduce the following basic definitions.
Definition 1.Let the ν( ) u to be the number of nonzero values of a vector u .A derivative of a 3-function of k variables in direction of vector u , we call the following 3-function Definition 2. We say that a 3-function satisfies the propagation criterion in the direction of the vector u if the number of zero values in its derivative D u f is equal to the number of positive values and is equal to the number of negative values: 0 In other words, under the influence of the change in input values in direction u the probabilities of events 0 , − or + are equal to 0 0 .
Definition 3. A function is called as satisfying the propagation criterion of order m if it satisfies the propagation criterion in all such directions u that 1 ν( ) u m ≤ ≤ .
Definition 4. A function is said to satisfy a strict avalanche criterion if it satisfies the propagation criterion of order 1 m = .Let's continue the example.We find the derivatives of the 3-function ( 1) and verify its compliance with the strict avalanche criterion (Table 2).
Thus, the researched function does not satisfy the strict avalanche criterion.It is of practical interest to perform the search for 3-functions corresponding to the definition of the strict avalanche criterion that we introduced.( , ) 4 EXPERIMENTS It seems to us that for small values of the length it is possible to carry out a exhaustive search for ternary sequences satisfying the strict avalanche criterion.The search of a complete set of ternary sequences of length 9 N = allowed us to establish that there are in total 2052 3-functions of the specified length that satisfy the strict avalanche criterion.
For example, we show (Table 3) that the sequence we have found satisfies the strict avalanche criterion.
Since all the D i in Table 3 are balanced, so 0 , the sequence (4) really satisfies the strict avalanche criterion.
We note that such 3-functions possess special practical value, on the basis of which it is possible to construct such important cryptographic primitives as S-boxes.Experimental research carried out with the requirements of the theorem [20] which regulates the conditions of bijectivity of S-boxes, made it possible to discover that from the total set of the 3-functions of length 9 N = , satisfying the strict avalanche criterion there are only 72 such 3functions on the basis of which it is possible to construct the S-box.These 3-functions are given in Table 4.

RESULTS
Let us determine the possible number of S-boxes of length 9 N = satisfying the strict avalanche criterion.A complete set of such S-boxes of length 9 N = can be constructed on the basis of a set of generating S-boxes and rules of their reproduction.
Rule 1. Permutation of the second and third triples of elements of the S-box preserves the compliance of S-box with the strict avalanche criterion.
For example, from the first basic S-box obtained by us [ ] we can obtain a new S-box by applying the Rule 1 [ ] Table 3 -The derivatives of the 3-function (5) So, the application of Rule 1 allows to obtaining 1 2 J = new S-boxes based on one.
Rule 2. The permutation of the component 3-functions of the S-box preserves the compliance of S-box with the strict avalanche criterion.
As an example, we again consider the first basic Sbox, which can be represented as two component 3functions 0 1 3 2 8 6 5 7 4 0 1 0 2 2 0 2 1 1 .0 0 1 0 2 2 1 2 1 By permuting the component 3-functions, we obtain a new S-box, which also satisfies the strict avalanche criterion 0 3 1 6 8 2 7 5 4 0 0 1 0 2 2 1 2 1 .0 1 0 2 2 0 2 1 1 The application of Rule 2 allows us to obtain on the basis of one S- The application of Rule 3 allows us to obtain on the basis of one S-box , each of which is satisfying the strict avalanche criterion.This cardinality of class of S-boxes satisfying the strict avalanche criterion is equal to the cardinality of their complete set estimated by the exhaustive search.

DISCUSSION
The obtained 3-functions of length 9 N = (Table 4), satisfying SAC, as well as S-boxes which are built on their basis are important cryptographic constructions from a theoretical point of view.
We note that, for practical use S-boxes of long length N are necessary.Earlier, to increase the length of the S-boxes, both in the binary case [21] and in the ternary case [13], Kim's scheme was successfully used.
Kim's scheme is presented in general form for ternary case on Fig.   has the form Then, calculating the sum in the first sub-block (Fig. 3), we get the value ( ) mod 3 (0 1) mod 3 1; 0.
In the second sub-block of calculations, in accordance with the small S-box (11) chosen by us, we obtain And, finally, the calculations in the third sub-block

S =
In [15] the interconnection between the nonlinearity distance of the S-box component functions and their Vilenkin-Chrestenson transformants was discovered.This interconnection may be described by the formula where i W is the vector of S-box i -th component function Vilenkin-Chrestenson (Walsh-Hadamard for the binary case) transformants and 0,1,..., log 1 From other side, a formula for calculating the matrix where ν,μ 0,1,..., log Using formula (17) we can determine that the distance of nonlinearity of constructed S-box ( 16) as well as we can calculate its matrix of correlation coefficients according to formula (18) 0 0 0 0 0.5 0.5 .0.5 0 0 Continuing usage of the Kim's recurrent construction shown in Fig. 2 on the basis of S-box (16) and the matrix of correlation coefficients 0 0 0 0 0 0 0 0 .0 0 0.5 0.5 0 0 0 0 CONCLUSIONS The scientific novelty of obtained results is that we generalized such important criteria of cryptographic quality as the propagation criterion and the strict avalanche criterion to the case of functions of three-valued logic.The compliance of the 3-function with the strict avalanche criterion makes it possible to ascertain its resistance to attacks of differential cryptanalysis, which is important for practical cryptoalgorithms.
On the basis of the introduced definition of the strict avalanche criterion for 3-functions, in this paper we found a complete set of cardinality 2052 J = of 3-functions satisfying the strict avalanche criterion.
It is established that 72 of these functions can be the basis for constructing bijective S-boxes of length 9 N = satisfying the strict avalanche criterion.The cardinality of such S-boxes class is equal to 864.
It is proposed to use the ternary analogue of the Kim's scheme for recurrently increasing the length of the constructed S-boxes.It is shown that in the case of using the Kim's scheme, the resulting S-boxes also satisfies the strict avalanche criterion.
The practical significance of the paper is that the obtained class of 864 S-boxes satisfying the strict avalanche criterion can be used in practical cryptographic algorithm, which are based on the many-valued logic functions.At the same time, using Kim's scheme, S-boxes of any required length can be obtained.
are S-box examples; NL is the nonlinearity distance; ν,μ ρ P = is the matrix of the correlation coefficients between the output μ y and input ν x vectors of the S-box.
, means no effect on the inputs of our 3-function.

Figure 1 -
Figure 1 -Example of a scheme for researching the influence of inputs of a 3-function on its output

box 2 3 !
(log )! J k N = =new S-boxes satisfying the strict avalanche criterion.In the case of length 9 N = from one S-box, we obtain two. the component 3-functions of the S-box preserves the compliance of S-box with the strict avalanche criterion.Let's demonstrate the operation of Rule 3 using as example the first basic S-box and the coding sequence satisfying the strict avalanche criterion.In the case of length 9 N = , we obtain 9 new S-boxes.Thus, using the basic 24 S-boxes of length 9 N = (5), as well as Rule 1, Rule 2 and Rule 3, we can synthesize a class of S-boxes of cardinality 24 2 2 9 864 J = ⋅ ⋅ ⋅ =

Figure 2 -
Figure 2 -Kim's scheme for ternary case Let's consider an example.Suppose the S-box of length 9 N = satisfying the strict avalanche criterion is given [0 1 6 3 2 5 4 7 8], S = (11) on the basis of which it is necessary to obtain an S-box of length 27 N = .We apply to the S-box (11) a Kim's scheme of recurrent increase of length (Fig. 1), which taking into account the length 9 N = of the initial S-box and the length 27 N = of the required S-box takes the form showed on Fig. 3.

Figure 3 -
Figure 3 -Kim's scheme for a S-box with two inputs Suppose, for example, that the vector of the input value of a new S-box of length 27 N = has the form coefficients between the output μ y and input ν x vectors of the S-box was introduced in[13]

Table 1 -
The rearranged values of the initial 3-function(1)