Return-Path: Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id EC053C0037 for ; Fri, 22 Dec 2023 04:52:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C316483DE0 for ; Fri, 22 Dec 2023 04:52:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org C316483DE0 Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=JlORJ8WP X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -2.098 X-Spam-Level: X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hj6TOuvKMHhR for ; Fri, 22 Dec 2023 04:52:21 +0000 (UTC) Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by smtp1.osuosl.org (Postfix) with ESMTPS id 401F883DAF for ; Fri, 22 Dec 2023 04:52:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 401F883DAF Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-28b09aeca73so1071617a91.1 for ; Thu, 21 Dec 2023 20:52:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703220740; x=1703825540; darn=lists.linuxfoundation.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=knpTT66wbOajKor9wXNZAK9SxjE+DbBKkaqUaR4+YEc=; b=JlORJ8WPbs67NMrR4v0OjTPsD3afX9KbxFnpzRlgUnpPgd9v+5p+g8SLwhOJzAzp2p dAUEPePe145FeqrzDwb6VlbfbEUIvnVcDDj4gc/86qewQM4OoX/32YWMgeBGhbYpYRE5 a/1bhBbnRgk6tWkwDUq9L+jZD0CXIkZ/UyE7iVdQ3ymTuriChiiO6T5/5y+MpnnnjBEG ahUd5jwp64GvebTik9bNezPwHyxEryP/Y5eNVVx/wpre0RMvW6z0yPcOst/mCMx6+ztD kUxzsHf0gWg0dng6+dOYUYYr3QKUrzRV/OJaMIUgWw3FSeZ5aWW1TblnKSchigwDw0oR XkCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703220740; x=1703825540; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=knpTT66wbOajKor9wXNZAK9SxjE+DbBKkaqUaR4+YEc=; b=sDrCkA2Sqi+m/KK5VX3w3yR6yL1ZfmntLXCs4Cyq1OTjIPdMYrDI/O+xgEpRPIksqe u3MtOcnybhd8qtPVY+SgZZPgcZIkox4R4i8JK3oU0UzBhq+ICnTkFpH2OC5abWeGDTmD mZnMhQD+jyWAgrn01qgQJlb6VKHf3brA8+YQJRhSwB2JGQgGTAGB3M78Ywf8Ujkr+R69 tw2tOdHQl+vbX4jIWmDQDTYgfBh3Lm5uFAb3rQ4B5PiioC7YUZ0kKrD0mu9+n/QG2TFV mhDzNPmnE8s/asGZ1QIXFsr+s2h9BkuJdUWwwjNTqDo599T/C16ntYSWOMoF3hpBdwmU Jm+Q== X-Gm-Message-State: AOJu0YwqnMmHdW2GIwQQpM4rbQk7VZwLbB/cyriWMqmDfQNYeaUds/82 vReYzXUwoJjcw+STiq3DH7P06tV29BYm0MBricM= X-Google-Smtp-Source: AGHT+IHCn3UD7SSR1tpmYZRRnHcXA2RFl7UrxU88VGIgqUTQbySzmBKmb/yFQaKIbKB6Vj/YCFHmGW1h68uc0nb0l3I= X-Received: by 2002:a17:90a:72c1:b0:28b:c0a1:f324 with SMTP id l1-20020a17090a72c100b0028bc0a1f324mr863424pjk.18.1703220740423; Thu, 21 Dec 2023 20:52:20 -0800 (PST) MIME-Version: 1.0 References: <-lH1AcjRwuxfuqLPFOh_oga10Qm12fb7Se9imDeS5ft6CU3y8KTQa3tBP0twJJBFSHgj7FC8EIxvEser3oZdWvkeitRwERQl_cCdgAWtbTU=@pm.me> <1aHuuO-k0Qo7Bt2-Hu5qPFHXi4RgRASpf9hWshaypHtdN-N9jkubcvmf-aUcFEA6-7L9FNXoilIyydCs41eK4v67GVflEd9WIuEF9t5rE8w=@pm.me> In-Reply-To: From: "G. Andrew Stone" Date: Thu, 21 Dec 2023 23:52:08 -0500 Message-ID: To: yurisvb@pm.me, Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="0000000000003507bf060d11fbbf" Subject: Re: [bitcoin-dev] Lamport scheme (not signature) to economize on L1 X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2023 04:52:23 -0000 --0000000000003507bf060d11fbbf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Does this affect the security model WRT chain reorganizations? In the classic doublespend attack, an attacker can only redirect UTXOs that they spent. With this proposal, if I understand it correctly, an attacker could redirect all funds that have "matured" (revealed the previous preimage in the hash chain) to themselves. The # blocks to maturity in your proposal becomes the classic "embargo period" and every coin spent by anyone between the fork point and the maturity depth is available to the attacker to doublespend? On Thu, Dec 21, 2023, 8:05=E2=80=AFPM Yuri S VB via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > You are right to point out that my proposal was lacking defense against > rainbow-table, because there is a simple solution for it: > To take nonces from recent blocks, say, T0-6, ..., T0-13, for salting > LSIG, and ECCPUB to salt LAMPPUB. Salts don't need to be secret, only > unknown by the builder of rainbow table while they made it, which is the > case, since here we have 8*32=3D256 bits for LSIG, and the entropy of ECC= PUB > in the second. > > With rainbow table out of our way, there is only brute-force analysis to > mind. Honestly, Guess I should find a less 'outrageously generous' upper > bound for adversary's model, than just assume they have a magic wand to > convert SHA256 ASICS into CPU with the same hashrate for memory- and > serial-work-hard hashes (therefore giving away hash hardness). That's > because with such 'magic wand' many mining pools would, not only be capab= le > of cracking 2^48 hashes far within the protocol's prescribed 48 hours, bu= t > also 2^64 within a block time, which would invalidate a lot of what is > still in use today. > > Please, allow me a few days to think that through. > > YSVB > > Sent with Proton Mail secure email. > > On Wednesday, December 20th, 2023 at 10:33 PM, Nagaev Boris < > bnagaev@gmail.com> wrote: > > > > On Tue, Dec 19, 2023 at 6:22=E2=80=AFPM yurisvb@pm.me wrote: > > > > > Thank you for putting yourself through the working of carefully > analyzing my proposition, Boris! > > > > > > 1) My demonstration concludes 12 bytes is still a very conservative > figure for the hashes. I'm not sure where did you get the 14 bytes figure= . > This is 2*(14-12) =3D 4 bytes less. > > > > > > I agree. It should have been 12. > > > > > 2) Thank you for pointing out that ECCPUB is necessary. That's exactl= y > right and I failed to realize that. To lessen the exposure, and the risk = of > miner of LSIG, it can be left to be broadcast together with LAMPPRI. > > > > > > 3) I avail to advocate for economizing down the fingerprint to just > 128 bits for the weakest-link-principle, since 128 bits is a nearly > ubiquitous standard, employed even by the majority of seeds. Not an > argument against plain Schnorr, because Schnorr keys could use it too, bu= t, > compared with current implementations, we have that would be 20-16=3D4 by= tes > less. > > > > > > I think that the digest size for hash should be 2x key size for > > symmetric encryption. To find a collision (=3D break) for a hash > > function with digest size 128 bits one needs to calculate ~ 2^64 > > hashes because of the birthday paradox. > > > > > 4) [Again, argument against plain, because it cuts for both sides:] T= o > economize even further, there is also the entropy-derivation cost trade-o= ff > of N times costlier derivation for log2(N) less bits. If applied to the > Address, we could shave away another byte. > > > > > > 5) T0 is just the block height of burying of LSIG doesn't need to be > buried. T2 can perfectly be hard-coded to always be the block equivalent = of > T0 + 48 hours (a reasonable spam to prevent innocent defaulting on > commitment due to network unavailability). T1 is any value such as T0 < T= 1 > < T2, (typically T1 <=3D T0+6) of user's choosing, to compromise between,= on > one hand, the convenience of unfreezing UTXO and having TX mining complet= ed > ASAP and, on the other, avoiding the risk of blockchain forking causing > LAMPPRI to be accidentally leaked in the same block height as LSIG, which > allows for signatures to be forged. So this is 16 bytes less. > > > > > > Miners would keep record of unconfirmed BL's, because of the reward o= f > mining either possible outcome of it (successful transaction or execution > of commitment). Everything is paid for. > > > > > > So, unless I'm forgetting something else, all other variables kept > equal, we have 20 bytes lighter than Schnorr; and up to 25 bytes less the > current implementation of Schnorr, if items 3 and 4 are implemented too. > Already we have a reduction of between 21% and 26%, while, so far, nobody > in the mailing list has disputed how 'outrageously' conservative the 12 > bytes figure is. > > > > > > 26% reduction of block space utilization would be great, but the price > > of relying on 12 bytes hashes (only need 2^48 hashes to find a > > collision) is too much for that, IMHO. > > > > Another consideration is about 12 byte hashes. Let's try to figure out > > if they are resistant to rainbow table attack by a large organization. > > Let's assume that the rainbow table has a chain length of 1024^3 > (billion). > > What storage size is needed? 2^96 * 12 / 1024^3 =3D 900 exabytes. > > Both chain length and storage size seems prohibitively high for today, > > but tomorrow the hash function can be optimized, memory can be > > optimized, storage can become cheaper etc. And this attack may be > > affordable for state level attackers. > > > > > Any other objections? > > > > > > YSVB > > > > > > > > -- > > Best regards, > > Boris Nagaev_______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > --0000000000003507bf060d11fbbf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Does this affect the security model WRT chain reorganizat= ions?=C2=A0 In the classic doublespend attack, an attacker can only redirec= t UTXOs that they spent.=C2=A0 With this proposal, if I understand it corre= ctly, an attacker could redirect all funds that have "matured" (r= evealed the previous preimage in the hash chain) to themselves.=C2=A0 The #= blocks to maturity in your proposal becomes the classic "embargo peri= od" and every coin spent by anyone between the fork point and the matu= rity depth is available to the attacker to doublespend?

On Thu, Dec 21, 2023= , 8:05=E2=80=AFPM Yuri S VB via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>= wrote:
You are right to point out = that my proposal was lacking defense against rainbow-table, because there i= s a simple solution for it:
To take nonces from recent blocks, say, T0-6, ..., T0-13, for salting LSIG,= and ECCPUB to salt LAMPPUB. Salts don't need to be secret, only unknow= n by the builder of rainbow table while they made it, which is the case, si= nce here we have 8*32=3D256 bits for LSIG, and the entropy of ECCPUB in the= second.

With rainbow table out of our way, there is only brute-force analysis to mi= nd. Honestly, Guess I should find a less 'outrageously generous' up= per bound for adversary's model, than just assume they have a magic wan= d to convert SHA256 ASICS into CPU with the same hashrate for memory- and s= erial-work-hard hashes (therefore giving away hash hardness). That's be= cause with such 'magic wand' many mining pools would, not only be c= apable of cracking 2^48 hashes far within the protocol's prescribed 48 = hours, but also 2^64 within a block time, which would invalidate a lot of w= hat is still in use today.

Please, allow me a few days to think that through.

YSVB

Sent with Proton Mail secure email.

On Wednesday, December 20th, 2023 at 10:33 PM, Nagaev Boris <bnagaev@gmai= l.com> wrote:


> On Tue, Dec 19, 2023 at 6:22=E2=80=AFPM yurisvb@pm.me wrote:
>
> > Thank you for putting yourself through the working of carefully a= nalyzing my proposition, Boris!
> >
> > 1) My demonstration concludes 12 bytes is still a very conservati= ve figure for the hashes. I'm not sure where did you get the 14 bytes f= igure. This is 2*(14-12) =3D 4 bytes less.
>
>
> I agree. It should have been 12.
>
> > 2) Thank you for pointing out that ECCPUB is necessary. That'= s exactly right and I failed to realize that. To lessen the exposure, and t= he risk of miner of LSIG, it can be left to be broadcast together with LAMP= PRI.
> >
> > 3) I avail to advocate for economizing down the fingerprint to ju= st 128 bits for the weakest-link-principle, since 128 bits is a nearly ubiq= uitous standard, employed even by the majority of seeds. Not an argument ag= ainst plain Schnorr, because Schnorr keys could use it too, but, compared w= ith current implementations, we have that would be 20-16=3D4 bytes less. >
>
> I think that the digest size for hash should be 2x key size for
> symmetric encryption. To find a collision (=3D break) for a hash
> function with digest size 128 bits one needs to calculate ~ 2^64
> hashes because of the birthday paradox.
>
> > 4) [Again, argument against plain, because it cuts for both sides= :] To economize even further, there is also the entropy-derivation cost tra= de-off of N times costlier derivation for log2(N) less bits. If applied to = the Address, we could shave away another byte.
> >
> > 5) T0 is just the block height of burying of LSIG doesn't nee= d to be buried. T2 can perfectly be hard-coded to always be the block equiv= alent of T0 + 48 hours (a reasonable spam to prevent innocent defaulting on= commitment due to network unavailability). T1 is any value such as T0 <= T1 < T2, (typically T1 <=3D T0+6) of user's choosing, to comprom= ise between, on one hand, the convenience of unfreezing UTXO and having TX = mining completed ASAP and, on the other, avoiding the risk of blockchain fo= rking causing LAMPPRI to be accidentally leaked in the same block height as= LSIG, which allows for signatures to be forged. So this is 16 bytes less.<= br> > >
> > Miners would keep record of unconfirmed BL's, because of the = reward of mining either possible outcome of it (successful transaction or e= xecution of commitment). Everything is paid for.
> >
> > So, unless I'm forgetting something else, all other variables= kept equal, we have 20 bytes lighter than Schnorr; and up to 25 bytes less= the current implementation of Schnorr, if items 3 and 4 are implemented to= o. Already we have a reduction of between 21% and 26%, while, so far, nobod= y in the mailing list has disputed how 'outrageously' conservative = the 12 bytes figure is.
>
>
> 26% reduction of block space utilization would be great, but the price=
> of relying on 12 bytes hashes (only need 2^48 hashes to find a
> collision) is too much for that, IMHO.
>
> Another consideration is about 12 byte hashes. Let's try to figure= out
> if they are resistant to rainbow table attack by a large organization.=
> Let's assume that the rainbow table has a chain length of 1024^3 (= billion).
> What storage size is needed? 2^96 * 12 / 1024^3 =3D 900 exabytes.
> Both chain length and storage size seems prohibitively high for today,=
> but tomorrow the hash function can be optimized, memory can be
> optimized, storage can become cheaper etc. And this attack may be
> affordable for state level attackers.
>
> > Any other objections?
> >
> > YSVB
>
>
>
> --
> Best regards,
> Boris Nagaev_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundati= on.org/mailman/listinfo/bitcoin-dev
--0000000000003507bf060d11fbbf--