Everything You Wanted to Know About Wallet Keys (2024)

Blog

Learn

Everything You Wanted to Know About Wallet Keys

By

Yoni Goldberg

Everything You Wanted to Know About Wallet Keys (1)

August 5, 2022

Introduction

At heart, a crypto wallet is a UI layer on top of your public and private keypair and abstracts the interface to access the blockchain. This keypair serves as your “passport” through the web3 ecosystem. You’ve probably heard catchphrases like “not your keys, not your coins” which hint towards the importance of these keys and their ownership, but what are they actually? How do they work, and where do they come from? How do they guarantee your identity on the blockchain?

This blog post will take a deep dive into the technicalities of keys (and wallets) to understand the mathematics and cryptography that underpin them.

Everything You Wanted to Know About Wallet Keys (2)

Public-Key Cryptography Basics

To understand what a wallet actually is, you first need to understand public key cryptography. Public-key cryptography (also called asymmetric cryptography) is a type of cryptosystem for secure data transmission that gives every user two keys – a public key known to everyone and a hidden private key.

The canonical example (which is inverse in crypto) of how these keys are used is that Alice wants to send a message for Bob’s eyes only. To do this, Alice encrypts the message using Bob’s widely available public key. Bob then uses his private key to decrypt the message.

Popular public-key cryptography algorithms that can create keypairs and encrypt/decrypt messages include modular exponentiation-based RSA. RSA is one of the most popular algorithms employed and uses large primes to generate key pairs.

Generating the Keys

When you create a new self-custodial wallet, you generate a new private key, then compute the public key from the private key. The wallet serves as a UI on top of your keys.

While the process of deriving the keypairs and addresses is standardized, blockchains may differ in the operations applied to the private keys. The details described below pertain to Ethereum.

Generating the Private Key

The private key is a randomly generated 256-bit number; there are roughly equivalent private key addresses as there are atoms in the universe. The operating system or wallet application dictates the randomness of the private key — it is crucial to have sufficient entropy in a private key generation, so the number generated is not predictable.1

Generating the Public Key

The public key is then derived from the private key using the Elliptic Curve Digital Signature Algorithm (ECDSA), a variant of DSA. Ethereum, like Bitcoin, uses the elliptic curve parameter secp256k1 as defined by the National Institute of Standards and Technology (NIST).

Everything You Wanted to Know About Wallet Keys (3)

Generating the Ethereum Address

Once the public key is calculated, the one-way function Keccak-256 is applied, and the 160 right-most hash output bits are used as the Ethereum address. The address is often prefixed with 0x to indicate they are in hexadecimal format.

Public Key vs. Ethereum Address

Note that the Ethereum address is not the same as the public key. The Ethereum address, which is a hash of the public key, is the alphanumeric string that users disseminate to receive funds. While the Ethereum address is available on every transaction, the public key can be derived from the values in the transaction header, which can be used to verify the authenticity of the signature.

Key Storage in Wallets

Once the keys have been generated, they must be securely stored to prevent theft. The early bitcoin crypto wallets stored the private key in a local ‘wallet.dat’ file. More modern wallets provide more robust storage solutions by exporting keys to secure cloud storage systems or integrating with a hardware wallet like Ledger to provide access to funds.

The private keys, meanwhile, are often further encrypted/hashed. Centralized exchanges like Coinbase store your private keys on their servers, while for modern self-custodial wallets like MetaMask that are browser-based, the private keys are kept in the browser’s data store.

Master Seed and Recovery Pharse

Most wallets ask users to keep the recovery phrase in a safe place, usually offline. This phrase, which consists of 12-24 words which in specific order can map to the “Master seed”. The master seed is a randomly generated 256 bits, that can be used to derive an infinite number of private keys. This is how wallets can generate many accounts, each with their own private/public keys, while still allowing you to restore all of them with one recovery phrase.

Signing Transactions

With the keys stored safely in your wallet, they can now be used to “sign transactions” and otherwise participate in the web3 economy.

This works in sort of an inversion of the Alice-Bob message encryption example. To “sign” a transaction on the blockchain, the user puts the transaction and their private key into a mathematical function that spits out the signature.

The signing algorithm uses a temporary private key and the transaction data to produce two outputs, commonly called r and s. This signature is then appended to the transaction message. To verify that a user signed the message, any third-party verifier can use the inverse of the signature generation function that takes in the transaction data, the user’s public key, and the two signature values to output a return value q. The transaction is valid if q is equal to the signature value r.

Of course, wallet users will never personally have to call any functions – the inner technical details of transaction signing are abstracted away by the wallet UI.

Final thoughts

At its core, a wallet is a program that generates a public/private key pair for you and signs and encrypts messages using them. In a departure from the traditional understanding of wallets, crypto wallets do not actually store your crypto assets; they just secure the assets stored in the blockchain and restrict their access.

The difference between a custodial wallet like Coinbase and a self-custodial wallet like MetaMask is that custodial wallets have access to and take care of your private key, while with self-custodial wallets, you’re responsible for them yourself. In future articles, we’ll explore methods for managing your private keys, including sharing them via MPC, bringing in multisig approaches, and others.

(1)This uniqueness of the private key is at the core of the authentication mechanism here at Dynamic, we believe that utilizing the private key for the authentication flow, provides far superior security to any password you might come up with

Share this article

Everything You Wanted to Know About Wallet Keys (4)

Yoni Goldberg

Yoni is the co-founder and CTO of Dynamic. Prior to Dynamic he was VP at Juul labs, AQR and Even Financial, and a tech lead at Gilt Groupe. He previously completed his thesis at Google Research, and holds B.Sc and M.Eng degrees in Computer Science from MIT.

I'm an enthusiast with a deep understanding of cryptocurrency and blockchain technology. The information provided in the article titled "Learn Everything You Wanted to Know About Wallet Keys" by Yoni Goldberg is comprehensive and covers the fundamental concepts related to crypto wallets and keys. Here's a breakdown of the key concepts discussed in the article:

  1. Crypto Wallet Overview:

    • A crypto wallet serves as a user interface (UI) layer on top of a public and private keypair.
    • It abstracts the interface to access the blockchain, and the keypair acts as a "passport" through the web3 ecosystem.
  2. Public-Key Cryptography Basics:

    • Public-key cryptography involves a pair of keys – a public key known to everyone and a hidden private key.
    • The public key is used for encryption, while the private key is used for decryption.
  3. Generating the Keys:

    • When creating a self-custodial wallet, a new private key is generated, and the public key is computed from it.
    • The private key is a randomly generated 256-bit number, ensuring unpredictability.
    • The public key is derived using the Elliptic Curve Digital Signature Algorithm (ECDSA).
  4. Generating the Ethereum Address:

    • The Ethereum address is obtained by applying the Keccak-256 one-way function to the public key.
    • The Ethereum address is not the same as the public key and is a hash of the public key.
  5. Key Storage in Wallets:

    • Private keys must be securely stored to prevent theft.
    • Modern wallets provide various storage solutions, including secure cloud storage and integration with hardware wallets like Ledger.
  6. Master Seed and Recovery Phrase:

    • Users are often required to keep a recovery phrase offline, consisting of 12-24 words.
    • The recovery phrase maps to a "Master seed," a randomly generated 256-bit value used to derive infinite private keys.
  7. Signing Transactions:

    • Wallets use private keys to sign transactions, involving a mathematical function that produces a signature.
    • The signature is appended to the transaction message, and verification involves the public key and transaction data.
  8. Final Thoughts:

    • A wallet is a program that generates a public/private key pair and signs and encrypts messages.
    • Crypto wallets do not store assets but secure assets on the blockchain, with custodial and self-custodial wallets differing in key management.

This breakdown provides a comprehensive overview of the concepts discussed in the article. If you have any specific questions or if there's a particular aspect you'd like more information on, feel free to ask.

Everything You Wanted to Know About Wallet Keys (2024)

FAQs

What is the secret phrase in trust wallet? ›

Your secret recovery phrase is the key to your wallet and controls access to all your crypto. A secret recovery phrase is a set of words that correspond to numbers. These numbers make up a seed integer that generates all of the private keys in your wallet. Each address for every crypto has its own private key.

How do I recover my 12 word wallet recovery phrase? ›

If you forgot to write down your backup phrase you can always access it within the wallet. You just need to enter the wallet with your password. Then go to the Settings tab and find Private Keys. View your phrase and save it in a safe place.

What is a wallet secret key? ›

A private key/secret key is a sophisticated string of alphanumeric characters, a kind of digital password, unique to each cryptocurrency wallet. This key allows the wallet owner to access and control their funds, making transactions and managing their holdings.

What is a mnemonic wallet key? ›

What is a mnemonic in a wallet? Mnemonic phrases are an optimized version of private keys for easier memorization. You can use a mnemonic or seed phrase to confirm transactions and recover lost cryptocurrency wallet accounts. Mnemonic phrases or seed phrases consist of 12–24 lists of words.

What is the 12-word passphrase in wallet? ›

A 12-word seed phrase acts as a key to unlock access to a crypto wallet and is also the ultimate recovery tool for wallets on the blockchain.

What is a 12-word seed phrase in trust wallet? ›

A recovery phrase, or sometimes called a "seed phrase," is a sequence of words generated by your digital wallet that allows you to access the cryptocurrencies tied to that wallet. Typically, these phrases consist of either 12 or 24 words, which are produced randomly by the wallet.

What is an example of a 12-word recovery phrase? ›

Here is an example of a 12-word seed phrase: timber, sword, where, noodle, joy, eagle, admit, tuna, vibrant, museum, gossip, river. The standard method for seed phrases is called BIP-39 —short for Bitcoin improvement proposal-39. BIP-39 was introduced in 2013 with a list of 2,048 words that could be in seed phrases.

Can I recover my wallet without recovery phrase? ›

If you have lost your recovery phrase or believe it was written down incorrectly, you will be unable to recover your funds if you are unable to log in to your wallet (for example because you lost/changed your device or your PIN).

What are private keys in trust wallet? ›

A private key is an alphanumeric code generated by a cryptocurrency wallet. It is used to authorize transactions and prove ownership of a blockchain asset.

How do I get private keys from my wallet? ›

Use the account selector at the top of the wallet view to switch to the account whose private key you want to access. Tap the ellipsis button immediately underneath the account's name, to the right of its truncated public address. Tap 'show private key'.

What is a secret key? ›

In symmetric cryptography a secret key (or “private key”) is a piece of information or a framework that is used to decrypt and encrypt messages. Each party to a conversation that is intended to be private possesses a common secret key.

What is a wallet passphrase? ›

A passphrase functions like an extra word added to your wallet backup (recovery seed) Using your wallet backup (recovery seed) alone grants access to your Standard wallet. Each unique combination of 'backup + passphrase' grants access to a corresponding unique Passphrase wallet.

What is the private key in D cent wallet? ›

A 24 words(seed-phrase), also called a private key, will be randomly generated for you. It is crucial that you keep it safe and never share it with anyone. You will be invited to download our D'CENT App in order to make your first actions such as purchasing new coins.

What is the mnemonic for remembering keys? ›

A mnemonic that works forward and backward is “Father Charles Goes Down And Ends Battle,” which reversed is “Battle Ends And Down Goes Charles' Father.” A helpful learning device to remember the order of keys in relation to the order of sharps and flats is the circle of fifths .

What is an example of a 12 word recovery phrase? ›

Here is an example of a 12-word seed phrase: timber, sword, where, noodle, joy, eagle, admit, tuna, vibrant, museum, gossip, river. The standard method for seed phrases is called BIP-39 —short for Bitcoin improvement proposal-39. BIP-39 was introduced in 2013 with a list of 2,048 words that could be in seed phrases.

What is the secret trust clause? ›

A secret trust arises when a testator makes a gift in a will to a donee, intending that the donee should receive the gift as trustee for an ultimate beneficiary or beneficiaries, under an express or implied agreement between the testator and the donee, made outside the will.

What is secret phrase in crypto? ›

A seed phrase, also known as a Secret Recovery Phrase (SRP) or mnemonic, is simply a collection of words that allows you to restore your entire crypto wallet. It's those 12-24 English words that your wallet presented you with while setting it up.

What is the difference between a secret recovery phrase and a private key? ›

Private keys​

While a Secret Recovery Phrase is used to create and restore your entire MetaMask Wallet, including all accounts created in that wallet, each account has its own private key. This key can be used to import that account, and that account only, into a different wallet.

Top Articles
Check Your Knowledge What increases your
Why You Should Not Use ChatGPT for SEO?
Chs.mywork
What Are Romance Scams and How to Avoid Them
Grange Display Calculator
Embassy Suites Wisconsin Dells
Best Cav Commanders Rok
Ap Chem Unit 8 Progress Check Mcq
Ssefth1203
Troy Athens Cheer Weebly
Pvschools Infinite Campus
Rosemary Beach, Panama City Beach, FL Real Estate & Homes for Sale | realtor.com®
Industry Talk: Im Gespräch mit den Machern von Magicseaweed
Craigslist Blackshear Ga
Eva Mastromatteo Erie Pa
Tamilyogi Proxy
Bridge.trihealth
Trivago Sf
97226 Zip Code
Craigslist Prescott Az Free Stuff
We Discovered the Best Snow Cone Makers for Carnival-Worthy Desserts
Engineering Beauties Chapter 1
Craigslist Maryland Trucks - By Owner
Globle Answer March 1 2023
Reviews over Supersaver - Opiness - Spreekt uit ervaring
TeamNet | Agilio Software
Kentuky Fried Chicken Near Me
Carroway Funeral Home Obituaries Lufkin
Bayard Martensen
CohhCarnage - Twitch Streamer Profile & Bio - TopTwitchStreamers
Imagetrend Elite Delaware
Syracuse Jr High Home Page
6465319333
Smayperu
Craigslist Org Sf
Glossytightsglamour
Metro By T Mobile Sign In
Marie Peppers Chronic Care Management
1v1.LOL Game [Unblocked] | Play Online
A Comprehensive 360 Training Review (2021) — How Good Is It?
Cocorahs South Dakota
Nu Carnival Scenes
Quaally.shop
Child care centers take steps to avoid COVID-19 shutdowns; some require masks for kids
Go Nutrients Intestinal Edge Reviews
Www.homedepot .Com
Bismarck Mandan Mugshots
Washington Craigslist Housing
Cvs Minute Clinic Women's Services
ESPN's New Standalone Streaming Service Will Be Available Through Disney+ In 2025
Used Curio Cabinets For Sale Near Me
Latest Posts
Article information

Author: Prof. Nancy Dach

Last Updated:

Views: 5801

Rating: 4.7 / 5 (57 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Prof. Nancy Dach

Birthday: 1993-08-23

Address: 569 Waelchi Ports, South Blainebury, LA 11589

Phone: +9958996486049

Job: Sales Manager

Hobby: Web surfing, Scuba diving, Mountaineering, Writing, Sailing, Dance, Blacksmithing

Introduction: My name is Prof. Nancy Dach, I am a lively, joyous, courageous, lovely, tender, charming, open person who loves writing and wants to share my knowledge and understanding with you.