Pages:
Author

Topic: How does one derive a SegWit address from a legacy address? [0.001 BTC Reward!] - page 2. (Read 433 times)

full member
Activity: 434
Merit: 101
YouTuber, gambler, and scam-buster.
AFAIK, there is no way to prove one is connected to the other without providing your private key.

But you should be able to use a different wallet that supports signing messages with Segwit addresses to do it.

Well, that sucks. I just got back after locking my Ledger in a safe deposit box in Malaysia  Undecided
legendary
Activity: 2758
Merit: 6830
AFAIK, there is no way to prove one is connected to the other without providing your private key.

But you should be able to use a different wallet that supports signing messages with Segwit addresses to do it.
legendary
Activity: 1946
Merit: 1427
Thanks for the detailed response, Heisenberg_Hunter.

What I'm getting at is, how can I prove that I own the funds present at 3H2miXstFo3jRFfz5ekcdZJNMfGSYHeNvB if I can only sign a message from 1CmXjL8V2UJ8jQnMmVNCJtyTzSHPY4gyoR? Is it impossible for me to prove I own those funds simply because they are stored in a SegWit address, or is there some online app or block explorer that can prove that a signed message from 1CmXjL8V2UJ8jQnMmVNCJtyTzSHPY4gyoR also corresponds to the address 3H2miXstFo3jRFfz5ekcdZJNMfGSYHeNvB?
In theory, (atleast i think), you should be able to prove correlation if you've spend funds from both of the adresses.

Once you spend funds, the public key becomes known, which, should be the same for both of the adresses? (Not entirely sure if this is actually the case though.)

Otherwise, no, i don't think there's any way to prove to someone without the private key that you own both of the adresses. (Unless you use some sort of chain analysis as proof.)
full member
Activity: 434
Merit: 101
YouTuber, gambler, and scam-buster.
Thanks for the detailed response, Heisenberg_Hunter.

What I'm getting at is, how can I prove that I own the funds present at 3H2miXstFo3jRFfz5ekcdZJNMfGSYHeNvB if I can only sign a message from 1CmXjL8V2UJ8jQnMmVNCJtyTzSHPY4gyoR? Is it impossible for me to prove I own those funds simply because they are stored in a SegWit address, or is there some online app or block explorer that can prove that a signed message from 1CmXjL8V2UJ8jQnMmVNCJtyTzSHPY4gyoR also corresponds to the address 3H2miXstFo3jRFfz5ekcdZJNMfGSYHeNvB?
legendary
Activity: 1584
Merit: 1280
Heisenberg Design Services
, or how one or derived from the other? Thank you.

In order to understand how the addresses are generated, you need to have an insight on how the public keys and private keys are derived based on the elliptic curve algorithm which is being followed in the bitcoin. Every address is generated from the private keys. With a private key you can generate either a legacy address (that starts with 1) or a segregated witness address commonly known as segwit (that starts with 3 or bc1). Some wallets like electrum can generate only addresses which are of legacy type or native segwit or bech32 type.

A public key is generally derived from the private key with a help of one way multiplication function. This means that, you can generate a public key from the private key but you cannot do the other way (i.e a private key cannot be derived from a public key). A private key is a ordinary number which lies in between 1 and 2^256. I am not going deep inside about private keys and their functions, as it would become slightly off-topic and the post would become so lengthy and cumbersome.

A private key is a hexadecimal representation of 256 bit random number. From that hexadecimal number, you generate the public key by doing a multiplication. This multiplication can be represented by

K = k * G

where

G = Constant from the elliptic curve
k = Private Key
K = Public

The constant G is derived from Elliptic Curve and when you multiply your generated Private Key with the Constant, it will yield a new string of characters known as the public key.

Note that, it is a one way function where only multiplication is possible and dividing Public Key with constant won't yield you the Private Key.

Legacy Addresses

Once you have the Public Key, you can either generate a legacy address or a segwit address. A legacy address is the common address used in the early days and will generate a higher transaction size. With higher transaction sizes, you need to pay higher fees. Here with the generated public key, you will double hash them to get a resulting legacy address.

The public key is first hashed with Sha256 algorithm and the resulting number is hashed with RiPEMD160 algorithm. We can simply write this as,

Address = RIPEMD160[SHA256[PubKey]]]

The resulting version of the hash is longer enough, hence they are encoded using Base58 encoding method which brings down the total character to 58.

P2SH Addresses

A P2SH is similar to the hashing function, but here we don't hash the public key rather we double hash the script. Addresses that start with 3 are generally called as p2sh rather than calling them as segwit. Segwit removes unwanted witnesses which increases the size of a transaction significantly. By reducing the space, more transactions can be included in a block which certainly helps in scalability of the bitcoin network.

Yep, I surmised as much. What I'd like to know is, how do I see the list of SegWit addresses linked to that legacy address? I'd like to give proof of funds from a 3XXX address rather than a 1XXX address, so I want to figure out how the two are linked.
They are linked together only by private keys. With a single private key, you can either generate a legacy or a segwit address.
full member
Activity: 434
Merit: 101
YouTuber, gambler, and scam-buster.
Hello,

I signed a message from my Ledger, and selected the address 3H2miXstFo3jRFfz5ekcdZJNMfGSYHeNvB to sign from. When I signed the message, it got signed from the address 1CmXjL8V2UJ8jQnMmVNCJtyTzSHPY4gyoR, which I presume is the legacy address from which the first one was derived.

My question is, is there some online tool that can help me see the link between the two addresses, or how one or derived from the other? Thank you.

Legacy starts with 1

Segwit starts with 3 or bc1


In Ledger, you can not sing a message from a segwit address so by default it signs you a legacy address.


Yep, I surmised as much. What I'd like to know is, how do I see the list of SegWit addresses linked to that legacy address? I'd like to give proof of funds from a 3XXX address rather than a 1XXX address, so I want to figure out how the two are linked.
legendary
Activity: 2800
Merit: 2736
Farewell LEO: o_e_l_e_o
Hello,

I signed a message from my Ledger, and selected the address 3H2miXstFo3jRFfz5ekcdZJNMfGSYHeNvB to sign from. When I signed the message, it got signed from the address 1CmXjL8V2UJ8jQnMmVNCJtyTzSHPY4gyoR, which I presume is the legacy address from which the first one was derived.

My question is, is there some online tool that can help me see the link between the two addresses, or how one or derived from the other? Thank you.

Legacy starts with 1

Segwit starts with 3 or bc1


In Ledger, you can not sing a message from a segwit address so by default it signs you a legacy address.
full member
Activity: 434
Merit: 101
YouTuber, gambler, and scam-buster.
Hello,

I signed a message from my Ledger, and selected the address 3H2miXstFo3jRFfz5ekcdZJNMfGSYHeNvB to sign from. When I signed the message, it got signed from the address 1CmXjL8V2UJ8jQnMmVNCJtyTzSHPY4gyoR, which I presume is the legacy address from which the first one was derived.

My question is, is there some online tool that can help me see the link between the two addresses, or how one or derived from the other? Thank you.
Pages:
Jump to: