Bitcoin Forum
June 21, 2024, 10:37:20 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does a wallet come to know of Address just by importing Private key?  (Read 315 times)
AniketBhadane (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
June 30, 2017, 06:20:05 PM
 #1

I have exported my Private key to Paper Wallet. Now, when we send/receive bitcoins, we send/receive them to an "Address". So suppose I receive some bitcoins on my address. I have the private key of this address. Now I want to spend the bitcoins I received at my address. For this I need to import my private key to some wallet. Am I right?

And even though I'm importing my private key to the wallet, how will the wallet know what is my "Address"? Because I'm just importing the Private key, not address. Is address derived from private key?

I'm confused with this.
unamis76
Legendary
*
Offline Offline

Activity: 1512
Merit: 1009


View Profile
June 30, 2017, 06:25:33 PM
 #2

It knows because one key can only correspond to one address, so to speak. I'm not sure why exactly you're confused, as you seem to get things pretty much right.

You might want to read more here
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
June 30, 2017, 06:30:43 PM
 #3

I have exported my Private key to Paper Wallet. Now, when we send/receive bitcoins, we send/receive them to an "Address". So suppose I receive some bitcoins on my address. I have the private key of this address. Now I want to spend the bitcoins I received at my address. For this I need to import my private key to some wallet. Am I right?

And even though I'm importing my private key to the wallet, how will the wallet know what is my "Address"? Because I'm just importing the Private key, not address. Is address derived from private key?

I'm confused with this.

Yes, exactly right: The address is derived from the private key. 

https://bitcoin.stackexchange.com/questions/1851/how-to-generate-a-valid-bitcoin-address-for-destroying-bitcoins

Wendigo
Legendary
*
Offline Offline

Activity: 2604
Merit: 1036



View Profile
June 30, 2017, 06:49:21 PM
 #4

Let's say you have a car. Let's pretend that your car is also your public address. Your car is visible to everyone and everyone knows it's your car (Public key). You have a key for your car. Your car key is also your Private key. Your key is designed only for your car and it doesn't fit other keyholes. So every time you import your keys to a new wallet your car is signaled that it's you the owner and you can enter your car freely. And yes the public keys are derived from the private keys and the signaling happens automatically so your new wallet knows your previous address with the old balance ( or your car so to speak).

Found this explanation:

Quote
Every public key is 256 bits long — sorry, this is mathematical stuff — and the final hash (your wallet address) is 160 bits long. The public key is used to ensure you are the owner of an address that can receive funds. The public key is also mathematically derived from your private key, but using reverse mathematics to derive the private key would take the world’s most powerful supercomputer many trillion years to crack.

And here also:  https://blog.wetrust.io/why-do-i-need-a-public-and-private-key-on-the-blockchain-c2ea74a69e76
Jamie Oliver
Member
**
Offline Offline

Activity: 125
Merit: 10


View Profile
July 13, 2017, 06:32:49 AM
 #5

This article may be too technical for some users. The more basic article on Bitcoin Addresses may be more appropriate.
A Bitcoin address is a 160-bit hash of the public portion of a public/private ECDSA keypair. Using public-key cryptography, you can "sign" data with your private key and anyone who knows your public key can verify that the signature is valid.
A new keypair is generated for each receiving address (with newer HD wallets, this is done deterministically). The public key and their associated private keys (or the seed needed to generate them) are stored in the wallet data file. This is the only file users should need to backup. A "send" transaction to a specific Bitcoin address requires that the corresponding wallet knows the private key implementing it. This has the implication that if you create an address and receive coins to that address, then restore the wallet from an earlier backup, before the address was generated, then the coins received with that address are lost; this is not an issue for HD wallets where all addresses are generated from a single seed. Addresses are added to an address key pool prior to being used for receiving coins. If you lose your wallet entirely, all of your coins are lost and can never be recovered.
Bitcoin allows you to create as many addresses as you want, and use a new one for every transaction. There is no "master address": the "Your Bitcoin address" area in some wallet UIs has no special importance. It's only there for your convenience, and it should change automatically when used.

DCC│Distributed Credit Chain
    Empower Credit, Enable Finance   
GithubFacebookMedium ‹‹‹dcc.finance››› RedditTwitterTelegram
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!