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 1WsAhO-0003tu-BA for bitcoin-development@lists.sourceforge.net; Wed, 04 Jun 2014 12:53:46 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of petertodd.org designates 62.13.148.106 as permitted sender) client-ip=62.13.148.106; envelope-from=pete@petertodd.org; helo=outmail148106.authsmtp.co.uk; Received: from outmail148106.authsmtp.co.uk ([62.13.148.106]) by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1WsAhM-0001Mp-Ci for bitcoin-development@lists.sourceforge.net; Wed, 04 Jun 2014 12:53:46 +0000 Received: from mail-c235.authsmtp.com (mail-c235.authsmtp.com [62.13.128.235]) by punt18.authsmtp.com (8.14.2/8.14.2/) with ESMTP id s54CrbIk098106; Wed, 4 Jun 2014 13:53:37 +0100 (BST) Received: from savin (76-10-178-109.dsl.teksavvy.com [76.10.178.109]) (authenticated bits=128) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id s54CrVYa067958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 4 Jun 2014 13:53:34 +0100 (BST) Date: Wed, 4 Jun 2014 08:54:50 -0400 From: Peter Todd To: bitcoin-development@lists.sourceforge.net Message-ID: <20140604125450.GA11605@savin> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Server-Quench: 3d758367-ebe7-11e3-b396-002590a15da7 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd2Yg0TA1ZNQRgX IjsJECJaVQIpKltL GxAVKBZePFsRUQkR aAdMdgYUEkAaAgsB AmIbWldeVV57WmY7 bAxPbAVDY01GQQRq WVdMSlVNFUsrBBhy RHh3Axl0cAxDcDB1 Z05nXz5YCEN/fUV7 RVMBRzgBeGZhPWMC AkNRcR5UcAFPdx8U a1UrBXRDBTxaMyY/ FAxhdywwODgaMilR TwgWIBofR00RDyYg RhcEVTQpFkADWyQt LgcrJhYWDQ47M1k5 NlonQjp/ X-Authentic-SMTP: 61633532353630.1023:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 76.10.178.109/587 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [62.13.148.106 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1WsAhM-0001Mp-Ci Cc: Amir Taaki Subject: [Bitcoin-development] Timelock: time-release encryption incentivised by Bitcoins 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: Wed, 04 Jun 2014 12:53:46 -0000 --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Decided to take a break yesterday and write some code... Timelock =3D=3D=3D=3D=3D=3D=3D=3D Create a secret key that can be decrypted in a known amount of time using parallel-serial hash chains. The creator can compute the timelock in parallel, taking advantage of the large amount of cheap parallelism available today, while others are forced to compute it serially, constrained by the lack of scalar performance growth. The chains are constructed such that Bitcoin addresses can be derived =66rom them and bounties placed, incentivizing third-parties to crack the timelocks. This gives us a valuable chance to incentivize others to push the envelope of scalar performance - important knowledge if we are going to have any hope of knowing how soon our timelocked secrets will actually be revealed! The Bitcoin secret keys and addresses are constructed from the chains as follows: iv -> -> privkey -> pubkey -> secret -> hashed_secret secret =3D SHA256(pubkey) hashed_secret =3D RIPEMD160(secret) Unlocking a given chain starting from the initialization vector gives the person doing the work the private key, giving them an exclusive opportunity to collect the bounty. Collecting that bounty forces them to reveal the pubkey, from which the secret is derived. The hashed_secret is then just a standard Bitcoin address, letting everyone see how large the bounty is for unlocking the timelock. Only a single algorithm - SHA256 - is supported by design: timelock encryption works best if we're all on an even playing field. Sourcecode: https://github.com/petertodd/timelock Credit goes to Amir Taaki for helping develop the idea. To make things interesting I've made a ~256 hour timelock with 32 chains, 8 hours per chain. The addresses associated are as follows: 1ERvMr5J8FETF7zj4QM98u8ZANaL1o9XGZ 18h7LwKpd9c6u8zJka3vMCASa8BfbiZFd4 1DBJDp57QmbigLEbUsFeqJT3mkArGzH3gv 1C1d6Tj7mZADurfj5yJ64p5BeRstquk7pu 1FsH58jnq5Kc6D7hb7vmUhjh8fwnijiWss 1PDwPYStrrkKpGtV2zX71XCDYL3E2g3KM7 1BF6oYLeTG7WxNWJjC8p4SHz62q7vgZhXX 1DxFiHr9ehVvi8JR2Cc5pcD4DEURUeFFda 1NKg3buX5BzhYgSY6Yvws9kMqZ6F1xnneD 1Kptov9sgDqQcavz1rVsuQvfi8PcQcL4rc 1P9k1HEfe3Z8LaiFejqsuDLjWXPZk1coDL 1Mw25mU89Wp2b9zyMCSnjAVQ7x4AVWx3sf 1B8gdbd1StpVnV99Few1ae1XXfKH6iry1D 13bisx8T42CzmFA2oAm1evEytcijrHJ2iR 1DyR6aNSbrJCzwqdeo9UN5obGR9L73Y2sa 1Fx7j3gU3q7bQdoni2zZhGQx7BnLt8xNeK 19q541m17opVcAxwisem7ak7YPuSpdS3Uj 1DYWzBpLBDd7fpta2JYLf7QZ7nAYiZiamR 13sZYBMdyzffwvCkzhGTu49pCGGR5C5B9v 1DFSjViJLTNhNj5wvsqRwoqPyR9UTAzLgW 13Zi9eawpkzZwRC8RgHJausQmUS4ECBzho 1BCQ5GVkAEzNYZ5WroAwXSspgpYfhQrojd 1K1gbE7qGLwbJDEoRyrCGxCsgJ4mHcFKwP 14Z4EawE1Kd3HRut43vWjgYUWYR3ZV5i2p 1NZTFVXVzKXvPMsFKZfkhZCBcbzqm7cGCj 1GFBBahQC5DzpLuJc6X1yVvvSKP2kCpUGf 184PkQFdzhPR3TjoCxddsNK7sr3DVVhJ45 14SLK5fXWdajoQZ2AX5WmAGbvRtLpdTgMq 1LagrzYykb8w4NveKrw2SDcpKMezwxX72Z 16XdtV2U3ksdhKkByRpiq3VN61aB62Ndgh 1Mu1SaUBu7aV4DHzEc4hxcgGzaYWdvuaAh 1EJWWxwZckP9eLS2VzgbUwqzxFDZKZcF9b I've funded them with 10mBTC each, 320mBTC total. The full timelock definition is as follows: { "chains": [ { "algorithm": "sha256",=20 "encrypted_iv": null,=20 "hashed_secret": "1ERvMr5J8FETF7zj4QM98u8ZANaL1o9XGZ",=20 "i": 0,=20 "iv": "353b124909ec8774325d3f2f6b0a01c839e79e3ce687ee6e89331036= 8afdf336",=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "495c6092c9004dc23c2deefb1db1deba88f8895a319f5d= 9f7ce8a53b2a9ecfe9",=20 "hashed_secret": "18h7LwKpd9c6u8zJka3vMCASa8BfbiZFd4",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "8cbdf731374a71f22d59251890997ea001c2efa6e9c0bf= 808700c3d432ccf269",=20 "hashed_secret": "1DBJDp57QmbigLEbUsFeqJT3mkArGzH3gv",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "bc4d75fa5ec8f28e121cd73806ce058e82036577130cff= b3bd596f2aa59b2a7f",=20 "hashed_secret": "1C1d6Tj7mZADurfj5yJ64p5BeRstquk7pu",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "80c622521c7aed318dac2b3c7d929e4e504d3c60650009= b1abc0bae18fff979b",=20 "hashed_secret": "1FsH58jnq5Kc6D7hb7vmUhjh8fwnijiWss",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "1ba76f9a694f987e1758dbc65cf104984dbedfae01b134= fe09135b64cb8c4034",=20 "hashed_secret": "1PDwPYStrrkKpGtV2zX71XCDYL3E2g3KM7",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "1cedd5a71a96f439c20e9f4f5957b8c159b23d472063fa= 07a05121333888cdf5",=20 "hashed_secret": "1BF6oYLeTG7WxNWJjC8p4SHz62q7vgZhXX",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "30d88e0fd113ce38d22a210012914e5331bd89dda408d8= 5dfa9e9bfcbd40d8eb",=20 "hashed_secret": "1DxFiHr9ehVvi8JR2Cc5pcD4DEURUeFFda",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "5e654bfc1534b03e45548b59d407518b5915c3ae51c266= e374ea8a368f72433c",=20 "hashed_secret": "1NKg3buX5BzhYgSY6Yvws9kMqZ6F1xnneD",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "10095f9aa85ceb221d00975a1db66fcffcae516c1d3d5d= ee66995567522f68ab",=20 "hashed_secret": "1Kptov9sgDqQcavz1rVsuQvfi8PcQcL4rc",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "6ecfd5282c650b1ebabbf39f5e72dd0e8e9724456e6b35= 7e83c53a9a144b49eb",=20 "hashed_secret": "1P9k1HEfe3Z8LaiFejqsuDLjWXPZk1coDL",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "197796e5010f189165c2010cd7cfb0f3b9336702762312= 92555b5540765bb6fa",=20 "hashed_secret": "1Mw25mU89Wp2b9zyMCSnjAVQ7x4AVWx3sf",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "58fe436839724b03f3ffd41e864d5dc030de2eeb5a3c4d= f19ed65ef9abe21cc2",=20 "hashed_secret": "1B8gdbd1StpVnV99Few1ae1XXfKH6iry1D",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "d2af3dd9cdfbb081149212ead19cbd85f6dcc31177de58= 6d1c6dd6139c16141f",=20 "hashed_secret": "13bisx8T42CzmFA2oAm1evEytcijrHJ2iR",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "512f20d2a4f342cb635d5c73a0c3ad30272bdd84d73f2b= b0f2849d17557f162f",=20 "hashed_secret": "1DyR6aNSbrJCzwqdeo9UN5obGR9L73Y2sa",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "75cb98d4abfd84318347220547f017f8285333dd55b416= 22c9220ece49e227e2",=20 "hashed_secret": "1Fx7j3gU3q7bQdoni2zZhGQx7BnLt8xNeK",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "d1d264674ba9b1c4baba189809a0d37ca4b8f402f91a14= 5303907c3730ff890c",=20 "hashed_secret": "19q541m17opVcAxwisem7ak7YPuSpdS3Uj",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "31f2df6ae00e118f72063cb640c150bad5c0c015d12533= 826439d45f593ebb89",=20 "hashed_secret": "1DYWzBpLBDd7fpta2JYLf7QZ7nAYiZiamR",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "8113452a165b673957f6d707f19d6b407683499ef6a08e= 03ba35ca79306b8e3b",=20 "hashed_secret": "13sZYBMdyzffwvCkzhGTu49pCGGR5C5B9v",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "c0b8e246cd4a2a1abe760b1d2763931c8e04960e6a2e69= f0f6723dd4892413ae",=20 "hashed_secret": "1DFSjViJLTNhNj5wvsqRwoqPyR9UTAzLgW",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "c4d0bc902093f21e1745193345909e080dee5b4cc41010= 8a637ded75fcdc9e01",=20 "hashed_secret": "13Zi9eawpkzZwRC8RgHJausQmUS4ECBzho",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "588d778adb3180a9783781a175171790d8099d7942190f= a853b235262c074a99",=20 "hashed_secret": "1BCQ5GVkAEzNYZ5WroAwXSspgpYfhQrojd",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "643b3afe4b674b44fee943507559d6218c5f53671ab01b= 09c8aaafa65f9f2e37",=20 "hashed_secret": "1K1gbE7qGLwbJDEoRyrCGxCsgJ4mHcFKwP",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "62e65d48eb215734c00165130027a6cb04842d95cc570a= 278968f7070d41936f",=20 "hashed_secret": "14Z4EawE1Kd3HRut43vWjgYUWYR3ZV5i2p",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "f89566d49c4765522cd382c16589486b90702cc99caff6= 801a4e8b504694ab6b",=20 "hashed_secret": "1NZTFVXVzKXvPMsFKZfkhZCBcbzqm7cGCj",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "3d9acd9785f12890b88f30576d81d583ba0ada2d98c9a1= 7f6cc79a0ed1b7e027",=20 "hashed_secret": "1GFBBahQC5DzpLuJc6X1yVvvSKP2kCpUGf",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "4d886799cfef728add5c14b27e780f96511b78060d86d3= b77b0d0ed5130f6f02",=20 "hashed_secret": "184PkQFdzhPR3TjoCxddsNK7sr3DVVhJ45",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "24b495c95129ca0062297b019af3684b12303382e4282e= 032ba5fd2ab805b127",=20 "hashed_secret": "14SLK5fXWdajoQZ2AX5WmAGbvRtLpdTgMq",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "0eec24b55713a85a41c996904def8f8b5b61a9efa2491d= acf63f7161a71a6514",=20 "hashed_secret": "1LagrzYykb8w4NveKrw2SDcpKMezwxX72Z",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "1b3ecc11b7f6cd80a5111b11a15fa2cb8b1c006041f8ad= 5b7c7316947de2e3fa",=20 "hashed_secret": "16XdtV2U3ksdhKkByRpiq3VN61aB62Ndgh",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "7fed7012e601fb9431d48c072d060c391b1985fd9717d5= 1b12bbcb7e271f656f",=20 "hashed_secret": "1Mu1SaUBu7aV4DHzEc4hxcgGzaYWdvuaAh",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null },=20 { "algorithm": "sha256",=20 "encrypted_iv": "7f3a0c156be2c08714b9296999dddca8c178385e145aa3= 156ea00ffd742075f8",=20 "hashed_secret": "1EJWWxwZckP9eLS2VzgbUwqzxFDZKZcF9b",=20 "i": 0,=20 "iv": null,=20 "midstate": null,=20 "n": 86400000000,=20 "seckey": null,=20 "secret": null } ],=20 "version": 1 } --=20 'peter'[:-1]@petertodd.org 00000000000000002d204cce4ee5e7976a0a485d658b4a15ebf31cdbce8a4915 --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQGrBAEBCACVBQJTjxcVXhSAAAAAABUAQGJsb2NraGFzaEBiaXRjb2luLm9yZzAw MDAwMDAwMDAwMDAwMDA0N2ZiMTVkYTBmMGNmYTM2NzRkOTA4NGYyMDZmZTViZDY1 ZTM0MzFkYTQzODkwMzMvFIAAAAAAFQARcGthLWFkZHJlc3NAZ251cGcub3JncGV0 ZUBwZXRlcnRvZC5vcmcACgkQJIFAPaXwkfv11Af+ObGh1FkEx+FYlgl5bAnRFSlq wS0FGFvSB4wEUIrX9rIWrOo4LeI2b0ElDqfqEgoR0rS6tVsTidDMKPsyr95Igaow qcatsCDmxmZr6FA2j2KG/zlVYQZdy/NdIQF0Upk4Xt2kAf3yWbx/MAVwPr5jWBbG ffNcr5pYIKywTksU28USqzbNx7h44ilekJtaimx/d9nvItw2I8LWScGbZRwFFo09 7UC6tpT98g/fWnWyLrZZh9jfjzBmhGV4Ej7U+xJvPCm+cmqUnaL5K2cZy2NInx0/ 39x5wTSy3umo9wzlYljK8XmrbCY49mNigdyEMvZa7Ue/4avtR9nWQKHqYZxkMw== =HvTV -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--