Skip to content

miniproto.auth.key_exchange.derive_tmp_aes_key_iv

miniproto.auth.key_exchange.derive_tmp_aes_key_iv

Section titled “miniproto.auth.key_exchange.derive_tmp_aes_key_iv”
derive_tmp_aes_key_iv(new_nonce: int, server_nonce: int) -> tuple[bytes, bytes]

Derive the temporary AES-256-IGE key and IV defined by MTProto key exchange.

Parameters:

  • new_nonce (int) – Fresh 256-bit client nonce for the active exchange.
  • server_nonce (int) – 128-bit server nonce from resPQ.