Back

What are Public and Private Keys, and How Do They Work with Bitcoin Wallets?

General Wallet Use

15 min

Bitcoin wallets – like any other crypto wallet – rely on public and private key cryptography to ensure secure storage and digital asset transactions. At their core, wallets use key pairs to authenticate a user’s identity, sign off on transactions, and protect users’ assets.


Understanding public and private keys is crucial for wallet users since they serve as the literal keys to your assets. User access to blockchain technology and blockchain networks heavily relies on wallets which, in turn, hinges on public key cryptography and key encryption methods.

A Primer on Key Pairs: Public Keys vs Private Keys in Crypto


When you sign up for a wallet, the application you’re using will generate a key pair for you that consists of two types of keys: a public and private key. These two keys are generated using public-key cryptography, which is also known as asymmetric cryptography. PKC is used in crypto to encrypt and decrypt transactions.


This key pair enables the very basic functions of a wallet. The private key is used to digitally sign transactions and prove ownership of funds while the public key acts like a deposit address of sorts.


Without the asymmetric encryption involved with private-public key pairs, users wouldn’t have a way to validate transactions or definitively prove that they own their assets. By leveraging asymmetric encryption, Bitcoin wallets can provide user-friendly experiences while maintaining the security inherent on the Bitcoin blockchain.

How Do Public Keys Work?


Public keys are derived from private keys using complex mathematical and cryptographic transformations. Public keys allow users to receive transactions, making them comparable to account numbers.


You can share your public key freely. Users that are conducting a transaction with you can refer to this key (usually in the form of a wallet address, which is a more readable form of your public key) when they send and trade assets, and your private key will never be uncovered. Transactions will use the public key to confirm that the digital signature generated by your private key matches the sending address.

How Do Private Keys Work?


While the public key can be shared with other users, private keys must absolutely be secured and remain secret only to the user. They usually take the form of a very long and randomly generated sequence of numbers of words that are unique to each address. The private key helps users prove that they own the assets involved in a transaction and authorize the transaction itself.


Private keys should never be shared with anyone. If someone gets access to your private key – that’s your Secret Key, if you’re a Leather user – they also have direct access to your assets. That means they can use the BTC or other Bitcoin-backed assets for whatever purpose they see fit.


It’s important to remember that private keys represent a user’s ownership and over their funds. The moment your private key is shared with someone else, you essentially give up control of your assets. Additionally, a private key isn’t like a password – it can’t be changed even if it gets compromised or lost.

Not Your Keys, Not Your Coins


For those reasons, you need to keep your private key secured. Your private key should never exist in digital form on any insecure systems, and only you should be able to access it.


Some of the best ways to secure private keys include using a hardware wallet, storing keys offline in “cold” storage, and providing extra protection for your backup method. Hardware wallets usually offer excellent private key protections by keeping the keys in encrypted physical devices offline. Often, you can also encrypt the wallet file with a strong password that prevents the unencrypted private key from being extracted (an external party would have to decrypt the file).


Many users also store the key completely offline on external media or paper backups. These backups are often, in turn, sealed in a secure location that only the user can access like a safe.


When you create a new wallet with Leather, you’re given a randomly generated series of 24 words as your Secret Key. Before you can finish creating your account, you’ll be asked to back up your Secret Key to safeguard the account. We encourage our users to also read the Cryptocurrency Security Standards guidelines for key storage, which unpacks the requirements for least (Level I) to most secure (Level III) key storage options.


Sometimes, users are given ways to retrieve their private keys should they ever lose them. Self-custodial wallets like Leather, however, leave private key storage entirely up to the user. In Leather’s case, this means that if users lose their Secret Key they, alone, are responsible for its retrieval.

Public and Private Key Pairs: The Foundation of Bitcoin Wallets


Public and private key pairs are the basis for wallet users to securely interact with the network. Private keys denote ownership and the right to conduct transactions with a user’s digital assets while public keys allow users to receive payments.


Managing these keys – the private key, in particular – is critical for users to protect their digital assets. As BTC gains more and more traction in Web3, understanding how public-private key pairs work is becoming increasingly important.


Connect to web3 applications built on Bitcoin with the Leather browser extension. Install Leather – the only wallet you need to tap into the multilayered Bitcoin economy – today.