Colossus
Category: Bletchley
Status: Registered and callable in the CyberChef 11.3.0 compatibility inventory.
Input / output: string → JSON
Background: https://wikipedia.org/wiki/Colossus_computer
What it does
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.
Note
Status here means the operation name is implemented and callable. It does not by itself promise byte-for-byte parity for every upstream option. See Compatibility and current status for the verified scope and known boundaries.
Arguments and options
Arguments are positional. Keep their order when using bake() or
Pipeline.then().
Index |
Name |
UI type |
PyChef default |
Accepted values / format |
|---|---|---|---|---|
|
Input |
|
|
Any value supported by this argument type |
|
Pattern |
|
|
|
|
QBusZ |
|
|
|
|
QBusΧ |
|
|
|
|
QBusΨ |
|
|
|
|
Limitation |
|
|
|
|
K Rack Option |
|
|
|
|
Program to run |
|
|
|
|
K Rack: Conditional |
|
|
Any value supported by this argument type |
|
R1-Q1 |
|
|
|
|
R1-Q2 |
|
|
|
|
R1-Q3 |
|
|
|
|
R1-Q4 |
|
|
|
|
R1-Q5 |
|
|
|
|
R1-Negate |
|
|
|
|
R1-Counter |
|
|
|
|
R2-Q1 |
|
|
|
|
R2-Q2 |
|
|
|
|
R2-Q3 |
|
|
|
|
R2-Q4 |
|
|
|
|
R2-Q5 |
|
|
|
|
R2-Negate |
|
|
|
|
R2-Counter |
|
|
|
|
R3-Q1 |
|
|
|
|
R3-Q2 |
|
|
|
|
R3-Q3 |
|
|
|
|
R3-Q4 |
|
|
|
|
R3-Q5 |
|
|
|
|
R3-Negate |
|
|
|
|
R3-Counter |
|
|
|
|
Negate All |
|
|
|
|
K Rack: Addition |
|
|
Any value supported by this argument type |
|
Add-Q1 |
|
|
|
|
Add-Q2 |
|
|
|
|
Add-Q3 |
|
|
|
|
Add-Q4 |
|
|
|
|
Add-Q5 |
|
|
|
|
Add-Equals |
|
|
|
|
Add-Counter1 |
|
|
|
|
Add Negate All |
|
|
|
|
Total Motor |
|
|
|
|
Master Control Panel |
|
|
Any value supported by this argument type |
|
Set Total |
|
|
A Python integer or floating-point value |
|
Fast Step |
|
|
|
|
Slow Step |
|
|
|
|
Start Χ1 |
|
|
A Python integer or floating-point value |
|
Start Χ2 |
|
|
A Python integer or floating-point value |
|
Start Χ3 |
|
|
A Python integer or floating-point value |
|
Start Χ4 |
|
|
A Python integer or floating-point value |
|
Start Χ5 |
|
|
A Python integer or floating-point value |
|
Start M61 |
|
|
A Python integer or floating-point value |
|
Start M37 |
|
|
A Python integer or floating-point value |
|
Start Ψ1 |
|
|
A Python integer or floating-point value |
|
Start Ψ2 |
|
|
A Python integer or floating-point value |
|
Start Ψ3 |
|
|
A Python integer or floating-point value |
|
Start Ψ4 |
|
|
A Python integer or floating-point value |
|
Start Ψ5 |
|
|
A Python integer or floating-point value |
Recipe template
Important
This is a call template built from the documented defaults. Replace placeholder values such as empty keys, paths, patterns, or lookup data before running it.
from pychef import bake
input_value = "example"
args = ['', 'KH Pattern', '', '', '', 'None', 'Select Program', '', '', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', False, '', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', False, '', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', False, '', False, '', False, False, False, False, False, 'SWITCHES', False, False, 'SWITCHES', '', 0, '', '', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
result = bake(input_value, [{"op": 'Colossus', "args": args}])
print(result)
Pipeline example
from pychef import Pipeline
args = ['', 'KH Pattern', '', '', '', 'None', 'Select Program', '', '', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', False, '', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', False, '', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', False, '', False, '', False, False, False, False, False, 'SWITCHES', False, False, 'SWITCHES', '', 0, '', '', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
transform = Pipeline().then('Colossus', *args)
result = transform("example")
Dedicated operation module
The registered entry point lives in
pychef.operations.by_operation.colossus. Direct calls
receive the input value and a positional argument tuple:
from pychef.operations.by_operation.colossus import run
result = run("example", tuple(['', 'KH Pattern', '', '', '', 'None', 'Select Program', '', '', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', False, '', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', False, '', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', 'SWITCHES', False, '', False, '', False, False, False, False, False, 'SWITCHES', False, False, 'SWITCHES', '', 0, '', '', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))
- pychef.operations.by_operation.colossus.run(value, args)
Run this operation using its shared internal implementation.
- Parameters:
value (str | bytes)
args (Sequence[Any])
- Return type:
str | bytes