Complexity
Volume 2017 (2017), Article ID 8692046, 21 pages
https://doi.org/10.1155/2017/8692046

Research Article

Finite Precision Logistic Map between Computational Efficiency and Accuracy with Encryption Applications

Wafaa S. Sayed,¹ Ahmed G. Radwan,1,2 Ahmed A. Rezk,² and Hossam A. H. Fahmy³

¹Engineering Mathematics and Physics Department, Faculty of Engineering, Cairo University, Giza 12613, Egypt
²Nanoelectronics Integrated Systems Center, Nile University, Cairo 12588, Egypt
³Electronics and Communication Engineering Department, Faculty of Engineering, Cairo University, Giza 12613, Egypt

Correspondence should be addressed to Wafaa S. Sayed; wafaa.s.sayed@eng.cu.edu.eg

Received 30 July 2016; Revised 8 October 2016; Accepted 4 December 2016; Published 12 February 2017

Academic Editor: Alicia Cordero

Copyright © 2017 Wafaa S. Sayed et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

Chaotic systems appear in many applications such as pseudo-random number generation, text encryption, and secure image transfer. Numerical solutions of these systems using digital software or hardware inevitably deviate from the expected analytical solutions. Chaotic orbits produced using finite precision systems do not exhibit the infinite period expected under the assumptions of infinite simulation time and precision. In this paper, digital implementation of the generalized logistic map with signed parameter is considered. We present a fixed-point hardware realization of a Pseudo-Random Number Generator using the logistic map that experiences a trade-off between computational efficiency and accuracy. Several introduced factors such as the used precision, the order of execution of the operations, parameter, and initial point values affect the properties of the finite precision map. For positive and negative parameter cases, the studied properties include bifurcation points, output range, maximum Lyapunov exponent, and period length. The performance of the finite precision logistic map is compared in the two cases. A basic stream cipher system is realized to evaluate the system performance for encryption applications for different bus sizes regarding the encryption key size, hardware requirements, maximum clock frequency, NIST and correlation, histogram, entropy, and Mean Absolute Error analyses of encrypted images.

1. Introduction

Chaos theory is a branch of mathematics which precisely describes many of the dynamical systems that exhibit unpredictable, yet deterministic, behavior. Chaotic generators can be classified into discrete time maps and continuous time differential equations. The remarkable importance of chaotic iterated maps in both modeling and information processing in many fields explains the need for their hardware analog and digital realizations, for example, [1–4]. Digital realizations are generally more immune to the imperfections of real electronic systems and more secure due to the easiness of encryption and exhibit greater noise immunity. Moreover, they are composed of digital circuit components which are cheap and easily produced on a single chip. Since early 1990s, a new class of Pseudo-Random Number Generators (PRNGs) based on the digitization of chaotic maps has gained an increasing interest. Discrete time chaotic maps are easier to implement on digital platforms and their generalized forms [5, 6] could be fully utilized to fit multiple applications. This paper is concerned with one of the most famous one-dimensional discrete time chaotic maps: the logistic map.

The conventional logistic map is a quadratic nonlinear map [7] given by

where is the iterated variable of the map and is a control parameter. Despite the simplicity of its mathematical relation that uses simple and computationally fast operators, it is highly rich in information and indications that are very useful in the field of chaos theory and chaotic systems. It has also found its way, among other chaotic generators, to many practical applications such as biology, physics, chemistry [8–10], pseudo-random number generation [11], secure data and image transfer techniques [12–17] with recent security reevaluation of some of them such as in [18], and financial modeling [19, 20].

Generalized logistic map with signed parameter in which the bifurcation diagram extends in both positive and negative control parameter sides has been analyzed in [6]. It has been shown that period doubling route to chaos occurs for convex maps as well as concave maps. This is shown in Figure 1(a) for different values of the control parameter . The output in negative control parameter side, called mostly positive map, has a wider range that extends asymmetrically with alternating sign as shown in Figure 1(b) with suggested applications in [6]. The key-points of the bidirectional bifurcation diagram are illustrated in Figure 1(b) including bifurcation points and output ranges in both sides which may be listed as follows:

(i)For , the first bifurcation point in the positive side , where the type of the first nonzero solution is a fixed point. In addition, the upper bound on the output which takes place at .(ii)For , the first bifurcation point in the negative side , where the type of the first nonzero solution is period-2. In addition, the lower and upper bounds on the output are and , respectively, which take place at .

(a)

(b)

Figure 1: (a) Graph of . (b) Bifurcation diagram of versus the control parameter .

Unseen behavior lies between the analytical study of chaos and its digital representation where the effect on dynamical properties is inevitable. Several methods of digitization could come to mind such as the following: software implementations in floating-point arithmetic formats, simulations in fixed-point formats, hardware realizations either in ASIC or in FPGAs, and other digital implementations. Software simulations of digital chaotic maps are criticized for being unsuitable for direct application to hardware FPGAs which imply specific assumptions.

In this paper, a hardware oriented analysis of finite precision logistic map using fixed-point arithmetic is presented accompanied by a digital hardware implementation of PRNG. The basic operations constituting the map are executed individually in a sequential manner with the truncation step implemented between them. Throughout our discussion, four factors which affect the finite precision logistic map are considered. Two of them are explicit and not new which are the control parameter and the initial point ; however, finitude adds up to their known effects. The other two factors are introduced by the digital representation which are the precision or bus size and the order of execution . A slight perturbation in any of these factors can yield massively different responses with varied properties in low and intermediate precisions. The effect of varying precision on several properties of the generalized logistic map with signed parameter and the differences from the analytical model are discussed comparing positive and negative parameter cases. A basic stream cipher system based on the PRNG is downloaded on FPGA and tested with text and image encryption applications.

The rest of this paper is organized as follows. First, digital representation of chaotic systems and a literature survey on previous related works are presented in Section 2. Then, Section 3 discusses how the one-dimensional logistic map can be represented in digital hardware realizations such that it can work for either positive or negative parameter cases. The assumptions required to simulate this representation in software environments are also discussed. Different versions of the map are proposed based on the order of execution of the operations constituting its expression. In Section 4, two of these versions are chosen primarily to conduct various experiments and demonstrate results including the following: the bifurcation diagram, its key-points, time series, periodicity of the generated sequence, and maximum Lyapunov exponent (MLE). The effects of varying precision, initial condition, and order of execution on the type of solution are statistically analyzed comparing positive and negative parameter cases. Section 5 presents a hardware realization of a stream cipher system for text and image encryption applications based on the conventional logistic map as a Pseudo-Random Number Generator. The encryption performance, speed, and implementation area are evaluated at different bus sizes. NIST randomness tests, correlation, histogram, entropy, and Mean Absolute Error analyses of encrypted images are carried out for different bus sizes. Finally, Section 6 summarizes the contributions of this paper.

2. Digital Representation of Chaotic Systems

In the field of chaos-based communication and for practical considerations, a design guide of a computationally efficient PRNG using chaotic systems with finite precision is needed. The reason why chaos-based PRNGs are suggested frequently without paying attention to the effect of finite precision could be owed to the -shadowing lemma. This lemma ensures that there exists an exact chaotic orbit close to the pseudoorbit with only a small error [21]. However, there is an argument with strong evidences that this lemma cannot be applied to digital chaos. Previous research efforts have attempted either to come up with a theoretical formulation of the problem and its consequences or to experimentally obtain results and analyze them in the aim of acquiring full understanding of the problem. In this experimental approach, several properties of chaotic systems are used as indicators that can be used to uncover security weakness hidden inside some digital chaotic ciphers.

There are two aspects of regarding digitally implemented chaos, either redefining the equation in a digital form and confining outputs to the integer domain [22, 23] or digitally implementing it in finite precision [24–30]. Since we are concerned with digital implementations, a review of several studies about the effect of finite precision on the properties of chaotic systems is presented. The problem of simulating or implementing digital chaos is composed of two parts: finite time and finite precision. Sentences like steady state or the limit as the number of discrete time steps approaches infinity no longer carry the same meaning. The behavior of a limited number of time samples can be recorded for some finite precision; that is, there is no practical implementation that is equivalent to infinite time or precision.

2.1. Continuous Time Chaotic Systems

Corless in [24] discussed numerical simulations, with finite time and precision, of chaotic dynamical systems and how much they should be trusted. He suggested that the computed orbit and the accompanied value for MLE could be falsely interpreted as chaotic (or nonchaotic). This could be owed to the ill-conditioned nature of chaotic dynamical systems where small errors in initial conditions or involved operations are exponentially amplified with time. Consequently, no measure exists of how much the actual response obtained shall deviate from the expected behavior, and this deviation cannot be tracked as time progresses.

Several recent studies for the effect of limited precision on the properties of digitally implemented continuous time chaotic systems have been conducted. For example, in [27, 28], fully digital implementations of several 3rd-order ODE-based chaotic systems have been studied. The threshold minimum precision required for chaos has been decided to be in the range of 8 to 11 fractional bits.

It is expected in advance that simpler systems with less dynamics such as one-dimensional discrete time logistic map needs a higher threshold minimum precision. The variation in the response is expected to be slower with varying the used precision.

2.2. Discrete Time Chaotic Systems

Li et al. in [25] studied digitization of one-dimensional piece-wise linear chaotic maps (PWLCM) and suggested several ways to reduce its negative effect. The effect of finite precision on the periodicity of a PRNG based on the logistic map has been explored in [26]. The algorithm employs truncation in a single-precision floating-point environment after converting the binary32 format to a denormalized binary fraction. Truncation takes place only after the execution of the whole expression, considering the subtraction followed by two multiplication operations in (1) as a single operation. However, this is not suitable for a fixed-point arithmetic FPGA implementation.

3. Fixed-Point Representation of the Logistic Map

Fixed-point representation uses integer hardware operations controlled by a given convention about the location of the fractional point. Our discussion focuses on computationally efficient fixed-point implementations of chaos, specifically one-dimensional logistic map. The reason is that fixed-point arithmetic is significantly faster and less expensive than an equivalent floating-point hardware implementation. In addition, most commercial arithmetic logic unit (ALU) hardware, for example, FPGAs, is based on it. Such hardware buses typically offer between and bits of precision.

3.1. Assumptions of Fixed-Point Binary Representation

Using finite precision fixed-point binary system, the evaluation of the logistic map function is carried out in a similar manner to a microprocessor instruction set; that is, it is subdivided into a sequence of basic operations. MATLAB fixed-point toolbox is used to simulate digital representation of the logistic map on FPGA.

The integer parts of the included ranges, and , are totally representable in bits in two’s complement coding. These ranges correspond to the two maps: positive logistic map and mostly positive logistic map as illustrated before in Figure 1. It is guaranteed that the resulting value is bounded; that is, no extra bits are needed for handling overflow conditions. The total number of bits, or bus size, is denoted by for precision which is represented as integer bits and fractional bits such that .

Values of starting from a lower bound of correspond to the least bus size offered by FPGAs, that is, bits in both the integer and the fractional parts. A reasonable upper bound resembles the equality of the number of fractional bits to the number of bits in the fractional part of the single-precision binary floating-point representation, which is the smallest precision used in most software implementations. Such upper bound is tentative and changes frequently in the rest of the paper according to the sensitivity of the studied property to precision. The following assumptions are made in simulating digital representation of the logistic map:

(i)The values of and and the output of each basic operation are fixed-point variables stored in finite length Registers.(ii)All operations are carried out assuming truncation.(iii)Two’s complement coding representation is used.

3.2. Different Maps in Fixed-Point Arithmetic

The result of the studied function given by (1) can be calculated in multiple ways in fixed-point arithmetic. For instance, consider the expressions shown in Figures 2(a), 2(b), and 2(c). Are they equivalent? Is the associativity property maintained in a fixed-point system? Moreover, the operations could be grouped such that suboperations are performed in different order as in Figures 2(d), 2(e), and 2(f). The six shown alternatives have been chosen to be considered. The hardware resources needed for executing each of them are also illustrated in the form of Registers and arithmetic units (adders, multipliers, etc.).

Figure 2: Six different maps in fixed-point arithmetic.

Throughout the rest of the discussion, all results are obtained by MATLAB starting at initial point , discarding the first 1,000 iterations and considering the next ones, except where stated otherwise. Figure 3 shows the bifurcation diagram versus the control parameter at , which is expected to exhibit different phases of behavior as those shown in Figure 1(b). However, it could be noticed that different orders of execution yield bifurcation diagrams that are different from those expected regarding the following: key-points, output range, transition between types of responses, and density of points at ranges that are supposed to exhibit chaotic behavior.

(a)

(b)

(c)

(d)

(e)

(f)

Figure 3: Bifurcation diagram versus the control parameter for six different orders starting at at ( bits).

From the bifurcation diagrams, and exhibit smoother maps and a more similar behavior to that expected from the logistic map compared to the other studied alternatives. Hence, most of the following discussion concentrates on these two versions of the logistic map, the different properties that they exhibit, and how much they conform to the behavior expected from the mathematical analysis of the map.

Various properties that have been considered as facts in mathematical analysis of the one-dimensional discrete time logistic map are violated in finite precision environments. Several examples are detailed below.

(i)Initial points with a “1” in the least significant bit only, that is, , could cause the response to die out. In addition, any quantity less than will be considered zero after truncation to fractional bits.(ii)Analytically, it would be expected from (1) that two initial points with difference yield the same posttransient behavior, since they have the same orbit. However, this property is not always satisfied in finite precision case due to truncation effects.(iii)The details of the bifurcation diagram over the whole range of might slightly alter starting at different initial points. Figure 4 shows that the bifurcation diagram differs from the previous case starting at different initial point .

(a)

(b)

(c)

(d)

(e)

(f)

Figure 4: Bifurcation diagram versus the control parameter for six different orders starting at at ( bits).

4. Properties of the Selected Maps

In order to study the effect of increasing the number of fractional bits and the impact of low precisions on the properties of logistic map, the bifurcation diagram of versus the control parameter is plotted for different precisions in Figure 5, while that of is shown in Figure 6, both starting at initial point . The resulting diagrams reveal that the properties of the logistic map are so much affected by precision. These properties include the following: the key-points of the bifurcation diagram, the number of levels or the sequence of values at a fixed value of , and the degree of chaos or how much chaotic is the behavior at values of near or .

(a)

(b)

(c)

(d)

(e)

(f)

Figure 5: Bifurcation diagram of versus the control parameter for different values of bus size starting at .

(a)

(b)

(c)

Figure 6: Bifurcation diagram of versus the control parameter for different values of bus size starting at .

4.1. Key-Points of the Bifurcation Diagram

The key-points of the bifurcation diagram play an important role as design specifications of the logistic map utilized in various applications, specifically for generalized maps with extra parameters as those proposed in [5, 6] and others. These key-points differ for fixed-point representation from the analytical expected behavior defined in Section 1 due to truncation effects. However, this difference decreases as increases as discussed below.

4.1.1. Double-Precision Floating-Point

Using double-precision floating-point calculations, , , , , and . These values for are rounded to the third decimal digit after the point and obtained comparing with epsilon machine (defined in MATLAB as ). The differences between the results of double-precision floating-point calculations and the expected results could be owed to their relative inaccuracy. They do not satisfy neither infinite precision nor infinite time conditions assumed analytically. Hence, floating-point arithmetic implementations of chaotic generators and their impact on the various properties need to be studied as well.

4.1.2. Fixed-Point Implementation

Using fixed-point map versions and , let us consider the positive control parameter side at first. Figure 7(a) shows the values of for for various initial points . For the map , Figure 7(a) shows that starts at values higher than its analytic value “” at low precisions and then starts to decrease gradually approaching “”; on the other hand, seems insensitive to precision from the viewpoint of the value of for these four values of initial point. For output range, calculations are performed at multiple initial points and then the average of these different results is considered. Figure 7(b) shows the average value of the upper bound on responses starting at multiple initial conditions versus different precisions. For both maps, starts at values lower than its analytic value “” at low precisions, then starts to increase gradually, with some fluctuations, approaching “.”

(a)

(b)

Figure 7: The key-points of the bifurcation diagram for the two positive control parameter map versions and at different precisions. (a) The first bifurcation point. (b) The average maximum value.

Similarly, the key-points of the bifurcation diagram in the negative control parameter side are studied. Figure 8(a) shows the values of where similar comments to the positive control parameter case could describe the plot but for the absolute value instead. Figure 8(b) shows the values of at different precisions, whereas Figure 8(c) shows the values of . The map seems to be less sensitive to precision variation than . The average minimum value starts at low precisions with absolute values which are lower than , whereas starts with values which are lower than . As precision increases, the key-points approach their analytical values.

(a)

(b)

(c)

Figure 8: The key-points of the bifurcation diagram for the two negative control parameter map versions and at different precisions. (a) The first bifurcation point. (b) The average minimum value. (c) The average maximum value.

4.1.3. Sensitivity to Initial Conditions

From Figures 7(a) and 8(a), the values of and seem insensitive to the value of initial point . On the other hand, the effect of initial point on the values of , , and cannot be avoided in finite precision implementations especially at low precisions. The value occurs at , whereas and occur at . Both values of exhibit maximum chaotic behavior, where sensitivity to initial conditions is a basic characteristic of the bifurcation diagram. Analytically, the “infinite” sequence generated at maximum chaotic behavior has lower and upper bounds which “must” be reached. Yet, in finite precision implementations, the length of the generated sequence is limited by both finite precision and time. Thus, it is not guaranteed whether its lower and upper bounds shall coincide with the analytical values or not, especially at low precisions.

4.1.4. Precision Threshold

By precision threshold, we mean the precision below which the properties of the map severely deteriorate and above which changes become less significant. It does not mean that the behavior becomes exactly as the analytical approach. From Figures 7 and 8, it is clear that the values of the key-points derived through mathematical analysis are the asymptotes that finite precision values approach as . The threshold minimum precision for key-points can be chosen as for and for , for instance.

4.2. Time Series

A chaotic posttransient response should have a new value generated at each discrete time instant such that no periodicity can be recognized. In this section, the time series at values of that are supposed to be chaotic are studied in finite precision. The effects of varying the used precision and the initial point at which the orbit starts are explained.

Values near or which exhibit the widest chaotic response rich in applications are chosen. Figures 9 and 10 show the time series at of the maps and , respectively, starting at different initial conditions for different precisions. This specific value corresponds to an exactly representable fixed-point number with four fractional bits, corresponding to the narrowest precision that is examined in our study. Generally, very low precisions exhibit undesirable periodic behavior for almost all initial conditions, and high precisions exhibit relatively long periods for some or most of the initial conditions. Time series at some combinations of and analytically expected to be chaotic are periodic instead, for example, Figure 10(b).

(a)

(b)

(c)

Figure 9: Time series of at starting at different initial conditions and various precisions.

(a)

(b)

(c)

Figure 10: Time series of at starting at different initial conditions and various precisions.

For example, to study the reason behind the strange result obtained in Figure 10(b), the cobweb plot is shown in Figure 11 which is a rough plot for the orbit of starting at different initial points , where the graph of the map function is sketched together with the diagonal line . Although the four cobweb plots seem different, the posttransient solution, colored in red and blue, in case of or is the same as the plot in case of which fluctuates between six different values, that is, period-. The output states are as follows (these are the decimal equivalents of the binary sequences represented in the used fixed-point representation at , i.e., 16 fractional bits): 0.5 → 0.984375 → 0.0605621337890625 → 0.2240142822265625 → 0.6844635009765625 → 0.85040283203125 → 0.5009307861328125 → . Any orbit, at the same and , including one of these six values, consequently the others, will converge to the same sequence of period-. On the other hand, the case exhibits a much longer sequence that could be considered “chaotic.” Assuming infinite precision, period- solution could be obtained through solving along with the stability analysis of the periodic point; . This would yield value(s) for at which period- solution starts to appear and the corresponding values for . According to [31], the value is close to one of these values.

(a)

(b)

(c)

(d)

Figure 11: Cobweb plots of at and starting at different initial conditions: (a) , (b) , (c) , and (d) .

For further illustration, Figure 12 shows the time series for which is representable in . Although the neighborhood of this value does not contain near values that generate periodic sequences, some combinations of , and could also yield faulty periodic response. Figure 13 shows the time series at at different combinations of , , and to illustrate the impact of finitude on mostly positive logistic map too. Calculations could be tracked similarly to illustrate how the recurrence settles to a specific periodic sequence instead of the chaotic behavior expected from mathematical analysis.

(a)

(b)

(c)

(d)

Figure 12: Time series of at starting at and various precisions.

(a),

(b),

Figure 13: Time series of mostly positive finite precision logistic map at for different combinations of its parameters.

Consequently, the best expectation from the finite precision logistic map is a pseudo-random sequence with long enough period. The cases with significantly short periods depend on the combination of , , and , which might drive us away from the expected chaotic behavior. The phenomenon of deviation from chaotic behavior does not appear in a continuous manner along with varying precision. The solution could be chaotic at a certain precision and then become periodic at the next precision . The same note could be used to describe the case fixing the used precision and varying the initial point. Moreover, all the studied orders of execution are subjected to these truncation effects in low precisions that yield output sequences with rather short period.

This section emphasizes the dependence of the type of posttransient response on the initial conditions in low and intermediate precisions. The effects of using instead of , instead of (for small ), and any of the orders ,   are illustrated more in Section 4.3. It is expected that, at relatively high precisions, and mostly yield the same type of posttransient solution except for some cases in which truncation accidentally drives the solution into a shorter period. This is not to be confused with the property of sensitivity to initial conditions and whether they are two different posttransient solutions or not which is discussed in [29].

From the previous discussion and visually inspecting further time series, we could define the threshold minimum precision, according to the time series, as the precision at which the response “appears” chaotic for most of the initial points allowed by precision. Values close to those suitable for bifurcation diagrams and key-points can be suggested.

4.3. Periodicity of the Generated Sequence

The sequences corresponding to different parameters (, , , and ) which are generated by finite precision logistic map do not follow an identified, continuous manner as detailed in the previous subsection. It would be quite useful to point out which combinations of the parameters yield responses other than those expected through mathematical analysis. Reaching such combinations could be described as an attempt to solve the inverse problem where the value of is known and the question is as follows: what is the value of that had yielded it?, for given values of and , as well as an order of execution . The answer to such a question is not straightforward, because successive values of are held in a finite length Register. Consequently, the real number, possibly irrational, yielded by solving the inverse problem should be mapped to finite precision fixed-point arithmetic. However, the nonlinearity of the relation representing the logistic map makes it hard to decide whether the mapped value should be lower or higher than the analytical solution. The number of steps above or below in the used precision cannot be easily decided either.

The type of posttransient response of the recurrence is obtained in terms of the length of the period formed by the successive solutions. A posttransient sequence of unique values is described as “period-” which is affected by the four factors (). For example, at and , our experiments yield period lengths of 1 for the 15 available initial points using orders , , , and . However, they yield the same results as [26] with period lengths of either 1 or 3 at the same corresponding initial points using and . Moreover, lower values of which were not considered by [26] are found out to yield longer period length of 4 at several combinations of , , and emphasizing how the introduced factors affect the period length.

Figure 14(a) shows the maximum period, or , obtained with different orders of execution plotted versus precision for from to in steps of and all initial points allowed by the precision. It seems that yields relatively higher periods. Some other orders are acceptable where the best are , , and as decided before from the bifurcation diagrams in Section 3. It could be noticed that higher precisions provide more levels among which the solution(s) could take their values allowing higher values for . Figure 14(b) for from to shows how the logistic map with negative control parameter exhibits longer periods than that with positive control parameter and at lower precisions. In addition, for selected combinations of the factors, mostly positive map exhibits more alternatives for unique values of with a longer maximum period, for example, and at . This indicates some merits of the logistic map with negative control parameter over the conventional logistic map with positive control parameter.

(a)

(b)

Figure 14: Maximum period obtained with different orders of execution plotted versus precision for (a) and (b) and all initial points allowed by .

It would be expected that the sequence period is governed by the maximum number of levels allowed by the chosen precision, for example, for . Yet, this factor represents a rather loose upper bound imposed by the used precision. The behavior of the studied map and whether its output sequence covers all the allowed levels or not are another important point to consider which has been discussed in [26]. For instance, consider , and the hypothetical maximum number of levels equal levels. However, experimental results show that the maximum achievable period or number of distinct levels before repeating the sequence is roughly for positive logistic map and for mostly positive logistic map. Hence, the dependence of the obtained period length on the used precision does not follow a linear scale. The efficiency of filling the allowed levels is still insufficient in rather low and intermediate precisions.

Figure 15 shows all unique periods obtained at a given precision for . The legend shows the different colors corresponding to a given period . Figure 15 illustrates that increasing the used precision provides more combinations of the parameter and the initial point as expected. As precision increases, the number of alternatives for increases exponentially and the statistics are limited by huge processing time and memory requirements. In addition, the number of obtained unique periods of output sequence increases with each bit of precision increased for low and intermediate precisions. After reaching a high enough precision threshold, it is expected that the number of obtained unique periods approaches settling. Values close to these obtained before in [29] may result from some combinations, while other combinations may uncover surprising findings.

(a),

(b),

(c),

(d),

Figure 15: All the generated period lengths in the studied ranges of parameter and all initial points allowed by for and different precisions.

4.4. Maximum Lyapunov Exponent

Maximum Lyapunov exponent (MLE) is an indication whether the system exhibits chaotic behavior or not as it measures the rate of divergence of nearby initial points. Two suggested methods for calculating MLE in finite precision are explained in the next two subsections.

4.4.1. Analytical Derivative Formula

MLE for discrete time maps [7] is given by

where is the natural logarithm and is the first derivative of the map equation with respect to at , in addition to choosing large enough; for example, = 50,000 for MLE value to reach its steady state. In the analytical derivative formula, we calculate MLE of the finite precision logistic map as follows:

4.4.2. Numerical Approximation of First Derivative

The following discussion attempts to investigate whether the numerical approximations for first derivative are more compatible with a discrete map than continuous differentiation rules yielding . Consider the forward difference approximation of the first derivative

Substituting (4) in (2) and using the properties of logarithm, we get

where the minimum value for theoretically equals which is the minimum representable value. However, for practical issues and to avoid overflow, is set to a quite higher value. Both (5a) and (5b) were found to be equivalent in double-precision floating-point and match the analytical method for relatively high precisions. Applying the one-dimensional time series to MLE calculation tools such as [32] used in [27, 28] can be considered as a third approach.

A threshold minimum precision of from the viewpoint of MLE calculation can be suggested as illustrated by Figures 16 and 17. However, results obtained in low precisions make us doubt the validity of both approaches for calculating MLE in rather low precisions and the reliability of the numbers computed through them in deciding how much chaotic a system is. However, the problems in calculating MLE using both methods are barely noticed at quite higher precisions and dominate only at relatively low precisions as previously mentioned.

(a)

(b)

Figure 16: MLE evaluation in two different methods using starting at at (a) and (b) .

(a)

(b)

Figure 17: MLE evaluation in two different methods using starting at at (a) and (b) .

We conclude that, at rather low precisions, MLE cannot be used as a standalone indicator of chaotic behavior without considering the corresponding sequence length. The value of MLE calculated through either of the two methods could be falsely positive while the output sequence is clearly periodic. This result comes in accordance with the discussion presented in [24, 25].

5. Encryption Applications

A Pseudo-Random Number Generator (PRNG) is realized using the conventional logistic map (1), as shown in Figure 18. The inputs of the system are the clock, Reset, , and . The arithmetic unit is used to compute using and . The Register is used to provide to the arithmetic unit. The value of is updated with Multiplexer’s output every clock cycle (iteration). In case of Reset (Reset = 1), the Multiplexer will provide to the Register. Otherwise, the Multiplexer will pass to the Register. This unit is realized using VHDL and synthesized on Xilinx using XC5VLX50T as the target FPGA. Table 1 shows the hardware implementation area and the maximum clock frequency for different bus sizes.

Table 1: Synthesis results for the logistic map using different bus sizes.

Bus size
Slice Registers (28800)
Slice LUTs (28800)
DSP48Es (48)
Maximum clock frequency

10
10
21
2
104.716 MHz

14
14
29
2
104.251 MHz

18
18
37
2
103.873 MHz

20
20
183
2
79.590 MHz

27
27
253
4
61.812 MHz

Figure 18: Hardware realization of Pseudo-Random Number Generator.

A basic stream cipher system is realized as shown in Figure 19. The ciphering process is based on Xoring the input data with a stream of random numbers. The PRNG, presented in Figure 18, is used to output the random numbers, where and are used as the encryption key. Hence, the keyspace is . Every clock cycle the system generates a new random number (RN), captures a new byte from the input data, and Xores the 8 least significant bits of the generated RN with the input byte. The system is realized using VHDL and synthesized on Xilinx using XC5VLX50T. Table 2 summarizes the synthesis results for different bus sizes. The system’s performance, regarding the speed and implementation area, improves by decreasing the size of the bus. Unfortunately, decreasing the size of the bus leads to a reduction in the size of the encryption key which makes the system vulnerable to brute force attacks. Thus, the size of the bus must be adjusted to satisfy the security level, speed, and hardware resources.

Table 2: Synthesis results of the stream cipher system.

Bus size
Slice Registers (28800)
Slice LUTs (28800)
DSP48Es (48)
Maximum clock frequency

10
10
31
2
104.716 MHz

14
14
37
2
104.251 MHz

18
18
45
2
103.873 MHz

20
20
191
2
79.590 MHz

27
27
261
4
61.812 MHz

Figure 19: Stream cipher system for encryption applications.

The stream cipher system is downloaded on FPGA and tested with a text encryption application. The system displays the input word on the first line of the Kit’s LCD screen, encrypts the word using the input key, and displays the encrypted word on the second line of the screen. Figure 20 shows the results of the prototype for different bus sizes and encryption keys. The system succeeds in encrypting the input word (Hello World 2016), for all test cases. However, in Figures 20(b) and 20(d), there is a relation between the input text and the ciphered text which leads to poor encryption. In (b), the characters “”; “space”; and “” are always transformed to “”; “”; and “,” respectively. Similarly, in (d), the characters “”; “space”; and “” are always transformed to “”; “1”; and “,” respectively. This is due to the fact that for the solution of the logistic map does not bifurcate as illustrated previously in Figure 3. Thus, in order to improve the encryption performance, the values of must be close to 4.

(a)

(b)

(c)

(d)

Figure 20: Results of the prototype for different bus sizes and encryption keys.

Moreover, Table 3 shows the encryption results for a famous quote by Mahatma Gandhi [33] using 27-bit bus size and two different keys, and . The number of different bits between these two keys is reduced to one bit only in order to test the system’s key sensitivity. The results show that the encrypted sentences are totally different which imply that the key sensitivity is high.

Table 3: Encryption results for a famous quote using a bus size of 27 bits and two different keys.

Plain text
Live as if you were to die tomorrow. Learn as if you were to live forever…

Ciphertext  

Ciphertext  

The randomness of the PRNG is usually tested by the standard NIST suite [34] in order to ensure high security performance. Accordingly, a VHDL test bench has been implemented to interface the Xilinx with the NIST suite. This test bench is used to generate a text file which includes the 8 LSBs of 125000 successive iterations. The PRNG must pass all the NIST tests in order to be considered as true random source. The results of the NIST test, for 8-bit bus size up to 45-bit bus size, are summarized in Table 4. For all tests the initial point is set to while is set to , where is the number of fractional bits. The threshold bus size for passing all the NIST tests is 45 bits. As the bus size is decreased below this threshold, the number of reported failures starts to increase until the PRNG fails in all the tests for 8-bit bus size. The system succeeds in all the NIST tests for any bus size greater than 45 bits.

Table 4: NIST results for different bus sizes.

NIST test (sample: 1000000 bits in length)
8 bits
27 bits
34 bits
36 bits
38 bits
40 bits
42 bits
45 bits’ value

System parameters

Frequency
✗
✗
✗
✓
✓
✓
✓
0.788699 ✓

Block frequency
✗
✗
✓
✓
✓
✓
✓
0.880935 ✓

Cusum-Forward
✗
✗
✗
✓
✓
✓
✓
0.321183 ✓

Cusum-Reverse
✗
✗
✗
✓
✓
✓
✓
0.511427 ✓

Runs
✗
✗
✓
✓
✓
✓
✓
0.950620 ✓

Long runs of one
✗
✗
✗
✓
✓
✓
✓
0.301448 ✓

Rank
✗
✗
✓
✓
✓
✓
✓
0.178158 ✓

Spectral DFT
✗
✗
✗
✗
✗
✓
✓
0.581909 ✓

Nonoverlapping templates
✗
✗
✗
✗
✗
✗
✗
0.645372 ✓

Overlapping templates
✗
✗
✗
✓
✓
✓
✓
0.566886 ✓

Universal
✗
✓
✓
✓
✓
✓
✓
0.725132 ✓

Approximate entropy
✗
✗
✗
✗
✗
✓
✓
0.877618 ✓

Random excursions
✗
✗
✗
✗
✗
✗
✗
0.970335 ✓

Random excursions variant
✗
✗
✗
✗
✗
✗
✓
0.125786 ✓

Linear complexity
✗
✓
✓
✓
✓
✓
✓
0.113062 ✓

Serial
✗
✗
✗
✗
✗
✓
✓
0.115512 ✓

Moreover, the system has been tested with an image encryption application as shown in Table 5. The standard gray color Lena () has been supplied to the stream cipher system in Figure 19. Three bus sizes, 11 bits, 12 bits, and 45 bits, have been used in the analysis.

Table 5: Image encryption analysis.

Analysis
Lena
Encrypted Image 11-bits
Encrypted Image 12-bits
Encrypted Image 45-bits

Keyspace
NA

Key parameters
NA

Image

Vertical correlation
0.9693
0.6565
0.8988
0.0037

Horizontal correlation
0.9400
0.6482
0.0043
0.00073799

Diagonal correlation
0.9276
0.5858
−0.0027
−0.0051

Histogram -axis: observed count.

-axis: color intensity 

Entropy
NA
7.8737
7.9823
7.9973

MAE
NA
41.3697
68.8534
77.8117

The vertical, horizontal, and diagonal pixel correlation coefficients are calculated using (6a), (6b), and (6c), where is the total number of pixels selected from the image and and are two adjacent pixels. For highly secured image must be very close to zero.

The histogram analysis is used to observe the distribution of the pixel’s color intensity. For highly secured image the observed count for each of color levels must be the same over the entire image.

The entropy of the ciphered image is calculated using (7) where is the probability of symbol . is computed by dividing the observed count of in the ciphered image by the size of the image. For highly secured image the entropy must be close to 8.

The Mean Absolute Error (MAE) between the original image and the ciphered image is calculated using (8), where and are the pixel indices and and are the width and height of the image, respectively.

The encryption analysis in Table 5 shows poor results for the 11-bit bus size. Fortunately, as the bus size increases, coefficient approaches 0, the pixels’ intensity distribution becomes flat, entropy approaches 8, and MAE increases. The best encryption result is achieved by setting the bus size to 45 bits which is identified previously in the NIST analysis.

Table 6 shows synthesis results of the 45-bit stream cipher system in addition to standalone encryption system that displays the encrypted and decrypted image on a screen through an HDMI connector. The “Lena” image is stored in the internal RAM of the FPGA. Figure 21 shows the proposed standalone image encryption system.

Table 6: Synthesis results of the 45-bit stream cipher system.

Resource
Stream cipher system
Stream cipher system with HDMI

Slice Registers (28800)
45
278

Slice LUTs (28800)
326
936

DSP48Es (48)
20
20

Maximum clock frequency
43.530 MHz
43.513 MHz

(a)

(b)

Figure 21: Standalone image encryption system. (a) Decrypted image. (b) Encrypted image.

The proposed stream cipher system, with 8-bit up to 27-bit bus size, was acceptable in the text encryption application due to the small amount of input data. However the NIST and image encryption analysis have showed that it is necessary to extend the bus size to 45 bits in order to successfully encrypt large amount of data. The performance can be further enhanced through feedback, delay elements, nonlinear blocks, and permutation stages as well as postprocessing techniques to get better results for security and sensitivity analyses.

6. Conclusions

In this paper, a methodology for fixed-point simulation of the generalized one-dimensional logistic map with signed parameter and an equivalent hardware realization were presented. Criteria for choosing the bus size for digitally implemented chaotic systems and specifying the number of integer bits were suggested. Various numerical simulations for the properties of the finite precision map over the available precisions, orders of execution, parameter, and initial point were carried out in comparison with those obtained through mathematically analyzing the map over the infinite real field. These factors were shown to affect several properties including the following: the bifurcation diagram, its key-points, periodicity of the generated sequence, and maximum Lyapunov exponent for positive and negative control parameter cases. Moreover, a hardware realization of a stream cipher system for text and image encryption applications based on the conventional logistic map as a Pseudo-Random Number Generator was presented. Encryption results show the trade-off between security level, on the one hand, and speed and hardware resources on the other hand. The longer period lengths provided by mostly positive map suggest its use as one remedy for the problem of short cycles of finite precision chaotic maps compared with other PRNGs. It can be an additional enhancement beside using higher finite precisions, cascading multiple chaotic systems, and using perturbation based systems for either the control parameter or the iterated variable with different configurations. Scaling factors can further provide wider output ranges and hence increase period lengths. Moreover, we recommend that future implementations of chaotic systems on digital platforms consider the listed factors and their effects on various properties and then provide their implementation details for reproducibility. For example, we have shown that different orders of execution and parameter values yield different period lengths. For finite precision systems, we do not guarantee that or which order of execution yields the longest period. Hence, the different alternatives need to be considered similar to how initial conditions effect is considered. The procedure presented in this paper can be carried out for other generalized versions of the logistic map and other chaotic systems according to the allowed ranges of different parameters in order to study the impact of finite precision fixed-point implementation on their properties.

Competing Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

References

K. M. Cuomo and A. V. Oppenheim, “Circuit implementation of synchronized chaos with applications to communications,” Physical Review Letters, vol. 71, no. 1, pp. 65–68, 1993.

S. Mandal and S. Banerjee, “Analysis and CMOS implementation of a chaos-based communication system,” IEEE Transactions on Circuits and Systems I: Regular Papers, vol. 51, no. 9, pp. 1708–1722, 2004.

A. Radwan, A. Soliman, and A. S. Elwakil, “1-D digitally-controlled multiscroll chaos generator,” International Journal of Bifurcation and Chaos, vol. 17, no. 1, pp. 227–242, 2007.

M. A. Zidan, A. G. Radwan, and K. N. Salama, “Controllable V-shape multiscroll butterfly attractor: system and circuit implementation,” International Journal of Bifurcation and Chaos, vol. 22, no. 6, Article ID 1250143, 2012.

S. K. Abd-El-Hafiz, A. G. Radwan, and S. H. AbdEl-Haleem, “Encryption applications of a generalized chaotic map,” Applied Mathematics & Information Sciences, vol. 9, no. 6, pp. 3215–3233, 2015.

W. S. Sayed, A. G. Radwan, and H. A. H. Fahmy, “Design of positive, negative, and alternating sign generalized logistic maps,” Discrete Dynamics in Nature and Society, vol. 2015, Article ID 586783, 23 pages, 2015.

K. T. Alligood, T. D. Sauer, and J. A. Yorke, Chaos—An Introduction to Dynamical Systems, Textbooks in Mathematical Sciences, Springer-Verlag, New York, NY, USA, 1997.

E. Schöll, Nonlinear Spatio-Temporal Dynamics and Chaos in Semiconductors, vol. 10, Cambridge University Press, 2001.

S. H. Strogatz, Nonlinear Dynamics and Chaos: With Applications to Physics, Biology, Chemistry, and Engineering, Westview Press, 2014.

R. K. Upadhyay and P. Roy, “Disease spread and its effect on population dynamics in heterogeneous environment,” International Journal of Bifurcation and Chaos in Applied Sciences and Engineering, vol. 26, no. 1, Article ID 1650004, 27 pages, 2016.

L. Liu and S. Miao, “The complexity of binary sequences using logistic chaotic maps,” Complexity, vol. 21, no. 6, pp. 121–129, 2016.

S. C. Phatak and S. S. Rao, “Logistic map: a possible random-number generator,” Physical Review E, vol. 51, no. 4, pp. 3670–3678, 1995.

L. Kocarev and G. Jakimoski, “Logistic map as a block encryption algorithm,” Physics Letters A, vol. 289, no. 4-5, pp. 199–206, 2001.

N. K. Pareek, V. Patidar, and K. K. Sud, “Image encryption using chaotic logistic map,” Image and Vision Computing, vol. 24, no. 9, pp. 926–934, 2006.

A. Kanso and N. Smaoui, “Logistic chaotic maps for binary numbers generations,” Chaos, Solitons & Fractals, vol. 40, no. 5, pp. 2557–2568, 2009.

V. Patidar, K. K. Sud, and N. K. Pareek, “A pseudo random bit generator based on chaotic logistic map and its statistical testing,” Informatica, vol. 33, no. 4, pp. 441–452, 2009.

N. Singh and A. Sinha, “Chaos-based secure communication system using logistic map,” Optics and Lasers in Engineering, vol. 48, no. 3, pp. 398–404, 2010.

Y. Liu, H. Fan, E. Y. Xie, G. Cheng, and C. Li, “Deciphering an image cipher based on mixed transformed logistic maps,” International Journal of Bifurcation and Chaos in Applied Sciences and Engineering, vol. 25, no. 13, Article ID 1550188, 9 pages, 2015.

D. A. Hsieh, “Chaos and nonlinear dynamics: application to financial markets,” The Journal of Finance, vol. 46, no. 5, pp. 1839–1877, 1991.

N. Basalto, R. Bellotti, F. De Carlo, P. Facchi, and S. Pascazio, “Clustering stock market companies via chaotic map synchronization,” Physica A: Statistical Mechanics and Its Applications, vol. 345, no. 1-2, pp. 196–206, 2005.

R. Bowen and J. Chazottes, Equilibrium States and the Ergodic Theory of Anosov Diffeomorphisms, vol. 470, Springer, 1975.

P. H. Borcherds and G. P. McCauley, “The digital tent map and the trapezoidal map,” Chaos, Solitons & Fractals, vol. 3, no. 4, pp. 451–466, 1993.

T. Addabbo, M. Alioto, A. Fort, S. Rocchi, and V. Vignoli, “The digital tent map: performance analysis and optimized design as a low-complexity source of pseudorandom bits,” IEEE Transactions on Instrumentation and Measurement, vol. 55, no. 5, pp. 1451–1458, 2006.

R. M. Corless, “What good are numerical simulations of chaotic dynamical systems?” Computers & Mathematics with Applications, vol. 28, no. 10–12, pp. 107–121, 1994.

S. Li, G. Chen, and X. Mou, “On the dynamical degradation of digital piecewise linear chaotic maps,” International Journal of Bifurcation and Chaos, vol. 15, no. 10, pp. 3119–3151, 2005.

K. J. Persohn and R. J. Povinelli, “Analyzing logistic map pseudorandom number generators for periodicity induced by finite precision floating-point representation,” Chaos, Solitons & Fractals, vol. 45, no. 3, pp. 238–245, 2012.

A. S. Mansingka, A. G. Radwan, M. A. Zidan, and K. N. Salama, “Analysis of bus width and delay on a fully digital signum nonlinearity chaotic oscillator,” in Proceedings of the 54th IEEE International Midwest Symposium on Circuits and Systems (MWSCAS '11), pp. 1–4, IEEE, Seoul, Republic of Korea, August 2011.

A. S. Mansingka, M. Affan Zidan, M. L. Barakat, A. G. Radwan, and K. N. Salama, “Fully digital jerk-based chaotic oscillators for high throughput pseudo-random number generators up to 8.77 Gbits/s,” Microelectronics Journal, vol. 44, no. 9, pp. 744–752, 2013.

İ. Öztürk and R. Kiliç, “Cycle lengths and correlation properties of finite precision chaotic maps,” International Journal of Bifurcation and Chaos, vol. 24, no. 9, Article ID 1450107, 14 pages, 2014.

H. Wang, B. Song, Q. Liu, J. Pan, and Q. Ding, “FPGA design and applicable analysis of discrete chaotic maps,” International Journal of Bifurcation and Chaos, vol. 24, no. 4, Article ID 1450054, 2014.

E. W. Weisstein, Logistic map. From MathWorld-A Wolfram Web Resource, 2014, http://mathworld.wolfram.com/LogisticMap.html.

M. Perc, “User friendly programs for nonlinear time series analysis,” 2010, http://www.matjazperc.com/ejp/time.html.

https://en.wikiquote.org/wiki/Mahatma_Gandhi.

A. Rukhin, J. Soto, J. Nechvatal, M. Smid, and E. Barker, “A statistical test suite for random and pseudorandom number generators for cryptographic applications,” Tech. Rep., DTIC Document, 2001.