From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 7B684258 for ; Sun, 17 Sep 2017 08:10:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 0634E1E1 for ; Sun, 17 Sep 2017 08:10:20 +0000 (UTC) X-Originating-IP: 188.102.137.68 Received: from [192.168.2.134] (dslb-188-102-137-068.188.102.pools.vodafone-ip.de [188.102.137.68]) (Authenticated sender: thomasv@electrum.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 214E841C080 for ; Sun, 17 Sep 2017 10:10:18 +0200 (CEST) To: Bitcoin Dev References: <34198916-cde9-c84d-ca41-9feb8956bd80@electrum.org> From: Thomas Voegtlin Message-ID: <0dc0336b-d590-ffe9-8689-6ae06e98a39d@electrum.org> Date: Sun, 17 Sep 2017 10:10:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=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 Subject: Re: [bitcoin-dev] proposal: extend WIF format for segwit X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 08:10:21 -0000 On 17.09.2017 04:29, Pieter Wuille wrote: > > This has been a low-priority thing for me, though, and the computation work > to find a good checksum is significant. > Thanks for the info. I guess this means that a bech32 format for private keys is not going to happen soon. Even if such a format was available, the issue would remain for segwit-in-p2sh addresses, which use base58. The ambiguity of the WIF format is currently holding me from releasing a segwit-capable version of Electrum. I believe it is not acceptable to use the current WIF format with segwit scripts; that would just create technological debt, forcing wallets to try all possible scripts. There is a good reason why WIF adds a 0x01 byte for compressed pubkeys; it makes it unambiguous. I see only two options: 1. Disable private keys export in Electrum Segwit wallets, until a common WIF extension has been agreed on. 2. Define my own WIF extension for Electrum, and go ahead with it. Defining my own format does make sense for the xpub/xprv format, because Electrum users need to share master public keys across Electrum wallets. It makes much less sense for WIF, though, because WIF is mostly used to import/sweep keys from other wallets. I would love to know what other wallet developers are going to do, especially Core. Are you going to export private keys used in segwit scripts in the current WIF format?