Chaos and Cryptography: 0 Min Max Min Max
Chaos and Cryptography: 0 Min Max Min Max
Chaos and Cryptography: 0 Min Max Min Max
Vishaal Kapoor
December 4, 2003
1. Choose a pair (r, x0) and determine the interval of interest [xmin, xmax].
2. Subdivide the interval [xmin, xmax] into n ”sites” (subintervals), each corre-
sponding to an letter of the alphabet.
3. For each character in the plaintext string s
Do x0 := rx0(1 − x0)
Until x0 reaches the site corresponding to the current plaintext character
and random() > p
The ciphertext is the number of iterations taken.
Here, random() is a function that generates a random number from 0 to 1
and p is a coefficient that can be arbitrarily chosen in (0, 1] with larger values
corresponding to higher security and longer encryption times. Note that p is
independent of the key and is not needed to decrypt the message.
Before After
D := Digits;
Digits := 16;
c[1] := 100;
# Main loop
for i from 1 to n do
while(true) do
if(trunc((x0-0.2)*256/0.6) = s[i] and rand()/10^12 > p)
then break; fi;
x0 := r*x0*(1-x0);
c[i] := 1 + c[i];
od;
od;
Digits := D;
RETURN(c);
end:
# c is the cipher text
# n length of plaintext string
# (_x0,r) is the initial condition and parameter secret key
# xmin, xmax are the boundaries of the sites
D := Digits;
Digits := 16;
ep := (xmax-xmin)/256;
x0 := _x0;
p := [seq(0, i=1..n)];
# Main Loop
for i from 1 to n do
for j from 1 to c[i] do
x0 := r*x0*(1-x0);
od;
p[i] := trunc((x0-0.2)*256/0.6);
od;
s := "";
for i from 1 to n do
s := sprintf("%s%c", s,p[i]);
od; RETURN(s);
end:
There are several requirements of our secret key (r, x0) which we have yet to
mention. The most important such requirement is that r must be chosen so that
the map
xn+1 = rxn(1 − xn )
exhibits chaos.
Some definitions are in order: For an orbit x0, x1, x2, ..., we define the Lyapunov
exponent λ to be
n−1
1X
λ = limn→∞ ln|f 0 (xi)|,
n i=0
provided the limit exists. In the case of an aperiodic trajectory with a positive
Lyapunov exponent, we say the trajectory is a chaotic orbit. The system is said
to exhibit chaos if there is a regime with chaotic orbits.
Jacobson [4] assures us that there is a non-zero probability that a randomly
chosen r in [r∞, 4] will be responsible for chaos. Here r∞ is approximately 3.57 -
an accumulation point of period doubling bifurcations. In practice, the diagram
below
shows us that values of r > r∞ will most likely work (note these are the domain
corresponding to positive range values above).
|xk − a| < δ.
In our case of the logistic equation with secret key (r, x0), this says that every
point in [xmin , xmax] should be approached arbitrarly closely by some iterate x k .
This condition is actually more than sufficient to ensure that every site is reachable
by x0 an infinite number of times.
Proving such assertions are satisfied for a given r is difficult in the general
case. We warm up by proving a special case for r = 4. In this case, we make a
substitution
πy 1
x = sin2( ) = (1 − cos(πy)),
2 2
where x, y ∈ [0, 1]. Substituting in the logistic equation, we obtain
sin2 (πyn+1/2) = 1 − cos2 (πyn ) = sin2(πyn ).
Continuing, we have (πyn+1/2) = ±(πyn ) + sπ where s is an integer. As y is
restricted in [0, 1], we must have yn+1 = 2yn for 0 ≤ yn ≤ 21 , and yn+1 = 2 − 2yn
for 12 ≤ yn ≤ 1. This is just the tent map. Since the tent map is chaotic, the
logistic equation for r = 4 must be as well.
Let us consider the case for r = 3.78. The orbital densities of the logistic map
for this r numerically show that the attractor lies in the interval [x min , xmax] =
[0.2, 0.8].
0.03
0.025
0.02
0.015
0.01
0.005
As well, the figure indicates that each site is reachable with non-zero proba-
bility. Thus, we would expect each site to be approached an infinite number of
times in the trajectory of x0.
This discussion above shows that the security of the cryptosystem in [1] relies on
a small fraction of the many possible trajectories based on the secret key (r, x 0).
This problem could easily be worked around by using much larger fixed point pre-
cision; however, a full analysis is warrented. The author is currently developing a
practical attack on this cryptosystem.
Bibliography
[1] Baptista, M. S. Cryptography with Chaos. Physics Letters A 240 (1998): 50-54
[2] Ott, Edward. Chaos in dynamical systems. Cambridge University Press, 2002.
[3] Davies, Brian. Exploring chaos. Theory and experiment. Perseus Books, 1999.
[4] Jacobson, M. V. Topological and Metric Properties of One Dimensional Endomorphisms. Sov. Math.
Dokl. 19 (1978): 1452.
[5] http://home.hkstar.com/hmk409/research/ces/main.htm (Chaotic Encryption Standard)
[6] http://icg.harvard.edu/math118r/
[7] Strogatz, S. H. Nonlinear dynamics and chaos. With Applications to Physics, Biology, Chemistry,
and Engineering. Westview Press, 2000.