From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YlpvB-0000Fj-51 for bitcoin-development@lists.sourceforge.net; Sat, 25 Apr 2015 02:34:21 +0000 Received: from mail-ig0-f169.google.com ([209.85.213.169]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Ylpv9-000375-Ay for bitcoin-development@lists.sourceforge.net; Sat, 25 Apr 2015 02:34:21 +0000 Received: by igbyr2 with SMTP id yr2so29005257igb.0 for ; Fri, 24 Apr 2015 19:34:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=mMOXfI62+pT6lAHnEnyl+XikcQ67jmaxcDOkfk+GpRY=; b=a/fbYAc7o2a3rDi5PU0B4ad1ot1TgajPbyq+zGhsqjf7tHlhQMoxldBNwClXSo2rcq zjoAQrNkwakgVD3xKQaeHmkpsD5xo8LdglO6e9cwvnlfS/GQigkxHh0uLSVsiSJwQHcA eUSv/R3/+srb9h/o46kTDxxG9kOLXGlW8/Rf8fY3NN353oHiKqbLXedP4cEABnz1/DJP NCddPjSdhidoAeqtPjtdV8C2RZaeIth6Jn9gU2hbmuS2Bg1rI4uo10q+OnFr2aY5NBdC OSfRwoNhnx4lf56qMzuCxUe33JG7vn6kKUi2Dx4MsM+cbQr0cO1ybAdYjpYfqtR0BliU GZ6w== X-Gm-Message-State: ALoCoQk1p8Oc3XGH1ap1XUE2avz29vV3fIGDP8MAYLQW5Qpi6Y+27IbASdU3DJyoRTet4ehVtiLZ MIME-Version: 1.0 X-Received: by 10.50.126.105 with SMTP id mx9mr1035417igb.21.1429929253955; Fri, 24 Apr 2015 19:34:13 -0700 (PDT) Received: by 10.36.205.135 with HTTP; Fri, 24 Apr 2015 19:34:13 -0700 (PDT) In-Reply-To: References: <1AE7B0A2-90EE-42EE-9D30-4DC1B5892E53@newcastle.ac.uk> Date: Sat, 25 Apr 2015 04:34:13 +0200 Message-ID: From: Justus Ranvier To: Gregory Maxwell Content-Type: multipart/alternative; boundary=047d7b4145d43c7e6d05148359d5 X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.0 HTML_MESSAGE BODY: HTML included in message X-Headers-End: 1Ylpv9-000375-Ay Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] Fwd: Reusable payment codes X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 02:34:21 -0000 --047d7b4145d43c7e6d05148359d5 Content-Type: text/plain; charset=UTF-8 On Sat, Apr 25, 2015 at 3:30 AM, Gregory Maxwell wrote: > On Sat, Apr 25, 2015 at 12:22 AM, Justus Ranvier > wrote: > > Taking the hash of the secret would then require an extra step to make > sure > > the hash is valid for secp256k1. > > The x value may not be a valid member of the group, effectively the > same as with a hash. Its also very unequally distributed, as only > about half the possible values are points on the curve. ack > > With 97 byte standard OP_RETURN values the ephemeral public > > key could be appended to the chain code, but that's undesirable for > other reasons. > > Can you elaborate? Storing a ~33 byte (deterministically generated) > ephemeral key should be all that is required. Everything else, > including the chain code could be derived from it. What reason do you > have to include additional data? > The goal of the notification transaction is to send the same payment code to every recipient, but obscure the identity of the sender of the notification transaction from third party blockchain observers. The shared secret is used for that purpose, and the sender's public key used for ECDH can't be one derived from the payment code since the recipient doesn't yet know the payment code. The notification transaction needs to communicate the 65 byte payment code along with one ephemeral public key used for ECDH. If that ephemeral key is not located in a signature script, it has to be somewhere else (such as in the same OP_RETURN output as the payment code.) > > Taking the SHA512 of something less than 512 bits seemed wrong. > > Why should it? Adding the Y does not increase the entropy at all. As > an aside, I think this can be reformulated to only need 256 bits of > output, and then the need for yet-another-hash-function could be > avoided in some cases. > Already fixed in https://github.com/justusranvier/rfc/commit/8c4d3429012eb15847c4ae68f212c8b2dcd1b521 but it would be good to get confirmation of whether the way I fixed it is valid. > In this proposal I optimized for non-reliance on third party services > > The requirement for inputs is a guaranteed dependency on third party > services; so if thats whats being optimized for here it must go (well, > I think it must go for the reason of avoiding blocking users from > using other schemes to control their coins too..). > I'm not sure what you mean by "the requirement for inputs is a guaranteed dependency on third party services" At the proposal currently stands, an SPV wallet will have no trouble sending or receiving notification transactions without access to a third party service. The recipient just needs to see the transactions associated with its notification address. The point about restricting the types of scripts used as inputs is valid, but I think workarounds are available. If nothing else, the sender can make a suitable input using it's own (suitably mixed) coins first. > I agree. I could not find a straightforward way to express a > multisignature payment code in less than 80 bytes. > > A prior stealth address proposal here handled them fine with only a > single ephemeral point in the op_return. It does result in a longer > address (is that what you're referring to with '80 bytes'?) > I considered defining an additional path level for deterministic m-of-n multisig and adding a few bytes to the payment code to express those parameters, but thought it would be too limiting since it would preclude multisig with truly independent keys. It is a thing that could be done, however. > Exchanges could restrict bitcoin withdrawals to a single payment code > known to be associated with their identified customer. > > In some jurisdictions the ability to prove that withdrawals are sent to > a positively-identified party, rather than arbitrary third parties, might > move some Bitcoin businesses out of money transmitter territory into less > onerous regulatory situations. > > But this mandates horrible key management practices, reliance on a > single "hardcoded" private key which you cannot change; even if it > might be compromised or lost to the wind. It's less horrible than > sticking to a single address because it doesn't wedge privacy, I > agree; but care should be taken that a tortured dance for confused > regulatory cargo-cult reasons doesn't mandate people not engage in > sound practices like periodic key rotation. :) > Cold storage is still available (if admittedly less convenient than in traditional wallets). I would expect exchanges in practice to allow for payment codes to be changed, just with non-trivial waiting periods and plenty of human overview. It would be an infrequent event compared to the frequency of withdrawals. Various schemes which use public key authentication instead of passwords for web site authentication could be used to continually verify that the user hasn't lost access to the key. --047d7b4145d43c7e6d05148359d5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On S= at, Apr 25, 2015 at 3:30 AM, Gregory Maxwell <gmaxwell@gmail.com>= wrote:
On Sat, Apr 25, 2015 at= 12:22 AM, Justus Ranvier
<justus.ranvier@monetas.ne= t> wrote:
> Taking the hash of the secret would then require an extra step to make= sure
> the hash is valid for secp256k1.

The x value may not be a valid member of the group, effectively the<= br> same as with a hash. Its also very unequally distributed, as only
about half the possible values are points on the curve.
ack
=C2=A0
&g= t; With 97 byte standard OP_RETURN values the ephemeral public
> key could be appended to the chain code, but that's undesirable fo= r other reasons.

Can you elaborate?=C2=A0 Storing a ~33 byte (deterministically gener= ated)
ephemeral key should be all that is required. Everything else,
including the chain code could be derived from it. What reason do you
have to include additional data?

The go= al of the notification transaction is to send the same payment code to ever= y recipient, but obscure the identity of the sender of the notification tra= nsaction from third party blockchain observers.

The shared secret is= used for that purpose, and the sender's public key used for ECDH can&#= 39;t be one derived from the payment code since the recipient doesn't y= et know the payment code.

The notification transaction needs = to communicate the 65 byte payment code along with one ephemeral public key= used for ECDH. If that ephemeral key is not located in a signature script,= it has to be somewhere else (such as in the same OP_RETURN output as the p= ayment code.)
=C2=A0
> Taking the SHA512 of something less than 512 bits seemed wrong.

Why should it?=C2=A0 Adding the Y does not increase the entropy at a= ll.=C2=A0 As
an aside, I think this can be reformulated to only need 256 bits of
output, and then the need for yet-another-hash-function could be
avoided in some cases.

Already fixed in= https://github.com/justusranvier/rfc/commit/8c4d3429= 012eb15847c4ae68f212c8b2dcd1b521 but it would be good to get confirmati= on of whether the way I fixed it is valid.=C2=A0

> In this proposal I optimized for non-relia= nce on third party services

The requirement for inputs is a guaranteed dependency on third party=
services; so if thats whats being optimized for here it must go (well,
I think it must go for the reason of avoiding blocking users from
using other schemes to control their coins too..).
I'm not sure what you mean by "the requirement for inp= uts is a guaranteed dependency on third party
services"=C2= =A0

At the proposal currently stands, an SPV wallet will have no tro= uble sending or receiving notification transactions without access to a thi= rd party service. The recipient just needs to see the transactions associat= ed with its notification address.

The point about = restricting the types of scripts used as inputs is valid, but I think worka= rounds are available. If nothing else, the sender can make a suitable input= using it's own (suitably mixed) coins first.

> I agree. I could not find a straightforwa= rd way to express a multisignature payment code in less than 80 bytes.

A prior stealth address proposal here handled them fine with only a<= br> single ephemeral point in the op_return. It does result in a longer
address (is that what you're referring to with '80 bytes'?)
=

I considered defining an additional path l= evel for deterministic m-of-n multisig and adding a few bytes to the paymen= t code to express those parameters, but thought it would be too limiting si= nce it would preclude multisig with truly independent keys. It is a thing t= hat could be done, however.

> Exchanges could restrict bitcoin withdrawals to a single paymen= t code known to be associated with their identified customer.
> In some jurisdictions the ability to prove tha= t withdrawals are sent to a positively-identified party, rather than arbitr= ary third parties, might move some Bitcoin businesses out of money transmit= ter territory into less onerous regulatory situations.

But this mandates horrible key management practices, reliance on a single "hardcoded" private key which you cannot change; even if i= t
might be compromised or lost to the wind. It's less horrible than
sticking to a single address because it doesn't wedge privacy, I
agree; but care should be taken that a tortured dance for confused
regulatory cargo-cult reasons doesn't mandate people not engage in
sound practices like periodic key rotation. :)

Cold storage is sti= ll available (if admittedly less convenient than in traditional wallets).
I would expect exchanges in practice to allow for payment codes to be= changed, just with non-trivial waiting periods and plenty of human overvie= w. It would be an infrequent event compared to the frequency of withdrawals= .

Various schemes which use public key authentication instead of pas= swords for web site authentication could be used to continually verify that= the user hasn't lost access to the key.
--047d7b4145d43c7e6d05148359d5--