00:00:02
how did the Enigma machine work
00:00:06
how did Alan Turing break the Enigma
00:00:08
using the Bombay machine
00:00:10
in this series of videos we explore the
00:00:12
Enigma machine and the Bombay machine
00:00:14
which we have built from scratch in a
00:00:16
virtual environment so that we can
00:00:18
actually see them working inside out and
00:00:20
understand every aspect of these
00:00:22
incredible machines
00:00:26
welcome to ingenious
00:00:28
[Music]
00:00:37
in the last episode we have seen how the
00:00:39
Enigma machine worked by examining the
00:00:41
machine right down to every single wire
00:00:43
switch and light bulb
00:00:46
now we will explore how the same Enigma
00:00:48
machine was cracked by the
00:00:49
mathematicians at The Bletchley Park
00:00:53
[Music]
00:00:55
if you recall the Enigma machine uses
00:00:57
two contact switches in its keyboard
00:01:00
when the key is pressed the switch
00:01:02
output wire connects to the battery's
00:01:03
positive terminal
00:01:05
when the key is not pressed the switch
00:01:07
output wire connects to the light bulb
00:01:10
in this case key for letter e is pressed
00:01:13
and light bulb for letter T is glowing
00:01:16
notice here that the current reaches
00:01:18
till the light bulb T passing through
00:01:20
the switch for the letter t
00:01:22
now let us look at the light bulb for
00:01:24
the letter e
00:01:25
as the key for letter e is pressed you
00:01:28
can see that the corresponding light
00:01:30
bulb for the letter e is cut off and
00:01:32
there is no way it can glow as long as
00:01:34
the switch for the letter e is pressed
00:01:36
this tells us that in an Enigma machine
00:01:38
no letter can be converted to itself
00:01:41
e cannot be converted to e t cannot be
00:01:44
converted to T and so on
00:01:47
this is the first weakness of the Enigma
00:01:49
machine which we will exploit to break
00:01:51
its code
00:01:52
let us say that we have intercepted the
00:01:54
following radio transmission
00:01:57
and since it is intercepted at 6am in
00:01:59
the morning we expect it to contain a
00:02:01
weather forecast something like this
00:02:04
weather is clear Heil Hitler is our
00:02:06
guess
00:02:07
the question that remains is how do we
00:02:09
match the letters between the
00:02:11
intercepted message and the guest
00:02:12
message
00:02:13
this is where we are going to exploit
00:02:15
the first weakness of enigma
00:02:18
let us align Our Guest message at the
00:02:20
very beginning of the intercepted
00:02:21
message
00:02:23
the very first pairing of letter implies
00:02:25
that w got encrypted to w
00:02:28
as we have seen no letter can be
00:02:30
converted to itself in enigma
00:02:33
so this alignment is not right
00:02:36
let us Slide the guest message by one
00:02:38
step
00:02:39
again we have letter A getting encrypted
00:02:42
to itself which cannot be right
00:02:44
sliding again
00:02:46
we have L and R matching
00:02:49
let us continue sliding till none of the
00:02:51
letter from intercepted message matches
00:02:53
with the corresponding letters from the
00:02:55
guest message
00:03:01
thank you
00:03:04
voila
00:03:05
we found a case where none of the
00:03:07
letters are getting converted to itself
00:03:10
this pairing between the intercepted
00:03:12
message and the guest message is also
00:03:13
called as a crib
00:03:15
so we have found a crib
00:03:18
just as a check we can slide further to
00:03:20
check whether we have one more Crib in
00:03:21
this case which is a possibility
00:03:24
[Music]
00:03:27
it looks like we have only one Crib in
00:03:29
this case
00:03:30
this makes things easier for us since we
00:03:33
now have a definite one-to-one
00:03:34
correspondence between the intercepted
00:03:36
and guest message
00:03:38
just as a side note this pairing is the
00:03:41
same one we had gotten in episode 1 and
00:03:43
2.
00:03:44
so we are effectively trying to break
00:03:46
the code from the encrypted messages
00:03:48
from episode 1 and 2.
00:03:50
and if we are successful we should get
00:03:52
the same settings as an output which
00:03:54
reuse back in those episodes
00:03:57
now that we have a crib let us try to
00:03:59
understand how the Bombay machine worked
00:04:01
to use that crib to crack the Enigma
00:04:04
recalling the flow of letters from
00:04:06
episode 2 the letter first goes through
00:04:08
the plug board
00:04:10
then through rotor 1 rotor 2 rotor 3
00:04:13
gets reflected on the rotor 3 then to
00:04:15
rotor 2 rotor 1 and back to the plug
00:04:17
board finally lights up the light bulb
00:04:20
among these series of conversions the
00:04:22
rotor 1 to rotor 1 conversions are only
00:04:25
dependent on rotor positions
00:04:28
in other words these conversions are
00:04:30
functions of the rotor position
00:04:32
let us assume that the initial rotor
00:04:34
position is X
00:04:36
this would be the setting that the
00:04:38
person using Enigma would have read in
00:04:40
the settings sheet
00:04:41
if you recall in Enigma machine the
00:04:44
rotor rotates every time a key is
00:04:45
pressed
00:04:47
so we can say that w converts2o at X
00:04:50
plus one
00:04:51
similarly e converts to T at X plus two
00:04:54
a converts to H at X plus 3 and so on
00:04:58
objective of the Bombay machine is to
00:05:01
find X and to find the plug board
00:05:03
settings
00:05:04
let us now see how Bombay machine was
00:05:06
designed to achieve these objectives
00:05:08
[Music]
00:05:10
to understand easily let us take a
00:05:12
simplified example of a crib
00:05:14
here a d d add is converted to c c a
00:05:19
let us also assume for the sake of
00:05:21
Simplicity that there are only six
00:05:23
alphabets in English language
00:05:26
a b c d e f
00:05:31
in the six letter World our 26-letter
00:05:34
Enigma machine shrinks to six letter
00:05:36
Enigma machine
00:05:37
[Music]
00:05:40
our crib conversion can be represented
00:05:42
by using three Enigma machines as shown
00:05:44
here
00:05:45
the only difference between these three
00:05:47
machines is the rotor positions
00:05:50
a converts to C at X plus one
00:05:53
D converts to C at X plus two
00:05:57
D converts to a at X plus 3
00:06:00
we need to find rotor position and plug
00:06:02
board settings where all of these
00:06:04
conversions happen one rotor position
00:06:05
away from each other
00:06:07
the most obvious way of finding the
00:06:09
Enigma settings is to take three Enigma
00:06:11
machines
00:06:12
set their rotor positions one position
00:06:14
away from each other and keep changing
00:06:16
the plug board settings and rotor
00:06:18
position until you get the conversion we
00:06:20
are looking for
00:06:23
this crude method of finding settings is
00:06:25
shown here
00:06:27
we have three Enigma machines
00:06:29
their rotor positions are just one step
00:06:32
away from each other
00:06:33
currently the setting under test is one
00:06:36
one one for the rotor position and ad
00:06:38
for the plug board
00:06:40
the three men operating these machines
00:06:42
are continually pressing the same letter
00:06:44
and are looking for a particular output
00:06:46
that is c c a respectively
00:06:49
in this case add is converting to e b c
00:06:54
so these settings are wrong
00:06:57
we have to try different setting
00:06:58
[Music]
00:07:01
here the output from the three enigmas
00:07:04
is c b e respectively
00:07:06
wrong again
00:07:08
moving on to the next setting
00:07:11
this one is for rotor position 1 4 2 and
00:07:14
plug board setting be
00:07:16
wrong again
00:07:18
moving on
00:07:20
let us check some random settings
00:07:37
at this rotor position 252 and plug
00:07:40
board setting a c we got to CCA as
00:07:43
output which is what we were looking for
00:07:46
so we have found the Enigma settings
00:07:48
that were used to convert a DD to CCA
00:07:52
this is a very crude and lengthy process
00:07:54
to try to crack the Enigma
00:07:57
in the real world with 26 letter Enigma
00:07:59
machines the number of possible settings
00:08:01
are so high that it would require more
00:08:03
than a lifetime to check all the
00:08:05
settings
00:08:06
Alan Turing wanted to build one machine
00:08:08
which can search for the right settings
00:08:10
on its own and in a much more efficient
00:08:12
way
00:08:13
the world will come to know that machine
00:08:15
as the Bombay machine
00:08:18
let us look at the design philosophy of
00:08:20
the Bombay machine
00:08:22
we will start with Bombay rotors
00:08:25
here are Enigma rotors
00:08:27
again they are from the six letter world
00:08:30
input is given to the yellow wires in
00:08:33
each rotor
00:08:34
output of each individual rotor is taken
00:08:37
from the blue wires
00:08:38
if you recall from the episode 1 rotor 2
00:08:41
rotates one step every time rotor 1
00:08:43
rotates one complete circle
00:08:46
rotor 3 rotates one step every time
00:08:48
rotor 2 rotates one complete circle
00:08:51
if we give voltage to the first wire
00:08:53
that is if we give a as input it goes
00:08:55
through all the rotors and back to give
00:08:57
output as B
00:09:00
the Bombay rotors are shown here
00:09:03
they are derived from the Enigma rotors
00:09:06
they essentially separate the return
00:09:08
path of the voltage and taking output
00:09:10
from separate set of wires
00:09:12
we have two identical rotor ones two
00:09:14
rotor twos and two rotor threes
00:09:17
again if we give a as input it goes
00:09:20
through all the rotors and back to give
00:09:22
output is B
00:09:23
only difference between the Enigma
00:09:25
rotors and Bombay rotors is that the
00:09:27
input and output corresponds to separate
00:09:29
set of wires
00:09:31
Bombay rotors and Enigma rotors are
00:09:33
electrical equivalent of each other
00:09:36
if Enigma rotors convert a into B then
00:09:39
so do the Bombay rotors
00:09:41
just for distinguishing the rotors in
00:09:43
the return path let us color them
00:09:45
differently
00:09:47
for the sake of Simplicity the six wires
00:09:50
can be represented with a single cable
00:09:52
as shown here
00:09:54
notice that since we have two identical
00:09:56
rotor ones they may as well be
00:09:58
physically mounted on the same
00:09:59
mechanical shaft
00:10:01
we have enlarged the rotors in the input
00:10:03
path
00:10:05
and now we can place The Identical
00:10:07
rotors on the same shaft
00:10:11
there you go
00:10:18
this is exactly what Bombay rotors look
00:10:20
like in the machine built by Alan Turing
00:10:24
[Music]
00:10:25
to reiterate the Bombay rotors and
00:10:27
Enigma rotors are electrical equivalent
00:10:29
of each other
00:10:31
if Enigma rotors convert a into B then
00:10:33
so do the Bombay rotors
00:10:36
now that we have learned about the
00:10:37
Bombay rotors let us introduce the
00:10:39
concept of equivalent rotor circuit
00:10:42
this concept is vital for explaining how
00:10:44
the Bombay machine works
00:10:47
let us take the Bombay rotors at the
00:10:49
position one one one
00:10:51
if we give a as input it goes through
00:10:53
all the rotors to give the output as B
00:10:56
so we can draw a line connecting A and B
00:10:59
in the equivalent rotor circuit for this
00:11:01
rotor position
00:11:02
if we give b as input it goes through
00:11:05
all the rotors to give the output as a
00:11:08
so we can draw a line connecting B to a
00:11:10
in the equivalent rotor circuit
00:11:13
if we give c as input it goes through
00:11:15
all the rotors to give the output as f
00:11:18
so we can draw a line connecting C to F
00:11:21
in the equivalent rotor circuit
00:11:24
and similarly we can complete the
00:11:26
equivalent circuit for the rest of the
00:11:28
letters
00:11:30
[Music]
00:11:33
the rotor equivalent circuit is
00:11:35
electrically equivalent to the rotors
00:11:38
if the rotors convert f into C the
00:11:40
equivalent rotor circuit will also
00:11:42
convert f into C at that rotor position
00:11:48
let us Advance the rotors by one
00:11:50
position
00:11:51
the equivalent rotor circuit is
00:11:53
completely changed
00:11:55
this should be obvious because of the
00:11:57
fact that the electrical connections of
00:11:59
the rotors change as the rotor position
00:12:01
changes
00:12:02
[Music]
00:12:04
now let us build the electrical circuit
00:12:07
for the Bombay machine
00:12:09
if you recall from earlier part of this
00:12:11
video input letter goes through these
00:12:13
sequence of conversions before the
00:12:15
output is generated by the Enigma
00:12:16
machine
00:12:18
the rotor conversions in this diagram
00:12:20
can be replaced by the Bombay rotors as
00:12:22
shown here
00:12:28
now for the plug board there are six
00:12:30
possible connections
00:12:32
if a is not connected to any other
00:12:34
letter on the bloodboard the input will
00:12:36
directly go to the first wire of the
00:12:38
rotors corresponding to the letter A
00:12:41
if a is connected to be on the plug
00:12:43
board the input a will get converted to
00:12:45
B and it will connect to the second wire
00:12:47
of the rotors corresponding to the
00:12:49
letter b
00:12:50
similarly the rest of the possibilities
00:12:53
are shown
00:12:54
we need to find which one of these
00:12:56
possibilities is actually true
00:12:58
but for now all are equally probable
00:13:02
so we will keep all the wires as a
00:13:04
representation of the plug board
00:13:07
each of the wire here is a hypothesis or
00:13:09
a guess stating to which letter does the
00:13:11
letter A connects to on the plug board
00:13:14
only one of these hypotheses can be true
00:13:16
since you cannot possibly connect a to
00:13:19
multiple letters on the plug Board of
00:13:20
the Enigma machine
00:13:24
similarly we can represent six
00:13:26
hypothesis wires for the letter c
00:13:32
now let us replace the rotors with its
00:13:34
equivalent circuit for this rotor
00:13:36
position
00:13:43
this circuit is for conversion from a to
00:13:45
c
00:13:47
we can draw similar circuits for the
00:13:49
rest of the crib
00:13:50
let x equals one six two be the rotor
00:13:53
position Bombay machine is trying out as
00:13:55
a possible solution
00:13:57
these are the three circuits we have
00:13:59
made based on the crib
00:14:01
the rotors in these conversions are
00:14:03
placed one position away from each other
00:14:04
at X Plus One X plus two and X Plus 3.
00:14:09
notice that the rotor equivalent
00:14:11
circuits are different for each
00:14:12
conversion
00:14:14
this is expected as the equivalent rotor
00:14:16
circuit changes as the rotor position
00:14:18
changes
00:14:20
are these circuits connected to each
00:14:22
other
00:14:23
If You observe there are some common
00:14:25
cables
00:14:26
cable D is common between the second and
00:14:29
the third circuit
00:14:30
cable C is common between the first and
00:14:33
the second circuit
00:14:35
and cable a is common between the first
00:14:37
and the third circuit
00:14:39
rearranging these circuit connections we
00:14:42
get the circuit
00:14:44
this is what circuit looked like inside
00:14:45
the Bombay machine
00:14:47
it is intriguing isn't it
00:15:00
to check whether the current position x
00:15:02
equals 1 6 2 is the correct solution or
00:15:05
not we apply voltage to one of the wires
00:15:08
this voltage spreads to the all the
00:15:10
connected wires
00:15:28
in this case the voltage spread out to
00:15:30
all the wires in all the cables
00:15:33
if you look at cable C all the six wires
00:15:35
have the voltage
00:15:37
remember how we said that each wire is
00:15:39
in hypothesis of where the letter c is
00:15:42
connected to on the plug board
00:15:44
and only one of these hypotheses can be
00:15:46
true
00:15:47
however here since all the wires have
00:15:50
the voltage it is indicating that all
00:15:52
the hypotheses are true
00:15:54
this is definitely not possible
00:15:57
so we do not have a solution at this
00:15:59
rotor position x equals one six two as a
00:16:03
general rule if all the wires in the
00:16:04
cable set are showing voltage then we do
00:16:07
not have a solution and we need to try
00:16:08
the next rotor position
00:16:09
[Music]
00:16:13
in one go this Bombay circuit has
00:16:15
eliminated rotor position 162 as a
00:16:18
possible solution
00:16:19
doing this manually would have required
00:16:22
to check all the possible plug board
00:16:23
settings at rotor position 162.
00:16:26
this is why Bombay is much faster
00:16:29
[Music]
00:16:31
let us move to another rotor position x
00:16:33
equals two five two
00:16:35
notice that at this rotor position x
00:16:38
equals 2 5 2 the rotor equivalent
00:16:40
circuits have all been changed
00:16:44
now let us apply voltage to one of the
00:16:46
wires
00:16:48
in this case the voltage did not spread
00:16:50
to all the wires
00:16:52
we have one wire in each cable which
00:16:54
carries the voltage
00:16:56
so we have found a solution
00:16:59
if we look at cable C hypothesis that
00:17:01
letter C is connected to a is found to
00:17:04
be true since the first wire has the
00:17:06
voltage
00:17:07
the solution wire has isolated itself
00:17:09
from the rest of the bunch
00:17:11
Bombay has identified the solution for
00:17:13
the rotor position as x equals 2 5 2.
00:17:17
and the determined bloodboard settings
00:17:19
are C is connected to a a is connected
00:17:22
to C and D is not connected to any other
00:17:25
letter on the plug board
00:17:26
this is where the Bombay machine would
00:17:28
stop spinning and checking for further
00:17:30
rotor positions
00:17:32
this is the philosophy and the
00:17:34
underlining principle of working of the
00:17:36
Bombay machine
00:17:42
this is the crib we just used to break
00:17:44
the enigma's code
00:17:46
this is a special crib
00:17:48
it can be rearranged to form a loop
00:17:56
if you recall from episode 1 same Enigma
00:17:59
machine is used for encryption and
00:18:01
decryption
00:18:02
so if a converts to C for a particular
00:18:05
rotor position C also converts to a for
00:18:08
the same rotor position
00:18:10
this is actually the weakness number two
00:18:12
of the Enigma machine that we just
00:18:13
exploited to break its code
00:18:16
because of this weakness we can form a
00:18:18
loop like the one shown here and build a
00:18:20
circuit corresponding to this Loop
00:18:22
for Bombay machine to work we need to
00:18:24
find Loops in the crib like the one we
00:18:26
have here
00:18:29
only Loops are useful in Breaking the
00:18:31
Enigma with the Bombay machine
00:18:35
in summary cracking the Enigma with
00:18:37
Bombay machine involves three steps
00:18:40
first is to identify Loops in the given
00:18:43
crib
00:18:44
second is to connect the Bombay rotors
00:18:46
as per the loops
00:18:48
third step is to apply voltage to one of
00:18:51
the wires in the loop and run the rotors
00:18:53
until an isolated wire is found
00:18:55
in the next video we will take a look at
00:18:58
the full-size Bombay machine that we
00:18:59
have built and see it working as for the
00:19:01
principles developed in this video
00:19:04
if you think you have got some value
00:19:06
from this video do hit the Subscribe
00:19:08
button so that you don't miss brand new
00:19:09
content from ingenious
00:19:12
see you in the next video
00:19:15
foreign