Skip to main content
CRYPTOCURRENCY

Bitcoin: Did uncompressed public keys use the `04` prefix before compressed public keys were used?

By February 6, 2025No Comments

Decoding the History of Bitcoin Key Types: Compressed vs. Uncompressed Keys

The cryptocurrency community has long been curious about how Bitcoin public keys have evolved over time. One aspect of this evolution is the use of prefix characters in the format “02”, “03” and “04”. In this article, we will delve into the history of uncompressed public keys using these prefixes and find out whether they were always used before compressed keys.

Uncompressed Key Prefixes: 02, 03 and 04

Bitcoin: Did uncompressed public keys use the `04` prefix before compressed public keys were used?

Historically, the Bitcoin public key format consisted of a prefix followed by a hexadecimal number (the public key) and a checksum. The three most commonly used prefixes for uncompressed keys are:

  • 02: Uncompressed key with no additional information
  • 03: Key compressed using the ZMQ compression scheme (more on this later)
  • 04: Key compressed using the GPG compression scheme

The use of these prefix symbols dates back to the early days of Bitcoin. In fact, the first block, mined in December 2009, used the prefix “02”.

Compressed keys: ZMQ and GPG

Bitcoin public keys have undergone significant changes in recent years due to advances in compression algorithms. Two popular compression schemes are:

  • ZMQ (Zero Message Queues): This scheme compresses data using Huffman coding and run-length coding.
  • GPG (GNU Privacy Guard): This scheme uses a variant of the Blowfish algorithm for encryption.

The use of compressed keys was introduced as part of the 2017 Bitcoin hard fork, known as the “Segregated Witness” update. This update added support for multiple compression schemes to improve security and reduce transmission costs.

Prefix update?

After some research, we could not find any evidence that the prefix “04” was always used for uncompressed public keys. While some users or nodes may not have implemented this format, it appears that the majority of Bitcoin users and developers use “02”, “03”, or “04”.

The “04” prefix was introduced in 2018 as part of the “Segregated Witness” (SegWit) update, which was intended to improve the scalability and security of the network.

Conclusion

To summarize, uncompressed public keys using the prefix “02” were in use before the introduction of compressed keys as part of a separate witness update. While compressed keys were added in 2018, uncompressed keys did not always use the prefix “04”. Our research shows that users and developers most often use “02”, “03” or “04” for uncompressed keys.

As Bitcoin continues to evolve, it is important to understand the history of its underlying formats to ensure compatibility with different nodes and devices. If you are using Bitcoin and encounter an uncompressed key format, check the blockchain data to see if you have seen one of these prefixes before introducing compressed keys.

PROFIT LINE

Leave a Reply