summaryrefslogtreecommitdiff
path: root/0d/5695b38a037a482d5cf535308ce0d7e8d09702
blob: 7b012775ae7d9bee1b16f5abd9068d6c91bd059b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Return-Path: <somber.night@protonmail.com>
Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])
 by lists.linuxfoundation.org (Postfix) with ESMTP id DFB27C0001
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun, 14 Mar 2021 15:13:47 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp1.osuosl.org (Postfix) with ESMTP id C108183AB9
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun, 14 Mar 2021 15:13:47 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -0.099
X-Spam-Level: 
X-Spam-Status: No, score=-0.099 tagged_above=-999 required=5
 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001,
 RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001]
 autolearn=ham autolearn_force=no
Authentication-Results: smtp1.osuosl.org (amavisd-new);
 dkim=pass (1024-bit key) header.d=protonmail.com
Received: from smtp1.osuosl.org ([127.0.0.1])
 by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id tmMxqu-X9UNp
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun, 14 Mar 2021 15:13:46 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0
Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch
 [185.70.40.132])
 by smtp1.osuosl.org (Postfix) with ESMTPS id 1BC8083AB4
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun, 14 Mar 2021 15:13:45 +0000 (UTC)
Date: Sun, 14 Mar 2021 15:13:32 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1615734822;
 bh=Vp6EfGM8H0di/XFNPJHoYEnEWLMHq23De3HfHZAGzfo=;
 h=Date:To:From:Reply-To:Subject:From;
 b=XlcqXqrqy35N7Z13V47FTzpNaCUdRP2Qd9BFXojlZISaAj+td0fVk8HWV/0UnC9/b
 N/NZDy/k2fVsPrMwsi5CbxvmxgAGkZTi6mal6XVQuOSpZ0+3cz9mcWyHqpFmd7Ij7V
 NMehD9jTfENTnbtXR2tw0WVizol4U7TqbCyVmi5s=
To: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>,
 Robert Spigler <RobertSpigler@protonmail.ch>
From: SomberNight <somber.night@protonmail.com>
Reply-To: SomberNight <somber.night@protonmail.com>
Message-ID: <z1Vokp3jct_xwR8wt3n6r8t24DqtMpnrogF22YFc0_V3riIMWEq3WBiOriJOm2kVrVgtsu5p7wDTMrN3dLdA8DilhITMXb4tHY6wCnk3y1g=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Mailman-Approved-At: Tue, 16 Mar 2021 12:17:44 +0000
Subject: Re: [bitcoin-dev] Signature and Script Independent Hierarchy for
	Deterministic Wallets.
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Mar 2021 15:13:48 -0000

See some replies inline. (quoted text from BIP draft)

> Date: Sun, 14 Mar 2021 01:51:15 +0000
> From: Robert Spigler <RobertSpigler@protonmail.ch>
> Subject: [bitcoin-dev] Signature and Script Independent Hierarchy for Det=
erministic Wallets.

> There are many issues with the current standards. As background, BIP 44/4=
9/84 specifies:
> `m / purpose' / coin_type' / account' / change / address_index`
> where the BIP43 `purpose'` path is separate for each script (P2PKH, P2WPK=
H-in-P2SH, and P2WPKH respectively).  However, these per-script derivations=
 are made redundant with descriptors

> We should not be mixing keys and scripts in the same layer. The wallet sh=
ould create extended private/public keys independent of the script or signa=
ture type

You say that keys and scripts should not be mixed in the same layer, and im=
ply that this was solely done due to these standards predating output scrip=
t descriptors. Even if this was the case, it is not the only reason for doi=
ng it. BIP44/49/84 mixing scripts and keys in the same layer makes recovery=
 from seed/mnemonic much easier.
Note the significant overlap between the authors of BIP39 and BIP44. I am f=
airly certain BIP44 was designed with recovering from a BIP39 seed (and no =
additional information backed up) in mind. Note the "Account discovery" sec=
tion of BIP44.
(Electrum seeds go even further, as such seeds contain a version number tha=
t encodes both the script type and the key derivation path to use.)

> We define the following 5 levels in the BIP32 path:
> `m / purpose' / coin_type' / account' / change / address_index`

> [Account]
> It is crucial that this level is increased for each new wallet joined or =
private/public keys created; for both privacy and cryptographic purposes.
> For example, in multisignature wallets, before sending a new key record t=
o a coordinator, the wallet must increment the `account'` level.  Before cr=
eating it's own single signature wallet, the `account'` level must again be=
 incremented.

Imagine a user who has a BIP39 (or similar) seed. Even today, recovering mo=
st non-singlesig scripts from that is obviously infeasible. However, all si=
nglesig scripts at least can be discovered if the keys are using the sugges=
ted derivation paths.
By trying to create a standard that mixes discoverable and non-discoverable=
 scripts in the same derivation scheme and incrementing a single index, you=
 are turning all scripts into being non-discoverable.
Note that even if a user only used singlesig scripts and followed this prop=
osal, during recovery from seed the wallet would have to check all script t=
ypes for all account indices (which is only ever going to get more expensiv=
e as new script types come).
The workaround and I imagine your suggested solution is clearly to backup b=
oth seed words and output script descriptors; and to keep appending new out=
put script descriptors to existing backups when the account index is increm=
ented. While much less user-friendly than backing up just a seed, it is mor=
e generic and extendable.

My point is simply that your proposal is making a tradeoff here. The tradeo=
ff itself seems easy to miss on first read of the text, so I just wanted to=
 explicitly point it out for the record.

ghost43 / SomberNight