HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/asyncssh/crypto/__pycache__/dh.cpython-310.pyc
o

�h�@s"dZddlmZGdd�d�ZdS)�2A shim around PyCA for Diffie Hellman key exchange�)�dhc@sBeZdZdZdedefdd�Zdefdd�Zd	edefd
d�ZdS)
�DHr�g�pcCs"t�||�|_|j����|_dS)N)r�DHParameterNumbers�_pn�
parameters�generate_private_key�	_priv_key)�selfrr�r
�E/usr/local/CyberCP/lib/python3.10/site-packages/asyncssh/crypto/dh.py�__init__szDH.__init__�returncCs|j��}|��jS)z.Return the public key to send in the handshake)r�
public_key�public_numbers�y)r�pub_keyr
r
r�
get_public!s

z
DH.get_public�peer_publiccCs*t�||j���}|j�|�}t�|d�S)z0Return the shared key from the peer's public key�big)r�DHPublicNumbersrrr�exchange�int�
from_bytes)rr�peer_key�
shared_keyr
r
r�
get_shared(sz
DH.get_sharedN)�__name__�
__module__�__qualname__�__doc__rrrrr
r
r
rrs
rN)r"�)cryptography.hazmat.primitives.asymmetricrrr
r
r
r�<module>s