# Chryptography with Chaotic Systems

## Deterministic Chaotic Systems
These are `non-linear` differential equations that are 
***very*** sensitive to initial conditions. One of the most 
famous is the `Lorentz-Attractor`.

Since we cannot get back to these initial conditions, these are 
***unpredictable systems***.

>[!NOTE]
> $s(x)$ is a sync message added to the other `system` to get it 
> produce the same `output` as the `first one`.
>
> Here it is represented its effect in `red`.
>
> In `yellow` you see a simple gain factor coming from the same 
> $s(x)$

Let's say we have 2 of these `systems`:
$$
\begin{align*}
    x(t); z(t) &\triangleq \text{chaotic systems}\\
    e(t) = x(t) - z(t) \rightarrow 0 
    &\triangleq \text{synchronization} \\
    s(x) = f(x) + Kx &\triangleq \text{synchronization signal}

   
\end{align*}\\

\begin{cases}
        \dot{x}(t) = Ax(t) + Bf(x) + c\\
        \dot{z}(t) = Az(t) + Bf(z) + c 
        \textcolor{red}{+ Bf(x) - Bf(z)}\\
        \dot{e}(t) = \dot{x}(t) - \dot{z}(t)
\end{cases}\\

\begin{align*}
    \dot{e}(t) &= \dot{x}(t) - \dot{z}(t) = \\
   &=  Ax(t) + Bf(x) + c -  Az(t) - Bf(z) - c = \\
   &=  A(x(t) - z(t))+ B(f(x) - f(z)) = \\
   &=  Ae(t)+ B(f(x) - f(z)) = \\
   &=  Ae(t)+ B(f(x) - f(z)\textcolor{red}{-f(x) + f(z)}) = \\
   &=  Ae(t) \longrightarrow e(t) \rightarrow 0 
   \text{ if } eig(A)\in \R^- \\

   &= Ae(t) \textcolor{yellow}{-BKx + BKz} = (A - BK)e
\end{align*}
$$

At the end of all, you can basically add a message into 
$\hat{s}(x) = s(x) + m(t)$ and after getting the new value $z(t)$
I can extract from here the message:
$$
\hat{s}(x) - f(z) -Kz = f(x) + Kx + m(t) - f(x) - Kx = m(t)
$$