Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: keatonatron on April 06, 2013, 04:28:11 PM



Title: How are signatures confirmed?
Post by: keatonatron on April 06, 2013, 04:28:11 PM
Hey all,

I understand the concept of hashing and how public and private keys are generated and utilized. I also understand how they can be used for security in non-Bitcoin applications. But one thing I'm curious about and don't understand is how signatures included in Bitcoin transactions can be independently verified without knowing the private key.

The wiki states "With the public key, a mathematical algorithm can be used on the signature to determine that it was originally produced from the hash and the private key, without needing to know the private key."

But I would like to know how the mathmatical algorithm can do that without knowing the private key.

Can anyone explain the general concept?

Thanks!


Title: Re: How are signatures confirmed?
Post by: grue on April 06, 2013, 04:36:32 PM
https://en.wikipedia.org/wiki/Public-key_cryptography


Title: Re: How are signatures confirmed?
Post by: proff on April 06, 2013, 05:01:25 PM
https://en.wikipedia.org/wiki/Elliptic_Curve_DSA


Title: Re: How are signatures confirmed?
Post by: r.willis on April 06, 2013, 08:21:03 PM
https://en.wikipedia.org/wiki/Elliptic_Curve_DSA
There is typo in that article:
Quote
6. Calculate s = k-1(z + r + dA) mod n. If s = 0, go back to step 3.
Should be k-1(z + rdA). I'd like to fix it myself, but wiki would not let me (IP banned).


Title: Re: How are signatures confirmed?
Post by: keatonatron on April 07, 2013, 04:32:43 AM
I'd like to fix it myself, but wiki would not let me (IP banned).

How did that happen?  :P


Title: Re: How are signatures confirmed?
Post by: etotheipi on April 07, 2013, 04:38:47 AM
What you are asking about is precisely what "asymmetric cryptography" is.  A public key is like a locked mailbox with a dropslot and a window in it.  A private key is the key to that box.  

-- (Encryption) Anyone with the public key can find the mailbox and drop a letter in the slot. N o one else can open and read it except for the person with the private key.
-- (Signing) The person with the private key can write a message and tape it to the inside of the box facing out through the window.  Then anyone with the public key can find that mailbox, see the message, and know that only the person with the private key could've put the message there.

Most asymmetric cryptography is based on cyclic groups, and discrete logarithm problems.  You can go look them up, but you have to be really good at math to really understand it.  



Title: Re: How are signatures confirmed?
Post by: r.willis on April 07, 2013, 05:36:27 AM
How did that happen?  :P
Wikipedia's policy about public proxies.


Title: Re: How are signatures confirmed?
Post by: keatonatron on April 08, 2013, 09:07:02 AM
What you are asking about is precisely what "asymmetric cryptography" is.  A public key is like a locked mailbox with a dropslot and a window in it.  A private key is the key to that box.  

-- (Encryption) Anyone with the public key can find the mailbox and drop a letter in the slot. N o one else can open and read it except for the person with the private key.
-- (Signing) The person with the private key can write a message and tape it to the inside of the box facing out through the window.  Then anyone with the public key can find that mailbox, see the message, and know that only the person with the private key could've put the message there.

Most asymmetric cryptography is based on cyclic groups, and discrete logarithm problems.  You can go look them up, but you have to be really good at math to really understand it.  



Yeah, I looked through the wikipedia page and got some of it. I noticed the part about calculating curves and whatnot, but I've never heard of cyclic groups before so I'm not really sure what that entails. I think I got enough to satisfy my curiosity, though!

How did that happen?  :P
Wikipedia's policy about public proxies.

That's not as cool as what I was envisioning  ;D