Читать книгу Bitcoin For Dummies - Peter Kent - Страница 50

Messages to the blockchain

Оглавление

That’s public key encryption, then. But if the blockchain is not encrypted, what does it have to do with Bitcoin? Well, you use public-key encryption when you send transactions to the blockchain. When you want to send Bitcoin to someone else, you send an encrypted message to the blockchain saying, “Send x.xx of my Bitcoin to this address.”

But wait. We just told you the blockchain isn’t encrypted, and now we’re telling you a message to the blockchain is encrypted! So why do you care if the message going to the blockchain is encrypted if you’re just going to decrypt it anyway?

Well, remember that we told you this lock-and-unlock mechanism works both ways. You can lock with the public key and unlock with the private key or lock with the private key and unlock with the public key. Either way, the data is scrambled. The difference is in who has the ability to unscramble it. If you scramble something with the public key, the only person in the world who can unscramble it is the person with the private key. But if you scramble it with the private key, the only person in the world who can open it is…everybody! Anybody and everybody can get to the public key. It’s public, remember!

So, what’s the purpose of encrypting a message with the private key? Not to secure it, obviously, because anybody can decrypt it. No, the purpose is to sign the message (transaction) and prove ownership of the associated public key.

Bitcoin For Dummies

Подняться наверх