[p2p-hackers] [connellybarnes@yahoo.com: [i2p] Python filesharing Merkle hash tree magic]

Eugen Leitl eugen at leitl.org
Sun May 15 10:53:21 UTC 2005


----- Forwarded message from "C. Barnes" <connellybarnes at yahoo.com> -----

From: "C. Barnes" <connellybarnes at yahoo.com>
Date: Thu, 12 May 2005 04:36:32 -0700 (PDT)
To: i2p at i2p.net
Subject: [i2p] Python filesharing Merkle hash tree magic


Topic: P2P filesharing ala BitTorrent.

Presenting public domain module 'chunk.py':

  http://oregonstate.edu/~barnesc/temp/chunk.py

This module does some magic with Merkle hash trees.
It allows one to publish a 20 byte SHA-1 digest for
a file, and encode 'chunks' from the file with
minimal overhead, such that any given chunk can be
verified against the file's 20 byte digest.
Cryptographic hashing is used to verify each chunk,
so chunks can be transmitted in any order, and it is
impossible to save corrupt data to disk if one has
the correct file hash.

One could use this module in any file sharing
application which divides files up into blocks.

For example, in a BitTorrent-like project it might
be desirable to keep the .torrent files minimal in
size.  Using this module, one needs to only publish
a hash like DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
instead of a digest of all blocks in the file.

Pros:
 - Smaller digest size.
 - Can send chunks in any order.

Cons:
 - Each 'chunk' contains checksumming information.
   This overhead is less than 4% for files of size
   less than 1e20 bytes.

 - Connelly Barnes



		
__________________________________ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 
_______________________________________________
i2p mailing list
i2p at i2p.net
http://i2p.dnsalias.net/mailman/listinfo/i2p

----- End forwarded message -----



More information about the P2p-hackers mailing list