Chat request from dating automan1843
For backward compatibility, the object must be wrapped in the constructor decrypted Message Layer with an indication of the supported layer (starting with 46).
The resulting construct is serialized as an array of bytes using generic TL rules.
Both clients are to check that g, g_a and g_b are greater than one and smaller than p-1.
We recommend checking that g_a and g_b are between 2^ and p - 2^ as well.
(In the older MTProto 1.0 encryption, only 0 to 15 padding bytes were used.) Message key, msg_key, is computed as the 128 middle bits of the SHA256 of the data obtained in the previous step, prepended by 32 bytes from the shared key key.
The user must be shown basic information about User A and must be prompted to accept or reject the request.Note that as of version 4.6, major Telegram clients are using MTProto 2.0.MTProto v.1.0 is deprecated and is currently being phased out.After the first message encrypted with MTProto 2.0 (or the first message with Layer 73 or higher) is received, all messages with higher sequence numbers must be encrypted with MTProto 2.0 as well.As long as the current layer is lower than 73, each party should try to decrypt received messages with MTProto 1.0, and if this is not successfull (msg_key does not match), try MTProto 2.0.
This article on MTProto's End-to-End encryption is meant for advanced users.