Zodiac Discussion Forum

Spaces during trans…
 
Notifications
Clear all

Spaces during transposition

15 Posts
4 Users
0 Reactions
1,884 Views
(@largo)
Posts: 454
Honorable Member
Topic starter
 

As always, when doranchak releases a new episode of his youtube series, it gives me a motivation boost for z340. Today I want to show an idea that I’m not sure if it has been discussed before. I had suggested something similar some time ago: viewtopic.php?f=81&t=4837. This hypothesis turned out to be wrong.

Up to now, most transposition ideas were based on a "cleaned up" text block. In other words, no spaces were used. But what happens if you do not remove the spaces of a text before transposition, but skip them during the transposition? As an example I take the "Must print in paper" section from this letter: https://en.wikisource.org/wiki/Zodiac_K … r_9th_1969
As you know, this section gives pretty much exactly 340 characters if you ignore spaces and punctuation marks.

ps. 2 cops pulled a goof abot 3 min after I left the cab. I was walking down the hill to the park when this cop car pulled up & one of them called me over & asked if I saw anyone acting suspicious or strange in the last 5 to 10 min & I said yes there was this man who was runnig by waveing a gun & the cops peeled rubber & went around the corner as I directed them & I disappeared into the park a block & a half away never to be seen again.

Let’s assume that Zodiac had a very simple transposition idea and just wanted to write the text from top to bottom. So first he puts his plaintext into a grid, but without removing the spaces. I replaced the spaces with dots to make them easier to spot:

PS.2.COPS.PULLED.A.GOOF..
ABOT.3.MIN.AFTER.I.LEFT..
THE.CAB.I.WAS.WALKING....
DOWN.THE.HILL.TO.THE.PARK
WHEN.THIS.COP.CAR.PULLED.
UP.&.ONE.OF.THEM.CALLED..
ME.OVER.&.ASKED.IF.I.SAW.
ANYONE.ACTING.SUSPICIOUS.
OR.STRANGE.IN.THE.LAST.5.
TO.10.MIN.&.I.SAID.YES...
THERE.WAS.THIS.MAN.WHO...
WAS.RUNNIG.BY.WAVEING.A..
GUN.&.THE.COPS.PEELED....
RUBBER.&.WENT.AROUND.THE.
CORNER.AS.I.DIRECTED.THEM
&.I.DISAPPEARED.INTO.THE.
PARK.A.BLOCK.&.A.HALF....
AWAY.NEVER.TO.BE.SEEN....
AGAIN....................

Now he reads the text from top to bottom and simply skips the spaces. This results in a problem. Without knowing where the spaces are, you cannot undo the transposition. This is how the transposition WITH spaces would look like (can be undone):

PATDWUMAOTTWGRC&PAA
SBHOHPENROHAUUO.AWG
.OEWE..Y..ESNBRIRAA
2T.NN&OOS1R..BN.KYI
..C...VNT0ER&EED..N
C3ATTOEER..U.RRIAN.
O.BHHNR.AMWNT..S.E.
PM.EIE.ANIANH&AABV.
SII.S.&CGNSIE.SPLE.
.N.H.O.TE..G.W.POR.
P.WICFAI.&T.CEIEC..
UAALO.SNI.HBON.AKT.
LFSLPTKGNIIYPTDR.O.
LT...HE...S.S.IE&..
EEWTCEDSTS.W.ARD.B.
DRAOAM.UHAMAPRE.AE.
..L.R.ISEIAVEOCI...
AIKT.CFP.DNEEUTNHS.
..IHPA.IL..ILNETAE.
GLNEULICAYWNEDDOLE.
OEG.LL.ISEHGD...FN.
OF.PLESOTSO..TTT...
FT.AEDAU...A.HHH...
...RD.WS5....EEE...
...K..........M....

And so without spaces after inserting them into a 17×20 grid (can not be undone):

PATDWUMAOTTWGRC&P
AASBHOHPENROHAUUO
AWGOEWEYESNBRIRAA
2TNN&OOS1RBNKYICV
NT0ER&EEDNC3ATTOE
ERURRIANOBHHNRAMW
NTSEPMEIEANIANH&A
ABVSIIS&CGNSIESPL
ENHOTEGWPORPWICFA
I&TCEIECUAALOSNIH
BONAKTLFSLPTKGNII
YPTDROLTHESSIE&EE
WTCEDSTSWARDBDRAO
AMUHAMAPREAELRISE
IAVEOCIAIKTCFPDNE
EUTNHSIHPAILILNET
AEGLNEULICAYWNEDD
OLEOEGLLISEHGDFNO
FPLESOTSOTTTFTAED
AUAHHHRDWS5EEEKME

After a substitution the following result is obtained (lower IOC than z340)

YDLklv;DXwslEGbÄY
iZo9F=2YaqG=pdSS=
DlJXxlyT+Mq4VhtiZ
äN77Ä==KöG9AjTceQ
ALüaGÄPgBAbÜZws=+
xVStV5Dq=42pAGi;l
qNK0Y;+C0D7cdR2ÄD
i9QoccoÄeEAK5gMYU
PqF=LaJlYXVYlhbIZ
cÄwexCybvdDu=oR52
4XRijsUI1:YwjEqhc
TYLHtXuw2go1C0ÄPy
lseakMN1lZnB9HGd=
D;SFi;dYVxdyUt5K+
hZQ0=bciCjNeIYkqP
gvw72M5pYDh:cuRaw
DxE:Ayv:CeDTlq+Bk
Xu0=PEU:5ogFJkI7X
IYuaM=NK=LwsINZ0k
ivd2FFnHl1Öy+0j;P

This is the key (numbers and the & symbol were also substituted):

dDiZ94bekBHaxy+0PgIEJF2phcC5mj:uU;Aq7RX=YOnGVto1KMLwsNvSQl-TWüöäÜÖÄ
AAAABBCCDDDEEEEEEEFGGHHHIIIIJKLLLMNNNNOOPQRRRRSSSSTTTTUUVWXYZ01235&

The problem is clear: Our solvers cannot solve the cipher because it was hopelessly scrambled by the missing spaces. It is conceivable that Zodiac has chosen this or at least a similar approach without realizing that the cipher would then remain unsolvable forever. In the example shown there are a total of 136 skips due to the spaces. This seems to me just too much to attack it effectively.

Translated with http://www.DeepL.com/Translator (free version)

 
Posted : November 26, 2020 1:11 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

Interesting ideas Largo. That does sound rather hopeless to solve.

If I was committed to trying to write a hillclimber for this sort of problem, I’d probably start with a test cipher that only has one space removed. Then two spaces removed. Then three spaces removed. Etc. If those easy cases can be solved by a hillclimber then there’s some hope of making it work for a larger number of spaces. But I fear that the search landscape would be too bumpy, so that partially correct keys still yield terrible measurements that don’t give much useful direction to the search.

Another approach I would think about is to generate millions of test ciphers under your scheme, and then train a neural network to recognize where the spaces need to be re-inserted. It would be a long shot but it might be interesting.

Jarlve, didn’t you work on something similar for your solver? On a type of imperfect transposition, with the assumption that Zodiac might have skipped symbols during transposition, thus breaking any columnar solver that expects perfection?

http://zodiackillerciphers.com

 
Posted : November 28, 2020 3:59 pm
Jarlve
(@jarlve)
Posts: 2547
Famed Member
 

That would be 100+ skips. I also don’t think it can be solved if that is the case.

Me and smokie worked on this for almost 6 months or so, we went up to a total of any combination of 10 nulls/skips for the period 15/19 hypothesis: viewtopic.php?f=81&t=4125

The solver that can do this in AZdecrypt is called Substitution + nulls and skips and its options can be found under Options, Solvers:

(Substitution + nulls and skips) Period: 1
(Substitution + nulls and skips) Nulls and skips: 5
(Substitution + nulls and skips) Manual nulls: 0
(Substitution + nulls and skips) Manual skips: 0

It gets real hard real fast and a periodic cipher with 10 nulls could take days to solve.

Another approach I would think about is to generate millions of test ciphers under your scheme, and then train a neural network to recognize where the spaces need to be re-inserted. It would be a long shot but it might be interesting.

I’m skeptic that a neural network would be able to unentangle/recognize it somehow if there are 100+ skips.

AZdecrypt

 
Posted : November 29, 2020 8:39 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

Jarlve, I have a question about the "Substitution + nulls and skips" solver:

When exploring skips, does the solver insert dummy cipher symbols at random locations in the cipher text? So it’s hillclimbing a solve for the cipher text as if those new symbols are present?

As opposed to nulls, where cipher symbols at random locations are selected to be ignored during the hillclimb?

Eventually I want to complete the descriptions of the solvers at: http://zodiackillerciphers.com/wiki/ind … ks#Solvers
:)

http://zodiackillerciphers.com

 
Posted : November 29, 2020 9:15 pm
Jarlve
(@jarlve)
Posts: 2547
Famed Member
 

Jarlve, I have a question about the "Substitution + nulls and skips" solver:

When exploring skips, does the solver insert dummy cipher symbols at random locations in the cipher text? So it’s hillclimbing a solve for the cipher text as if those new symbols are present?

As opposed to nulls, where cipher symbols at random locations are selected to be ignored during the hillclimb?

Eventually I want to complete the descriptions of the solvers at: http://zodiackillerciphers.com/wiki/ind … ks#Solvers
:)

Thanks.

Yes, it inserts a new symbol for every skip and for it removes a single character for every null. If the period > 1 then it will do either of this before the period operation. There is allot more that goes into it under the hood though. Me and smokie spent a great deal of time optimizing it. But perhaps I need to give this solver a retune and menu for 1.20.

In case of Largo’s hypothesis I should make a change to the solver so that all the skip symbols are one symbol (space). And then perhaps try to solve it with n-grams that have spaces in it. AZdecrypt 1.19 has such n-grams under the /N-grams/Spaces/ directory.

AZdecrypt

 
Posted : November 29, 2020 10:59 pm
Jarlve
(@jarlve)
Posts: 2547
Famed Member
 

It were 8 months!

XX. Beginning of 8 months and 40 pages of programming and testing for up to 10 nulls and skips in route transposition + homophonic substitution: viewtopic.php?f=81&t=3196&start=800

AZdecrypt

 
Posted : November 29, 2020 11:04 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

In case of Largo’s hypothesis I should make a change to the solver so that all the skip symbols are one symbol (space). And then perhaps try to solve it with n-grams that have spaces in it. AZdecrypt 1.19 has such n-grams under the /N-grams/Spaces/ directory.

Sounds good.
That reminds me – I was playing with a homophonic substitution cipher recently but the "twist" is that several of the symbols encode to word breaks (spaces). So the spaces are homophonically encoded, just like the high-frequency plaintext letters. I didn’t think azdecrypt can solve for word breaks directly so I wrote a brute force method that considers all possible selections of up to N symbols that might be spaces. Then it computes the average word length for each cipher with restored word breaks, and keeps the ones that are closest to the expected average (around 4.7 I think). Then I just fed those in a batch to azdecrypt, with the candidate "word break" symbols removed from the cipher text. Seemed to work, but if it directly solved for the word break symbols using the spaces n-grams, it would probably solve much faster.

http://zodiackillerciphers.com

 
Posted : November 29, 2020 11:07 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

I’m skeptic that a neural network would be able to unentangle/recognize it somehow if there are 100+ skips.

That is understandable. It would seem like magic if it worked!

It may be more beneficial to train the network to distinguish between two categories of ciphers: transpositions WITH skips, and transpositions WITHOUT skips.

If that network is accurate and it says Z340 is a transposition WITHOUT skips, then we don’t have to build the magical thing that can solve the ones WITH skips. :)

http://zodiackillerciphers.com

 
Posted : November 29, 2020 11:10 pm
Jarlve
(@jarlve)
Posts: 2547
Famed Member
 

In case of Largo’s hypothesis I should make a change to the solver so that all the skip symbols are one symbol (space). And then perhaps try to solve it with n-grams that have spaces in it. AZdecrypt 1.19 has such n-grams under the /N-grams/Spaces/ directory.

Sounds good.
That reminds me – I was playing with a homophonic substitution cipher recently but the "twist" is that several of the symbols encode to word breaks (spaces). So the spaces are homophonically encoded, just like the high-frequency plaintext letters. I didn’t think azdecrypt can solve for word breaks directly so I wrote a brute force method that considers all possible selections of up to N symbols that might be spaces. Then it computes the average word length for each cipher with restored word breaks, and keeps the ones that are closest to the expected average (around 4.7 I think). Then I just fed those in a batch to azdecrypt, with the candidate "word break" symbols removed from the cipher text. Seemed to work, but if it directly solved for the word break symbols using the spaces n-grams, it would probably solve much faster.

That’s clever. I take it the cipher did not solve with the spaces?

Here’s a solve for a cipher with spaces without using space n-grams:

Score: 22223.85 IOC: 0.0722 Multiplicity: 0.1852 Seconds: 0.28
Repeats: SBECAUSES SWILLING LLINGS NSTHE THATS WILLD THANS
PC-cycles: 1856

IS LIKES WILLING A PEOPLES BECAUSES ITS AS 
ANOS MUCH S FUND ITS IND MORES FUN A THANS 
WILLINGS WILDS GAMED ANS THED FOR RESTS BECAUSES 
MAND INS THE AMONTS DANGEROUS DANIMALS OF 
A ALLS TO SWILL D NO ME THINGS GIVEN SMED 
THES MOST A THRALLINGS EXPERENCES IT DINS 
EVENS BETTERD THANS GETTINGS YOURS ROCK NS 
OFFS WITHATS GIRLS THE D BESTS PART A OF 
SITS AND THATS WHEN A IS DIE SID WILL D BES 
REBORN A IN A PARADICES AND SALL ST

H4($;84[H(($<E,V2
BNW&'?Z)JA.@*$"*7
.,%Q'5XRC*TUMI_>4
SFI5Q1&4TAL,":M'
/S99HLE'!$W6*EG5Z
I7#4>C@ITDP1Y.04?
8^+X.8*5J<I_%4>:2
,5BF0*6+ME&PQX.IJ
LS5W4DT,G9W'"B*/
H9(I%Q5Z"CH#E4E$K
@F*5ZI0:@45D.",>C
17W9_<E'Y-V&PZ<R@
*S0IH%4YK8M*?2>0Y
1I":GL4E8>0_LE'OQ
UP41D^;F*DTT4=S"C
,3'EHP(*>:&I?Y.04
]+1",BT'$>*7%I0CJ
"4!:8#,_'6S2*_I=_
W9I?84P2?Q1<,_#,V
P6_)Z'GL6*(9'>

Alternatively we could consider the spaces as nulls and use the Substitution + units solver with the standard settings, Unit: symbol, Mode: Remove and perhaps Multiplicity weight: 1:

Restart: 1 Hill climber: 4881/5000 @ 500000
Score: 20443.27 IOC: 0.0662 Multiplicity: 0.2140 Seconds: 10.82
Repeats: WILLING THEMOST BECAUSE ILLING METH ITIS (2) ANGE
PC-cycles: 2261

Unit: symbol
Mode: remove
Key(4,,,',*,I)

ILIKE WILLING PEOPLE BECAUSE IT IS SO MUCH 
FUN IT IS MORE FUN THAN WILLING WILD GAME 
IN THE FOR REST BECAUSE MAN IS THE MOST DANGEROUS 
ANIMAL OF ALL TO WILL SOMETHING GIVES ME 
THE MOST THRILLING EXPERENCE IT IS EVEN BETTER 
THAN GETTING YOUR ROCKS OFF WITHE GIRL THE 
BEST PART OF IT IS THAT WHEN I DIE I WILL 
BE REBORN IN PARADICE AND ALLT

AZdecrypt

 
Posted : November 30, 2020 6:28 pm
Jarlve
(@jarlve)
Posts: 2547
Famed Member
 

I’m skeptic that a neural network would be able to unentangle/recognize it somehow if there are 100+ skips.

That is understandable. It would seem like magic if it worked!

It may be more beneficial to train the network to distinguish between two categories of ciphers: transpositions WITH skips, and transpositions WITHOUT skips.

If that network is accurate and it says Z340 is a transposition WITHOUT skips, then we don’t have to build the magical thing that can solve the ones WITH skips. :)

Say that the network is 95% accurate and unknowingly to us is actually just measuring bigrams. And the transpositions with skips (100+) are just recognized as shuffles?

I would try to differentiate between shuffles and transpositions with skips. But the random number generator for the shuffles and skip positions has to be cryptographic or better (true).

AZdecrypt

 
Posted : November 30, 2020 6:39 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

That’s clever. I take it the cipher did not solve with the spaces?

That’s correct.

Here’s a solve for a cipher with spaces without using space n-grams:

How many symbols did you use to represent space?

Alternatively we could consider the spaces as nulls and use the Substitution + units solver with the standard settings, Unit: symbol, Mode: Remove and perhaps Multiplicity weight: 1:

Ah! Nice idea. Can you remind me of the effect of multiplicity weight? Does it normally punish solutions that increase the multiplicity of the input cipher?

http://zodiackillerciphers.com

 
Posted : November 30, 2020 10:55 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

Say that the network is 95% accurate and unknowingly to us is actually just measuring bigrams. And the transpositions with skips (100+) are just recognized as shuffles?
I would try to differentiate between shuffles and transpositions with skips. But the random number generator for the shuffles and skip positions has to be cryptographic or better (true).

Good point. A more general classifier would be better. But so far it seems to be hard to achieve. Kopal’s research is encouraging. 90% accuracy on that test set seems really good, but I don’t remember how many cipher types are involved.

http://zodiackillerciphers.com

 
Posted : November 30, 2020 11:04 pm
Jarlve
(@jarlve)
Posts: 2547
Famed Member
 

How many symbols did you use to represent space?

Automatically encoded, seems it were 5.

Ah! Nice idea. Can you remind me of the effect of multiplicity weight? Does it normally punish solutions that increase the multiplicity of the input cipher?

It follows this calculation: score/=1+((unique_symbols/cipher_length)*multiplicity_weight). The higher the multiplicity, the more the score will be reduced. It may prevent some of the solvers from inflating the score by changes that increase multiplicity. It will still do that but now there is a trade off.

Secondly it can also be used as a filter, in case of using the Substitution + units solver for removing the spaces as nulls, the key size (amount of null symbols) will increase with every hill-climber iteration and eventually the multiplicity will become very high and the solver may find non-solutions that exceed the score of the underlying plain text, in that case the multiplicity weight will punish these and the best solution (according to the multiplicity weight trade off) will still be on top, sort of.

Good point. A more general classifier would be better. But so far it seems to be hard to achieve. Kopal’s research is encouraging. 90% accuracy on that test set seems really good, but I don’t remember how many cipher types are involved.

I hope we will see more of this. I don’t think that AI is the one and only solution to achieving perfection in cryptography but it certainly will become a major player at some point.

AZdecrypt

 
Posted : December 1, 2020 6:57 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

Thank you for the explanations. I updated the Wiki. Maybe in 10 years, I’ll finish documenting all of AZdecrypt! :lol:

http://zodiackillerciphers.com

 
Posted : December 1, 2020 7:12 pm
(@fishermansfriend)
Posts: 132
Estimable Member
 

Always wondered if the + symbols might related to empty spaces – but the # of + symbols doesn’t neatly jive with what you would expect for the number of natural spaces in a text this long. Also doesn’t seem to fit with filler at the end – since that would be more than a full row of filler…

Another thought I had was what if Z only filled out each row with full words – no wrapping. Then filled those remaining spaces with + symbols. Then transposed. However I didn’t feel like this passed the smell test when I drew it up.

Anyway, curious if anyone has new thoughts on the +’s

 
Posted : December 1, 2020 11:31 pm
Share: