Symmetric Key Encryption Based on Rotation-Translation Equation

In this paper, an improved encryption algorithm based on numerical methods and rotation–translation equation is proposed. We develop the new encryption-decryption algorithm by using the concept of symmetric key instead of public key. Symmetric key algorithms use the same key for both encryption and decryption. Most symmetric key encryption algorithms use either block ciphers or stream ciphers. Our goal in this work is to improve an existing encryption algorithm by using a faster convergent iterative method, providing secure convergence of the corresponding numerical scheme, and improved security by a using rotation–translation formula.


Introduction
Cryptography is a practice and study of techniques of hidden data transfer so that only the intended receivers can extract and read the data [1].It is the study of mathematical methods related to different aspects of informational security such as data origin, entity authentication, data integrity and confidentiality.The source data, which is to be protected by cryptography, is called plaintext.The procedure of transforming plaintext into an unreadable form termed ciphertext is called encryption.Decryption is the reverse process, recovering the plaintext back from a ciphertext.A cryptographic system is a set of algorithms, seeded by key that encrypt given messages into ciphertext and recover them back into input data.The scheme for a secret key encryption is first proposed by Shannon [2].
There are two categories of key-based cryptographic algorithms: symmetric key (secret key) cryptography and public key (asymmetric key) cryptography.In the first category, a sender and recipient share a private key known only to both of them.The same key is used for encryption and decryption.The most commonly used symmetric algorithms are AES (Advanced Encryption Standard) [3], Cha Cha [4], Blowfish [5], and IDEA (International Data Encryption Algorithm) [6].By contrast, for asymmetric key cryptography, two keys are used: the first one is made publicly available to senders for encrypting plaintext while the second key is kept secret and is used by the receivers for decrypting the ciphertext.The most ordinarily exploited asymmetric schemes are the Rivest-Shamir-Adleman (RSA) cryptosystem [7] and ECC (Elliptic-curve cryptography) [8].Symmetric encryption schemes are usually faster than public key counterparts and thus are preferred for encrypting big data.
In symmetric key cryptography, either stream ciphers or block ciphers can be used.An example of stream cipher is the Vigenere Cipher.These types of ciphers encrypt the letters or digits (typically bytes) of a message one at a time, while block ciphers take a number of bits and encrypt them as a single unit.Until now, many symmetric data encryption algorithms have been proposed.Some of them use classical schemes for text encryption.In [9], an extension of a public key cryptographic scheme to support a private key cryptographic scheme which is a mix of AES and ECC is presented.
Plain text encryption based on AES, Blowfish, and SALSA20 is designed and experimentally evaluated in [10].
Some of them use chaotic equations for text encryption.In Reference [11], a novel scheme for digital image encryption based on a mix of chaos theory and DNA calculation is presented.In [12], a chaos-based pseudorandom generation scheme based on a six-dimensional chaotic system is proposed.A text encryption architecture is given.Novel symmetric data encryption algorithms based on logistic chaotic formula are presented in [13][14][15].A chaotic logistic map filtered with binary function is proposed to text encryption scheme in Reference [16].In [17], a chaos-based encryption technique based on logistic, pinchers, and sine-circle maps is proposed.An algorithm of chaotic data encryption system by using private characteristic of electrocardiogram (ECG) signal and logistic map is designed in [18].In [19,20], the chaotic behaviour of a Chua system is used in novel text encryption scheme designs.A novel pseudorandom bit generation scheme based on rotation equations is proposed in [21].The technique has good statistical properties measured by test packages.A novel encryption method based on modified pulsed-coupled spiking neurons circuit is presented in Reference [22].In [23], a modified quadratic map for numeric sensor data encryption is proposed.

Symmetric Key Encryption Algorithms Based on Numerical Methods
One of the first published works that consider symmetric key encryption algorithm based on numerical methods is by Ghosh in [24] (see also [25,26]), where it is shown that any nonlinear function with one variable f (z) can be defined as a key.The encryption process then is defined as finding the solution of the equation where c i represents the numerical code of the ith symbol in the plaintext (e.g., the ASCII code).
The function f (z) must be chosen in such a way that the corresponding formula (1) has at least one real root for any i.Then, the set of roots {z * i } represents the ciphertext.On the receiver side, each entry z * i is decoded by substituting it into f (z) giving rise to the plaintext character c i = f (z * i ) (the value f (z * i ) must be appropriately rounded to recover c i ).In [24], as a key function f (z), the authors use a cubic polynomial and, for the numerical solution of equations f (z) − c i = 0, they use the Newton's iterative method.We have to mention that, in solving nonlinear Equation (1), we can use different iterative methods.Analogous to this algorithm, an example of a public key cryptosystem based on numerical methods is considered in [27].
It is important to say that the main weaknesses of such algorithms can be summarized in the following: 1. Lack of rules on how to choose the function f and suitable iterative method so that the convergence of the process is always guaranteed. 2. Vulnerability to attack because in these types of algorithms the same letter is encoded with the same real number of each occurrence in the plaintext.
Our aim in the present work is to develop a new algorithm that solves the disadvantages mentioned above.In order to achieve this, the new scheme will be based on employing numerical iterative methods and rotation-translation formula.

On Numerical Methods for Solving Nonlinear Equations
Although the Newton's iterative method is one of the most popular and commonly used methods, numerical analysis offers many iterative methods that can be used in the stage of solution of Equation (1).In general to calculate the roots of nonlinear equations (of the type ( 1)), we have to use approximate (iterative) methods.When studying an iterative method, two of the most important aspects to consider are: • the convergence speed of the iteration, • an interval of convergence and the rules for choosing the initial approximations.
Most of the known iterative algorithms for solving nonlinear equations are only locally convergent, i.e., before using such a method, we need to locate the unknown root at a sufficiently small interval.Even if the root sought is located at the appropriate interval, if we do not choose the initial approximation in a proper way, the process may not be convergent.Usually, iterative methods of this type require the following convergence conditions: Then, the corresponding iterative process converges to the sought root for an initial approximation z 0 which is the end of the interval [a, b], where f (z For some examples of more computationally efficient and higher order iterative methods, we refer the reader to [28].
In the encryption algorithm that we will introduce later, we will use the following iterative function where This iterative algorithm is explored by Jarrat in [29], and it is known as Jarrat's method (see also [30]).
The reason we prefer iteration method (3) over method (2) is its faster convergence.The order of convergence of Jarrat's method is four, while the one of Newton's method is only two (see [30]).In addition, method (3) has higher computational efficiency, although at each step of the iteration one value of f and two values of f are calculated (while in the Newton's method, one value of f and one value of f are calculated).Thus, if the function f is a polynomial, then calculating the value of the function f is always more complex than calculating its derivative f .

Base of Rotation-Translation Equation
In order to avoid the vulnerability to statistical attack, we include additional randomness by using the following space contraction formula based on rotation-translation equation of the form [31] where the angle of rotation is The translation value is a = 6, the space contraction value is b = 0.8 < 1, and rotation values are c = a/2 and d = a.The rotation-translation Equation (4) with initial conditions x 0 = 0.233, y 0 = −0.67 is presented in Figure 1.

Proposed Encryption Algorithm Based on Numerical Method and Rotation-Translation Equation
Here, we describe an encryption algorithm based on space contraction and numerical method.Any nonlinear function or polynomial f with one variable can be defined as part of a key.
We consider plaintext P with byte length of L. The initial values x 0 and y 0 from Equation ( 4), and an initial iteration number M 0 , are determined.The rotation-translation formula, Equation (4), is iterated for M 0 times.
The proposed algorithm based on numerical method and space contraction is given below: 1. Read the symbols from the plaintext data and get the ASCII values of the different symbols; 2. Construct a system of L nonlinear equations by subtracting the ASCII values from the function f and equate with zero; 3. Solve individually the nonlinear equations and put the results α i into an array B; 4. The loop of Equation (4) continues, and as an output, two real numbers x i and y i are generated.
We take the sum of x i and y i to produce the real number d i = x i + y i , which is put into an array R.

Return to
Step 4 until a stream of real numbers R with length L is reached.6.We get the sum of the two arrays B and R to produce E, the output array of real numbers.Remark 1.In Step 2 of Encryption algorithm, it is desirable that the function or polynomial f is such that each equation of the type f (z) − c i = 0 has at least one real root, and it is easy to determine the initial approximation, which guarantees the convergence of the iterative process.

Approaches for Choosing a Nonlinear Function
In the following, we consider two example functions that are suitable for selecting in the above algorithm.

Nonlinear Function
Let f (z) has the following form where p is a real parameter such that p ≥ 1.For its first derivative, we conclude that f (z) > 0 for all z ∈ R, i.e., the function f (z) is monotonically increasing for all z ∈ R.This and the limits lim show that the function f (z) has only one real root.From the second derivative of f and because f (z) > 0 for ∀z > ln 2, it follows that the function f (z) is convex for z ∈ (ln 2, ∞).Therefore, all these properties are also valid for the functions where c i is an integer value (the corresponding ASCII code).Then, for any i, the function g i (z) is monotonous, convex, and has a real root in the interval (ln 2, ∞).Indeed, it can be shown that each one function g i (z) has a real root in the finite interval (ln 2, 6).

Polynomial Function
We consider a fifth degree monic polynomial having the following form: where p and q are real parameters such that p, q ∈ [1, 10].From the fundamental theorem of algebra, it follows that f (z) has at least one real root.Using the Descartes' rules of sign, we can prove that f (z) has no negative real root, hence it has at least one real positive root (see Appendix A).Examining the first two derivatives of f , it can be shown that the function f (z) is monotonically increasing, convex and has a real root in the interval 9  8 , ∞ , for any p, q ∈ [1, 10].By using the bounding theorems (see Appendix A), it can be shown that f (z) has a real root in the finite interval 9  8 , 2|p + 2q| 1/5 .

An Example of Encryption
In order to demonstrate the proposed algorithm, we will use the following example: The text to be encrypted: "Shumen university".As a key function, we use the polynomial which is obtained by Equation ( 7) in the case of p = q = 1.During the encryption process (Step 3 of the Algorithm), we have to solve in series nonlinear equations of the type where c i represents the ASCII code of the i-th character in the text, i.e., c i ∈ [1,255].From the analysis of the polynomial (7) and using the bounding theorems for the roots of polynomials, we deduce that Equation ( 8) has a real root in the interval 9  8 , 6 for any c i ∈ [1,255].Moreover, this interval is such that the iterative process (3) is convergent to the solution for any initial approximation z 0 ∈ 9 8 , 6 .For this reason, we use the same initial approximation for each Equation (8) obtained during the encryption process, namely the middle point of the interval: z 0 = 6+9/8 2 ≈ 3.56.We solve all the equations by iterative function (3) and by using the following stopping criteria As a result, for all the equations, the stopping criteria are reached after three iterations.For comparison, if we use the Newton iterative method (2) instead of the Jarrats' method for solving the corresponding equations, with the same initial approximation, we get six iterations for each equation, see Table 1.The output array of real numbers E is in the last column of Table 1, and this is the encrypted text that the recipient receives.

Brute-Force Attack Analysis
The set of all initial values constitutes the key size.The key size of the novel encryption algorithm has the following initial key values x 0 , y 0 , M 0 and at least three real coefficients a i of the polynomial f (for monic polynomial f of degree n ≥ 3).The two seeds x 0 and y 0 are constructed by randomly choosing two floating-point values that belonging to the intervals [0.5, 7] and [−0.8, 2], respectively.The novel encryption algorithm does not propose weak keys.As stated in the IEEE Standard for floating-point arithmetic [32], the computational precision of the 64-bit floating point variable is about 10 −15 ≈ 2 49 .The key size of the novel encryption is (2 49 ) 5 + 2 32 > 2 248 , which is sufficient enough to defeat brute-force attack [33].The key space is comparable to state-of-the-art chaos-based encryption algorithms; for example, [10,13,16].

Statistical Test Analysis of the Proposed Encryption
In an attempt to evaluate randomness of the improved encryption algorithm, we used NIST [34], ENT [35], and PractRand [36] statistical test applications.The output numbers e i from array E are converted to bytes as follows: s i = mod(abs(integer(e i × 10 15 ))), 256), where integer(e) calculates the integer part of e, truncating the value at the decimal point, abs(e) calculates the absolute value of e, and mod(e, w) calculates the reminder after division.The bytes s i are produced.Using the improved encryption, 10 3 sequences of 125,000 bytes are produced.
The NIST suite software (version sts-2.1.2) includes 15 statistical tests: monobit, block frequency, cumulative sums forward and reverse, runs, longest run of ones, rank, Fourier, non-overlapping templates, overlapping templates, universal, approximate entropy, serial one and two, linear complexity, random excursion, and random excursion variant.
The output results of the first 13 tests are in Table 2.The minimum hit rate for each statistical test with the excluding of the random excursion variant test is approximately 980 for a sample size of 1000 byte stings.The minimum hit rate for the random excursion variant test is approximately 600 for a sample size of 614 byte strings.The random excursion test outputs 8 p-values which are tabulated in Table 3.The random excursion variant test calculates 18 randomness probability numbers: p-values, and they are in Table 4.
The improved encryption algorithm passed successfully all the NIST tests.The ENT application includes six tests to bit or byte sequences.We tested a stream of 125,000,000 bytes (1,000,000,000 bits) of the improved encryption and tabulated the output results in Table 5.The novel encryption passed successfully all the ENT tests.

•
need to have an interval [a, b] containing a single root of f , and • the derivatives f and f must not have zeros in the interval [a, b].

Table 1 .
Number of iterations for Jarrats'method (JM) and Newton method (NM), and generated arrays.

Table 2 .
NIST test suite results.

Table 3 .
NIST Random excursion test results.

Table 4 .
NIST Random excursion variant test results.