WEBVTT

00:00:00.000 --> 00:00:04.340
The internet is amazing. You're streaming movies, downloading games, uploading files

00:00:04.340 --> 00:00:10.300
to the cloud, and somehow, all that data, mostly, gets from one place to another without

00:00:10.300 --> 00:00:15.420
getting corrupted. I mean, it's a miracle, isn't it? No, it's not. It's computer science.

00:00:15.420 --> 00:00:20.580
In particular, we owe this modern marvel to checksums, numbers that are used to verify

00:00:20.580 --> 00:00:27.100
that a file got sent or copied properly. But how does a simple number manage to perform

00:00:27.100 --> 00:00:32.160
this essential function? Well, it works thanks to cryptography. Even if the data that you're

00:00:32.160 --> 00:00:38.120
transmitting isn't encrypted, or even particularly sensitive, in applications that use checksums,

00:00:38.120 --> 00:00:43.980
the protocol will run the contents of the file through a cryptographic hash function, which

00:00:43.980 --> 00:00:50.460
is basically a complicated math function that produces a lengthy and unique string of characters.

00:00:50.460 --> 00:00:54.960
The reason this works well for generating checksums is that if you change even one

00:00:55.040 --> 00:01:01.200
byte of data, even in a very large file, that string of characters, or hash, will change

00:01:01.200 --> 00:01:07.200
completely. And this is actually the same way that passwords are stored securely on websites.

00:01:07.200 --> 00:01:11.640
Except, instead of storing the password in plain text, they're run through a hash function

00:01:11.640 --> 00:01:17.440
that is virtually impossible to reverse. That way, if a hacker breaks into the server,

00:01:17.440 --> 00:01:22.040
they only see a pretty much meaningless hash rather than your plain text password.

00:01:22.040 --> 00:01:26.840
So coming back to checksums, they play an important role in digital security as well.

00:01:26.840 --> 00:01:31.160
If you download a file from the internet, you make the assumption that the host is providing

00:01:31.160 --> 00:01:38.560
you a safe, non-malicious file. But bad actors can sometimes attempt to attack PCs by replacing

00:01:38.560 --> 00:01:43.160
files that are commonly downloaded. That's why many responsible websites will provide

00:01:43.160 --> 00:01:48.240
a checksum so that you can verify that the file you download is exactly what it's supposed

00:01:48.240 --> 00:01:53.440
to be. So, with this level of importance, you would think that checksums are ubiquitous

00:01:53.440 --> 00:01:59.360
in computing. But actually, that's not the case. In fact, in Windows, File Explorer

00:01:59.360 --> 00:02:04.760
doesn't use checksums by default when performing a file transfer. Even though generating a checksum

00:02:04.760 --> 00:02:09.680
would take a trivial amount of time for small files like Word documents, it can take a lot

00:02:09.680 --> 00:02:14.440
more time if you're trying to move around many gigabytes worth of data. However, there

00:02:14.440 --> 00:02:18.440
are ways to work around this. If you want to compare the checksum of a copied file to

00:02:18.440 --> 00:02:23.520
the original in Windows, all you have to do is fire up a command prompt and type in this

00:02:23.520 --> 00:02:27.680
command followed by the file path. Because checksums will be very different if the file

00:02:27.680 --> 00:02:32.220
contents don't match, you can usually just glance at them instead of tediously comparing

00:02:32.220 --> 00:02:36.640
them character by character. You can also get third-party tools that do generate and

00:02:36.640 --> 00:02:40.000
validate checksums when you copy files, and we're going to have one of those linked down

00:02:40.000 --> 00:02:45.280
below. Did you know that you can select Validate files in Steam if one of your games isn't

00:02:45.280 --> 00:02:50.220
running correctly? The service stores checksums of known good game files, so when you click

00:02:50.220 --> 00:02:54.760
this button, it compares them to the checksums of the files that are stored on your PC. If

00:02:54.760 --> 00:02:58.760
there's any discrepancy, the altered file can be quickly downloaded and replaced with

00:02:58.760 --> 00:03:03.240
the original rather than forcing you to reinstall the entire game like we had to do in the old

00:03:03.240 --> 00:03:08.120
days. And if you're a video editor, popular editing programs like Adobe Premiere support

00:03:08.120 --> 00:03:12.840
the use of checksums to verify large media files to ensure that they don't get corrupted

00:03:12.840 --> 00:03:17.240
when you're copying them. Microsoft's OneDrive cloud storage solution for Windows also makes

00:03:17.240 --> 00:03:21.720
use of checksums, in this case to make sure that your photos and documents were uploaded

00:03:21.720 --> 00:03:26.240
properly. And if you need to transfer lots of files at once, you can use checksums for

00:03:26.240 --> 00:03:31.840
zipped folders to quickly verify that all of your files are in good shape. In fact,

00:03:31.840 --> 00:03:37.800
TCPIP, the data transmission protocols that underpin the internet, use checksums on every

00:03:37.800 --> 00:03:42.920
packet of data to make sure that no bits were flipped in transit. If the checksum that

00:03:42.920 --> 00:03:47.720
was sent doesn't match the checksum generated by the receiver, that packet gets dropped

00:03:47.720 --> 00:03:52.400
and retransmitted. So basically, every bit of data that you get from the internet goes

00:03:52.400 --> 00:03:58.320
through this verification process. Which is cool, but keep in mind that this kind of checksum

00:03:58.320 --> 00:04:03.840
doesn't really improve your security. As, like I said, a file could contain malware

00:04:03.840 --> 00:04:09.160
from its origin, whether on purpose or due to a bad actor. So it's still very important

00:04:09.160 --> 00:04:14.000
that you take caution when dealing with files from unknown sources, as we learned ourselves

00:04:14.000 --> 00:04:19.920
the hard way recently. So go watch this video next to learn about how we recently got our

00:04:19.920 --> 00:04:25.640
channel hijacked, because it could happen to you too. Thanks for watching, like or dislike,

00:04:25.640 --> 00:04:30.920
check out our other videos, and leave a comment if you have a future TechWiki video suggestion.

00:04:30.920 --> 00:04:33.800
We don't call it that anymore. I'm rusty.
