# The unsolved math problem which could be worth a billion dollars.

What’s the world’s most popular computer algorithm? Maybe the SHA 256 hash function. I want to show you what it does, and tell you about a problem that no one on Earth knows how to solve, and explain why billions of dollars are at stake. [Intro Music] The SHA 256 algorithm is a deterministic one-way hash function. Now, what it the world do those words even mean? An algorithm is just a process, or list of steps for doing something. A hash function is a mathematical function that takes any size of input but has an output of a fixed size. You can think of it as a digital fingerprint for the file. It’s deterministic which means whenever you start with the same input, you always get the same output. And SHA 256 stands for “Secure Hash Algorithm” and it outputs 256 bits. What does “one-way” mean? Well, that’s just a function that’s hard to do backwards. Some functions are easy to do backwards, like for example the function of adding 30. You just subtract 30 to do the reverse. But the function of multiplying two large primes together is really hard to do backwards. Take a look at my follow-up video for more details. Okay, back to SHA 256. It’s an algorithm for a one-way hash function that takes any kind of digital input and any length of input and always outputs exactly 256 bits, or 256 ones and zeros, which is basically a big long number, usually written as 64 hex digits, like this. Let me tell you about two things that make this function really interesting and useful. First of all, the only time you ever end up with the same hash, or the same fingerprint, is if you started with the exactly identical input. There are so many different possible fingerprints that no two inputs have ever ended up with the same fingerprint, and I mean never, in the history of the world. How many different hashes are there? Two to the 256th, which means two multiplied by itself 256 times, or to be specific, 115 quattourvigintillion, 792 tresvigintillion, 89 duovigintillion, 230, you get the idea. Another interesting property of this funciton is that it’s designed to have the butterfly effect built in such that changing the input just a little bit completely changes the output. Let me show you an example. Here’s a picture I took. It’s 1000 by 1000 pixels, and the file is 24 million bits long. When I run this through the SHA 256 algorithm, it outputs this hash. Now watch what happens when I change one single bit in the input. I’m going to zoom in to this pixel on the telephone pole and change the green value by changing this zero to a one. Now I re-run the algorithm, and I get a completely different output. And that’s from changing just one single bit out of more than 24 million bits. So these properties make SHA 256 useful for all kinds of applications: cryptography, digital signatures, authentication. Oh, and there’s bitcoin. More in a minute. Beyond the usefulness of this algorithm, I think some of the philosophical consequences are amazing to think about. First of all it’s possible for you to see a number that literally no one else in human history has ever seen before. All you have to do is take a picture with some randomness in it, and calculate the SHA 256 hash. So ladies and gentlemen, here’s the world premiere of this number that I just made from that picture. It’s never been seen before. Also, I think it’s cool that here’s a mathematical function that anyone can do on their computer but no one has any idea how to do the reverse of this function. How do we know? Because there are billions of dollars at stake. You see, SHA 256 is a key part of the bitcoin protocol. If you could reverse the algorithm, you could mine bitcoin faster than anyone else and make a lot of money. In order to mine bitcoin, all you have to do is find an input that produces a SHA 256 output with 70-something zeros at the beginning. But, since there’s no known formula, the best anyone can do, is to do it by brute force, which means just trying a bunch of different inputs until they find something that works. Now I said before it’s impossible to find an input that matches a specific hash fingerprint. And that’s true. But bitcoin mining only requires that you find a hash that’s close, not an exact match. In fact, the difficulty can be adjusted up or down, to make it such that about every ten minutes, someone, somewhere finds a match, earning themselves 12.5 bitcoins, which is worth somewhere between
12 dollars and 12 million dollars. Also, that’s why I think it’s the most popular algorithm on Earth, or maybe I should say the most “commonly computed” algorithm on Earth. In this race to mine bitcoin, special computers have been built just for running SHA 256 as fast as possible. How fast? Well, if you add up all of the bitcoin miners in all of the world, they’re currently doing 60 trillion hashes, no wait, 60 quadrillion, no 60 quintillion hashes per day mining bitcoin. Oh, wait, I’m wrong again, not 60 quintillion per day, not per hour, not per minute, but per second. That’s right, SHA 256 is run 60 quintillion times per second,
all day, every day. So yes, I think it’s fair to say that SHA 256 is the most popular algorithm. I mean, unless you count adding and multiplying, which are parts of SHA 256. Maybe it’s the most popular “big” algorithm? Actually, I suppose there might be some digital signal processing algorithms like Fourier transforms that beat it? But more than 60 quintillion times per second? I don’t know. Anyway, all of this is good evidence that no one has figured out a shortcut, because there’s a huge financial incentive to do so. Or maybe they have, but they know not to kill the goose laying the golden eggs, and they’re just slowly collecting bitcoins. Or maybe there’s some kind a secretive government organization, hiding the truth from the populace. Let’s see, who invented bitcoin? Nobody knows, what? And who designed SHA 256? Let’s see, the NSA? Who are they? United States National Security Agency! Uh-Oh. I think I better go now. Thanks for watching.

## 65 thoughts to “The unsolved math problem which could be worth a billion dollars.”

1. Arshy Singh says:

first

2. Bruce Wayne says:

more than 2 and less than 4

Thats Gabe Newells place in comments

Can a quantum computer be used to break hashing algorithms?

4. Andrew Machkasov says:

You actually post non-prank videos??

Just kidding. Love your work though, whether or not it's an April Fool's Day video or not.

5. RoT N says:

Nice.

6. Eric L. Tate says:

It may sound weird, but all this is also good news. Bitcoin has a lot of whales and miners have been saving up bitcoin and sometimes have to cash in. For bitcoin to become viable, it has to spread from a few people having a lot of bitcoin to a lot of people having a few bitcoin. This means that large players will be making large moves. Volatility slowly decreases over time. The more the speculators relax and hold, the more healthy and bullish the market becomes with less volatility, that is when large investors will dare to move in.I lost 3BTC when I started trading CRYPTO it was devastating, I was lost until I found a comment about the great Mr. CASTRO EDWIN contacted him and he promised to help me not only to recover my lost money but to earn for the rest of my life, I have earned 7BTC in less than a month from his tradings.He is so competent , honest, consistent and very experienced, contact him at castroedwin195 @ gmail com or via telegram *@castroedwin1,here is also his WhatsApp +1(845)400-7574

7. Jack Wang says:

Love the info!

8. J O says:

Thank you very much for information , profressor 😍

9. Complexity says:

This was actually quite an interesting video. I'd hope to see more like this in the future!

10. Mat says:

I dont understand a single word

11. Steven Scott says:

01:02 You're saying that it's REALLY hard to divide 2,818,051 by 223? That's EASY for me. I'm studying algebra, but I can do the long division on paper!

12. Orange Monks says:

Who is this

13. Luno the the whisker Rabbit says:

It’s crazy because Mathew weathers started YouTube in the year of 2006

14. Brain is (not) a computer says:

Brilliantly done! I loved it.

15. Prince Ulrich says:

Pi is a new cryptocurrency for and by everyday people that you can “mine” (or earn) from your phone. Pi does not affect your phone’s performance, drain your battery, or use your network data . Once you hit the lightning button, you can even close the app and you will continue to mine Pi. Pi is not a scam. It is a genuine effort by a team of Stanford graduates to give everyday people greater access to cryptocurrency. Read the FAQ section when you download the app. To begin click this link: minepi.com/princeulrich75 or go to Play Store and download Pi Network Lite. Invitation code to share: princeulrich75

16. Guywithcrazyideas says:

Maybe the simulation created Bitcoin to watch us play / work with it.

17. Bright Lohan says:

This is one of the most simplified and well explained SHA256 algorithm explanation i have ever come across.
I instantly liked the video just few minutes in.
You are a great teacher. If i was to advise anyone to attend Biola Uni, it will be because of you.

Keep up the great work, will love to see more videos like this (or the airplane haox debunking video) cause April fool is just once a year and i love really your content 🙂

18. Name says:

I don't understand a thing but ok

19. jojojorisjhjosef says:

i don't get it, where is it's functionality if it's not reversible?

20. David K says:

Avalanche effect would be the correct term, but I guess butterfly effect is not wrong. Just not used that common in the context of cryptography

21. Seb says:

Very nice video! I'm glad I checked your work out. Have to agree with previous commentator that this is one of the best overviews on this very interesting topic. Keep it up 🙂

22. Lucas Zanella says:

This video is really good and funny, thanks 🙂

23. Tommy Plays says:

I wanted him to finish reading the number out.

24. Rd Rz says:

the new mr bean

25. Honest Abe says:

Did You learned this at Catalina Christian School in 1984 ? 😀

26. Gerardo Moscatelli says:

Non reversible binary circuits like sha256 are can be transformed into quantum reversible circuits. 52 out of the 64 rounds of sha256 were broken a few years ago already. If someone is mining with a QC he won't go on social media tell everyone

27. Ehtisham Haq says:

His mouth whistle all the time.

28. Force says:

Professor, You're a blessing in this world of wild pseudo-intellectual youtubers. I just found you, thanks for existing.

29. Sherly Jacob says:

1+1=3
Can u solve it?

30. Sven Vdw says:

So NSA maybe knows how to reverse engineer it or collide it? And they will use it when BTC really becomes a treat for the USD?

31. Umaru Kashiwazaki says:

Nice..👌Math Major + Computer Major Perfect Match

32. Snorré H says:

Oh a video about Jimmy Fallons brother 😁😁

33. Snorré H says:

Used to 256- 512- 1024 bits in buffer sizer for processor buffer size in music prod😄

34. NickotBG says:

I learned so much in such a short video. Thanks Prof!

35. julian moreno says:

time to steal money from bitcoin. might take a while but i’m feeling lucky

36. Auri Pigeonery says:

Math teacher teaches you how can you mine bitcoin faster. Love it

Uuhhh…… Uuummm

🤯🤯🤯🤯🤯

38. P D says:

I love your videos because they are informative and fun haha

39. narayan chavan says:

Sir iam 14 years old i like you teach and your prank videos ❤❤❤

41. Nur Azhar says:

satoshi Nakamoto is Craig Wright DYOR

42. Feel The Hertz says:

Now can you go into detail about the OCP3 Optical Lines and the MD5#? Tyrone and Buk Lau would be very interested I'm sure.

43. Nur Hafizh says:

Thank you

44. Alsajid Julian says:

This numbers are blowing my mind

45. NeuesTestament says:

Very informative video

46. HackeRPiratE says:

5:45 FBi open up!!!

What for

Classified information!!

47. whysnowyy says:

Homer Simpson – “BORING!”

48. John Doe says:

Very interesting video, subscribed. I've always wondered what makes a hash value a bitcoin. I havent ever seen anyone ever explain this complex stuff in this easy to understand way. I'm sure you are a fantastic teacher, your students are lucky to have you!

49. Rohith Dsouza says:

Great video both informative and funny!

50. Daniel Smith says:

51. K7even says:

Very interesting and educational.

52. Jude Ero says:

Similar to a CRI video I once saw

53. Abhie says:

54. Magic Lyrics says:

Dj khaled once said and quote " you are smart"

55. Isaiah Bonilla says:

56. NAZORE says:

I'm actually… How much? 13? 13 years old, yeah. But I understand you.
Keep making more videos like this, please. I appreciate your work, sir.

57. Marc Francis Sebastian Ruiz says:

This is how many times he blinked
|
|
/

58. ItsmeRenz YT says:

Has someone ever tried to solve this algorithm? And almost succesfully did?

59. AOE says:

Have we ever 'solved' other famous hash functions that are now deprecated? Like other versions of SHA?

60. Handy Kusuma says:

finally found valuable channel after century

61. Flavio Cariello says:

My name is Ralph (cit.)

62. MC874 says:

Can we make 2 files with same MD5?

63. ELMOCHTAR MEDIA says:

Sir, please how to work for miner system bitcoin, full software and hardware. Thanks

64. TheBitcoinOfCryptoStreet says:

0:50 That's a really bad and wrong explanation. 1st when you do the operation 10+30=40 and backwards 40-30=10 you are right, that's easy, but after that when you multiply numbers. HOW THE HELL IS 12,637×223 EASIER TO CALCULATE THAN 2,818,051/223? It's the same like the first example with adding and subtracting. Here's my explanation. For example you use the modulo operation (for python the modulus operator is this symbol %):
Here's an example 234%10=4 There is no way you can reverse that. Check this 555564%10=4 and this xxxxxxx4%10=4. You can just try a brute-force attack by guessing random numbers for xxxxxxx.

65. TheGameMakeGuy says:

pretty easy to get a huge dataset of inputs and expected outputs to train an ai on that i wonder how much of that is going on the google cloud right now