{"version":1,"id":"public-key","title":"Public Key","summary":"Public Key is a glossary term that denotes a cryptographic value derived from a private key used to verify digital signatures and to derive blockchain addresses for receiving cryptocurrency and NFTs.","content":"**A public key** is a string of letters and numbers, derived cryptographically from a private key, that a cryptocurrency wallet owner shares with others in order to receive [digital assets](https://iq.wiki/wiki/digital-assets) such as cryptocurrencies or [non-fungible tokens](https://iq.wiki/wiki/non-fungible-token-nft) (NFTs).[\\[1\\]](#cite-id-edlv5ujer7)&#x20;\n\nIt is one half of a matched pair of keys—the other being a private key that must be kept secret—used in public-key cryptography to prove ownership of funds without revealing the secret that controls them.[\\[2\\]](#cite-id-ayfp20ooox) On a [blockchain](https://iq.wiki/wiki/blockchain), the public key is used to create a public address and to verify the digital signatures that authorize transactions, while the private key does the signing.[\\[3\\]](#cite-id-lgi04ih3dv)​\n\nProviding a public key compares to sending someone an email address: it can be given out freely to anyone who wishes to send funds, and every public key address corresponds to a private key that authorizes the owner to spend from that wallet.[\\[1\\]](#cite-id-edlv5ujer7) Sharing a public key or address carries no risk to the security of funds, whereas losing the private key means permanent loss of access.[\\[2\\]](#cite-id-ayfp20ooox)​\n\n## Overview and Terminology\n\nIn everyday usage the terms public key and address are often conflated, but they are distinct objects. A public key is a large number derived directly from a private key, while an address is a shorter, hashed version of that public key designed to be easier to share and to add a layer of resistance against certain theoretical attacks.[\\[2\\]](#cite-id-ayfp20ooox)&#x20;\n\nThe full public key is not usually displayed anywhere a user can find it; wallets typically show the private key and address, and a [blockchain](https://iq.wiki/wiki/blockchain) explorer will show a public address, but not the public key itself.[\\[3\\]](#cite-id-lgi04ih3dv)​\n\nIt is a common but misleading practice to describe a public key or address as the place where cryptocurrency is stored.&#x20;\n\n​[Cryptocurrency](https://iq.wiki/wiki/cryptocurrency) is code and bits with assigned ownership rather than something physically held at a location; the address functions more like a label attached to that ownership.[\\[3\\]](#cite-id-lgi04ih3dv) When two people transact, they reveal their public addresses to each other—an address being likened to a bank account number that the sender needs in order to send funds—but the public keys themselves are never exchanged.[\\[3\\]](#cite-id-lgi04ih3dv)​\n\nThe relationship between the three items is asymmetric. Although the public key and address are both worked out from the private key, the reverse is nearly impossible: a private key cannot practically be regenerated from a public key or address.[\\[3\\]](#cite-id-lgi04ih3dv)&#x20;\n\nThis has a direct consequence for recovery. A user who loses a public key can have it recreated from the private key, but a user who loses a private key will find any [bitcoin](https://iq.wiki/wiki/bitcoin) or [altcoin](https://iq.wiki/wiki/altcoin) associated with the corresponding public address inaccessible forever, because blockchains have no central authority or password-recovery mechanism.[\\[3\\]](#cite-id-lgi04ih3dv)​[\\[2\\]](#cite-id-ayfp20ooox)​\n\n## Key Generation and Elliptic-Curve Mathematics\n\nA private key is a randomly generated number, typically 256 bits long. The size of this keyspace is what makes it secure: crypto.news quantifies it as roughly 10^77 possible values, a figure it compares to the estimated 10^80 atoms in the observable universe.[\\[2\\]](#cite-id-ayfp20ooox)&#x20;\n\nThe public key is then derived from this private key using elliptic curve multiplication—multiplying the private key by a fixed generator point on the curve. This is a one-way function: fast to compute in the forward direction but practically impossible to reverse, because doing so would require solving the elliptic curve discrete logarithm problem, for which there is no known efficient solution.[\\[2\\]](#cite-id-ayfp20ooox)&#x20;\n\nInvestopedia similarly describes the private key being sent through a hashing function—usually, it says, an elliptical curve function—to create the public key.[\\[3\\]](#cite-id-lgi04ih3dv)​\n\nBoth [Bitcoin](https://iq.wiki/wiki/bitcoin) and [Ethereum](https://iq.wiki/wiki/ethereum) use the same elliptic curve, known as secp256k1. According to crypto.news, this curve produces 256-bit private keys and 512-bit uncompressed public keys, or 257-bit compressed public keys.[\\[2\\]](#cite-id-ayfp20ooox)&#x20;\n\nA public key can be stored in two forms. An uncompressed public key is 65 bytes: a 1-byte prefix of 0x04 followed by 32 bytes for the x coordinate and 32 bytes for the y coordinate. A compressed public key is 33 bytes: a 1-byte prefix of 0x02 for an even y value or 0x03 for an odd y value, followed by the 32-byte x coordinate, with the prefix encoding the parity of y so that the y value can be reconstructed.[\\[2\\]](#cite-id-ayfp20ooox)&#x20;\n\nInvestopedia states that an Ethereum public key is 64 bytes, or 128 characters in hexadecimal format, and that on Ethereum the public key is generated automatically by the wallet.[\\[3\\]](#cite-id-lgi04ih3dv)​\n\nThe choice of compression format has a practical consequence. Compressed and uncompressed public keys derived from the same private key produce different Bitcoin addresses, so importing a private key into a wallet that uses a different compression format than the original will generate a different address.[\\[2\\]](#cite-id-ayfp20ooox)​\n\n## Address Derivation\n\nBecause a raw public key is long and, on some chains, best kept off the ledger until needed, wallets hash it into a shorter address before it is shared. Beyond the convenience of a shorter string, an address that has never been used to send a transaction has not yet exposed its public key on-chain, which crypto.news describes as a theoretical layer of protection against future quantum attacks.[\\[2\\]](#cite-id-ayfp20ooox)​\n\nThe two major networks derive addresses differently. On [Bitcoin](https://iq.wiki/wiki/bitcoin), the public key is passed through the SHA-256 hashing algorithm and then RIPEMD-160 to produce a 160-bit hash; a version byte is prepended, a checksum is appended, and the result is encoded in Base58Check format, producing a final address that can begin with 1, 3, or bc1.[\\[2\\]](#cite-id-ayfp20ooox)&#x20;\n\nInvestopedia gives a compatible account, noting that when a public key is first created it is a long string that must be compressed and shortened, and that on Bitcoin two zeros are added and the result is sent through Base58Check to be encoded further.[\\[3\\]](#cite-id-lgi04ih3dv)​\n\nOn [Ethereum](https://iq.wiki/wiki/ethereum), the public key is run through the Keccak-256 hash function and the last 20 bytes—160 bits—of the resulting hash are taken as the address, with a \"0x\" prefix added and, optionally, an EIP-55 checksum.[\\[2\\]](#cite-id-ayfp20ooox) Investopedia describes this as Ethereum using the last 20 bytes of the public key and adding 0x to the front.[\\[3\\]](#cite-id-lgi04ih3dv) Ethereum uses uncompressed public keys internally but strips the prefix byte during derivation, using only the 64-byte x and y values.[\\[2\\]](#cite-id-ayfp20ooox)​\n\n## Security and Randomness Failures\n\nThe security of any key pair depends entirely on the quality of the randomness used to generate the private key. Weak or predictable randomness has repeatedly allowed attackers to recover private keys, and crypto.news documents several real-world failures.[\\[2\\]](#cite-id-ayfp20ooox)&#x20;\n\nIn July 2026, researchers discovered that the Coldcard hardware wallet had been generating weak private keys for five years because a build flag in the firmware instructed the device to skip its dedicated hardware randomness chip. After an attacker reverse-engineered the weakness, wallet-draining began on July 30, 2026, emptying approximately $116 million in bitcoin before the vulnerability was publicly disclosed.[\\[2\\]](#cite-id-ayfp20ooox)​\n\nEarlier incidents followed the same pattern. In 2013, the Android SecureRandom vulnerability caused multiple [Bitcoin](https://iq.wiki/wiki/bitcoin) wallets to generate duplicate random numbers, which enabled attackers to compute private keys from transaction signatures.[\\[2\\]](#cite-id-ayfp20ooox) In September 2022, the Profanity vanity-address generator was exploited when researchers found that its key generation used only a 32-bit seed, reducing the effective keyspace from 2^256 to 2^32—about four billion possibilities—which could be brute-forced in minutes.[\\[2\\]](#cite-id-ayfp20ooox)​\n\nTo mitigate such risks, crypto.news recommends using reputable hardware wallets with true random number generators, along with options for users to add their own entropy through methods such as dice rolls or coin flips.&#x20;\n\nAdditional practical recommendations include never sharing private keys or [seed phrases](https://iq.wiki/wiki/seed-phrase); verifying an address format and visually confirming its first and last characters to counter clipboard malware that swaps addresses; researching a hardware manufacturer's track record on entropy; and keeping multiple secure backups of a seed phrase, including metal backups for environmental resistance.[\\[2](#cite-id-ayfp20ooox)​\n","categories":[{"id":"glossary","title":"glossary"}],"tags":[],"images":[{"id":"QmWeP5c1fvnSK2VqVYxQ3ksDb1tqELt7D4wet93JJMKkio","type":"image/jpeg, image/png"}],"media":[],"metadata":[{"id":"references","value":"[{\"id\":\"edlv5ujer7\",\"url\":\"https://help.coinbase.com/en/coinbase/getting-started/crypto-education/glossary/public-key\",\"description\":\"Coinbase glossary definition of a public key\",\"timestamp\":1789558251615},{\"id\":\"ayfp20ooox\",\"url\":\"https://crypto.news/what-is-a-public-key-crypto-keys-signatures-explained/\",\"description\":\"crypto.news on public and private key pairs\",\"timestamp\":1789558251615},{\"id\":\"lgi04ih3dv\",\"url\":\"https://www.investopedia.com/terms/p/public-key.asp\",\"description\":\"Investopedia definition of public key on a blockchain\",\"timestamp\":1789558251615}]"},{"id":"commit-message","value":"Create Public Key wiki"}],"events":[{"type":"DEFAULT","title":"Investopedia article update","date":"2024-06-01","description":"Investopedia updated its glossary entry for \"public key\".","link":null,"multiDateStart":null,"multiDateEnd":null,"id":"91fa832b-153a-4f6b-85aa-c57e4fc8a8af"},{"type":"DEFAULT","title":"Coldcard key-generation vulnerability exploitation","date":"2026-07-01","description":"Exploitation of a Coldcard hardware wallet key-generation vulnerability affecting public-key security.","link":null,"multiDateStart":null,"multiDateEnd":null,"id":"2f8b8535-0de1-48e9-a13e-3953da8a08ba"},{"type":"DEFAULT","title":"crypto.news explainer published","date":"2026-08-01","description":"crypto.news published an explainer article on public keys.","link":null,"multiDateStart":null,"multiDateEnd":null,"id":"0aa04fcc-4983-4745-83da-92aa19e7f52d"}],"linkedWikis":{"founders":[],"blockchains":[],"speakers":[]},"user":{"id":"0x8af7a19a26d8fbc48defb35aefb15ec8c407f889"},"author":{"id":"0x212Cb3F4aE6611054637f9f78F18fB628AD258bb"},"language":"en","operator":{"id":"0x212Cb3F4aE6611054637f9f78F18fB628AD258bb"}}