WEBVTT - This file was automatically generated by VIMEO

0
00:00:11.500 --> 00:00:14.100
welcome to section 2 we will cover

1
00:00:14.100 --> 00:00:16.800
 symmetric key cryptography part 1

2
00:00:18.400 --> 00:00:21.200
In the first video, we will discuss how we

3
00:00:21.200 --> 00:00:24.800
 can achieve confidentiality using symmetric key

4
00:00:24.800 --> 00:00:25.900
 cryptographic algorithms.

5
00:00:27.700 --> 00:00:30.400
because either two parties Alice and

6
00:00:30.400 --> 00:00:30.400
 Bob

7
00:00:31.300 --> 00:00:35.600
Alison Bob would like to have confidential Communications over

8
00:00:34.600 --> 00:00:38.100
 a non-secure channel a channel

9
00:00:38.100 --> 00:00:41.400
 where messages can be intercepted by in adversary.

10
00:00:42.900 --> 00:00:46.500
We assume that prior to this setting the parties

11
00:00:45.500 --> 00:00:48.400
 had had some setup fees

12
00:00:48.400 --> 00:00:50.700
 with the exchanged some key k.

13
00:00:51.500 --> 00:00:54.900
One of them let's say Alice generated randomly

14
00:00:54.900 --> 00:00:58.200
 the key K and distributed its

15
00:00:57.200 --> 00:01:00.300
 value through a confidential channel to

16
00:01:00.300 --> 00:01:00.700
 Bob.

17
00:01:01.500 --> 00:01:03.500
How can we have such confidential Channel?

18
00:01:04.500 --> 00:01:07.200
For example, Alice and Bob met physically.

19
00:01:07.900 --> 00:01:10.300
And Alice told Bob the value of K.

20
00:01:12.100 --> 00:01:15.800
Now that the key was already distributed the parties

21
00:01:15.800 --> 00:01:18.600
 do not need to rely anymore on a

22
00:01:18.600 --> 00:01:21.300
 confidential channel to have secure Communications.

23
00:01:22.800 --> 00:01:26.200
Using encryption they can transform a non-confidential

24
00:01:25.200 --> 00:01:28.400
 channel into a confidential Channel.

25
00:01:29.400 --> 00:01:30.400
Let's see how they do that.

26
00:01:31.600 --> 00:01:34.100
We do not by P. The plain text that Alice would

27
00:01:34.100 --> 00:01:35.200
 like to send to Bob.

28
00:01:36.200 --> 00:01:40.200
Alice applies an algorithm called encrypt that

29
00:01:39.200 --> 00:01:41.600
 takes the plaintext p

30
00:01:42.300 --> 00:01:45.600
and the TK and outputs a ciphertext

31
00:01:45.600 --> 00:01:46.200
 c

32
00:01:47.600 --> 00:01:50.300
Ali sends the ciphertext C to bulb.

33
00:01:51.200 --> 00:01:53.800
That applies an algorithm called decrypt.

34
00:01:54.600 --> 00:01:56.900
That takes the ciphertext C.

35
00:01:57.900 --> 00:01:59.000
and the key k

36
00:01:59.700 --> 00:02:02.200
and outputs the original plane text

37
00:02:02.200 --> 00:02:02.400
 B.

38
00:02:03.200 --> 00:02:06.300
Functionally what we expect from encrypt and

39
00:02:06.300 --> 00:02:09.700
 decrypt algorithms is when we apply the Crypt

40
00:02:09.700 --> 00:02:12.400
 over ciphertext and we

41
00:02:12.400 --> 00:02:14.100
 use the same key.

42
00:02:15.600 --> 00:02:17.600
We obtain the original plain text.

43
00:02:18.400 --> 00:02:21.700
What we can also Express mathematically using this

44
00:02:21.700 --> 00:02:22.100
 equation.

45
00:02:23.100 --> 00:02:26.200
From security point of view we expect that

46
00:02:26.200 --> 00:02:30.100
 an adversary that intercepts is ciphertext cannot

47
00:02:29.100 --> 00:02:32.400
 retrieve P or get any

48
00:02:32.400 --> 00:02:35.800
 partial information about P. This

49
00:02:35.800 --> 00:02:37.900
 is the confidentiality guarity.

50
00:02:39.300 --> 00:02:42.900
The symmetric aspect comes from the fact that the same key was

51
00:02:42.900 --> 00:02:44.800
 used for encryption and decryption.

52
00:02:45.800 --> 00:02:49.200
This will not be always the case with cryptographic algorithms

53
00:02:48.200 --> 00:02:50.800
 that we will see in this course.

54
00:02:51.500 --> 00:02:54.900
Is now see some concrete examples of this algorithms

55
00:02:54.900 --> 00:02:56.300
 encrypt and decrypt.

56
00:02:57.800 --> 00:03:00.500
This is our first symmetric crypto algorithm

57
00:03:00.500 --> 00:03:02.000
 their namesipher.

58
00:03:02.600 --> 00:03:05.300
The terms Cipher just refers to an algorithm for

59
00:03:05.300 --> 00:03:06.500
 encryption and decryption.

60
00:03:07.700 --> 00:03:10.800
Vernon encrypt and decrypt use the

61
00:03:10.800 --> 00:03:13.800
 operation xor exclusive or

62
00:03:14.700 --> 00:03:17.100
that we can have on bits or bit strings.

63
00:03:18.200 --> 00:03:21.200
Those who are not familiar with this operation. Can't stop

64
00:03:21.200 --> 00:03:23.800
 the video and take the time to look at the yellow box below.

65
00:03:25.500 --> 00:03:28.100
to encrypt at least exorce the

66
00:03:28.100 --> 00:03:30.500
 plaint XP with the key k

67
00:03:31.700 --> 00:03:34.600
to decrypt Bob exhores the ciphertext C

68
00:03:34.600 --> 00:03:36.000
 with a key case

69
00:03:37.700 --> 00:03:40.500
The functionality aspect is guaranteed by

70
00:03:40.500 --> 00:03:42.900
 the following property of excel operation.

71
00:03:44.100 --> 00:03:48.000
When we exalt with the same value twice, it is canceled. So

72
00:03:47.600 --> 00:03:50.100
 when Bob exorces with K,

73
00:03:50.100 --> 00:03:52.500
 he obtains the original plain text B.

74
00:03:54.700 --> 00:03:57.300
the security comes from the fact

75
00:03:57.300 --> 00:04:00.600
 that an adversary that does not know the value K

76
00:04:00.600 --> 00:04:03.500
 and intercepts p x

77
00:04:03.500 --> 00:04:05.700
 or k is unable to compute p

78
00:04:06.700 --> 00:04:09.700
Let's see Vernon Cipher in action on a

79
00:04:09.700 --> 00:04:10.100
 given example.

80
00:04:12.300 --> 00:04:16.000
Alice wants to encrypt the message. Hello, using the

81
00:04:15.600 --> 00:04:17.600
 key enigma.

82
00:04:18.600 --> 00:04:21.800
Before encryption at least must apply some encoding.

83
00:04:22.400 --> 00:04:25.300
She has to change the representation of her message. Hello

84
00:04:25.300 --> 00:04:28.200
 to format that is compatible with the

85
00:04:28.200 --> 00:04:28.800
 cipher.

86
00:04:30.300 --> 00:04:34.000
Let's converts each character of her message

87
00:04:33.300 --> 00:04:36.800
 to its as key code represented in

88
00:04:36.800 --> 00:04:38.000
 hexadecimal.

89
00:04:38.700 --> 00:04:42.600
Example the uppercase H is

90
00:04:42.600 --> 00:04:45.600
 encoded to 48 the lowercase e

91
00:04:45.600 --> 00:04:48.100
 is encoded to 65 Etc.

92
00:04:49.200 --> 00:04:52.700
And it has also to include the key Enigma as

93
00:04:52.700 --> 00:04:56.100
 you see the uppercase E was

94
00:04:55.100 --> 00:04:59.300
 encoded to the value of 45 the lowercase

95
00:04:58.300 --> 00:05:02.500
 n to the value 6E Etc.

96
00:05:03.800 --> 00:05:06.500
You might have noticed that the key Enigma contains six

97
00:05:06.500 --> 00:05:09.400
 characters while our plane text hello

98
00:05:09.400 --> 00:05:12.400
 contains only five characters that's not

99
00:05:12.400 --> 00:05:15.500
 an issue. We will only use five characters of

100
00:05:15.500 --> 00:05:18.400
 the key and will not consider the last

101
00:05:18.400 --> 00:05:19.500
 character of the key.

102
00:05:21.200 --> 00:05:24.700
Now the encryption algorithm is applied by xoring the

103
00:05:24.700 --> 00:05:27.600
 plaintext with the encoded key to obtain

104
00:05:27.600 --> 00:05:31.000
 the ciphertext, which is the sequence 0 d

105
00:05:30.000 --> 00:05:33.900
 0b0502.

106
00:05:35.200 --> 00:05:38.600
And this value is sent to Bob Bob applies the

107
00:05:38.600 --> 00:05:41.500
 decryption algorithm and obtains the sequence

108
00:05:41.500 --> 00:05:42.700
 48.

109
00:05:43.400 --> 00:05:46.100
65 60 60 6f

110
00:05:46.900 --> 00:05:49.300
this was exactly the encoded representation of

111
00:05:49.300 --> 00:05:50.000
 hello.

112
00:05:51.300 --> 00:05:54.700
Obviously when Bob further applies the decoding he

113
00:05:54.700 --> 00:05:56.900
 obtains the message. Hello.

114
00:05:58.400 --> 00:06:01.600
Just remark keep in mind that the encoding and

115
00:06:01.600 --> 00:06:03.700
 decoding do not provide any security.

116
00:06:04.400 --> 00:06:07.400
They are just here to change to a representation that is

117
00:06:07.400 --> 00:06:08.900
 compatible with the cipher.

118
00:06:10.900 --> 00:06:13.700
Let's now see the advantages and limitation

119
00:06:13.700 --> 00:06:16.300
 of Vernon Cipher from security point of

120
00:06:16.300 --> 00:06:19.400
 view term Cipher is a secure Cipher.

121
00:06:19.400 --> 00:06:22.700
 It provides perfect secrecy as each

122
00:06:22.700 --> 00:06:25.500
 plain text character is encrypted using its own

123
00:06:25.500 --> 00:06:25.800
 key.

124
00:06:27.300 --> 00:06:30.900
From implementation point of view Vernon is very fast as

125
00:06:30.900 --> 00:06:33.500
 xor operations are very efficient.

126
00:06:34.400 --> 00:06:37.400
And it requires little memory because the

127
00:06:37.400 --> 00:06:40.300
 encrypt decrypt algorithms process a

128
00:06:40.300 --> 00:06:41.400
 single character at a time.

129
00:06:42.900 --> 00:06:45.800
An important warning is that the key

130
00:06:45.800 --> 00:06:48.100
 cannot be used more than once?

131
00:06:49.600 --> 00:06:52.400
If we use the same key K with two plain,

132
00:06:52.400 --> 00:06:53.600
 text P1 and P2.

133
00:06:54.400 --> 00:06:57.900
The adversary that encrypts the their corresponding server

134
00:06:57.900 --> 00:06:59.500
 texts C1 and C2.

135
00:07:00.100 --> 00:07:03.100
Can exhort this effortex to obtain the xor of

136
00:07:03.100 --> 00:07:03.800
 the plaintext?

137
00:07:05.100 --> 00:07:08.700
So evenly that the adversary did not fully retrieve the

138
00:07:08.700 --> 00:07:11.800
 plain text P1 and P2.

139
00:07:12.800 --> 00:07:15.700
She obtained some partial information about this

140
00:07:15.700 --> 00:07:16.200
 plaintext.

141
00:07:18.100 --> 00:07:21.300
So instead of single key the two parties required to

142
00:07:21.300 --> 00:07:23.200
 have a key stream generator.

143
00:07:24.600 --> 00:07:27.800
For example, if we go back to our to

144
00:07:27.800 --> 00:07:30.500
 Alice and pop if Alice wants to send the

145
00:07:30.500 --> 00:07:33.200
 message. Hello meteor at 5 pm.

146
00:07:33.800 --> 00:07:37.200
Then she needs to use different keys

147
00:07:36.200 --> 00:07:39.300
 for every word of message.

148
00:07:40.200 --> 00:07:44.000
For illustrative purposes. We are using meaningful words

149
00:07:43.200 --> 00:07:46.400
 for the key like here in Enigma was

150
00:07:46.400 --> 00:07:47.800
 German Cipher.

151
00:07:48.400 --> 00:07:51.500
But in real systems we can use non meaningful

152
00:07:51.500 --> 00:07:54.200
 Keys. Any combination of characters is fine.

153
00:07:54.200 --> 00:07:57.300
 It's even better from security point of view

154
00:07:57.300 --> 00:08:00.400
 as such keys will have high entropy.

155
00:08:01.300 --> 00:08:04.400
Means the number of possible Keys is higher if

156
00:08:04.400 --> 00:08:07.500
 we don't have a constraint of meaning.

157
00:08:09.100 --> 00:08:13.300
In general then I'm safer is convenient for

158
00:08:12.300 --> 00:08:15.400
 applications with the amount

159
00:08:15.400 --> 00:08:18.200
 of data is unknown or continuous like in

160
00:08:18.200 --> 00:08:19.400
 network streams.

161
00:08:21.500 --> 00:08:24.500
Vietnam Cypher is part of the family of stream

162
00:08:24.500 --> 00:08:25.300
 ciphers.

163
00:08:25.900 --> 00:08:29.200
Stream ciphers are based on generating in infinite

164
00:08:28.200 --> 00:08:31.100
 keystring and use that to

165
00:08:31.100 --> 00:08:34.100
 encrypt one bit one byte or one character at a

166
00:08:34.100 --> 00:08:34.100
 time.

167
00:08:35.200 --> 00:08:38.400
Deciphers are generally very efficient, but come with a requirement

168
00:08:38.400 --> 00:08:41.300
 of the stream setup, which is not possible in

169
00:08:41.300 --> 00:08:45.100
 many applications and can be subject to vulnerabilities. If

170
00:08:44.100 --> 00:08:47.400
 it is not implemented correctly in the

171
00:08:47.400 --> 00:08:51.000
 next video. We look at another family of ciphers the

172
00:08:50.200 --> 00:08:51.700
 block ciphers.

173
00:08:52.500 --> 00:08:55.000
deciphers work on larger chunks of

174
00:08:55.300 --> 00:08:55.800
 data at a time

175
00:08:56.900 --> 00:08:59.900
Even that the involve more complex operations, they

176
00:08:59.900 --> 00:09:02.600
 are quite versatile and can be used for different use

177
00:09:02.600 --> 00:09:06.300
 cases to encrypt files or within

178
00:09:05.300 --> 00:09:08.000
 a request response protocols such as

179
00:09:08.800 --> 00:09:11.300
 https and in many more applications.

180
00:09:12.500 --> 00:09:13.800
So see you in the next video.
