# README
Notes about implementation
Technical problems you might get stuck
-
-404
error on invalid padding size[!TIP]
For some reason, instead of making additional error (to explain developers what's wrong and force them to use 12-1024 random padding). Instead, Telegram server (canonical implementation of mtproto) returns -404 to EVERY error that it might get while parsing message.
How to handle that: write few tests and include additional check that padding size is strictly between 12 and 1024 bytes, including for decrytion functions.
# Functions
No description provided by the author
No description provided by the author
More info: https://core.telegram.org/mtproto/description#unencrypted-message.
GenerateMessageId essentially gives unix timestamp, but in a horribly specific way.
Keys returns (aes_key, aes_iv) pair for AES-IGE.
MessageKey computes message key for provided auth_key and padded payload.
NewClientCipher creates new client-side Cipher.
NewServerCipher creates new server-side Cipher.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
Envelope is a data inside encrypted part of encrypted message.
No description provided by the author
# Interfaces
No description provided by the author