Tinker tailor tourist spy › Forums › Bureau of Security and Signals Intelligence Forum › Challenges from competitors
Tagged: Python Automation
- This topic has 181 replies, 15 voices, and was last updated 4 days, 13 hours ago by
Madness.
-
AuthorPosts
-
22nd February 2021 at 3:48 pm #53294
Madness
Participant@Mattyrat2027, there is a really good exposition of fitness functions at
http://practicalcryptography.com/cryptanalysis/text-characterisation/quadgrams/
I couldn’t explain it any better.
(Before anyone asks, I am not connected in any way to that website.)The hill-climbing attack on the Pollux cipher goes like this:
The fitness function is based on 10-gram (dekagram) frequencies of English that has been encoded with Morse.
In other words, I took a big block of English text and encoded it, then I counted up how many times
………. occurs, then how many times ………_ occurs, etc., up to xxxxxxxxxx. There are 3^10 entries in
the table. The fitness function is otherwise the same as in the practicalcryptography.com example.
To climb the hill, it starts with a random key, which is a string of 36 dots, dashes, and x’s. At each step, it
changes one of these symbols to something else. If that results in a better fitness, it keeps the change and
continues. If not, it tries changing a different symbol in the the key. To avoid getting stuck in a local
max, the algorithm allows a downward step about 5% of the time, if the step is only a little bit downward.
When the fitness cannot be improved any longer, it spits out the key.
(Again, don’t assume that I invented this trick; I did not.)
@F6exb, could you please rephrase the question? I don’t understand what you are asking.22nd February 2021 at 6:09 pm #53295F6exb
Participant@Madness,
In your example of hill climbing, there is a lot of “-” “x” and “.”.x..x..x….-xx-..-x………-xx..xx -15.4769347575
.x..x..x…x-xx-..-x………-xx..xx -15.2620088256
.x..x..x…x-xx-..-x……….xx..xx -15.1371076389Can you explain the meaning of these patterns ?
23rd February 2021 at 9:08 am #53296 -
AuthorPosts
- You must be logged in to reply to this topic.