miniproto.auth.key_exchange.compute_auth_key
miniproto.auth.key_exchange.compute_auth_key
Section titled “miniproto.auth.key_exchange.compute_auth_key”compute_auth_key(*, g_a: int, b: int, dh_prime: int) -> bytesCompute the 256-byte MTProto key from validated DH peer and private values.
Parameters:
- g_a (
int) – Server DH public value as an integer. - b (
int) – Positive client DH private exponent. - dh_prime (
int) – DH modulus used for modular exponentiation.
Raises:
ValueError– If the peer public value or private exponent is out of range.