Author

Topic: public address in my wallet? (Read 321 times)

legendary
Activity: 2380
Merit: 5213
March 17, 2021, 09:20:42 AM
#24
-------
There are 2160 possible bitcoin addresses and as stated by Pmalek such a collision is almost impossible.
Assuming there are 10 billion bitcoin users (even higher than current population of the world) and each of them has 1 billion bitcoin addresses, the chance to generate an address colliding with an existing one would be about 1 in 296.
legendary
Activity: 2730
Merit: 7065
March 17, 2021, 08:43:08 AM
#23
Such a collision is theoretically possible but very, very, very... unlikely. If both users generated the addresses with an awful RNG, such a collision could potentially happen. I have never read any reports of anyone reporting it though. If that happens, both users would be able to spend the coins if they still have the correct private keys of that address.
newbie
Activity: 29
Merit: 3
March 17, 2021, 08:26:07 AM
#22
Just out of curiosity...

Let's say A user bitcoin address is abcd who has 10 bitcoins...
Say...Luckily, B user got exactly same bitcoin address, which is abcd....let's just ASSUME that...In this case, both A and B user would see 10 bitcoins balances in their screen?
Then I guess whoever spends that money first would be their money then?

Thanks,
newbie
Activity: 29
Merit: 3
March 11, 2021, 09:46:42 PM
#21
Let's say I entered the legacy bitcoin address...and then message...

Actually to sign message, private key is needed...so when the legacy public address is generated in my wallet, it keeps track of the private key and public key...technically, we can't know the private key from the public key, but in the wallet, when they generate public key, internally, they keep track of pair of private key and public key...so...when they entered the legacy public address when signing message, then from the wallet behind, it looks up to find out the private key from the public key to sign the message...is my understanding correct? So they actually used the private key that is found from lookup table inside wallet data structure...Correct?

Then...that message will be verified with the public key..then..
You enter the Bitcoin address so it should lookup your private key from your address.

The message is actually verified against your Bitcoin address as that is one of the three elements given to the person verifying it. Due to the unique characteristic of ECDSA, it is possible to derive the possible ECDSA public key from the signature itself. It is converted into the corresponding Bitcoin addresses during verification and then verified against the address given by the other party.

"The message is actually verified against your Bitcoin address as that is one of the three elements given to the person verifying it. Due to the unique characteristic of ECDSA, it is possible to derive the possible ECDSA public key from the signature itself. It is converted into the corresponding Bitcoin addresses during verification and then verified against the address given by the other party."

This is the KEY. I realized that this is the way how Bitcoin could verify the signature. Awesome. BTW, I found some examples that a public key is recovered from a signature using Javascript. However, I am looking for some example how this can be done with Org.BouncyCastle library. Do you know by any chance where I could get that information to recover the public key from a signature using that specific library?

Thanks,
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
March 11, 2021, 01:21:05 AM
#20
> getaddressinfo mBlahblhbblh(this is my bitcoin address, which is base58 encoded)
it returns pub key ...this was compressed one... in order to know the uncompressed one as well, do I need do it programmatically by my own or any way I can do this as well in the console?
You'll have to do it yourself outside of the console. Bitcoin Core only displays the public key that corresponds to the address. There's no need for Bitcoin Core to display different versions of the address as it won't serve much purpose other than causing more confusion. It's not too difficult to do so.
newbie
Activity: 29
Merit: 3
March 10, 2021, 11:02:13 AM
#19
> getaddressinfo mBlahblhbblh(this is my bitcoin address, which is base58 encoded)
it returns pub key ...this was compressed one... in order to know the uncompressed one as well, do I need do it programmatically by my own or any way I can do this as well in the console?

newbie
Activity: 29
Merit: 3
March 09, 2021, 10:59:14 PM
#18
Let's say I entered the legacy bitcoin address...and then message...

Actually to sign message, private key is needed...so when the legacy public address is generated in my wallet, it keeps track of the private key and public key...technically, we can't know the private key from the public key, but in the wallet, when they generate public key, internally, they keep track of pair of private key and public key...so...when they entered the legacy public address when signing message, then from the wallet behind, it looks up to find out the private key from the public key to sign the message...is my understanding correct? So they actually used the private key that is found from lookup table inside wallet data structure...Correct?

Then...that message will be verified with the public key..then..
You enter the Bitcoin address so it should lookup your private key from your address.

The message is actually verified against your Bitcoin address as that is one of the three elements given to the person verifying it. Due to the unique characteristic of ECDSA, it is possible to derive the possible ECDSA public key from the signature itself. It is converted into the corresponding Bitcoin addresses during verification and then verified against the address given by the other party.

"You enter the Bitcoin address so it should lookup your private key from your address. "

So this is basically what I was saying. You can't get private key from public key...however, in wallet, it keeps track of pair of private/public..so it can simply look up the private from the public then...basically.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
March 09, 2021, 10:49:35 PM
#17
Let's say I entered the legacy bitcoin address...and then message...

Actually to sign message, private key is needed...so when the legacy public address is generated in my wallet, it keeps track of the private key and public key...technically, we can't know the private key from the public key, but in the wallet, when they generate public key, internally, they keep track of pair of private key and public key...so...when they entered the legacy public address when signing message, then from the wallet behind, it looks up to find out the private key from the public key to sign the message...is my understanding correct? So they actually used the private key that is found from lookup table inside wallet data structure...Correct?

Then...that message will be verified with the public key..then..
You enter the Bitcoin address so it should lookup your private key from your address.

The message is actually verified against your Bitcoin address as that is one of the three elements given to the person verifying it. Due to the unique characteristic of ECDSA, it is possible to derive the possible ECDSA public key from the signature itself. It is converted into the corresponding Bitcoin addresses during verification and then verified against the address given by the other party.
newbie
Activity: 29
Merit: 3
March 09, 2021, 10:27:58 PM
#16
One additional question.

Under File Menu, there sign message...

So it asks the bitcoin address and message to sign message...

I understand that here segwit address cannot be used..

Let's say I entered the legacy bitcoin address...and then message...

Actually to sign message, private key is needed...so when the legacy public address is generated in my wallet, it keeps track of the private key and public key...technically, we can't know the private key from the public key, but in the wallet, when they generate public key, internally, they keep track of pair of private key and public key...so...when they entered the legacy public address when signing message, then from the wallet behind, it looks up to find out the private key from the public key to sign the message...is my understanding correct? So they actually used the private key that is found from lookup table inside wallet data structure...Correct?

Then...that message will be verified with the public key..then..

Thanks,
newbie
Activity: 29
Merit: 3
March 06, 2021, 08:20:32 AM
#15
Awesome guys!
Huge Thanks again!
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
March 06, 2021, 01:47:42 AM
#14
-snip-   So I guess the list of public addresses showing in the Receiving Addresses are something that you generated explicitly by yourself.
Those are already pre-generated in the wallet file, 1000 receiving and 1000 change addresses. They are not randomly generated, all are based from your "hdseed".
In the 'receive' tab, the first to be displayed is the first in the index, the next is the second, etc. etc.

I *guess* that a public addressed generated by *your wallet(system)* may be hidden because I *guess* that could confuse you more...
If you really want to "see" them, you can use dumpwallet command (doc), but that includes sensitive data like the hdseed, extended private masterkey and the addresses' private keys.
So, only do this to a "for testing" wallet.

In the data dump (include a .txt extension if you want to open it directly with a txt editor),
look for the derivation paths like hdkeypath=m/0'/0'/0'.
The example should be the first address that displayed in the receive tab, hdkeypath=m/0'/0'/1' is the second and hdkeypath=m/0'/0'/2 3'is the third.
The change addresses' hdkeypath starts with hdkeypath=m/0'/1'/0' then hdkeypath=m/0'/1'/1' for the second, etc.

Lastly, the wallet will generate more keys to keep a 1000 unused keys per chain after you've used the first in the index.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
March 06, 2021, 12:52:33 AM
#13
Correct, don't want to override it..probably don't need it at all.. however, just was curious whether that would be something possible or not. Yes, once I received the back the difference to the system generated address, I could send back the difference to my desired address again, in this case ABC. However, another transaction means another fees as well. So I just was thinking that if we could specify the public address where we r supposed to receive back to, at the time of when we send it somehow, we could avoid another fees possibly...
Yes. The UI provides a fairly easy way to do so as well.

Ensure that you have Coin Control turned on in the settings.



After which, you should be able to see a box labelled Coin Control features. There's a checkbox to specify a custom change address and after which, you can specify your own change address.
newbie
Activity: 29
Merit: 3
March 05, 2021, 06:12:26 PM
#12
Correct, don't want to override it..probably don't need it at all.. however, just was curious whether that would be something possible or not. Yes, once I received the back the difference to the system generated address, I could send back the difference to my desired address again, in this case ABC. However, another transaction means another fees as well. So I just was thinking that if we could specify the public address where we r supposed to receive back to, at the time of when we send it somehow, we could avoid another fees possibly...
legendary
Activity: 2702
Merit: 3045
Top Crypto Casino
March 05, 2021, 05:28:40 PM
#11
Say my public address "ABC"...say I have 10 bitcoins..then sent to 2 bitcoins to "XYZ"...then XYZ will receive 2 bitcoins...then 8 bitcoins will send back to my new public address (generated by the system), say, this is "FFF", which is linked and governed by a master key.
The "FFF" is your change address. Your wallet will generate this change address automatically to receive the difference between the value of your UTXOs and the sent amount.

Quote
I am not sure how to override that "FFF" to "ABC" manually in that Bitcoin Core though... In the Send window, only inputs I see is Pay TO(which should be "XYZ"
Not sure why you want to override it! When you send a payment to someone, you would want the change to be sent back to one of your addresses.
However, you can specify which address should receive the change by adding it as a new recipient and send the difference to it.
newbie
Activity: 29
Merit: 3
March 05, 2021, 03:19:06 PM
#10
1. would that even possible to send money to the same public address?
    Say my public address is ABC....then sent some coin to ABC...like I observed, the bitcoin created new public address in my wallet to send back the difference...to new one, not ABC...but somehow any way possibly to send to that ABC?
Yes. All public addresses of a single key are linked together by a master public and private key. So you can reuse same address even if a new one is suggested.
Change address is only in place to improve privacy.

2. Here is my reasonable thinking(?).. the way bitcoin works this way is that..because it needs to keep track of UTXO.... so it *must* generate new public address to receive in that way it can easily figure out transparently whether it is spent or unspent.... Is that somehow principal of design..am I pretty much in the right track of thinking?
No, it must NOT generate new addresses to keep track of UTXOs. Multiple transactions to a single address are different outputs and would not be linked i.e, a single address can have multiple UTXOs.

 Say my public address "ABC"...say I have 10 bitcoins..then sent to 2 bitcoins to "XYZ"...then XYZ will receive 2 bitcoins...then 8 bitcoins will send back to my new public address (generated by the system), say, this is "FFF", which is linked and governed by a master key. First of all, I am not sure how to override that "FFF" to "ABC" manually in that Bitcoin Core though... In the Send window, only inputs I see is Pay TO(which should be "XYZ", Label(this is optional), and Amount(2 bitcoins)...Maybe in order to override this, I would have to use JSONRPC command to send money then?

"Multiple transactions to a single address are different outputs and would not be linked i.e, a single address can have multiple UTXOs." ... Could you possibly explain more easily with some examples so I could understand better?

Thanks,
legendary
Activity: 2114
Merit: 2248
Playgram - The Telegram Casino
March 05, 2021, 02:48:34 PM
#9
1. would that even possible to send money to the same public address?
    Say my public address is ABC....then sent some coin to ABC...like I observed, the bitcoin created new public address in my wallet to send back the difference...to new one, not ABC...but somehow any way possibly to send to that ABC?
Yes. All public addresses of a single key are linked together by a master public and private key. So you can reuse same address even if a new one is suggested.
Change address is only in place to improve privacy.

2. Here is my reasonable thinking(?).. the way bitcoin works this way is that..because it needs to keep track of UTXO.... so it *must* generate new public address to receive in that way it can easily figure out transparently whether it is spent or unspent.... Is that somehow principal of design..am I pretty much in the right track of thinking?
No, it must NOT generate new addresses to keep track of UTXOs. Multiple transactions to a single address are different outputs and would not be linked i.e, a single address can have multiple UTXOs.
newbie
Activity: 29
Merit: 3
March 05, 2021, 02:38:21 PM
#8
some additional questions came up.

1. would that even possible to send money to the same public address?
    Say my public address is ABC....then sent some coin to ABC...like I observed, the bitcoin created new public address in my wallet to send back the difference...to new one, not ABC...but somehow any way possibly to send to that ABC?

2. Here is my reasonable thinking(?).. the way bitcoin works this way is that..because it needs to keep track of UTXO.... so it *must* generate new public address to receive in that way it can easily figure out transparently whether it is spent or unspent.... Is that somehow principal of design..am I pretty much in the right track of thinking?

Thanks,
newbie
Activity: 29
Merit: 3
March 05, 2021, 01:56:13 PM
#7
Maybe something like *getalladdressinfo* ..maybe..don't know..? ...then..it shows all public addresses that associated with your wallet....Is there anything like that?
You can use the command below to get list of all your addresses with their balance.

Code:
listreceivedbyaddress 0 true

Thanks a lot. That looks like the command I was looking for ....

I *guess* that a public addressed generated by *your wallet(system)* may be hidden because I *guess* that could confuse you more...

Here is what I noticed.

1. *You* created new receiving address by clicking the button. Say this address is "ABC"...This "ABC" will be shown up in the "Receiving addresses" window.
2. You sent 0.1BT to that address "ABC"
3. In the transaction payload, I noticed that *new public address*(Say this address is "DEF") was created by the system ..and sent back the difference to this "DEF".
4. "DEF" address I wasn't able to find from that "Receiving addresses" window. I thought that since the "DEF" was also my public address generated by the system, that should be shown up in that window, but it wasn't.

5. I used listreceivedbyaddress... what I noticed is that... I still didn't see "DEF" address,  but here is what I see...

{
    "address" : "ABC"
    "amount" : blahblah..
    ....

    "txids" :[
                   "c3123456...",
                   "48056789...."
    ]
}

One of transactions in txids indicated that the "DEF" was associated in the output.... Well I thought that there should be listed something like below...........but it wasn't.

{
  "address" : "DEF"
...
..

}


Well...my observation may be too much detail..maybe no one cares..but just would like to share for anyone may be interested for educational purpose............but be aware that I am extremely beginner so this may not be true totally ..:-)
Since I really get tons of help from this site, hope this observation also could help someone...I guess like p2p network propagation so eventually reach someone that needs this info!..:-)

BTW, I really appreciate all help you guys have given so far.

Thanks,
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
March 05, 2021, 01:38:36 PM
#6

Maybe something like *getalladdressinfo* ..maybe..don't know..? ...then..it shows all public addresses that associated with your wallet....Is there anything like that?

Can you try this command "listwallets" if not try to use the command "help"


But I think there is no command that could see all possible addresses in your wallet all address generated is random that's why it's recommended to always backup wallet.dat file or make a private key backup.

legendary
Activity: 2380
Merit: 5213
March 05, 2021, 01:09:03 PM
#5
Maybe something like *getalladdressinfo* ..maybe..don't know..? ...then..it shows all public addresses that associated with your wallet....Is there anything like that?
You can use the command below to get list of all your addresses with their balance.

Code:
listreceivedbyaddress 0 true
newbie
Activity: 29
Merit: 3
March 05, 2021, 12:39:55 PM
#4
Everytime you send or receive funds, a new address will be generated by your wallet.

In the addresses tab you've found there should be a "new" button (or there used to be) so if you want more addresses you could use that too.

Yes..Right.. then "In the addresses tab", which one are you talking about? I guess you are talking about "Create new receiving address" button under receive tab. Yes. you can create new address and use this to receive. What I am asking is that I want to see ALL public addresses have been generated by my wallet. What is the rpc command for that?

Maybe something like *getalladdressinfo* ..maybe..don't know..? ...then..it shows all public addresses that associated with your wallet....Is there anything like that?
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
March 05, 2021, 12:37:33 PM
#3
~snip~

    Say here is my public bitcoin address generated, which is "abc"...
    I sent 0.001 bitcoin to "abc".....
    What I noticed is that bitcoin detects the "abc" belongs to my self..so it generated new public address automatically(which I noticed in the payload, ..let's say ..this new public address "def")... .... the thing is that the "def" public address generated I wasn't able to find in the receiving addresses window...

   So I guess the list of public addresses showing in the Receiving Addresses are something that you generated explicitly by yourself.

Thanks,

If you can't find the newly generated one try to check the receive tab under "requested payments history" it should show something like this



Now check if one is the address that you are looking for. If not you can use the console to check if the address that automatically generated is yours by using this command below.


Code:
getaddressinfo yourbitcoinaddress

Then check under ismine if it's true or not. If it's true then the generated address is yours.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
March 05, 2021, 12:04:15 PM
#2
Everytime you send or receive funds, a new address will be generated by your wallet.

In the addresses tab you've found there should be a "new" button (or there used to be) so if you want more addresses you could use that too.
newbie
Activity: 29
Merit: 3
March 05, 2021, 10:59:46 AM
#1
Hello,

I am currently testing with Bitcoin  Core Qt v.0.21.0

1. Is there any way I can see all my public addresses associated with my wallet? I quickly google...something came up..someone mentioned there is a command getaddress something with empty parameter that responds the list of public addresses that associated with my wallet..but it looks like this is no longer true in the latest version. Is there any command for that I can try to use the list of all my public addresses of my wallet?

2. I see there is a receiving addresses window showing all public addresses have been generated. However, I believe there could be more than what these are showing.
    Here is some interesting thing I noticed.....

    I tested to send my bitcoin to myself....

    Say here is my public bitcoin address generated, which is "abc"...
    I sent 0.001 bitcoin to "abc".....
    What I noticed is that bitcoin detects the "abc" belongs to my self..so it generated new public address automatically(which I noticed in the payload, ..let's say ..this new public address "def")... .... the thing is that the "def" public address generated I wasn't able to find in the receiving addresses window...

   So I guess the list of public addresses showing in the Receiving Addresses are something that you generated explicitly by yourself.

Thanks,
Jump to: