Expand description
Cryptographic primitives for Telegram secret chats (MTProto 2.0).
- Message encryption:
encrypt_message/decrypt_message. - Per-file encryption:
file_encrypt/file_decryptandfile_key_fingerprint. - Key identification:
key_fingerprintandemoji_fingerprint_indices.
Constants§
- EMOJI_
FINGERPRINT_ TABLE - The 333-emoji table that
emoji_fingerprint_indicesindexes into.
Functions§
- decrypt_
message - Decrypt an incoming secret chat blob.
- emoji_
fingerprint_ indices - Compute four indices into
EMOJI_FINGERPRINT_TABLEfromauth_key. - encrypt_
message - Encrypt a secret chat message blob.
- file_
decrypt - Decrypt file ciphertext with the key and iv from the inner TL media field.
- file_
encrypt - Encrypt file bytes with a freshly generated AES-256-IGE key and IV.
- file_
key_ fingerprint - File key fingerprint, as defined by the secret chat spec.
- key_
fingerprint - Compute the 64-bit
key_fingerprint: the last 8 bytes ofSHA1(auth_key), read as a little-endiani64.