Bitcoin Forum

Other => Beginners & Help => Topic started by: Psycopyro on September 11, 2021, 01:03:05 PM



Title: Question regarding links between oldish bitcoin addresses and segwit ones
Post by: Psycopyro on September 11, 2021, 01:03:05 PM
Hello,

I'm on freewallet and have an imported wallet, with some address (seems) paired with a segwit addresses (bc1...).
I tried to import a bc1 in electrum and it imported the oldish address.

Is btc addresses have always a paired bc1 addresses? Is there any other pair that exist?

For the import I find the solution, I have to let the "p2wpkh:" tag


Title: Re: Question regarding links between oldish bitcoin addresses and segwit ones
Post by: hosseinimr93 on September 11, 2021, 01:17:52 PM
In electrum, if you import a compressed WIF private key (starting with K or L), you can generate three types of addresses.

For generating a legacy address (starting with 1), don't use any prefix or use "p2pkh:"
For generating a nested segwit address (starting with 3), use the prefix "p2wpkh-p2sh:"
For generating a native segwit address (starting with bc1), use the prefix "p2wpkh:"


If you import a uncompressed WIF private key (starting with 5), you can only generate a legacy address.


Title: Re: Question regarding links between oldish bitcoin addresses and segwit ones
Post by: Lucius on September 11, 2021, 01:24:59 PM
Just one tip about freewallet, it's not very smart to use their service if you don't want to have big problems when you want to make a withdraw - they have a rather demanding KYC, or rather insane by some criteria. Their official profile on the forum is painted red, and this is certainly not without reason -> https://bitcointalk.org/index.php?action=trust;u=1177176


Title: Re: Question regarding links between oldish bitcoin addresses and segwit ones
Post by: Charles-Tim on September 11, 2021, 01:25:59 PM
I'm on freewallet and have an imported wallet, with some address (seems) paired with a segwit addresses (bc1...).
I tried to import a bc1 in electrum and it imported the oldish address.
If you are using Freewallet, it is a custodial wallet. Just know that tracking your custodial wallet address may be impossible (I do it know how Freewallet works though) because it is not your key as you do not even have the key, it is also not your address, the address belongs to Freewallet, and all you own is just a representation of the funds you have with Freewallet, not yours on blockchain, Freewallet has the Bitcoin on blockchain, not you. Best to move your wallet to a reputed noncustododial wallet like Electrum or hardware wallet like Trezor for higher amount or if you are able to purchase it even for lower amount of funds to be stored.

If you are using a noncustododial wallet, follow what hosseinimr93 commented.


Title: Re: Question regarding links between oldish bitcoin addresses and segwit ones
Post by: hugeblack on September 11, 2021, 03:34:16 PM
I'm on freewallet and have an imported wallet, with some address (seems) paired with a segwit addresses (bc1...).
freewallet does not allow you to export addresses as WIF or have private key and therefore you cannot import it to electrum.
Even if it is possible to include it, it is not a secure wallet and import it to any other wallet will not increase your security.

Download electrum wallet on a clean environment, verify the signature, type your wallet seed, and withdraw your money to that wallet.

I highly recommend you stay away from that wallet.


Title: Re: Question regarding links between oldish bitcoin addresses and segwit ones
Post by: Psycopyro on September 11, 2021, 07:19:30 PM
Thanks for your answers,

It's clear now, I have found additionals informations here regarding private keys, and compressed/uncompressed private key.

https://learnmeabitcoin.com/technical/wif

But an answer call another question!

As I understood, an private key starting with 5, give a legacy address only, and also give an uncompressed adress. Obviously the public key generated by my 5xxx private key gave me a compressed key, probably compressed for ease of use.

Quote
Compression Byte suffix (optional) - Indicates if the private key is used to create a compressed public key.


Is there a way to find out our uncompressed key and perform send a transaction, just for science ?


Same question with private key starting with L or K


I think we don't speak about the same freewallet, I use the https://freewallet.io/ counterparty one.


Title: Re: Question regarding links between oldish bitcoin addresses and segwit ones
Post by: o_e_l_e_o on September 12, 2021, 08:11:23 AM
As I understood, an private key starting with 5, give a legacy address only, and also give an uncompressed adress.
Yes. Uncompressed WIF keys start with 5 and should only generate uncompressed legacy addresses. You can use them to generate other addresses, but these address will be non-standard and it will be very difficult to successfully spend any coins sent to such addresses.

Obviously the public key generated by my 5xxx private key gave me a compressed key, probably compressed for ease of use.
You can use uncompressed private keys to generate both uncompressed and compressed public keys. Similarly, you can use compressed private keys to generate both uncompressed and compressed public keys.

Is there a way to find out our uncompressed key and perform send a transaction, just for science ?
You can use the latest version of bitaddress from here: https://github.com/pointbiz/bitaddress.org
Download, verify, and run offline.
Enter your compressed or uncompressed WIF key in the box under "Wallet Details", and it will show you both your compressed and uncompressed private keys, public keys, and addresses.


Title: Re: Question regarding links between oldish bitcoin addresses and segwit ones
Post by: ABCbits on September 12, 2021, 08:53:14 AM
I think we don't speak about the same freewallet, I use the https://freewallet.io/ counterparty one.

Yes, it's different from what other member talking about. While it's open source, this is first time i heard this wallet and looks like it's not popular (total star only 51 & 7 on GitHub).

As I understood, an private key starting with 5, give a legacy address only, and also give an uncompressed adress.
Yes. Uncompressed WIF keys start with 5 and should only generate uncompressed legacy addresses. You can use them to generate other addresses, but these address will be non-standard and it will be very difficult to successfully spend any coins sent to such addresses.

And here's example how difficult it is, https://bitcointalk.org/index.php?topic=5192454.0 (https://bitcointalk.org/index.php?topic=5192454.0).


Title: Re: Question regarding links between oldish bitcoin addresses and segwit ones
Post by: Psycopyro on September 13, 2021, 07:18:43 AM
Indeed it seems complicated, unless knowing very well how things runs and have a miner friend !

Thanks for the answers and merits sent!