From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "identification" |
|---|
| subject | "Technique:Non-cryptographic hashes in file formats" |
|---|
| claim | "FNV 32-bit uses offset basis 0x811C9DC5 and prime 0x01000193; 64-bit uses 0xCBF29CE484222325 and 0x100000001B3; FNV-1 multiplies then XORs each byte, FNV-1a XORs then multiplies. SMHasher's FNV test is FNV-1a 32 with the seed XORed into the basis." |
|---|
| scope | | level | "technique" |
|---|
| applies_to | "Technique:Non-cryptographic hashes in file formats" |
|---|
| observed_in | |
|---|
|
|---|
| data | | method | "hash constants" |
|---|
| indicator | "imul/mul by 0x01000193 or 0x100000001B3 per byte" |
|---|
| test_vectors | | input | "a, FNV-1a 32" |
|---|
| expected | "0xE40C292C" |
|---|
|
| input | "a, FNV-1 32" |
|---|
| expected | "0x050C5D7E" |
|---|
|
| input | "a, FNV-1a 64" |
|---|
| expected | "0xAF63DC4C8601EC8C" |
|---|
|
| input | "123456789, FNV-1a 32" |
|---|
| expected | "0xBB86B11C" |
|---|
|
| input | "(empty), FNV-1a 32" |
|---|
| expected | "0x811C9DC5" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "FNV(): h ^= 2166136261 (0x811C9DC5), then per byte h ^= byte, h *= 16777619 (0x01000193)" |
|---|
| repo | "https://github.com/aappleby/smhasher" |
|---|
| commit | "07bb4de10a63e8cc2e1724865454eba635742383" |
|---|
| path | "src/Hashes.cpp" |
|---|
| lines | "89-101" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "FNV-1 and FNV-1a constants" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T15:09:06.907Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T03:36:38.528Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read smhasher src/Hashes.cpp FNV(): h = seed, h ^= 2166136261, per byte h ^= byte then h *= 16777619 (FNV-1a with seed XORed into the basis). Prime 0x100000001B3 and basis 0xCBF29CE484222325 are the standard 64-bit values." |
|---|
|
|
|---|