Srp6ClientComputeProof
function · net · primitive
- Address
0x5d3650· 1152 bytes, up to0x5d3acf- Signature
int32_t __thiscall (void *this, uint8_t *n, uint32_t nLen, uint8_t *g, uint32_t gLen, uint8_t *salt, uint32_t sLen, uint8_t *b, uint32_t bLen, void *pool)- Meaning
- Computes A, the 40-byte key K and proof M1 from N, g, salt and B; returns -1 on bad input, -2 when B is 0 or not below N
- Confidence
- verified, proof one
- Finding
- net/login#srp6-client
- Test
net::srp6_client_session
Finding: SRP6 client in net: login
With N, g, salt s and B as little-endian numbers: x = H(s ‖ H(U:P)), v = gˣ,
a = r + bitlen(N) for 32 random bytes r, A = gᵃ, u = H(A ‖ B),
S = (B + 3(N − v))^(a + u·x) mod N, K = Interleave(S), and
M1 = H((H(N) ⊕ H(g)) ‖ H(U) ‖ s ‖ A ‖ B ‖ K); all powers are mod N. A, M1 and K are
stored; a running hash keeps A ‖ M1 ‖ K for the server's proof. It refuses N, g or the
salt empty or longer than 32 bytes, B shorter than 31, N under 256 bits, B ≥ N and B = 0.
The derivation is in the doc.
Callers 1
Callees 18
- DrawRandomPoolBytes net
- SHA1_Init net
- SHA1_Update net
- SHA1_Final net
- Srp6InterleaveSessionKey net
- BigNumberFromUint32 net
- BigNumberFromBytes net
- BigNumberToBytes net
- BigNumberCompare net
- BigNumberCompareUint32 net
- BigNumberAdd net
- BigNumberAddUint32 net
- BigNumberSub net
- BigNumberMul net
- BigNumberMod net
- BigNumberPowMod net
- BigNumberFree net
- BigNumberBitLength net
Calls and jumps by a bare address, from tables/calls.tsv.