Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: othersrc/external/bsd/hashtree

Module Name:    othersrc
Committed By:   agc
Date:           Tue Jun 21 14:51:38 UTC 2011

Update of /cvsroot/othersrc/external/bsd/hashtree
In directory

Log Message:
Initial import of hashtree functions into othersrc.

The hashtree, or Merkle tree algorithms, split a file up into blocks,
and calculate a message digest on those blocks.  Subsequent digests
are concatenated onto the previous digests.  If there is more than one
digest calculated, a higher level of digest is then calculated across
the lower-order digests, to provide a tree-like structure of message

If there is only one digest calculated, then the hashtree in this
degenerate case is the same as the digets of the file.

        % hashtree -n 1 dist/hashtree.c
        HASHTREE/sha1/1/10358/10358 (dist/hashtree.c) = 
        % sha1 dist/hashtree.c
        SHA1 (dist/hashtree.c) = 253f185d39783fd29ca6a7936fee4b50e3775f39

hashtree(1) can be used to specify the hashing algorithm used
(including hmac algorithms), and the size of the blocks. 

        % hashtree -b 4096 dist/hashtree.c
        HASHTREE/sha1/2/10358/4096 (dist/hashtree.c) = 

Alternatively, the number of desired blocks can be specified, and
hashtree will work out the block size from that parameter and the size
of the file.  By default, a blocksize of 1024 is used.  There is the
possibility of producing very large digests using hashtree(1):

        % hashtree dist/hashtree.c
        HASHTREE/sha1/2/10358/1024 (dist/hashtree.c) = 

Merkle trees can be used to implement Lamport's signature scheme - see

and there are also uses in ZFS:

(although indirect pointers can be a tad difficult here?)

Hash trees are written up more generally in:

There are also uses of the tiger algorithm being used to produce more
specific "tiger trees".


Vendor Tag:     CROOKS
Release Tags:   hashtree-base
N othersrc/external/bsd/hashtree/Makefile
N othersrc/external/bsd/hashtree/dist/hashtree.c
N othersrc/external/bsd/hashtree/dist/Makefile
N othersrc/external/bsd/hashtree/dist/TODO
N othersrc/external/bsd/hashtree/dist/libhashtree.3
N othersrc/external/bsd/hashtree/dist/hashtree.h
N othersrc/external/bsd/hashtree/dist/main.c
N othersrc/external/bsd/hashtree/dist/hashtree.1
N othersrc/external/bsd/hashtree/hashtree/Makefile
N othersrc/external/bsd/hashtree/libhashtree/Makefile
N othersrc/external/bsd/hashtree/libhashtree/shlib_version

No conflicts created by this import

Home | Main Index | Thread Index | Old Index