miniproto_native::crypto::mtproto_decrypt_payload
Provenance
Section titled “Provenance”- Crate:
miniproto_native - Rust visibility:
restricted - Source:
rust/miniproto/src/crypto.rs - Python exposure:
miniproto._native.mtproto_decrypt_payload(confirmed from adjacent PyO3 attributes)
Signature
Section titled “Signature”fn mtproto_decrypt_payload(py: _, auth_key: _, msg_key: _, ciphertext: _, client_to_server: bool) -> _Arguments
Section titled “Arguments”py: The acquired GIL token used to detach large decryption work.auth_key: The 256-byte MTProto authorization key.msg_key: The 16-byte message key to verify.ciphertext: AES-IGE ciphertext whose length must be an AES-block multiple.client_to_server: Selects the directional MTProto key schedule.
cargo-docs-md rendering
Section titled “cargo-docs-md rendering”mtproto_decrypt_payload
Section titled “mtproto_decrypt_payload”fn mtproto_decrypt_payload(py: Python<'_>, auth_key: Vec<u8>, msg_key: Vec<u8>, ciphertext: Vec<u8>, client_to_server: bool) -> PyResult<Vec<u8>>Defined in rust/miniproto/src/crypto.rs:227-238
Decrypts and verifies Python mtproto_decrypt_payload ciphertext.
Returns padded plaintext or ValueError for invalid lengths, key material, or message-key
verification; large work runs without the GIL.
Arguments
Section titled “Arguments”py: The acquired GIL token used to detach large decryption work.auth_key: The 256-byte MTProto authorization key.msg_key: The 16-byte message key to verify.ciphertext: AES-IGE ciphertext whose length must be an AES-block multiple.client_to_server: Selects the directional MTProto key schedule.