SeedRandomPool
function · net · orchestration
- Address
0x5d1c70· 119 bytes, up to0x5d1ce6- Signature
void * __thiscall (void *this, uint32_t seed)- Meaning
- Seeds rand with its argument, then sets a random pool's seed digest to SHA-1 of the time, the seed and one rand draw
- Confidence
- verified, proof one
- Finding
- net/login#random-pool
- Test
net::sha1_prng_seed
Finding: Random pool in net: login
The pool is a SHA-1 generator of 64 bytes: a 20-byte seed hash, a 20-byte copy of it, a
20-byte output block and a count of unused output bytes. Seeding with s hashes the 12 bytes
time(0), s and the C runtime's rand() after srand(s). Drawing takes the unused tail of
the block; when it runs out, the block becomes H(seed ‖ block ‖ copy). The pool at 0xc2a428
is seeded at startup with the client clock and is the one SRP6 draws a from.
The derivation is in the doc.
Callers 2
- ComputePinProof net
- InitGlobalRandomPool net
Callees 6
- SHA1_Init net
- SHA1_Update net
- SHA1_Final net
- _time crt
- _srand crt
- _rand crt
Calls and jumps by a bare address, from tables/calls.tsv.