benilla-re systems structs docs

Sha1Update

function · net · primitive

Address
0x5d1a80 · 169 bytes, up to 0x5d1b28
Signature
void __thiscall (void *this, const void *data, uint32_t length)
Meaning
Adds bytes to a SHA-1 context: grows the bit count, fills and compresses the buffer, compresses whole blocks in place
Confidence
verified, proof one
Finding
net/crypto#sha-1-first-context
Test
net::checksum_proof, net::hmac_sha1, net::sha1_family_a

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.

Callers 6

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.