WEBVTT

1
00:00:00.450 --> 00:00:03.050
A good site never stores your password.

2
00:00:03.220 --> 00:00:05.890
It stores a hash: a one-way scramble

3
00:00:05.890 --> 00:00:06.490
of it.

4
00:00:06.660 --> 00:00:09.220
The same password always gives the same

5
00:00:09.220 --> 00:00:12.120
hash, but you cannot run a hash backwards.

6
00:00:12.970 --> 00:00:15.200
At login, the site hashes what you

7
00:00:15.200 --> 00:00:17.640
typed, and compares the two hashes.

8
00:00:17.810 --> 00:00:19.780
If they match, you are in.

9
00:00:19.950 --> 00:00:21.590
So when a database leaks,

10
00:00:21.590 --> 00:00:23.230
the attacker gets hashes,

11
00:00:23.230 --> 00:00:24.300
not passwords.

12
00:00:25.150 --> 00:00:26.880
But a hash can be guessed.

13
00:00:27.050 --> 00:00:29.370
A cracking tool takes a wordlist of

14
00:00:29.370 --> 00:00:31.760
common passwords, hashes each guess,

15
00:00:31.760 --> 00:00:34.370
and compares it with the leaked hash.

16
00:00:34.540 --> 00:00:37.010
A match means the password is found.

17
00:00:37.180 --> 00:00:39.390
A tool like John the Ripper does

18
00:00:39.390 --> 00:00:42.370
exactly this, millions of times a second.

19
00:00:43.220 --> 00:00:46.080
Two things decide how long a hash holds.

20
00:00:46.250 --> 00:00:48.850
Old, fast hashes like MD5 let an

21
00:00:48.850 --> 00:00:51.690
attacker try billions of guesses.

22
00:00:51.860 --> 00:00:54.720
Modern ones like bcrypt and argon2 are

23
00:00:54.720 --> 00:00:57.120
slow on purpose, and add a salt,

24
00:00:57.120 --> 00:00:59.910
so the same password never hashes the

25
00:00:59.910 --> 00:01:01.180
same way twice.

26
00:01:01.350 --> 00:01:03.810
And a long, uncommon password is not

27
00:01:03.810 --> 00:01:05.040
in any wordlist.

28
00:01:05.890 --> 00:01:07.820
So: weak passwords fall.

29
00:01:07.820 --> 00:01:09.990
Slow, salted hashes hold.

30
00:01:10.160 --> 00:01:12.000
In the lab, you will crack a

31
00:01:12.000 --> 00:01:14.230
set of weak practice hashes with a

32
00:01:14.230 --> 00:01:16.940
wordlist, then see why bcrypt holds up.

33
00:01:17.110 --> 00:01:18.930
Only crack hashes you own,

34
00:01:18.930 --> 00:01:20.700
or are allowed to test.
