# Once we have the key length, then what? - A worked example

In previous posts, we saw how we might establish the length of the key used to encode a periodic cipher, such as Vigenère or Beaufort. I showed two methods, the Index of Coincidences and the Kasiski/Kerckhoff.

This is the cipher we're trying to solve:

```VKMHG QFVMO IJOII OHNSN IZXSS CSZEA WWEXU
LIOZB AGEKQ UHRDH IKHWE OBNSQ RVIES LISYK
BIOVF IEWEO BQXIE UUIXK EKTUH NSZIB SWJIZ
BSKFK YWSXS EIDSQ INTBD RKOZD QELUM AAAEV
MIDMD GKJXR UKTUH TSBGI EQRVF XBAYG UBTCS
XTBDR SLYKW AFHMM TYCKU JHBWV TUHRQ XYHWM
IJBXS LSXUB BAYDI OFLPO XBULU OZAHE JOBDT
ATOUT GLPKO FHNSO KBHMW XKTWX SX```

The next step is to 'split' the ciphertext, and group together each of the letters which were encoded using the same key. Each group, being encoded with the same key, is effectively an ordered alphabet. In the case of a Vigenère it's just a Caesar shift. Whereas with Beaufort it will be a Caesar shift which follows Atbash, a reversal.

```KeyPos=0: VFOSSWIEDERIOEEESJFSIKLEDUSRYSSFCWQISYPUJTPSWS
KeyPos=1: KVINCWOKHOVSVOUKZIKENOUVGKBVGXLHKVXJXDOOOOKOXX
KeyPos=2: MMIISEZQIBIYFBUTIZYITZMMKTGFUTYMUTYBUIXZBUOKK