benilla-re systems structs docs

s_sha1Padding

global · net

Address
0x80a930 · 64 bytes, up to 0x80a96f
Type
uint8_t[64]
Meaning
Holds the padding block of 0x80 and 63 zero bytes
Confidence
verified, proof one
Finding
net/crypto#sha-1-first-context

Finding: SHA-1 first context in net: crypto

The logon checksum and the pin hash use a second SHA-1 implementation. Its context is a 64-bit bit count (low dword +0, high +4), five state words from +8, and a 64-byte buffer from +0x1c. Init zeroes the count and loads the five standard words. Update adds 8 per byte to the count, tops up the buffer, compresses whole blocks straight from the caller's bytes, and buffers the rest. Final saves the count big-endian, pads with 0x80 and zeros to 56 bytes modulo 64, adds the count, and writes the five state words big-endian.

The derivation is in the doc.