Public/Private Keys & Wallets
Learn the relationship between public and private keys, how they secure assets, and the different types of cryptocurrency wallets.
Public/Private Keys & Wallets is a free Web3 & DApp Development Fundamentals lesson on CoddyKit — lesson 2 of 3. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Web3 & DApp Development Fundamentals learning path, one of 3 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Welcome to Keys & Wallets
In this lesson, we'll unlock the secrets behind securing your digital assets!
You'll learn about private keys and public keys, and how they work together to give you control over your cryptocurrency.
We'll also explore the different types of cryptocurrency wallets and how they help manage your keys.
Understanding Your Private Key
Imagine a private key as a super-secret, unique number. It's often a long string of letters and numbers.
This key is your ultimate proof of ownership and control over your digital assets on the blockchain.
- It's like the master key to your personal vault.
- Only you should know it.
Private Key Security is Paramount
Never, ever share your private key with anyone. If someone gets your private key, they gain full control over your funds.
Losing your private key means losing access to your cryptocurrency forever. There's no 'forgot password' button on the blockchain.
Wallets don't 'store' your crypto; they securely manage your private keys.
Introducing Your Public Key
A public key is mathematically derived from your private key. Think of it as the 'lock' that corresponds to your 'master key'.
Unlike your private key, your public key is designed to be shared. It's public information.
It's like your bank account number: people need it to send you money, but they can't take money out with it.
From Public Key to Address
Often, your public key is put through a one-way mathematical function (a hash function) to generate a shorter, more user-friendly blockchain address.
This address is what you typically share with others when you want to receive cryptocurrency.
- It's a unique identifier for your 'account' on the blockchain.
- Anyone can send funds to this address.
The Key Pair in Action
Private and public keys work as a pair for digital signatures. When you want to send crypto:
- Your private key digitally 'signs' the transaction, proving you own the funds.
- The network uses your public key to verify this signature without ever seeing your private key.
This ensures transactions are legitimate and immutable.
What Exactly is a Wallet?
A cryptocurrency wallet is a software application or a physical device that manages your private and public keys.
It's your interface to the blockchain, allowing you to:
- Send and receive cryptocurrency.
- Check your balance.
- Interact with decentralized applications (DApps).
Remember, your crypto isn't 'in' the wallet; it's on the blockchain, and your wallet holds the keys to access it.
Hot Wallets: Connected & Convenient
Hot wallets are connected to the internet. They are typically software-based, such as:
- Mobile apps (e.g., Trust Wallet)
- Desktop applications
- Browser extensions (e.g., MetaMask)
They offer great convenience for frequent transactions and DApp interaction, but come with a higher risk of being hacked due to their online nature.
Cold Wallets: Offline & Secure
Cold wallets are stored offline, meaning they are not connected to the internet. This makes them highly secure against online threats.
Examples include:
- Hardware wallets: Physical devices (like a USB drive) that store your private keys offline.
- Paper wallets: Your private and public keys printed on a piece of paper.
Cold wallets are ideal for storing large amounts of cryptocurrency long-term ('hodling').
Choosing the Right Wallet
The best wallet for you depends on your needs:
- For small amounts & daily use: A hot wallet offers convenience.
- For large amounts & long-term storage: A cold wallet provides maximum security.
- For DApp interaction: A browser extension hot wallet (like MetaMask) is often essential.
Many users use a combination of both for different purposes.
Key Concept Check
Let's test your understanding of private/public keys and wallets.
Recap: Keys & Wallets
Great job! You've learned the fundamentals of securing your digital assets.
- Private keys are secret and grant ownership.
- Public keys are derived from private keys and are shareable for receiving funds.
- Blockchain addresses are shortened forms of public keys.
- Wallets manage your keys, acting as your interface to the blockchain.
- Hot wallets are convenient but less secure; cold wallets are secure but less convenient.
Understanding these concepts is crucial for safe interaction with Web3!
Frequently asked questions
Is the “Public/Private Keys & Wallets” lesson free?
Yes — the full text of “Public/Private Keys & Wallets” is free to read here on the web, and the Web3 & DApp Development Fundamentals course includes 3 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Web3 & DApp Development Fundamentals course, upgrade to CoddyKit PRO.
What will I learn in “Public/Private Keys & Wallets”?
Learn the relationship between public and private keys, how they secure assets, and the different types of cryptocurrency wallets. You practise Web3 & DApp Development Fundamentals with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Web3 & DApp Development Fundamentals?
No prior experience is required. Web3 & DApp Development Fundamentals on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 3, so you can start here or from the beginning and move at your own pace.
How long does the “Public/Private Keys & Wallets” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Web3 & DApp Development Fundamentals lesson?
Yes. Every Web3 & DApp Development Fundamentals lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Cryptography for Blockchains
- Public/Private Keys & Wallets
- Introduction to MetaMask