FACTOID # 42: English speaking kids are the world's biggest novel readers - but the least enthusiastic comic readers.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Fowler Noll Vo hash

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

Contents

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 version is 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 <Landon Curt Noll> / ../ ", 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_prime's 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 low byte is some number which varies. (Presumably, whatever value will make the whole number prime.)
  • All bytes in between are zero.

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 is not a power of two.


Related links

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

See also


  Results from FactBites:
 
Fowler Noll Vo hash - Wikipedia, the free encyclopedia (350 words)
For each byte in the input, multiply hash by the FNV prime, then XOR it with the byte from the input.
These offset bases are computed by running FNV-0 on the string "chongo Noll> /\../\", which is Noll's signature line.
Noll says on his webpage that "The theory behind which primes make good FNV_prime's 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:
  More results at FactBites »


 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m