Consider the two ciphertexts:
QUQAU TKRUS TJFDS FJYEZ QCRPP STYCT GDJSH SCTZN DMNMN LLRHU BYCQB GJACM GKMVJ VXHQV LQJQX DHHCB NGEKU YTSTA BVBWX YOZLI BSPFV XZRFD MOZZG SXPHO APNUD XLZRL SRTGE ZYCNZ GYURL LOXMP TSOZN HVZFQ RYIYE GMXHG TIOJK LWDNI TZBPC FVRVX WWIXK FVJUY NLQBU AHVGG JFWXM OLHCL YTCXC UKXZM SLYXJ CTRQE QDWVT GDGZI UMLUD JDKPD UTOBW VJOGH REMZJ VFZOS KJFAL TBIPQ EXXVI AUAYW PHLNZ WGASY ZOCLU LQUGL KOGZV BKETY RFQPZ ZZDWG BAFAE MGVAE JRYER JXPHM UOAFH EBOEX VPVZE BJMIF OAYRJ AIWSD PBXXC AZARG PVEGH ZLDQQ QOMTR AUCDI OQZEG HNOXB YCUCT OIPFL NKKIY VYTZH QRYOF HXOFN LTBPK ITZRZ XKWCK GEEEA KWEGF OVPVF ACTGS JIEOC IEKJN ZV
(of length 507) and
CMKBD PURNT PPOJB PKBFS TUJPS TDKAQ SQKBC JQJCA RZGOX SMKYQ STVDB EFTSN ZXDFS PWTPB KGDGS NVXWW QLEUJ BOYBD VFRUJ HRLTL FYJJS QSRPM ZPZRX RNZUB MIOKG KQBTJ SWFLL MSDLR IFZLD NSRUG WZVPY LDWTM BHJKR ZUESV BLGSS ZZPVU ALFEL EIJHZ ZYYRT LRFIL ROGUZ WERFO FZIFU TRACJ NEFBE RPWUQ LUFOZ EFKSS AJGZD QHMNK FUJQM GVFUG UDWWG YSNSM GHCFA JWQEO NGVKC VOJBB XSCFT QVWXW FCODC WVBGY BYKAF FHGNX URJGZ YKNBD HLAYP BRDCA QNAAC IHWVT PIMMO OEBUA YHOLZ CYRYB QSPLL OXAKE WQSCK KSZBQ DAOXG UPOZX YAJY
(of length 404). Neither the letter count nor the autocoincidence spectrum show any anomalies. Therefore we suspect a polyalphabetic cipher of large period.
We search for sections that are encrypted by the same key by calculating coincidence indices (κ). We start with the two texts left aligned and then shift the second (shorter) text to the right one by one position.
0: QUQAUTKRUSTJFDSFJYEZQCRPPSTYCTGDJSHSCTZNDMNMNLLRHU ... CMKBDPURNTPPOJBPKBFSTUJPSTDKAQSQKBCJQJCARZGOXSMKYQ ... 1: QUQAUTKRUSTJFDSFJYEZQCRPPSTYCTGDJSHSCTZNDMNMNLLRHU ... CMKBDPURNTPPOJBPKBFSTUJPSTDKAQSQKBCJQJCARZGOXSMKYQ ... 2: QUQAUTKRUSTJFDSFJYEZQCRPPSTYCTGDJSHSCTZNDMNMNLLRHU ... CMKBDPURNTPPOJBPKBFSTUJPSTDKAQSQKBCJQJCARZGOXSMKYQ ... ...This gives a sequence of coincidence indices from which the 12 largest of the first 200 are
CI at position 9 is 0.0594059405940594 CI at position 36 is 0.0569306930693069 CI at position 37 is 0.0668316831683168 CI at position 40 is 0.0618811881188119 CI at position 63 is 0.0643564356435644 CI at position 103 is 0.0643564356435644 CI at position 134 is 0.0563002680965147 CI at position 145 is 0.0607734806629834 CI at position 147 is 0.0555555555555556 CI at position 160 is 0.0576368876080692 CI at position 181 is 0.0552147239263804 CI at position 197 is 0.0580645161290323
all others being ≤ 0.055.
We note a peak at the displacement of 37 und would continue with the hypothesis that the two texts are correctly aligned (»in depth«) with this displacement. However from the results on the distribution of κ we know that the variance is large; for random texts of length 400 we have a 95%-quantile of 0.054. Therefore we have to expect many false alarms with growing tendency as the length of the overlapping text segments diminishes for displacements from 103 = 507–404 on.