News for hackers. Stuff that matters.
Re:Setting up my new laptop: Nix style by than3 on Saturday December 24, 2022 @11:59PM (#34124439)
I don't think you understand the difference and fluidity of what a distribution is and how it differs from likelihood curves.

You've made some significant assumptions, one of those assumptions is that the brute force way is the most efficient way or put another way there is no optimal way to calculate collisions better than brute force.

That line of thinking is very flawed. Has shown to be flawed many times in the past several decades, and shouldn't even be up for debate given the evidence and deprecation of various cryptographic functions (as vulnerabilities become known publicly). We all know vulnerabilities were known before the deprecation because detection is a lagging process.

Also note, as far as the respondents of the project I've spoken with have said, they do not even check for existing collisions. So if a collision did occur, you wouldn't even know it without specialized knowledge.

Re:Setting up my new laptop: Nix style by anon291 on Sunday December 25, 2022 @12:23AM (#34124554)
What kind of collision are you envisioning? And what's the failure case? Two packages that suddenly have the same hash are still going to differ in the package name and version string, and thus different directories on the nix store.

You can never have something compromised injected onto your computer this way either because nix requires signed builds to download from a remote repository. If you trust a malicious repository... that's on you. By default, only nixpkgs is trusted with the default hydra.

Re:Setting up my new laptop: Nix style by than3 on Sunday December 25, 2022 @12:35AM (#34124628)
package name and version string are part of what, the metadata manifest provided right?

As a thought experiment, say a collision is found for libc or the standard library, thanks to all that research on primes that's been released recently, assume a more efficient search is found.

What would the failure domains be for those two libraries if, a) the library was non-functional suddenly, or b) the library remained functional but malicious.

Would Nix detect the collision, or would Nix simply recreate the dependency graph overwriting the old but secure with this new malicious software.

Almost all of the security primitives are implemented at domain edges, which means local access, or remote exploitation would have equal effect, and a watering hole/supply chain attack may not even be necessary.

Re:Setting up my new laptop: Nix style by the_gipsy on Sunday December 25, 2022 @03:46AM (#34125488)
Nothing would happen. Like the other commenter said, you trust your package repo like with any other distro.
Re:Setting up my new laptop: Nix style by shakow on Sunday December 25, 2022 @05:13AM (#34125878)
So, basically, you're saying that Nix is insecure, because you need hash collision + signature forgery + malicious access to repos; whereas in a standard distro, you only need signature forgery + malicious access to repos?

I really don't get your point.

Re:Setting up my new laptop: Nix style by viraptor on Sunday December 25, 2022 @08:03AM (#34126888)
> thanks to all that research on primes that's been released recently, assume a more efficient search is found.

That's just trolling. Primes have nothing to do with sha256 beyond the initial value. It's just bitwise operations and additions.