Information, not advice. This page describes official DFINITY SDK, quill, and keysmith source, and official Internet Computer and Internet Identity documentation. It is not financial, legal, or recovery advice, and it is not a substitute for the wallet or identity tool that holds your backup.
Safety: Never type or paste a real recovery phrase, PEM file, or Internet Identity recovery phrase into a website, chat, or any tool you do not fully control and trust. A seed that controls a principal can control ICP balances and neurons attached to that principal.
Internet Computer keys come in more than one official form. A seed-based identity, as used by dfx, quill, and the older keysmith tool, is a BIP39 mnemonic that derives a secp256k1 key at a fixed BIP44 path. Internet Identity is a different official sign-in system. It authenticates with passkeys (WebAuthn) and can add a recovery phrase as a backup login method. Those two backups are not interchangeable just because both are English words.
Official seed path: m/44'/223'/0'/0/0
The official dfx-core source defines m/44'/223'/0'/0/0 as DEFAULT_DERIVATION_PATH. It converts a BIP39 mnemonic to a seed with an empty passphrase (Seed::new(mnemonic, "")), derives a BIP32 extended private key at that path, and takes the secp256k1 secret. Coin type 223 is the Internet Computer type in SLIP-0044.
Official quill source uses the same constant: DERIVATION_PATH is m/44'/223'/0'/0/0, again with an empty BIP39 passphrase. quill generate can create a new English BIP39 phrase or recover a PEM from an existing phrase, then prints the principal id and a legacy account id.
Word counts differ by tool, even though the default path matches:
- Official dfx key generation uses 256 bits of entropy, which is a 24-word English BIP39 phrase.
- Official
quill generatedefaults to 12 words and also accepts 24. - Official keysmith
generatedefaults to 128 bits of entropy, which is 12 words, and can be given a different size.
Do not assume a 12-word quill phrase and a 24-word dfx phrase are the same backup. They are different mnemonics unless you imported one into the other.
keysmith, quill, and hardware wallets
keysmith is official DFINITY software for hierarchical deterministic key derivation. Its README now tells users to migrate to quill for ledger and governance work. Official keysmith source still matters if you have an older seed file created with it.
keysmith derives a master key at m/44'/223'/0', then a change index of 0 and an address index (the -i flag, default 0). The default key is therefore the same path dfx and quill use: m/44'/223'/0'/0/0. A non-zero index is a different key. keysmith can also prompt for a BIP39 password (-p). dfx and quill, in the source cited here, pass an empty passphrase into the seed function. A password-protected keysmith seed will not match a dfx or quill import of the same words without that password.
Official Ledger Internet Computer signer documentation uses the derivation path 44'/223'/0'/0/0 when it retrieves a public key, account identifier, and principal. That is the same path, written without the leading m/. A hardware wallet running the official ICP app at that path can present the same principal as a quill or dfx identity derived from the same BIP39 phrase and an empty passphrase.
This page does not walk through resetting a hardware wallet. Official NNS and Ledger documentation describes how a seed phrase created with quill can be restored onto a Ledger so the device can manage the same principal and neurons. Follow those official guides on a device you control. Do not paste the phrase into a browser form.
Older dfx identities could be raw Ed25519 PEM keys, before official SDK work switched the default to secp256k1 so that BIP39 paper backups were possible. An Ed25519 PEM is not recovered by entering words at m/44'/223'/0'/0/0. Keep the PEM if that is what the original tool wrote.
Internet Identity is not a dfx seed
Internet Identity is the Internet Computer's official sign-in. Official getting-started documentation says users authenticate with a passkey, or with a Google, Apple, or Microsoft account, or through organization SSO. The app receives a delegation: a short-lived session key that can sign canister calls. Canisters see a principal as the caller.
Official Internet Identity support documentation explains that II uses the WebAuthn standard. Official guidance treats recovery phrases and recovery devices as backup login methods. Official support also describes how to activate a recovery phrase in the II interface at id.ai. That phrase is a backup for the Internet Identity anchor, not a documented alias for a dfx or quill identity.
The official Internet Identity specification makes the separation sharper. A user has a different identity for each application frontend origin. The per-app identity is a self-authenticating principal derived from a canister-signature public key. The seed inside that key is computed from a canister salt, the Identity Anchor number, and the frontend origin, using SHA-256. It is not a BIP39 seed, and it is not m/44'/223'/0'/0/0.
The same specification stores recovery phrases as public keys on the anchor (recovery_phrases). Official pages cited here do not publish a derivation path that turns an II recovery phrase into the same secp256k1 key dfx would derive. This page therefore does not claim that an Internet Identity recovery phrase can be imported into dfx or quill at coin type 223. Treat it as a distinct official backup. Do not type it into a generic BIP39 tool.
Principals and account IDs
A principal is the Internet Computer identity used as a caller, a controller, and an account owner. Official ledger documentation distinguishes that identity from the address formats used to hold tokens.
The ICP ledger uses an AccountIdentifier: official docs describe it as a 32-byte hash derived from a principal and an optional subaccount, displayed as a 64-character hex string. That is the "legacy account id" quill prints after generating a key. Sending ICP to a principal string and sending ICP to the hex account identifier are not the same typo-tolerant operation; use the format the destination actually accepts.
ICRC ledgers, including many chain-key tokens, use a two-part account: a principal plus an optional 32-byte subaccount. The default subaccount is the all-zero value when it is omitted. A principal can therefore own many ICRC accounts.
FAQ
Is an ICP seed phrase BIP39? Official dfx, quill, and keysmith source treat it as a BIP39 English mnemonic and derive a secp256k1 key at m/44'/223'/0'/0/0 (keysmith can also use a later address index). That is the seed-based identity path, not Internet Identity.
Why did my 12-word quill phrase not match a new dfx identity? Official dfx generation uses 24 words. Official quill generation defaults to 12. The path can match and the mnemonic still be different.
Is an Internet Identity recovery phrase the same as a dfx phrase? Official II documentation presents it as a recovery login method for a passkey-based identity. Official II specification derives per-app principals from a canister signature seed, not from BIP44 coin type 223. Do not assume the phrases are interchangeable.
What is the difference between a principal and an account ID? A principal is the identity. Official ICP ledger docs use a 32-byte AccountIdentifier hash of the principal and an optional subaccount, shown as 64 hex characters. ICRC ledgers use the principal and optional subaccount directly.
See also
- BIP39 passphrase
- BIP32 and BIP44
- Ethereum, which also uses secp256k1 but coin type 60
- Other seeds and derivation schemes
Sources
- https://github.com/dfinity/sdk/blob/master/src/dfx-core/src/identity/identity_manager.rs
- https://github.com/dfinity/quill/blob/master/src/lib/mod.rs
- https://github.com/dfinity/quill/blob/master/src/commands/generate.rs
- https://github.com/dfinity/keysmith/blob/master/crypto/crypto.go
- https://github.com/dfinity/keysmith
- https://docs.internetcomputer.org/references/internet-identity-spec/
- https://docs.internetcomputer.org/guides/authentication/internet-identity/
- https://docs.internetcomputer.org/concepts/ledgers/
- https://identitysupport.dfinity.org/hc/en-us/articles/15430754076948-What-Are-Some-Best-Practices-for-Protecting-Your-Internet-Identity
- https://identitysupport.dfinity.org/hc/en-us/articles/45309250592788-How-do-I-activate-my-recovery-phrase
- https://developers.ledger.com/docs/device-interaction/dmk-ts/references/signers/icp
- https://github.com/satoshilabs/slips/blob/master/slip-0044.md
- https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki