## A secret message from another dimension

We’ve touched on the difference between chaos and randomness before.  One strange property of chaotic systems is that they are able to synchronise to each other, so that in spite of their intrinsic tendency to vary wildly, a chaotic system can (actually quite easily) be persuaded to match the behaviour of another chaotic system. As this post will show, it is possible to use this property for a kind of secret message transmission.

The technique was published in a 1993 paper here by Cuomo and Oppenheim. They created a coupled analogue electronic version of the Lorenz system. The system consists of two nearly identical circuits. The first (call it the “transmitter”) generates chaotic voltage signals. The second system (the “receiver”) is identical to the first, except that one of the feedback pathways in the circuit is effectively cut, and replaced with a voltage taken from the same location in the transmitter. Even if they start in different states, the two circuits rapidly synchronise and produce identical voltage signals.

The next thing they did was add a very small perturbation to the transmitter signal, containing an audio message. The transmitted signal is still dominated by chaos so if you listen to it directly, it sounds like meaningless noise. However, they found that the receiving chaotic circuit reconstructed the original chaotic voltage without the message on top. This means by subtracting the reconstructed voltage from the transmitted signal, the message can be recovered at the receiver.

The system looks a bit like this:

A simple version of this experiment can be done on a computer very rapidly, without the need to build any circuitry. First, instead of the chaotic circuit, we are going to use the logistic map to produce chaos. This is quite simple, all you have to do is pick a starting value between 0 and 1 (usually pick one randomly), and call that $x_0$. Then generate values of $x_1,x_2$ etc by repeatedly applying the following equation.

$x_{n+1} = rx_n(1-x_n)$

Choose $r=3.9$ to get a nice chaotic result (not all values of $r$ produce chaos). Then take a message that you want to encrypt, call it $m$, and make sure that in magnitude it is much smaller than the chaotic signal, and add them together. In an equation, we get a signal $s$ by doing:

$s_n = x_n+\frac{m_n}{100}$.

If you play back this signal, it will sound like random noise. If we transmit this signal, we can assume that a third party listening to it won’t be able to hear the original message.

But, suppose we use another logistic map system to generate another chaotic signal $x'$. Except this time, instead of iterating only the current value of the system to get the next state, we average the current state of the system with the signal that was transmitted. We called the transmitted signal $s$, so the new logistic map system is:

$x'_{n+1} = r\frac{x'_n+s_n}{2}(1-\frac{x'_n+s_n}{2})$

Again with $r=3.9$. It turns out that $x'$ actually looks very similar to $x$. This might seem very strange, but it is actually the case. It’s not mathematically easy to prove either, but trust me, at least to a close approximation, this is true, and a demonstration follows shortly. So what happens if we subtract $x'$ from the signal $s$, to get a reconstructed signal $r$?

$r_n = s_n - x'_n = s_n-x_n$

But $s$ was just the sum of $m$ and $x$ so

$r_n = \frac{m_n}{100} + x_n - x_n = \frac{m_n}{100}$.

So (after multiplying by 100), we have a reconstruction of the original secret message! This doesn’t work perfectly, as the recovered chaotic signal does not perfectly match the original. However, I’ve found that it works well enough. I coded this up and tested it on a clip from The Twilight Zone, publicly available here. My program performs the chaotic masking exactly as above, and saves the resulting transmission signal ($s$) to a file. A second script performs the reconstruction of the message. I’ve uploaded the result to YouTube below.

The first noise you hear is the original message. Following by the transmitted signal, and finally the message after reconstruction. You’ll notice that it’s not a perfect reconstruction, but it’s not bad!

### 9 Responses to “A secret message from another dimension”

1. You should add the code. (open square bracket) sourcecode language=”python” (close square bracket) CODE (open square bracket) /sourcecode (close square bracket)

2. Very cool! Is this method used by anything to actually encrypt stuff? Also could it be easily broken?

3. No, Yes.

4. I meant to say in the post somewhere, its not proper encryption so I was trying to avoid using that word (though I seem to have slipped…) I don’t think it would be hard to attack it because the signal is still in there in a pretty obvious fashion, its just inaudible to the human ear – i.e. its not really computationally secure. And yeah, for that reason, I very much doubt anyone has successfully used it so far for anything other than fun or demonstrating how chaos is weird.

Also will post some code once I’ve cleaned it up a bit, so ugly at the moment…

5. Encoder code here:

http://pastebin.com/aseVPwu2

Decoder code here:

http://pastebin.com/YHESHCjD

Also, for fun, here is another encrypted message, this time I won’t give away what’s in it:

http://www.sussex.ac.uk/Users/jt241/chaos_encrypted.wav

• This is very neat. To give us an extra challenge, why not give us a message masked with a different chaotic attractor, without telling us which one or what the parameters are? I reckon I could probably extract the message – if you post one I’ll give it a go…

6. Ah, good idea, will make some…