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

,


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][2][3][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 onedimensional 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][9][10], pseudo-random number generation [11], secure data and image transfer techniques [12][13][14][15][16][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  > 0, the first bifurcation point in the positive side  1+ = 1, where the type of the first nonzero solution is a fixed point.In addition, the upper bound on the output  max+ = 1 which takes place at  max = 4. (ii) For  < 0, the first bifurcation point in the negative side  1− = −1, where the type of the first nonzero solution is period-2.In addition, the lower and upper bounds on the output are  min− = −0.5 and  max− = 1.5, respectively, which take place at  min = −2.
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  0 ; 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.

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][25][26][27][28][29][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.[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 illconditioned 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.

Continuous Time Chaotic Systems. Corless in
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 ODEbased 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.

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 fixedpoint 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 8 and 64 bits of precision.

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,  ∈ [−2, 4] and  ∈ [−0.5, 1.5], are totally representable in 4 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  ∈ [−0.5, 1.5] 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 8 correspond to the least bus size offered by FPGAs, that is, 4 bits in both the integer and the fractional parts.A reasonable upper bound  = 27 resembles the equality of the number of fractional bits   = 23 to the number of bits in the Complexity (ii) All operations are carried out assuming truncation.
(iii) Two's complement coding representation is used.

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.).Throughout the rest of the discussion, all results are obtained by MATLAB starting at initial point  0 = 0.5, discarding the first 1,000 iterations and considering the next 500 ones, except where stated otherwise.Figure 3 shows the bifurcation diagram versus the control parameter  at  = 9, 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.
From the bifurcation diagrams,  3 () and  6 () 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,  0 = 2 −  , could cause the response to die out.In addition, any quantity less than 2 −  will be considered zero after truncation to   fractional bits.(ii) Analytically, it would be expected from (1) that two initial points with difference = 1 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  0 = 0.125.

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  3 () versus the control parameter  is plotted for different precisions in Figure 5, while that of  6 () is shown in Figure 6, both starting at initial point  0 = 0.5.The resulting diagrams reveal that the properties of the logistic map are so much affected by precision.These properties include the following: the keypoints 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  max or  min .

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.

Double-Precision Floating-Point.
Using doubleprecision floating-point calculations,  1+ = 0.969,  max+ = 0.999738909465984,  1− = −0.967, min− = −0.49974730424707,and  max− = 1.5.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.

Fixed-Point Implementation.
Using fixed-point map versions  3 () and  6 (), let us consider the positive control parameter side at first. Figure 7(a) shows the values of  1+ for 8 ≤  ≤ 26 for various initial points  0 = {0.125,0.25, 0.375, 0.5}.For the map  3 (), Figure 7(a) shows that  1+ starts at values higher than its analytic value "1" at low precisions and then starts to decrease gradually approaching "1"; on the other hand,  6 () seems insensitive to precision from the viewpoint of the value of  1+ 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  max+ avg on responses starting at multiple initial conditions versus different precisions.For both maps,  max+ avg starts at values lower than its analytic value "1" at low precisions, then starts to increase gradually, with some fluctuations, approaching "1." Similarly, the key-points of the bifurcation diagram in the negative control parameter side are studied.Figure 8(a) shows the values of  1− where similar comments to the positive control parameter case could describe the plot but for the absolute value | 1− | instead.Figure 8(b) shows the values of  min− avg at different precisions, whereas Figure 8(c) shows the values of  max− avg .The map  6 () seems to be less sensitive to precision variation than  3 ().The average minimum value  min− avg starts at low precisions with absolute values which are lower than 0.5, whereas  max− avg starts with values which are lower than 1.5.As precision increases, the key-points approach their analytical values.7(a) and 8(a), the values of  1+ and  1− seem insensitive to the value of initial point  0 .On the other hand, the effect of initial point on the values of  max+ ,  min− , and  max− cannot be avoided in finite precision implementations especially at low precisions.The value  max+ occurs at  = 4, whereas  min− and  max− occur at  = −2.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.

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  = 23 for  3 () and  = 20 for  6 (), for instance.

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  = 4 or  = −2 which exhibit the widest chaotic response rich in applications are chosen.Figures 9  and 10 show the time series at  = 3.9375 of the maps  3 () and  6 (), 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  = 8 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  0 analytically expected to be chaotic are periodic instead, for example, Figure 10(b).
For example, to study the reason behind the strange result obtained in Figure 10 in Figure 11 which is a rough plot for the orbit of  starting at different initial points  0 , 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  0 = 0.125 or 0.25 is the same as the plot in case of  0 = 0.5 which fluctuates between six different values, that is, period-6.The output states are as follows (these are the decimal equivalents of the binary sequences represented in the used fixed-point representation at  = 20, i.e., 16 fractional bits): 0.5 → 0.984375 → 0.0605621337890625 → 0.2240142822265625 → 0.6844635009765625 → 0.85040283203125 → 0.5009307861328125 → 0.984375 . ... Any orbit, at the same  and , including one of these six values, consequently the others, will converge to the same sequence of period-6.On the other hand, the case  0 = 0.375 exhibits a much longer sequence that could be considered "chaotic."Assuming infinite precision, period-6 solution could be obtained through solving  6 (  ) =   along with the stability analysis of the periodic point; |( 6 )  (  )| = 1.This would yield value(s) for  at which period-6 solution starts to appear and the corresponding values for .According to [31], the value  = 3.9375 is close to one of these values.
For further illustration, Figure 12 shows the time series for  = 3.984375 which is representable in  ≥ 10.Although the neighborhood of this value does not contain near values that generate periodic sequences, some combinations of , and  0 could also yield faulty periodic response.Figure 13 shows the time series at  = −1.984375at different combinations of (), , and  0 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.
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  0 , 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  + 1.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  + 1 instead of ,  0 +  instead of  0 (for small ), and any of the orders   (),  ∈ {1, 2, 3, 4, 5, 6} are illustrated more in Section 4.3.It is expected that, at relatively high precisions,  0 and  0 +  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.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.

Periodicity of the Generated Sequence
Reaching such combinations could be described as an attempt to solve the inverse problem where the value of  +1 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 (, , ,  0 ).For example, at  = 4 and  = 8, our experiments yield period lengths of 1 for the 15 available initial points using orders  1 ,  4 ,  5 , and  6 .However, they yield the same results as [26] with period lengths of either 1 or 3 at the same corresponding initial points using  2 and  3 .Moreover, lower values of  which were not considered by [26] are found out to yield longer period length of 4 at several combinations of ,  0 , 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 3.8125 to 4 in steps of 2 −  and all initial points allowed by the precision.It seems that  3 () = ((1 − )) yields relatively higher periods.Some other orders are acceptable where the best are  2 (),  3 (), and  6 () 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 −2 to −1.8125 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,  1 and  6 at  = 11.This indicates some merits of the logistic map with negative control parameter over the conventional logistic map with positive control parameter.
It would be expected that the sequence period is governed by the maximum number of levels allowed by the chosen precision, for example, 2   for  > 0. 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  = 13, and the hypothetical maximum number of levels equal 2 9 = 512 levels.However, experimental results show that the maximum achievable period or number of distinct levels before repeating the sequence is roughly 50 for positive logistic map and 70 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  3 ().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  0 as expected.As precision  increases, the number of alternatives for (,  0 , ) 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.

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 ln 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: where the minimum value for Δ theoretically equals 2 −  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 onedimensional 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  ≥ 22 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  < 22 as previously mentioned.
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].

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  0 .The arithmetic unit is used to compute  +1 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  0 to the Register.Otherwise, the Multiplexer will pass  +1 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.
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  0 are used as the encryption key.Hence, the keyspace is 2 2 .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.x n (7 : 0) 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 "l"; "space"; and "o" are always transformed to "d"; "( "; and "g," respectively.Similarly, in (d), the characters "l"; "space"; and "o" are always transformed to " }"; "1"; and "→," respectively.This is due to the fact that for  = 2 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.
Moreover, Table 3 shows the encryption results for a famous quote by Mahatma Gandhi [33] using 27-bit bus size and two different keys, ( 01 ,  1 ) = (0.5078741312, 3.7501969337) and ( 02 ,  2 ) = (0.7578741312, 3.7501969337).The number of different bits between Bus size = 8 bits  = 3.75 x 0 = 0.5 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.
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 45bit bus size, are summarized in Table 4.For all tests the initial point  0 is set to 0.5 + 2 −13 while  is set to 4 − 2 −  , 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.Moreover, the system has been tested with an image encryption application as shown in Table 5.The standard gray color Lena (256 × 256) 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.
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 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 2 8 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.

Entropy = −
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.
The proposed stream cipher system, with 8-bit up to 27bit 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.

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

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

Figure 5 :
Figure 5: Bifurcation diagram of  3 () versus the control parameter  for different values of bus size starting at  0 = 0.5.

Figure 6 :
Figure 6: Bifurcation diagram of  6 () versus the control parameter  for different values of bus size starting at  0 = 0.5.

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

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

Figure 9 :
Figure 9: Time series of  3 () at  = 3.9375 starting at different initial conditions and various precisions.

Figure 10 :
Figure 10: Time series of  6 () at  = 3.9375 starting at different initial conditions and various precisions.

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

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

Figure 19 :
Figure 19: Stream cipher system for encryption applications.

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

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

Table 2 :
Synthesis results of the stream cipher system.

Table 3 :
Encryption results for a famous quote using a bus size of 27 bits and two different keys.
Plain textLive as if you were to die tomorrow.Learn as if you were to live forever. ..Ciphertext ( 0 1 ,  1 )

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