X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Fdoc%2Fhash.txt;h=788a382c3730c202df7581c31ccc9d3acdac170d;hb=ae2b00416589dfe798fc40f0575f62a0c664798f;hp=bcdbb7e389ba19c6bddaa533a2e496ff69eebac3;hpb=328aa1ad0a358196de246f1e7ba2e0d83477f74d;p=libucw.git diff --git a/ucw/doc/hash.txt b/ucw/doc/hash.txt index bcdbb7e3..788a382c 100644 --- a/ucw/doc/hash.txt +++ b/ucw/doc/hash.txt @@ -1,19 +1,21 @@ Hashing routines ================ -Libucw contains two cryptographic hash algorithms: MD5 (RFC 1321) and SHA1 (RFC -3174). A SHA1-HMAC (RFC 2104) message authentication is available. +LibUCW contains implementations of several hash algorithms. -There are non-cryptographic hashes as well. +<>: -<>: - -- <> -- <> -- <> +- <> (RFC 1321) +- <> (RFC 3174) +- <> (RFC 2104) - <> -<>: +<>: + +- <> +- <> + +<>: - <> - <> @@ -63,10 +65,37 @@ SHA1 has the same interface, so the same two ways apply. See also <>. +[[checksum]] +Checksums +--------- + +Their purpose is checking against random data changes, hardware +failures and alike. They are not to be used against aimed attacks. + +Adler-32 +~~~~~~~~ + +The <> is documented in the +<>. + +CRC-32 +~~~~~~ + +32-bit Cyclic Redundancy Check with the polynomial suggested by +Castagnoli et al.: Optimization of Cyclic Redundancy-Check Codes +with 24 and 32 Parity Bits", IEEE Trans. on Communications, Vol. 41, +No. 6, 1993. + +The interface is similar to the one we use for the cryptographic hashes. + +!!ucw/crc.h + [[nocrypto]] Non-cryptographic hashes ------------------------ +They are usually used to identify values in hash tables. + All these functions expect to be moduled by the size of a hash table. The size should be a prime number (it gives better distribution).