Читать книгу Cryptocurrency Mining For Dummies - Peter Kent - Страница 34
Unraveling the message
ОглавлениеSo, the node — a computer containing a copy of the cryptocurrency blockchain — receives the message. It takes the public key that has been attached 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 is mathematically associated with the address 1L7hHWfJL1dd7ZhQFgRv8ke1PTKAHoc9Tq
. So now the node can examine the two, 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 is associated with the address (all three are uniquely associated with each other). So, what does the node tell itself?
“This message, sending money from 1L7hHWfJL1dd7ZhQFgRv8ke1PTKAHoc9Tq
, was sent by the private key that was used to create this address … so the address must have been sent by the person who owns the address and therefore owns the money associated with the address.”
I know this concept can be confusing; it’s 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 verifying ownership and validating the transaction.