Skip to content

Commit

Permalink
CIP-1854: Multi-signatures HD Wallets (#69)
Browse files Browse the repository at this point in the history
* publish first draft of CIP-1854 about multisig wallet

* update proposal to use a different purpose=1854 instead of extending roles of 1852' wallets

* add shared prefixes to CIP-0005, and remove now obsolete script_*** prefixes

* add reference to CIP-1854 in the README

* remove headlines to get the frontmatter data first

* Clarify purpose vs role extension on CIP-1852

* Fix references to formal ledger specs
  • Loading branch information
KtorZ committed May 4, 2021
1 parent 85cf877 commit 6154b8c
Show file tree
Hide file tree
Showing 4 changed files with 323 additions and 60 deletions.
88 changes: 50 additions & 38 deletions CIP-0005/CIP-0005.md
Expand Up @@ -25,47 +25,59 @@ We define the following set of common prefixes with their corresponding semantic

#### Keys

| Prefix | Meaning | Contents |
| --- | --- | --- |
| `acct_sk` | CIP-1852's Account private key | Ed25519 private key |
| `acct_vk` | CIP-1852's Account public key | Ed25519 public key |
| `acct_xsk` | CIP-1852's extended Account private key | Ed25519-bip32 extended private key |
| `acct_xvk` | CIP-1852's extended Account public key | Ed25519 public key with chain code |
| `addr_sk` | Address signing key | Ed25519 private key |
| `addr_vk` | Address verification key | Ed25519 public key |
| `addr_xsk` | Address extended signing key | Ed25519-bip32 extended private key |
| `addr_xvk` | Address extended verification key | Ed25519 public key with chain code |
| `kes_sk` | KES signing key | KES signing key |
| `kes_vk` | KES verification key | KES verification key |
| `pool_sk` | Pool operator signing key | Ed25519 private key |
| `pool_vk` | Pool operator verification key | Ed25519 public key |
| `root_sk` | CIP-1852's root private key | Ed25519 private key |
| `root_vk` | CIP-1852's root public key | Ed25519 public key |
| `root_xsk` | CIP-1852's extended root private key | Ed25519-bip32 extended private key |
| `root_xvk` | CIP-1852's extended root public key | Ed25519 public key with chain code |
| `script_sk` | Script signing key | Ed25519 private key |
| `script_vk` | Script verification key | Ed25519 public key |
| `script_xsk` | Extended script signing key | Ed25519-bip32 extended private key |
| `script_xvk` | Extended script verification key | Ed25519 public key with chain code |
| `stake_sk` | Stake address signing key | Ed25519 private key |
| `stake_vk` | Stake address verification key | Ed25519 public key |
| `stake_xsk` | Extended stake address signing key | Ed25519-bip32 extended private key |
| `stake_xvk` | Extended stake address verification key | Ed25519 public key with chain code |
| `vrf_sk` | VRF signing key | VRF signing key |
| `vrf_vk` | VRF verification key | VRF verification key |
| Prefix | Meaning | Contents |
| --- | --- | --- |
| `acct_sk` | CIP-1852's account private key | Ed25519 private key |
| `acct_vk` | CIP-1852's account public key | Ed25519 public key |
| `acct_xsk` | CIP-1852's extended account private key | Ed25519-bip32 extended private key |
| `acct_xvk` | CIP-1852's extended account public key | Ed25519 public key with chain code |
| `acct_shared_sk` | CIP-1854's account private key | Ed25519 private key |
| `acct_shared_vk` | CIP-1854's account public key | Ed25519 public key |
| `acct_shared_xsk` | CIP-1854's extended account private key | Ed25519-bip32 extended private key |
| `acct_shared_xvk` | CIP-1854's extended account public key | Ed25519 public key with chain code |
| `addr_sk` | CIP-1852's address signing key | Ed25519 private key |
| `addr_vk` | CIP-1852's address verification key | Ed25519 public key |
| `addr_xsk` | CIP-1852's address extended signing key | Ed25519-bip32 extended private key |
| `addr_xvk` | CIP-1852's address extended verification key | Ed25519 public key with chain code |
| `addr_shared_sk` | CIP-1854's address signing key | Ed25519 private key |
| `addr_shared_vk` | CIP-1854's address verification key | Ed25519 public key |
| `addr_shared_xsk` | CIP-1854's address extended signing key | Ed25519-bip32 extended private key |
| `addr_shared_xvk` | CIP-1854's address extended verification key | Ed25519 public key with chain code |
| `kes_sk` | KES signing key | KES signing key |
| `kes_vk` | KES verification key | KES verification key |
| `pool_sk` | Pool operator signing key | Ed25519 private key |
| `pool_vk` | Pool operator verification key | Ed25519 public key |
| `root_sk` | CIP-1852's root private key | Ed25519 private key |
| `root_vk` | CIP-1852's root public key | Ed25519 public key |
| `root_xsk` | CIP-1852's extended root private key | Ed25519-bip32 extended private key |
| `root_xvk` | CIP-1852's extended root public key | Ed25519 public key with chain code |
| `root_shared_sk` | CIP-1854's root private key | Ed25519 private key |
| `root_shared_vk` | CIP-1854's root public key | Ed25519 public key |
| `root_shared_xsk` | CIP-1854's extended root private key | Ed25519-bip32 extended private key |
| `root_shared_xvk` | CIP-1854's extended root public key | Ed25519 public key with chain code |
| `stake_sk` | CIP-1852's stake address signing key | Ed25519 private key |
| `stake_vk` | CIP-1852's stake address verification key | Ed25519 public key |
| `stake_xsk` | CIP-1852's extended stake address signing key | Ed25519-bip32 extended private key |
| `stake_xvk` | CIP-1852's extended stake address verification key | Ed25519 public key with chain code |
| `stake_shared_sk` | CIP-1854's stake address signing key | Ed25519 private key |
| `stake_shared_vk` | CIP-1854's stake address verification key | Ed25519 public key |
| `stake_shared_xsk` | CIP-1854's extended stake address signing key | Ed25519-bip32 extended private key |
| `stake_shared_xvk` | CIP-1854's extended stake address verification key | Ed25519 public key with chain code |
| `vrf_sk` | VRF signing key | VRF signing key |
| `vrf_vk` | VRF verification key | VRF verification key |

#### Hashes

| Prefix | Meaning | Contents |
| --- | --- | --- |
| `asset` | Fingerprint of a native asset for human comparison | See [CIP-0014] |
| `pool` | Pool operator verification key hash (pool ID) | blake2b\_224 digest of an operator verification key |
| `script` | Script hash | blake2b\_224 digest of a serialized transaction script |
| `addr_vkh` | Address verification key hash | blake2b\_224 digest of a payment verification key |
| `script_vkh` | Script verification key hash | blake2b\_224 digest of a script verification key |
| `stake_vkh` | Stake address verification key hash | blake2b\_224 digest of a delegation verification key |
| `vrf_vkh` | VRF verification key hash | blake2b\_256 digest of a VRF verification key |

| Prefix | Meaning | Contents |
| --- | --- | --- |
| `asset` | Fingerprint of a native asset for human comparison | See [CIP-0014] |
| `pool` | Pool operator verification key hash (pool ID) | blake2b\_224 digest of an operator verification key |
| `script` | Script hash | blake2b\_224 digest of a serialized transaction script |
| `addr_vkh` | Address verification key hash | blake2b\_224 digest of a payment verification key |
| `addr_shared_vkh` | Shared address verification key hash | blake2b\_224 digest of a payment verification key |
| `stake_vkh` | Stake address verification key hash | blake2b\_224 digest of a delegation verification key |
| `stake_shared_vkh` | Shared stake address verification key hash | blake2b\_224 digest of a delegation verification key |
| `vrf_vkh` | VRF verification key hash | blake2b\_256 digest of a VRF verification key |

#### Miscellaneous

Expand Down
8 changes: 7 additions & 1 deletion CIP-1852/CIP-1852.md
Expand Up @@ -43,7 +43,7 @@ For Cardano, we use a new purpose field `1852'` instead of `44'` like in BIP44.
Using `1852'` as the purpose field, we defined the following derivation path

```
m / purpose' / coin_type' / account' / chain / address_index
m / purpose' / coin_type' / account' / role / index
```

Example: `m / 1852' / 1815' / 0' / 0 / 0`
Expand All @@ -58,6 +58,12 @@ Here, `chain` can be the following

Wallets **MUST** implement this new scheme using the master node derivation algorithm from Icarus with sequential addressing (see [CIP3](../CIP-0003) for more information)

### Future extensions

As a general pattern, new wallet schemes should use a different purpose if they intend to piggy-back on the same structure but for a different use-case (see for instance [CIP-1854](https://cips.cardano.org/cips/cip1854)).

The `role` can however be extending with new roles so long as they have no overlapping semantic with existing roles. If they do, then they likely fall into the first category of extension and would better be done via a new purpose.

## Copyright

This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode)

0 comments on commit 6154b8c

Please sign in to comment.