benilla-re systems structs docs

SHA1_Final

function · net · primitive

Address
0x5d32b0 · 171 bytes, up to 0x5d335a
Signature
void __fastcall (uint8_t *digest, SHA1_CTX *ctx)
Meaning
Pads a SHA-1 context with 0x80, zeros and the big-endian bit count, then writes the 20-byte big-endian digest
Confidence
verified, proof one
Name from
the community database (idb)
Finding
net/crypto#sha-1-overwrites-its-input
Test
net::sha1_family_b, net::sha1_prng_next, net::sha1_prng_seed, net::srp6_client_session, net::srp6_credential_hash, net::srp6_file_hmac, net::srp6_interleave

Finding: SHA-1 overwrites its input in net: crypto

The client's SHA-1 (0x5d1db0 family: init, update, transform, final) keeps its 16-word message schedule in the 64-byte block it is given, so a transformed block is left holding schedule words. The update hands the transform the caller's own bytes for every full 64-byte block that follows the context's buffered bytes; those spans of the caller's buffer are overwritten. A short input, or the part copied into the context's buffer, is not. The hash itself is SHA-1 by its constants; its rounds are not recorded here.

The derivation is in the doc.

Callers 11

Callees 1

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