Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00.06 --> 00:00:01.08
- [Instructor] As we progress through the course,
2
00:00:01.08 --> 00:00:03.06
we'll use our newly gained knowledge
3
00:00:03.06 --> 00:00:06.00
to develop a file encryptor.
4
00:00:06.00 --> 00:00:07.08
We'll base this on the World War II
5
00:00:07.08 --> 00:00:10.00
three rotor Enigma machine.
6
00:00:10.00 --> 00:00:13.00
As we can see, the Enigma has a plug board at the front
7
00:00:13.00 --> 00:00:16.06
and a set of rotors located in slots.
8
00:00:16.06 --> 00:00:19.02
There could be up to eight rotors and for any session,
9
00:00:19.02 --> 00:00:22.06
three would be selected and placed in the machine.
10
00:00:22.06 --> 00:00:24.00
The rotor consists of wires,
11
00:00:24.00 --> 00:00:27.02
which connect two of the 26 characters of the alphabet,
12
00:00:27.02 --> 00:00:30.08
therefore providing a full alphabet substitution.
13
00:00:30.08 --> 00:00:31.08
For each rotor,
14
00:00:31.08 --> 00:00:34.08
the alphabet wheel can be set to start character.
15
00:00:34.08 --> 00:00:39.06
So a single rotor could be in one of 26 possible states.
16
00:00:39.06 --> 00:00:40.09
The way the Enigma works
17
00:00:40.09 --> 00:00:43.04
is that a character is entered on the keyboard,
18
00:00:43.04 --> 00:00:45.01
it passes through the plug board,
19
00:00:45.01 --> 00:00:47.04
and may be exchanged with another character.
20
00:00:47.04 --> 00:00:51.02
Up to 10 characters of the alphabet could be exchanged.
21
00:00:51.02 --> 00:00:53.00
The character that comes out of the plug board
22
00:00:53.00 --> 00:00:55.05
is then passed to the first rotor.
23
00:00:55.05 --> 00:00:57.09
When a character arrives at the first rotor,
24
00:00:57.09 --> 00:01:02.03
it substitutes it, and then turns the rotor one position.
25
00:01:02.03 --> 00:01:04.04
The substituted character is then passed
26
00:01:04.04 --> 00:01:05.03
to the second rotor,
27
00:01:05.03 --> 00:01:08.07
which does the same substitution using its coding.
28
00:01:08.07 --> 00:01:11.03
It would only step after a complete rotation
29
00:01:11.03 --> 00:01:14.00
of the first rotor.
30
00:01:14.00 --> 00:01:16.02
After passing through the third rotor,
31
00:01:16.02 --> 00:01:18.03
it'S reflected back through the rotors
32
00:01:18.03 --> 00:01:21.01
and reverse substituted.
33
00:01:21.01 --> 00:01:22.09
The final character is then passed
34
00:01:22.09 --> 00:01:24.02
through the plug board,
35
00:01:24.02 --> 00:01:26.05
where it may or may not be substituted
36
00:01:26.05 --> 00:01:30.00
and becomes the next character in the cipher message.
37
00:01:30.00 --> 00:01:33.00
The reflector was the cause of some weakness in Enigma,
38
00:01:33.00 --> 00:01:35.05
but it did mean that decryption was very easy.
39
00:01:35.05 --> 00:01:37.06
Just run the cipher through the machine
40
00:01:37.06 --> 00:01:40.00
and plain text appears.
41
00:01:40.00 --> 00:01:42.04
We can see then that our program will need to provide
42
00:01:42.04 --> 00:01:45.08
for a set of rotors, which have coded settings,
43
00:01:45.08 --> 00:01:48.09
a plug board, and a fixed reflector.
44
00:01:48.09 --> 00:01:51.06
We'll allow the user to select three rotors,
45
00:01:51.06 --> 00:01:54.06
set the alphabet start position for each rotor,
46
00:01:54.06 --> 00:01:57.05
and enter two plug board connections.
47
00:01:57.05 --> 00:02:00.06
We'll use an abbreviated alphabet of zero to F
48
00:02:00.06 --> 00:02:03.00
to cover each of the hexadecimal characters,
49
00:02:03.00 --> 00:02:06.01
and this will allow us to process readable messages
50
00:02:06.01 --> 00:02:08.02
as four bit nibbles.
51
00:02:08.02 --> 00:02:10.09
The program when run will read a file
52
00:02:10.09 --> 00:02:13.00
and process it nibble by nibble,
53
00:02:13.00 --> 00:02:16.03
passing each nibble through the plug board and three rotors,
54
00:02:16.03 --> 00:02:19.09
and then returning it via the plug board to be written.
55
00:02:19.09 --> 00:02:22.01
The first rotor will turn after each nibble,
56
00:02:22.01 --> 00:02:25.03
the second one, every 16 nibbles,
57
00:02:25.03 --> 00:02:29.03
and the third, once every 256 nibbles.
58
00:02:29.03 --> 00:02:31.06
The point at which the second and third rotors turn
59
00:02:31.06 --> 00:02:33.05
is determined by what is known
60
00:02:33.05 --> 00:02:35.05
as a notch in the previous wheel,
61
00:02:35.05 --> 00:02:38.09
which we'll simulate by configuring a notch position.
62
00:02:38.09 --> 00:02:41.01
One of the advantages of this design
63
00:02:41.01 --> 00:02:44.03
is that if you feed in the cipher using the same settings,
64
00:02:44.03 --> 00:02:46.00
then it reverses the ciphering
65
00:02:46.00 --> 00:02:47.04
and you get plain text out.
5289
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.