Zodiac Discussion Forum

z340: Routes in Qua…
 
Notifications
Clear all

z340: Routes in Quadrants

76 Posts
18 Users
0 Reactions
17.3 K Views
 _pi
(@_pi)
Posts: 113
Estimable Member
Topic starter
 

Here is another transposition exercise on the z340. I wanted to investigate how the cipher would respond to being read, in quadrants, as a combination of 4 route ciphers (i.e. one route cipher per quadrant). My goal was to go through a list of route patterns and exhaustively evaluate all possible permutations by applying different routes to different quadrants and measure the repeating n-gram count (or number of repeating patterns) of the resulting ciphers. I was curious to see if by shuffling the cipher in this way, the cipher’s original pattern count would increase or decrease. I wanted to see if the shuffled cipher could reach a pattern count proportionally similar to the z408, considering the ciphers’ length difference and the difference in the number of distinct cipher symbols.

Here are the route patterns that are used in this test:

1A: read in sequential horizontal or vertical lines.
1B: same as 1A but by alternating the reading direction (i.e. zigzagging)
2A: read in diagonal lines (using 1×1 steps)
2B: same as 2A but by alternating the reading direction (i.e. zigzagging)
3A: read in diagonal lines (using 1×2 or 2×1 steps)
3B: same as 3A but by alternating the reading direction (i.e. zigzagging)
4A: read in an inward spiral pattern
4B: read in an outward spiral pattern

Each of these route types are evaluated in all possible directions, starting from every corner of the quadrant.

The following quadrant sizes are tested (width x height):
1. Q1: 7×10:, Q2: 10×10, Q3: 7×10, Q4: 10×10
2. Q1: 8×10:, Q2: 9×10, Q3: 8×10, Q4: 9×10
3. Q1: 9×10:, Q2: 8×10, Q3: 9×10, Q4: 8×10

Once the quadrants are read in routes, they are written back using 2 different methods:
1. Simply writing the content of each route in a single contiguous line, or
2. Writing back each route in its corresponding quadrant, from top-left to bottom-right.

The total number of variations considered in this exercise is above 150 million.

RESULTS

A surprising amount of shuffled ciphers exhibit n-gram counts higher than the original z340. The following image illustrates 4 examples that yield a high number of patterns (the red arrows indicate, when ambiguous, where the route starts in that quadrant):

I have taken a screenshot of the patterns displayed in ZKD for each of the above examples, compared to the original z408 and z340 patterns:

Clearly, by rearranging the z340 as if each quadrant is a distinct route cipher, it is possible to significantly increase the repeating n-gram count of the resulting cipher; in some cases, the pattern count is more than quadrupled.

When considering all the rearrangements with an 9-8 vertical split, 15% of the resulting ciphers exhibit an n-gram count higher than the z340. For an 8-9 vertical split, that number increases to 18%.

To put this result in perspective, I conducted the same shuffling on the z408 (8-9 vertical split, 12-12 horizontal split) to see how many resulting ciphers exhibited a repeating n-gram count higher than the original z408. The result: 0.0000076%.

What this implies is that applying this shuffling strategy on a straight substitution cipher such as the z408 clearly scrambles it and reduces its pattern count. However, when applying this strategy on the z340, in more than 15% of the cases, the resulting cipher shows a stronger pattern count, appearing to be less scrambled.

_pi

 
Posted : July 28, 2013 2:17 am
traveller1st
(@traveller1st)
Posts: 3583
Member Moderator
 

Hi pi,

This is just a question that has occurred to my whilst thinking through your post. It’s not an informed question so I might have missed the answer lol. The examples of the 340 here have a different route cipher in each quadrant and, as per your presentation, produced some high n-gram examples. The question is did you try it with the ‘same’ route cipher in each quadrant and if so how did the n-grams fare in those?


I don’t know Chief, he’s very smart or very dumb.

 
Posted : July 28, 2013 2:53 am
morf13
(@morf13)
Posts: 7527
Member Admin
 

I bet Doranchak could add something to this topic.

There is more than one way to lose your life to a killer

http://www.zodiackillersite.com/
http://zodiackillersite.blogspot.com/
https://twitter.com/Morf13ZKS

 
Posted : July 28, 2013 5:15 am
Marclean
(@marcelo-leandro)
Posts: 764
Prominent Member
 

Hello, that this interesting work, it seems great. I’m translating to try to understand.

https://zodiacode1933.blogspot.com/

 
Posted : July 28, 2013 6:39 am
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

Very cool experiment, pi!

My question is: If you started with a test cipher, 340 symbols long, that is a normal substitution cipher, and has the same symbol distribution and repeated ngram counts as the real 340, how many of the manipulated versions would have improved ngram counts?

http://zodiackillerciphers.com

 
Posted : July 28, 2013 3:08 pm
 _pi
(@_pi)
Posts: 113
Estimable Member
Topic starter
 

Hi Trav. Good suggestion. I will extract that specific data and post the results.

 
Posted : July 28, 2013 8:32 pm
 _pi
(@_pi)
Posts: 113
Estimable Member
Topic starter
 

If you started with a test cipher, 340 symbols long, that is a normal substitution cipher, and has the same symbol distribution and repeated ngram counts as the real 340, how many of the manipulated versions would have improved ngram counts?

I will see what I can do in trying to create such a test cipher. Have you ever created one yourself? My feeling is that the low pattern count (at least compared to the z408) of the z340 is a "symptom" of its encryption technique so I don’t know how easy it will be to replicate the pattern count by generating a straight substitution cipher. I will give it a try and see…

 
Posted : July 28, 2013 8:45 pm
traveller1st
(@traveller1st)
Posts: 3583
Member Moderator
 

Hi Trav. Good suggestion. I will extract that specific data and post the results.

Cool. I was just thinking about it in terms of another benchmark against which to gauge the success level of these results. That’s about as informed as my thinking gets on these things. :D

EDIT: Keep forgetting to add, very good work.


I don’t know Chief, he’s very smart or very dumb.

 
Posted : July 28, 2013 8:47 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

I will see what I can do in trying to create such a test cipher. Have you ever created one yourself? My feeling is that the low pattern count (at least compared to the z408) of the z340 is a "symptom" of its encryption technique so I don’t know how easy it will be to replicate the pattern count by generating a straight substitution cipher. I will give it a try and see…

Not yet but I will eventually make some. "Tony Baloney" made one with similar repetitions:

https://code.google.com/p/zkdecrypto/source/browse/trunk/zkdecrypto/cipher/340.tonyb.example.txt

It has the same number of repeated trigrams, and a slightly higher number of repeated bigrams.

http://zodiackillerciphers.com

 
Posted : July 28, 2013 10:42 pm
 _pi
(@_pi)
Posts: 113
Estimable Member
Topic starter
 

"Tony Baloney" made one with similar repetitions…

I tested the same technique on this sample cipher that you referred to. With an 8-9 vertical split, 3.6% of the rearrangements show n-gram counts higher than the original cipher.

I save to file the highest scoring rearrangements during my tests. For the z340 tests, I arbitrarily set the threshold to a minimal total count of 57 repeating patterns for a resulting cipher to be written to file. My last z340 rearrangement test generated 70 ciphers with a total count above 57.

For this "Tony Baloney" test cipher, 0 cipher showed a total count above 57.

So while the z408 is apparently not suited at all to have its n-gram count increased using this strategy, this test cipher does allow for some increase but clearly not as frequently and with smaller counts than the z340.

The next step will be to find a way to programmatically generate z340-like straight substitution ciphers and run this test on a bunch of them to determine if the z340 is unique in its way of responding to this unscrambling strategy.

 
Posted : July 29, 2013 9:22 am
smithy
(@smithy)
Posts: 955
Prominent Member
 

I like this.
I don’t like that the 340 doesn’t have an even number of columns, but sticks with the 17 column format.
I do like is that this approach has an impact on those "pivot point" features which – even though statistically they’re not impossible (I think we agreed) – continue to aggravate me.
There’s a "340-generator" out there somwhere, but as usual my memory’s failing as I approach my retirement, damnit. I’ll go look.
Nice work!

 
Posted : July 29, 2013 5:17 pm
 _pi
(@_pi)
Posts: 113
Estimable Member
Topic starter
 

There’s a "340-generator" out there somwhere, but as usual my memory’s failing as I approach my retirement, damnit. I’ll go look.

Well, I just found one on the zkdecrypto google code site: https://code.google.com/p/zkdecrypto/downloads/list. Works pretty good.

 
Posted : August 2, 2013 8:16 am
 _pi
(@_pi)
Posts: 113
Estimable Member
Topic starter
 

Maybe optimizing the n-gram count to find the "best" shuffled configurations of the z340 was pointless after all…

Instead of generating multiple z340-like ciphers and running this quadrant/routes shuffling strategy to determine if I could significantly increase the ciphers’ n-gram counts, I essentially did the opposite and instead tried to construct a straight substitution cipher that would have similar symbol distribution as the z340 but would exhibit a very low n-gram count. If possible, this would tell me that maximizing the n-gram count to find a better candidate would be meaningless.

It turns out it is very easy to do. Using the cipher generator mentioned in my previous post and manually fiddling with the result for 15 minutes, I was able to create a cipher with a symbol distribution similar to the z340’s that didn’t exhibit any repeating n-grams (in ZKD). Here it is:

ePCC0Og1Z]T+M]Leb
B`oSk+PiTLj+V;P0
?iT;h^17?eB3SEH^
]+MekOK196IdJWQD_
hFE8bI6Jjab]B+LZj
1Z;Pk+pTfkm078+R`
L=?:-LXOkg++2fI@;
e+2V]IJ8QdKjc`Fp-
EJ1^PH5@LJ^+OBVPT
N6dmjT4A+jKefF?G1
DH]A+:dmX4EgBLX=X
PTK7I1]TXh0p6+9KZ
]0E[01fFJog+36iC=
_a+Oi120_Om?:S4U[
^:o+G4:5oVfkgeFXQ
;kmZJOiQLV=+X@id
X7U[T240+7+Xf30O6
BTW4K=54+PYea39KK
;H+R+V`1:02f0C6IS
]iF:^DbVhW:3o[NY

BTW, this cipher can be solved by ZKD in a few seconds.

What this tells me is that it is simple to generate a 340-character cipher with z340-like symbol distribution from typical English text that does not contain any repeating n-grams. I am sure it is a more tedious exercise to do this with pen and paper but it is far from impossible.

I have to conclude that if the z340 is a transposition cipher (in addition to a substitution one), the n-gram count cannot be used to score the quality of a transposed candidate since the best solution might have a count significantly higher or lower than the original cipher.

 
Posted : August 2, 2013 8:55 am
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

Interesting work! You also succeeded at reducing the quantity of repeated fragments (n-grams with gaps).

Here are the repeated fragments from the real 340 (question marks indicate wildcards):

|5F
J??p7
5?4?.
O?*?C
4??+?B
+???F?c
M??2?c
+???FB
FBc
G2???+
#O???Y
H???p?^

And here are the repeated fragments from your 340:

4?+???f
:??X??g
+V???0
+??1?0
T??0??+

(Note that I replaced your "?" symbol with "*" to avoid confusion with the wildcard character)

I had hoped that some measurement of language-like features in a cipher text would help indicate which manipulations would unravel the cipher text into a standard substitution cipher. Perhaps that is wishful thinking.

Duman’s approach, where he scores manipulations of the ciphertext by running ZKD trials on candidate manipulations, seems like a good approach, except for the difficulties due to the size of the search space. There are so many possible manipulations to choose from.

Perhaps it’d be good to generate more test ciphers that contain candidate manipulations, to see if features like the pivots tend to appear in those kinds of ciphers versus simple substitution ciphers.

http://zodiackillerciphers.com

 
Posted : August 2, 2013 2:43 pm
morf13
(@morf13)
Posts: 7527
Member Admin
 

I never know what I am reading when I pop into these Cipher threads,it’s all greek to me, but I appreciate you guys working towards solutions for the ciphers! :)

There is more than one way to lose your life to a killer

http://www.zodiackillersite.com/
http://zodiackillersite.blogspot.com/
https://twitter.com/Morf13ZKS

 
Posted : August 2, 2013 3:05 pm
Page 1 / 6
Share: