Skip to content

miniproto.crypto.mtproto.auth_key_id

auth_key_id(auth_key: bytes) -> bytes

Return the MTProto auth-key identifier.

Parameters:

  • auth_key (bytes) – Exactly 256 bytes of MTProto authorization-key material.

Returns:

  • bytes – The eight-byte SHA-1-derived key identifier.

Raises:

  • ValueError – If auth_key is not exactly 256 bytes.

The selected backend preserves this result; this wrapper intentionally has no distinct cryptographic state or GIL behavior.