benilla-re systems structs docs

s_archiveSignatureKey

global · storm

Address
0x80e648 · 256 bytes, up to 0x80e747
Type
uint8_t[256]
Meaning
Holds the built-in 256-byte key that checks an archive's signature when no key is given
Confidence
verified, proof two
Finding
storm/format#archive-signature-check

Finding: Archive signature check in storm: the archive format

0x653160(archive, &result, key, keySize, exponent, exponentSize) checks an archive's signature. With no key and no exponent it takes the built-in 256-byte key 0x80e648 and the exponent 0x80e748 (4 bytes, 0x10001). It feeds the archive's first N bytes, N being its record's +0x154, to a check context in 64 KiB reads, then the seven bytes ARCHIVE, then the bytes that follow the N, as many as the context asks for, and verifies them with the key. The result is 5 when the check passes and 1 otherwise, and the function returns 1 only for 5. Patching calls it with the built-in key; the survey passes its own.

The derivation is in the doc.