From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WKfaK-0003Fp-6g for bitcoin-development@lists.sourceforge.net; Tue, 04 Mar 2014 03:00:00 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.192.194 as permitted sender) client-ip=209.85.192.194; envelope-from=edmund.edgar@gmail.com; helo=mail-pd0-f194.google.com; Received: from mail-pd0-f194.google.com ([209.85.192.194]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WKfaE-0003Rp-6j for bitcoin-development@lists.sourceforge.net; Tue, 04 Mar 2014 03:00:00 +0000 Received: by mail-pd0-f194.google.com with SMTP id fp1so2415451pdb.1 for ; Mon, 03 Mar 2014 18:59:48 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.68.131.202 with SMTP id oo10mr23058428pbb.35.1393901988224; Mon, 03 Mar 2014 18:59:48 -0800 (PST) Sender: edmund.edgar@gmail.com Received: by 10.68.80.72 with HTTP; Mon, 3 Mar 2014 18:59:48 -0800 (PST) Date: Tue, 4 Mar 2014 11:59:48 +0900 X-Google-Sender-Auth: mSXbOG0yCJa_ODPb4SYRADuFrMM Message-ID: From: Edmund Edgar To: bitcoin-development@lists.sourceforge.net Content-Type: multipart/alternative; boundary=001a11c3611cdc260b04f3bf184f X-Spam-Score: -0.5 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.194 listed in list.dnswl.org] -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (edmund.edgar[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1WKfaE-0003Rp-6j Subject: [Bitcoin-development] Is this a safe thing to be doing with ECC addition? (Oracle protocol) 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: Tue, 04 Mar 2014 03:00:00 -0000 --001a11c3611cdc260b04f3bf184f Content-Type: text/plain; charset=UTF-8 Some people may have seen my service Reality Keys, which can perform a role a bit like an External State Oracle as described previously by Mike Hearn and others. (I like to think of it as a Certificate Authority for propositions, doing for facts what Verisign do for identities.) You register a possible outcome with us, we publish a public key for "yes" and another for "no", and once the outcome happens or fails to happen, we publish the appropriate private key. A few people have been asking for advice on the best way to use our keys to make m-of-n contracts, where each party locks up their stake in a transaction, then the winner gets their private key from Reality Keys and uses it to release the funds. Peter Todd suggested what seems like a very nice way to do this without needing non-standard transactions or refund transactions. I've had a go at implementing it and it seems to work, but I don't know enough about this to distinguish the ECC bit of it from magic, so I'm wondering if people who do understand it could comment on whether it's a safe thing to be doing. What I'm trying to do here is to combine the public key of each party with the public key of the outcome they're representing, eg I make a public key with: + ...and another with: + That goes into a 1/2 P2SH address (in the simplest possible case), which is spendable by one of Alice or Bob after the outcome occurs with either: + ...or + I'm making the transaction with add_pubkeys, then spending it with add_privkeys, both from: https://github.com/vbuterin/pybitcointools/blob/master/pybitcointools/main.py#L173 What's worrying my superstitious mind is that knowing before he has to produce , I'm wondering if there's something Bob could do with to intentionally weaken the resulting ( + ) so that he could sign a transaction with it without needing to know . My example script (and specifically the bit that's scaring me) is here: https://github.com/edmundedgar/realitykeys-examples/blob/master/realitykeysdemo.py#L247 PS. I hope I'm not too far off-topic. Peter Todd suggested it might be worth talking about here as it potentially has implications for other protocols. If people prefer to respond at bitcointalk instead, we've been discussing it here: https://bitcointalk.org/index.php?topic=260898.60 -- Edmund Edgar Founder, Social Minds Inc (KK) Twitter: @edmundedgar Linked In: edmundedgar Skype: edmundedgar http://www.socialminds.jp Reality Keys @realitykeys ed@realitykeys.com https://www.realitykeys.com --001a11c3611cdc260b04f3bf184f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Some people may have seen my service Reality Keys, wh= ich can perform a role a bit like an External State Oracle as described pre= viously by Mike Hearn and others. (I like to think of it as a Certificate A= uthority for propositions, doing for facts what Verisign do for identities.= ) You register a possible outcome with us, we publish a public key for &quo= t;yes" and another for "no", and once the outcome happens or= fails to happen, we publish the appropriate private key.

A few people have been asking for advice on the b= est way to use our keys to make m-of-n contracts, where each party locks up= their stake in a transaction, then the winner gets their private key from = Reality Keys and uses it to release the funds. Peter Todd suggested what se= ems like a very nice way to do this without needing non-standard transactio= ns or refund transactions. I've had a go at implementing it and it seem= s to work, but I don't know enough about this to distinguish the ECC bi= t of it from magic, so I'm wondering if people who do understand it cou= ld comment on whether it's a safe thing to be doing.

What I'm trying to do here is to combine the public= key of each party with the public key of the outcome they're represent= ing, eg I make a public key with:
=C2=A0<alice-pub> + <r= eality-key-yes-pub>
...and another with:
=C2=A0<bob-pub> + <reality-key= -no-pub>

That goes into a 1/2 P2SH address (in = the simplest possible case), which is spendable by one of Alice or Bob afte= r the outcome occurs with either:
=C2=A0<alice-priv> + <reality-key-yes-priv>
...o= r
=C2=A0<bob-priv> + <reality-key-no-priv>
=
I'm making the transaction with add_pubkeys, then spendi= ng it with add_privkeys, both from:

What's wo= rrying my superstitious mind is that knowing <reality-key-no-pub> bef= ore he has to produce <bob-pub>, I'm wondering if there's som= ething Bob could do with <bob-pub> to intentionally weaken the result= ing (<bob-pub> + <reality-key-no-pub>) so that he could sign a = transaction with it without needing to know <reality-key-no-priv>.

My example script (and specifically the bit that's = scaring me) is here:
https://github.com/= edmundedgar/realitykeys-examples/blob/master/realitykeysdemo.py#L247

PS. I hope I'm not too far off-topic. Peter Todd su= ggested it might be worth talking about here as it potentially has implicat= ions for other protocols. If people prefer to respond at bitcointalk instea= d, we've been discussing it here:

--=C2=A0
Edmund Edgar
Founder, Social = Minds Inc (KK)
Twitter: @edmundedgar
Linked In: edmundedgar
Skype= : edmundedgar

--001a11c3611cdc260b04f3bf184f--