News for hackers. Stuff that matters.
Re:Hashpipe – Pipe iff the hash matches by _prometheus on Friday April 03, 2015 @07:33PM (#9319213)
this already works. install ipfs: http://ipfs.io/docs/install then:

    ipfs init
    ipfs daemon &
    sleep 20  # sorry this will go away
    ipfs mount
    sh /ipfs/QmTpnQL97XEHmyt54mgEwf5BN8gJWvw4sGgwQzjqtBwLX6
you can see it on the web at: http://gateway.ipfs.io/ipfs/QmTpnQL97XEHmyt54mgEwf5BN8gJWvw4...
Re:Hashpipe – Pipe iff the hash matches by KMag on Sunday April 05, 2015 @05:47AM (#9323605)
If any of you are designing a system like ipfs, please use Merkle tree roots as the identifiers (and make sure leaf nodes are hashed differently than inner nodes as in THEX, or better yet Joan Daemen's Sakura construction).

The main reason is that at some point you probably want to support downloading from multiple untrusted sources. Properly implemented Merkle trees (such as using the Sakura construction) are provably as strong as the underlying hash algorithm and allow lightweight cryptographic proof that a given block belongs to the file in question and belongs in the claimed place.

Gnutella uses the SHA-1 of the whole file the identifier and then just assumes the first peer to give it a Merkle tree root is giving it the correct root. Because there isn't guaranteed consistency between the identifier and the tree root, this makes it vulnerable to an attack where an attacker tries hard to be first, and give it a root for a corrupted version of the file and the peer wastes a lot of time and bandwidth re-downloading uncorrupted blocks that fail to verify.

Alternatively, you could make the identifier the concatenation of a full-file hash and a Merkle tree root. However, since the Sakura construction (and several other constructions) are provably as strong as the underlying hash, this is a waste of space. Concatenating the SHA-256 of the file with a SHA-256 Merkle tree root only gives you as much strength as the first 257 bits of a SHA-512 Merkle tree root. If you can spare the space for the longer identifiers, you're better off using a longer hash instead of two shorter hashes.

In other words, it's a waste of space to concatenate a whole-file hash with a Merkle tree root if you use a tree construction that's provably as strong as the underlying hash function.

Re:Hashpipe – Pipe iff the hash matches by gojomo on Friday April 03, 2015 @07:41PM (#9319234)
That's great! I hope that IPFS, or something of its ilk, can be the promised-land to which I alluded.

If I were to install it, how hard/breaking would it be to change the access-path to something more grandiosely descriptive like '/everything/'?

Re:Hashpipe – Pipe iff the hash matches by whyrusleeping on Friday April 03, 2015 @08:31PM (#9319379)
its a simple matter of changing the ipfs config file
Re:Hashpipe – Pipe iff the hash matches by _prometheus on Friday April 03, 2015 @09:50PM (#9319574)
<3
Re:Hashpipe – Pipe iff the hash matches by _prometheus on Friday April 03, 2015 @09:50PM (#9319576)
also, we want to push towards `/` being everything, shoving all your local crap into `/local` or `/localhost`