Where are new addresses stored?

3

When a user generates an address using Bitcoin Core, is that address by default stored on the blockchain or will it only be stored after it is used in a transactions

Pankaj Kumar

Posted 2018-10-30T05:57:48.417

Reputation: 145

Answers

1

will be stored only after any transactions occur ?

Wallet addresses are not technically seen in the blockchain until they are used in a transaction, but that does not mean that they have not been generated/belong to someone. A Bitcoin "address" is derived using the public key (and the public key is derived from the private key, using ECDSA) and are really used for simplicity and readability through Base58 encoding (imagine needing a user's full 32 byte public key!).

A private key can be used to derive a public key and likewise the public key can be used to derive an address. Due to the nature of hash functions/ECDSA, these values are "computationally infeasible" to reverse. Meaning you cannot take the address and obtain the public key nor can you calculate the private key given the public key.

As the wiki states:

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.

Anyone with the private key necessary to meet the spending condition (scriptSig) of a transaction will have the means to spend it's output(s).

KappaDev

Posted 2018-10-30T05:57:48.417

Reputation: 709

this means public key is not same as the wallet address ?Pankaj Kumar 2018-10-30T06:21:53.727

@PankajKumar Correct. The public key is used to obtain the address given to you when generating a new address. Refer to this from step #2 to see what is done to the public key to get the Base58 address you're familiar with.

KappaDev 2018-10-30T06:23:54.890

It is also worth mentioning that although the public key is not exactly the same as the bitcoin address, the public key will always produce the same address.KappaDev 2018-10-30T06:26:01.207

So we can say that first process start with the public and private key creation .And we can use code to generate these keys locally. after these keys created then the wallet address can be generated (so far there is no communication between blockchain).When any other user try to send BTC to newly generated wallet address only then the transactions along with the newly created wallet stored on the blockchain ? In other words we can say that address generation dont need blockchain access or communication.Pankaj Kumar 2018-10-30T06:51:06.910

@PankajKumar Exactly right. They can be created online or offline, and it is generally recommended to generate private keys offline to prevent them from being stolen, etc.KappaDev 2018-10-30T07:31:23.247

After addresses generated offline how they can be available on bitcoin network ? let me explain with example : Suppose 'A' named user has created valid address locally using the code (python) . Now Suppose 'B' named user want to send 1 BTC to 'A' .Is it possible that 'B' user is able to send coin to 'A' directly ? Or is 'A' needs to do something so that the new address that he had created will be availble on the Bitcoin blockchain ?Pankaj Kumar 2018-11-01T04:32:53.860

@PankajKumar Either A or B can send a transaction in any order. The protocol doesn't care if the address have already been claimed, the transaction will still be approved by the nodes.KappaDev 2018-11-01T21:59:51.730

@Kapil is this means that if the address are generated offline its not required those addresses to be publish on blockchain ?Pankaj Kumar 2018-11-02T04:23:33.153