Author

Topic: compressed and uncompressed addresses (Read 263 times)

legendary
Activity: 3472
Merit: 4801
February 11, 2024, 08:42:27 PM
#18
I've recently discovered that Bitcoin addresses come in two types:- compressed and uncompressed addresses.

There are more types than that. There are also P2SH, SegWit, and custom Txout-Scripts

But then how can we identify compressed and uncompressed addresses?
Just from the address itself?  You can't.  You'll need additional information, such as public key

Why do we have the two formats?
Uncompressed came first. Then software programmers realized they could use less bytes to make the transactions (and therefore pay less transaction fees) if they used compressed public keys.

Is there a possibility that there may be a new format in the future
Absolutely.  There are already several more. I'm confident there will eventually be even more than we have now.

and is there an advantage to using one over the other?
Yes. Compressed public keys require less bytes in the transaction.

However, I've learned that although sending Bitcoin from a legacy address to a SegWit address isn't possible
This is not true.  It as long as you can satisfy the requirements of the Txout-script (which generally means as long as your wallet software has the private kay and is designed to be able to generate the correct Txin-script and signature), you can spend the funds from any address type.  There are no limitations on which scipts are used for the inputs or outputs of a transaction.

Well that's Strange, cos I know I tried it sending Bitcoin from a Legacy address to a SegWit address, and I'm pretty sure it didn't go through.
Perhaps you included insufficient transaction fee?  Perhaps you were using old software that didn't know how to send to a SegWit address? Perhaps you typed the address in incorrectly? Perhaps you didn't have access to the private key for the "Legacy address"? There are MANy things that could have gone wrong. Without more details of exactly what happened, it's going to be difficult to say exactly why it happened.

By cheaper transactions do you mean on the blockchain network?
That's a strange way to phrase a question. I'm not sure what you're trying to ask, but in this discussion cheaper transactions means you don't have to pay as many bitcoins in transaction fees for your bitcoin transaction to be confirmed quickly.  Confirmation time typically depends on the amount you pay PER BYTE, so if there are less bytes to pay for, then the total cost is reduced.

Therefore a legacy address is uncompressed and a SegWit address is compressed. Correct?
SegWit is a completely different type of address than people are typically talking about when they talk about "compressed addresses".  SegWit has several benefits over the original transaction formats. One of those benefits results in reduce the cost of the transaction.

member
Activity: 168
Merit: 77
February 11, 2024, 05:24:21 PM
#17
I believe the wallet I used was called the Mycelium Wallet, that was the first time I tried using the wallet and I can't tell the reason the transaction as wasn't successful

Mycelium should work to send and receive BTC to or from segwit(bech32) BTC address you might be using the old version of Mycelium wallet which is why it wasn't successful when you are trying to send BTC and Mycelium wallet is very problematic it always disconnected from mycelium server or sometimes stuck on syncing so maybe on that time when you are sending BTC from Mycelium wallet the server is offline that is why the transaction fail to broadcast.
I suggest switch to a better wallet like Electrum because Mycelium had this issue since before.

Yeah I already switched to Electrum. My experience with Mycelium was a long time ago I noticed the inconveniences the wallet gave and so I had to switch to a more secure and better wallet.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
February 11, 2024, 04:55:10 PM
#16
I believe the wallet I used was called the Mycelium Wallet, that was the first time I tried using the wallet and I can't tell the reason the transaction as wasn't successful

Mycelium should work to send and receive BTC to or from segwit(bech32) BTC address you might be using the old version of Mycelium wallet which is why it wasn't successful when you are trying to send BTC and Mycelium wallet is very problematic it always disconnected from mycelium server or sometimes stuck on syncing so maybe on that time when you are sending BTC from Mycelium wallet the server is offline that is why the transaction fail to broadcast.
I suggest switch to a better wallet like Electrum because Mycelium had this issue since before.
member
Activity: 168
Merit: 77
February 11, 2024, 01:59:24 PM
#15
You are wrong.
You can send bitcoin from any type of address to any type of address you want. This means that you can send bitcoin from segwit address to legacy address and vice versa.

Well that's Strange, cos I know I tried it sending Bitcoin from a Legacy address to a SegWit address, and I'm pretty sure it didn't go through.

Well, it's even more strange that you don't provide any details from which wallet you tried your transfer where it "didn't go through" as you remember. It's also open for interpretation what you mean by "didn't go through". Could be from showing an error to too low or otherwise unsuitable transaction fees that prevented the transaction to be finalised.
While I know that @hosseinimr93 is right, I can only assume that you tried your transfer from some braindead (online?) wallet that doesn't support withdrawal or sending to native segwit addresses. There may still be services out there that don't support native segwit addresses and I'd rather choose to avoid such underdeveloped things.

I believe the wallet I used was called the Mycelium Wallet, that was the first time I tried using the wallet and I can't tell the reason the transaction as wasn't successful
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
February 11, 2024, 12:54:18 PM
#14
You are wrong.
You can send bitcoin from any type of address to any type of address you want. This means that you can send bitcoin from segwit address to legacy address and vice versa.

Well that's Strange, cos I know I tried it sending Bitcoin from a Legacy address to a SegWit address, and I'm pretty sure it didn't go through.

Well, it's even more strange that you don't provide any details from which wallet you tried your transfer where it "didn't go through" as you remember. It's also open for interpretation what you mean by "didn't go through". Could be from showing an error to too low or otherwise unsuitable transaction fees that prevented the transaction to be finalised.
While I know that @hosseinimr93 is right, I can only assume that you tried your transfer from some braindead (online?) wallet that doesn't support withdrawal or sending to native segwit addresses. There may still be services out there that don't support native segwit addresses and I'd rather choose to avoid such underdeveloped things.
legendary
Activity: 2114
Merit: 2248
Playgram - The Telegram Casino
February 05, 2024, 08:19:21 AM
#13
By cheaper transactions do you mean on the blockchain network?
Yes, the fees you pay to get your transaction added to a block at a certain time is cheaper when using a compressed address.
Almost all addresses by default today are compressed.

Therefore a legacy address is uncompressed and a SegWit address is compressed.
Legacy addresses can be compressed or uncompressed, but by default today, they are mostly compressed and that's the recommended version.
legendary
Activity: 2310
Merit: 4085
Farewell o_e_l_e_o
February 04, 2024, 09:36:27 PM
#12

Uncompressed public keys: Prefix 0x04
Compressed public keys: Prefix 0x02 or 0x03

Quote
When Bitcoin was first authored, its developers only knew how to create 65-byte public keys. However, a later developer became aware of an alternative encoding for public keys that used only 33 bytes and which was backward compatible with all Bitcoin full nodes at the time, so there was no need to change the Bitcoin protocol.

Those 33-byte public keys are known as compressed public keys, and the original 65-byte keys are known as uncompressed public keys.
legendary
Activity: 2492
Merit: 1232
February 04, 2024, 06:57:31 PM
#11
Therefore a legacy address is uncompressed and a SegWit address is compressed. Correct?
IMO, that's not how it works and it's not correct.
AFAIK legacy addresses can be either compressed or uncompressed and the compression is related to how the public key is represented rather than the address type.  Both compressed and uncompressed public keys can be used to generate legacy addresses that start with "1."

Both legacy and SegWit address types can accommodate compressed or uncompressed public keys.
As I see as of now on new Bitcoin wallet applications they used this "compressed public keys" by default due to their efficiency advantages, but it's not a strict rule dictated by the address type.
legendary
Activity: 2380
Merit: 5213
February 04, 2024, 06:46:10 PM
#10
By cheaper transactions do you mean on the blockchain network?
The fee you pay for sending bitcoin from an uncompressed address is slightly smaller than the fee you pay for sending bitcoin from a compressed address.


Therefore a legacy address is uncompressed and a SegWit address is compressed. Correct?
First note that when we say "uncompressed address", we mean that the address has been derived from an uncompressed public key and when we say "compressed address", we mean that the address has been derived from a compressed public key.

You can generate different legacy addresses using each of compressed and uncompressed formats of your public key. They are both standard and you can use each of them. It's recommended to use the compressed address.

When it comes to bech32 addresses, you can still generate different addresses using each of compressed and uncompressed formats of your public key, but the one that is generated from the uncompressed public key would be non-standard and it would be very difficult to spend fund from that.
hero member
Activity: 1120
Merit: 887
Livecasino.io
February 04, 2024, 06:27:12 PM
#9
Compressed keys are a result of improvements to make transactions cheaper, same improvements that led to SegWit addresses. All addresses now are compressed pretty much.
By cheaper transactions do you mean on the blockchain network? Therefore a legacy address is uncompressed and a SegWit address is compressed. Correct?
member
Activity: 168
Merit: 77
February 04, 2024, 06:21:59 PM
#8
However, I've learned that although sending Bitcoin from a legacy address to a SegWit address isn't possible but it is possible to send Bitcoin from a SegWit address to a legacy address, and I haven't figured out why.
You are wrong.
You can send bitcoin from any type of address to any type of address you want. This means that you can send bitcoin from segwit address to legacy address and vice versa.

Well that's Strange, cos I know I tried it sending Bitcoin from a Legacy address to a SegWit address, and I'm pretty sure it didn't go through.
legendary
Activity: 2380
Merit: 5213
February 04, 2024, 06:19:02 PM
#7
However, I've learned that although sending Bitcoin from a legacy address to a SegWit address isn't possible but it is possible to send Bitcoin from a SegWit address to a legacy address, and I haven't figured out why.
You are wrong.
You can send bitcoin from any type of address to any type of address you want. This means that you can send bitcoin from segwit address to legacy address and vice versa.
member
Activity: 168
Merit: 77
February 04, 2024, 05:55:54 PM
#6
You are referring to legacy bitcoin addresses. Addresses that start from 1.

For the address that is not compressed, its public key will start from 04, while its private key will start from 5.
For compressed, its public key start from 02 or 03, while its private key starts from K or L.

Compressed legacy address has low fee than legacy address that is not compressed.

But for low fee, do not use legacy addresses, use segwit addresses. Addresses that start from bc1.

Sure, SegWit addresses that begin with "bc1" are typically more effective and have cheaper fees than legacy addresses. However, I've learned that although sending Bitcoin from a legacy address to a SegWit address isn't possible but it is possible to send Bitcoin from a SegWit address to a legacy address, and I haven't figured out why.
legendary
Activity: 2380
Merit: 5213
February 04, 2024, 04:49:11 PM
#5
We have compressed and uncompressed addresses, because the public key can be either compressed or uncompressed.
When bitcoin addresses were introduced for the first time, they were all derived from uncompressed public keys. In 2012, it was decided to generate addresses from compressed public keys to decrease the transaction size.

An uncompressed public key includes 130 characters, while a compressed public key includes 66 characters and takes less space.

But then how can we identify compressed and uncompressed addresses?
If the address is yours, you can know that with checking the public key or the private key.
If there's outgoing transaction from the address, you can know whether the address is compressed or uncompressed with checking the raw transaction.

If the address is not yours and there's no outgoing transaction from the address, there is no way to know whether it's compressed or uncompressed.
legendary
Activity: 2114
Merit: 2248
Playgram - The Telegram Casino
February 04, 2024, 04:03:32 PM
#4
Why do we have the two formats? Is there a possibility that there may be a new format in the future and is there an advantage to using one over the other?
Compressed keys are a result of improvements to make transactions cheaper, same improvements that led to SegWit addresses. All addresses now are compressed pretty much.

There is no advantage to using uncompressed addresses at this time.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
February 04, 2024, 04:03:12 PM
#3
Bitaddress generates two types of bitcoin addresses the compress and uncompress address which starts with 1.

I don't know if there is a way to know if the address is compressed or uncompressed but if you have a private key you can know what is the uncompressed or compressed version of the BTC address using the tool called key compression from iancoleman link below that's the only way that I can confirm if the address is compressed or uncompressed.

- https://iancoleman.io/bitcoin-key-compression/

Based on a bit of research if you can get the public key of that address the one that starts in 04 is an uncompressed address and the 02 and 03 is the compressed version of your address.
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
February 04, 2024, 03:35:22 PM
#2
You are referring to legacy bitcoin addresses. Addresses that start from 1.

For the address that is not compressed, its public key will start from 04, while its private key will start from 5.
For compressed, its public key start from 02 or 03, while its private key starts from K or L.

Compressed legacy address has low fee than legacy address that is not compressed.

But for low fee, do not use legacy addresses, use segwit addresses. Addresses that start from bc1.
hero member
Activity: 1120
Merit: 887
Livecasino.io
February 04, 2024, 03:32:06 PM
#1
I've recently discovered that Bitcoin addresses come in two types:- compressed and uncompressed addresses. But then how can we identify compressed and uncompressed addresses? Why do we have the two formats? Is there a possibility that there may be a new format in the future and is there an advantage to using one over the other?

Jump to: