This scenario is an intercept of 5667 characters cut from and original German decrypt and renciphered. It can be accessed in Virtual Colossus by setting one of the bedstead tapes to "KH2cipher" and setting the patterns to "KHpatterns". It requires the K2 one-back limitation set.
1. Getting started.
Select the KH2cipher 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 5667 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 calculated. This requires a bit of maths. We found that the cipher length, n = 5667. 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. 2834. The standard deviation(sigma) of this is 1/2(sqroot(n)) = 37.6 For a 1+2=. run the Set Total was usually set to 2.5 times sigma up on the random score. This is 2834+94 = 2928. 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.)
top count at K1=31, K2=5 = 3109
count bulge = 275
count decibans = 8.68 x (275) x (275)/(5667) = 116 db
result decibans = 116 - 30.8 + 3 = 88 db
sigma = 1/2 (n)^1/2 = 37.6
so count bulge = 275/37.6 = 7 sigma, absolutely certain
4. The X4 and X5 run.
The run to set K4 and K5 given K1 and K2 is 4=5=/1=2
So now scroll to the jack strips "starts" panel. Set a white plug into the K1 start at position 31 and the K2 start to position 5. 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 709. The sigma is 1/4 sqrt(3 x n) = 32.6. this algorithm usually sets at 5 to 6 sigma so Set Total should be random + 3 sigma = 809. 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.
for K1=31, K2=5 maximum count is 969 at K4=15, K5=8
5. Now set X3.
So finally set X3 on a count of /// given 1 2 4 and 5.
Set K4 start to 15 and K5 start to 8.
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 = 177. sigma = 1/8 sqrt(3 x n) = 25 so put Set Total to random + 3 sigma = 252.
Now press down the "SU" and then 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 260
Maximum count of 360 at K3 = 10, so set K3 start to 10.
This confirms K1=31, K2=5, K3=10, K4=15, K5=8 as the settings for this cipher text.
6. 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 (the yellow switch on it's own - bottom row). This causes the Total Motor signal to only allow counting when Total Motor is an "x".
You should already have the big patterns panel ganged switches set 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 set of two blue switches). The next blue 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.
7. Set Total for motor runs.
To calculate the Set Total, firstly set the top grey counter off and put down the counter 1 switch on the next row down. Since no keys are set of the Q bus, every character of the cipher text is counted. With the TM switch centered, the display panels shows a total of 5667, the total length of the cipher text. Now press the TM down again and see the display. It should be showing a total of 1829 - the number of places down the cipher text the Total Motor = "x". The random score is 1829/32 approximately 57. The sigma is 1/8(sqrt(7 x 1829)) = 14. The motor wheels on this pattern set at about 10 sigma, so a Set Total of 141 should be set*
* Note: My statistics leave me a little lost here as the original documentation on codesandciphers talks about setting the Bream settings here so I think it's got a little confused. Tried my best to work it out but if anyone can help clear this up - let me know! I recommend putting in a set total of 220 here.
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 will confirm that the highest score for all possible starts is 247 at M1 = 59, M2 = 26.
So now you have set M1 and M2, and now for the Psis.
8. 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 2928 as for X1 and X2. So scroll the left hand Colossus panel to the Set Total rotary switches and set them to 2928.
Now press down the "SU" and then "M" key top right hand of the master switch panel.
The printout should show a clear maximum count of 3634 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 4 and 5. Scroll the display 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 "SU" and "M" key to do the run. Now the printout shows a clear maximum count of 3705 at S4 = 9, S5 = 43.
Finally set S3 by counting 3=+ Centre red keys 4 and 5 on the top row of red Qbus 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.So press the "M" key to do the run. The same Set Total can be used and a maximum count of 3055 shows at S3 = 11.
Finally, set the S start positions to S1 = 32, S2 = 36, S3 = 11, S4 = 9 and S5 = 43
9. 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 NFR SCHERENFERNROHREN (this was a padding word at the start of the German message)
If you like, set the PRNTQ switch up instead - this prints out the characters directly rather than converting them to teleprinter codes so you should be able to see the -- and ++ characters which are the figure shift and character shift codes being transmitted. The fact that a lot of operators used the standard practice of pressing these keys twice helped a lot in enabling Colossus to find the statistical bulges required to find the settings.