3

I apologize for such a noobish question and am ashamed that I'm not getting this yet, but I can't seem to put together all of the pieces. I've read every question I can find on the subject, the Satoshi paper, and bitcointalk.

How exactly is a transaction signed?

How exactly is a transaction verified? I simply cannot understand how secure transactions signed with private keys that are presumably unknown to all else can be confirmed to be valid and correct without actually knowing the private key itself. Please show me in detail how this works.

I know this looks like a dupe, but I've read every related question, and I just can't get to that "ah ha" moment that puts it all together.

  • Are you looking for an explanation that involves code? – Colin Dean Dec 17 '13 at 1:24
  • @ColinDean Thank you for looking Colin Dean! Code segments from Bitcoin or any other valid alt would be perfect! Thank you so much in advance! – user5107 Dec 17 '13 at 2:50
2

This should get you started on public key verification: **Digical signature

In essence, the bitcoin address is the public key. A hash is created of the transaction and this value is then encrypted using the private key that is known only to the owner of the bitcoin address. Anybody can then use the public key (the bitcoin address) to decrypt this hash value and determine that the transaction has not been modified by creating a hash of the transaction and then comparing it to the decrypted value. This serves a two-fold purpose: it protects against transaction modification and it proves that the transaction creator has access to the private key for the bitcoin address.

  • Thank you ScripterRon! I've seen that link, and I'm fairly comfortable with the various encryption schemes, but where I break down is the decryption, the verification of the transaction. Isn't the private key required? As best as I can ascertain for myself, transaction verification doesn't in fact fully decrypt but merely decrypts to some level of certainty based upon difficulty. Is that correct? If so or not, could you provide more detail on that? Thank you so much for all of your help today! – user5107 Dec 17 '13 at 3:02
  • 2
    You encrypt data with the public key and decrypt it with the private key. The encrypted data is not readable and only the private key owner can view it. You sign data using the private key and verify it using the public key. The data itself is not encrypted and is still readable. What is encrypted is a hash of the data. The transactions in the block are not encrypted and can be viewed by anybody. The network difficulty refers to the number of leading zeroes in the block hash and is not related to transaction signatures. – ScripterRon Dec 17 '13 at 8:21
  • Thank you so much ScripterRon for putting it plainly! I finally found the code, cleared my head, and reread your link and others on encryption. Encrypt with the private key, decrypt with the public key. DUH! – user5107 Dec 18 '13 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy