5. FNV Constants
This section preserves the RFC text for FNV, including FNV primes, offset_basis, endianism, XOR folding, constants, non-cryptographic security guidance, source code, test code, Makefile, and comparisons with SHA-1 and SHA-256.
Original RFC Text
5. FNV Constants
The FNV Primes are as follows:
+==========================================================+
| Size FNV Prime = Expression |
+==========================================================+
| = Decimal |
+==========================================================+
| = Hexadecimal |
+==========================================================+
| 32-bit FNV_Prime = 2^24 + 2^8 + 0x93 |
+----------------------------------------------------------+
| = 16,777,619 |
+----------------------------------------------------------+
| = 0x01000193 |
+----------------------------------------------------------+
| 64-bit FNV_Prime = 2^40 + 2^8 + 0xB3 |
+----------------------------------------------------------+
| = 1,099,511,628,211 |
+----------------------------------------------------------+
| = 0x00000100 000001B3 |
+----------------------------------------------------------+
| 128-bit FNV_Prime = 2^88 + 2^8 + 0x3B |
+----------------------------------------------------------+
| = 309,485,009,821,345,068,724,781,371 |
+----------------------------------------------------------+
| = 0x00000000 01000000 00000000 0000013B |
+----------------------------------------------------------+
| 256-bit FNV_Prime = 2^168 + 2^8 + 0x63 |
+----------------------------------------------------------+
| = 374,144,419,156,711,147,060,143,317,175,368,453,031, |
| 918,731,002,211 |
+----------------------------------------------------------+
| = 0x0000000000000000 0000010000000000 0000000000000000 |
| 0000000000000163 |
+----------------------------------------------------------+
| 512-bit FNV_Prime = 2^344 + 2^8 + 0x57 |
+----------------------------------------------------------+
| = 35,835,915,874,844,867,368,919,076,489,095,108,449, |
| 946,327,955,754,392,558,399,825,615,420,669,938,882,575, |
| 126,094,039,892,345,713,852,759 |
+----------------------------------------------------------+
| = 0x0000000000000000 0000000000000000 0000000001000000 |
| 0000000000000000 0000000000000000 0000000000000000 |
| 0000000000000000 0000000000000157 |
+----------------------------------------------------------+
| 1024-bit FNV_Prime = 2^680 + 2^8 + 0x8D |
+----------------------------------------------------------+
| = 5,016,456,510,113,118,655,434,598,811,035,278,955,030, |
| 765,345,404,790,744,303,017,523,831,112,055,108,147,451, |
| 509,157,692,220,295,382,716,162,651,878,526,895,249,385, |
| 292,291,816,524,375,083,746,691,371,804,094,271,873,160, |
| 484,737,966,720,260,389,217,684,476,157,468,082,573 |
+----------------------------------------------------------+
| = 0x0000000000000000 0000000000000000 0000000000000000 |
| 0000000000000000 0000000000000000 0000010000000000 |
| 0000000000000000 0000000000000000 0000000000000000 |
| 0000000000000000 0000000000000000 0000000000000000 |
| 0000000000000000 0000000000000000 0000000000000000 |
| 000000000000018D |
+----------------------------------------------------------+
Table 1
The FNV offset_basis values are as follows:
+===================================================================+
| Size offset_basis |
+===================================================================+
| = Decimal |
+===================================================================+
| = Hexadecimal |
+===================================================================+
| 32-bit offset_basis |
+-------------------------------------------------------------------+
| = 2,166,136,261 |
+-------------------------------------------------------------------+
| = 0x811C9DC5 |
+-------------------------------------------------------------------+
| 64-bit offset_basis |
+-------------------------------------------------------------------+
| = 14,695,981,039,346,656,037 |
+-------------------------------------------------------------------+
| = 0xCBF29CE4 84222325 |
+-------------------------------------------------------------------+
| 128-bit offset_basis |
+-------------------------------------------------------------------+
| = 144,066,263,297,769,815,596,495,629,667,062,367,629 |
+-------------------------------------------------------------------+
| = 0x6C62272E 07BB0142 62B82175 6295C58D |
+-------------------------------------------------------------------+
| 256-bit offset_basis |
+-------------------------------------------------------------------+
| = 100,029,257,958,052,580,907,070,968,620,625,704,837, |
| 092,796,014,241,193,945,225,284,501,741,471,925,557 |
+-------------------------------------------------------------------+
| = 0xDD268DBCAAC55036 2D98C384C4E576CC C8B1536847B6BBB3 |
| 1023B4C8CAEE0535 |
+-------------------------------------------------------------------+
| 512-bit offset_basis |
+-------------------------------------------------------------------+
| = 9,659,303,129,496,669,498,009,435,400,716,310,466,090, |
| 418,745,672,637,896,108,374,329,434,462,657,994,582,932, |
| 197,716,438,449,813,051,892,206,539,805,784,495,328,239, |
| 340,083,876,191,928,701,583,869,517,785 |
+-------------------------------------------------------------------+
| = 0xB86DB0B1171F4416 DCA1E50F309990AC AC87D059C9000000 |
| 0000000000000D21 E948F68A34C192F6 2EA79BC942DBE7CE |
| 182036415F56E34B AC982AAC4AFE9FD9 |
+-------------------------------------------------------------------+
| 1024-bit offset_basis |
+-------------------------------------------------------------------+
| = 14,197,795,064,947,621,068,722,070,641,403,218,320, |
| 880,622,795,441,933,960,878,474,914,617,582,723,252,296, |
| 732,303,717,722,150,864,096,521,202,355,549,365,628,174, |
| 669,108,571,814,760,471,015,076,148,029,755,969,804,077, |
| 320,157,692,458,563,003,215,304,957,150,157,403,644,460, |
| 363,550,505,412,711,285,966,361,610,267,868,082,893,823, |
| 963,790,439,336,411,086,884,584,107,735,010,676,915 |
+-------------------------------------------------------------------+
| = 0x0000000000000000 005F7A76758ECC4D 32E56D5A591028B7 |
| 4B29FC4223FDADA1 6C3BF34EDA3674DA 9A21D90000000000 |
| 0000000000000000 0000000000000000 0000000000000000 |
| 0000000000000000 0000000000000000 000000000004C6D7 |
| EB6E73802734510A 555F256CC005AE55 6BDE8CC9C6A93B21 |
| AFF4B16C71EE90B3 |
+-------------------------------------------------------------------+
Table 2