Kryha Cryptanalysis - Start position of the Wheel


Home Page
Kryha Home Page
Kryha Cryptanalysis Home Page

Method

If the cryptoanalyst knows the wheel, he can easily determine the starting sector of the cryptological chain.

Thus, if the wheel is standard, we have the following offsets:

  • Position 1: 7, 6, 7, 5, 6, 7, 6, 8, 6, 10, 5, 6, 5, 7, 6, 5, 9
  • Position 2: 6, 7, 5, 6, 7, 6, 8, 6, 10, 5, 6, 5, 7, 6, 5, 9, 7
  • Position 3: 7, 5, 6, 7, 6, 8, 6, 10, 5, 6, 5, 7, 6, 5, 9, 7, 6
  • ...
  • Position 15: 6, 5, 9, 7, 6, 7, 5, 6, 7, 6, 8, 6, 10, 5, 6, 5, 7
  • ...

Then, for each position on the wheel, we can calculate the cumulative shift for each letter of the cryptogram:

  • Position 1: 0, 7, 13, 20, 25, 5, 12, 18, 0, 6, 16, 21, 1, 6, ...
  • Position 2: 0, 6, 13, 18, 24, ...
  • Position 3: 0, 7, 12, 18, 25, ...
  • Position 15: 0, 6, 11, 20, 1, 7, 14, 19, 25, 6, ...
  • Position 17: 0, 9, 16, ...

If we take position 1 as an example, the letters in positions 9 and 13 (0 being the initial position), has the same shift. Consequently, these two letters were encrypted using the same alphabet.

If we distribute all the letters of the ciphertext across the 26 possible shifts, we obtain 26 groups of letters, each encrypted using the same alphabet. We can then calculate the index of coincidence for each of these alphabets.

In short, we test the distribution of the letters of the ciphertext for each initial position. We distribute the letters across the 26 alphabets. We calculate the index of coincidence for each. If we obtain the index characteristic of the language (0.065 for English), we have found the initial position!

Example

When Friedman broke the Kryha in 1933, he began by searching for the starting sector. From this, he could deduce the offset used for each letter of the cipher and then distribute these letters into 26 independent alphabets.

	
	$ more MSGS/2h.cry

	XYICP NDEAM APDTR AXXPZ XHYRY TWQXF
	HCDJK AHQUR ZPPPZ QOFUV KFEMN EAONG
	TTXSV VUBDG JREJF HEOKV CQHFH ROKUP
	MQPQW ACOJC RLMBM EVKRV JDYNN SXUDL
	HNPFW MOCMJ FLGPM BKHAU XLIVV QSXUN
	JZUKK OBAAE UQOJY IZSZU HGWGW ATEJW
	YDIVX PEIKE ECMCI RXXLA ZLAIN MJZXI
	CIDKQ KMMTE LLFJT JUBQO LJAWM FEHEV
	SYCAS KFONO ZUMPA DAPJY LPFNT RUITC
	BWHJH MOLCV RDEPF QACIU HCZCB XTOKC
	IXGOS GCMRF HJVXS VZNMU GJJSO QBJQH
	BQNLH RTMEL YNHKU FXJDM JYCPA DPPWY
	MGUWO IAIIG PTSFC SOKID GGTYO AAQDR
	QRRMN TSHYN EXYVF CMJJK NXVTE FXAUT
	SEZQS HLULP CYGXO NLAWQ TEJNB SMVTE
	HSXUY NJKXF PEPGF CMMCW ZRPJY GOPZU
	ZNVXI AXZKQ MJEFW WMRQR TETPX RSUKC
	DLHED LLCTJ KXZMQ MKNJU VPFLY HYFQR
	EWNDZ MBMPB OJXEQ IZAXH NDBQQ WDIZQ
	PIFAY JGQJO FWFCD BXYNX YTWYK EQCDP
	DYDOZ HJFCZ UEDDJ BFXTT VFYGH CTBGO
	FEHBU BZDQQ TIGDY AIYFD FHABS AHYGX
	IBBLE CGOSE MOMZV KHQSI CMJFF EVVTL
	WTESL AYWFY CKOXP SVNAI GOCZZ KVVVJ
	SOPEN YXDDX LDCYA XMWWO CWOII BNXTV
	TLIVQ WXUET PSUHC SOYFP VYIKZ NFVIE
	YPHKI NCGGV IKROO SOVMG HKUNU SUNYV
	CFELO OWSAI YRREV NEXPE SEGRP ZNBMM
	YUZFG SXRXW MNWTL RHVFH GSXMW VREAJ
	DGOZA GRXKJ LDOGY PTYXN TMWQM YSQWL
	XHNGZ QDMCW PYATG NZFJK WFDKA VSJMH
	JGWJE CWTDB ZNMYT NAORV HARRP DXGCA
	PHJNZ KTLQR QJJAF FZGDX LRFFS AWSZN
	GLSAQ GMCDY JGMBL SXEOT LFJGG LGKKR
	YYWDA LHHJV CGYVR LYSPJ VPKGW WXHFA
	CMTRG UJEJW TAFSN ZXVVW IYWOO MTLUF
	SBCAJ RNRMP IYLWI KAOKH TMXCN IMWTF
	GTTDE HTDHM KKCDK EAPHI AXZYP

The initial position used to encrypt the message broken by Friedman is position 15. Indeed, for position 15, the IC has the maximum value: 0.072

$ python3 friedman_start.py -c MSGS/2h.cry
Wheel: [7, 6, 7, 5, 6, 7, 6, 8, 6, 10, 5, 6, 5, 7, 6, 5, 9]  Sector:  0

  1: 0.044623
  2: 0.044816
  3: 0.041382
  4: 0.043224
  5: 0.044861
  6: 0.044486
  7: 0.045111
  8: 0.046472
  9: 0.042932
 10: 0.042309
 11: 0.043740
 12: 0.043981
 13: 0.044094
 14: 0.043531
 15: 0.072096
 16: 0.045254
 17: 0.043501

We have described the rest of Friedman's method on another page. (link).

References

Articles and Books

  • Machine Cryptography and Modern Cryptanalysis, By Cipher A. Deavours & Louis Kruh, (1985), Artech House Publishers.
    Note: This book describes how to decipher the message received by Friedman.

Internet References

  • NSA, Q. E. D. - 2 Hours, 41 Minutes, By LAMBROS D. CALLIMAHOS, Unclassified (link)
    Note: This article presents Callimahos's reconstruction of Friedman's method