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

Unraveling the message

Оглавление

So, the node — a computer containing a copy of the Bitcoin blockchain — receives the message. It takes the public key that has been attached to the encrypted message, and decrypts the message. The node “learns” something: “This message must have been encrypted — signed — by the private key associated with the public key.” Of course, that’s not really saying much. It’s virtually a tautology! By definition, if the public key can decrypt a message, the message must have been encrypted with the matching private key. Whoop-de-doo.

But remember, the public key must be mathematically associated with the address 1L7hHWfJL1dd7ZhQFgRv8ke1PTKAHoc9Tq. So now the node can examine the address specified in the message, along with the public key sent with the message, asking, in effect, “Is the public key associated with the address?” If the answer is yes, then the node also knows that the private key held by the person sending the message is associated with the address (all three are uniquely associated with each other).

So, what does the node tell itself? It says, in effect: “This message, sending money from the address 1L7hHWfJL1dd7ZhQFgRv8ke1PTKAHoc9Tq, was sent by the private key that was used to create this same address so the address must have been sent by the person who owns the address and therefore owns the money associated with the address.”

We know this concept can be confusing and hard to “get your head around.” So here’s another way to think about it: The only person who could have sent an encrypted message with transaction instructions for this address, along with the public key that originally created the address, is the person controlling the associated private key — that is, the owner of the address and the money associated with it. Thus, they are verifying ownership and validating the transaction.

So that’s the crypto in cryptocurrency! You can control money in the Bitcoin blockchain ledger anonymously through the use of cryptography, using public and private key pairs and associated addresses, by cryptographically signing messages.

Bitcoin For Dummies

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