Bitcoin Forum
June 18, 2024, 06:43:17 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How are public and private keys related to the wallet?  (Read 1367 times)
olebitole (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
January 23, 2014, 02:20:27 PM
 #1

Hi, How are public and private keys related to the wallet?
empoweoqwj
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


View Profile
January 23, 2014, 02:50:21 PM
 #2

Private keys are kept (hopefully) securely within the wallet - for your eyes only.

Public keys are what you send to other people i.e. bitcoin addresses
DannyHamilton
Legendary
*
Offline Offline

Activity: 3430
Merit: 4669



View Profile
January 23, 2014, 03:15:40 PM
 #3

Hi, How are public and private keys related to the wallet?

Private keys are a random 256 bit number.  They are stored in the wallet, and unless you make a special effort to export and view them, they are generally hidden from the user.  The wallet uses the private keys to create signatures on the transactions that you send to prove to the rest of the bitcoin network that your are authorized to send the transaction.

The public key is a 256 bit number that is calculated from the private key using elliptic curve mathematics with the Secp256k1 curve.  Because of the mathematical relationship between the private key and the public key, if you have the public key, you can verify a signature that was created with the private key.  While it is quite fast and easy for a computer to calculate the public key when it has the private key, it is not computationally feasible to calculate the private key when you have only the public key.

When your wallet sends a transaction, it includes the public key for each signature that is sent.  The nodes on the network can then use the public key to verify the signature.

The bitcoin address is a base58check encoded RIPEMD-160 hash of a SHA-256 hash of the public key.  A hash is a mathematical function that creates a digest of the original data in a format that is consistent but irreversible.  If you know the public key, and you calculate the RIPEMD-160 hash on that value, you will get the exact same 160 bit digest every time.  However, if you have the 160 bit digest, it is not computationally feasible to calculate what the public key is.  Therefore, when you only have a bitcoin address, it is not possible to calculate the public key, but if you have the public key, it is very fast and easy for the computer to calculate the bitcoin address.

When you first receive bitcoins at an address, the RIPEMD-160 hash value for that address is encoded in the transaction (and permanently stored in the blockchain).  Nobody has access to the private or public keys except you (and any hacker that has stolen your wallet files).  Once you spend the bitcoins, the public key is transmitted (so that the peers can verify the signature), and is permanently stored in the blockchain.  After that, anyone with access to the blockchain has access to both the public key and the address, but they still don't have access to the private key (unless they've gained access to your wallet files).
manobra
Full Member
***
Offline Offline

Activity: 151
Merit: 100


View Profile
January 23, 2014, 05:22:59 PM
 #4

Very Well explained!!

Thank you very much!!
Afrikoin
Legendary
*
Offline Offline

Activity: 1540
Merit: 1003


alan watts is all you need


View Profile
May 18, 2014, 03:24:47 PM
 #5

Well explained sir! Thank you!



              ▄▄▄██████▄▄▄
          ▄██████████████████▄
       ▄████████████████████████▄
 ▄▄  ▄████████████████████████████▄
███████████████████████████████████▄
 ▀▀█████████████████████████████████▄
   ██████████████████████████████████
   ██████████████████████████████████
   ██████████████████████████████████
   ██████████████████████████████████
   ▀████████████████████████████████▀
    ▀██████████████████████████████▀
     ▀▀██████████████████████████▀
        ▀██████████████████████▀
           ▀▀▀████████████▀▀▀
.
.....
.....
.....
.....
.....
.....





kik1977
Hero Member
*****
Offline Offline

Activity: 593
Merit: 505


Wherever I may roam


View Profile
May 18, 2014, 09:01:51 PM
 #6

As usual, very well put, DannyHamilton Smiley

We are like butterflies who flutter for a day and think it is forever
abraarukuk
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
May 18, 2014, 09:10:57 PM
 #7

help me,how to receive BTC?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3430
Merit: 4669



View Profile
May 18, 2014, 10:21:07 PM
 #8

help me,how to receive BTC?

Step 1.
Get a bitcoin wallet.

Step 2.
Find someone that has bitcoins and is willing to give you some in exchange for something of value.

Step 3.
Give that person the bitcoin address from your bitcoin wallet.

Step 4.
Give that person the thing of value that you are exchanging.

Step 5.
Wait for that person to send bitcoins to your wallet.

Note:
If the person that is supposed to send you bitcoins is not trustworthy, consider using escrow.

Campsis
Member
**
Offline Offline

Activity: 112
Merit: 10

WW3


View Profile
May 18, 2014, 10:33:13 PM
 #9

thank you for explaining!

Slingshot
Sr. Member
****
Offline Offline

Activity: 616
Merit: 250


View Profile
May 19, 2014, 12:11:45 AM
 #10

A Beginners Guide to Bitcoin

http://www.coindesk.com/information/



Welcome to Bitcoin!



Bitcoin is The Future.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!