News for hackers. Stuff that matters.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by Animats on Monday May 03, 2021 @01:14AM (#27021831)
They're telling you to use the unsigned executable because they screwed up renewing their signing certificate. Bad excuse. Very bad security practice for a Bitcoin wallet. They do offer SHA-256 hashes for the executables, so people can check by hand, but the download and the hashed check come from the same site. If someone can spoof the download site, they can Make Money Fast.

Somewhere, someone is probably working out a way to exploit this right now.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by nullc on Monday May 03, 2021 @01:29AM (#27021918)
First, the releases are signed-- just not with the windows code signing infrastructure.

For windows the CA improperly revoked the certificate in response to a renewal request and back dated the revocation and are refusing to issue a new certificate (my understanding and that the CA now believes open source collaborations aren't eligible for code signing certs, or some such nonsense... it's being worked out)

The releases are still PGP signed by an official project key which has been in use for many years and is cross signed by many parties-- just as they have the last decade--, as well as by another 16 parties that independent reproduced the binaries through the deterministic build process: https://github.com/bitcoin-core/gitian.sigs/tree/master/0.21... which has also been used for the last ten years. Anyone who already has an older faithful copy has the scripts to automatically download and verify the other signatures.

By comparison, the windows code signing provides relatively little security assurance. Not too dissimilar from the HTTPS used on the download site. It, like the https, does have the advantage that it is widely checked while many users don't bother checking the actual release signatures. It's useful to have for sure, but it's not the only protection and, unfortunately, it exist only at the whim of a third party that isn't accountable to the users of Bitcoin. But if someone can spoof the download site the executable signing won't do much to stop them from causing problems.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by ddtaylor on Monday May 03, 2021 @07:12AM (#27023648)
I think the problem here is that it's training end-users to step outside of the normal security practices and normalizing that behavior. In the same way that most reputable companies would tell you "We'll never ask you for your password" and over time that has been well relegated to scammer-only territory. What if one day a company said "Hey, we're just gonna ask for your password this one time, but it's okay" - it mostly defeats the entire purpose of the protection scheme if users can easily be duped into not following it.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by fastball on Monday May 03, 2021 @07:46AM (#27023869)
Right, but what is the solution if this "normal security practice" relies on having a 3rd party sign your stuff but they refuse to do so, for non-security reasons?
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by cheaprentalyeti on Monday May 03, 2021 @09:32AM (#27024847)
Once again, it's demonstrated for us, trusted third parties are security holes.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by Animats on Monday May 03, 2021 @01:31PM (#27028034)
That's my point. This is just a slow migration to a new version, not something urgent. There's no reason to bypass normal procedures.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by nullc on Tuesday May 04, 2021 @12:43AM (#27034150)
The old releases on the site are broken even worse, because they're signed with a revoked certificate. Getting something unsigned up was a strict improvement, particularly because there is no ETA for getting this fixed.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by pstrateman on Monday May 03, 2021 @01:23AM (#27021887)
The SHA-256 hashes are gpg signed with the key at https://bitcoin.org/laanwj-releases.asc

Nobody actually checks the executable signatures, they're buried in the file properties.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by garmaine on Monday May 03, 2021 @04:53AM (#27022909)
Everyone on macOS and Windows checks the executable signatures automatically on first run.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by ddtaylor on Monday May 03, 2021 @07:08AM (#27023625)
Can't an attacker modify the executable to not do that?
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by freeone3000 on Monday May 03, 2021 @07:16AM (#27023667)
No, because the check isn't part of the executable, it's part of the operating system. An attacker would have to modify the executable to have a valid certificate, which would take several months and a few hundred dollars, which usually makes it not worth it.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by tinus_hn on Monday May 03, 2021 @12:46PM (#27027349)
The alternative is signing it with another certificate which is about $100
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by freeone3000 on Monday May 03, 2021 @01:13PM (#27027788)
From who? It can't be a non-EV cert, since those are trusted less and present the same dialog. A 1-year from Verisign is $500. Comodo is $229. Setigo is $329. All of them require verification that you own a business, which is another $50 to set up an LLC, and the issuance lead time for both of these providers are a few months.

If you have a quick, trusted way of getting an EV code-signing cert trusted by SmartScreen, please, let me know.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by tinus_hn on Monday May 03, 2021 @02:26PM (#27028836)
They do present a dialog but not the same one you get with no or an invalid signature.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by h_anna_h on Monday May 03, 2021 @09:04AM (#27024512)
Signing the hashes instead of the executable leaves you open to collision attacks.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by gojomo on Monday May 03, 2021 @09:19AM (#27024680)
Are you aware of any practical SHA-256 collision attacks?

What do you expect the results would be, if within the next few days it were discovered that there were two different files, with the same SHA-256, each claiming to be the Bitcoin-0.21.1 release?

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by nullc on Tuesday May 04, 2021 @12:03AM (#27033945)
If you know a sha256 collision the bitcoin network will currently pay you about 0.476 BTC (~about $26k USD right now) to publish it.

https://blockstream.info/address/35Snmmy3uhaer2gTboc81ayCip4...

https://blockstream.info/address/39VXyuoc6SXYKp9TcAhoiN1mb4n...

https://blockstream.info/address/3DUQQvz4t57Jy7jxE86kyFcNpKt...

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by drexlspivey on Tuesday May 04, 2021 @07:08AM (#27036243)
In practice, if you try to claim those coins by broadcasting a transaction with the collision the most likely outcome is someone will snatch the coins by changing the output address with his own address (since the scripts contains no signature checking). You would have to give your tx straight to a miner (and hope for the best)
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by gojomo on Wednesday May 05, 2021 @10:48PM (#27058620)
But also, in practice, the fame of announcing such a discovery (with or without an explanation of the method for creating it) could be worth more than $26k.

And if you wanted to profit from it, via submitting the transaction or not, you could likely make far more by speculating on the effects of that announced collision on the Bitcoin price – likely sharply negative.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by gliptic on Monday May 03, 2021 @09:39AM (#27024929)
There's no such thing as "signing the executable". It's always signing a hash.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by h_anna_h on Monday May 03, 2021 @10:51AM (#27025781)
Certain signing algorithms such as ed25519 do not depend on the collision resistance of the hash function when signing the message. They do however when signing the hash.

"It's always signing a hash.", sure, but S(m) and S(h(m)) is a different operation with very different properties.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by littlestymaar on Monday May 03, 2021 @10:31AM (#27025541)
You realize that if SHA-256 collision where something even remotely practical, then the entire bitcoin protocol is instantly dead?
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by h_anna_h on Monday May 03, 2021 @10:53AM (#27025803)
No, I do not realize that. Is the security of the bitcoin protocol based on the collision resistance of SHA-256? If so they should try to find a solution around it.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by littlestymaar on Tuesday May 04, 2021 @09:22AM (#27037276)
Blocks are identified by their hash, so if you can create a collision between two blocks, there's no way for anyone to know which one is the legit one.

Also, inside a block itself, transactions are part of a Merkle Tree[1], so if you can find a SHA-256 collision, you can also create confusion on what transaction where actually included in a given block.

You cannot really “find a solution around it” for two reasons:

1- the bitcoin blockchain is immutable, so the old blocks can't really be rewritten to work with another hashing mechanism. What you could do is reboot the bitcoin blockchain with another hash algorithm, with a Genesis block summarizing the last know state of the bitcoin blockchain. But that would need consensus among the entire bitcoin community, which will never happen because of reason #2

2- Bitcoin miners own millions of dollars of custom hardware designed for SHA-256 generation (mining), there's no way they'll just be like “OK, let's change hash function, I'll throw this useless stuff away and buy new ones”.

[1]: https://en.wikipedia.org/wiki/Merkle_tree

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by nullc on Monday May 03, 2021 @09:27AM (#27024796)
The signature algorithm uses the same hash, so there isn't any meaningful opening there. :)
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by h_anna_h on Monday May 03, 2021 @10:58AM (#27025874)
There is a reason ed25519 is used instead of ed25519ph :)

PureEdDSA does not break when a hash function without collision resistance is used.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by nullc on Monday May 03, 2021 @11:10AM (#27026084)
Doesn't apply to PGP. :)

And the kind of theoretical attack that non-prehashing protects you from requires that you sign an attacker chosen message -- relevant in some applications but kind of contrived.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by Black101 on Monday May 03, 2021 @07:23AM (#27023705)
> They do offer SHA-256 hashes for the executables, so people can check by hand

I never understood how this is useful... If someone would replace the executables, wouldn't they also replace the SHA-256 hashes that you are getting from the same source?

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by nullc on Monday May 03, 2021 @07:30AM (#27023758)
The practice of checkums/hashes with files really stems back to FTP and even less reliable transfer mechanisms would randomly corrupt your data. They also let you use a less trustworthy source, while you get just the hashes from a slow but more trustworthy source.

In Bitcoin's case what is actually provided is a PGP signature. The relevant key isn't provided along with the download files for the reason you mention. Though there are instructions on obtaining and validating the key on the download site. ... and if you're depending on reading those instructions' they're vulnerable to substitution.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by Black101 on Monday May 03, 2021 @09:00AM (#27024482)
For checking data corruption it makes more sense but most archive formats have this built-in, don't they? I.E.: You won't be able to extract it if it got corrupted.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by nullc on Monday May 03, 2021 @09:04AM (#27024521)
Tar doesn't, nor does the classic unix 'compress' (the thing we all used before gzip). :)
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by Black101 on Monday May 03, 2021 @10:29AM (#27025509)
if you are using tar by itself, you are asking for trouble
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by r1ch on Monday May 03, 2021 @09:11AM (#27024585)
Downloading over HTTPS also protects against data corruption in transit.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by vbezhenar on Monday May 03, 2021 @10:18AM (#27025378)
Downloading over HTTP also protects against data corruption in transit, because HTTP uses TCP and TCP uses CRC32 checksums.

Though those checksums are not extremely reliable and have tiny chance of being corrupted.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by nullc on Monday May 03, 2021 @10:59AM (#27025891)
> TCP uses CRC32 checksums.

It uses a 16-bit ones complement addition. At the packet sizes used on the internet it's extremely weak, much more so than you'd expect just from it being 16-bits, especially on data that isn't a uniform binary.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by xorcist on Monday May 03, 2021 @08:00AM (#27023960)
It would indeed offer no security if the hashes weren't signed (which they are).

The question is rather why distribute a separate file with hashes and their signatures, rather than just the signatures themselves, seeing how all useful cryptographic signatures contains the hash anyway?

I suspect the answer is that it is somehow more convenient for the build and release process to distribute one file with all hashes, rather than lots of individual signatures for each artifact. The release process is quite elaborate with several parties independently reproducing that exact build. But someone would have to correct me on that.

That's probably also why they don't consider the broken Windows certificate important enough to stall the release. Relying on a single CA does not provide them with the type of security they are looking for.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by Black101 on Monday May 03, 2021 @09:43AM (#27024970)
> The question is rather why distribute a separate file with hashes and their signatures, rather than just the signatures themselves, seeing how all useful cryptographic signatures contains the hash anyway?

that is what needs to be fixed, and ideally would become part of the archive format so that it can be automatically checked (but also should have the option to disable it).

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by Aachen on Monday May 03, 2021 @07:30AM (#27023754)
Mirrors. Remember when you were asked to pick a mirror? And they'd invariably use plain http. And CDNs are still common, whereas the hash sum comes from the https main site.

At least that was the original point. These days you usually just host stuff yourself (on your domain or someone you pay, like a paid CDN) rather than having people mirror stuff independently. And it's all https, so it's mostly moot like you say, but old habits seem to die hard though it's already far less common than in the past.

Whenever you still see one, look at where the download really comes from. Often it's third party whereas the hash is first party. If not, then it's probably just a page with old habits.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by Black101 on Monday May 03, 2021 @08:59AM (#27024463)
> Mirrors. Remember when you were asked to pick a mirror? And they'd invariably use plain http.

With http, you can man-in-the-middle the file and the hash.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by r1ch on Monday May 03, 2021 @09:10AM (#27024570)
You don't download the hash from the mirror, you use a signed hash from the distributor, allowing you to test that the untrusted mirror is serving you the correct file.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by Aachen on Monday May 03, 2021 @10:37AM (#27025617)
"they" refers to the mirror, not the place where you get the hash from.
Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by jnwatson on Monday May 03, 2021 @10:24AM (#27025439)
The CircleCI hack was (eventually) caught because the hash of the downloaded file no longer matched.

If the checksum is hosted in a different place than the file, it requires an attacker to compromise two separate systems.

In the typical system, though, the hash sitting next to the file isn't particularly useful.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by h_anna_h on Monday May 03, 2021 @09:02AM (#27024501)
> but the download and the hashed check come from the same site. If someone can spoof the download site

Someone should tell the nixos devs that. Not being able to verify the authenticity of something as important as your OS does not seem very safe.

Re:Bitcoin Core: Bitcoin Core 0.21.1 released with Taproot a... by nullc on Monday May 03, 2021 @09:30AM (#27024824)
If nixos is doing that they're not alone. Fedora is in essentially the same camp unless it changed in the latest release: It's pgp signed but with a totally new key with every release and that pgp key isn't signed by anything else, and the only way to verify it is ... to download it from the same place you got your iso from.

A number of years back openssl changed their pgp key and for a month didn't publish it anywhere. AFAICT I was the first person to complain about it-- which also suggests that all the distros that had already shipped the update hadn't checked it.