-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CIP1852 - HD Wallets for Cardano (#33)
* CIP1852 draft * add forum link * Split up CIP * Fix dir structure * PR feedback
- Loading branch information
1 parent
bde6de8
commit b9f525a
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
CIP: 1852 | ||
Title: HD (Hierarchy for Deterministic) Wallets for Cardano | ||
Authors: Sebastien Guillemot <[email protected]>, Matthias Benkort <[email protected]> | ||
Comments-URI: https://forum.cardano.org/t/cip1852-hd-wallets-for-cardano/41740 | ||
Status: Draft | ||
Type: Standards | ||
Created: 2019-10-28 | ||
License: CC-BY-4.0 | ||
--- | ||
|
||
## Abstract | ||
|
||
Cardano extends the [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) by adding new chains used for different purposes. This document outlines how key derivation is done and acts as a registry for different chains used by Cardano wallets. | ||
|
||
## Terminology | ||
|
||
### Derivation style | ||
|
||
Cardano does not use [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) but actually uses [BIP32-Ed25519](https://cardanolaunch.com/assets/Ed25519_BIP.pdf). The `-Ed25519` suffix is often dropped in practice (ex: we say the Byron release of Cardano supports [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) but in reality this is BIP44-Ed25519). | ||
|
||
The Byron implementation of Cardano uses `purpose = 44'` (note: this was already a slight abuse of notation because Cardano implements BIP44-Ed25519 and not standard BIP44). | ||
|
||
There are two (incompatible) implementations of BIP32-Ed25519 in Cardano: | ||
|
||
1) HD Random (notably used initially in Daedalus) | ||
2) HD Sequential (notably used initially in Icarus) | ||
|
||
The difference is explained in more detail in [CIP3](../CIP-0003) | ||
|
||
## Motivation | ||
|
||
For Cardano, we use a new purpose field `1852'` instead of `44'` like in BIP44. There are three main reasons for this: | ||
|
||
1) During the Byron-era, `44'` was used. Since Byron wallets use a different algorithm for generating addresses from public keys, using a different purpose type allows software to easily know which address generation algorithm given just the derivation path (ex: given `m / 44' / 1815' / 0' / 0 / 0`, wallet software would know to handle this as a Byron-era wallet and not a Shelley-era wallet). | ||
2) Using a new purpose helps bring attention to the fact Cardano is using `BIP32-Ed25519` and not standard `BIP32`. | ||
3) Using a new purpose allows us to extend this registry to include more Cardano-specific functionality in the future | ||
|
||
`1852` was chosen as it is the year of death of Ada Lovelace (following the fact that the `coin_type` value for Cardano is `1815` for her year of birth) | ||
|
||
## Specification | ||
|
||
Using `1852'` as the purpose field, we defined the following derivation path | ||
|
||
``` | ||
m / purpose' / coin_type' / account' / chain / address_index | ||
``` | ||
|
||
Example: `m / 1852' / 1815' / 0' / 0 / 0` | ||
|
||
Here, `chain` can be the following | ||
|
||
| Name | Value | Description | ||
|----------------|-------|------------- | ||
| External chain | `0` | Same as defined in [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) | ||
| Internal chain | `1` | Same as defined in [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) | ||
| Staking Key | `2` | See [CIP11](../CIP-0011) | ||
|
||
Wallets **MUST** implement this new scheme using the master node derivation algorithm from Icarus with sequential addressing (see [CIP3](../CIP-0003) for more information) | ||
|
||
## Copyright | ||
|
||
This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode) |