NobodyWantsMe (OP)
Newbie
Offline
Activity: 3
Merit: 2
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 01, 2021, 10:34:33 AM |
|
Can I get an explanation of how addresses and keys are generated? Specifically:
Does the wallet software interact with the blockchain to create an address? Is the balance of an address held forever since it can be referenced in the blockchain record? If I were to create a new address how would that affect my Bitcoin if I lost my original address? Would a Bitcoin address always produce the same private key?
|
|
|
|
jackg
Copper Member
Legendary
Offline
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 01, 2021, 10:48:25 AM |
|
1. No, addresses are made independent of anything. Your wallet just picks a few numbers. 2. Yes the value an address has is stored on the blockchain forever as the blockchain indexes each transaction (it only holds a list of transactions). 3. Losing a private key is the problematic part as that's what's needed to spend funds from your address. 4. NO. A private key produces the address. Private key - > public key - > address
The address is a double hash of the public key and the public key is generated by running an irreversible operation on the private key.
|
|
|
|
Charles-Tim
Legendary
Offline
Activity: 1652
Merit: 5087
Leading Crypto Sports Betting & Casino Platform
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 01, 2021, 11:11:24 AM |
|
Can I get an explanation of how addresses and keys are generated?
Addresses are derived from public key through one-way cryptographic hashing. The public key is calculated from the private key using elliptic curve multiplication, which is irreversible: K = k * G, where k is the private key, G is a constant point called the generator point, and K is the resulting public key. Master private key, master public key and master chian code are derived from the seed through one way function HMAC-SHA512 algorithm, the seed is derived from the seed phrase through key stretching function PBKDF2 and HMAC-SHA512 algorithm. The seed phrase is derived from entropy. https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch04.asciidocDoes the wallet software interact with the blockchain to create an address?
No. Although wallet can synchronized with blockchain or run full nodes but wallet do not depend on blockchain to create addresses. Know that any address generated by wallet that has not been used for transaction is not recorded on blockchain. Is the balance of an address held forever since it can be referenced in the blockchain record?
Yes, it is also accessible forever so far you have the private key, or the seed phrase. If I were to create a new address how would that affect my Bitcoin if I lost my original address?
All is that you can not lost your bitcoin if you properly backup your private key or seed phrase, they can be used in wallet recovery. Would a Bitcoin address always produce the same private key?
No. Addresses does not produce private key. But if the question is 'will the same private key produces the same addreses'? The answer is yes. That is why if your private key is well backup, you will always use it to recover back your bitcoin stored on blockchain using your addresses because private key will always generate same addresses.
|
..Stake.com.. | | | ▄████████████████████████████████████▄ ██ ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ ██ ▄████▄ ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██ ██████ ██ ██████████ ██ ██ ██████████ ██ ▀██▀ ██ ██ ██ ██████ ██ ██ ██ ██ ██ ██ ██████ ██ █████ ███ ██████ ██ ████▄ ██ ██ █████ ███ ████ ████ █████ ███ ████████ ██ ████ ████ ██████████ ████ ████ ████▀ ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██ ██ ▀▀▀▀▀▀▀▀▀▀ ██ ▀█████████▀ ▄████████████▄ ▀█████████▀ ▄▄▄▄▄▄▄▄▄▄▄▄███ ██ ██ ███▄▄▄▄▄▄▄▄▄▄▄▄ ██████████████████████████████████████████ | | | | | | ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █ ▄▀▄ █▀▀█▀▄▄ █ █▀█ █ ▐ ▐▌ █ ▄██▄ █ ▌ █ █ ▄██████▄ █ ▌ ▐▌ █ ██████████ █ ▐ █ █ ▐██████████▌ █ ▐ ▐▌ █ ▀▀██████▀▀ █ ▌ █ █ ▄▄▄██▄▄▄ █ ▌▐▌ █ █▐ █ █ █▐▐▌ █ █▐█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█ | | | | | | ▄▄█████████▄▄ ▄██▀▀▀▀█████▀▀▀▀██▄ ▄█▀ ▐█▌ ▀█▄ ██ ▐█▌ ██ ████▄ ▄█████▄ ▄████ ████████▄███████████▄████████ ███▀ █████████████ ▀███ ██ ███████████ ██ ▀█▄ █████████ ▄█▀ ▀█▄ ▄██▀▀▀▀▀▀▀██▄ ▄▄▄█▀ ▀███████ ███████▀ ▀█████▄ ▄█████▀ ▀▀▀███▄▄▄███▀▀▀ | | | ..PLAY NOW.. |
|
|
|
o_e_l_e_o
In memoriam
Legendary
Offline
Activity: 2268
Merit: 18697
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 01, 2021, 01:09:26 PM |
|
1. No, addresses are made independent of anything. Your wallet just picks a few numbers. I understand what you mean, but for the sake of explaining it to newbies, that's not the best way of phrasing it. No wallet just picks some numbers and presto - that's the address. The wallet may pick some random numbers at the start of the process as an entropy source, but the process of turning the entropy in to a seed, the seed in to a private key, the private key in to the public key, and the public key in to an address is very specific and reproducible. If I were to create a new address how would that affect my Bitcoin if I lost my original address? To expand on the answers above - you can create as many addresses as you want. If you want a billion bitcoin addresses, then you can create a billion addresses. I mean, there's no point in doing this and all it would do is probably crash your wallet if you create them all at once, but you could if you wanted. Any bitcoin present at one address will remain at that address until it is transacted. Anything that happens with any other address is irrelevant.
|
|
|
|
tranthidung
Legendary
Offline
Activity: 2380
Merit: 4191
Farewell o_e_l_e_o
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 01, 2021, 04:33:02 PM |
|
Can I get an explanation of how addresses and keys are generated?
Private key - Public Key - Address: All two steps are irreversible. Does the wallet software interact with the blockchain to create an address?
NO. If you need to connect your wallet to a blockchain to create your addresses, what is sort of privacy and security you will have? A good wallet is a wallet that can be used offline and with air-gapped machines. Is the balance of an address held forever since it can be referenced in the blockchain record?
A blockchain is a public ledger. All transactions are recorded and shown publicly. Everyone who has internet connection and is not restricted (by governments) to use Bitcoin explorers can check it. Balance, in its meaning, is a temporary value that can be changed with deposits or send outs. It is not a static balance and can not be held forever on the blockchain record. Of course, except cases like death accidents, lost of private keys, or intentionally untouch your bitcoin for years or forever. If I were to create a new address how would that affect my Bitcoin if I lost my original address?
No, you won't lose it if you back up private key for that address previously. Would a Bitcoin address always produce the same private key?
No. A private key produces a bitcoin address.
|
|
|
|
NobodyWantsMe (OP)
Newbie
Offline
Activity: 3
Merit: 2
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 01, 2021, 05:56:23 PM |
|
Really nice information, thank yous!
I'm using Bitcoin Core, sent my balance from Cash App and didn't want to mess up now that it is this new address. So that is all you would put into your hardware wallet is just the private key.
Another thing I was thinking was what if you wrote down your private key on paper and that was how you saved it?
|
|
|
|
webtricks
Legendary
Offline
Activity: 1918
Merit: 1728
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 01, 2021, 06:16:06 PM |
|
Another thing I was thinking was what if you wrote down your private key on paper and that was how you saved it?
It would be a bad idea. The length of the private key is 51-52 characters long and since it's in Base58 format, it contains both lowercase and uppercase characters. A single mistake in writing down private key will result in an invalid key and it will become very difficult to recover it. Best way to backup the private key is by first encrypting it and then keeping it either on external devices like USB key, CD, or other storage devices or generating the QR of the encrypted key and print it on a paper.
|
|
|
|
o_e_l_e_o
In memoriam
Legendary
Offline
Activity: 2268
Merit: 18697
|
So that is all you would put into your hardware wallet is just the private key. You cannot import a private key in to a hardware wallet. Doing so would negate the entire point of the hardware wallet. Hardware wallets are designed to create and store you keys in a secure environment. The keys are created inside the hardware wallet, stored inside the hardware wallet, and never exposed to your computer or the internet, which therefore removes the most likely attack surface to having your keys (and therefore your coins) stolen. If you create a private key on a computer yourself, then it has already been exposed to this attack surface. Later importing it in to a hardware wallet doesn't suddenly scrub all traces of it from the computer you created it on, or scrub any traces of it that may have leaked to the internet. The hardware wallet may be able to keep your key safe, but that doesn't really matter if an attacker already has another copy of it. For that reason, you cannot import private keys in to a hardware wallet. If you want to use a hardware wallet, you must create a new wallet on it from scratch, and then transfer funds to it from your Bitcoin Core wallet.
|
|
|
|
Oshosondy
Legendary
Offline
Activity: 1554
Merit: 1167
Gamble responsibly
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 03, 2021, 12:02:38 PM |
|
Does the wallet software interact with the blockchain to create an address?
NO. If you need to connect your wallet to a blockchain to create your addresses, what is sort of privacy and security you will have? A good wallet is a wallet that can be used offline and with air-gapped machines.Airgapped wallets or offline wallets or cold wallets are the best because the private key is generated not online but offline. But online wallets also neither have to connect to blockchain before generating private key or addresses, all wallets, be it online or offline have algorithm intrinsically embedded in them to be able to generate private keys and addresses, nothing like blockchain needed regardless of any wallet.
|
|
|
|
tranthidung
Legendary
Offline
Activity: 2380
Merit: 4191
Farewell o_e_l_e_o
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 03, 2021, 12:37:54 PM |
|
Does the wallet software interact with the blockchain to create an address?
NO. If you need to connect your wallet to a blockchain to create your addresses, what is sort of privacy and security you will have? A good wallet is a wallet that can be used offline and with air-gapped machines.Airgapped wallets or offline wallets or cold wallets are the best because the private key is generated not online but offline. But online wallets also neither have to connect to blockchain before generating private key or addresses, all wallets, be it online or offline have algorithm intrinsically embedded in them to be able to generate private keys and addresses, nothing like blockchain needed regardless of any wallet. You misunderstood it. I meant about the method you use to create your bitcoin wallet from a wallet software. It can be an application that you need to install on your computer or a browser extention. Online or offline is the condition when you create your wallet and it is important. Connecting your computer to the Internet means you allow your device potential exposures to threats that can steal your bitcoin. Offline means turn off your Intenet connection or use an air-gapped device to create your wallet and addresses. After you finish it & already have back up and test the validity of backup files, totally delete them on your computer if you will use that device online again.
|
|
|
|
o_e_l_e_o
In memoriam
Legendary
Offline
Activity: 2268
Merit: 18697
|
Offline means turn off your Intenet connection or use an air-gapped device to create your wallet and addresses. After you finish it & already have back up and test the validity of backup files, totally delete them on your computer if you will use that device online again.
This is not enough to create an airgapped wallet. Whenever you delete something from your hard drive, all your operating system does is assign those memory regions as free to be written over by new data. The data stored is not actually erased until some new data is written over it. If no new data is written, then the old data can be recovered. This is the basis for how file "undeleters" or recovery software works. If you go offline, create a wallet on your normal OS, delete the wallet, and then go back online, your private keys are very much still on your hard drive and could be accessed by malware. This is why people use permanently airgapped devices instead, which will never go online again. If you can't use a permanently airgapped device, then you should create your wallet using a live OS which does not write any data to your hard drive (even better, disconnect your hard drive entirely while doing this).
|
|
|
|
tranthidung
Legendary
Offline
Activity: 2380
Merit: 4191
Farewell o_e_l_e_o
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 04, 2021, 02:44:50 AM |
|
Offline means turn off your Intenet connection or use an air-gapped device to create your wallet and addresses. After you finish it & already have back up and test the validity of backup files, totally delete them on your computer if you will use that device online again.
This is not enough to create an airgapped wallet. Whenever you delete something from your hard drive, all your operating system does is assign those memory regions as free to be written over by new data. The data stored is not actually erased until some new data is written over it. If no new data is written, then the old data can be recovered. This is the basis for how file "undeleters" or recovery software works. If you go offline, create a wallet on your normal OS, delete the wallet, and then go back online, your private keys are very much still on your hard drive and could be accessed by malware. This is why people use permanently airgapped devices instead, which will never go online again. If you can't use a permanently airgapped device, then you should create your wallet using a live OS which does not write any data to your hard drive (even better, disconnect your hard drive entirely while doing this). Thank you for the explanation. This step is only to help people who can not have a separate device for their wallets AND not all people care to use Tail OS. At least, it plays as preventive barrier (somewhat) for bad hackers to steal your bitcoin. It is an alternative and of course is not the best method. The same goes as many people don't care to verify a wallet software before using it.
|
|
|
|
Darker45
Legendary
Offline
Activity: 2688
Merit: 1897
Crypto Casino and Sportsbook
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 04, 2021, 03:42:34 AM |
|
If I were to create a new address how would that affect my Bitcoin if I lost my original address? To expand on the answers above - you can create as many addresses as you want. If you want a billion bitcoin addresses, then you can create a billion addresses. I mean, there's no point in doing this and all it would do is probably crash your wallet if you create them all at once, but you could if you wanted. Any bitcoin present at one address will remain at that address until it is transacted. Anything that happens with any other address is irrelevant. Just for curiosity's sake, a wallet can create billions of addresses, but unless an address is involved in a transaction, it won't be recorded in the blockchain. So, to a certain extent, an address created by a certain wallet is independent. Fast forward to the future of real mass adoption. Tens of billions of people have Bitcoin wallets, most of them having more than one. If each of these tens of billions of wallets creates billions of addresses, is there a possibility, however remote it may be, that a certain wallet is generating exactly the same address being generated by another totally independent wallet? I beg your pardon if I am actually asking a silly question.
|
| | | | | | FIRST NO WAGERING BONUS CASINO & SPORTSBOOK SLOTS │ LIVE CASINO │ LIVE GAMES │ SPORTS | | | ► | WELCOME BONUS ─── UP TO ─── [ $500 ] | | ► | MULTI BET BONUS ─── UP TO ─── [ 200% ] | █████████████▄██▄ ████████████▐█████ ███▄██▄█████▐██████▄ ████████▄▄██████████▄ ███▐██▀██▀███████████ ██████████████████████▄ ███▐▄█████▄████████████▄ ▄▀▀███████████▄███████░█▌ ▀███████████████████████ ░███████████████████████ ░░▀▀▀▄██▄███████████████▄ ░░████▀█▀█████████████████▄▄ ██████▀███████████████████████▄ | PLAY NOW |
|
|
|
tranthidung
Legendary
Offline
Activity: 2380
Merit: 4191
Farewell o_e_l_e_o
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 04, 2021, 04:36:51 AM |
|
If each of these tens of billions of wallets creates billions of addresses, is there a possibility, however remote it may be, that a certain wallet is generating exactly the same address being generated by another totally independent wallet?
It is impossible with current computation power of this generation of computers. It is the reason for the advice that you should check your very first and last and a few middle characters of bitcoin addresses when you need to make deposits or withdrawals. It is for lazy people but I always check all characters in my bitcoin address. It won't save me much significant time when I skip a few characters for checking. The screenshot is for Vanity address but I think it is good to give you an example Source: https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch04.asciidoc
|
|
|
|
o_e_l_e_o
In memoriam
Legendary
Offline
Activity: 2268
Merit: 18697
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 04, 2021, 08:11:49 AM |
|
Just for curiosity's sake, a wallet can create billions of addresses, but unless an address is involved in a transaction, it won't be recorded in the blockchain. So, to a certain extent, an address created by a certain wallet is independent. Fast forward to the future of real mass adoption. Tens of billions of people have Bitcoin wallets, most of them having more than one. If each of these tens of billions of wallets creates billions of addresses, is there a possibility, however remote it may be, that a certain wallet is generating exactly the same address being generated by another totally independent wallet?
I beg your pardon if I am actually asking a silly question.
Not silly at all. There is nothing in the bitcoin code preventing two different wallets from generating the same address by chance. Given that there is almost no limit to how many addresses you can generate from a seed phrase,* then there are certainly two seed phrases out there which, at different derivation paths, will derive the same address. In fact, there are countless seed phrases which will derive countless numbers of the same address. However, the reason this will never happen is not down to any in-built code or restriction, but down to simple math. Considering only legacy addresses, there are 2 160 possible addresses, which is 1.46*10 48. Even if there are a 100 billion people, each with a billion wallets, and each wallet with a billion addresses, then we would still only have used up 0.000000000000000007% of all possible legacy addresses.
*There is actually a limit, but it is enormous. A derivation path can have at most 256 levels (one of which will always be the master), and each of the other 255 levels can have 2 32 - 1 values, if you include hardened paths. This means the total number of key pairs which can be derived from a single seed phrase is (2 32 - 1) 255, which works out to somewhere around 2.5*10 2456. This number is obviously far in excess of the number of valid private keys, meaning that any seed phrase taken to its limit is highly likely to produce every valid private key. The reason this doesn't happen is because of the math I have explained above. The sun would be dead before you got even a tiny fraction of the way through the process.
|
|
|
|
|