4.1.2. Polynomial Function

We consider a fifth degree monic polynomial having the following form:

$$f(z) = z^5 - z^4 + z^3 - pz^2 + qz - (p + 2q),\tag{7}$$

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 <sup>9</sup> <sup>8</sup> , ∞ , 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 <sup>9</sup> <sup>8</sup> , 2|*p* + 2*q*| 1/5 .

## *4.2. 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

$$f(z) = z^5 - z^4 + z^3 - z^2 + z - 3.$$

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

$$f(z) - c\_i = 0,\tag{8}$$

where *ci* represents the ASCII code of the *i*-th character in the text, i.e., *ci* ∈ [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 <sup>9</sup> <sup>8</sup> , 6 for any *ci* ∈ [1, 255]. Moreover, this interval is such that the iterative process (3) is convergent to the solution for any initial approximation *<sup>z</sup>*<sup>0</sup> <sup>∈</sup> <sup>9</sup> <sup>8</sup> , 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*<sup>0</sup> = <sup>6</sup>+9/8 <sup>2</sup> ≈ 3.56.

We solve all the equations by iterative function (3) and by using the following stopping criteria

• | *f*(*zk*)| ≤ , and

,

$$\bullet \qquad |z\_k - z\_{k+1}| \le \epsilon\_k$$

where = 10<sup>−</sup>15.

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.

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


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.

## *4.3. 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*<sup>0</sup> and at least three real coefficients *ai* of the polynomial *f* (for monic polynomial *f* of degree *n* ≥ 3). The two seeds *x*<sup>0</sup> and *y*<sup>0</sup> 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 <sup>10</sup>−<sup>15</sup> ≈ 249. The key size of the novel encryption is (249)<sup>5</sup> + 232 > <sup>2</sup>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].

## *4.4. 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 *ei* from array *E* are converted to bytes as follows: *si* = *mod*(*abs*(*integer*(*ei* × 1015))), 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 *si* are produced. Using the improved encryption, 10<sup>3</sup> 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.


**Table 2.** NIST test suite results.



**Table 4.** NIST Random excursion variant test results.


**Table 4.** *Cont.*


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.


**Table 5.** ENT test results.

The third suite is PractRand. We tested our improved encryption algorithm for strings up to 1 GB (bytes) in length, passing all statistical tests successfully as shown in Table 6.


**Table 6.** PractRand test results.


**Table 6.** *Cont.*

The different statistical tests clearly show the high quality of the proposed algorithm. Table 7 summarizes some of the computed values of our proposed scheme with other algorithms. The performance test of the novel scheme is based on the average response time with data size of 1 MB. The execution is done on mobile Dell Inspiron computer i7-3630QM (2.4 GHz, 8GB RAM).

**Table 7.** Comparison of our improved symmetric key encryption with other algorithms.


Based on the good test outputs, we can infer that the novel text encryption based on numerical method and rotation–translation formula has satisfying statistical characteristics and provides a reasonable level of security.

#### **5. Conclusions**

We have presented an improved encryption algorithm based on numerical method and rotation–translation formula. The new method uses a faster convergent iterative algorithm and adds additional randomness by using the space contraction equation. Two exemplary ways of constructing nonlinear functions or polynomials with corresponding properties are described. In the examples considered, we demonstrate how to determine the interval containing the desired root and in which the iterative method is guaranteed to be convergent. Our security analysis shows that the improved encryption scheme can be successfully used for information security.

**Author Contributions:** B.S. and G.N. wrote and edited the manuscript. All authors have read and agreed to the published version of the manuscript.

**Funding:** The paper is partially supported by the National Scientific Program "Information and Communication Technologies for a Single Digital Market in Science, Education and Security (ICTinSES)", financed by the Ministry of Education and Science, Bulgaria for Borislav Stoyanov.

**Acknowledgments:** The authors are grateful to the reviewer's valuable comments that significantly improved the scientific paper.

**Conflicts of Interest:** The authors declare no conflict of interest.
