Dan Libby [ARCHIVE] on Nostr: 📅 Original date posted:2017-09-29 📝 Original message:Hi, I'm writing to suggest ...
📅 Original date posted:2017-09-29
📝 Original message: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.
Published at
2023-06-07 18:06:39Event JSON
{
"id": "04c679afecadd63994649eaeb66ee543aac8e5cbe084322b8a479bacc4e9fa82",
"pubkey": "bee276d1ae3341411bf36280d4da29fe701581dff23dcd2a5d7ac65535f7d8f9",
"created_at": 1686161199,
"kind": 1,
"tags": [
[
"e",
"adbe104cdeb184e2b9ee2e7441c0306f637c427dfa72914e557b36050055e79e",
"",
"reply"
],
[
"p",
"a23dbf6c6cc83e14cc3df4e56cc71845f611908084cfe620e83e40c06ccdd3d0"
]
],
"content": "📅 Original date posted:2017-09-29\n📝 Original message:Hi,\n\nI'm writing to suggest and discuss the addition of paper wallet\nfunctionality in bitcoin-core software, starting with a single new RPC\ncall: genExternalAddress [type].\n\n-- rationale --\n\nbitcoin-core is the most trusted and most secure bitcoin implementation.\n\nYet today (unless I've missed something) paper wallet generation\nrequires use of third party software, or even a website such as\nbitaddress.org. This requires placing trust in an additional body of\ncode from a less-trusted and less peer-reviewed source. Ideally, one\nwould personally audit this code for one's self, but in practice that\nrarely happens.\n\nIn the case of a website generator, the code must be audited again each\ntime it is downloaded. I cannot in good faith recommend to anyone to\nuse such third party tools for wallet generation.\n\nI *would* recommend for others to trust a paper wallet that uses\naddress(es) generated by bitcoin-core itself.\n\nAt least for me, this requirement to audit (or implicitly trust) a\nsecondary body of bitcoin code places an additional hurdle or\ndisincentive on the use of paper wallets, or indeed private keys\ngenerated outside of bitcoin-core for any purpose.\n\nUnfortunately, one cannot simply use getnewaddress, getaccountaddress,\nor getrawchangeaddress for this purpose, because the associated private\nkeys are added to the bitcoin-core wallet and cannot be removed... or in\nthe case of hd-wallets are deterministically derived.\n\nAs such, I'm throwing out the following half-baked proposal as a\nstarting point for discussion:\n\n\n-----\n\n genexternaladdress ( \"type\" )\n\n Returns a new Bitcoin address and private key for receiving\n payments. This key/address is intended for external usage such as\n paper wallets and will not be used by internal wallet nor written to\n disk.\n\n Arguments:\n 1. \"type\" (string, optional) one of: p2pkh, p2sh-p2wpkh\n default: p2sh-p2wpkh\n\n Result:\n {\n \"privKey\" (string) The private key in wif format.\n \"address\" (string) The address in p2pkh or p2sh-p2wpkh\n format.\n }\n\n\n Examples:\n \u003e bitcoin-cli genexternaladdress\n\n\n----\n\nThis API is simple to implement and use. It provides enough\nfunctionality for any moderately skilled developer to create their own\npaper wallet creation script using any scripting language, or even for\nadvanced users to perform using bitcoin-cli or debug console.\n\nIf consensus here is in favor of including such an API, I will be happy\nto take a crack at implementing it and submitting a pull request.\n\nIf anyone has reasons why it is a BAD IDEA to include such an RPC call\nin bitcoind, I'm curious to hear it.\n\nAlso, I welcome suggestions for a better name, or maybe there could be\nsome improvements to the param(s), such as calling p2sh-p2wpkh \"segwit\"\ninstead.\n\n\n---- further work ----\n\n\nFurther steps could be taken in this direction, but are not necessary\nfor a useful first-step. In particular:\n\n1. an RPC call to generate an external HD wallet seed.\n2. an RPC call to generate N key/address pairs from a given seed.\n3. GUI functionality in bitcoin-qt to facilitate easy paper wallet\ngeneration (and printing?) for end-users, complete with nice graphics,\nqr codes, etc.",
"sig": "0b41ebd8796609b0770fa36a390940285de7c7268b248adaa52fa9e4c09cdf6aa24355e2da8a0c89e06f2090378dcc44e42270933174a336e2961a271f94aa5f"
}