LearnBitcoin

Bitcoin Dev Archive 2021

Sum of the keys attack on taproot

3 messages, 15 May 2021. Started by vjudeu.

vjudeu, Tim Ruffing, Ruben Somsen

Permalink Original thread on gnusha.org

vjudeu permalink original

We have some taproot address with private key "a" and public key "a*G", owned by Alice. Bob wants to take Alice's coins without her permission. He owns taproot address with private key "b" and public key "b*G". He knows "a*G" by exploring the chain and looking for P2TR outputs. To grab Alice's funds, he creates "(b-a)*G" taproot address and send some small amount to this address. Then, Bob can create a transaction with two inputs, taking coins from "a*G" and "(b-a)*G" addresses. All that is needed is producing a signature matching the sum of the public keys used in taproot, which is "(a+b-a)*G", reduced to "b*G", so Bob uses his "b" private key to produce Schnorr signature. Is there any protection from this attack?

Tim Ruffing in reply to vjudeu permalink original

On Sat, 2021-05-15 at 12:21 +0200, vjudeu via bitcoin-dev wrote:

Quoted text (2 lines)
>  All that is needed is producing a signature matching the sum of the
> public keys used in taproot, which is "(a+b-a)*G",

This is simply not true.

Taproot does not enable this, or any other form of "cross-input aggregation", i.e., spending multiple UTXOs with a single signature.

Tim

Ruben Somsen in reply to Tim Ruffing permalink original

What Tim said is right. To add to that, you may also wish to read about MuSig: https://blockstream.com/2018/01/23/en-musig-key-aggregation-schnorr-signatures/

Cheers, Ruben

On Sat, May 15, 2021 at 10:32 PM Tim Ruffing via bitcoin-dev < bitcoin-dev@lists•linuxfoundation•org> wrote:

Quoted text (19 lines)
> On Sat, 2021-05-15 at 12:21 +0200, vjudeu via bitcoin-dev wrote:
>
>
> >  All that is needed is producing a signature matching the sum of the
> > public keys used in taproot, which is "(a+b-a)*G",
>
> This is simply not true.
>
> Taproot does not enable this, or any other form of "cross-input
> aggregation", i.e., spending multiple UTXOs with a single signature.
>
>
> Tim
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists•linuxfoundation•org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>