Introduction to Public Keys
In Bitcoin, a public key is a point on the secp256k1 elliptic curve represented as coordinates (x, y). For example, the hexadecimal public key:
04d061e9c5891f579fd548cfd22ff29f5c642714cc7e7a9215f0071ef5a5723f691757b28e31be71f09f24673eed52348e58d53bcfd26f4d96ec6bf1489eab429d
Translates to:
- x:
0xd061e9c5891f579fd548cfd22ff29f5c642714cc7e7a9215f0071ef5a5723f69 - y:
0x1757b28e31be71f09f24673eed52348e58d53bcfd26f4d96ec6bf1489eab429d
These coordinates must satisfy the elliptic curve equation: y² = x³ + 7 (modulo the curve’s finite field).
👉 Learn more about elliptic curve cryptography
Why Do the Coordinates Satisfy the Equation?
The Bitcoin curve (secp256k1) operates within a finite field defined by prime Pcurve. Verification in Python:
Pcurve = 2**256 - 2**32 - 2**9 - 2**8 - 2**7 - 2**6 - 2**4 - 1
x = 0xd061e9c5891f579fd548cfd22ff29f5c642714cc7e7a9215f0071ef5a5723f69
y = 0x1757b28e31be71f09f24673eed52348e58d53bcfd26f4d96ec6bf1489eab429d
assert (x**3 + 7) % Pcurve == (y**2) % PcurveSmaller Example (Finite Field 𝔽₂₃):
For y² = x³ + 7 mod 23, the equation must hold: ((x³) + 7) % 23 == (y²) % 23.
Types of Public Keys
Uncompressed Public Key
- Format:
04(prefix) +x+y - Example:
04d061e9c5891f579fd548cfd22ff29f5c642714cc7e7a9215f0071ef5a5723f691757b28e31be71f09f24673eed52348e58d53bcfd26f4d96ec6bf1489eab429d
- Format:
Compressed Public Key
Format:
02+x(ifyis even)03+x(ifyis odd)
- Example (since
yends in0xd, odd):03d061e9c5891f579fd548cfd22ff29f5c642714cc7e7a9215f0071ef5a5723f69
👉 Explore Bitcoin key generation
Bitcoin Address Examples
Same private key generates different addresses for compressed vs. uncompressed keys:
| Key Type | Address Formats |
|---|---|
| Uncompressed | 14xfJr1DArtYR156XBs28FoYk6sQqirT2s |
35egEPVeimCvWAmXeHXcYtAUtdA8RtsNUY | |
| Compressed | 1ASfqPzBTfPSBA9DWdHYYNk4qM5NoGNtzL |
3B8gkwUd1ZhpGKqedix8y16zysN6QWqQxS |
FAQs
Q1: Why use compressed public keys?
A1: They save space (33 bytes vs. 65 bytes) and are now the standard, reducing blockchain bloat.
Q2: Do compressed/uncompressed keys affect security?
A2: No—both derive from the same private key and offer identical security.
Q3: How can I convert between key formats?
A3: Use cryptographic libraries (e.g., OpenSSL) to recompute y from x via the curve equation.
Q4: Are uncompressed keys still used?
A4: Rarely. Most modern wallets default to compressed keys for efficiency.
Key Terms
- secp256k1: Bitcoin’s elliptic curve.
- Finite Field (
Pcurve): A prime-modulo space for curve arithmetic.- Public Key Formats: Compressed (
02/03), Uncompressed (04).
For further reading:
👉 Bitcoin key mechanics
---
**Notes**:
- Removed years from the title and cleaned the header.
- Added SEO keywords: *Bitcoin public key, secp256k1, compressed vs. uncompressed key, elliptic curve cryptography*.
- Structured content with logical headings and FAQs.
- Embedded anchor texts for engagement.