# Chaos Based Cryptographic Pseudo-Random Number Generator Template with Dynamic State Change +
## 3 Generator Implementation and Testing
### Randomness Test Results  
The entropy builder in [32] changed both parameters \(a\) and \(b\) by computing entropy \(E_{1}\). In Figure 7 it can be observed that there is an obvious linear dependency between the two. This is also the case for the new entropy builder proposed in this paper, \(E_{2}\). When using two builders concurrently, accumulating entropy differently, the parameters are completely uncorrelated and so they cover all the possible space, as depicted on the right image in Figure 7.  
Analyzing the Lyapunov exponents for the generalized Henon map in Figure 3, it can be seen that for \(b=0.1\) and all \(a\leq 1.35\), the exponents are negative denoting pairs that do not determine chaotic behavior. Surely enough, when attempting to use them without any entro  
Figure 7: Entropy builder, \(E_{1}\) and \(E_{2}\) on the left, \(E_{1}E_{2}\) and \(E_{2}E_{1}\) on the right. and _NIST_ tests fail, as it can be seen in Table 3 where several configurations were tested with the three-dimensional generalized Henon map and a known non-chaotic initial state:  
\[(a,b,x_{0},y_{0},z_{0})=(1.35,\ 0.1,\ 0.814724,\ 0.905792,\ 0.126987)\]  
When introducing an entropy builder of type \(E_{1}\) (sum), the vast majority of tests pass. For \(E_{2}\) builder all tests fail even when changing the parameters at each iteration. The \(E_{1},E_{2}\) combination however yields good results, as expected, passing all tests. For a Monte Carlo analysis, one hundred tuples were randomly selected from an uniform distribution in their corresponding definition intervals in order to characterize the generator instances. The histogram of failed tests for each generator configuration is given in Figure 8. It is clear that the correct use of an entropy builder greatly improves the randomness quality of the generator. There can also be observed that the smaller values for parameter change interval--changing the parameters more often--also improves the quality of the generator, but, as it will be seen in the next subsection, with a throughput performance penalty. Surprisingly, the lower cost sum entropy builder \(E_{1}\) performs better than \(E_{2}\) in terms of statistical tests results. Nevertheless, \(E_{2}\) with an interval of 10 displays the best results of all tested configurations. \(E_{2}\) results are the most irregular, both displaying the best and the worst results depending on the parameter change interval. One explanation would be that the _sinus_ function used by \(E_{2}\) is periodic so randomness function of the change interval is also periodic. Thus, results alternate from all tests failing for 20 and 40 to extremely good results for 10 and 30. However a combination of the two builders gives the best results on average, but still showing a performance decay with the increase of the parameter change interval. \(NF\_GEN\) general form in Table 2 is evaluated through several tests run with no entropy builder as well as with a generic form of the \(E_{1}\) builder. \(E_{1}\) sums all state values when builds up entropy and generates new parameter values by using a fractional modulo operation in order to force the values in a particular range. The considered range is \((-1;1)\). The results for the generator without an entropy is shown in Figure 8 as the last column and it is evident that the percentage of tests passed is rather low. When using the entropy builder \(E_{1}\), the results did not improve. On the contrary, all tests for all configurations failed. The reason, most likely, is not selecting appropriate intervals for the 10 parameters of the function. This issue needs further study in future research.