mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Use the correct amount of random bytes in DH request
The official documentation says a 2048 *bit* number. `os.urandom` takes an argument that represents the number of *bytes*. 2048 bits is 256 bytes
This commit is contained in:
parent
8afb0a3f6b
commit
c13164f5cf
|
@ -148,7 +148,7 @@ def do_authentication(transport):
|
|||
server_time = dh_inner_data_reader.read_int()
|
||||
time_offset = server_time - int(time.time())
|
||||
|
||||
b = get_int(os.urandom(2048), signed=False)
|
||||
b = get_int(os.urandom(256), signed=False)
|
||||
gb = pow(g, b, dh_prime)
|
||||
gab = pow(ga, b, dh_prime)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user