Welcome Guest [Log In] [Register]
Welcome to Crypto. We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Byrne's Setup procedure
Topic Started: Jul 12 2010, 11:37 AM (1,371 Views)
Elite member
[ *  *  *  *  * ]

Here is how Byrne setup his machine with normal alphabets and then enciphered a secret keyword to mix the alphabets on both wheels, preparatory to enciphering the main message.

For Exhibit 1, a genetic algorithm shows that the keyword used by Byrne was TILNOYHIVK.

He initially setup the wheels with the normal alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ, with the 'A' at the zenith. After enciphering the keyword, the wheels then contained the mixed alphabets recovered by fiziwig:


Byrne then enciphered the plaintext of Exhibit 1 'ALLGOODQQUICKBROWNFOXESJUMPOVERLAZYDOGTOSAVETHEIRPARTYW' and so on.

At first sight the key looks nonsensical but when the key is written over the ciphertext clarity emerges:


the true key emerges as THINKTHINK. Byrne has alternated the wheels used for enciphering. He has enciphered the first letter using the right wheel (normal practice) but has enciphered the second and third letters using the left wheel and so on as follows:


So really he used two setup keys. The first was THINKTHINK and the second was the alternating order RLLRLLRRLR.

The genetic algorithm I used scanned keylengths starting at 5, and found the solution in a couple of minutes. Not very difficult once the main task is done, accomplished brilliantly by fiziwig, of finding the mixed alphabets at the start of the message.
Edited by james, Jul 12 2010, 11:40 AM.
Offline Profile Quote Post Goto Top
Elite member
[ *  *  *  *  * ]

Nice bit of detective work. I'm impressed. :)

Knowing what general procedure he used should theoretically make it easier to attack any unknown enciphered texts by looking for short keywords that might have been used to scramble the initial alphabets.

Offline Profile Quote Post Goto Top
Super member
[ *  *  *  * ]
Hi james,

You wrote back in July "The genetic algorithm I used scanned keylengths starting at 5, and found the solution in a couple of minutes". The other day I tried to duplicate your results by writing my own genetic algorithm, without success. Assuming I'm searching for a key of length N, my algorithm starts with a random string of length N. It mutates the key in a loop, calculating its "entropy" (using Carl Scheffler's definition of 'ring entropy'). Any key that reduces the entropy becomes the parent key. The loop continues until no entropy change occurs for 50,000 mutations.

The first version used a simple mutation scheme: randomly change one of the key letters to something else. This proved to be way too slow and not powerful enough.

My current version uses several schemes for mutating a key:

  • Modify 1-3 random characters in the key
  • Swap two positions within the key
  • Shift the key cyclically left or right
  • Cut the key in half and swap the halves

The program selects these mutations on a random basis, with preference for the first two. I've let the program run all night but results have not been good. The best I can get is an entropy of 3 ("LHITBDNKSB") while the expected key is "THIKKTBDNB". There are similarities ("LHI-TBDNKSB" vs "THIKKTBDNB") but no cigar. That iteration looked like this:
New session (1410)
Initial entropy = 18
Best (entropy, key) so far = (5, HKBDNUKWIB)
Initial key: LKNTCCLFPB
(a) [ 19] LKXTCCMFPA: 21 -> 18 (modifyRandomCharacters (3))
(a) [ 181] LKXTCCMFQB: 18 -> 15 (modifyRandomCharacters (2))
(a) [ 450] LKITCCMFQB: 15 -> 13 (modifyRandomCharacters (1))
(a) [ 28185] LKITBDNFQB: 13 -> 12 (modifyRandomCharacters (3))
(a) [ 28306] LDITBKNFQB: 12 -> 11 (swapTwoPositions)
(a) [ 28500] LCITBKNFQB: 11 -> 10 (modifyRandomCharacters (1))
(a) [ 28899] LCITBFNKQB: 10 -> 7 (swapTwoPositions)
(a) [ 47641] LHITBDNKRB: 7 -> 5 (modifyRandomCharacters (3))
(a) [ 48621] LHITBDNKSB: 5 -> 3 (modifyRandomCharacters (1))

Would you be willing to share with us how your genetic algorithm was designed, i.e., how does it mutate the key? How many iterations does your program run on a key until it gives up and generates another key?

Thanks in advance,

Offline Profile Quote Post Goto Top
Elite member
[ *  *  *  *  * ]
Would you be willing to share with us how your genetic algorithm was designed

Sorry Moshe but I've decided to save this interesting approach for Cryptologia.

Offline Profile Quote Post Goto Top
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Chaocipher · Next Topic »
Add Reply