公钥/私钥与钱包
学习公钥与私钥之间的关系、它们如何保护资产,以及不同类型的加密货币钱包。
公钥/私钥与钱包 是 CoddyKit 上的免费 Web3 & DApp Development Fundamentals 课时。 这是第 2 节课,共 3 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 Web3 & DApp Development Fundamentals 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 Web3 & DApp Development Fundamentals 课程共包含 3 节课。
本课时的部分内容尚未翻译,以英文显示。
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!
常见问题解答
「公钥/私钥与钱包」课时是免费的吗?
是的 — 「公钥/私钥与钱包」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 Web3 & DApp Development Fundamentals 课程的其余内容,请升级到 CoddyKit PRO。 Web3 & DApp Development Fundamentals 课程共包含 3 节课。
「公钥/私钥与钱包」这节课中我会学到什么?
学习公钥与私钥之间的关系、它们如何保护资产,以及不同类型的加密货币钱包。 你通过在浏览器中直接运行的动手代码来练习 Web3 & DApp Development Fundamentals,全天候 AI 导师会在你学习这节课的过程中回答你的问题。
学习 Web3 & DApp Development Fundamentals 需要有经验吗?
无需任何先前经验。CoddyKit 上的 Web3 & DApp Development Fundamentals 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 2 节课,共 3 节。
「公钥/私钥与钱包」课时需要多长时间?
大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。
我能在这节 Web3 & DApp Development Fundamentals 课中编写并运行代码吗?
能。每节 Web3 & DApp Development Fundamentals 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。
此课程中的所有课时
- 区块链密码学
- 公钥/私钥与钱包
- MetaMask 入门