Initial implementation of MTProxy support (#1107)

This commit is contained in:
Dmitry D. Chernov
2019-02-11 09:16:46 +10:00
committed by Lonami
parent 45fdd098cc
commit 45d0ba9e2f
8 changed files with 77 additions and 24 deletions

View File

@@ -10,7 +10,7 @@ from ..tl.types import (
ResPQ, PQInnerData, ServerDHParamsFail, ServerDHParamsOk,
ServerDHInnerData, ClientDHInnerData, DhGenOk, DhGenRetry, DhGenFail
)
from .. import helpers as utils
from .. import helpers
from ..crypto import AES, AuthKey, Factorization, rsa
from ..errors import SecurityError
from ..extensions import BinaryReader
@@ -94,7 +94,7 @@ async def do_authentication(sender):
'Step 2.2 answer was %s' % server_dh_params
# Step 3 sending: Complete DH Exchange
key, iv = utils.generate_key_data_from_nonce(
key, iv = helpers.generate_key_data_from_nonce(
res_pq.server_nonce, new_nonce
)
if len(server_dh_params.encrypted_answer) % 16 != 0: