News for hackers. Stuff that matters.
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.