This scenario is an intercept of 2041 characters. It can be accessed in Virtual Colossus by setting one of the bedstead tapes to "KHcipher" and setting the patterns to "KHpatterns". It needs the K2 one-back limitation set.
1. Getting started.
Select the KHcipher tape on the Near Tape bedstead - either on the top menu or at the menu by the bedstead themselves. You should be able to see the tape loaded. On the near bedstead, push the switch which is about quarter of the way down the left hand side - this will switch on the tape motor and light. Select the "KHPattern" from the top "Set Pattern" menu to set the Chi, Psi and Mu wheel patterns (or select them seperately at each of the panels). You should be able to see the plugs in the X or Chi settings panel at the bottom of the large K switching panel and the u-shaped pins fitted into the Psi and Mu settings panels on the far right.
For starters check the cipher text length. On the big switch panel (K panel) click underneath the first grey counter switch on the top row to set it down. Now scroll to show the three big black ganged switches. Click above the top ganged switch to set it up and to switch the cipher characters, Z, to the Q bus on the big switch panel. To the left of this is another large ganged switch marked Near and Far. Switch this up to show Near. Now scroll left past the K Panel and master control panel to reveal the display panel. You should be able to see the result in 2041 appearing as the top No 1 counter. Now click the counter key back up to horizontal.
2. Setting X1 and X2.
We are going to first set X1 and X2 using the "double delta" algorithm. This requires DeltaZ to be added to DeltaX and put on the Q bus. So scroll back to the three big ganged switches and set the top and middle keys down to get DeltaZ and DeltaX added onto the Q bus.
Now turn to the big switch panel and scroll down to show the rows of red keys. We are going to run the "1+2=." algorithm so on the top left hand row of red keys put down 1 and 2 (reading from the left). This "adds" track 1 and 2 coming down the Q bus and sends the result right towards the counter switches, the red switches on the left. But we have to set the right hand yellow switch up to "dot" to enforce only counting when the result = dot. Now set down the first of the red counter switches to put the result into counter 1.
Now we need to try all possible pattern start postions for X1 and X2 to find the highest score of the algorithm which should reveal the correct start positions for this cipher text. To do this, scroll to the master control panel. On the lower row of switches at the left hand side are the stepping control switches (blue). Set switch 1 down and switch 2 up. This tells Colossus to step the X1 start position forward after every pass through the cipher text, and to step X2 when X1 has done a complete cycle of its start postions. 3. Set Totals. The next thig to set is the "Set Total" switches. By setting these only counts greater than the Set Total will be printed out, thus significantly reducing printout. But first the Set Total must be counted. This requires a bit of maths. We found that the cipher length, n = 2041. We are using two elements of the 5 in the Baudot characters, X1 and X2, so the expected random score is half n, i.e. 1021. The standard deviation(sigma) of this is 1/2(sqroot(n)) = 22.6 For a 1+2=. run the Set Total was usually set to 2.5 times sigma up on the random score. This is 1021+56 = 1077. To set this in, scroll to the far left to reveal the verticle column of rotary switches for Thousands, Hundreds, Tens and Units. By clicking on the numbers on the rotary switches, rotate them until 2 shows on the Thousands, 9 on the Hundreds etc.
Click underneath the "SU" key which will set the start positions from the jack strip plugs (currently all ones). Finally, click underneath the "M" key, top row right, on the master control panel to start the run. You should be able to see the counters on the display panel for counter 1 changing and the positions of the wheels being incremented as Colossus checks through all settings for K1 and K2. The printer should begin typing the headings K1 K2 count then will print out any results above our set total.
If you want things to run a little faster - try pressing down the yellow SPEED button above the printer! This is a quick cheat to get Colossus to run faster than the 5,000 characters of the original and rebuild. Alternatively, if you want a challenge, try setting Colossus to run with it's remembering circuits which were put in on the Mk 2. This makes it the equivilent of running at 25,000 characters per seconds. (The basic run-through instructions on the main website has details.)
What comes out is:
K1 . K2 . count
31 .. 1 . 1087
.5 .. 3 . 1095
20 .. 6 . 1080
.8 .. 7 . 1079
20 .. 9 . 1082
34 . 17 . 1083
top counts at K1=31, K2=1 = 1087 = 3 x sigma
K1=5, K2=3 = 1095 = 3.4 x sigma.
so more runs would be needed to prove or disprove which one is correct.
The run to set K4 and K5 given K1 and K2 is 4=5=/1=2 this needs to be run for both the two contending K1, K2 settings
4. The X4 and X5 run.
So now scroll to the jack strip panel to show the "starts" plugs. First let's take a look at the X1=4, X2=4 contender. At present all starts are set to 1 so now move the starts of X1 and X2 to 4 and 4 (the top two jack strips). The next thing is to set wheels X4 and X5, given X1 and X2. The BP algorithm for this was: 4=5=/1=2. The "/" means everything to the right is "given".
First clear all the red and yellow keys in the bottom half of the big switch panel. Now scroll up to the top half, the black keys on the left hand side. On the first row push down keys 1, 2, 4 and 5 leaving key 3 horizontal. This will give a "true" result when bits 1, 2, 4 and 5 on the Q bus are = cross with bit 3 ignored and this result can be switched into counter 1 by putting down the left hand grey counter key. But what we actually want is a count when either the selected Q bus bits are all dot OR all crosses. To get this final result, set the second row of black keys 1, 2, 4 and 5 up to match on dots on the Q bus and also set these into counter 1. Now a clever bit of Boolean logic: A OR B = NOT( NOTA + NOTB), so press down the yellow negate key just to the left of the counter key on both the two rows and finally at the bottom of the set of counter keys is a row of yellow keys which negate the whole counter output, set down the left hand yellow key to negate the output of counter 1. The result of all this is that counter 1 will count every instance of 4=5=/1=2 down the whole length of the cipher text.
Now we need to set which wheels are to have their starts incremented. Scroll the right hand panel to show the master switch panel. Reset lower row blue keys 1 and 2 and then put down key 4 and up key 5. This means X4 will step after every traverse of the cipher text but X5 will only step for every completion of the X4 starts. (26 x 23 = 598 runs through the cipher text).
Next what should the Set Total be? The expected random score for 4 elements out of 5 is n/8 which gives 255. The sigma is 1/4 sqrt(3 x n) = 20 so Set Total should be random + 2.5 sigma = 305. So put this onto the Set Total rotary switches, then scroll the display to show the right hand side of the master switch panel and click down the "SU" and then the "M" key to start the run. The print out window should now show K4 K5 count on its top line and print out the scores.
first for K1=31, K2=1 then for K1=5, K2=3
K5 . K4 . count ... K5 . K4 . count
15 . 1 ... 315 .....14 ..16 . 307
24 .16 ... 309
These results re-inforce K1=31, K2=1 as the correct settings, but leave three contenders for K5, K4. The setting runs for K3 will hopefully resolve these.
5. Now set X3.
So finally set X3 on a count of /// given 1 2 4 and 5.
Scroll to the top of the big switch panel. Put up key 3 on the top row meaning all of the first five switches are set to "dot" which is Baudot code for the "/" or null character, centre the negate key, leave the counter 1 key down and centre all other keys. the top row will now detect a "/" character (all dots) and if found count it into counter 1. Scroll down and centre the yellow counter negate key. Now get the master switch panel in the right hand window. On the bottom row centre keys 4 and 5 then put down blue key 3.
Now we need to Set Total. The expected random score is n/32 = 64. sigma = 1/8 sqrt(3 x n) = 10 so put Set Total to random + 2.5 sigma = 89.
Now press down the "M" key and do the run. The output window appears with K3 count on the first line and counts come out for ///.
Count of "/" given K1, K2, K4 and K5 set total 89
K4=15, K5=1 .... K4=24, K5=16 ..... K4=14, K5=16
K3 . count ...... K3 . count ....... K3 . count
1 .. 91 ........... none ............. none
20 . 92
So this confirms K4=15, K5=1 and leaves two contenders for K3
6. A further K3 run.
3x/1x4x is another K3 run. This is set up on the red + keys, lower left on the big switch panel. On the first row put down key 3, down the yellow key to test for x and switch into counter 1.
On the next row put down key 1 and down the yellow key to test bit 1 for x, putting the result also into counter 1. Lastly put down key 4 on the third row, put its yellow key up to test for dot and put the result into counter 1 as well.
Now make sure that the blue K3 key is down to make K3 go through all its starts and press down "M" to do the run.
This gives a maximum of 289 at K3 = 1, confirming this as the correct setting.
This confirms K1=31, K2=1, K3=1, K4=15, K5=1 as the settings for this cipher text. Make sure these are all now set on the jack strip plugs.
7. Now for the Motor wheels.
Next comes the setting of the Motor wheels M1 and M2.
This can usually be achieved by counting the number of "/" characters in the Delta deChi at all places where Total Motor = x. (remember total Motor is the basic motor, BM, caused by a "x" in M2 plus any limitation such as in this case, X2 one back).
To set the motor wheels first put a "/" character, all dots (0) onto the top row of black switches, first row on the Q bus on the big switch panel. Set down the first counter switch on this row to add the result of finding a "/" into counter 1.
Now scroll to the bottom of the big switch panel and set down to "x" the yellow TM switch. This causes the Total Motor signal to only allow counting when Total Motor is an "x".
Moving to the right hand panel, scroll across to the big ganged switch panel and put down the Z and X switches to add Delta Z and Delta X. ie to get Delta deChi onto the Q bus. On the row of Limit control switches uder the ganged switches, put down the centre key to enable the X2 one-back limitation.
Scroll to the master switch panel and put down key M1 on the bottom row, just to the right of the red X4 key. The next black key is M2 and put this up. This means that M1 will step after every run through the cipher text but M2 will only step after M1 has gone through all its start positions.
Make sure that the M1 and M2 start positions are at 1 and scroll to the Set Total switches.
8. Set Total for motor runs.
To caculate the Set Total, first scroll the switch panel up and set up the top counter 1 switch, put down the counter 1 switch on the next row down. Since no keys are set on the Q bus, every character of the cipher text is counted. With the TM switch centred, press the LC key. Counter 1 shows 2041 the total length of the cipher text. Now put down TM and do LC again. Now counter 1 shows 643, the number of places down the cipher text where Total Motor = "x". The random score is 643/32 approximately 20. The sigma is 1/8(sqrt(7 x 643) = 8. The motor wheels usually set at about 2 sigma, so a Set Total of 36 should be set.*
* Note: My statistics leave me a little lost here - not really sure where 36 comes from! Tried my best to work it out but if anyone can help clear this up - let me know!
Press the "SU" switch and then the "M" key to begin the run. The next problem is the length of run needed to examine all M1 and M2 start postions, 61 x 37 = 2257. I suggest using the speed option again here if you can.
This run is however inconclusive. There are lots of high scores around 42 with no clear winner.
The Newmanry report (23L) suggests trying a minimum count rather than a maximum count. The least frequent character in the DeChi is "B". To count this set the "B" pattern (x..xx) into row of black keys and switch the result into counter 1. We now need the Printout to only show counts LESS than the Set Total. The Set Total should be 1.5 sigma less than the random score, ie. 8 and the top black key on the right hand side of the Set Total panel needs to be set to the left for less than.
This Motor setting run nows shows 6 low counts of 6. M1/M2: 50/3 47/9 55/9 2/25 59/26 and 34/32
These can be resolved by attempting to set the Psis on each of them in turn.
10. Setting the Psi wheels.
Setting the S wheels requires the direct Z, X and S signals switched onto the Q bus, not the Deltas as used for X and M setting. Any limitations must be set, in this case the X2 one-back limitation.
The most common character in the plain language text is usually "space", 00100 in Baudot code, thus checking for maximum count of 1+2=. 3=x and 4+5=. should set the Psis.
S1 and S2 can be set first by doing 1+2=. on the red keys, just like for setting X1 and X1.
On the master switch panel set down the lower blue S1 key and set up the S2 key so that S1 start increments after each traverse of the cipher text and S2 moves on only after S1 has gone through all its starts.
Again Set Total needs to be set and since two elements are being investigated this can be 1077 as for X1 and X2. So scroll the far left hand of Colossus to the Set Total rotary switches and set them to 1077. (remember to set the "less than" key back to the "more than" if you have used it)
Set the M1 and M2 starts to the first set to be tried.
Now press down the "M" key top right hand of the master switch panel.
The printout will only show a clear maximum count of over 1200 when the correct M1 M2 starts are used. The maximum is at S1 = 32, S2 = 36.
Now set S4 and S5 by using 4+5=. Scroll the big switch panel down to bottom left. Centre the top row 1 and 2 red Qbus keys and put down 3 and 4. Scroll the right hand panel to show the master switch panel. Centre the lower row S1 and S2 keys and put S4 down and S5 up to increment the S4 start position every traverse of the cipher text and S5 only when S4 has done all positions.
Now press the "M" key to do the run. Now the printout shows a clear maximum count at S4 = 9, S5 = 43.
Finally set S3 by counting 3=+ Centre red keys 4 and 5 on the top row of red Q bus keys and put down red key 3. Move right along this top row to the yellow key which should have been set to "dot" for the previous runs. Centre it then put it down to count "x". Change the S start increment keys on the master switch by centering S4 and S5 and putting down S3. This will just take the S3 ring through all its start positions. The same Set Total can be used and a maximum count shows at S3 = 11.
Finally, set the S start positions to S1 = 32, S2 = 36, S3 = 11, S4 = 9 and S5 = 43. M1 should be at 59 and M2 at 26.
11. A test deciphering.
With all the other ring starts set correctly, try deciphering the cipher text. Note: At this point, the full decrypt was not available on the real Colossus but the settings would have been passed through to the Tunny machine for the full decipher. On real Colossus the operator could check the settings by setting spanning to one character and switching the Q bus bits to the five counters. The bit pattern of the deciphered character could then be read from the counter outputs and the character looked up in the teleprinter code chart.
Check that you have all the big black keys set up to Direct not down to Delta. On the master switch panel press down the "SU" key to set everything up. Now press down the "PRNTQ" switch on the panel above the printer.
This will start to printout the decrypt - it should start XWOLLE.WI.R..AUCH