Bitcoin Forum
December 19, 2018, 04:59:49 PM
 News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 Home Help Search Login Register More
 Pages: [1]
 Author Topic: public key x private key  (Read 943 times)
Sr. Member

Offline

Activity: 279
Merit: 250

 September 18, 2014, 12:34:48 PM

what is the difference between public key and private key?
thank you!
1545238789
Hero Member

Offline

Posts: 1545238789

Ignore
 1545238789

1545238789
 Report to moderator
1545238789
Hero Member

Offline

Posts: 1545238789

Ignore
 1545238789

1545238789
 Report to moderator
1545238789
Hero Member

Offline

Posts: 1545238789

Ignore
 1545238789

1545238789
 Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1545238789
Hero Member

Offline

Posts: 1545238789

Ignore
 1545238789

1545238789
 Report to moderator
DannyHamilton
Legendary

Offline

Activity: 2198
Merit: 1385

 September 18, 2014, 03:27:44 PM

what is the difference between public key and private key?
thank you!

In the case of Elliptic Curve Digital Signature Algorithm (as used by Bitcoin):

A private key is a very large randomly generated number that you do not share with anybody.  You keep it entirely to yourself (keep it private).  It is used to calculate a digital signature that can be shared to prove that a message someone receives is an unmodified copy of the message that you sent.

A public key is an point (X and Y coordinates) on the specified elliptic curve that is associated with your private key in a very specific way.  If you have the private key, it is possible for you to compute the public key (and using the correct calculation will ALWAYS result in the exact same public key for a given private key).  If you have the public key, it is not possible with any currently known techniques, algorithms, or technology to calculate the private key.  Due to the mathematical relationship between the private key and the public key, it is possible to use the public key to verify that a message was signed with the same private key that was used to calculate the public key.

The public key is provided publicly for others to use to verify signatures that you create with your private key.

Although you didn't ask about it, Bitcoin makes use of a third piece of information for transactions.  This third piece of information is the "Bitcoin Address".  A bitcoin address is not a public key.  It is a hash of a public key. If you have a public key, it is possible to calculate the bitcoin address, but if you only have a bitcoin address then it is not possible to calculate the public key.  When verifying a bitcoin transaction, first the public key is used to make sure that the signature is valid, and then the bitcoin address is calculated from the public key to make sure that it matches the proper bitcoin address.

Wusolini
Legendary

Offline

Activity: 1190
Merit: 1000

no need to carry heavy money bags anymore

 September 18, 2014, 06:32:07 PM

what is the difference between public key and private key?
thank you!

try this tube

 Pages: [1]
 « previous topic next topic »