Variant Map System of Random Sequences

Sequences of random variables play a key role in probability theory, stochastic processes, and statistics to analyze dynamic behavior. Speckle patterns have emerged as useful tools to explore space–time variations of random sequences in various measurement applications of comprehensive properties in complex space– time variation events. In this chapter, a variant map system is proposed to analyze statistical properties of random sequences in visual representations. An input 0–1 sequence will be divided into multiple segments and each segment of a ﬁxed length will be transformed into a 2-tuple pair of measures. Five measuring sets are identiﬁed and rearranged in a 1D or 2D numerical array as a histogram representing a visual map. These ﬁve types of maps consist of two types in 1D format as classical maps and three types in 2D format as variant maps. Properties are analyzed on all ﬁve types of maps. A cryptographic sequence of the AES cipher is selected as a sample stream. The ﬁve types of visual maps are generated and reﬁned clustering characteristics are organized into four groups on changes of segmented and shifted lengths for visual comparisons on enlarged 2DP maps. Speckle patterns of various distributions are observed. Three variant maps with distinct statistic distributions could be useful to provide new visual tools to explore comprehensive cryptographic sequences on complex nonlinear dynamic behavior in global network environments.

functions [9] etc., it is essential for ciphers to be integrated and implemented [20] to satisfy security models. However, different from LFSR with well-established linear mathematical theories and simulation tools, it is extremely difficult to use advanced nonlinear mathematical theories, recursive models, descriptive tools, and implementing schemes [17] in nonlinear dynamic environments.
How to evaluate cryptographic sequences generated from the nonlinear stream ciphers is an urgent problem for modern stream ciphers.

Truly Random Sequences from Hardware Devices and Speckle Patterns
In addition to pseudo-random sequences generated by stream ciphers, high-quality stochastic oscillators of truly random sequences are generated from special hardware devices such as laser photonics [21], nonlinear optics [22], quantum optics [23], quantum noises [24], thermal noise [25], chaos, and fractal nonlinear dynamics [26].
A list of truly random number generators are developed to extract stochastic information from speckle patterns [27], i.e., random bits from turbulence [28] to get random numbers from the speckle positions, generation of random arrays using laser speckle [29], 2D generation of random numbers by multimode fiber speckle [30], Markov speckle for efficient random bit generation [31] and dynamic laser speckle and applications [11].
Since various truly random sequences are created from specific physical models with special principles and uncertain methodologies, it is extremely difficult for cryptographic researchers to make proper measurements explore nonlinear dynamic properties.

Statistic Testing Packages on Cryptographic Sequences
Randomness has been explored for many years [32] on a series of statistic testing theories and methods. The NIST 800-22 testing package [33] is an effective statistic package on random sequences collecting a set of 16 statistic testing schemes in evaluations of statistic properties on cryptographic sequences. Statistic testing packages are very useful to catch a list of quantitative measurements evaluating randomness properties of cryptographic sequences in wider applications. However, testing schemes in various packages are mainly focused on P-value or a list of static properties of a testing sequence.
Since comprehensive behaviors in nonlinear dynamics may increase computational complexities tragically to involve complicated dynamic properties in the multivariate environment, those dynamic behaviors are completely ignored.

Gaussian Distribution and Speckle Pattern
Multivariate normal probability distribution models are the most important and powerful tools that are used to test stochastic characteristics of a random data sequence [34] under the framework of probability, stochastic process, and statistics [35] for nonlinear problems. In this kind of measuring models, when the data sequence is sufficiently long, the high-dimensional probability distribution of the sequence [36] is similar to the continuous Gaussian distribution. A typical projection model is shown in Fig. 1a; the central part shows a Gaussian surface with an unbalanced distribution in a 2D plane distributed as P(X, Y ) measures with pseudo-colors and its two 1D projections shown in both horizontal P(X ) and vertical P(Y ) planes, respectively. In Fig. 1b, a standard Gaussian surface with symmetric shapes is illustrated and the 2D projection of its pseudo-color map is shown in Fig. 1c with an ideal continuous distribution of color on the map. Different from ideally continuous distributions, in Fig. 1d, a real image generated from the Laser speckle phenomena [37] is illustrated as an objective speckle pattern [38] scattered by a laser beam from a plastic surface onto a wall. It is convenient for us to compare different color maps in Fig. 1c, d, respectively.
From these set of figures, the relationship between the projection curve and two 1D Gaussian distributions can be observed in the multivariate normal probability environment. Multivariate Gaussian probability distributions may support classical schemes to analyze complex stochastic data sets of measuring sequences in many applications in continuous conditions. But speckle patterns in Fig. 1d provide intrinsically discrete random patterns that may not be easily simulated by smoothed Gaussian map in Fig. 1c, further exploration on proper simulation and control mechanisms are required.

Controlling Deterministic Chaos
Controlling deterministic chaos has been an active R&D field in nonlinear dynamics over the past decades. From the pioneering work, significant progress has been achieved in control spatiotemporal chaos [39], plasma device, laser systems [40], chemical reactions, and biological systems both spatial and temporal dependence considered. The complex Ginzburg-Landau equation (CGLE) system [41] describes universal dynamics features near a supercritical Hopf bifurcation. It exhibits defected mediate turbulence or spiral turbulence in a wide parameter region. The control by generating a spiral wave seed has been described [42,43] to grow into a stable spiral in the CGLE system.
Systematic approaches on simulation of nonlinear behaviors, speckle phenomena in optics [37] and pattern dynamics [44] have been actively explored.

Poincaré Map
From a measuring viewpoint, spatial variations of a stochastic sequence will be changed by overall macro characteristics showing statistic measurements of distributed patterns [45] in a vector space, so that a random sequence is measured by an analytic space. From an analysis viewpoint, the Poincaré section [46] corresponds to a discrete map proposed by the eminent French scientist Henri Poincaré 100 years ago.
The Poincaré map handles additional information from sequential changes of ordered measurements in the phase space of classical dynamics, nonlinear dynamic systems [47] and chaos.
The mapping mechanism of the Poincaré map may be useful to handle dynamic patterns on cryptographic sequences of stream ciphers. This mapping scheme has been applied to observe the global randomness of cellular automata sequences on 2D maps [48] 20 years ago.

Variant Framework
Various schemes following the top-down strategy are explored to use multiple measures to partition special phase spaces from a top state set to multiple bottom states via multi-levels of a hierarchy in combinatorial algorithms [49], image analysis and processing for many years.
The conjugate classification [50] is proposed to apply seven measures in a hierarchy to partition the kernels of four regular plane lattices on n = {4, 5, 7, 9} cases for 2D binary images. For 1D cellular automata sequences, global random behaviors [48] are visualized in 2D maps.

Proposed Scheme
For the purpose of system characterization based on comprehensive measurements of cryptographic sequences, we propose a variant map system for a 0-1 stochastic sequence with length N . Multiple segments M are divided from the sequence by a given length m. A 2-tuple pair of measures can be extracted from a 0-1 segment that is the number of a single element and the number of 01 patterns in the segment. All paired measures are composed of a sequence of M pairs of measures as an ordered measuring set with M elements.
The pairs of the measuring sequence are directly separated into two independent measuring sequences to keep each parameter in the same order. Applying the pairing scheme of the Poincaré section, one single measuring sequence can be reorganized by two consequent measures as a 2-tuple pair of measures. Two measuring sequences in the Poincaré section and the original pairs of measuring sequence are arranged as the three sequences of 2-tuple measures. So a total of five sequences of distinct measures are constructed including two sequences on single measures and three sequences on 2-tuple measures.
Following this approach, two sets of single measuring sequences are sorted as two 1D numerical arrays as statistical histograms being classic 1D maps and three sets of 2-tuple measuring sequences are sorted as three 2D integer arrays as statistic histograms being three variant maps. Under the controlling operations on the changes of the segment lengths and shift displacements, multiple results of the five measuring sequences are transformed into 1D statistic histograms and 2D pseudo-color maps to show effective speckle patterns from the selected cryptographic sequence under various conditions of the combination on the two controlling parameters.

Organization of the Chapter
This chapter describes the variant map system in diagrams of the system architecture and the core modules with input/output and processing functions in Sect. 2. In Sect. 3, the relationships among measuring sequences and the five statistical distribution maps are analyzed. In Sect. 4, an AES cipher sequence is selected to form a series of statistical maps based on changes of the two control parameters. From the results of the visual maps in Sect. 4, intuitive analysis and brief comparisons are carried out in Sect. 5. Finally, in Sect. 6, the main results are summarized.

Framework
For the variant map system, the block diagrams of the system framework and the core modules of the system are shown in Fig. 2. The framework of the system architecture in Fig

Shift Segment Measurement SSM
The SSM module is shown in Fig. 2b.
Let X be a 0-1 vector with N elements as an input sequence,   Let Y be a 0-1 vector with N elements, this vector is generated by the shift operation under the loop displacement condition from the input sequence (i.e., a cyclic shift right + or shift left −) The shifted vector is inputted into the SM unit for a segmentation process. The input sequence will be divided from a long sequence with N elements into M = N /m segments as a set of sub-vectors with m elements and each segment This sequence of sub-vectors after the segmenting operation forms the following m × M matrix, m positions for the i-th complete row vector in the sequence correspond to a pair of 2-tuple measures: ( p i , q i ), and incomplete parts of the last sub-vector are ignored.
The pair of 2-tuple measures ( p i , q i ) is determined by the following formula: The parameter p i is the number of single elements in the i-th sub-vector, the parameter q i is the number of 01 pattern overlapped in the i-th sub-vector in a cyclic condition. For any segment m > 0, 0 ≤ p i ≤ m, 0 ≤ q i ≤ m/2 , all segments are transformed from a random sequence with N elements into a measuring sequence with M elements.
The SSM module outputs the ordered pairs of 2-tuple measures

Measuring Sequence Combination MSC
The MSC module is described in Fig. 2c, the module is composed of two units: the Measuring Split MS and the Measuring Combination MC. The MS unit processes the SSM module's output, and splits the measuring sequence with 2-tuple measures into two independent measuring sequences: to keep the original measuring number invariant.
Recombining each single measuring sequence by overlapping consequent elements as a pair, the MC unit will form two independent measuring sequences organized in 2-tuple measures: to provide appropriate sequences for subsequent processing modules.
The MSC module produces the following four measure sequences:

Projective Color Map PCM
The PCM module consists of two units: PA,CM. For five measuring sequences, 1D and 2D measures will be processed separately.
The PA unit processes relevant measuring sequences to transform them into integer arrays and the CM unit will visualize these on either normalized histograms (1D measures) or color maps (2D measures), respectively.

1D Measures
The 1D measures involve two measuring sequences: float) arrays to represent the corresponding elements, which are defined in the following.

1DP Map
The 1DP statistic histogram: for a sequence { p i } M−1 i=0 , N P, P are two arrays (float, integer) with (m + 1) elements. The j-th elements N P[ j], P[ j], 0 ≤ j ≤ m, can be obtained from the following procedure: In the 1DP map, the PA unit corresponds to Initialization and Calculation; the CM unit handles Normalization.

1DQ Map
The 1DQ statistic histogram: for a sequence {q i } M−1 i=0 , N Q, Q are two arrays (float, integer) with ( m/2 + 1) elements. The j-th elements N Q[ j], Q[ j], 0 ≤ j ≤ m/2 , can be obtained from the following procedure: Using P, N P, Q, N Q arrays, it is possible to generate the corresponding 1D statistical histograms as 1D maps.
In the 1DQ map, the PA unit corresponds to Initialization and Calculation; the CM unit handles Normalization.

2D Measures
The 2D measures specially process three measuring sequences: , P Q[m + 1 : m/2 + 1] be three 2D integer arrays to represent the corresponding elements, which are defined in the following. In the 2DP map, the PA unit corresponds to Initialization and Calculation; the CM unit handles pseudo-color. In the 2DQ map, the PA unit corresponds to Initialization and Calculation; the CM unit handles Pseudo-color.

2DPQ Map
, can be obtained from the following procedure: In the 2DPQ map, the PA unit corresponds to Initialization and Calculation; the CM unit handles Pseudo-color.
The final results of the variant map system are five maps: 1DP, 1DQ, 2DP, 2DQ, and 2DPQ as expected statistic distributions of the input 0-1 sequence.

Ideal Condition
From a viewpoint of sequence analysis, it is a classical technology to sort the { p i } M−1 i=0 measuring sequence as a 1D statistic histogram. When the measuring sequence meets ideal conditions, the 1D statistical distribution is a binomial distribution.

Corollary 1 If the input sequence meets the conditions of Lemma 1, then the total number of items in the 1DP array is equal to
Lemma 2 If the input sequence meets the conditions of Lemma 1, then the 1DQ array satisfies the following relation:

Brief Discussion
From the listed statement in lemmas, theorems, and corollaries, Lemmas 1 and 2 described an ideal input sequence where each segment is a uniform distribution which appears only once. Under this ideal condition, both 1DP and 1DQ arrays are corresponding to a binomial distribution. Corollaries 1 and 2 have shown that both 1DP and 1DQ arrays meet the number of quantitative characteristics for the ideal input sequence. Theorems 1 and 2 establish projective conditions on any input sequence. A 2DP or 2DQ array has its 1D projection of two directions on the same array. Theorem 3 claims that for any 2DPQ array, two projections are corresponding to both 1DP and 1DQ arrays, respectively.
Corollaries 3 and 4 treat 2DP and 2DQ arrays, respectively, in the total number of summing conditions on their quantitative characteristics. Corollary 5 is associated with Theorem 3 on a 2DPQ array to share with other four projections the same quantitative characteristics. In Corollary 5, the total number of each component on five statistic arrays is equal to the total number of segments M, a 2DPQ array occupies a central position in the projection to other arrays. Corollary 6 uses inequalities to show five scales of numbers of items in five arrays to provide the maximal number of items involved in the structure.
From a viewpoint of complex stochastic sequence analysis, this partition mode corresponds to the maximum number of clusters distinguished in the condition of multiple segments. Different from surface analysis based on the multivariate Gaussian probability distribution, variant maps provide only a limited finite number of lattice points that form space-related clusters on the projection position. Under the condition of segments in larger length, the 2DP array has the maximum number of distinct items and can be clearly distinguished among the five arrays to make the most visible map showing the largest refined distribution in details.

Sample Maps
Since the ideal distribution may appear merely on specific conditions, it is very difficult to use algebraic formulas to describe measuring sequences on statistical maps of an arbitrary cryptographic sequence. For complicated data sequences, the most effective scheme is using the computational approach directly to generate relevant maps and then to make feasible comparisons. Among the five maps generated from an input 0-1 sequence, more 2DP maps are selected in this section to illustrate a series of changes among segment lengths and shifting lengths for refined details.
In this section, one cryptographic sequence generated from an AES cipher is selected as a sample sequence, and various control parameters will be changed. This sample sequence has a fixed length N = 10 6 in one million stochastic bits. Various changes are made on the length m of segment and shift displacement r . Five maps will be applied to show their special statistical distributions.

Small Changes in Segment Lengths: 2DP Maps;
Variation Series in Lengths of Segments m = {125, 126, 127}, r = 0 Two groups of maps are compared in Fig. 6 based on slightly changing segment lengths.   In Fig. 9a and b, two maps of speckle patterns are selected from two distinct resources for comparison. (a) a larger map from the 2DP form is generated in m = 128, r = 0 condition; (b) a larger map of Fig. 1d is illustrated for a laser beam reflected from a plastic surface onto a wall. It is convenient for readers to observe the two speckle pattern maps in refined details.  Because a 2DQ map covers only a quarter of a 2DP map, the damaging ratio of its symmetric properties appears much weaker than on the 2DP map. Applying a sufficiently larger segment length, central areas are observed with random speckle patterns and visible symmetric properties significantly damaged.
In general, it is feasible for a 2DP map to observe its middle areas in an approximately rotational symmetry in small sizes. But when the segment length is big enough, significant speckle patterns emerge in the central area with stronger stochastic properties. In the 2DPQ maps of Fig. 4d-i, when m = {8, 16}, there appears a single central point as a key cluster to collect the maximal number with visible symmetrical patterns on the horizontal direction, but without symmetrical pattern on the vertical direction in Fig. 4d-h. However, when m = 128, the 2DPQ map of Fig. 4f appears as an irregular disk with higher values in the central area.
From the 2DPQ map of Fig. 4i, the enlarged map shows that stochastic speckle patterns appear in the central area with better horizontal symmetry than vertical direction with significantly damaged details.

Figure 6
In Fig. 6a-i, the nine maps are listed to show small changes on lengths of segments m = {126, 127, 128}. By checking the three 1DP maps in Fig. 6a-c, three middle areas appear slightly different from the bell shape: (a) left is higher than right; (b) right is higher than left; (c) right is higher than left and the middle one is lower than its nearest neighbors.
The three 2DP maps in (d)-(f) appear significantly as circular disks with an approximate symmetry and higher clusters around central areas. In the three enlarged 2DP maps in (g)-(i), there appear various speckle patterns in central areas.
Comparing the six maps of (a)-(c) and (g)-(i), speckle patterns in the three 2DP maps (g)-(i) are much easier identified than broken curving patterns in the three 1DP maps (a)-(c).

Figure 7
In Fig. 7a-i, the nine maps are listed to analyze changes of the parameters m = 128, r = {1, 2, 8}. By checking the three 1DP maps in Fig. 7a-c, middle areas of three maps appear slightly different from the regular bell shape: (a) left is lower than middle and middle is equal to right; (b) left and right are lower than middle, and right is higher than left; (c) left-middle-right are equal.
The three 2DP maps in (d)-(f) appear as similar circular disks with an approximate symmetry and higher clusters around central areas. In the three enlarged 2DP maps (g)-(i), there are various speckle patterns distinguishably placed in central areas.
Comparing the six maps of (a)-(c) and (g)-(i), distinguishable speckle patterns in the three 2DP maps (g)-(i) are much easier identified than broken curving patterns in the three 1DP maps (a)-(c).

Figures 8-9
In Fig. 8a- In Fig. 9a-b, two enlarged maps of speckle patterns are selected. The map (a) with m = 128, r = 0 provides refined details to illustrate stochastic speckle patterns in the central area and the map (b) with m = 128, r = 8 has the same segment length, but a different shift length. The highest color clusters of the map (b) appear more compact and simpler than the highest color clusters of the map (a). The two maps are showing different speckle patterns as a result of simple geometric transformations.
By comparing the two enlarged speckle pattern maps, significant similarities and differences in details could be recognized.

Conclusion
For any 0-1 sequence with N elements, the variant map system processes multiple segments to transform each segment in a pair of measures. Using the cryptographic sequence generated from the AES cipher, five statistic maps were created. Two 1D maps show binomial distributions to which we refer as classical maps. Three 2D maps are constructed as variant maps. Selecting smaller segmented lengths, both classical and variant maps were illustrated in four groups. With larger segmented lengths increased, there are significant speckle patterns observed. From a brief comparison of the two larger maps, the enlarged 2DP maps in Fig. 9a, b show better refined visual details than other smaller maps.
For the 2DPQ map, there are significant horizontal symmetries observed, however, there is no reflection effect in the vertical direction.
From different 2DP maps with parameters m = {125, . . . , 128}, significant changes are observed: various speckle patterns are developed by both changes between lengths of segments and shift displacements. Enlarged maps are convenient to illustrate stochastic speckle patterns visibly. Some significant clusters are collected with speckle patterns associated to different control parameters in relevant maps.
From a viewpoint of system operation, two types of control parameters: length of segments and shift length of the sequence, provide an effective control mechanism to form clear speckle patterns on 2D distributions. It is necessary for us to put more attention on systematically exploring this type of issues, for refined researches on further directions. The variant map system is different from both technologies: extracting information of speckle patterns to form random sequences and NIST 800-22 statistic testing package to use a single measurement of a P-value or a list of static parameters for evaluation. The variant framework provides five maps to identify complicated measurements through speckle patterns in details for any cryptographic sequence. Three refined 2D maps have more accurate properties than two 1D maps to describe nonlinear dynamic behavior as possible quantitative measurements.
In relation to the variant map system, future explorations on both theoretical foundation and key applications on cryptographic sequences are urgently required. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.