miniproto.auth
miniproto.auth
Section titled “miniproto.auth”Telegram authorization, data-center selection, key exchange, and SRP helpers.
Public objects
Section titled “Public objects”TEST_DC_OPTIONS— Public attributeminiproto.auth.dc.TEST_DC_OPTIONS.dc_options_from_env— Read local test-DC overrides from environment-style mappings.dc_options_from_raw— Convert raw Telegram DC options to immutable session-model options.select_dc_option— Choose the best endpoint for a data center.AuthKeyExchange— Perform Telegram’s RSA- and DH-protected MTProto authorization handshake.AuthKeyExchangeResult— Authenticated MTProto key material and metadata produced by an exchange.AuthKeyTransport— Transport capability required for Telegram’s unencrypted handshake.ClientDHInnerData— Client DH public value encrypted intoset_client_DH_params.DHGenFail—dh_gen_failresponse containing the third new-nonce hash.DHGenOk—dh_gen_okresponse containing the first new-nonce hash.DHGenRetry—dh_gen_retryresponse containing the second new-nonce hash.PQInnerDataDC— Plaintextp_q_inner_data_dcencrypted intoreq_DH_params.RSAKey— Telegram RSA public key used to encrypt thereq_DH_paramspayload.ReqDHParams— Serializedreq_DH_paramsrequest containing RSA-encrypted inner data.ReqPQMulti— Serializedreq_pq_multirequest carrying a client nonce.ResPQ— DecodedresPQresponse received at the start of key exchange.ServerDHInnerData— Validated plaintext DH group and server public value from Telegram.ServerDHParamsFail—server_DH_params_failresponse proving Telegram rejected the request.ServerDHParamsOk— Successfulserver_DH_params_okwrapper for encrypted DH parameters.SetClientDHParams— Serializedset_client_DH_paramsrequest carrying AES-IGE ciphertext.compute_auth_key— Compute the 256-byte MTProto key from validated DH peer and private values.compute_new_nonce_hash— Compute Telegram’s keyed new-nonce confirmation hash number 1, 2, or 3.decrypt_server_dh_answer— Decrypt, integrity-check, and decode Telegram’s encrypted DH inner payload.derive_tmp_aes_key_iv— Derive the temporary AES-256-IGE key and IV defined by MTProto key exchange.encode_client_dh_inner_data— Serializeclient_DH_inner_databefore temporary AES-IGE encryption.encode_pq_inner_data_dc— Serializep_q_inner_data_dcbefore applying Telegram RSA padding.factorize_pq— Factor Telegram’s small compositepqand return its factors in ascending order.public_rsa_fingerprint— Calculate Telegram’s signed little-endian 64-bit RSA fingerprint.rsa_pad— Apply Telegram’s randomized RSA_PAD encryption to a small inner payload.select_rsa_key— Select the first server-offered fingerprint present in trustedkeys.server_salt— Derive the MTProto server salt by XORing the first nonce bytes.compute_check_password— Build the request payload required to verify an account password.AuthService— Run sign-in and data-center authorization flows for one client session.