BIP-39 seed phrases and HD wallets explained for developers

How 24 words become keys and addresses on Bitcoin, EVM, TRON, Litecoin and TON: BIP-39, BIP-32, BIP-44/84 paths, SLIP-10 and why paths matter.

Published 4 min read

Every modern crypto wallet, from a hardware device to a mobile app, starts from the same idea: a short list of words from which every key can be recomputed. Understanding how that works tells you what you really own when someone hands you a seed phrase, and why two wallets can show different addresses for the same words.

From randomness to 24 words (BIP-39)

BIP-39 turns random bits into words a person can write down:

  1. Generate 256 bits of entropy from a cryptographically secure random source.
  2. Append a checksum: the first 8 bits of the SHA-256 of the entropy. That makes 264 bits.
  3. Split them into 24 groups of 11 bits. Each group is a number from 0 to 2047, an index into a fixed list of 2048 English words.

The checksum lets a wallet reject a mistyped phrase: change one word and the last word no longer matches. A 12-word phrase works the same way with 128 bits of entropy.

The words then become a 512-bit seed through PBKDF2-HMAC-SHA512 with 2048 iterations, using the string "mnemonic" plus an optional passphrase as the salt. The passphrase matters: the same 24 words with a different passphrase give a completely different wallet. kryptr wallets use no passphrase, so the words alone restore them.

From the seed to a tree of keys (BIP-32)

BIP-32 derives a master private key and chain code from the seed, then any number of child keys from it. Every key has an index, and a path such as m/44'/60'/0'/0/0 names one key in the tree:

  • m is the master key;
  • each /n is a child; an apostrophe marks a hardened child, which cannot be derived from the parent's public key alone;
  • the last numbers usually pick the account, the change branch and the address index.

Because the whole tree is a deterministic function of the seed, backing up the seed backs up every key that will ever be derived from it. That is what "HD" (hierarchical deterministic) means.

Paths per network (BIP-44, BIP-84)

BIP-44 fixes the meaning of the first levels: m / purpose' / coin_type' / account' / change / index. The coin type comes from the SLIP-44 registry: 0 for Bitcoin, 60 for Ethereum, 195 for TRON, 2 for Litecoin, 607 for TON.

These are the paths kryptr uses for each wallet:

Network Path Address format
Ethereum, BNB Smart Chain, Polygon, Arbitrum One, Optimism, Base and Avalanche C-Chain m/44'/60'/0'/0/0 0x…, one address for all seven
TRON m/44'/195'/0'/0/0 T…
Bitcoin m/84'/0'/0'/0/0 native SegWit bc1q… (BIP-84)
Litecoin m/84'/2'/0'/0/0 native SegWit ltc1… (BIP-84)
TON m/44'/607'/0' wallet v4r2, non-bounceable UQ…

The seven EVM networks share one address because they use the same curve (secp256k1), the same address format and coin type 60. TRON uses the same curve but its own coin type and its own address encoding, so its address is different.

Bitcoin and Litecoin use purpose 84 instead of 44: BIP-84 marks native SegWit addresses, which are cheaper to spend from than legacy ones.

ed25519 and SLIP-10 (TON)

TON keys use the ed25519 curve, not secp256k1. BIP-32's non-hardened derivation does not work on ed25519, so the SLIP-10 scheme is used, with every level hardened: m/44'/607'/0'. The key then controls a TON wallet contract; the contract version (v4r2 for kryptr) is part of the address, so the same key in a v3 or v5 contract would show a different address.

Why the path decides who can restore you

A seed phrase is only half of a backup. The other half is the path and, for TON, the contract version. Two wallet apps that read the same 24 words but use different paths will show different addresses, and the coins will seem to be missing. That is the most common cause of "I restored my phrase and my balance is zero".

kryptr uses the paths Trust Wallet and Trust's open-source wallet-core use, so an exported kryptr phrase opens the same addresses there. The export response lists the paths explicitly, so you can check them against any other wallet before you rely on it. The restore guide shows the steps.

One seed per wallet, not one master seed for everyone

Some custodial services derive every customer's address from one platform master seed. That is efficient for the provider but means no customer can ever get their own phrase: it would expose everybody's keys.

kryptr generates a separate BIP-39 phrase for each wallet. That is what makes export possible: handing you the 24 words of your wallet reveals nothing about any other wallet. The phrase is stored encrypted with AES-256-GCM and used only to sign the transfers you order.

Practical rules

  • Generate entropy only from a secure random source; never derive a phrase from a password or user data.
  • Never log a phrase, never put it in a URL, and never send it in an email or chat.
  • Store a backup offline. Anyone who reads the 24 words controls every address derived from them.
  • Record the path and, for TON, the contract version together with the phrase.
  • Before moving real funds to a restored wallet, compare its addresses with the original ones.

More guides