Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions stubs/paramiko/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version = "5.0.*"
version = "5.1.*"
upstream-repository = "https://github.com/paramiko/paramiko"
# Requires a version of cryptography where cryptography.hazmat.primitives.ciphers.Cipher is generic
dependencies = ["cryptography>=37.0.0"]
# Requires a version of cryptography with cryptography.hazmat.primitives.asymmetric.mlkem
dependencies = ["cryptography>=47.0.0"]

[tool.stubtest]
# linux and darwin are equivalent
Expand Down
24 changes: 24 additions & 0 deletions stubs/paramiko/paramiko/kex_mlkem.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from _typeshed import ReadableBuffer
from collections.abc import Callable
from hashlib import _Hash
from typing import ClassVar, Final

from cryptography.hazmat.primitives.asymmetric.mlkem import MLKEM768PrivateKey
from cryptography.hazmat.primitives.asymmetric.x25519 import X25519PrivateKey
from paramiko.message import Message
from paramiko.transport import Transport

c_MSG_KEX_HYBRID_INIT: Final = b"\x1e"
c_MSG_KEX_HYBRID_REPLY: Final = b"\x1f"

class KexMLKEM768X25519:
name: Final = "mlkem768x25519-sha256"
hash_algo: ClassVar[Callable[[ReadableBuffer], _Hash]]
transport: Transport
mlkem_key: MLKEM768PrivateKey | None
x25519_key: X25519PrivateKey | None
def __init__(self, transport: Transport) -> None: ...
@classmethod
def is_available(cls) -> bool: ...
def start_kex(self) -> None: ...
def parse_next(self, ptype: int, m: Message) -> None: ...
Loading