Understanding Ethereum Wallets
Non-custodial wallets store private keys locally, giving users full control over their assets. Unlike traditional bank accounts:
- All transactions require private key authorization
- Blockchain records are fully transparent
- Assets remain accessible when importing private keys to different wallets
Wallet Types Explained
- Non-deterministic Wallets
Each private key is generated independently - Deterministic Wallets
All keys derive from a single master private key
Keystore Files: Secure Key Storage
A standard keystore file contains encrypted private key data:
{
"address":"001d3f1ef...",
"crypto":{
"cipher":"aes-128-ctr",
"ciphertext":"233a9f4d2...",
"cipherparams":{"iv":"d10c6ec5b..."},
"kdf":"scrypt",
"kdfparams":{
"dklen":32,
"n":262144,
"p":1,
"r":8,
"salt":"99d37a47c..."
},
"mac":"594c8df1c..."
},
"version":3
}BIP-39 Mnemonic Phrases
Mnemonic phrases function as human-readable private keys. The generation process:
- Create 128-256 bits of entropy
- Calculate SHA-256 checksum
- Combine entropy + checksum
- Split into 11-bit segments
- Map segments to wordlist
| Entropy (bits) | Checksum | Total Length | Word Count |
|---|---|---|---|
| 128 | 4 | 132 | 12 |
| 160 | 5 | 165 | 15 |
| 192 | 6 | 198 | 18 |
| 224 | 7 | 231 | 21 |
| 256 | 8 | 264 | 24 |
Converting mnemonics to seeds involves PBKDF2 with 2048 HMAC-SHA512 iterations.
HD Wallets (Hierarchical Deterministic)
Key Benefits
- Generate unlimited addresses from master keys
- Enhanced security through offline signing
- Reduced server-side key storage needs
๐ Best practices for securing HD wallets
BIP-44 Path Structure
m / purpose' / coin_type' / account' / change / address_indexCommon parameters:
- Purpose:
44'(BIP-44 standard) - Coin type:
60'(Ethereum) - Change:
0(receiving addresses)
Practical Implementation
Python Example
from mnemonic import Mnemonic
mnemo = Mnemonic("english")
words = mnemo.generate(strength=256)
seed = mnemo.to_seed(words, passphrase="")JavaScript Implementation
const bip39 = require('bip39')
const mnemonic = bip39.generateMnemonic(256)
const seed = bip39.mnemonicToSeedSync(mnemonic)Frequently Asked Questions
What's the difference between custodial and non-custodial wallets?
Non-custodial wallets give you exclusive control of private keys, while custodial solutions rely on third-party key management.
How secure are mnemonic phrases?
When properly generated (using 12+ words) and stored offline, mnemonics provide enterprise-grade security comparable to traditional private keys.
Can I recover funds if I lose my keystore file but remember the password?
No - keystore files are encrypted backups of private keys. You need either the original file or your mnemonic phrase for recovery.
What's the advantage of HD wallets?
๐ HD wallets allow streamlined management of multiple addresses while only needing to backup a single master key or mnemonic phrase.
How often should I generate new wallet addresses?
For optimal privacy, consider using new addresses for each transaction. HD wallets make this process seamless through deterministic address generation.