
1
00:00:00,510 --> 00:00:04,046
So the first topic that we're going to 
talk about is confidentiality, encryption 

2
00:00:04,046 --> 00:00:07,458
and decryption. 
And of course, this was what was going on 

3
00:00:07,458 --> 00:00:12,937
at Bletchley Park in World War II. 
So the terminology that we'll use in this 

4
00:00:12,937 --> 00:00:17,587
is plain text and ciphertext. 
And the idea is whether it's text or 

5
00:00:17,587 --> 00:00:20,661
other information, there is the 
information that we actually want to 

6
00:00:20,661 --> 00:00:25,000
transmit whether it's a credit card 
number or something else. 

7
00:00:25,000 --> 00:00:28,127
And then there is the encrypted version 
of that, and we'll call that the 

8
00:00:28,127 --> 00:00:31,456
ciphertext. 
And the ciphertext is what we assume is 

9
00:00:31,456 --> 00:00:35,690
revealed to intermediate parties. 
Whether they are stopping it, and 

10
00:00:35,690 --> 00:00:40,738
changing it, or they're just watching it. 
It's still, the ciphertext is the stuff 

11
00:00:40,738 --> 00:00:45,160
that we are just by the nature of the 
communication we are forced to reveal it, 

12
00:00:45,160 --> 00:00:50,018
or there is a probability that we'll 
reveal it. 

13
00:00:50,018 --> 00:00:54,044
So it is hopefully unintelligible, and 
hopefully it is difficult to go from the 

14
00:00:54,044 --> 00:00:58,192
ciphertext to the plain text, except if 
you are the actual intended recipient, or 

15
00:00:58,192 --> 00:01:04,080
impossible. 
Encryption is the act of going from plain 

16
00:01:04,080 --> 00:01:08,332
text to ciphertext. 
And returning the ciphertext back to the 

17
00:01:08,332 --> 00:01:11,640
plain text is decryption. 
And there is a key. 

18
00:01:11,640 --> 00:01:15,593
Some kind of a key, which is really sort 
of a, some data plus a technique plus an 

19
00:01:15,593 --> 00:01:20,547
algorithm that goes back and forth. 
So there are two kinds of systems that 

20
00:01:20,547 --> 00:01:23,220
we'll talk about in the upcoming 
lectures. 

21
00:01:23,220 --> 00:01:28,750
One is called a secret key, and the other 
is called a public key. 

22
00:01:28,750 --> 00:01:33,126
the secret key is the one we talked about 
at the very beginning. 

23
00:01:33,126 --> 00:01:38,660
The secret key was really used, from the 
Romans and Caesar, on up to World War II. 

24
00:01:38,660 --> 00:01:43,551
the public key encryption really is much 
more recent, in the 60's and the 70's and 

25
00:01:43,551 --> 00:01:48,884
we'll talk about that later on. 
So the first thing we'll talk about is 

26
00:01:48,884 --> 00:01:53,264
the shared secret, or secret key. 
the secret key is also called symmetric 

27
00:01:53,264 --> 00:01:56,863
key, which means that both parties have 
to be in possession of the same 

28
00:01:56,863 --> 00:02:02,043
information. 
You basically use the same key material 

29
00:02:02,043 --> 00:02:07,312
to encrypt as you do to decrypt. 
The the public key is asymmetric, which 

30
00:02:07,312 --> 00:02:10,860
means you use one key to encrypt, and a 
different key to decrypt. 

31
00:02:10,860 --> 00:02:15,215
We'll get to that later. 
and so the problem that secret key has, 

32
00:02:15,215 --> 00:02:19,424
that led to the need to invent a public 
key, is the fact that you need to at some 

33
00:02:19,424 --> 00:02:25,275
point have a secure communication. 
Whether you're sitting in a room together 

34
00:02:25,275 --> 00:02:28,020
and you hand each other code books, 
whatever it is, you have to have a way to 

35
00:02:28,020 --> 00:02:34,288
distribute the key in a secure manner. 
The public key, which we'll get to later, 

36
00:02:34,288 --> 00:02:38,963
has a way of distributing the key in a in 
a using insecure medium. 

37
00:02:38,963 --> 00:02:43,058
And you'll see when we get there it's 
like, so obvious and clever, you wonder 

38
00:02:43,058 --> 00:02:47,610
why nobody thought of it until you know 
very recently. 

39
00:02:47,610 --> 00:02:49,960
So, here is the path. 
Right? 

40
00:02:49,960 --> 00:02:55,810
You had some plain-text, you you have say 
the word candy that you want to send. 

41
00:02:55,810 --> 00:03:00,202
You're going to encrypt with a shift, 
where you, you just go to the next later 

42
00:03:00,202 --> 00:03:04,594
letters, so C becomes D, A becomes B, N 
becomes O, and so now we have the D, B, 

43
00:03:04,594 --> 00:03:10,580
O, E, Z. 
That is the plain text coming from Alice. 

44
00:03:10,580 --> 00:03:14,533
Alice sends it in the dangerous, 
dangerous, nasty wide world of you know 

45
00:03:14,533 --> 00:03:19,022
routers or radio with with Morse code, or 
whatever it is we're going to do, 

46
00:03:19,022 --> 00:03:23,109
whatever it is were going to do, where 
the message might be intercepted by 

47
00:03:23,109 --> 00:03:28,842
somebody in Eve. 
Now there not intercepting the 

48
00:03:28,842 --> 00:03:34,510
plain-text, we assume that this part here 
is secure, and this part here is secure. 

49
00:03:34,510 --> 00:03:38,360
It's only dangerous while it's in flight, 
somehow, in the middle. 

50
00:03:38,360 --> 00:03:43,101
And we only worry about Eve getting it. 
And then, then at some point, because Bob 

51
00:03:43,101 --> 00:03:47,846
has the key which is subtract one, Bob 
goes from each of the ciphertext letters 

52
00:03:47,846 --> 00:03:55,150
back to the plain text letters. 
And voila, out comes the plain-text 

53
00:03:55,150 --> 00:03:59,607
again. 
And so, Eve's problem is I'm, Eve is only 

54
00:03:59,607 --> 00:04:05,630
handed, well no, sorry, sorry. 
Eve's not, Eve's not given the key, Eve 

55
00:04:05,630 --> 00:04:10,118
is given the ciphertext and nothing else, 
and she must, like Bletchley Park, must 

56
00:04:10,118 --> 00:04:14,435
derive whatever it is. 
Derive the key, derive the plain-text, 

57
00:04:14,435 --> 00:04:17,363
whatever it is. 
That's Eve's goal. 

58
00:04:17,363 --> 00:04:23,663
The Caesar cipher, is the kind of the 
oldest, most widely used forms of 

59
00:04:23,663 --> 00:04:29,440
encryption. 
It uses the notion of a shift. 

60
00:04:29,440 --> 00:04:35,130
The shift number is just as I've shown. 
A shift of 1, means A becomes B and X 

61
00:04:35,130 --> 00:04:42,010
becomes Y, and L becomes L becomes M. 
So, you just take and move a fixed 

62
00:04:42,010 --> 00:04:46,477
position down the al. 
This was used for a surprisingly long 

63
00:04:46,477 --> 00:04:49,338
period of time. 
And there are some pretty good YouTube 

64
00:04:49,338 --> 00:04:52,327
videos that kind of you can, if you want 
to see more about sort of the, the how 

65
00:04:52,327 --> 00:04:56,340
this works and the math behind it, and 
how you break it. 

66
00:04:56,340 --> 00:04:59,354
It's, it's pretty fascinating. 
I mean, finally it's just, it's 

67
00:04:59,354 --> 00:05:02,920
completely breakable. 
and we'll actually going to break it here 

68
00:05:02,920 --> 00:05:06,120
pretty soon, ourselves. 
So the Caesar Cipher. 

69
00:05:07,410 --> 00:05:12,502
So I want to pause and let you see a 
YouTube video, here from a, beloved movie 

70
00:05:12,502 --> 00:05:17,125
called The Christmas Story, where little 
Ralphie gets his Little Orphan Annie 

71
00:05:17,125 --> 00:05:23,353
secret decoder ring. 
And Little Orphan Annie sends a decoded 

72
00:05:23,353 --> 00:05:27,322
message, an encoded ciphertext, through 
the radio. 

73
00:05:27,322 --> 00:05:31,543
Everyone can hear it, but only those 
people who have the secret decoder ring 

74
00:05:31,543 --> 00:05:35,976
can decrypt the message. 
And you can see that it is a, a Caesar 

75
00:05:35,976 --> 00:05:40,405
cipher it has a shift. 
You'll note that the first thing they say 

76
00:05:40,405 --> 00:05:44,626
before they say the encrypted message in 
the radio is that you're supposed to 

77
00:05:44,626 --> 00:05:48,847
connect B and 13, or something like that, 
and then you rotate the two wheels of the 

78
00:05:48,847 --> 00:05:55,574
secret decoder ring to the b13. 
And then you can read across the secret 

79
00:05:55,574 --> 00:05:59,480
decoder ring and decrypt the message as 
it's decrypted, and then he slowly 

80
00:05:59,480 --> 00:06:04,029
decrypts it. 
And then, of course, there is the 

81
00:06:04,029 --> 00:06:08,920
delightful moment where he realizes the 
crash, crass commercialism that that, 

82
00:06:08,920 --> 00:06:15,239
that are the complete lack of interesting 
meaning in, in all of this. 

83
00:06:15,239 --> 00:06:20,361
So, without further ado, let's take a 
look at Ralphie and A Christmas Story. 

84
00:06:20,361 --> 00:06:28,491
We'll be right back. 
So, I hope you liked that, hope you liked 

85
00:06:28,491 --> 00:06:31,156
that. 
and so off we go. 

86
00:06:31,156 --> 00:06:35,250
we're going to have a secret decoder ring 
for this class. 

87
00:06:35,250 --> 00:06:39,850
I would love to be able to send you all, 
oops, come down. 

88
00:06:39,850 --> 00:06:43,744
I would love to be able to send you all a 
little mechanical wheel to move the stuff 

89
00:06:43,744 --> 00:06:47,617
back and forth. 
But instead I used the internet, and I'm 

90
00:06:47,617 --> 00:06:51,094
going to send you a PDF, and at this 
point you might want to pause the video, 

91
00:06:51,094 --> 00:06:54,970
and grab this PDF. 
Okay? 

92
00:06:54,970 --> 00:06:57,296
grab it. 
Secretdecoder.pdf. 

93
00:06:57,296 --> 00:07:02,583
Dr-chuck.com/SecretDecoder.pdf. 
And download it, and you might even want 

94
00:07:02,583 --> 00:07:06,989
to print it out. 
Because we're going to, at this moment do 

95
00:07:06,989 --> 00:07:09,900
a code breaking exercise. 
Okay? 

96
00:07:09,900 --> 00:07:14,459
And so let me tell you how to use this 
secret decoder ring. 

97
00:07:15,660 --> 00:07:21,595
So the top line here is the plain text. 
And if you recall Caesar shift has a, a, 

98
00:07:21,595 --> 00:07:27,219
a shift number. 
And so to encode, you go from plain-text, 

99
00:07:27,219 --> 00:07:35,115
let's say I want to do Chuck. 
Alright, I want to encode Chuck. 

100
00:07:35,115 --> 00:07:38,610
And I want to encode it with a shift of 
two. 

101
00:07:38,610 --> 00:07:45,258
So a shift of two means we select this. 
And we basically go C is our plain-text, 

102
00:07:45,258 --> 00:07:52,440
and then down we go E. 
So then we go E is our first letter. 

103
00:07:52,440 --> 00:08:00,680
And then H is our second letter, so we go 
down and that means H becomes J. 

104
00:08:01,790 --> 00:08:08,760
Yeah, and so U becomes W. 
So now I'm doing my encryptions. 

105
00:08:08,760 --> 00:08:16,470
So E H W is the encrypted ciphertext. 
So, let me clear that, and write back 

106
00:08:16,470 --> 00:08:20,472
down here. 
Oop, maybe, a different, different color. 

107
00:08:20,472 --> 00:08:24,258
E H W. 
Now to decrypt, remember, you need to 

108
00:08:24,258 --> 00:08:28,480
know the shift. 
So, we somehow communicated separately 

109
00:08:28,480 --> 00:08:32,931
and securely, what the shift was. 
And so, now we want, we have received our 

110
00:08:32,931 --> 00:08:37,986
ciphertext. 
We received our ciphertext, and we need 

111
00:08:37,986 --> 00:08:41,000
to decrypt it. 
OK? 

112
00:08:41,000 --> 00:08:44,540
And so we know that the shift is two, so 
we go to E, we go in the shift row, and 

113
00:08:44,540 --> 00:08:50,012
then we go up to the plain text row, and 
that says the first one is C. 

114
00:08:50,012 --> 00:08:54,950
Then we go to H, we go to the the encoded 
text row. 

115
00:08:54,950 --> 00:08:58,335
And we go back up to the plain text row, 
and so that's an H. 

116
00:08:58,335 --> 00:09:03,300
Oh, wait, wait, wait. 
It's not H W. 

117
00:09:03,300 --> 00:09:05,035
What am I thinking? 
This should have been a J. 

118
00:09:05,035 --> 00:09:07,740
I got this wrong. 
Sorry about that. 

119
00:09:07,740 --> 00:09:11,600
So, that's wrong. 
Here's a J, moves up to the H. 

120
00:09:11,600 --> 00:09:13,660
Then the W, let's see if I got W right, 
yeah. 

121
00:09:13,660 --> 00:09:18,715
So W is my last ciphertext, and it goes 
up to the U. 

122
00:09:18,715 --> 00:09:21,290
OK? 
Dot, dot, dot, dot, dot. 

123
00:09:21,290 --> 00:09:26,135
So you see the pattern that our in 
encoding is plain text down to shift 

124
00:09:26,135 --> 00:09:33,650
position, and our decoding is shift 
position back up to plain text. 

125
00:09:33,650 --> 00:09:36,100
OK? 
And, so this is our secret decoder ring. 

126
00:09:36,100 --> 00:09:43,930
So go grab it and download it, so that 
you can participate in the next exercise. 

127
00:09:43,930 --> 00:09:49,812
So now you are going to be cast in the 
role of Bletchley Park. 

128
00:09:49,812 --> 00:09:54,011
OK, ready? 
So here is your first code breaking 

129
00:09:54,011 --> 00:09:56,970
exercise. 
OK. 

130
00:09:58,150 --> 00:10:02,840
So here we go. 
So you're Bletchley Park, right? 

131
00:10:02,840 --> 00:10:11,470
You just intercepted this ciphertext. 
U B U P B T U. 

132
00:10:11,470 --> 00:10:13,770
Whoa, it's encrypted. 
It's clearly meaningless. 

133
00:10:14,940 --> 00:10:20,497
So, how are you going to be decrypt it? 
Well, the technique is, take a look, and 

134
00:10:20,497 --> 00:10:24,534
decrypt it with all the shift numbers. 
Right? 

135
00:10:24,534 --> 00:10:28,430
You're going to do this by hand, you're 
going to be a computer yourself. 

136
00:10:28,430 --> 00:10:32,265
You're going to do all the shift 
encrypting, and just like in Bletchley 

137
00:10:32,265 --> 00:10:38,030
Park, you know you've succeeded when the 
plain text makes sense. 

138
00:10:38,030 --> 00:10:41,890
Right when the plain text makes no sense, 
then you haven't succeeded. 

139
00:10:41,890 --> 00:10:43,940
But in some point the plain text makes 
sense. 

140
00:10:46,450 --> 00:10:49,357
So what you need to do is take your 
secret decoder ring, and you need to 

141
00:10:49,357 --> 00:10:52,366
decrypt it with a shift of one, a shift 
of two, a shift of three, a shift of 

142
00:10:52,366 --> 00:10:55,783
four, and if you have your family members 
around, you can put out multiple copies 

143
00:10:55,783 --> 00:10:59,047
of the secret decoder ring, and you can 
assign different shifts to different 

144
00:10:59,047 --> 00:11:07,020
family members. 
So you have to decrypt this 26 times. 

145
00:11:07,020 --> 00:11:11,292
Have to decrypt it 26 times. 
And then you'd look at all the 26 

146
00:11:11,292 --> 00:11:14,763
decryptions, and then you decide which 
one makes the most sense. 

147
00:11:14,763 --> 00:11:21,850
OK? 
So, don't peek, decrypt this one. 

148
00:11:21,850 --> 00:11:23,359
I made it easy on you. 
OK? 

149
00:11:23,359 --> 00:11:29,550
So, we'll stop now, and give you a little 
bit of time to decrypt this one. 

150
00:11:29,550 --> 00:11:32,180
Don't start pause until you actually have 
decrypted it. 

151
00:11:40,870 --> 00:11:42,945
OK? 
OK, this is your last chance for spoiler 

152
00:11:42,945 --> 00:11:44,950
alert. 
So here we are. 

153
00:11:44,950 --> 00:11:48,680
We're about to decrypt it. 
Here we go. 

154
00:11:48,680 --> 00:11:51,495
I did make it easy on you. 
It was a shift of one. 

155
00:11:51,495 --> 00:11:58,062
If was a shift of one. 
If you started at 12, you're kind of 

156
00:11:58,062 --> 00:11:59,490
foolish. 
Right? 

157
00:11:59,490 --> 00:12:03,638
So you started at one, and you go, like, 
oh great, so now, I'm going to decrypt 

158
00:12:03,638 --> 00:12:05,880
it. 
I'll start at one. 

159
00:12:05,880 --> 00:12:09,290
here's the plain text, this should be PP. 
That's the plain text. 

160
00:12:09,290 --> 00:12:11,742
So I'll start with U. 
If it's one, then I go up, and it's T. 

161
00:12:11,742 --> 00:12:14,690
And the second one is P, so I go up, and 
it's O, T O. 

162
00:12:14,690 --> 00:12:21,703
Keep going, says toast. 
So you say to yourself, well that's a 

163
00:12:21,703 --> 00:12:28,290
word, so it must be it. 
Well hello. 

164
00:12:30,400 --> 00:12:33,652
What are you doing here? 
Do you want to say hi to my students? 

165
00:12:33,652 --> 00:12:37,124
 >> Meow. 
 >> This is the cat. 

166
00:12:37,124 --> 00:12:43,008
This is Eddie cat. 
He likes to come up into my office, and 

167
00:12:43,008 --> 00:12:47,114
look. 
So do you know anything about encryption? 

168
00:12:47,114 --> 00:12:50,450
Hm? 
Do you know anything about encryption? 

169
00:12:50,450 --> 00:12:55,130
So you use a shift of one, and then you 
go from the encryption text up to the 

170
00:12:55,130 --> 00:12:59,125
plain text. 
Meow. 

171
00:12:59,125 --> 00:13:02,657
OK. 
You are clearly not interested in my 

172
00:13:02,657 --> 00:13:05,485
lecture. 
So that was my cat. 

173
00:13:05,485 --> 00:13:10,028
Hello, sorry, I can't open a window for 
you, because I'm doing a lecture. 

174
00:13:10,028 --> 00:13:16,330
OK. 
so,[LAUGH] ,[CROSSTALK], you're going 

175
00:13:16,330 --> 00:13:24,568
like just keep bugging that window, until 
I kick you out of the room aren't you? 

176
00:13:24,568 --> 00:13:28,217
So, you're going to have to get kicked 
out. 

177
00:13:28,217 --> 00:13:31,198
Out you go. 
[SOUND] He's was going to keep hitting, 

178
00:13:31,198 --> 00:13:34,960
keep hitting that, until I opened it for 
him. 

179
00:13:34,960 --> 00:13:39,170
OK. 
So, so now you've broken this code. 

180
00:13:39,170 --> 00:13:42,068
And again, just like in Bletchley Park, 
you only knew that you broke it, if it 

181
00:13:42,068 --> 00:13:45,588
made sense. 
And and so, luckily the, in Bletchley 

182
00:13:45,588 --> 00:13:50,278
Park the messages were longer, and they 
were often looking for canonical things 

183
00:13:50,278 --> 00:13:55,529
that they would say everyday. 
So here we go. 

184
00:13:55,529 --> 00:13:59,421
And and so that's the breaking of that 
one. 

185
00:13:59,421 --> 00:14:04,390
And it turns out the shift of one was the 
thing that we did. 

186
00:14:05,780 --> 00:14:10,429
So here is your second task. 
This one's longer, and its not a shift of 

187
00:14:10,429 --> 00:14:13,897
one. 
And so, so this is a situation where you 

188
00:14:13,897 --> 00:14:19,011
would really have to get your whole 
family going on this. 

189
00:14:19,011 --> 00:14:21,820
Right? 
Where you gotta do 26 decryptions of 

190
00:14:21,820 --> 00:14:26,400
this, and it will, you know, make sense 
to you. 

191
00:14:26,400 --> 00:14:28,514
You decrypt it 26 times. 
Right? 

192
00:14:28,514 --> 00:14:33,426
And so, this one's going to be harder. 
I guess you could just, just decrypt one 

193
00:14:33,426 --> 00:14:38,512
word, but it's just not a shift of one. 
But now we're going to do another trick. 

194
00:14:38,512 --> 00:14:39,144
OK? 
So, I don't want you to try all 26. 

195
00:14:39,144 --> 00:14:39,773
Because there's, there's a mistake in 
this. 

196
00:14:39,773 --> 00:14:47,891
There is a leakage of information, that 
makes it so that you can, figure out what 

197
00:14:47,891 --> 00:14:57,460
the right decryption to try it might be. 
So this is English. 

198
00:14:57,460 --> 00:15:02,147
This is an English sentence. 
So stare at it for a while, and find a 

199
00:15:02,147 --> 00:15:07,703
more optimal way to decrypt it, than 
trying all 26 shift patterns. 

200
00:15:07,703 --> 00:15:10,423
OK? 
So there’s a way to optimize this. 

201
00:15:10,423 --> 00:15:15,022
A way to cleverly figure out what might 
be the best shift, or how not to have to 

202
00:15:15,022 --> 00:15:20,970
decrypt the entire message 26 times, to 
reduce the complexity. 

203
00:15:20,970 --> 00:15:25,520
And that's because we've leaked some 
information here, that should be pretty 

204
00:15:25,520 --> 00:15:27,653
obvious to you. 
OK? 

205
00:15:27,653 --> 00:15:30,910
So, let me give you a moment to break 
this one. 

206
00:15:30,910 --> 00:15:34,260
It shouldn't take you too long, and you 
shouldn't have to force your whole family 

207
00:15:34,260 --> 00:15:36,590
to decrypt this stuff. 
OK? 

208
00:15:36,590 --> 00:15:43,256
So here we go. 
Give you a chance to decrypt it. 

209
00:15:43,256 --> 00:15:49,410
OK, this is your last chance before the 
reveal. 

210
00:15:49,410 --> 00:15:51,190
You ready? 
Here we go. 

211
00:15:54,570 --> 00:16:02,812
So here is the decrypted text. 
The shift turns out to be 13, it's a 

212
00:16:02,812 --> 00:16:08,998
shift of 13. 
And the, the weakness of this whole thing 

213
00:16:08,998 --> 00:16:14,366
is this, right here. 
In the English language, what is a single 

214
00:16:14,366 --> 00:16:18,260
character, we're not encrypting the 
spaces you'll notice, because the spaces 

215
00:16:18,260 --> 00:16:23,950
come across. 
So what is the one single character, 

216
00:16:23,950 --> 00:16:31,472
word, that we have in the English 
language, that's capitalized? 

217
00:16:31,472 --> 00:16:37,190
Well, that's usually I. 
I need a jet, money and a jet. 

218
00:16:37,190 --> 00:16:39,800
What is the one thing that we do in the 
English language that is a single 

219
00:16:39,800 --> 00:16:42,815
character word that is all lowercase, 
that's lower case typically, unless it's 

220
00:16:42,815 --> 00:16:46,630
at the beginning of a sentence? 
And that is the letter A. 

221
00:16:46,630 --> 00:16:55,050
So basically, you didn't have to decrypt 
the whole message. 

222
00:16:55,050 --> 00:16:58,380
You see some weird pattern, and you go 
like this. 

223
00:16:58,380 --> 00:17:02,160
I just have to figure out, and then you 
go look. 

224
00:17:02,160 --> 00:17:05,920
And you look in the row 13, the plain 
text. 

225
00:17:05,920 --> 00:17:08,462
And you go, like oh. 
Where's, you go look at the I, because 

226
00:17:08,462 --> 00:17:12,117
you guessed at plain text. 
And then you just look down until you see 

227
00:17:12,117 --> 00:17:14,733
the V. 
And within seconds, literally, within 

228
00:17:14,733 --> 00:17:19,610
seconds, if you do it right, within 
seconds, you know it's a shift of 13. 

229
00:17:19,610 --> 00:17:22,920
And then it's a trivial matter to convert 
it. 

230
00:17:24,170 --> 00:17:26,290
So, you could figure out the shift code 
within seconds. 

231
00:17:26,290 --> 00:17:29,750
And these, this was how Bletchley Park 
figured it out. 

232
00:17:29,750 --> 00:17:34,240
And this is why the known plain text was 
so important. 

233
00:17:34,240 --> 00:17:36,571
Because you'd only have to figure out, 
like, one letter, if you knew what the 

234
00:17:36,571 --> 00:17:39,937
plain text was. 
And often they would know by length, and 

235
00:17:39,937 --> 00:17:43,542
certain other things. 
Oh, this is, I, I think we can guess what 

236
00:17:43,542 --> 00:17:48,150
this plain text was that this particular 
operator would send. 

237
00:17:48,150 --> 00:17:50,350
And this has to do with the leakage of 
information. 

238
00:17:50,350 --> 00:17:53,834
It's not the, it's not the mathematical 
perfection, or lack of perfection in the 

239
00:17:53,834 --> 00:17:57,067
security key. 
It's some other leak, it's some other 

240
00:17:57,067 --> 00:17:59,816
thing. 
When they're going like, oh, wait a sec, 

241
00:17:59,816 --> 00:18:03,810
I can take advantage of something. 
It was just equally encrypted as any 

242
00:18:03,810 --> 00:18:07,232
other message, but because I gave you 
this clue, of an uppercase single 

243
00:18:07,232 --> 00:18:11,600
character word and a lower case single 
character word. 

244
00:18:13,480 --> 00:18:17,567
Upper, lower case single character word 
and upper case single character word, I 

245
00:18:17,567 --> 00:18:22,140
greatly reduced the amount of effort that 
you had to put in. 

246
00:18:22,140 --> 00:18:24,290
OK? 
Now, what's cool about this, you can go 

247
00:18:24,290 --> 00:18:28,382
to this website, www.rot13.com, is that, 
long ago, before Facebook and before 

248
00:18:28,382 --> 00:18:35,070
Twitter and before all these things we 
had these things called newsgroups. 

249
00:18:35,070 --> 00:18:39,110
And they were kind of this weird kind of, 
collective email list that we had. 

250
00:18:39,110 --> 00:18:43,608
And this was, like, in the 80's. 
And it was even used in storing forward 

251
00:18:43,608 --> 00:18:45,830
networks. 
Where, it was kind of like Facebook in 

252
00:18:45,830 --> 00:18:49,624
storing forward networks. 
Meaning that it might take four hours for 

253
00:18:49,624 --> 00:18:53,302
you to see the status update. 
But we kind of of would subscribe to 

254
00:18:53,302 --> 00:18:57,003
these collective things. 
And there was one that was basically the 

255
00:18:57,003 --> 00:19:01,261
dirty jokes. 
And the thing about dirty jokes was, part 

256
00:19:01,261 --> 00:19:04,759
of the, part of what we were trying to do 
in this thing, was, you weren't supposed 

257
00:19:04,759 --> 00:19:09,036
to swear. 
And there was software that would filter 

258
00:19:09,036 --> 00:19:14,768
out swear words. 
from, if, if you put a swear word in to a 

259
00:19:14,768 --> 00:19:20,480
dirty joke it would not forward the 
message. 

260
00:19:20,480 --> 00:19:25,380
And so we had to have a way to encrypt 
messages that included swear words. 

261
00:19:27,120 --> 00:19:29,934
So that we could tell dirty jokes to each 
other, for those who wanted to subscribe 

262
00:19:29,934 --> 00:19:33,829
to the dirty joke list. 
And so they came up with this rote 13. 

263
00:19:33,829 --> 00:19:37,416
So we came up with a simple Caesar 
cipher, with a shift of 13. 

264
00:19:37,416 --> 00:19:40,599
13 beautifully, of course, is 26 divided 
by 2. 

265
00:19:41,600 --> 00:19:45,173
So it's a symmetric shift. 
The shifting in by 13, is the same as 

266
00:19:45,173 --> 00:19:48,848
shifting out. 
So, of all the Caesar's ciphers, a shift 

267
00:19:48,848 --> 00:19:54,335
of 13, the encryption and the decryption 
are exactly the same calculation. 

268
00:19:54,335 --> 00:19:59,312
And so we would we would type our dirty 
joke into, rot13, and convert it to 

269
00:19:59,312 --> 00:20:05,157
rot13, and we would send it in rot13. 
And then we would, if we wanted to 

270
00:20:05,157 --> 00:20:08,204
decrypt it. 
But what became funny after a while, was, 

271
00:20:08,204 --> 00:20:13,978
we were so used to reading rot13, that it 
almost became like a second language. 

272
00:20:13,978 --> 00:20:16,514
Right? 
We could, we could read second, we could 

273
00:20:16,514 --> 00:20:20,804
start reading the dirty jokes in rot13, 
and we would laugh before we translated 

274
00:20:20,804 --> 00:20:25,500
them up. 
So rot13, has an interesting sort of 

275
00:20:25,500 --> 00:20:28,789
historical thing. 
And you can go to rot13 and sort of like 

276
00:20:28,789 --> 00:20:33,881
encrypt, whatever you want to say. 
And I'll probably have some questions to 

277
00:20:33,881 --> 00:20:38,080
ask you, where you will have to do some 
rot13 encryption. 

278
00:20:38,080 --> 00:20:41,710
And so that's the end of this lecture, 
where we talk about Caesar ciphers and 

279
00:20:41,710 --> 00:20:45,570
the various techniques, and how Caesar 
ciphers work. 

280
00:20:45,570 --> 00:20:49,090
And, so we'll be back and talk about 
cryptographic hashes. 

