1

Perhaps an ignorant question, my background is in finance not cryptography. After a transaction is made and "signed" with the sender's private key, how can other nodes verify it without knowing the private key?

It seems in all the videos / text I've reviewed in trying to better understand Bitcoin & blockchain tech, people quickly gloss over the transaction verification piece and don't really explain how it works.

Thanks.

  • By using Elliptic Curve cryptography. Specifically, an Elliptic Curve Digital Signature Algorithm (ECDSA) on the curve secp256k1. Would you like a full and detailed explanation of the mathematics and Bitcoin Script involved in validating transactions? – Matthew Charles Stannard Jan 4 '18 at 18:05
  • If you have an explanation in laymans terms, then sure. If not, I know it will go way over my head hah. – Adam Smith Jan 4 '18 at 18:39
1

To validate transactions, Bitcoin uses Elliptic Curve cryptography. Specifically, an Elliptic Curve Digital Signature Algorithm (ECDSA) on the curve secp256k1.

ECDSA includes three important pieces of data. The private key (a large random number), the public key and a digital signature. These pieces of data have a mathematical relationship such that the public key and a digital signature can inexpensively be computed from the private key, but the private key cannot be computed inexpensively from either the public key or a single digital signature.

There also exists a mathematical relationship between the public key and a digital signature which allows anyone to inexpensively verify that a digital signature was computed from the same private key used to compute the public key. Knowledge of the private key is not required to know that a digital signature was computed from the same private key as the public key.

How can we know that a digital signature is authentic without knowledge of the private key?

By knowledge of the Elliptic Curve parameters and the four following equations...

(1) Qa = dA * G

(2) P = k * G

(3) S = k^-1 (z + dA * R) mod p

(4) P = S^-1 * z * G + S^-1 * R * Qa

where...

Qa is the public key,

dA is the private key,

G is the point of reference in our curve parameters,

P is a point on our Elliptic Curve,

k is a large random number (not the private key),

S is the second half of the digital signature,

z is the hash of the message being signed (encoded as a large integer),

R is the first half of the digital signature (and also the x coordinate of P),

p is a very large prime number defined by our curve parameters.

And then, by substituting (1) into (4) we have...

(5) P = S^-1 * z * G + S^-1 * R * dA * G

Factorizing (5) leaves us with...

(6) P = S^-1 (z + R * dA) * G

Now, substituting in (2), we have...

(7) k * G = S^-1 (z + R * dA) * G

Which can be simplified to...

(8) k = S^-1 (z + R * dA)

Lastly, we invert k and S leaving us with...

(9) S = k^-1 (z + R * dA)

Which is the equation first used to create the signature by the private key holder.

This proof informs us that if the x coordinate of P from (4) is equal to R, then the digital signature (R, S) was generated from the private key dA.

Please see here for a longer explanation and here and here to understand how ECDSA is applied in the Bitcoin system.

0

technically you're not sending to a private key, but to public-key, and through blockchain and coin base other nodes noticed that the bitcoins were in that bitcoin address moved to another bitcoin address also when broadcasting the transaction while sending.

I apologize for not being word-perfect in English

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.