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 C178A16F3 for ; Mon, 18 Feb 2019 23:24:27 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id ACA1B786 for ; Mon, 18 Feb 2019 23:24:26 +0000 (UTC) Received: by mail-wr1-f51.google.com with SMTP id r5so6795038wrg.9 for ; Mon, 18 Feb 2019 15:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mcQ/V/bLvSCLNNP4oBFSlJdrLv5Jp7k5mVBi8QgaXF0=; b=vMVzRsFgSkeVrwy709As61cAgjPeGwFOM9qd9kGXX+gNRcX/m+AtHjIcee65DeT1Ae BG6VwPZ1EC4h9LpWt7M13kSpJmwryATJmT/Jf6lM7n+wge1iZ3Wxc6TtcPoIFzaFQZyM OCImegC2v7OAK3x2yNDjXy57HDJhAm+pR4ulcEV1SHrQnd6n3xFNt46KjKwAfzWZYC/d qTwhHDnIfl3wB/vmP/Ya6UuAKf+UzMHqQwW0hcYwqQnK5NdI9nm7ya9uOFYHOZrHKBn7 5EBBl/4eYSLRj9LCjICNPf1KRlel+SXWtlklZxLF4fm+810JQaaH7jJIQW6+/+ltr70d 0xOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mcQ/V/bLvSCLNNP4oBFSlJdrLv5Jp7k5mVBi8QgaXF0=; b=YDZsh6XqwsFq9vDs7QdBEX3JT8kCdWNli7aBvwVWNRl7ILAm+NSVbcElh8DD99tylU aqWD5VxuXdnqr1RQAdDFPBvU6sXpcfumS6Kzzz0sDCftB5qfakzkkWtCZ4P5eNr8PqzG Ub9bjvoHg09afflKjH1KeOME+GadhXbCk+CL6OtxuQdshP9GGtbszUVfAPDMD/4adl2/ GB2fKcocHvVchIuwIq4jXfno4nyyp1zxtXyYbCgIvcQk1rF6M82LtkhAU9hoTe/MeR5A uf0Yl0ORNgNr0PqIoBubT0Z5mFhbqBa3/x5wz+HFIufdXRudvV5Meaf55lkrqanVht5n Q/Tg== X-Gm-Message-State: AHQUAuZvk/DjJSoFY/LNeYJ2R+wYHpfkg6C6sAoc3ryA/efBxvcHZNKg cimeCKYRt/wWQB0yok60T1TAqMs7XgseV+sofVo= X-Google-Smtp-Source: AHgI3Iah1yP1CDQE78qtgcVabE2GDg9r3Xkfuu9Fsyw42ngCY9ZB4Ep3TPJpOHoO9dyrij2Cgb5PASPpL8NE4HTJmUo= X-Received: by 2002:adf:9c85:: with SMTP id d5mr4443061wre.68.1550532265089; Mon, 18 Feb 2019 15:24:25 -0800 (PST) MIME-Version: 1.0 References: <5c7fac0f-818b-d78d-5d5f-7a029fdd05ef@gmail.com> In-Reply-To: <5c7fac0f-818b-d78d-5d5f-7a029fdd05ef@gmail.com> From: Christopher Gilliard Message-ID: To: Aymeric Vitte Content-Type: multipart/alternative; boundary="000000000000dfa27c0582336c31" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Wed, 06 Mar 2019 00:22:07 +0000 Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] BIP proposal - Signatures of Messages using Bitcoin Private Keys 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: , Date: Mon, 18 Feb 2019 23:24:27 -0000 X-Original-Date: Mon, 18 Feb 2019 15:24:44 -0800 X-List-Received-Date: Mon, 18 Feb 2019 23:24:27 -0000 --000000000000dfa27c0582336c31 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The proposal includes actual code that does verification, but I didn't include code for signing. I thought it could be inferred, but I could at least include a description of how to sign. I am not sure exactly what part you are referring to by "keys speech", but the signatures are done by ECDSA keys so it's hard to not include anything about keys even though that's not the main topic. The "Background on ECDSA keys" section was mainly meant to give background about what kind of keys Bitcoin uses, for people who already know that they can easily skip this section so I would probably think it's best just to leave in. Maybe it should be at the end as an addendum though. Yes, I did not invent any of this, I'm just documenting what people actually seem to do because I had to verify signatures as part of a project I'm working on. I would have liked to have had this document when I started the project so I thought it might be useful to others since as far as I can tell this was not specified anywhere. The reason for including this data in the header is the same that compressed/uncompressed is included in the header so that you know which type of key the signature is from and you don't have to try all options to see if any matches. This is why Trezor did that way and why I documented it. I'm sure there are other ways to do this, but since this is out there in the field being used and is a reasonable solution, I thought I'd write it up. On Mon, Feb 18, 2019 at 2:59 PM Aymeric Vitte wrote: > Then, since you wrote this proposal, maybe you should add the very precis= e > description of the signing/verification process since it is documented > nowhere > > I don't get the use of the speech regarding keys while it should focus on > signatures which are summarized in a vague sentence inspired by your ref > [2] with a not very logical link to the next paragraph stating that r,s > should be 32B and the whole thing 65B with a header of 1B, you did not > invent it, that's probably the rule, not sure where it is specified again > and for what purpose, the header seems completely of no use especially wh= en > you extend to segwit/bech32 since you just have to check that related > compressed key matches > Le 17/02/2019 =C3=A0 15:14, Christopher Gilliard via bitcoin-dev a =C3=A9= crit : > > I have written up a proposed BIP. It has to do with Signature formats whe= n > using Bitcoin Private keys. It is here: > https://github.com/cgilliard/BIP/blob/master/README.md > > This BIP was written up as suggested in this github issue: > https://github.com/bitcoin/bitcoin/issues/10542 > > Note that the proposal is inline with the implementation that Trezor > implemented in the above issue. > > Any feedback would be appreciated. Please let me know what the steps are > with regards to getting a BIP number assigned or any other process steps > required. > > Regards, > Chris > > _______________________________________________ > bitcoin-dev mailing listbitcoin-dev@lists.linuxfoundation.orghttps://list= s.linuxfoundation.org/mailman/listinfo/bitcoin-dev > > -- > Move your coins by yourself (browser version): https://peersm.com/wallet > Bitcoin transactions made simple: https://github.com/Ayms/bitcoin-transac= tions > Zcash wallets made simple: https://github.com/Ayms/zcash-wallets > Bitcoin wallets made simple: https://github.com/Ayms/bitcoin-wallets > Get the torrent dynamic blocklist: http://peersm.com/getblocklist > Check the 10 M passwords list: http://peersm.com/findmyass > Anti-spies and private torrents, dynamic blocklist: http://torrent-live.o= rg > Peersm : http://www.peersm.com > torrent-live: https://github.com/Ayms/torrent-live > node-Tor : https://www.github.com/Ayms/node-Tor > GitHub : https://www.github.com/Ayms > > --000000000000dfa27c0582336c31 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The proposal includes actual code that does verification, = but I didn't include code for signing. I thought it could be inferred, = but I could at least include a description of how to sign. I am not sure ex= actly what part you are referring to by "keys speech", but the si= gnatures are done by ECDSA keys so it's hard to not include anything ab= out keys even though that's not the main topic. The "Background on= ECDSA keys" section was mainly meant to give background about what ki= nd of keys Bitcoin uses, for people who already know that they can easily s= kip this section so I would probably think it's best just to leave in.= =C2=A0 Maybe it should be at the end as an addendum though. Yes, I did not = invent any of this, I'm just documenting what people actually seem to d= o because I had to verify signatures as part of a project I'm working o= n. I would have liked to have had this document when I started the project = so I thought it might be useful to others since as far as I can tell this w= as not specified anywhere. The reason for including this data in the header= is the same that compressed/uncompressed is included in the header so that= you know which type of key the signature is from and you don't have to= try all options to see if any matches. This is why Trezor did that way and= why I documented it. I'm sure there are other ways to do this, but sin= ce this is out there in the field being used and is a reasonable solution, = I thought I'd write it up.

On Mon, Feb 18, 2019 at 2:59 PM Aymeric Vitte= <vitteaymeric@gmail.com&g= t; wrote:
=20 =20 =20

Then, since you wrote this proposal, maybe you should add the very precise description of the signing/verification process since it is documented nowhere

I don't get the use of the speech regarding keys while it should focus on signatures which are summarized in a vague sentence inspired by your ref [2] with a not very logical link to the next paragraph stating that r,s should be 32B and the whole thing 65B with a header of 1B, you did not invent it, that's probably the rule, not sure where it is specified again and for what purpose, the header seems completely of no use especially when you extend to segwit/bech32 since you just have to check that related compressed key matches

Le 17/02/2019 = =C3=A0 15:14, Christopher Gilliard via bitcoin-dev a =C3=A9crit=C2=A0:
=20
______________=
_________________________________
bitcoin-dev mailing list
bitcoin-dev@li=
sts.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
--=
=20
Move your coins by yourself (browser version): https://peersm.com/wallet
Bitcoin transactions made simple: https://github.com/Ayms/bitcoin-transactions
Zcash wallets made simple: https://github.com/Ayms/zcash-wallets
Bitcoin wallets made simple: https://github.com/Ayms/bitcoin-wallets
Get the torrent dynamic blocklist: http://peersm.com/getblocklist
Check the 10 M passwords list: htt=
p://peersm.com/findmyass
Anti-spies and private torrents, dynamic blocklist: http://torrent-live.org
Peersm : http://www.peersm.com
torrent-live: https://git=
hub.com/Ayms/torrent-live
node-Tor : https://www.gi=
thub.com/Ayms/node-Tor
GitHub : https://www.github.com/A=
yms
--000000000000dfa27c0582336c31--