6 \subsection{A metric on $\mathcal{X}_{\mathsf{N},\mathcal{P}}$}
8 We define a distance $d$ on $\mathcal{X}_{\mathsf{N},\mathcal{P}}$ as follows.
10 $x=(e,s)$ and $\check{x}=(\check{e},\check{s})$ in
11 $\mathcal{X}_{\mathsf{N},\mathcal{P}} = \mathds{B}^\mathsf{N} \times \mathds{S}_{\mathsf{N},\mathcal{P}} $,
12 where $s=(u,v)$ and $\check{s}=(\check{u},\check{v})$ are in $ \mathds{S}_{\mathsf{N},\mathcal{P}} =
13 \mathcal{S}_{\llbracket 1, \mathsf{N} \rrbracket} \times \mathcal{S}_\mathcal{P}$.
15 \item $e$ and $\check{e}$ are integers belonging in $\llbracket 0, 2^{\mathsf{N}-1} \rrbracket$. The Hamming distance
16 on their binary decomposition, that is, the number of dissimilar binary digits, constitutes the integral
17 part of $d(X,\check{X})$.
18 \item The fractional part is constituted by the differences between $v^0$ and $\check{v}^0$, followed by the differences
19 between finite sequences $u^0, u^1, \hdots, u^{v^0-1}$ and $\check{u}^0, \check{u}^1, \hdots, \check{u}^{\check{v}^0-1}$, followed by
20 differences between $v^1$ and $\check{v}^1$, followed by the differences
21 between $u^{v^0}, u^{v^0+1}, \hdots, u^{v^1-1}$ and $\check{u}^{\check{v}^0}, \check{u}^{\check{v}^0+1}, \hdots, \check{u}^{\check{v}^1-1}$, etc.
22 More precisely, let $p = \lfloor \log_{10}{(\max{\mathcal{P}})}\rfloor +1$ and $n = \lfloor \log_{10}{(\mathsf{N})}\rfloor +1$.
24 \item The $p$ first digits of $d(x,\check{x})$ is $|v^0-\check{v}^0|$ written in decimal numeration (and with $p$ digits).
25 \item The next $n\times \max{(\mathcal{P})}$ digits aim at measuring how much $u^0, u^1, \hdots, u^{v^0-1}$ differs from $\check{u}^0, \check{u}^1, \hdots, \check{u}^{\check{v}^0-1}$. The $n$ first
26 digits are $|u^0-\check{u}^0|$. They are followed by
27 $|u^1-\check{u}^1|$ written with $n$ digits, etc.
30 $v^0=\check{v}^0$, then the process is continued until $|u^{v^0-1}-\check{u}^{\check{v}^0-1}|$ and the fractional
31 part of $d(X,\check{X})$ is completed by 0's until reaching
32 $p+n\times \max{(\mathcal{P})}$ digits.
33 \item If $v^0<\check{v}^0$, then the $ \max{(\mathcal{P})}$ blocs of $n$
34 digits are $|u^0-\check{u}^0|$, ..., $|u^{v^0-1}-\check{u}^{v^0-1}|$,
35 $\check{u}^{v^0}$ (on $n$ digits), ..., $\check{u}^{\check{v}^0-1}$ (on $n$ digits), followed by 0's if required.
36 \item The case $v^0>\check{v}^0$ is dealt similarly.
38 \item The next $p$ digits are $|v^1-\check{v}^1|$, etc.
46 Consider for instance that $\mathsf{N}=13$, $\mathcal{P}=\{1,2,11\}$ (so $\mathsf{p}=3$), and that
49 u=\underline{6,} ~ \underline{11,5}, ...\\
56 \check{u}=\underline{6,4} ~ \underline{1}, ...\\
61 So $d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}(s,\check{s}) = 0.010004000000000000000000011005 ...$
62 Indeed, the $p=2$ first digits are 01, as $|v^0-\check{v}^0|=1$,
63 and we use $p$ digits to code this difference ($\mathcal{P}$ being $\{1,2,11\}$, this difference can be equal to 10). We then take the $v^0=1$ first terms of $u$, each term being coded in $n=2$ digits, that is, 06. As we can iterate
64 at most $\max{(\mathcal{P})}$ times, we must complete this
65 value by some 0's in such a way that the obtained result
66 has $n\times \max{(\mathcal{P})}=22$ digits, that is:
67 0600000000000000000000. Similarly, the $\check{v}^0=2$ first
68 terms in $\check{u}$ are represented by 0604000000000000000000, and the absolute value of their
69 difference is equal to 0004000000000000000000. These digits are concatenated to 01, and
70 we start again with the remainder of the sequences.
75 Consider now that $\mathsf{N}=9$, and $\mathcal{P}=\{2,7\}$, and that
79 u=\underline{6,7,} ~ \underline{4,2,} ...\\
86 \check{u}=\underline{4, 9, 6, 3, 6, 6, 7,} ~ \underline{9, 8}, ...\\
91 So $d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}(s,\check{s}) = 0.5173633305600000...$, as $|v^0-\check{v}^0|=5$, $|4963667-6700000| = 1736333$, $|v^1-\check{v}^1|=0$,
92 and $|9800000-4200000| = 5600000$.
97 $d$ can be more rigorously written as follows:
98 $$d(x,\check{x})=d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}(s,\check{s})+d_{\mathds{B}^\mathsf{N}}(e,\check{e}),$$
99 where: % $p=\max \mathcal{P}$ and:
101 \item $d_{\mathds{B}^\mathsf{N}}$ is the Hamming distance,
102 \item $\forall s=(u,v), \check{s}=(\check{u},\check{v}) \in \mathcal{S}_{\mathsf{N},\mathcal{P}}$,\newline
104 d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}(s,\check{s}) &= &
105 \sum_{k=0}^\infty \dfrac{1}{10^{(k+1)p+kn\max{(\mathcal{P})}}}
106 \bigg(|v^k - \check{v}^k| \\
107 & & + \left| \sum_{l=0}^{v^k-1}
108 \dfrac{u^{\sum_{m=0}^{k-1} v^m +l}}{ 10^{(l+1)n}} -
109 \sum_{l=0}^{\check{v}^k-1}
110 \dfrac{\check{u}^{\sum_{m=0}^{k-1} \check{v}^m +l}}{ 10^{(l+1)n}} \right| \bigg)
112 $$ %\left| \sum_{l=0}^{v^k-1} \dfrac{u^{\sum_{m=0}^{k-1} v^m +l}}{ 10^{l}} - \sum_{l=0}^{\check{v}^k-1} \dfrac{\check{u}^{\sum_{m=0}^{k-1} \check{v}^m +l}}{ 10^{l}}\right|\right)}.$$
118 $d$ is a distance on $\mathcal{X}_{\mathsf{N},\mathcal{P}}$.
123 $d_{\mathds{B}^\mathsf{N}}$ is the Hamming distance. We will prove that
124 $d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}$ is a distance
125 too, thus $d$ will also be a distance, being the sum of two distances.
127 \item Obviously, $d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}(s,\check{s})\geqslant 0$, and if $s=\check{s}$, then
128 $d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}(s,\check{s})=0$. Conversely, if $d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}(s,\check{s})=0$, then
129 $\forall k \in \mathds{N}, v^k=\check{v}^k$ due to the
130 definition of $d$. Then, as digits between positions $p+1$ and $p+n$ are null and correspond to $|u^0-\check{u}^0|$, we can conclude that $u^0=\check{u}^0$. An extension of this result to the whole first $n \times \max{(\mathcal{P})}$ bloc leads to $u^i=\check{u}^i$, $\forall i \leqslant v^0=\check{v}^0$, and by checking all the $n \times \max{(\mathcal{P})}$ blocs, $u=\check{u}$.
131 \item $d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}$ is clearly symmetric
132 ($d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}(s,\check{s})=d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}(\check{s},s)$).
133 \item The triangle inequality is obtained because the absolute value satisfies it too.
138 Before being able to study the topological behavior of the general
139 chaotic iterations, we must first establish that:
142 For all $f:\mathds{B}^\mathsf{N} \longrightarrow \mathds{B}^\mathsf{N} $, the function $G_f$ is continuous on
143 $\left( \mathcal{X},d\right)$.
148 We will show this result by using the sequential continuity. Consider a
149 sequence $x^n=(e^n,(u^n,v^n)) \in \mathcal{X}_{\mathsf{N},\mathcal{P}}^\mathds{N}$ such
150 that $d(x^n,x) \longrightarrow 0$, for some $x=(e,(u,v))\in
151 \mathcal{X}_{\mathsf{N},\mathcal{P}}$. We will show that
152 $d\left(G_f(x^n),G_f(x)\right) \longrightarrow 0$.
153 Remark that $u$ and $v$ are sequences of sequences.
155 As $d(x^n,x) \longrightarrow 0$, there exists
156 $n_0\in\mathds{N}$ such that
157 $d(x^n,x) < 10^{-(p+n \max{(\mathcal{P})})}$
158 (its $p+n \max{(\mathcal{P})}$ first digits are null).
159 In particular, $\forall n \geqslant n_0, e^n=e$,
160 as the Hamming distance between the integral parts of
161 $x$ and $\check{x}$ is 0. Similarly, due to the nullity
162 of the $p+n \max{(\mathcal{P})}$ first digits of
163 $d(x^n,x)$, we can conclude that $\forall n \geqslant n_0$,
164 $(v^n)^0=v^0$, and that $\forall n \geqslant n_0$,
165 $(u^n)^0=u^0$, $(u^n)^1=u^1$, ..., $(u^n)^{v^0-1}=u^{v^0-1}$.
168 \item $G_f(x^n)_1=G_f(x)_1$: they have the same
169 Boolean vector as first coordinate.
170 \item $d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}(\Sigma (u^n,v^n); \Sigma(u,v)) = 10^{p+n \max{(\mathcal{P})}} d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}((u^n,v^n); (u,v))$. As the right part of the equality tends
171 to 0, we can deduce that it is the case too for the left part of the equality, and so
172 $G_f(x^n)_2$ is convergent to $G_f(x)_2$.
178 \subsection{$\Gamma_{\mathcal{P}}(f)$ as an extension of $\Gamma(f)$}
180 Let $\mathcal{P}=\{p_1, p_2, \hdots, p_\mathsf{p}\}$.
181 We define the directed graph $\Gamma_{\mathcal{P}}(f)$ as follows.
183 \item Its vertices are the $2^\mathsf{N}$ elements of $\mathds{B}^\mathsf{N}$.
184 \item Each vertex has $\displaystyle{\sum_{i=1}^\mathsf{p} \mathsf{N}^{p_i}}$ arrows, namely all the $p_1, p_2, \hdots, p_\mathsf{p}$ tuples
185 having their elements in $\llbracket 1, \mathsf{N} \rrbracket $.
186 \item There is an arc labeled $u_0, \hdots, u_{p_i-1}$, $i \in \llbracket 1, \mathsf{p} \rrbracket$ between vertices $x$ and $y$ if and only if
187 $y=F_{f,p_i} (x, (u_0, \hdots, u_{p_i-1})) $.
190 It is not hard to see that the graph $\Gamma_{\{1\}}(f)$ is
195 \begin{subfigure}[b]{0.45\textwidth}
197 \includegraphics[scale=0.85]{graphe1.pdf}
198 \caption{$\Gamma(f_0)$}
201 ~ %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc.
202 % (or a blank line to force the subfigure onto a new line)
203 \begin{subfigure}[b]{0.3\textwidth}
205 \includegraphics[scale=0.85]{graphe2.pdf}
206 \caption{$\Gamma_{\{2,3\}}(f_0)$}
209 ~ %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc.
210 \caption{Iterating $f_0:(x_1,x_2) \mapsto (\overline{x_1}, \overline{x_2})$}
216 Consider for instance $\mathsf{N}=2$,
217 Let $f_0:\mathds{B}^2 \longrightarrow \mathds{B}^2$ be the negation function,
218 \textit{i.e.}, $f_0(x_1,x_2) = (\overline{x_1}, \overline{x_2})$, and consider
219 $\mathcal{P}=\{2,3\}$. The graphs of iterations are given in
220 \textsc{Figure~\ref{fig:itg}}.
221 The \textsc{Figure~\ref{graphe1}} shows what happens when
222 displaying each iteration result.
223 On the contrary, the \textsc{Figure~\ref{graphe2}} explicits the behaviors
224 when always applying 2 or 3 modification and next outputing results.
225 Notice that here, orientations of arcs are not necessary
226 since the function $f_0$ is equal to its inverse $f_0^{-1}$.
229 \subsection{Proofs of chaos}
234 $\Gamma_{\mathcal{P}}(f)$ is strongly connected if and only if $G_f$ is
235 topologically transitive on $(\mathcal{X}_{\mathsf{N},\mathcal{P}}, d)$.
240 Suppose that $\Gamma_{\mathcal{P}}(f)$ is strongly connected.
241 Let $x=(e,(u,v)),\check{x}=(\check{e},(\check{u},\check{v}))
242 \in \mathcal{X}_{\mathsf{N},\mathcal{P}}$ and $\varepsilon >0$.
243 We will find a point $y$ in the open ball $\mathcal{B}(x,\varepsilon )$ and
244 $n_0 \in \mathds{N}$ such that $G_f^{n_0}(y)=\check{x}$: this strong transitivity
245 will imply the transitivity property.
246 We can suppose that $\varepsilon <1$ without loss of generality.
248 Let us denote by $(E,(U,V))$ the elements of $y$. As
249 $y$ must be in $\mathcal{B}(x,\varepsilon)$ and $\varepsilon < 1$,
250 $E$ must be equal to $e$. Let $k=\lfloor \log_{10} (\varepsilon) \rfloor +1$.
251 $d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}((u,v),(U,V))$ must be lower than
252 $\varepsilon$, so the $k$ first digits of the fractional part of
253 $d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}((u,v),(U,V))$ are null.
254 Let $k_1$ the smallest integer such that, if $V^0=v^0$, ..., $V^{k_1}=v^{k_1}$,
255 $U^0=u^0$, ..., $U^{\sum_{l=0}^{k_1}V^l-1} = u^{\sum_{l=0}^{k_1}v^l-1}$.
256 Then $d_{\mathds{S}_{\mathsf{N},\mathcal{P}}}((u,v),(U,V))<\varepsilon$.
257 In other words, any $y$ of the form $(e,((u^0, ..., u^{\sum_{l=0}^{k_1}v^l-1}),
258 (v^0, ..., v^{k_1}))$ is in $\mathcal{B}(x,\varepsilon)$.
260 Let $y^0$ such a point and $z=G_f^{k_1}(y^0) = (e',(u',v'))$. $\Gamma_{\mathcal{P}}(f)$
261 being strongly connected, there is a path between $e'$ and $\check{e}$. Denote
262 by $a_0, \hdots, a_{k_2}$ the edges visited by this path. We denote by
263 $V^{k_1}=|a_0|$ (number of terms in the finite sequence $a_1$),
264 $V^{k_1+1}=|a_1|$, ..., $V^{k_1+k_2}=|a_{k_2}|$, and by
265 $U^{k_1}=a_0^0$, $U^{k_1+1}=a_0^1$, ..., $U^{k_1+V_{k_1}-1}=a_0^{V_{k_1}-1}$,
266 $U^{k_1+V_{k_1}}=a_1^{0}$, $U^{k_1+V_{k_1}+1}=a_1^{1}$,...
268 Let $y=(e,((u^0, ..., u^{\sum_{l=0}^{k_1}v^l-1}, a_0^0, ..., a_0^{|a_0|}, a_1^0, ..., a_1^{|a_1|},...,
269 a_{k_2}^0, ..., a_{k_2}^{|a_{k_2}|},$ \linebreak
270 $\check{u}^0, \check{u}^1, ...),(v^0, ..., v^{k_1},|a_0|, ...,
271 |a_{k_2}|,\check{v}^0, \check{v}^1, ...)))$. So $y\in \mathcal{B}(x,\varepsilon)$
272 and $G_{f}^{k_1+k_2}(y)=\check{x}$.
275 Conversely, if $\Gamma_{\mathcal{P}}(f)$ is not strongly connected, then there are
276 2 vertices $e_1$ and $e_2$ such that there is no path between $e_1$ and $e_2$.
277 That is, it is impossible to find $(u,v)\in \mathds{S}_{\mathsf{N},\mathcal{P}}$
278 and $n \mathds{N}$ such that $G_f^n(e,(u,v))_1=e_2$. The open ball $\mathcal{B}(e_2, 1/2)$
279 cannot be reached from any neighborhood of $e_1$, and thus $G_f$ is not transitive.
285 If $\Gamma_{\mathcal{P}}(f)$ is strongly connected, then $G_f$ is
286 regular on $(\mathcal{X}_{\mathsf{N},\mathcal{P}}, d)$.
290 Let $x=(e,(u,v)) \in \mathcal{X}_{\mathsf{N},\mathcal{P}}$ and $\varepsilon >0$.
291 As in the proofs of Prop.~\ref{prop:trans}, let $k_1 \in \mathds{N}$ such
293 $$\left\{(e, ((u^0, ..., u^{v^{k_1-1}},U^0, U^1, ...),(v^0, ..., v^{k_1},V^0, V^1, ...)) \mid \right.$$
294 $$\left.\forall i,j \in \mathds{N}, U^i \in \llbracket 1, \mathsf{N} \rrbracket, V^j \in \mathcal{P}\right\}
295 \subset \mathcal{B}(x,\varepsilon),$$
296 and $y=G_f^{k_1}(e,(u,v))$. $\Gamma_{\mathcal{P}}(f)$ being strongly connected,
297 there is at least a path from the Boolean state $y_1$ of $y$ and $e$.
298 Denote by $a_0, \hdots, a_{k_2}$ the edges of such a path.
300 $$(e,((u^0, ..., u^{v^{k_1-1}},a_0^0, ..., a_0^{|a_0|}, a_1^0, ..., a_1^{|a_1|},...,
301 a_{k_2}^0, ..., a_{k_2}^{|a_{k_2}|},u^0, ..., u^{v^{k_1-1}},$$
302 $$a_0^0, ...,a_{k_2}^{|a_{k_2}|}...),(v^0, ..., v^{k_1}, |a_0|, ..., |a_{k_2}|,v^0, ..., v^{k_1}, |a_0|, ..., |a_{k_2}|,...))$$
303 is a periodic point in the neighborhood $\mathcal{B}(x,\varepsilon)$ of $x$.
306 $G_f$ being topologically transitive and regular, we can thus conclude that
308 The function $G_f$ is chaotic on $(\mathcal{X}_{\mathsf{N},\mathcal{P}},d)$ if
309 and only if its iteration graph $\Gamma_{\mathcal{P}}(f)$ is strongly connected.
313 The pseudorandom number generator $\chi_{\textit{14Secrypt}}$ is not chaotic
314 on $(\mathcal{X}_{\mathsf{N},\{b\}},d)$ for the negation function.
317 In this context, $\mathcal{P}$ is the singleton $\{b\}$.
318 If $b$ is even, any vertex $e$ of $\Gamma_{\{b\}}(f_0)$ cannot reach
319 its neighborhood and thus $\Gamma_{\{b\}}(f_0)$ is not strongly connected.
320 If $b$ is even, any vertex $e$ of $\Gamma_{\{b\}}(f_0)$ cannot reach itself
321 and thus $\Gamma_{\{b\}}(f_0)$ is not strongly connected.
324 The next section shows how to generate functions and a iteration number $b$
325 such that $\Gamma_{\{b\}}$ is strongly connected.