head	1.2;
access;
symbols
	merkletree-base:1.1.1.1 CROOKS:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2022.02.15.19.29.07;	author agc;	state dead;
branches;
next	1.1;
commitid	DneBnAljSEKBvKsD;

1.1
date	2014.03.04.08.38.06;	author agc;	state Exp;
branches
	1.1.1.1;
next	;
commitid	6dSnif5N2aM5imrx;

1.1.1.1
date	2014.03.04.08.38.06;	author agc;	state Exp;
branches;
next	;
commitid	6dSnif5N2aM5imrx;


desc
@@


1.2
log
@clean up old test files

do the path and directory test in a different way (cvs has issues with
symlinks, yay - create the test directory on the fly each time

remove the hardcoded test directory
@
text
@merkle rmd160,sha1 2 1903 512 (1.in) = 56e11e2126971f718452cc3555033e5cbcaed21ddd19e2f0bf546137d7044e724e1e0826f32bdb9739aa67e139e5cbb39be511a01d3d7019514dcf39afbff37d7f6d377a30a010e17ef4651ff456cf13137d529ebf152d826790e7f2357fb3e7dc20ea50b47a927767f31d4cf9e28e4f7dc6ec5a15a4407a71659f6f237f2de878ec51d16ac86109a4b4110b1762aab2881187e4e753aa2baeaa676bfe674d552efd091a2c071d1f429bca3ebb25b6d730bcdb6414b8c7b699fa300fa967b0342adb5e0d502bfe95
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import merkletree, a program to compute Merkle trees, into othersrc.
For more information on Merkle trees, see:

	http:/en.wikipedia.org/wiki/Merkle_tree

This library and utility uses the libmultigest(3) library to calculate
multiple digests over the data, for a given block size.

The libmerkletree(3) library implements Merkle tree calculation, and also
includes some higher-level functions to verify a file against a
previously-generated Merkle tree.

A Merkle tree is a hash tree calculated across blocks in data.  Any block
size can be specified in this implementation.  A digest is calculated
across each block in the data, and then a digest is calculated across
blocks of the checksums, and this continues until only one block of
digest exists.  The hierarchical nature of this allows individual blocks
of a file to be verified, even if other parts of the file have been
modified.  A degenerate case, in which the data is less than the
blocksize, will mean that a single digest value for the block is
calculated.  This will be the same as the digest algorithm applied to the
whole file.

Merkle trees are useful for seeing which part of a large file has been
changed or modified, and also acts as a guard against malevolent attacks
via second pre-images on data spanning more than 1 blocksize.

To view merkletree in action:

% merkletree -b 128 -a sha3-256,blake2,md5 -o m.sum Makefile
% merkletree -v m.sum Makefile
% cat m.sum
merkle sha3-256,blake2,md5 2 144 128 (Makefile) = 6c803d85495efa93468142c80f0725e39531bf2935c17b96dafeb13a077a3b288a22372fdb707e1503090a2a065e7c1be5d0a7c7fd009ab77467780f5bd1a66cdcb4b813d12b13699aadb6188d5e48d9a2a693b1a1a6085bb10bc11aed8240720244d9265f789b657d908a8b896402f409fbc52cbfbca055cf9f6a606d5504113d798462e46d1bbc0e23e347928067ed34658c18f80a35fd1a39928aeb772b359a2011cbc8af0e356507a4bf057004cdeaa87adefe44b0f58573f10ff034858c85eb8fc3e99fbde9fb2189c7a10fea73bfab37c44aaf02640861d0211285893b598912b3fa76f5373b3b5d2f94813b1326d56e1f34fb4038bab5cbeafe8d5eee944f1527b4a433c030fa31900bd12e53168a4cd8916ded0dcd0d006c05bf82ce8bd7d3e6b516fdf6e1063555fa5d436d4e3cf95b609389001624e20e052266a6262dbb20bd934574b3fff295214fbc1e6123fa9f797a8930a42be919dcd2a4307f721c65827ff2b5a1451af9d821362c40480e0b9b95b6403d3be4b1fffc052f691242b03110b91f605b93c0c48740e373f3a06bcf523c54a1542f40a56020e044a230e973efb90fe5d3c22be00f359ab19319926f9d0c879df841227b518439b952b07bfde253825a2c69115c4ee709284f9f9095010ed32384dbd83aebf51868fb2b8b00ffe01150115e84f4db223e02ada33fe3483d084d9368f46bcbef643d4a79f3bea19bea32977fe8907b94864cab89cc2cd47f2ddc1a7ea23f28dc7df47fef7d396f316397463463fa0d5ae9d8700a6c55f3b546910ebb0f91d9fcf551f8fdab4bd164944f77bf2622b307fbb96a826cbd84598e8153ce49dd048599db6844b3ef5905b39cfe4b66485755f593e7093439fc937c839686dd94bbdb2561e362437ecc84b6a415442a8dd2bba534f540da8f5e5568f077a946e3df74c0
%

and

% merkletree -b 128 -a sha3-256,blake2,md5 -o 1.sum 1.in
% echo "Hello world" >> 1.in
% merkletree -v 1.sum 1.in
[1] 128, 255
%
@
text
@@
