Fowler Noll Vo hash

Fowler Noll Vo hash

Fowler/Noll/Vo is a non-cryptographic hash function created by Glenn Fowler, Landon Curt Noll, and Phong Vo.

History

The first version of FNV was FNV-0. The problem with FNV-0 was that it used an offset basis (see below) of 0, meaning that wherever an empty input or an input consisisting entirely of null bytes was encountered, the resulting hash would be 0. This, of course, meant rather a lot of collisions.

The current versions are FNV-1 and FNV-1a, which supply a means of creating non-zero offset bases.

The hash

One of FNV's key advantages is that it is very simple to implement. Start with "hash" = "offset_basis" (see below). For each byte in the input, multiply "hash" by the "FNV prime", then XOR it with the byte from the input. The alternate algorithm, FNV-1a, reverses the multiply and XOR steps.

There are several different "offset bases" for various bit lengths. These offset bases are computed by running FNV-0 on the string "chongo /../", which is Noll's signature line. This is the only current practical use for the deprecated FNV-0.

"FNV primes" are a much more difficult problem. Noll says on his webpage that "The theory behind which primes make good FNV_primes is beyond the scope of this web page." One notable feature of FNV primes is that when represented as hexadecimal, they are found to bear this appearance:

* The high byte is 1.
* The next-to-low byte is 1.
* The low byte is chosen so that the number is prime.
* All bytes in between are zero.

For any given size, there are a number of different low byte values which satisfy the above constraints. It is not known what criteria were used to select the particular values.

Note that the values are in notation used by C and some other popular programming languages. So "1<<24" means 1 shifted left 24 bits, or 224. The prefix "0x" on numbers means that the subsequent numbers are in hexadecimal.

Other considerations

FNV currently comes in 32-, 64-, 128-, and 256-bit flavors. For pure FNV implementations, this is determined solely by the availability of FNV primes for the desired bit length; however, the FNV webpage discusses methods of adapting one of the above versions to a smaller length that may or may not be a power of two.

External links

* [http://www.isthe.com/chongo/tech/comp/fnv/ Landon Curt Noll's webpage on FNV]

ee also

* MD2
* MD4
* MD5
* SHA family
* RIPEMD


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Hash function — A hash function is any well defined procedure or mathematical function for turning some kind of data into a relatively small integer, that may serve as an index into an array. The values returned by a hash function are called hash values, hash… …   Wikipedia

  • Landon Curt Noll — Infobox Scientist name = Landon Curt Noll other names = chongo |300px birth date = birth date|1960|10|28|mf=y birth place = Walnut Creek, California, United States residence = United States flagicon|United States nationality = United States… …   Wikipedia

  • Landon Curt Noll — (* 28. Oktober 1960 in Walnut Creek, Kalifornien) ist der Entdecker zweier Mersenne Primzahlen: 221701 − 1 und 223209 − 1.[1] Noll ist Mitglied der Amdahl 6 Gruppe und fand die größte Amdahl 6 Primzahl: [2] Er ist der Co Erfinder eines Systems… …   Deutsch Wikipedia

  • MurmurHash — is a non cryptographic hash function suitable for general hash based lookup.[1][2][3] It was created by Austin Appleby in 2008,[4][5] and exists in a number of variants[6] …   Wikipedia

  • FNV — could stand for: *Federatie Nederlandse Vakbeweging, Netherlands, (Federated Netherlands Labour Movement) *Förbundet Nordisk Vuxenupplysning, Sweden, (Nordic Association of Adult Education) *Foreningen Naturparkens Venner, Denmark *Fowler Noll Vo …   Wikipedia

  • FNV — (англ. Fowler–Noll–Vo)  простая хэш функция для общего применения, разработанная Гленом Фаулером, Лондоном Керт Нолом и Фогном Во. Не является криптографической функцией. Существуют варианты для 32 , 64 , 128 , 256 , 512 , и 1024 … …   Википедия

  • FNV (Informatik) — In der Informatik ist FNV ein Algorithmus zur Generierung von Streuwerten über Datenfelder: eine sog. Hash Funktion. Nachnamensgeber des Kürzels FNV sind Glenn Fowler, Curt Landon Noll und Phong Vo, die den Algorithmus in Kooperation entwickelten …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”