From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Windows Registry hive (REGF)" |
|---|
| claim | "The hash stored in each 8-byte element of an lh sub key list is computed over the key name: start with 0 as uint32; for every character do hash = hash * 37 + uppercase(character), modulo 2^32. For a UTF-16LE name each character is one 2-byte code unit. The libregf document says the uppercase function must handle Unicode, that it is unknown how 4-byte (surrogate pair) characters are handled, and that lf lists use a different hash whose algorithm it does not give." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "lh sub key lists (hive format 1.2 and later)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | algorithm | "hash=0; for each char: hash=hash*37+upper(char); 32-bit wrap" |
|---|
| applies_to_signature | "lh" |
|---|
| lf_hash | "different function, not documented in the source" |
|---|
| open | "surrogate pairs" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "LH sub key hash algorithm section, pseudo code lines 1050-1072; element layout (key offset + hash) lines 585-601" |
|---|
| repo | "https://github.com/libyal/libregf" |
|---|
| commit | "eb1364c9926ab12cee76139fe91a38ab29ea1896" |
|---|
| path | "documentation/Windows NT Registry File (REGF) format.asciidoc" |
|---|
|
|
|---|
| confidence | "medium" |
|---|
| related | |
|---|
| key | "lh sub key hash" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T09:47:32.402Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T11:48:56.032Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read libregf documentation at eb1364c: LH hash pseudo code (hash*=37, += uppercase), per-character note for UTF-16, the surrogate-pair open question, and the element table saying a different hash is used per list type." |
|---|
|
|
|---|