tft: all four checksums solved (three header CRCs, trailer for any length)
0x44 = CRC of the resource area, 0xC4 = CRC of header [0,0xC4), 0x18C = CRC of [0xC8,0x18C); trailer = CRC of the whole file ^ (len & 0xFF) ^ 0x56. tft.seal() recomputes all of them. Verified against 24 Editor-made files of 8 lengths. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
6b2835334a
commit
7337e693a5
6 files changed
+124
-22
No files matched your search
+25
-10
@@ -104,14 +104,29 @@ ending right before the trailer -- proved on two independent one-change pairs. C
|
||||
**same-length edits can be re-checksummed** (`nxhmi.tft.patch_trailer`, reproduces the Editor's
|
||||
output byte for byte for a colour change and for `dim=50` -> `dim=51`).
|
||||
|
||||
**STUCK (2026-11-15):** start offset / seed of the trailer CRC across files of different lengths.
|
||||
Tried, all without a fit (three minimal files of different lengths + the 6-page project):
|
||||
every start offset 0..end with a constant seed (solved exactly by GF(2) linear algebra); seeds
|
||||
taken from header fields 0x44/0xC4/0x18C (raw, inverted, LE/BE); the header checksum fields
|
||||
zeroed or 0xFF in every combination; the layout table de-obfuscated before checksumming.
|
||||
Ideas not yet tried: the stream skipping a region whose size varies (e.g. FF padding after the
|
||||
page data); a seed derived from file size or layout words; the trailer covering only the
|
||||
project section in a different order (e.g. pages then the zero area).
|
||||
### All four checksums solved (2026-11-16)
|
||||
|
||||
Not started: the 3 header checksums, the compiled page format (component records, the token
|
||||
table for event code), pictures/fonts inside the TFT.
|
||||
All are the word-per-byte CRC with seed 0xFFFFFFFF (`nxhmi.tft.header_checksums`, `trailer`,
|
||||
`seal`); verified on every sample (two layouts, 0x40000 and 0x90000 resource areas):
|
||||
|
||||
| Where | Covers |
|
||||
|---|---|
|
||||
| 0x44 | the resource area `[0x10000, 0x10000 + u32@0x40)` -- firmware files, pictures, fonts. Constant for all picture-less projects of one model, which is why it looked "layout only" |
|
||||
| 0xC4 | header `[0x00, 0xC4)` (includes 0x44) |
|
||||
| 0x18C | `[0xC8, 0x18C)`: the layout table as stored (XORed) and the FF padding after it |
|
||||
| last 4 bytes | the whole file before the trailer, then XOR `(file length & 0xFF) ^ 0x56` |
|
||||
|
||||
Why the trailer resisted: the stream and seed were the obvious ones all along, but the result
|
||||
is XORed with a byte that depends on the file length, so every "constant seed" search failed.
|
||||
What cracked it: compute, per file, the seed that a from-offset-0 CRC would need (run the CRC
|
||||
backwards from the trailer). Files of equal length needed the same seed even with different
|
||||
headers -> the header is in the stream as-is and only the length matters; then
|
||||
`trailer ^ CRC(file)` turned out to be a single byte, `len & 0xFF ^ 0x56`, on all eight lengths
|
||||
seen (low bytes D8 E0 E4 E8 EC F0 00 C0). **OPEN:** whether 0x56 is model-specific (only
|
||||
NX4832T035 measured), and whether more than the low length byte takes part.
|
||||
|
||||
The file length is always a multiple of 4 (the page section is padded with zeros).
|
||||
|
||||
Other dead ends, for the record: seeds from header fields; header checksum fields zeroed/0xFF in
|
||||
every combination; the layout table de-obfuscated before checksumming; prefixes built from
|
||||
length/layout words; runs of 00/FF bytes before the file.
|
||||
Reference in new issue
Block a user