header banner
Default

What is a private key, how it functions, and which ways are best to store it?


What Is a Private Key?

A private key is an alphanumeric code used in cryptography, similar to a password. In cryptocurrency, private keys are used to authorize transactions and prove ownership of a blockchain asset.

A private key is an integral part of cryptocurrency, and its encrypted properties help to protect a user from theft and unauthorized access to their funds.

Key Takeaways

  • A private key is a code used in cryptography and cryptocurrency.
  • A private key is a large alphanumeric code with hundreds of digits.
  • A cryptocurrency wallet consists of a set of public addresses and private keys. Anyone can deposit cryptocurrency in a public address, but funds cannot be removed from an address without the corresponding private key.
  • Private keys represent the final control and ownership of cryptocurrency. If your keys are stolen or lost, your crypto is gone.

Investopedia / Jessica Olah

How Private Keys Work

Cryptocurrency is controlled through a set of digital keys and addresses, representing ownership and control of virtual tokens. Anyone can deposit bitcoin or other tokens in any public address. However, the recipient must have the unique private key to access any deposited crypto.

Private keys can take a few different forms. In ordinary, base-ten notation, a private key would be hundreds of digits long–so long that it would take thousands of years to crack a private key by brute force. For simplicity, private keys are usually expressed as a string of alphanumeric characters.

While hashing a public address from a private key is trivial, the reverse is almost impossible. Modern hardware and software are not capable of cracking encrypted keys.

The public key is created from the private key through an encryption algorithm. However, it is nearly impossible to reverse the process by generating a private key from a public one. A similar algorithm is then used to create a receiving address from the public key. Think of the address as a locked mailbox and the private key as the key to the box.

The mail carrier and anyone else can insert letters and small packages through the opening in the mailbox. However, the only person who can retrieve the mailbox's contents is the one with the unique key. Therefore, it is essential to keep the key safe—if it is stolen or lost, the mailbox can be opened by anyone with the key.

Private Keys and Digital Wallets

While private keys are essential to cryptocurrency, users don't need to manually create or remember their key pairs. Instead, digital wallets automatically create key pairs and store them. When a transaction is initiated, the wallet software creates a digital signature by processing the transaction with the private key.

The private key is used to authorize a transaction and ensures that it cannot be changed once it's broadcast. If the transaction information is altered, even slightly, the signature will be incorrect because the algorithm generates the same key from identical information.

If a user loses their private key, they can no longer access the wallet to spend, withdraw, or transfer coins. It is, therefore, imperative to save the private key in a secure location. There are several ways private keys can be stored. They can be written or typed on paper—these are called paper wallets. Some people use software that generates QR codes to print on paper so they can easily be scanned when a transaction needs to be signed.

Private keys can be stored using a hardware wallet that uses smartcards, USB, or Bluetooth-enabled devices to secure your private keys offline.

There are two types of key storage, each with two types of wallets. Custodial wallets are wallets where someone else, like an exchange, stores your keys for you. Noncustodial wallets are wallets where you store your keys. Both types have cold (has no connection to the internet) and hot (has an internet connection) wallets.

An example of a custodial cold wallet is the storage Coinbase uses for keys. You move your keys from cold storage to your Coinbase hot wallet when you want to use them. A noncustodial cold wallet example is the Ledger Nano X, which you use to connect to a device with the software wallet of your choice, which is a noncustodial hot wallet.

How Do Private Keys Work?

VIDEO: How Public and Private Key Work In Your Crypto Wallets
CoinGecko

A private key is a long alphanumeric code that acts similarly to a password. Private keys are used to authorize cryptocurrency transactions. Your private key is generated by your wallet and is used to create your public key (your wallet address) using encryption.

What Is the Best Way to Store Private Keys?

VIDEO: How To Store Private Keys Safely
The Bitcoin Express

Private keys should be kept in noncustodial cold storage until you are going to use them. This ensures there is no way for hackers to access them because there is no connection. If you're going to use your keys, transfer only what you need to your wallet, use the keys, and transfer them back to cold storage.

Should You Trust a Custodial Wallet?

VIDEO: The Secrets of Bitcoin Wallets and Private Keys
Bitcoin University

A custodial wallet is a third-party service that allows users to store cryptocurrency like money is held in a bank. This allows users to skip private key storage, relying instead on the technological expertise of the company offering the service. However, there are tradeoffs. Custodial wallets are often targets for hackers or phishing scams and can also be seized or frozen by legal authorities. The best solution is to determine what type of wallet fits your risk tolerance and technological abilities.

The Bottom Line

In cryptocurrency, private keys are codes similar to passwords you use to authorize crypto transactions. These keys are the only way someone can gain access to your crypto, so it's essential to safeguard them using the latest and most reliable storage techniques available. In 2023, the best way to safeguard your keys is to use noncustodial cold storage, a method that removes your keys from accessible devices and connected wallets.

Investing in cryptocurrencies and other Initial Coin Offerings (“ICOs”) is highly risky and speculative, and this article is not a recommendation by Investopedia or the writer to invest in cryptocurrencies or other ICOs. Since each individual's situation is unique, a qualified professional should always be consulted before making any financial decisions. Investopedia makes no representations or warranties as to the accuracy or timeliness of the information contained herein. As of the date this article was written, the author does not own cryptocurrency.

Sources


Article information

Author: Carrie Williams

Last Updated: 1703896682

Views: 916

Rating: 4 / 5 (97 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Carrie Williams

Birthday: 2012-11-24

Address: 92390 Jennifer Wells, West Williamfort, VT 86409

Phone: +4361638886585356

Job: Article Writer

Hobby: Running, Skydiving, Coffee Roasting, Wine Tasting, Puzzle Solving, Surfing, Reading

Introduction: My name is Carrie Williams, I am a dazzling, unswerving, proficient, candid, fearless, spirited, skilled person who loves writing and wants to share my knowledge and understanding with you.