yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Bitcoin For The Intelligent Layperson. Part Two: Public Key Cryptography.


3m read
·Nov 8, 2024

[Music] Bitcoins aren't physical coins, but they're not files on a computer either. They're really numbers in a public ledger called the blockchain. This contains a record of every Bitcoin transaction that has ever happened. You can think of a transaction in the blockchain as a record that a certain amount of bitcoins were sent from one Bitcoin address to another. A Bitcoin address looks like this; you'll also see them displayed as scannable QR codes. One person can have many Bitcoin addresses; in fact, it's common to use a new address for each payment. It's free and helps maintain privacy.

Your Bitcoin balance is the combined total of all the bitcoins assigned to addresses under your control. Bitcoin clients inspect the blockchain and calculate your current balance by checking the flow of funds into and out of your addresses. To make a Bitcoin payment to someone, you need to know an address of theirs. When you send bitcoins to an address, behind-the-scenes, your client creates a transaction and broadcasts it to the rest of the network.

So what stops a person from maliciously creating and broadcasting a transaction that sends bitcoins from someone else's address to one of his own? We know that each Bitcoin user has many addresses. What this really means is that the user has the power to reassign the funds at those addresses to any other valid Bitcoin address. In other words, they have the power to spend those funds.

Bitcoin addresses are designed to be public. People share them with others to request payment. Knowing a Bitcoin address allows you to send funds to it, but it doesn't allow you to send funds from that address. This is because Bitcoin transactions must be prepared in a special way: they're cryptographically signed. A Bitcoin address is a representation of a code known as a public key. Each public key has an accompanying code called a private key.

Coin addresses and the public keys that derive from them can be safely displayed to the world, but their corresponding private keys need to be kept secret. This is important because knowing a private key allows a person to spend any funds in the corresponding Bitcoin address. By the way, most of the time, Bitcoin users don't need to worry about this complexity because their clients automatically keep track of their receiving addresses as well as their public and private keys.

Bitcoin clients typically store all this information in a file known as a Bitcoin wallet. It's an important responsibility of each Bitcoin user to secure his wallet file against theft and hardware failure. If you lose bitcoins in these ways, they're gone forever.

To understand how the Bitcoin system prevents malicious transactions, it's important to first get an idea of how public key cryptography works. Would describe a typical setup that's simpler than the one Bitcoin actually uses, but the results are very similar. Public and private keys have a special mathematical relationship. Both keys in a key pair can be used to encrypt data, turning it into unreadable code known as ciphertext.

The interesting thing is that data encrypted with a public key can only be decrypted using a corresponding private key, and data encrypted with a private key can only be decrypted using the corresponding public key. This relationship makes it possible to do a couple of very useful things. Say Alice wants to send Bob some sensitive information in a way that guarantees no one else, such as Eve, can listen in and read the information while it's on its way.

If Alice sends unencrypted data, also known as plaintext data, and if Eve successfully intercepts the message, she can read it. The sensitive information would no longer be a secret between Alice and Bob. Here's how Alice and Bob solved the problem using public key cryptography. First, Bob publishes his public key online as plain text so that Alice can easily access it. Other people might see the public key too, but that doesn't matter.

Then Alice uses Bob's public key to encrypt the sensitive data before sending it to him. Since only Bob has access to the corresponding private key, that means only Bob can decrypt Alice's encrypted message. Even if Eve manages to intercept the data, she still won't be able to read it. [Music]

More Articles

View All
Breaking Down HackerRank's Survey of 40,000 Developers with Vivek Ravisankar
All right, the Veck, why don’t we start with what you guys do, and then we’ll rewind to before you even did YC? Yes, sure! I’m S. V. Ivent, one of the founders and CEO of HackerRank. Our mission at HackerRank is to match every developer to the right job,…
Galileo the Scientific Parrot
Okay, so we’re at the University of Sydney to experiment with Dr. Phil’s dead bird. He’s a famous scientist, this guy. He helped us out back in, uh, the 16th century, I think. Uh, the 17th century, isn’t it? 17th century, 1600s. Thank you! Galileo was, u…
Warren Buffett is GETTING OUT!
Hey guys, welcome back to the channel! In this video, we’re going to be looking at everything that Warren Buffett bought and sold in the last quarter. Of course, the 13F’s are out, so now we actually get to have a look at all of the stock market moves tha…
Identifying the constant of proportionality from equation | 7th grade | Khan Academy
When you hear “constant of proportionality,” it can seem a little bit intimidating at first. It seems very technical, but as we’ll see, it’s a fairly intuitive concept, and we’ll do several examples. Hopefully, you’ll get a lot more comfortable with it. …
Life in Flight | Chasing Genius | National Geographic
I’ve been building stuff since I could walk. If I could get my hands on it, I’d take it apart, and if I had an idea, I’d try to build it. When someone says something’s impossible, I can figure out the way to make it possible. This all started with a visi…
TIL: The B in BASE Jump Doesn't Stand for Badass (Amazing Footage) | Today I Learned
So you’ve probably heard of BASE jumping, but do you really know what BASE stands for? It is actually an acronym which represents the four different objects at a base jump. A good leap from a building. This one’s a tricky one because it can involve legal…