News for hackers. Stuff that matters.
Re:Distributing NixOS with IPFS by HurrdurrHodor on Thursday January 19, 2017 @11:58AM (#13437275)
Please don't use SHA-1. It's almost broken.
Re:Distributing NixOS with IPFS by rkeene2 on Thursday January 19, 2017 @12:36PM (#13437571)
The protocol is actually extensible, and the hashing algorithm MUST always be specified by the server (which the client could then choose to not accept, just as it can reject the certificate because of the signature algorithm).

Also, it would require a preimage attack against one of the hashed items to be useful which SHA-1 will likely be resistant to a long time (though decreasing with the number of items hashed) and SHA-1 is unlikely to be vulnerable to a preimage attack in the near future based on what we know so far.

The signature and certificates that are used to validate the top-level index can be based on a far better hashing algorithm independently of the content-based hashing.

Re:Distributing NixOS with IPFS by lgierth on Thursday January 19, 2017 @12:26PM (#13437488)
Use multihashes for hash algorithm agility :) https://github.com/multiformats/multihash
Re:Distributing NixOS with IPFS by rkeene2 on Thursday January 19, 2017 @12:38PM (#13437595)
Multiple hashing algorithms is already built-in and mandatory, everywhere a hashing operation is used the hashing algorithm must also be specified.