This section is a collection of various hash functions for various datatypes to be hashed. The procedure of creating a hash function is usually additive/multiplicative or rotative.

Additive or Multiplicative Hashing

Additive or multiplicative hashing combines data by either performing an addition or multiplication sequentially by the number of elements in the input. The calculation done on an element value is usually in the form of a multiplication by a prime number.

For example, sequentially adding or multiplying each composition of every element of the input with a prime number:

h(m) &=& \sum_{i=0}^{|m|} m_{i} \circ p \\
&or& \\
h(m) &=& \prod_{i=0}^{|m|} m_{i} \circ p

Rotative Hashing

Every element in the input is used to construct the hash but values are put through a process of bitwise shifting which is usually a combination of both left and right shifts with the shift amounts being prime numbers. The result of each pass is added to an accumulator which is passed back as the result.

For example, adding or multiplying each composition of the message shifted left by a prime-number and right by a prime number:

h(m) &=& \sum_{i=0}^{|m|} (m_{i} << p) \circ (m_{i} >> q) \\
&or& \\
h(m) &=& \prod_{i=0}^{|m|} (m_{i} << p) \circ (m_{i} >> q)


fuss/hash_functions.txt ยท Last modified: 2017/02/22 18:30 (external edit)

Access website using Tor Access website using i2p

For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy and plagiarism pages.