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, [14]. 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 bywhere 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 [810], pseudo-random number generation [11], secure data and image transfer techniques [1217] 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 .

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 [2430]. 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.).

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.

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 .

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 .

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 “.”

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.

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).

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.

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.

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.

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.

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 bywhere 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 derivativeSubstituting (4) in (2) and using the properties of logarithm, we getwhere 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.

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.

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.

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.

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.

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.

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.

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.

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.