BitcoinMachine
BEGINNER_DOC_007 // BEGINNERS / PUBLIC-KEYS
PUBLIC
KEYS
A public key is derived mathematically from your private key. It can be shared openly with anyone without compromising your funds. It is used to verify digital signatures and, after hashing, becomes the basis of your Bitcoin address. The relationship between private and public key is one-way — you can always go forward, never backward.
PRIVATE KEY (SECRET)
E9873D79C6D87DC0FB6A5778633389F4453213303DA61F20BD67FC233AA33262 (256-bit random integer)
× G (ELLIPTIC CURVE MULTIPLICATION)
PUBLIC KEY (SAFE TO SHARE)
Uncompressed (65 bytes): 04 A point on the secp256k1 curve — two 32-byte coordinates (x, y) Compressed (33 bytes): 02 or 03 (prefix encodes whether y is even or odd) x-coordinate only (32 bytes)
The original format. Contains both the x and y coordinates of the point on the elliptic curve. Prefix byte 0x04 indicates uncompressed format.
Format: 04 <x-coordinate 32 bytes> <y-coordinate 32 bytes> Length: 65 bytes total (130 hex characters) Example: 04 79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798 483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8
Uncompressed keys are rarely used today. They produce longer addresses and waste block-space/">block space.
MODERN STANDARD
The standard format used today. Omits the y-coordinate since it can be mathematically recovered from x. Prefix 0x02 means y is even; 0x03 means y is odd.
Format: 02 or 03 <x-coordinate 32 bytes> Length: 33 bytes total (66 hex characters) Example: 0279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798 Saves 32 bytes per key — significant at scale across millions of UTXOs.
All modern wallets use compressed public keys. A compressed key produces a different address than an uncompressed key even from the same private key.

SIGNATURE VERIFICATION
Every Bitcoin node uses your public key to verify that a transaction signature was genuinely created by the corresponding private key. No key, no valid signature, no spend.
ADDRESS GENERATION
The public key is hashed (SHA-256 then RIPEMD-160) to produce a 20-byte public key hash, which is the basis of a Bitcoin address. The hash adds a privacy layer.
SHARE THE PUBLIC KEY — NEVER THE PRIVATE KEY
ONE-WAY DERIVATION · ELLIPTIC CURVE DISCRETE LOGARITHM · COMPUTATIONALLY IRREVERSIBLE
TERMINOLOGY_INDEX
Public Key
A point on the secp256k1 elliptic curve, derived from the private key. Safe to share.
Compressed
33-byte public key format storing only the x-coordinate. Prefix 02 or 03.
Uncompressed
65-byte public key format storing both x and y coordinates. Prefix 04. Legacy.
secp256k1
The elliptic curve used by Bitcoin. Generator point G is multiplied by the private key to get the public key.
HASH160
SHA-256 followed by RIPEMD-160. Applied to the public key to produce a 20-byte address hash.
Point (x, y)
A public key is a coordinate pair on the elliptic curve, representing a specific location in 2D space modulo a prime.