2 from _typeshed import ReadableBuffer
3 from typing import Callable
5 from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve, EllipticCurvePrivateKey, EllipticCurvePublicKey
6 from paramiko.message import Message
7 from paramiko.transport import Transport
9 if sys.version_info >= (3, 0):
10 from hashlib import _Hash
12 from hashlib import _hash as _Hash
14 c_MSG_KEXECDH_INIT: bytes
15 c_MSG_KEXECDH_REPLY: bytes
19 hash_algo: Callable[[ReadableBuffer], _Hash]
22 P: int | EllipticCurvePrivateKey
23 Q_C: EllipticCurvePublicKey | None
24 Q_S: EllipticCurvePublicKey | None
25 def __init__(self, transport: Transport) -> None: ...
26 def start_kex(self) -> None: ...
27 def parse_next(self, ptype: int, m: Message) -> None: ...
29 class KexNistp384(KexNistp256):
31 hash_algo: Callable[[ReadableBuffer], _Hash]
34 class KexNistp521(KexNistp256):
36 hash_algo: Callable[[ReadableBuffer], _Hash]