Many wallets utilize some way of mapping a sentence of words (easy to read and write for humans) uniquely back and forth to a sized binary data (harder to remember).
This document outlines the various mapping algorithms used in the Cardano ecosystem.
The philosophy of cryptocurrencies is that you are in charge of your own finances. Therefore, it is very anti-thematic for wallet software to lock in a user by explicitly describing the algorithm used to derive keys for a wallet (both the master key and key derivation)
To this end, this document outlines all the relevant key generation algorithms used in the Cardano ecosystem.
Conversion from a recovery phrase to entropy is the same as described in BIP39.
The master key generation is the mean by which on turns an initial entropy into a secure cryptographic key.
More specifically, the generation is a function from an initial seed to an extended private key (abbrev. XPrv) composed of:
- 64 bytes: an extended Ed25519 secret key composed of:
- 32 bytes: Ed25519 curve scalar from which few bits have been tweaked according to ED25519-BIP32
- 32 bytes: Ed25519 binary blob used as IV for signing
- 32 bytes: chain code for allowing secure child key derivation
Throughout the years, Cardano has used different styles of master key generation:
|Address prefix in Byron
This CIP is merely to document the existing standards and not to provide rationales for the various methods used.
However, you can learn more at the following links:
- Each generation method is documented and provides test vectors in a language-agnostic way.
- There exists reference implementations in various languages for each method.
- At least 2 Cardano wallets (e.g. Yoroi & Daedalus) implement these methods.
- Implementation of each algorithm will be carried out in Yoroi and Daedalus (via cardano-wallet) by Emurgo and Input Output respectively.
This CIP is licensed under CC-BY-4.0.