馃攳
The unsolved math problem which could be worth a billion dollars. - YouTube
Channel: unknown
[0]
What's the world's most popular computer algorithm?
[3]
Maybe the SHA 256 hash function.
[4]
I want to show you what it does,
[6]
and tell you about a problem that no one
[8]
on Earth knows how to solve,
[10]
and explain why billions of dollars are at stake.
[15]
[Intro Music]
[17]
The SHA 256 algorithm is a deterministic
[20]
one-way hash function.
[21]
Now, what it the world
[22]
do those words even mean?
[24]
An algorithm is just a process,
[25]
or list of steps for doing something.
[27]
A hash function is a mathematical function
[30]
that takes any size of input
[31]
but has an output of a fixed size.
[34]
You can think of it as a digital fingerprint
[35]
for the file.
[36]
It's deterministic
[38]
which means whenever you start with the same input,
[40]
you always get the same output.
[42]
And SHA 256 stands for
[44]
"Secure Hash Algorithm" and it outputs 256 bits.
[49]
What does "one-way" mean?
[50]
Well, that's just a function
[51]
that's hard to do backwards.
[53]
Some functions are easy to do backwards,
[54]
like for example the function of adding 30.
[57]
You just subtract 30 to do the reverse.
[60]
But the function of multiplying
[61]
two large primes together is really hard
[63]
to do backwards.
[65]
Take a look
[66]
at my follow-up video for more details.
[67]
Okay, back to SHA 256.
[70]
It's an algorithm for a one-way
[71]
hash function that takes any kind of
[73]
digital input and any length of input and
[76]
always outputs exactly 256 bits,
[79]
or 256 ones and zeros,
[81]
which is basically a big long number,
[83]
usually written as 64 hex digits, like this.
[86]
Let me tell you about two things that make
[88]
this function really interesting and useful.
[91]
First of all, the only time you ever end up
[93]
with the same hash, or the same fingerprint,
[96]
is if you started with the exactly identical input.
[99]
There are so many different possible
[101]
fingerprints that no two inputs have ever
[103]
ended up with the same fingerprint,
[105]
and I mean never, in the history of the world.
[107]
How many different hashes are there?
[109]
Two to the 256th,
[111]
which means two multiplied by itself 256 times,
[115]
or to be specific, 115 quattourvigintillion,
[119]
792 tresvigintillion, 89 duovigintillion,
[124]
230, you get the idea.
[126]
Another interesting property of this funciton
[128]
is that it's designed to have
[129]
the butterfly effect built in such that changing
[132]
the input just a little bit
[134]
completely changes the output.
[136]
Let me show you an example.
[137]
Here's a picture I took.
[138]
It's 1000 by 1000 pixels,
[140]
and the file is 24 million bits long.
[143]
When I run this through the SHA 256 algorithm,
[145]
it outputs this hash.
[146]
Now watch what happens when I change
[148]
one single bit in the input.
[150]
I'm going to zoom in to this pixel
[151]
on the telephone pole and change
[153]
the green value by changing this zero to a one.
[155]
Now I re-run the algorithm, and I get a
[157]
completely different output.
[159]
And that's from changing just one single bit
[161]
out of more than 24 million bits.
[164]
So these properties make SHA 256 useful
[166]
for all kinds of applications:
[168]
cryptography, digital signatures, authentication.
[171]
Oh, and there's bitcoin.
[173]
More in a minute.
[174]
Beyond the usefulness of this algorithm,
[176]
I think some of the philosophical consequences
[178]
are amazing to think about.
[179]
First of all it's possible for you
[181]
to see a number that literally no one else
[183]
in human history has ever seen before.
[186]
All you have to do is take a picture
[187]
with some randomness in it,
[189]
and calculate the SHA 256 hash.
[191]
So ladies and gentlemen, here's the world premiere
[194]
of this number that I just made
[195]
from that picture.
[196]
It's never been seen before.
[198]
Also, I think it's cool that
[199]
here's a mathematical function that
[201]
anyone can do on their computer but
[203]
no one has any idea how to do the reverse
[206]
of this function.
[207]
How do we know?
[208]
Because there are billions of dollars at stake.
[211]
You see, SHA 256 is a key part
[213]
of the bitcoin protocol.
[215]
If you could reverse the algorithm,
[216]
you could mine bitcoin faster than
[218]
anyone else and make a lot of money.
[220]
In order to mine bitcoin, all you have to do
[223]
is find an input that produces a SHA 256 output
[226]
with 70-something zeros at the beginning.
[228]
But, since there's no known formula,
[231]
the best anyone can do, is to do it
[233]
by brute force, which means just
[234]
trying a bunch of different inputs
[236]
until they find something that works.
[238]
Now I said before it's impossible
[240]
to find an input that matches a specific
[242]
hash fingerprint.
[243]
And that's true.
[244]
But bitcoin mining only requires that
[246]
you find a hash that's close, not an exact match.
[248]
In fact, the difficulty can be adjusted up or down,
[251]
to make it such that about every ten minutes,
[254]
someone, somewhere finds a match,
[256]
earning themselves 12.5 bitcoins,
[258]
which is worth somewhere between
12 dollars and 12 million dollars.
[262]
Also, that's why I think it's the
[263]
most popular algorithm on Earth,
[265]
or maybe I should say the most "commonly computed"
[267]
algorithm on Earth.
[268]
In this race to mine bitcoin,
[270]
special computers have been built just for
[271]
running SHA 256 as fast as possible.
[275]
How fast?
[276]
Well, if you add up all of the bitcoin miners
[278]
in all of the world, they're currently
[279]
doing 60 trillion hashes,
[281]
no wait, 60 quadrillion,
[283]
no 60 quintillion hashes per day mining bitcoin.
[286]
Oh, wait, I'm wrong again,
[288]
not 60 quintillion per day,
[290]
not per hour, not per minute,
[292]
but per second.
[294]
That's right, SHA 256
[295]
is run 60 quintillion times per second,
all day, every day.
[300]
So yes, I think it's fair to say
[302]
that SHA 256 is the most popular algorithm.
[304]
I mean, unless you count adding and multiplying,
[306]
which are parts of SHA 256.
[309]
Maybe it's the most popular "big" algorithm?
[311]
Actually, I suppose there might be some
[312]
digital signal processing algorithms
[315]
like Fourier transforms that beat it?
[317]
But more than 60 quintillion times per second?
[320]
I don't know.
[321]
Anyway, all of this is good evidence
[323]
that no one has figured out a shortcut,
[325]
because there's a huge financial
[326]
incentive to do so.
[328]
Or maybe they have,
[329]
but they know not to kill the goose
[331]
laying the golden eggs,
[332]
and they're just slowly collecting bitcoins.
[334]
Or maybe there's some kind a secretive government
[337]
organization, hiding the truth from the populace.
[339]
Let's see, who invented bitcoin?
[343]
Nobody knows, what?
[345]
And who designed SHA 256?
[346]
Let's see, the NSA?
[348]
Who are they?
[349]
United States National Security Agency!
[351]
Uh-Oh.
[352]
I think I better go now.
[354]
Thanks for watching.
Most Recent Videos:
You can go back to the homepage right here: Homepage





