Skip to content

ravenholm-tourism/chaoscrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stream Cipher using Chaotic Cryptography

Note this is not a secure cryptosystem and is vulnerable to several attacks

This project is an implementation of the stream cipher introduced by baptista in this paper. The primary purpose of this project is to explore the properties of cryptosystems that use chaotic maps. The current version uses the Logistic Map, but I hope to include other well-known one dimensional maps (Tent Map, Dyadic Map, Circle Map) and higher dimensional ones (Complex Quadratic Map, Arnold's Cat Map, Rössler system, Lorentz Equations).

Encryption Parameters

  • initial position to begin iterating from x0
  • the logistic map's control parameter b
    • From the logistic map equation xn+1 = b * xn * (1 - xn)
    • This controls whether or not the function is chaotic (defaults to known chaotic value 3.8)
  • A set of characters A that your message is written with (its alphabet)
    • uses ASCII 256 by default
  • A mapping S that maps each character in A to a sub-interval of [.2, .8]
    • For example "h" → (0.44375000000000, 0.44609375000000]
  • Transient time N0 - the number of initial iterations to ignore so that close initial positions have sufficient time to diverge
    • This is essentially the Lyapunov Time of the chaotic system
    • For the Logistic Map, default value is 250
  • η determines which iteration in an orbit that lands in a character's sub-interval to use. Each iteration that lands in the interval has a probability of P = 1 - normaldistcdf(η) to be chosen as the interation number for that character's ciphertext. If a given iteration is not chosen, then the map continues iterating until it lands in the sub-interval again and has a chance to be chosen.
    • note: if η=0 then the first iteration to enter the interval is used
  • msg plaintext message with characters in A

ciphertext

  • sequence of 16-bit unsigned ints - each is number of iterations to get to interval mapped to the next plaintext char

key

  • char-to-interval mapping AS = {[s0, s1), ..., [sn, sn+1)}
    • can modify this by permuting the order that chars are stored in the alphabet array
  • initial condition x0
  • control parameter b

notes

  • choose b to make map chaotic, e.g. 3.8
    • other values work as well, like 3.78. See here
  • choose a transient time high enough to allow for divergence, N0 >> map's lyapunov time, ~250

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published