Peter R [ARCHIVE] on Nostr: đź“… Original date posted:2016-05-09 đź“ť Original message:Greg Maxwell wrote: > What ...
đź“… Original date posted:2016-05-09
đź“ť Original message:Greg Maxwell wrote:
> What are you talking about? You seem profoundly confused here...
>
> I obtain some txouts. I write a transaction spending them in malleable
> form (e.g. sighash single and an op_return output).. then grind the
> extra output to produce different hashes. After doing this 2^32 times
> I am likely to find two which share the same initial 8 bytes of txid.
[9 May 16 @ 4:30 PDT]
I’m trying to understand the collision attack that you're explaining to Tom Zander.
Mathematica is telling me that if I generated 2^32 random transactions, that the chances that the initial 64-bits on one of the pairs of transactions is about 40%. So I am following you up to this point. Indeed, there is a good chance that a pair of transactions from a set of 2^32 will have a collision in the first 64 bits.
But how do you actually find that pair from within your large set? The only way I can think of is to check if the first 64-bits is equal for every possible pair until I find it. How many possible pairs are there?
It is a standard result that there are
m! / [n! (m-n)!]
ways of picking n numbers from a set of m numbers, so there are
(2^32)! / [2! (2^32 - 2)!] ~ 2^63
possible pairs in a set of 2^32 transactions. So wouldn’t you have to perform approximately 2^63 comparisons in order to identify which pair of transactions are the two that collide?
Perhaps I made an error or there is a faster way to scan your set to find the collision. Happy to be corrected…
Best regards,
Peter
Published at
2023-06-07 17:50:23Event JSON
{
"id": "d88f34ba800bdb5eff74e8cd262c38f2d164d1e3e0f299becbe2c59b90cdeb58",
"pubkey": "6185f02289f12c01c6f7c80cdc0331a01eae9c6356f228be12efdb7fb395bc19",
"created_at": 1686160223,
"kind": 1,
"tags": [
[
"e",
"37fe3d2b857e9599a14c87e34f77dee62e90bb6721200fbd7752c60823834c1e",
"",
"root"
],
[
"e",
"c987792f8fde2fb9ed437cd21e7ee9452e1459f101bfe4a3ed4b67cc942016d8",
"",
"reply"
],
[
"p",
"bf0548dc0ad239e9e1e0bba3c969632ded402a68091cde1b21a0895e90bc9a57"
]
],
"content": "📅 Original date posted:2016-05-09\n📝 Original message:Greg Maxwell wrote:\n\n\u003e What are you talking about? You seem profoundly confused here...\n\u003e \n\u003e I obtain some txouts. I write a transaction spending them in malleable\n\u003e form (e.g. sighash single and an op_return output).. then grind the\n\u003e extra output to produce different hashes. After doing this 2^32 times\n\u003e I am likely to find two which share the same initial 8 bytes of txid.\n\n[9 May 16 @ 4:30 PDT]\n\nI’m trying to understand the collision attack that you're explaining to Tom Zander. \n\nMathematica is telling me that if I generated 2^32 random transactions, that the chances that the initial 64-bits on one of the pairs of transactions is about 40%. So I am following you up to this point. Indeed, there is a good chance that a pair of transactions from a set of 2^32 will have a collision in the first 64 bits. \n\nBut how do you actually find that pair from within your large set? The only way I can think of is to check if the first 64-bits is equal for every possible pair until I find it. How many possible pairs are there? \n\nIt is a standard result that there are \n\n m! / [n! (m-n)!] \n\nways of picking n numbers from a set of m numbers, so there are\n\n (2^32)! / [2! (2^32 - 2)!] ~ 2^63\n\npossible pairs in a set of 2^32 transactions. So wouldn’t you have to perform approximately 2^63 comparisons in order to identify which pair of transactions are the two that collide?\n\nPerhaps I made an error or there is a faster way to scan your set to find the collision. Happy to be corrected…\n\nBest regards,\nPeter",
"sig": "2e9641e6763ac5b2100cccbfc280a8510623c04b8cc479fb55e84dae229d05ffecfdd72c16ad3db037dec118a5723c86052fd311d5ad6c2523d0eb72ef8485bc"
}