Читать книгу Bitcoin For Dummies - Peter Kent - Страница 51
Signing messages with the private key
ОглавлениеLet’s go back to the concept of encrypted email for a moment, to help you understand. Let’s say that Peter publishes his public key on his website, in his emails, and on his business cards. Now, one day you get a message that seems to come from Peter. But how can you be sure it’s from him? Well, he encrypted the message using his private key. So, you take his public key (which is publicly available) and use it to decrypt the message. If the message really is from Peter, his public key will decrypt it, and you’ll be able to read it. If it isn’t, the decryption won’t work, because it came from someone else.
So, by encrypting the message with the private key, Peter has in effect signed the message, proving that it came from him. The recipient knows that the message was created by the person holding the private key that is associated with the public key that opened the message up and made it readable.
Okay, back to Bitcoin. Remember that these three things are mathemagically associated with each other. Your address in the blockchain was created by your wallet software, which has a private key that was used to create a public key, and which then used the public key to create an address. All done with the magic of mathematics.
Thus, the private key is associated, through the public key, with the address. Remember also that these elements are all unique and operate with each other. The address is associated with just one private key and one public key, each of which are uniquely associated with each other.