From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:SQLite database file" |
|---|
| claim | "The checksum of an SQLite rollback-journal page record is the segment's nonce plus every 200th byte of the page as unsigned bytes, taken at offsets page_size-200, page_size-400, ... while the offset is positive (mod 2^32)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:SQLite database file" |
|---|
| observed_in | |
|---|
|
|---|
| data | | function | "pager_cksum" |
|---|
| effect | "u32 big-endian after the page data; a mismatch ends playback" |
|---|
| test_vectors | | input | "page_size 4096, page byte i = i & 0xFF, nonce 0" |
|---|
| expected | "0x9F0 (20 bytes summed, offsets 3896 down to 96)" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "pager_cksum" |
|---|
| repo | "https://github.com/sqlite/sqlite" |
|---|
| commit | "43a48f77585a88940c727f33682151418f544059" |
|---|
| path | "src/pager.c" |
|---|
| lines | "2270-2297" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "All 24 records of a journal written by SQLite 3.53.1 verified with this formula" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Rollback journal record checksum" |
|---|
| topic | "Format:SQLite database file/Rollback journal and WAL" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T19:35:40.693Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T06:52:28.190Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read pager_cksum in sqlite pager.c at 43a48f77 (2289-2297): cksumInit plus aData[i] for i = pageSize-200 down by 200 while i>0." |
|---|
|
|
|---|