Skip to content

Commit feb98cc

Browse files
rphairKtorZ
andauthored
CIP-1854 | Adjust preamble and structure w.r.t CIP-0001 (cardano-foundation#727)
* first draft remediation of CIP-1854 * got some heading levels wrong * reclassifying as Active due to implementation in Round Table * syntax error in YAML header * Update CIP-1854/README.md * Update CIP-1854/README.md * Update CIP-1854/README.md --------- Co-authored-by: Matthias Benkort <[email protected]>
1 parent 2a678a5 commit feb98cc

File tree

1 file changed

+44
-46
lines changed

1 file changed

+44
-46
lines changed

CIP-1854/README.md

+44-46
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
---
22
CIP: 1854
33
Title: Multi-signatures HD Wallets
4-
Authors: Matthias Benkort <[email protected]>, Pawel Jakubas <[email protected]>
5-
Comments-Summary: Multi-party transaction signing and key management for HD wallets.
6-
Comments-URI: https://github.com/cardano-foundation/CIPs/wiki/Comments:CIP-1854
7-
Status: Draft
8-
Type: Standards
4+
Status: Active
5+
Category: Wallets
6+
Authors:
7+
- Matthias Benkort <[email protected]>
8+
- Pawel Jakubas <[email protected]>
9+
Implementors:
10+
- Round Table wallet
11+
Discussions:
12+
- https://github.com/cardano-foundation/CIPs/pull/69
913
Created: 2021-02-23
1014
License: CC-BY-4.0
1115
---
1216

13-
# Abstract
17+
## Abstract
1418

1519
This document describes how to realize multi-parties transactions in Cardano. It is defined as an alternative to [CIP-1852] for Cardano HD wallets. This specification does not cover the transport and sharing of partially signed transactions which is / will be covered in another document.
1620

17-
## Glossary
21+
## Motivation: why is this CIP necessary?
1822

23+
### Overview
1924

2025
Term | Definition
2126
--- | ---
2227
HD | Hierarchical Deterministic, refers to wallets as described in [BIP-0032].
2328
Multisig | Shorthand for Multi-party signature scheme.
2429

25-
# Motivation
26-
27-
## Overview
28-
2930
Multisig wallets are Cardano wallets capable of providing and tracking keys involved in multi-parties transactions. Such transactions are used to move funds from addresses where (typically) more than one user must sign transactions for its funds to be spent. A simple analogue is a joint bank account where two account holders must approve withdrawals from the account. Cardano has native support for multi-signature schemes: funds at a multi-signature script address are owned by a monetary script, which specifies one or more combinations of cryptographic signatures which must be present to unlock funds at the address (see the [Formal Ledger Spec, Figure 4: Multi-signature via Native Scripts][ledger-spec.pdf]). In a similar fashion, Cardano multisig scripts can also be used to capture stake rights on a particular address, shared between different parties.
3031

3132
In the Shelley era, Cardano offers six (partially overlapping) primitives for constructing monetary scripts which are summarized as the following grammar:
@@ -52,29 +53,26 @@ JOINT-ACCOUNT := ANY-OF [SIGNATURE key-hash#1, SIGNATURE key-hash#2]
5253

5354
In order to spend from such script, one would have to provide a witness showing ownership of the key associated with either of `key-hash#1` or `key-hash#2` (or possibly, both).
5455

55-
56-
## Creation of a Multisig Script/Address
56+
### Creation of a Multisig Script/Address
5757

5858
The creation of a multisig address will not be covered in this document. Such addresses are described in [Shelley design specification - section 3.2 - Addresses and Credentials][delegation_design.pdf] and are obtained by serializing and hashing a multisig script. This functionality is assumed to be available through existing tooling or piece of software in a variety of ways.
5959

60-
## Spending From a Multisig Address
60+
### Spending From a Multisig Address
6161

6262
In order to spend from a multisig address, one must provide a special witness in the spending transaction called a "multisig witness". Such witness must be the exact script used as an input for creating the hash part of the multisig address. Then, any additional required verification key signatures specified by the script must be provided as separate verification key witnesses (i.e. signatures of the hashed transaction body for each signing key).
6363

6464
This means that a wallet software has access to the full script to validate and also identify verification key hashes present in transactions, but only does so when funds are being spent from a multisig address! From the Allegra era and beyond, it is also possible to include script pre-image in transaction auxiliary data. Softwares may use this to communicate scripts ahead of time.
6565

66+
## Specification
6667

67-
# Specification
68-
69-
## HD Derivation
68+
### HD Derivation
7069

7170
We consider the following HD derivation paths similarly to [CIP-1852]:
7271

7372
```
7473
m / purpose' / coin_type' / account_ix' / role / index
7574
```
7675

77-
7876
To associate multi-signature keys to a wallet, we reserve however `purpose=1854'` to distinguish multisig wallets from standard wallets. The coin type remains `coin_type=1815'` to identify Ada as registered in [SLIP-0044]. The account index (`account_ix`) may vary across the whole hardened domain. `role=0` is used to identify payment keys, whereas `role=2` identifies stake keys. `role=1` is left unused for multisig wallets. Finally, the last `index` may vary across the whole soft domain, but according to the following rules:
7977

8078
- Wallet must derive multisig key indexes sequentially, starting from 0 and up to 2^31-1
@@ -87,36 +85,20 @@ We can summarize the various paths and their respective domain in the following
8785
| --- | --- | --- | --- | --- |
8886
| `1854'` | `1815'` | `[2^31 .. 2^32-1]` | `0` or `2` | `[0 .. 2^31-1]` |
8987

90-
91-
### Rationale
92-
93-
- Multisig keys are scoped to accounts, which allows wallet's owners to separate their activity easily.
94-
95-
- We use a different purpose for mainly two reasons:
96-
97-
- It prevents mixing up standard wallets with shared wallets, which would be undesirable and become rapidly a nightmare for software to maintain. In particular, it also makes it possible to share an intermediary account key with co-signers without disclosing any information about non-shared keys in our wallet.
98-
99-
- It makes it easier to extend any of the 1852' or 1854' in a similar manner. The addition of a new role can be done in both scheme very consistently.
100-
101-
Using a different purpose also fits well the use-case on hardware wallets who can still rely on a single root seed to manage many types of wallets.
102-
103-
- One or many keys can be created from a parent public key via soft-derivation. This allows participant to easily share their multisig keys to participate in a multisig script without having to fetch for their hardware device. The device is still required for signing.
104-
105-
### Examples
88+
#### Examples
10689

10790
- `m/1854’/1815’/0’/0/0`
10891
- `m/1854’/1815’/0’/2/14`
10992
- `m/1854’/1815’/0’/2/42`
11093
- `m/1854’/1815’/0’/0/1337`
11194

112-
113-
## User-facing encoding
95+
### User-facing encoding
11496

11597
Multi-signatures payment verification and signing keys (`role=0`) with chain code should be presented bech32-encoded using `addr_shared_xvk` and `addr_shared_xsk` prefixes respectively, as specified in [CIP-5]. When represented without chain-code, `addr_shared_vk` and `addr_shared_sk` should be used instead.
11698

11799
Similarly we use `stake_shared_xvk`, `stake_shared_xsk`, `stake_shared_vk` and `stake_shared_sk` for multi-signatures stake verification and signing keys (`role=2`).
118100

119-
### Examples
101+
#### Examples
120102

121103
```yaml=
122104
- base16: |
@@ -128,9 +110,9 @@ Similarly we use `stake_shared_xvk`, `stake_shared_xsk`, `stake_shared_vk` and `
128110
addr_shared_xvk1z7d7rty7vw4mtljxvm0sxqrmque68d3um5yv6d34hrfkfct24unynpt09wj3x7r2lkl9c7s82ewq9xa85s5s6g928jqwesvrtpq767qs66fnu
129111
```
130112

131-
## Multisig Wallets
113+
### Multisig Wallets
132114

133-
### Templates
115+
#### Templates
134116

135117
To define a multisig wallet, participants must provide:
136118

@@ -213,15 +195,21 @@ After exchanging their corresponding public keys, both wallets should be initial
213195

214196
When Alice initiates a transaction from this wallet, she'll construct the transaction body, sign it with her corresponding private key, include an instance of the script as witness and broadcast the transaction to Bob via Telegram. Upon reception, Bob is able to verify that the transaction was indeed signed by Alice using her private key at index #0 (Bob has indeed Alice's parent public key in its possession and is therefore able to derive a child key at index #0 to verify the signature on the transaction). Bob proceeds with the payment by signing the transaction in return and submitting it.
215197

216-
# Backwards Compatibility
198+
## Rationale: how does this CIP achieve its goals?
199+
200+
- Multisig keys are scoped to accounts, which allows wallet's owners to separate their activity easily.
201+
202+
- We use a different purpose for mainly two reasons:
203+
204+
- It prevents mixing up standard wallets with shared wallets, which would be undesirable and become rapidly a nightmare for software to maintain. In particular, it also makes it possible to share an intermediary account key with co-signers without disclosing any information about non-shared keys in our wallet.
217205

218-
N/A (no preceding implementation or design).
206+
- It makes it easier to extend any of the 1852' or 1854' in a similar manner. The addition of a new role can be done in both scheme very consistently.
219207

220-
# Reference Implementation
208+
Using a different purpose also fits well the use-case on hardware wallets who can still rely on a single root seed to manage many types of wallets.
221209

222-
None yet.
210+
- One or many keys can be created from a parent public key via soft-derivation. This allows participant to easily share their multisig keys to participate in a multisig script without having to fetch for their hardware device. The device is still required for signing.
223211

224-
# Related Work
212+
### Related Work
225213

226214
Description | Link
227215
--- | ---
@@ -230,10 +218,20 @@ CIP-5 - Common Bech32 Prefixes | https://github.com/cardano-founda
230218
CIP-1852 - Cardano HD Wallets | https://github.com/cardano-foundation/CIPs/tree/master/CIP-1852
231219
A Formal Specification of the Cardano Ledger | https://github.com/input-output-hk/cardano-ledger/releases/latest/download/shelley-ledger.pdf
232220

221+
## Path to Active
222+
223+
### Acceptance Criteria
224+
225+
- [x] Document at least one case of a community adopted CIP-1852 compliant multisig wallet:
226+
- [x] [Round Table wallet](https://round-table.vercel.app)
227+
228+
### Implementation Plan
229+
230+
- [x] Community developed reference implementation: [github:ADAOcommunity/round-table](https://github.com/ADAOcommunity/round-table)
233231

234-
# Copyright
232+
## Copyright
235233

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

238236
[rfc8610]: https://tools.ietf.org/html/rfc8610
239237
[rfc8152]: https://tools.ietf.org/html/rfc8152

0 commit comments

Comments
 (0)