Bitcoin Forum

Bitcoin => Project Development => Topic started by: 🏰 TradeFortress 🏰 on June 24, 2013, 07:07:28 AM



Title: A simple Bitcoin message signing format.
Post by: 🏰 TradeFortress 🏰 on June 24, 2013, 07:07:28 AM
The problem with the current message signing is that you don't know when the signed message begins or when it ends, and you might need to try a few times to sort through all the different whitespace. You'll also need to paste multiple things. I propose a new standard clearsign format:

-----BEGIN BITCOIN SIGNED MESSAGE-----
[message, beginning and end whitespace / newlines ignored]
-----BEGIN SIGNATURE-----
[bitcoin address]
[message signature]
-----END BITCOIN SIGNED MESSAGE-----

There. Clients may append a timestamp to the message. The message is the part that is signed and verified.


Title: Re: A simple Bitcoin message signing format.
Post by: 🏰 TradeFortress 🏰 on June 25, 2013, 07:48:41 AM
-----BEGIN BITCOIN SIGNED MESSAGE-----
Signed by Inputs.io on 25/06/13 07:50:30

This is a signed message generated by Inputs.io

-----BEGIN SIGNATURE-----
1MDeZptpVfaNemwoSpeeph2P1UgHuQM62m
IIW/rq62ip/MtTSZbCZSdoQSkJKeWPyp6yJ1MxQFhzfmMlnSib1QUsYt8FOMYw9zzr4BnLfPM/0bIlPVDiKVE6U=
-----END BITCOIN SIGNED MESSAGE-----


Title: Re: A simple Bitcoin message signing format.
Post by: Astrohacker on June 25, 2013, 02:23:00 PM
Looks good to me, except the bitcoin signature is 88 chars long, which is longer than the 80 chars that is standard. The simplest thing to do is let the signature wrap with a limit of 80 chars per line. Then just remove the whitespace when reconstructing the signature. In other words, here's your signature:

-----BEGIN BITCOIN SIGNED MESSAGE-----
Signed by Inputs.io on 25/06/13 07:50:30

This is a signed message generated by Inputs.io

-----BEGIN SIGNATURE-----
1MDeZptpVfaNemwoSpeeph2P1UgHuQM62m
IIW/rq62ip/MtTSZbCZSdoQSkJKeWPyp6yJ1MxQFhzfmMlnSib1QUsYt8FOMYw9zzr4BnLfPM/0bIlPV
DiKVE6U=
-----END BITCOIN SIGNED MESSAGE-----


Title: Re: A simple Bitcoin message signing format.
Post by: Astrohacker on June 25, 2013, 02:25:19 PM
Then again, it's not like it matters if a line is longer than 80 chars, and letting the line extend past 80 chars makes it easier to verify the signature manually.


Title: Re: A simple Bitcoin message signing format.
Post by: jackjack on June 26, 2013, 11:06:30 AM

-----BEGIN BITCOIN SIGNED MESSAGE-----
[message, beginning and end whitespace / newlines ignored]
-----BEGIN SIGNATURE-----

So you want to use a different way of formatting than RFC2440?


Title: Re: A simple Bitcoin message signing format.
Post by: 🏰 TradeFortress 🏰 on June 29, 2013, 01:08:27 AM

-----BEGIN BITCOIN SIGNED MESSAGE-----
[message, beginning and end whitespace / newlines ignored]
-----BEGIN SIGNATURE-----

So you want to use a different way of formatting than RFC2440?

(i) This isn't PGP
(ii) This reduces errors
(iii) This isn't PGP


Title: Re: A simple Bitcoin message signing format.
Post by: Jaxkr on June 29, 2013, 02:58:20 AM
I like this format. It's nice and clean.

Signature: 1JaxkrMxYZQiqtKExdwB1NAAE98mQ4RRVt, HDTel+fouy0KILgU6PGUuF1fJ4c9c7JItSR/KZvtm0WKnIw4HiC7JidJY7ITjQo4ohy9jsoCcSWDr/72Oevp30U=

The format would be message with whitespace, then a blank line, then "Signature: ", followed by the address used for signing, followed by a comma and a space, then finally the signature.


Title: Re: A simple Bitcoin message signing format.
Post by: jackjack on June 29, 2013, 09:32:38 AM

-----BEGIN BITCOIN SIGNED MESSAGE-----
[message, beginning and end whitespace / newlines ignored]
-----BEGIN SIGNATURE-----

So you want to use a different way of formatting than RFC2440?

(i) This isn't PGP
(ii) This reduces errors
(iii) This isn't PGP
http://orlyowl.tripod.com/sitebuildercontent/sitebuilderpictures/orly.jpg

Anyway that's not my point, you copy the '-----BEGIN SIGNATURE-----' syntax so that's strange not to use the message syntax too
If this is not PGP and can't even bear to hear about it when you propose such a thing then use another syntax like '^^^^BEGIN BITCOIN SIGNATURE^^^^'

Also, etotheipi will soon implement (https://bitcointalk.org/index.php?topic=179422.0) a signing format in Armory and will talk about it to the bitcoin devs
Do you want to make another format?
http://imgs.xkcd.com/comics/standards.png

(ii) Yeah, people made on purpose the RFC2440 because it creates more errors