mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 20:50:22 +03:00
fix amount of random bytes b
should be in DH
the docs say 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
017a961053
|
@ -148,7 +148,7 @@ def do_authentication(transport):
|
||||||
server_time = dh_inner_data_reader.read_int()
|
server_time = dh_inner_data_reader.read_int()
|
||||||
time_offset = server_time - int(time.time())
|
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)
|
gb = pow(g, b, dh_prime)
|
||||||
gab = pow(ga, b, dh_prime)
|
gab = pow(ga, b, dh_prime)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user