Bletchley
7 operations. Call any of them with cyberchef_bake, or pre-load them
with CYBERCHEF_TOOL_SURFACE=all.
Emulation of the Bombe machine used at Bletchley Park to attack Enigma, based on work by Polish and British cryptanalysts.To run this you need to have a ‘crib’, which is some known plaintext for a chunk of the target ciphertext, and know the rotors used. (See the ‘Bombe (multiple runs)’ operation if you don’t know the rotors.) The machine will suggest possible configurations of the Enigma. Each suggestion has the rotor start positions (left to right) and known plugboard pairs.Choosing a crib: First, note that Enigma cannot encrypt a letter to itself, which allows you to rule out some positions for possible cribs. Secondly, the Bombe does not simulate the Enigma’s middle rotor stepping. The longer your crib, the more likely a step happened within it, which will prevent the attack working. However, other than that, longer cribs are generally better. The attack produces a ‘menu’ which maps ciphertext letters to plaintext, and the goal is to produce ‘loops’: for example, with ciphertext ABC and crib CAB, we have the mappings A<->C, B<->A, and C<->B, which produces a loop A-B-C-A. The more loops, the better the crib. The operation will output this: if your menu has too few loops or is too short, a large number of incorrect outputs will usually be produced. Try a different crib. If the menu seems good but the right answer isn’t produced, your crib may be wrong, or you may have overlapped the middle rotor stepping - try a different crib.Output is not sufficient to fully decrypt the data. You will have to recover the rest of the plugboard settings by inspection. And the ring position is not taken into account: this affects when the middle rotor steps. If your output is correct for a bit, and then goes wrong, adjust the ring and start position on the right-hand rotor together until the output improves. If necessary, repeat for the middle rotor.By default this operation runs the checking machine, a manual process to verify the quality of Bombe stops, on each stop, discarding stops which fail. If you want to see how many times the hardware actually stops for a given input, disable the checking machine.More detailed descriptions of the Enigma, Typex and Bombe operations can be found here.
- Tool name:
cyberchef_bombe - Input / output:
string→html
| Argument | Type | Default |
|---|---|---|
model |
argSelector | 3-rotor |
left_most_4th_rotor |
editableOption | LEYJVCNIXWPBQMDRTAKZGFUHOS |
left_hand_rotor |
editableOption | EKMFLGDQVZNTOWYHXUSPAIBRCJ<R |
middle_rotor |
editableOption | AJDKSIRUXBLHWTMCQGZNPYFVOE<F |
right_hand_rotor |
editableOption | BDFHJLCPRTXVZNYEIWGAKMUSQO<W |
reflector |
editableOption | AY BR CU DH EQ FS GL IP JX KN MO TZ VW |
crib |
string | — |
crib_offset |
number | 0 |
use_checking_machine |
boolean | true |
Colossus
Section titled “Colossus”Colossus is the name of the world’s first electronic computer. Ten Colossi were designed by Tommy Flowers and built at the Post Office Research Labs at Dollis Hill in 1943 during World War 2. They assisted with the breaking of the German Lorenz cipher attachment, a machine created to encipher communications between Hitler and his generals on the front lines.To learn more, Virtual Colossus, an online, browser based simulation of a Colossus computer is available at virtualcolossus.co.uk.A more detailed description of this operation can be found here.
- Tool name:
cyberchef_colossus - Input / output:
string→html
| Argument | Type | Default |
|---|---|---|
input_arg |
label | — |
pattern |
option | KH Pattern |
qbusz |
option | — |
qbus |
option | — |
qbus |
option | — |
limitation |
option | None |
k_rack_option |
argSelector | Select Program |
program_to_run |
option | — |
k_rack_conditional |
label | — |
r1_q1 |
editableOptionShort | — |
r1_q2 |
editableOptionShort | — |
r1_q3 |
editableOptionShort | — |
r1_q4 |
editableOptionShort | — |
r1_q5 |
editableOptionShort | — |
r1_negate |
boolean | false |
r1_counter |
option | — |
r2_q1 |
editableOptionShort | — |
r2_q2 |
editableOptionShort | — |
r2_q3 |
editableOptionShort | — |
r2_q4 |
editableOptionShort | — |
r2_q5 |
editableOptionShort | — |
r2_negate |
boolean | false |
r2_counter |
option | — |
r3_q1 |
editableOptionShort | — |
r3_q2 |
editableOptionShort | — |
r3_q3 |
editableOptionShort | — |
r3_q4 |
editableOptionShort | — |
r3_q5 |
editableOptionShort | — |
r3_negate |
boolean | false |
r3_counter |
option | — |
negate_all |
boolean | false |
k_rack_addition |
label | — |
add_q1 |
boolean | false |
add_q2 |
boolean | false |
add_q3 |
boolean | false |
add_q4 |
boolean | false |
add_q5 |
boolean | false |
add_equals |
editableOptionShort | — |
add_counter1 |
boolean | false |
add_negate_all |
boolean | false |
total_motor |
editableOptionShort | — |
master_control_panel |
label | — |
set_total |
number | 0 |
fast_step |
option | — |
slow_step |
option | — |
start_1 |
number | 1 |
start_2 |
number | 1 |
start_3 |
number | 1 |
start_4 |
number | 1 |
start_5 |
number | 1 |
start_m61 |
number | 1 |
start_m37 |
number | 1 |
start_1 |
number | 1 |
start_2 |
number | 1 |
start_3 |
number | 1 |
start_4 |
number | 1 |
start_5 |
number | 1 |
Enigma
Section titled “Enigma”Encipher/decipher with the WW2 Enigma machine.Enigma was used by the German military, among others, around the WW2 era as a portable cipher machine to protect sensitive military, diplomatic and commercial communications.The standard set of German military rotors and reflectors are provided. To configure the plugboard, enter a string of connected pairs of letters, e.g. AB CD EF connects A to B, C to D, and E to F. This is also used to create your own reflectors. To create your own rotor, enter the letters that the rotor maps A to Z to, in order, optionally followed by < then a list of stepping points.This is deliberately fairly permissive with rotor placements etc compared to a real Enigma (on which, for example, a four-rotor Enigma uses only the thin reflectors and the beta or gamma rotor in the 4th slot).More detailed descriptions of the Enigma, Typex and Bombe operations can be found here.
- Tool name:
cyberchef_enigma - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
model |
argSelector | 3-rotor |
left_most_4th_rotor |
editableOption | LEYJVCNIXWPBQMDRTAKZGFUHOS |
left_most_rotor_ring_setting |
option | A |
left_most_rotor_initial_value |
option | A |
left_hand_rotor |
editableOption | EKMFLGDQVZNTOWYHXUSPAIBRCJ<R |
left_hand_rotor_ring_setting |
option | A |
left_hand_rotor_initial_value |
option | A |
middle_rotor |
editableOption | AJDKSIRUXBLHWTMCQGZNPYFVOE<F |
middle_rotor_ring_setting |
option | A |
middle_rotor_initial_value |
option | A |
right_hand_rotor |
editableOption | BDFHJLCPRTXVZNYEIWGAKMUSQO<W |
right_hand_rotor_ring_setting |
option | A |
right_hand_rotor_initial_value |
option | A |
reflector |
editableOption | AY BR CU DH EQ FS GL IP JX KN MO TZ VW |
plugboard |
string | — |
strict_output |
boolean | true |
Lorenz
Section titled “Lorenz”The Lorenz SZ40/42 cipher attachment was a WW2 German rotor cipher machine with twelve rotors which attached in-line between remote teleprinters.It used the Vernam cipher with two groups of five rotors (named the psi(ψ) wheels and chi(χ) wheels at Bletchley Park) to create two pseudorandom streams of five bits, encoded in ITA2, which were XOR added to the plaintext. Two other rotors, dubbed the mu(μ) or motor wheels, could hold up the stepping of the psi wheels meaning they stepped intermittently.Each rotor has a different number of cams/lugs around their circumference which could be set active or inactive changing the key stream.Three models of the Lorenz are emulated, SZ40, SZ42a and SZ42b and three example wheel patterns (the lug settings) are included (KH, ZMUG & BREAM) with the option to set a custom set using the letter ‘x’ for active or ‘.’ for an inactive lug.The input can either be plaintext or ITA2 when sending and ITA2 when receiving.To learn more, Virtual Lorenz, an online, browser based simulation of the Lorenz SZ40/42 is available at lorenz.virtualcolossus.co.uk.A more detailed description of this operation can be found here.
- Tool name:
cyberchef_lorenz - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
model |
option | SZ40 |
wheel_pattern |
argSelector | KH Pattern |
kt_schalter |
boolean | false |
mode |
argSelector | Send |
input_type |
option | Plaintext |
output_type |
option | Plaintext |
ita2_format |
option | 5/8/9 |
1_start_1_43 |
number | 1 |
2_start_1_47 |
number | 1 |
3_start_1_51 |
number | 1 |
4_start_1_53 |
number | 1 |
5_start_1_59 |
number | 1 |
37_start_1_37 |
number | 1 |
61_start_1_61 |
number | 1 |
1_start_1_41 |
number | 1 |
2_start_1_31 |
number | 1 |
3_start_1_29 |
number | 1 |
4_start_1_26 |
number | 1 |
5_start_1_23 |
number | 1 |
1_lugs_43 |
string | .x...xx.x.x..xxx.x.x.xxxx.x.x.x.x.x..x.xx.x |
2_lugs_47 |
string | .xx.x.xxx..x.x.x..x.xx.x.xxx.x....x.xx.x.x.x..x |
3_lugs_51 |
string | .x.x.x..xxx....x.x.xx.x.x.x..xxx.x.x..x.x.xx..x. |
4_lugs_53 |
string | .xx...xxxxx.x.x.xx...x.xx.x.x..x.x.xx.x..x.x.x.x |
5_lugs_59 |
string | xx...xx.x..x.xx.x...x.x.x.x.x.x.x.x.xx..xxxx.x.x |
37_lugs_37 |
string | x.x.x.x.x.x...x.x.x...x.x.x...x.x.... |
61_lugs_61 |
string | .xxxx.xxxx.xxx.xxxx.xx....xxx.xxxx.xxxx.xxxx.xxx |
1_lugs_41 |
string | .x...xxx.x.xxxx.x...x.x..xxx....xx.xxxx.. |
2_lugs_31 |
string | x..xxx...x.xxxx..xx..x..xx.xx.. |
3_lugs_29 |
string | ..xx..x.xxx...xx...xx..xx.xx. |
4_lugs_26 |
string | xx..x..xxxx..xx.xxx....x.. |
5_lugs_23 |
string | xx..xx....xxxx.x..x.x.. |
Multiple Bombe
Section titled “Multiple Bombe”Emulation of the Bombe machine used to attack Enigma. This version carries out multiple Bombe runs to handle unknown rotor configurations.You should test your menu on the single Bombe operation before running it here. See the description of the Bombe operation for instructions on choosing a crib.More detailed descriptions of the Enigma, Typex and Bombe operations can be found here.
- Tool name:
cyberchef_multiple_bombe - Input / output:
string→html
| Argument | Type | Default |
|---|---|---|
standard_enigmas |
populateMultiOption | ["EKMFLGDQVZNTOWYHXUSPAIBRCJ<R\nAJDKSIRUXBLHW |
main_rotors |
text | — |
4th_rotor |
text | — |
reflectors |
text | — |
crib |
string | — |
crib_offset |
number | 0 |
use_checking_machine |
boolean | true |
SIGABA
Section titled “SIGABA”Encipher/decipher with the WW2 SIGABA machine. SIGABA, otherwise known as ECM Mark II, was used by the United States for message encryption during WW2 up to the 1950s. It was developed in the 1930s by the US Army and Navy, and has up to this day never been broken. Consisting of 15 rotors: 5 cipher rotors and 10 rotors (5 control rotors and 5 index rotors) controlling the stepping of the cipher rotors, the rotor stepping for SIGABA is much more complex than other rotor machines of its time, such as Enigma. All example rotor wirings are random example sets.To configure rotor wirings, for the cipher and control rotors enter a string of letters which map from A to Z, and for the index rotors enter a sequence of numbers which map from 0 to 9. Note that encryption is not the same as decryption, so first choose the desired mode. Note: Whilst this has been tested against other software emulators, it has not been tested against hardware.
- Tool name:
cyberchef_sigaba - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
1st_left_hand_cipher_rotor |
editableOption | SRGWANHPJZFXVIDQCEUKBYOLMT |
1st_cipher_rotor_reversed |
boolean | false |
1st_cipher_rotor_initial_value |
option | A |
2nd_cipher_rotor |
editableOption | SRGWANHPJZFXVIDQCEUKBYOLMT |
2nd_cipher_rotor_reversed |
boolean | false |
2nd_cipher_rotor_initial_value |
option | A |
3rd_middle_cipher_rotor |
editableOption | SRGWANHPJZFXVIDQCEUKBYOLMT |
3rd_cipher_rotor_reversed |
boolean | false |
3rd_cipher_rotor_initial_value |
option | A |
4th_cipher_rotor |
editableOption | SRGWANHPJZFXVIDQCEUKBYOLMT |
4th_cipher_rotor_reversed |
boolean | false |
4th_cipher_rotor_initial_value |
option | A |
5th_right_hand_cipher_rotor |
editableOption | SRGWANHPJZFXVIDQCEUKBYOLMT |
5th_cipher_rotor_reversed |
boolean | false |
5th_cipher_rotor_initial_value |
option | A |
1st_left_hand_control_rotor |
editableOption | SRGWANHPJZFXVIDQCEUKBYOLMT |
1st_control_rotor_reversed |
boolean | false |
1st_control_rotor_initial_value |
option | A |
2nd_control_rotor |
editableOption | SRGWANHPJZFXVIDQCEUKBYOLMT |
2nd_control_rotor_reversed |
boolean | false |
2nd_control_rotor_initial_value |
option | A |
3rd_middle_control_rotor |
editableOption | SRGWANHPJZFXVIDQCEUKBYOLMT |
3rd_control_rotor_reversed |
boolean | false |
3rd_control_rotor_initial_value |
option | A |
4th_control_rotor |
editableOption | SRGWANHPJZFXVIDQCEUKBYOLMT |
4th_control_rotor_reversed |
boolean | false |
4th_control_rotor_initial_value |
option | A |
5th_right_hand_control_rotor |
editableOption | SRGWANHPJZFXVIDQCEUKBYOLMT |
5th_control_rotor_reversed |
boolean | false |
5th_control_rotor_initial_value |
option | A |
1st_left_hand_index_rotor |
editableOption | 6201348957 |
1st_index_rotor_initial_value |
option | 0 |
2nd_index_rotor |
editableOption | 6201348957 |
2nd_index_rotor_initial_value |
option | 0 |
3rd_middle_index_rotor |
editableOption | 6201348957 |
3rd_index_rotor_initial_value |
option | 0 |
4th_index_rotor |
editableOption | 6201348957 |
4th_index_rotor_initial_value |
option | 0 |
5th_right_hand_index_rotor |
editableOption | 6201348957 |
5th_index_rotor_initial_value |
option | 0 |
sigaba_mode |
option | Encrypt |
Encipher/decipher with the WW2 Typex machine.Typex was originally built by the British Royal Air Force prior to WW2, and is based on the Enigma machine with some improvements made, including using five rotors with more stepping points and interchangeable wiring cores. It was used across the British and Commonwealth militaries. A number of later variants were produced; here we simulate a WW2 era Mark 22 Typex with plugboards for the reflector and input. Typex rotors were changed regularly and none are public: a random example set are provided.To configure the reflector plugboard, enter a string of connected pairs of letters in the reflector box, e.g. AB CD EF connects A to B, C to D, and E to F (you’ll need to connect every letter). There is also an input plugboard: unlike Enigma’s plugboard, it’s not restricted to pairs, so it’s entered like a rotor (without stepping). To create your own rotor, enter the letters that the rotor maps A to Z to, in order, optionally followed by < then a list of stepping points.More detailed descriptions of the Enigma, Typex and Bombe operations can be found here.
- Tool name:
cyberchef_typex - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
1st_left_hand_rotor |
editableOption | MCYLPQUVRXGSAOWNBJEZDTFKHI<BFHNQUW |
1st_rotor_reversed |
boolean | false |
1st_rotor_ring_setting |
option | A |
1st_rotor_initial_value |
option | A |
2nd_rotor |
editableOption | KHWENRCBISXJQGOFMAPVYZDLTU<BFHNQUW |
2nd_rotor_reversed |
boolean | false |
2nd_rotor_ring_setting |
option | A |
2nd_rotor_initial_value |
option | A |
3rd_middle_rotor |
editableOption | BYPDZMGIKQCUSATREHOJNLFWXV<BFHNQUW |
3rd_rotor_reversed |
boolean | false |
3rd_rotor_ring_setting |
option | A |
3rd_rotor_initial_value |
option | A |
4th_static_rotor |
editableOption | ZANJCGDLVHIXOBRPMSWQUKFYET<BFHNQUW |
4th_rotor_reversed |
boolean | false |
4th_rotor_ring_setting |
option | A |
4th_rotor_initial_value |
option | A |
5th_right_hand_static_rotor |
editableOption | QXBGUTOVFCZPJIHSWERYNDAMLK<BFHNQUW |
5th_rotor_reversed |
boolean | false |
5th_rotor_ring_setting |
option | A |
5th_rotor_initial_value |
option | A |
reflector |
editableOption | AN BC FG IE KD LU MH OR TS VZ WQ XJ YP |
plugboard |
string | — |
typex_keyboard_emulation |
option | None |
strict_output |
boolean | true |