Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    306comments
  2. Science Is Open Software(jepedersen.dk ↗)
    11comments
  3. SDCC – Small Device C Compiler(sourceforge.net ↗)
    2comments
  4. Cloudflare Quick Tunnels(cloudflare.com ↗)
    260comments
  5. Saving another 100TB of RAM(cloudflare.com ↗)
    56comments
  6. How to Write with an LLM(sockpuppet.org ↗)
    289comments
  7. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    63comments
  8. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    9comments
  9. Xcode 27.1 Beta Release Notes(developer.apple.com ↗)
    74comments
  10. The Farnese letter(simonklee.dk ↗)
    5comments
  11. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    61comments
  12. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    75comments
  13. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    79comments
  14. Show HN: LiveWorld – Every 24/7 YouTube live camera on one globe(liveworld.info ↗)
    23comments
  15. OpenJev(openjev.com ↗)
    249comments
  16. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    12comments
  17. Goroutine Leak Profiles(go.dev ↗)
    discuss
  18. Claude Code now reads AGENTS.md if there is no Claude.md(claude.com ↗)
    201comments
  19. Cyclomatic Complexity in C#(ndepend.com ↗)
    15comments
  20. Gemini hacked three companies in first known breakout by Google's AI(reuters.com ↗)
    30comments
  21. Minimal Phone 2(minimalcompany.com ↗)
    194comments
  22. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    36comments
  23. LispBM is a concurrent Lisp for microcontrollers with message passing(lispbm.com ↗)
    1comments
  24. Alibaba open-sources AI model that can detect cancer and nearly 150 conditions(scmp.com ↗)
    7comments
  25. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    94comments
  26. C++26: Trivial infinite loops are no longer undefined behaviour(sandordargo.com ↗)
    211comments
  27. How SpaceX streamlined the Raptor engine(construction-physics.com ↗)
    49comments
  28. Two parallel neural ectoderm progenitors contribute to the developing brain(newscientist.com ↗)
    60comments
  29. The Implications of Linguistic Illegibility for LLM Security(arxiv.org ↗)
    20comments
  30. Size-Specialized Memory Allocation(go.dev ↗)
    3comments

Peter Todd (Bitcoin core dev) set up a SHA-1 “Pinata” and it's been claimed

130 pointsby 9y agotwitter.com
33 comments
9y agoHN ↗

I'm really interested in the comment about someone else running a bot that tries a double-spend based on the answer in the original transaction. It sounds like it didn't work, but it could have. Is there a way to set up these sorts of automated challenges in a way that isn't vulnerable to that?

9y agoHN ↗

I can't see how you'd do it for a case like this.

The script is just checking that the spender knows 2 pieces of data that are different but have the same SHA1 hash. I can't see a way to do that that can't be easily replayed by somebody else spending to a different address.

As soon as the transaction is broadcast, you reveal your 2 pieces of data that are different but have the same SHA1 hash.

9y agoHN ↗

It's possible in Ethereum. You set a two-step process, in the first step you claim the solution - providing a hash of it, and your address. In the second step (in the next block), you provide the solution, and a smart contract can only send money to the address you provided in the first step.

9y agoHN ↗

It's possible in Bitcoin too and not just for the kind of trivial program you could plausible execute in a public blockchain. https://bitcoincore.org/en/2016/02/26/zero-knowledge-conting...

(And to not put too fine a point on it: the existing track record of ethereum smart contracts suggests that if such a bounty had been created there it would have simply been stolen due to contract/vm flaws by now.)

9y agoHN ↗

you claim the solution - providing a hash of it, and your address

Unless it is SHA-1 hash :)

9y agoHN ↗

Excellent post, thanks for linking to it.

9y agoHN ↗

In addition to the zero knowledge proof points discussed below, one could (if they had the mean) to not publish the tx but include it in a block that they work on privately. It's not fool proof (once you announce the block, you've only given yourself one block worth of proof of work lead and an attacker could copy your proof and include it in a competing chain)

ZKCP is a much more robust solution.

9y agoHN ↗

~$2860 USD. Fairly good payoff for probably setting up a Google Alert and a small amount of scripting.

9y agoHN ↗

One of the "no" bets was for ~7.4 BTC (~$8500 USD). Interesting that somebody was willing to lay down that much.

9y agoHN ↗

There was also an 8 BTC (~$9250 USD) bet placed on "Yes" two days before the collision announcement.

9y agoHN ↗

even knowing about these things in advance, the risk that the site loses your funds is so great that it's not very attractive to bet on these things.

9y agoHN ↗

The site publishes the bitcoin txids + addresses so it is trivial to verify whether they are paying out the winnings.

9y agoHN ↗

I think the issue is that like any other outfit that holds bitcoin they may just "lose" them and vanish.

9y agoHN ↗

Until they don't. Other betting sites have 'lost' everyone's coins.

9y agoHN ↗

Before anyone has the bright idea of running off and betting on "Yes", check the FAQ about how BitBet keeps your BitCoins if you bet on a closed contract: https://bitbet.us/faq/

(Not pointing this out to be critical. With a bit of thought, the policy makes enough sense to me, for various reasons. Pointing this out to prevent people from doing silly things, and because it's an interesting document on its own.)

9y agoHN ↗

Apparently this was the winning script: https://blockchain.info/tx/8d31992805518fd62daa3bdd2a5c4fd2c...

If you 'unhexlify' both hex strings on that page, you can see that the first 320 bytes of each PDF from shattered.io were used as input.

   In [1]: import binascii, hashlib

   In [2]: input1 = binascii.unhexlify('255044462d312e330a25e2e3cfd30a0a0a312030206f626a0a3c3c2f57696474682032203020522f4865696768742033203020522f547970652034
   ...: 203020522f537562747970652035203020522f46696c7465722036203020522f436f6c6f7253706163652037203020522f4c656e6774682038203020522f42697473506572436f6d706
   ...: f6e656e7420383e3e0a73747265616d0affd8fffe00245348412d3120697320646561642121212121852fec092339759c39b1a1c63c4c97e1fffe017f46dc93a6b67e013b029aaa1db2
   ...: 560b45ca67d688c7f84b8c4c791fe02b3df614f86db1690901c56b45c1530afedfb76038e972722fe7ad728f0e4904e046c230570fe9d41398abe12ef5bc942be33542a4802d98b5d70
   ...: f2a332ec37fac3514e74ddc0f2cc1a874cd0c78305a21566461309789606bd0bf3f98cda8044629a1')

   In [3]: input2 = binascii.unhexlify('255044462d312e330a25e2e3cfd30a0a0a312030206f626a0a3c3c2f57696474682032203020522f4865696768742033203020522f547970652034
   ...: 203020522f537562747970652035203020522f46696c7465722036203020522f436f6c6f7253706163652037203020522f4c656e6774682038203020522f42697473506572436f6d706
   ...: f6e656e7420383e3e0a73747265616d0affd8fffe00245348412d3120697320646561642121212121852fec092339759c39b1a1c63c4c97e1fffe017346dc9166b67e118f029ab621b2
   ...: 560ff9ca67cca8c7f85ba84c79030c2b3de218f86db3a90901d5df45c14f26fedfb3dc38e96ac22fe7bd728f0e45bce046d23c570feb141398bb552ef5a0a82be331fea48037b8b5d71
   ...: f0e332edf93ac3500eb4ddc0decc1a864790c782c76215660dd309791d06bd0af3f98cda4bc4629b1')

   In [4]: input1[:8], input2[:8]
   Out[4]: ('%PDF-1.3', '%PDF-1.3')

   In [5]: hashlib.sha1(input1).hexdigest() == hashlib.sha1(input2).hexdigest()
   Out[5]: True
9y agoHN ↗

This thread seriously need a ELI5... or ELI don't have a degree in Mathematics.

9y agoHN ↗

When you send Bitcoins you are not really sending them to any recipient but you place them in the block chain and attach a challenge. Everyone who can solve a challenge can spend the coins associated with this challenge.

Usually the challenge is to prove that you have the private key to a public key included in the challenge so that the public key can function as an address for you and only you can spend the coins because only you have the private key.

But in this case Peter Todd placed 2.48 BTC in the block chain with the challenge to provide two different but otherwise arbitrary pieces of data yielding the same SHA-1 hashes. Someone now used the collision generated by Google to spend those coins.

9y agoHN ↗

Can everyone place a custom challenge in the Bitcoin blockchain?

9y agoHN ↗

Yes, challenge and response are just small programs. Every transaction is essentially just two small programs, one that solves the current challenge proving that you are allowed to spent the coins and a new challenge to be solved by the next one who wants to spent the coins.

9y agoHN ↗

So the way to "collect" those coins is to post the solution to the hash collision and, as a followup challenge, something encrypted with your public key so only you can decrypt it later on. Correct?

9y agoHN ↗

Yes. And in this case you have to be quick and maybe need some luck. Because everyone could try to get those coins you have to be the one that gets his transaction included in the block chain first.

If Google had not publish the collision but you found it yourself, miners could still just steal the collision from your transaction, throw your transaction away and spend the coins themselves.

Actually everybody could just watch all new transactions, steal your collision once they see it and try to front-run you. So this kind of challenge is not really a good idea in general, at least not in this simple form.

With normal transaction this is not an issue because there you only reveal a signature proving that you know the private key, you do not reveal the private key itself and therefore others can not sign their own transaction and try to front-run you.

[...] and, as a followup challenge, something encrypted with your public key so only you can decrypt it later on.

That is not entirely correct, as mentioned above this works by signing and not encrypting. Everybody and especially miners have to be able to verify your transaction but they could not do that if you simply encrypted something. Well, they could if you published the private key but then you get into said front-running issue.

9y agoHN ↗

FWIW while I created the bounty, the bulk of that 2.48 BTC was donated by people other than me.

9y agoHN ↗

I have no idea what's going on. Is this bad for bitcoin?

9y agoHN ↗

No. Bitcoin uses "scripts" to validate transactions. It is a small turing-incomplete language with specialized operators that let you perform comparisons and such. This script was set up such that you could spend the coins if you could make a hash collision in SHA1.