# The Amazing Math of Bitcoin Private Keys - James DeAngelo

How do you slow down hackers and provide equal access to everyone on earth? Not easy. But Bitcoin’s solution is devilishly simple, employing outrageously big numbers. Bitcoin’s private keys are made of numbers (called quindecillions) that are so large, they literally choke the best computers. In fact even if all the world’s computers were able to work together, these numbers would still be too large. By using an analogy to drawers and pirates, James dives into this math, revealing not only how simple the idea is, but how well it works.

### Transcript

Hello, this is James D’Angelo and welcome to the Bitcoin 101 Blackboard series. Today we are going to be looking at the amazing math of private keys. And this is one of the main reasons why it’s absolutely impossible to hack Bitcoin. And for all you technophobes out here don’t get confused. This humongous numbers and this amazing new technology doesn’t mean it’s going to be difficult to understand. This is remarkably simple math, very easy to understand and after watching this video you’ll be able to explain this phenomenal new technology to your techie friends.

Okay. So let’s get started. We’re going to have a little bit of fun. Okay. This is the website bitaddress.org which immediately creates brand new Bitcoin addresses and private keys. So, down here you have your private key and you have your Bitcoin public address. The beauty of this is you can immediately create new ones. As fast as you can click it will create new ones. But the real amazing thing that has to do with what we’re talking about today is that when you generate this number and these are really just numbers and sort of a Hex 58 format. These are numbers that you have never seen before. In fact, you can take this number right here, pop it in the Google and there will be no search results. So, every time you generate a new address you’re generating something that the world has never seen before that second that you generate it. Unless you show it to someone it will never be seen again. So, if I erase them right away those are numbers that were just for a fleeting second here on earth and they will never be seen again. And I know a lot of you right now are going, “What? I don’t get this.” This is the power of big numbers.

And so mostly today we’re going to be working with this part. This is the private key and this is the public key. But remember all you need in Bitcoin, the only number you need in Bitcoin is your private key. Your private key can be stuffed into a simple equation and generate the public key every time. So, every time you stuff this through elliptic curve SHA256 RIPEMD it will always generate this number right here. And the beauty of that is you can’t go backwards. Those equations use clock math which has been shown forever that it’s impossible to go backwards. So, you’ll always be able to generate this public key from this private key every time every day.

Okay. So, let’s just before we go check out some new numbers the worlds has never seen before. Here is another one - here is another one. Okay. Never ever been seen before and unless someone stuffs this into the Blockchain it will never be seen again. How does this work? Well, let’s take a step back and let’s talk about this. So, here is a Bitcoin private key. Okay. And this is one I’ve used before so there’s actually a few cents in there and you can pull the money out. So someone right after watching this video will probably take that out. But this as I’ve said before is just a number in the Hex 58 format. All right. And then they do a little of Bitcoin coding to add that 5 there to let you know it’s a private key etcetera.

Now, this number, this one that we just showed you is generated by having this number right here. Okay. And there’s this number in decimal numbers we’re used to and you can see this is hundreds, this is thousands, this is millions, this is billions, trillions, etcetera. Okay. And you can see this is a very, very big number. In fact, these digits here are called Quindecillions. And it’s likely unless you fiddle with Bitcoin you’ve never heard of a Quindecillion, you’ve never had to deal with Quindecillions. In fact, you probably never had to deal with almost all of these units all the way up here. So, these are all just a – it’s a new range of numbers that we’ve never had to deal with. I mean the U.S. federal budget’s somewhere over here, right? All of world income, you know, is somewhere in this area right here, billions and trillions of dollar. So, it’s important to start thinking about how much bigger a Quindecillion is from billions and trillions and quadrillions etcetera.

And one more thing that’s important is that the same number, the same decimal number you just saw can also be put in computer format, in binary format, so you can do it in ones and zeros. So, you can generate that same decimal number from the page before with these binary digits right here. And some people create their private keys indeed just by flipping a coin where they say one is heads and zero equals tails. And you can create a perfect private key by just flipping a coin a 160 times and putting those numbers together. So, if you flip at the first time you get a heads you put it there. Second time you get a heads you put it there then tail, tail and you just keep putting in order till you’ve got a 160 and you can create a perfect private key just by flipping a coin. And this is indeed how a lot of people do it. You can also do it by rolling dice or whatever it is that you used to generate random numbers.

So, now we start getting to the fun part, right. Bitcoin relies on these private keys to store value. And it relies on the fact that these are numbers that no one’s ever used or seen before and never will see again or generate again. Okay. So, what Bitcoin suggests is that if you flip a penny a 160 times that number that you’ve generated is a brand new number. One that has never been seen before on earth and unless you show it to someone it will never be seen again. Pretty outrageous to start thinking about that. And so what Bitcoin is saying, you flip a coin 160 times, you put all your ones and zeros together and you end up with something that we can start using for security. This can be a code for security because no one will generate this again. It sounds completely preposterous right now I know. The first time you’re hearing this, this is really unsettling. I mean, can one number really provide security. Well, what Bitcoin is suggesting is that this one number can provide security that is more secure than banks or more secure than buried treasure. So secure that no hackers, no combination of hackers not all the hackers in the world teamed up will ever be able to hack this, huh! So what we really need to find out now is how does this work?

Well, what we’re going to do because the human brain is really bad at visualizing just straight numbers we’re going to use a metaphor. And it’s a really good metaphor for Bitcoin. We’re going to use this idea of drawers. So, here is your drawer. Let’s call this your Bitcoin private key. And inside it you’re going to put some value. Here we’ve got some of the little treasure map, but you can put so many different things inside it. In Bitcoin’s case we’re just putting Bitcoins but those Bitcoins can be shaped to prove access to contracts, deeds, patents and so many other things. So, there’s a real power here being able to put something in these Bitcoin drawers.

So, now let’s start with the big question. If I just gave you one single drawer with no locks, is that security? Well, I think most people in the world would say, Eh no, not a single drawer, open drawer like that. Is that secure? No, it’s not at all. But what if I now multiply the number of drawers by four and I put my value, my wealth right here in drawer number two. A lot of people would look at this and go, well, it’s four times longer, but I would still be able to pull out the treasure map or whatever’s inside there in just a few seconds. So, this isn’t much more secure but some people might have noticed well this set of drawers here is in a house, right? And the house had some security, right? You might have to break in, find the drawers and rifle through the drawers to find the treasure map.

So, let’s be fair. Let’s be fair to Bitcoin because remember Bitcoin is public anyone in the world can access it. So, we really have to put our drawers in public. So, our metaphor is not getting better it seemingly get worse. If I put some value in this drawer right here would anyone on Earth feel that this is security. Putting some value, putting some coins, putting a $1,000 in drawer number two right here. Would you actually go to work in this office for the day and then come back after work and think that your money is still going to be there? Well, no. That’s not security at all. What about now? What if we put some money right here in drawer number 61. Would you go to work here and – beginning the day and think the money is still going to be there? No, you won’t. But you might start to think that maybe you could go play Frisbee with these guys over here, your valuables would be safer than if you just left them here on the grass. Someone’s going to have to rifle through all these drawers to find drawers number 61 and pull your money out of that. Okay. And remember there is no locks. These are just open drawers. That’s what Bitcoin is, open drawers.

If you have the private key, you can get the money out of any of the drawers. So, if there’s Bitcoins associate with private key you can just yank it out. So, there’s no locks. We call it cryptocurrency but it’s not super crypto. So, would you feel safe with this setup? Would you actually go to work here? Well, you probably won’t. What about now? Okay, so this is the Boston skyline and behind it are millions and millions of drawers and we decide that we’re going to stick our $2,000 right here in drawer number 6786226. Would you now think about maybe going to work for the day? And then at the end of the day going right to your drawer cause you know which drawer it is and pulling your money out as long as no one saw you. They’d have to start pilfering all these drawers to get your money. You starting to go okay, well that’s interesting, but let’s start thinking about the problems here. My nephews Zach and Zane can open two drawers per second looking for chewing gum. So, if you told them that you had thousands of dollars that can buy them lots of chewing gum maybe they can even open three drawers per second.

So, if folks knew that you’re actually hiding wealth inside these drawers. Well, they’ll be trying to open them nonstop and it’s possible that even millions of drawers might not be enough. So, is this secure? Well, we don’t know. But it’s starting to get a little interesting and we’re going to start to have to ask ourselves a question. If we wanted to build a set of drawers that would provide security, not just okay security, but perfect security how many drawers would we need to make it safe? Is there a number? Is there a number? Can you come up with a number of drawers that would make it perfectly safe? Is 300 billion drawers enough? I think most people are going, Eh-uh no. 300 billion drawers isn’t enough. I mean, there’re 7 billion people on Earth, you know, you could just randomly pull out a bunch of drawers. So you had your 2000 bucks right here in this I don’t know. 226 billion drawer blah, blah, blah whatever numbers. Is that safe? Well, it might be safe for an hour but it’s probably not going to be safe for a year. I mean, we really have to think about storing value. We really got to think about security.

Let’s make our problem even tougher because Bitcoin is public, right? It’s accessible by everyone with computers. So, for our drawer analogy we need something that’s going to make sense. What if hackers had drawer opening drones? These drones could pen thousands of drawers every day. They just fly around and open any drawer in our system, right? Suddenly 300 billion drawers doesn’t seem to be enough at all. Let’s make it even tougher because remember Bitcoin can be accessed by computers and computers do things very fast. So, what if each person on earth had an app that could control those drones and using that app each person on earth could open 1 billion drawers a day. Is our system safe? Well, 300 billion, everyone on earth opening a billion drawers a day. No, our 300 billion drawers system is not safe but it leads us back to the question is there a number of drawers that would start to provide people with security where they could go to bed at night knowing that their money would still be there in the morning. Well, let’s look at the difficulty of that, okay.

So, let’s think about our drawer system and imagine all these problems like people actually making drones that would do it and people had this phone app and they really could open a billion drawers a day. Let’s look at the crazy numbers of that. 7 billion people on earth each with drones that are opening one billion drawers per day and they’re going to keep this up for 365 days and we’ll just say everyone lives to be a 100 and their drone lives to be a 100 so they get 100 years. That means that all these combined over the course of a 100 years you would be able to dig through 260 times 10 to the 21. That’s 260 sextillion, very sexy number. Let’s talk about a sextillion, right. Sextillion is pretty big number. Okay, so Wolfram suggests that 260 sextillion is on the order of the number of grains of sand on earth. Okay. So, the grains of sand on earth are in the order of 10 to the 20 and remember this is 260 times 10 to the 21. Okay. So, the amount of drawers that all the hackers in the world with their drones and their phone apps, everybody on earth equally attacking at the same time would be able to open as many drawers as there are grains of sand on the earth and remember this isn’t just the grains of sand. You can see these grains of sand under the ocean, grains of sand under the sand, all the grains of sand on the earth. It’s approximate guess but these are fun numbers to think about. So, if everyone together can open all these drawers would just seems impossible, we’d never be able to come up with a number of drawers that would provide security or can we. What if there are 10 to the 29 drawers in our system which is really like a million times as many drawers as everyone on earth can open over the course of a 100 years using these special drones with their phone apps. Okay.

So, literally everyone together working for a 100 years would have a one in a million chance of finding our randomly placed $2,000. Okay. $2,000 for a 100 years one in a million chance if that’s going to happen. Well, that’s interesting. What if there were 10 to the 35 drawers. So, all of a sudden there were trillion times as many drawers as everyone could open together. So, instead of one in a million chance over a 100 years suddenly we went to one in a trillion over one 100 years. So, you put your $2,000 in one of the drawers, all the drones working furiously for a 100 years there’d be one in a trillion chance of finding. Let’s raise the number even bigger. So, make it 10 to the 38. One in a quadrillion. Okay. And human brains are really bad at calculating odds and some people are going well one in a quadrillion that’s not enough for me. So, we start to think about numbers like one in a quadrillion. What are the odds of that? Okay. And it’s pretty difficult for humans to imagine these types of numbers but we need to realize how low a number that is. But what’s even more incredible is that the numbers that Bitcoin deals with, this is tiny, okay.

So, Bitcoin deals with Quindecillions. And here’s the sextillion of all the drones and all the computers and all the iPhones working together everyone on earth trying to hack the system. What are the odds that they’re going to hack one address from Bitcoin in a 100 years? We’re talking odds that are lower than any odds ever calculated on earth and to put this into perspective here we have a recent Powerball odds. Okay. And Powerball just recently had a winning prize of a 149 million and your odds of winning that were one in 175 million. That’s on the order down here. So, trying to hack one address of Bitcoin makes Powerball look like a lock, makes it look like a sure thing. These numbers are just so much bigger. So, it’s really important to think about how big numbers can just destroy computers. They make all the world’s computers together look like a snail, look like a dead snail, a frozen snail, a snail in a glue trap. And here’s the hacker trying to yell faster faster with all the world’s computers together. Big numbers destroy the hacker and that is why Bitcoin is relying heavily on these enormous numbers, numbers you have never seen before.

So, just for fun let’s compare sort of the same idea to pirates back in the day. And we like to think that pirates could bury treasure and that would be safer ever and indeed in many ways it was. Some pirate treasures are still being found. So, maybe the original pirate who knew where it was or the map which had the location on it got destroyed and the pirate couldn’t get back and find his money and so no one was able to find it now and someone’s building a house they stumble on some nice little bounty of treasure. So, these things stayed for hundreds of years even though they were worth lots of money because someone was burying it underground. So, this is what pirates do, right. They have this nice little gold chest, they dig a few feet down, they stuffed the treasure chest in there and now after killing off this guy and this guy they can sleep pretty well at night. But as we’re talking about big numbers and the power of big numbers let’s start thinking about the math of this. Remember the earth’s surface is not unlimited. It’s absolutely enormous but it’s not unlimited. So, there’s going to be a finite number of chests of gold that you can bury a few feet down under the surface. So, we can do the simple math here. 510 million kilometers square which is the Earth’s surface and then we have this chest of gold and to be fair they’re kind of small. So, let’s say it’s got a two foot square foot prints so the bottom takes up about two square feet. Which is pretty small, right? How many of these chests of gold could you put on the earth? Well, here we go. We transfer kilometers to meter squared multiplying by one million so you get 5.1 times 10 to the 14 meter squared multiply it by nine get a round number for about how many square feet there are on the earth. We get 4.59 times 10 to the 15 square feet on the Earth’s surface. Okay. So, we’re talking about a two square foot footprint. So, we basically can put half as many chests of gold and we’d have a chest of gold underneath the ground everywhere on Earth including the oceans and so what is the number of chests of gold you can put everywhere on the earth. That’s surprisingly small when you think about these Bitcoin numbers. We can bury 2.3 times 10 to the 15 chests of gold on earth. Remember Bitcoins in the order of 10 to the 48.

Okay. So you’d actually have to cube this number to get the amount of locations that Bitcoin offers. So, all the possible places, just think of the entire desert cover with chest of gold, all of New York City, every place you’ve ever been, every stretch of highway, chest of gold everywhere and you have to cube that, not multiply by three but cube it to get the amount of different locations, places where you can put Bitcoins. Okay. So, it’s pretty safe to think that putting your money into a Bitcoin address and letting computers hack at it like crazy nonstop is starting to approach the security of just sticking gold underground in an undisclosed location with no ability for anyone to use a metal detector to find it. This is real outrageous security. And I know some of you are starting to think okay so what if all the computers were programmed to hack Bitcoin. Computers are fast. I’ll just make a database of all those numbers, all the possible addresses, all the Quindecillions addresses for Bitcoin and then I’ll just query my database for which of those have Bitcoins in it. Okay. So, I’ll just make this really big database and then I’ll just pull out all the money in all the Bitcoin accounts. Well, what’s really crazy is we’re so used to thinking of computers as capable of doing everything, but computers can’t even touch this problem. We’ll look at why.

All the storage, hard drives in the world today so all of Google storage, all of China storage, all the hard drives combined make up what’s called a zettabyte. And one yottabyte is bigger than a zettabyte by a factor of a 1000. To store all the addresses in Bitcoin you would require hard drives that are five yottabytes squared. Okay. So, 5000 times the current hard drives on earth squared. You’d start to wonder if all the iron on the earth would even be able to make an enclosure for the drives that you would need. Okay. So, say you build those drives. Say you really put it together and put those drives together. There isn’t enough coal and gas to make the electricity to even turn those drives up. Okay. So, this is a problem that makes the world’s computers look like a snail. And this is why Bitcoin uses these big numbers. It makes it really difficult to conceive of hacking Bitcoin because there’s just not enough computational power in the known universe all together trying to solve this problem. Okay. So, now that we’re kind of blown away by how these big numbers can make computers look retarded. Can we start to think that this simple simple math basically just using big numbers, right? Where your Bitcoins were is at this number. I put that number in I can pull out those Bitcoins. Can we use this big number of math to make a form of security? Would people actually keep money in a system like this is new form of public ledger. Well, it’s already happening and it’s happening in dramatic fashion.

So, keep in mind that Bitcoin is just five years old but in numerous numerous addresses you have well more than a million dollars in a single address. So, if you could come up with that number, if you could just roll the dice and come up with that number you could pull out 70 million dollars from this account. And say you messed up and you rolled the wrong number and you came up with this one, but you can pull out 68 million from this account and the list goes on and on and on. There’s millions and millions of dollars waiting to be taken by someone who could hack Bitcoin. Well, it’s kind of proof that no one’s able to hack it. For five years people have just parked money in there. You should remember you don’t need a password, you don’t need to put your thumbprint on, you don’t need any sort of biometrics all you need is the number and you can pull out 70 million dollars. So, if you have nothing better to do and you just feel like rolling dice the rest of your life you can try but you’re going to need a lot of lives. You’re going to need a gazillion lives. You’re not going to roll this number and you’re not going to roll this number. Okay. And if I generate a new one and send money to it you’re not going to roll this number or this one. So, you can convert it to binary, you convert it to decimal whatever you want all formats accepted. You’re still not going to roll that number. These are numbers you have never seen before. I can pop it into Google and it’s not going to have any search results. Did not match any documents. Every time you do this with Bitcoin. Generate a new address, these are new numbers, not stored ever anywhere by anybody. Okay. Let’s do a search for that one, did not match any results. Same for your private keys, right? Put that over there. You’re going to come up empty every time you click on bitaddress.org every time. Even if you get a computer to do it every time you’re going to come up empty. Okay. So, I’m harping on this. This is the amazingness of big numbers.

Okay and some people might go well you can put stuff in a drawer what goes inside these Bitcoin addresses? Well really nothing goes in it, right? It’s really important to realize that Bitcoins don’t truly exist. They’re just units of accounts on the Bitcoin ledger. They don’t exist at all. So when people talk about intrinsic value on a currency. Well first of all the whole idea of intrinsic value starts to look like an oxymoron. There is no intrinsic value necessary in a currency and we start to realize that when we look at dollars. There really is no intrinsic value in the paper of the dollars. People are using cowry shells for a thousands of years over a really broad geographic area. There’s no intrinsic value. The snails themselves didn’t even want them, right? They chucked them, they were garbage. But the cowry shells were uniform, hard to copy and there was a limited amount and that gave it value, right? It gave a tradable value, gave it value in exchange. That’s exactly what’s going on with Bitcoin.

Bitcoin is not a bunch of drawers it’s just a ledger. And it’s a ledger that is protected by enormous numbers more than anything else. It’s the fact that you can generate a number with a coin that no one’s ever generated before. You can send Bitcoins to that number and no one will ever find that number. Not by accident not ever. And the beauty of this and one of the reasons why this is so revolutionary is that it basically allows equal and full access to banking to anyone who’s got a coin to flip. You can flip a coin a 160 times. You can start to get involved in Bitcoin. Better off if you have the Internet, better off if you have a computer but you don’t need a lot of access to the Internet and a lot of access to the computer to do this. You can set up your account then you can send that public address that you generate from your private key to anyone and they can start to send you money for the products you make. This is a revolution and it is all a result of big numbers. So, I hope you find that this math is really compelling and really beautiful and a lot of you are going to be very unsettled by this. You’re not going to feel comfortable with it right away, but over time over the next five ten years as people start to move towards blockchain technology our kids and others will start to see that this is more secure than putting money in banks in Cyprus or even money in banks under any government umbrella. You know that your value will be there the next day. You’re not so sure with anything else.

So, that’s it for today. Please remember to like, comment, subscribe. You can follow us at @World Bitcoin Net on Twitter or do whatever else it is you do and we’ll check you at the next video.