benilla-re systems structs docs

Sha1Init

function · net · orchestration

Address
0x5d1a40 · 49 bytes, up to 0x5d1a70
Signature
void __thiscall (void *this)
Meaning
Zeroes a SHA-1 context's bit count and loads the five initial state words
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 4

Callees 0

None by a direct call or jump.

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