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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
Return-Path: <andrew.johnson83@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
[172.17.192.35])
by mail.linuxfoundation.org (Postfix) with ESMTPS id 9A997B9B
for <bitcoin-dev@lists.linuxfoundation.org>;
Fri, 29 Sep 2017 18:07:28 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-qt0-f179.google.com (mail-qt0-f179.google.com
[209.85.216.179])
by smtp1.linuxfoundation.org (Postfix) with ESMTPS id AB1BA46B
for <bitcoin-dev@lists.linuxfoundation.org>;
Fri, 29 Sep 2017 18:07:27 +0000 (UTC)
Received: by mail-qt0-f179.google.com with SMTP id q4so563842qtq.8
for <bitcoin-dev@lists.linuxfoundation.org>;
Fri, 29 Sep 2017 11:07:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to;
bh=WBIp9KpEQjsDL+Cof8snNlM/+Y7IexIbHPn1DwNZv4k=;
b=n9Vfgu7ouPINw11y3zFhGi7U2BuLaua2j5WAzl05m/IGPqqdxQk3+S1mpCqgWwKkr0
woWocjkUff3h/Xj/Gow3+jUMtQRvu6SiKrg2pXOuSkCiXWgOuKQ/JV+w9LWpM04jnb+h
VHCjjxFzaalFgQyg4ibd5ovyiK6n8IhJoqu19fxiXAlbuvN2KI77Z0lJ3WlIgzUGoF2o
mwCyCqsvCqcFMwhoZul4CW/bvJdNAiuIcdTOxo4/VS43w073KifYTUb/R3JghlxoOWeO
ed5mWiW9ROOkNyFwaJH2jSgprsprtx3IjCvfvtQVa4Cw2YvznXwjL4bY9dK1RiXo9wZX
yzRQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:in-reply-to:references:from:date
:message-id:subject:to;
bh=WBIp9KpEQjsDL+Cof8snNlM/+Y7IexIbHPn1DwNZv4k=;
b=qIKYFseJQnNcpUmTAFn0emowN5tKkmeqJ4p65/wiQZFyvgrDg9kkWkIMlQ1cbENvfV
yJOf+8PcUypkZ17i9QfP9t7AGW/52BtZRSN6iAi5lFMNGStXpyjQKsiSifu2yj28fQ7J
ErXW15QA0hEmOjAxqmepnfLAePN/ucMF8B7YrcZL97U1iSr6AH4VJtXmuYU9T7YTlwSW
SaNza1ckPyhdl3P1tDD3gTpdMcFRfBfODzjYkLEJonDpoTRaNc8MUENz9DmtwUJceDsD
RIxdsC8Qi1Xy8gEt1p+0hYPonJIegwBdKngA6fNyNESAEf4PDzvZrLf1ff2w7A56zFeT
UdhQ==
X-Gm-Message-State: AMCzsaVMFyeBmCXbncA/lVAT1ZHtK1ZdpGn++XCUO+TjILjlkNQZfUQT
B2KcRn9t3YIC+YT7NSYfGtlOM9S8KcRpnxRSHmE=
X-Google-Smtp-Source: AOwi7QA2GzVybI5I7QSSCMAROZ+zhOkhQTiJwow9+pPATTGxQfK3l+v99V1W0EBs5P1mehNu7MEChVtFDSXa9kzIWWQ=
X-Received: by 10.237.62.129 with SMTP id n1mr7512765qtf.39.1506708446751;
Fri, 29 Sep 2017 11:07:26 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.237.61.245 with HTTP; Fri, 29 Sep 2017 11:07:26 -0700 (PDT)
In-Reply-To: <e43c6e06-0bdc-360e-eb5c-a3726e4f0fc8@osc.co.cr>
References: <e43c6e06-0bdc-360e-eb5c-a3726e4f0fc8@osc.co.cr>
From: Andrew Johnson <andrew.johnson83@gmail.com>
Date: Fri, 29 Sep 2017 13:07:26 -0500
Message-ID: <CAAy62_Jfp00gsAjTWvr1E8aYx9z9aYM9y6AqqrgK8HizQm08xQ@mail.gmail.com>
To: Dan Libby <dan@osc.co.cr>,
Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="001a114441aebfb2cb055a57e550"
X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,
RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
smtp1.linux-foundation.org
X-Mailman-Approved-At: Fri, 29 Sep 2017 18:08:14 +0000
Subject: Re: [bitcoin-dev] Paper Wallet support in bitcoin-core
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
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: Fri, 29 Sep 2017 18:07:28 -0000
--001a114441aebfb2cb055a57e550
Content-Type: text/plain; charset="UTF-8"
One consideration of exposing this in QT is that it may encourage users to
generate paper wallets(which are generally used and recommended for cold
storage) from online machines, rendering them moreso lukewarm rather than
cold, since the keys weren't generated in an air-gapped environment. When
using bitaddress.org locally(we *are *all only using it locally and not
directly from the online webpage, right? ;) ) you've at least made the
effort to seek out the repo, clone it locally, and use it on an offline
machine and not retain any data from that session.
If we include this as a function in the reference implementation, how many
people are going to be making paper wallets with the intention of cold
storage on a machine that's potentially compromised? As
adoption(hopefully) continues to increase the number of less than tech
savvy people using bitcoin will increase.
I'd suggest that any UI in QT include some sort of a modal dialog that
informs the user that this is not a secure cold storage address unless it
was created on an offline machine and printed on a non-networked printer,
and the prompt must be accepted and dismissed before the wallet will
provide the requested keys.
On Fri, Sep 29, 2017 at 12:29 PM, Dan Libby via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:
> Hi,
>
> I'm writing to suggest and discuss the addition of paper wallet
> functionality in bitcoin-core software, starting with a single new RPC
> call: genExternalAddress [type].
>
> -- rationale --
>
> bitcoin-core is the most trusted and most secure bitcoin implementation.
>
> Yet today (unless I've missed something) paper wallet generation
> requires use of third party software, or even a website such as
> bitaddress.org. This requires placing trust in an additional body of
> code from a less-trusted and less peer-reviewed source. Ideally, one
> would personally audit this code for one's self, but in practice that
> rarely happens.
>
> In the case of a website generator, the code must be audited again each
> time it is downloaded. I cannot in good faith recommend to anyone to
> use such third party tools for wallet generation.
>
> I *would* recommend for others to trust a paper wallet that uses
> address(es) generated by bitcoin-core itself.
>
> At least for me, this requirement to audit (or implicitly trust) a
> secondary body of bitcoin code places an additional hurdle or
> disincentive on the use of paper wallets, or indeed private keys
> generated outside of bitcoin-core for any purpose.
>
> Unfortunately, one cannot simply use getnewaddress, getaccountaddress,
> or getrawchangeaddress for this purpose, because the associated private
> keys are added to the bitcoin-core wallet and cannot be removed... or in
> the case of hd-wallets are deterministically derived.
>
> As such, I'm throwing out the following half-baked proposal as a
> starting point for discussion:
>
>
> -----
>
> genexternaladdress ( "type" )
>
> Returns a new Bitcoin address and private key for receiving
> payments. This key/address is intended for external usage such as
> paper wallets and will not be used by internal wallet nor written to
> disk.
>
> Arguments:
> 1. "type" (string, optional) one of: p2pkh, p2sh-p2wpkh
> default: p2sh-p2wpkh
>
> Result:
> {
> "privKey" (string) The private key in wif format.
> "address" (string) The address in p2pkh or p2sh-p2wpkh
> format.
> }
>
>
> Examples:
> > bitcoin-cli genexternaladdress
>
>
> ----
>
> This API is simple to implement and use. It provides enough
> functionality for any moderately skilled developer to create their own
> paper wallet creation script using any scripting language, or even for
> advanced users to perform using bitcoin-cli or debug console.
>
> If consensus here is in favor of including such an API, I will be happy
> to take a crack at implementing it and submitting a pull request.
>
> If anyone has reasons why it is a BAD IDEA to include such an RPC call
> in bitcoind, I'm curious to hear it.
>
> Also, I welcome suggestions for a better name, or maybe there could be
> some improvements to the param(s), such as calling p2sh-p2wpkh "segwit"
> instead.
>
>
> ---- further work ----
>
>
> Further steps could be taken in this direction, but are not necessary
> for a useful first-step. In particular:
>
> 1. an RPC call to generate an external HD wallet seed.
> 2. an RPC call to generate N key/address pairs from a given seed.
> 3. GUI functionality in bitcoin-qt to facilitate easy paper wallet
> generation (and printing?) for end-users, complete with nice graphics,
> qr codes, etc.
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
--
Andrew Johnson
--001a114441aebfb2cb055a57e550
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">One consideration of exposing this in QT is that it may en=
courage users to generate paper wallets(which are generally used and recomm=
ended for cold storage) from online machines, rendering them moreso lukewar=
m rather than cold, since the keys weren't generated in an air-gapped e=
nvironment.=C2=A0 When using <a href=3D"http://bitaddress.org">bitaddress.o=
rg</a> locally(we=C2=A0<i>are </i>all only=C2=A0using it locally and not di=
rectly from the online webpage, right? ;) )=C2=A0you've at least made t=
he effort to seek out the repo, clone it locally, and use it on an offline =
machine and not retain any data from that session.<div><br></div><div>If we=
include this as a function in the reference implementation, how many peopl=
e are going to be making paper wallets with the intention of cold storage o=
n a machine that's potentially compromised?=C2=A0 As adoption(hopefully=
) continues to increase the number of less than tech savvy people using bit=
coin will increase.</div><div><br></div><div>I'd suggest that any UI in=
QT include some sort of a modal dialog that informs the user that this is =
not a secure cold storage address unless it was created on an offline machi=
ne and printed on a non-networked printer, and the prompt must be accepted =
and dismissed before the wallet will provide the requested keys.</div><div>=
<br></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">O=
n Fri, Sep 29, 2017 at 12:29 PM, Dan Libby via bitcoin-dev <span dir=3D"ltr=
"><<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_b=
lank">bitcoin-dev@lists.linuxfoundation.org</a>></span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
solid;padding-left:1ex">Hi,<br>
<br>
I'm writing to suggest and discuss the addition of paper wallet<br>
functionality in bitcoin-core software, starting with a single new RPC<br>
call: genExternalAddress [type].<br>
<br>
-- rationale --<br>
<br>
bitcoin-core is the most trusted and most secure bitcoin implementation.<br=
>
<br>
Yet today (unless I've missed something) paper wallet generation<br>
requires use of third party software, or even a website such as<br>
<a href=3D"http://bitaddress.org" rel=3D"noreferrer" target=3D"_blank">bita=
ddress.org</a>.=C2=A0 This requires placing trust in an additional body of<=
br>
code from a less-trusted and less peer-reviewed source.=C2=A0 Ideally, one<=
br>
would personally audit this code for one's self, but in practice that<b=
r>
rarely happens.<br>
<br>
In the case of a website generator, the code must be audited again each<br>
time it is downloaded.=C2=A0 I cannot in good faith recommend to anyone to<=
br>
use such third party tools for wallet generation.<br>
<br>
I *would* recommend for others to trust a paper wallet that uses<br>
address(es) generated by bitcoin-core itself.<br>
<br>
At least for me, this requirement to audit (or implicitly trust) a<br>
secondary body of bitcoin code places an additional hurdle or<br>
disincentive on the use of paper wallets, or indeed private keys<br>
generated outside of bitcoin-core for any purpose.<br>
<br>
Unfortunately, one cannot simply use getnewaddress, getaccountaddress,<br>
or getrawchangeaddress for this purpose, because the associated private<br>
keys are added to the bitcoin-core wallet and cannot be removed... or in<br=
>
the case of hd-wallets are deterministically derived.<br>
<br>
As such, I'm throwing out the following half-baked proposal as a<br>
starting point for discussion:<br>
<br>
<br>
-----<br>
<br>
=C2=A0 =C2=A0 genexternaladdress ( "type" )<br>
<br>
=C2=A0 =C2=A0 Returns a new Bitcoin address and private key for receiving<b=
r>
=C2=A0 =C2=A0 payments. This key/address is intended for external usage suc=
h as<br>
=C2=A0 =C2=A0 paper wallets and will not be used by internal wallet nor wri=
tten to<br>
=C2=A0 =C2=A0 disk.<br>
<br>
=C2=A0 =C2=A0 Arguments:<br>
=C2=A0 =C2=A0 1. "type"=C2=A0 =C2=A0 =C2=A0 =C2=A0 (string, optio=
nal) one of: p2pkh, p2sh-p2wpkh<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 default:=
p2sh-p2wpkh<br>
<br>
=C2=A0 =C2=A0 Result:<br>
=C2=A0 =C2=A0 {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "privKey"=C2=A0 =C2=A0 (string) The p=
rivate key in wif format.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "address"=C2=A0 =C2=A0 (string) The a=
ddress in p2pkh or p2sh-p2wpkh<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 format.<br>
=C2=A0 =C2=A0 }<br>
<br>
<br>
=C2=A0 =C2=A0 Examples:<br>
=C2=A0 =C2=A0 > bitcoin-cli genexternaladdress<br>
<br>
<br>
----<br>
<br>
This API is simple to implement and use.=C2=A0 It provides enough<br>
functionality for any moderately skilled developer to create their own<br>
paper wallet creation script using any scripting language, or even for<br>
advanced users to perform using bitcoin-cli or debug console.<br>
<br>
If consensus here is in favor of including such an API, I will be happy<br>
to take a crack at implementing it and submitting a pull request.<br>
<br>
If anyone has reasons why it is a BAD IDEA to include such an RPC call<br>
in bitcoind, I'm curious to hear it.<br>
<br>
Also, I welcome suggestions for a better name, or maybe there could be<br>
some improvements to the param(s), such as calling p2sh-p2wpkh "segwit=
"<br>
instead.<br>
<br>
<br>
---- further work ----<br>
<br>
<br>
Further steps could be taken in this direction, but are not necessary<br>
for a useful first-step.=C2=A0 In particular:<br>
<br>
1. an RPC call to generate an external HD wallet seed.<br>
2. an RPC call to generate N key/address pairs from a given seed.<br>
3. GUI functionality in bitcoin-qt to facilitate easy paper wallet<br>
generation (and printing?) for end-users, complete with nice graphics,<br>
qr codes, etc.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.=
<wbr>linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.<wbr>org=
/mailman/listinfo/bitcoin-<wbr>dev</a><br>
</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div class=
=3D"gmail_signature" data-smartmail=3D"gmail_signature">Andrew Johnson<br><=
div><br></div></div>
</div>
--001a114441aebfb2cb055a57e550--
|