mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-11-28 19:23:11 +01:00
Update content of files
This commit is contained in:
parent
93b7b4a604
commit
2565c59380
4 changed files with 273 additions and 309 deletions
|
@ -91,7 +91,7 @@ The attachment/side menu list should also be refreshed if the user changes the a
|
|||
<li>...is set, the attachment/side menu entry is not installed.<br>
|
||||
Thus, before launching the mini app when clicking on a <a href="/api/links#bot-attachment-or-side-menu-links">attachment/side menu deep link</a>, the client should show a prompt to the user, asking to add the mini app to the attachment/side menu.<br>
|
||||
Note that if the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>side_menu_disclaimer_needed</code> flag is set, an additional mandatory checkbox to accept the <a href="https://telegram.org/tos/mini-apps">mini apps TOS</a> and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown in the installation prompt.<br>
|
||||
If the user accepts, invoke <a href="/method/messages.toggleBotInAttachMenu">messages.toggleBotInAttachMenu</a> and proceed to the next step, otherwise abort the process. </li>
|
||||
If the user accepts, invoke <a href="/method/messages.toggleBotInAttachMenu">messages.toggleBotInAttachMenu</a> with the <code>write_allowed</code> flag set and proceed to the next step, otherwise abort the process. </li>
|
||||
<li>...is not set, proceed to the next step unconditionally. </li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -632,42 +632,6 @@
|
|||
<li>Added <a href="/api/push-updates#possible-notifications">STORY_HIDDEN_AUTHOR</a> - <code>A new story was posted (emitted when previews are hidden for this peer)</code></li>
|
||||
<li>Added <a href="/api/push-updates#possible-notifications">STORY_NOTEXT</a> - <code>{1} posted a story</code></li>
|
||||
</ul>
|
||||
<h5><a class="anchor" href="#changed-push-notifications" id="changed-push-notifications" name="changed-push-notifications"><i class="anchor-icon"></i></a>Changed PUSH notifications</h5>
|
||||
<ul>
|
||||
<li>Changed template from <code>{1}: {3} to your voice message in {2}</code> to <code>{3} to your voice message in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_AUDIO</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your contact {4} in {2}</code> to <code>{3} to your contact {4} in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_CONTACT</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your file in {2}</code> to <code>{3} to your file in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_DOC</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your game in {2}</code> to <code>{3} to your game in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GAME</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your map in {2}</code> to <code>{3} to your map in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GEO</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your live location in {2}</code> to <code>{3} to your live location in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GEOLIVE</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your GIF in {2}</code> to <code>{3} to your GIF in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GIF</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your invoice in {2}</code> to <code>{3} to your invoice in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_INVOICE</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your message in {2}</code> to <code>{3} to your message in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_NOTEXT</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your photo in {2}</code> to <code>{3} to your photo in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_PHOTO</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your poll {4} in {2}</code> to <code>{3} to your poll {4} in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_POLL</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your quiz {4} in {2}</code> to <code>{3} to your quiz {4} in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_QUIZ</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your video message in {2}</code> to <code>{3} to your video message in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_ROUND</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your {4} sticker in {2}</code> to <code>{3} to your {4} sticker in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_STICKER</a></li>
|
||||
<li>Changed template from <code>{1}: {3} in {2} to your "{4}"</code> to <code>{3} in {2} to your "{4}"</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_TEXT</a></li>
|
||||
<li>Changed template from <code>{1}: {3} to your video in {2}</code> to <code>{3} to your video in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_VIDEO</a></li>
|
||||
<li>Changed template from <code>You were charged {2} by {1}</code> to <code>{1} were charged {2}</code> in <a href="/api/push-updates#possible-notifications">MESSAGE_RECURRING_PAY</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your voice message</code> to <code>{2} to your voice message</code> in <a href="/api/push-updates#possible-notifications">REACT_AUDIO</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your contact {3}</code> to <code>{2} to your contact {3}</code> in <a href="/api/push-updates#possible-notifications">REACT_CONTACT</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your file</code> to <code>{2} to your file</code> in <a href="/api/push-updates#possible-notifications">REACT_DOC</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your game</code> to <code>{2} to your game</code> in <a href="/api/push-updates#possible-notifications">REACT_GAME</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your map</code> to <code>{2} to your map</code> in <a href="/api/push-updates#possible-notifications">REACT_GEO</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your live location</code> to <code>{2} to your live location</code> in <a href="/api/push-updates#possible-notifications">REACT_GEOLIVE</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your GIF</code> to <code>{2} to your GIF</code> in <a href="/api/push-updates#possible-notifications">REACT_GIF</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your invoice</code> to <code>{2} to your invoice</code> in <a href="/api/push-updates#possible-notifications">REACT_INVOICE</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your message</code> to <code>{2} to your message</code> in <a href="/api/push-updates#possible-notifications">REACT_NOTEXT</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your photo</code> to <code>{2} to your photo</code> in <a href="/api/push-updates#possible-notifications">REACT_PHOTO</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your poll {3}</code> to <code>{2} to your poll {3}</code> in <a href="/api/push-updates#possible-notifications">REACT_POLL</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your quiz {3}</code> to <code>{2} to your quiz {3}</code> in <a href="/api/push-updates#possible-notifications">REACT_QUIZ</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your video message</code> to <code>{2} to your video message</code> in <a href="/api/push-updates#possible-notifications">REACT_ROUND</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your {3} sticker</code> to <code>{2} to your {3} sticker</code> in <a href="/api/push-updates#possible-notifications">REACT_STICKER</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your "{3}"</code> to <code>{2} to your "{3}"</code> in <a href="/api/push-updates#possible-notifications">REACT_TEXT</a></li>
|
||||
<li>Changed template from <code>{1}: {2} to your video</code> to <code>{2} to your video</code> in <a href="/api/push-updates#possible-notifications">REACT_VIDEO</a></li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#schema" id="schema" name="schema"><i class="anchor-icon"></i></a>Schema</h4>
|
||||
<div><pre><code><a href="/constructor/dialog">dialog</a>#d58a08c6 flags:<a href="/type/%23">#</a> pinned:flags.2?<a href="/constructor/true">true</a> unread_mark:flags.3?<a href="/constructor/true">true</a> peer:<a href="/type/Peer">Peer</a> top_message:<a href="/type/int">int</a> read_inbox_max_id:<a href="/type/int">int</a> read_outbox_max_id:<a href="/type/int">int</a> unread_count:<a href="/type/int">int</a> unread_mentions_count:<a href="/type/int">int</a> unread_reactions_count:<a href="/type/int">int</a> notify_settings:<a href="/type/PeerNotifySettings">PeerNotifySettings</a> pts:flags.0?<a href="/type/int">int</a> draft:flags.1?<a href="/type/DraftMessage">DraftMessage</a> folder_id:flags.4?<a href="/type/int">int</a> ttl_period:flags.5?<a href="/type/int">int</a> = <a href="/type/Dialog">Dialog</a>;<br>
|
||||
<a href="/constructor/userFull">userFull</a>#b9b12c6c flags:<a href="/type/%23">#</a> blocked:flags.0?<a href="/constructor/true">true</a> phone_calls_available:flags.4?<a href="/constructor/true">true</a> phone_calls_private:flags.5?<a href="/constructor/true">true</a> can_pin_message:flags.7?<a href="/constructor/true">true</a> has_scheduled:flags.12?<a href="/constructor/true">true</a> video_calls_available:flags.13?<a href="/constructor/true">true</a> voice_messages_forbidden:flags.20?<a href="/constructor/true">true</a> translations_disabled:flags.23?<a href="/constructor/true">true</a> stories_pinned_available:flags.26?<a href="/constructor/true">true</a> blocked_my_stories_from:flags.27?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> about:flags.1?<a href="/type/string">string</a> settings:<a href="/type/PeerSettings">PeerSettings</a> personal_photo:flags.21?<a href="/type/Photo">Photo</a> profile_photo:flags.2?<a href="/type/Photo">Photo</a> fallback_photo:flags.22?<a href="/type/Photo">Photo</a> notify_settings:<a href="/type/PeerNotifySettings">PeerNotifySettings</a> bot_info:flags.3?<a href="/type/BotInfo">BotInfo</a> pinned_msg_id:flags.6?<a href="/type/int">int</a> common_chats_count:<a href="/type/int">int</a> folder_id:flags.11?<a href="/type/int">int</a> ttl_period:flags.14?<a href="/type/int">int</a> theme_emoticon:flags.15?<a href="/type/string">string</a> private_forward_name:flags.16?<a href="/type/string">string</a> bot_group_admin_rights:flags.17?<a href="/type/ChatAdminRights">ChatAdminRights</a> bot_broadcast_admin_rights:flags.18?<a href="/type/ChatAdminRights">ChatAdminRights</a> premium_gifts:flags.19?<a href="/type/Vector%20t">Vector</a><<a href="/type/PremiumGiftOption">PremiumGiftOption</a>> wallpaper:flags.24?<a href="/type/WallPaper">WallPaper</a> stories:flags.25?<a href="/type/PeerStories">PeerStories</a> = <a href="/type/UserFull">UserFull</a>;
|
||||
|
|
|
@ -481,38 +481,38 @@ Simple push works by sending a simple PUT request with a <code>version=number</c
|
|||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_AUDIO</td>
|
||||
<td>{3} to your voice message in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction</td>
|
||||
<td>{1}: {3} to your voice message in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_CONTACT</td>
|
||||
<td>{3} to your contact {4} in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction<br>4. Contact name</td>
|
||||
<td>{1}: {3} to your contact {4} in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction<br>4. Contact name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_DOC</td>
|
||||
<td>{3} to your file in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction</td>
|
||||
<td>{1}: {3} to your file in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_GAME</td>
|
||||
<td>{3} to your game in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction</td>
|
||||
<td>{1}: {3} to your game in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_GEO</td>
|
||||
<td>{3} to your map in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction</td>
|
||||
<td>{1}: {3} to your map in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_GEOLIVE</td>
|
||||
<td>{3} to your live location in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction</td>
|
||||
<td>{1}: {3} to your live location in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_GIF</td>
|
||||
<td>{3} to your GIF in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction</td>
|
||||
<td>{1}: {3} to your GIF in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_GIVEAWAY</td>
|
||||
|
@ -521,48 +521,48 @@ Simple push works by sending a simple PUT request with a <code>version=number</c
|
|||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_INVOICE</td>
|
||||
<td>{3} to your invoice in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction</td>
|
||||
<td>{1}: {3} to your invoice in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_NOTEXT</td>
|
||||
<td>{3} to your message in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction</td>
|
||||
<td>{1}: {3} to your message in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_PHOTO</td>
|
||||
<td>{3} to your photo in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction</td>
|
||||
<td>{1}: {3} to your photo in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_POLL</td>
|
||||
<td>{3} to your poll {4} in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction<br>4. Poll name</td>
|
||||
<td>{1}: {3} to your poll {4} in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction<br>4. Poll name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_QUIZ</td>
|
||||
<td>{3} to your quiz {4} in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction<br>4. Quiz name</td>
|
||||
<td>{1}: {3} to your quiz {4} in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction<br>4. Quiz name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_ROUND</td>
|
||||
<td>{3} to your video message in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction</td>
|
||||
<td>{1}: {3} to your video message in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_STICKER</td>
|
||||
<td>{3} to your {4} sticker in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction<br>4. Sticker emoji</td>
|
||||
<td>{1}: {3} to your {4} sticker in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction<br>4. Sticker emoji</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_TEXT</td>
|
||||
<td>{3} in {2} to your "{4}"</td>
|
||||
<td>2. Group name<br>3. Reaction<br>4. Message body</td>
|
||||
<td>{1}: {3} in {2} to your "{4}"</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction<br>4. Message body</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REACT_VIDEO</td>
|
||||
<td>{3} to your video in {2}</td>
|
||||
<td>2. Group name<br>3. Reaction</td>
|
||||
<td>{1}: {3} to your video in {2}</td>
|
||||
<td>1. User name<br>2. Group name<br>3. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CHAT_REQ_JOINED</td>
|
||||
|
@ -731,7 +731,7 @@ Simple push works by sending a simple PUT request with a <code>version=number</c
|
|||
</tr>
|
||||
<tr>
|
||||
<td>MESSAGE_RECURRING_PAY</td>
|
||||
<td>{1} were charged {2}</td>
|
||||
<td>You were charged {2} by {1}</td>
|
||||
<td>1. The entity to which money was sent for a recurring subscription<br>2. The amount of money charged for a recurring subscription</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -981,38 +981,38 @@ Simple push works by sending a simple PUT request with a <code>version=number</c
|
|||
</tr>
|
||||
<tr>
|
||||
<td>REACT_AUDIO</td>
|
||||
<td>{2} to your voice message</td>
|
||||
<td>2. Reaction</td>
|
||||
<td>{1}: {2} to your voice message</td>
|
||||
<td>1. User name<br>2. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_CONTACT</td>
|
||||
<td>{2} to your contact {3}</td>
|
||||
<td>2. Reaction<br>3. Contact name</td>
|
||||
<td>{1}: {2} to your contact {3}</td>
|
||||
<td>1. User name<br>2. Reaction<br>3. Contact name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_DOC</td>
|
||||
<td>{2} to your file</td>
|
||||
<td>2. Reaction</td>
|
||||
<td>{1}: {2} to your file</td>
|
||||
<td>1. User name<br>2. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_GAME</td>
|
||||
<td>{2} to your game</td>
|
||||
<td>2. Reaction</td>
|
||||
<td>{1}: {2} to your game</td>
|
||||
<td>1. User name<br>2. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_GEO</td>
|
||||
<td>{2} to your map</td>
|
||||
<td>2. Reaction</td>
|
||||
<td>{1}: {2} to your map</td>
|
||||
<td>1. User name<br>2. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_GEOLIVE</td>
|
||||
<td>{2} to your live location</td>
|
||||
<td>2. Reaction</td>
|
||||
<td>{1}: {2} to your live location</td>
|
||||
<td>1. User name<br>2. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_GIF</td>
|
||||
<td>{2} to your GIF</td>
|
||||
<td>2. Reaction</td>
|
||||
<td>{1}: {2} to your GIF</td>
|
||||
<td>1. User name<br>2. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_GIVEAWAY</td>
|
||||
|
@ -1021,48 +1021,48 @@ Simple push works by sending a simple PUT request with a <code>version=number</c
|
|||
</tr>
|
||||
<tr>
|
||||
<td>REACT_INVOICE</td>
|
||||
<td>{2} to your invoice</td>
|
||||
<td>2. Reaction</td>
|
||||
<td>{1}: {2} to your invoice</td>
|
||||
<td>1. User name<br>2. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_NOTEXT</td>
|
||||
<td>{2} to your message</td>
|
||||
<td>2. Reaction</td>
|
||||
<td>{1}: {2} to your message</td>
|
||||
<td>1. User name<br>2. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_PHOTO</td>
|
||||
<td>{2} to your photo</td>
|
||||
<td>2. Reaction</td>
|
||||
<td>{1}: {2} to your photo</td>
|
||||
<td>1. User name<br>2. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_POLL</td>
|
||||
<td>{2} to your poll {3}</td>
|
||||
<td>2. Reaction<br>3. Poll name</td>
|
||||
<td>{1}: {2} to your poll {3}</td>
|
||||
<td>1. User name<br>2. Reaction<br>3. Poll name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_QUIZ</td>
|
||||
<td>{2} to your quiz {3}</td>
|
||||
<td>2. Reaction<br>3. Quiz name</td>
|
||||
<td>{1}: {2} to your quiz {3}</td>
|
||||
<td>1. User name<br>2. Reaction<br>3. Quiz name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_ROUND</td>
|
||||
<td>{2} to your video message</td>
|
||||
<td>2. Reaction</td>
|
||||
<td>{1}: {2} to your video message</td>
|
||||
<td>1. User name<br>2. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_STICKER</td>
|
||||
<td>{2} to your {3} sticker</td>
|
||||
<td>2. Reaction<br>3. Sticker emoji</td>
|
||||
<td>{1}: {2} to your {3} sticker</td>
|
||||
<td>1. User name<br>2. Reaction<br>3. Sticker emoji</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_TEXT</td>
|
||||
<td>{2} to your "{3}"</td>
|
||||
<td>2. Reaction<br>3. Message body</td>
|
||||
<td>{1}: {2} to your "{3}"</td>
|
||||
<td>1. User name<br>2. Reaction<br>3. Message body</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REACT_VIDEO</td>
|
||||
<td>{2} to your video</td>
|
||||
<td>2. Reaction</td>
|
||||
<td>{1}: {2} to your video</td>
|
||||
<td>1. User name<br>2. Reaction</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>STORY_HIDDEN_AUTHOR</td>
|
||||
|
@ -1072,7 +1072,7 @@ Simple push works by sending a simple PUT request with a <code>version=number</c
|
|||
<tr>
|
||||
<td>STORY_NOTEXT</td>
|
||||
<td>{1} posted a story</td>
|
||||
<td>1.</td>
|
||||
<td>1. Peer name</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
|
|
@ -53,9 +53,9 @@
|
|||
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
|
||||
<!-- start req_pq_multi -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 B8 9A 06 00 FC 35 C5 65
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 29 60 48 82 0D B2 4E 46
|
||||
0020 | 47 F1 10 A6 10 5B 39 B4</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 2C DF 0C 00 F2 37 C5 65
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -77,7 +77,7 @@
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>B89A0600FC35C565</code></td>
|
||||
<td><code>2CDF0C00F237C565</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td>Random number</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -104,11 +104,11 @@
|
|||
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
|
||||
<!-- start resPQ -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C8 31 59 FC 35 C5 65
|
||||
0010 | 68 00 00 00 63 24 16 05 29 60 48 82 0D B2 4E 46
|
||||
0020 | 47 F1 10 A6 10 5B 39 B4 24 08 8C FF 48 75 8D B6
|
||||
0030 | 2B 59 5F AD 1C AB 00 50 08 15 6C E5 95 93 76 D5
|
||||
0040 | E7 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 AC D6 D1 F2 37 C5 65
|
||||
0010 | 58 00 00 00 63 24 16 05 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61
|
||||
0030 | 17 19 3C 56 D9 EA 86 02 08 17 CC 7C E1 44 9E E9
|
||||
0040 | 65 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
|
||||
0050 | 35 5F C3 0B 21 6B E8 6C 02 2B B4 C3 85 FD 64 DE
|
||||
0060 | 85 1D 9D D0</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
|
@ -132,13 +132,13 @@
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01C83159FC35C565</code></td>
|
||||
<td><code>01ACD6D1F237C565</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>68000000</code> (104 in decimal)</td>
|
||||
<td><code>58000000</code> (88 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>08156CE5959376D5E7000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1543861202868164071</td>
|
||||
<td><code>0817CC7CE1449EE965000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1714882865082067301</td>
|
||||
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -208,22 +208,22 @@
|
|||
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
|
||||
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p < q.</h5>
|
||||
<!-- start pq -->
|
||||
<pre><code>pq = 1543861202868164071</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1543861202868164071 = 1038093167 * 1487208713</code></p>
|
||||
<pre><code>p = 1038093167
|
||||
q = 1487208713</code></pre>
|
||||
<pre><code>pq = 1714882865082067301</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1714882865082067301 = 1177411013 * 1456486177</code></p>
|
||||
<pre><code>p = 1177411013
|
||||
q = 1456486177</code></pre>
|
||||
<!-- end pq -->
|
||||
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
|
||||
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
|
||||
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
|
||||
<!-- start p_q_inner_data_dc -->
|
||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 95 5F F5 A9 08 15 6C E5 95 93 76 D5 E7 00 00 00
|
||||
0010 | 04 3D E0 0B 6F 00 00 00 04 58 A5 01 09 00 00 00
|
||||
0020 | 29 60 48 82 0D B2 4E 46 47 F1 10 A6 10 5B 39 B4
|
||||
0030 | 24 08 8C FF 48 75 8D B6 2B 59 5F AD 1C AB 00 50
|
||||
0040 | 8F A5 1E FA FA BD 9F 0F A8 AF B9 96 DF 45 51 C9
|
||||
0050 | 00 02 05 3D 70 65 34 E2 FF E9 03 3E 2E F3 FD EE
|
||||
<pre><code>0000 | 95 5F F5 A9 08 17 CC 7C E1 44 9E E9 65 00 00 00
|
||||
0010 | 04 46 2D DD C5 00 00 00 04 56 D0 37 21 00 00 00
|
||||
0020 | 8F 69 6E B0 53 F5 60 41 2B 22 A9 8B 83 41 B6 C1
|
||||
0030 | B6 25 9A 84 BD 0F 6D 61 17 19 3C 56 D9 EA 86 02
|
||||
0040 | 45 22 1E 84 CF 01 B3 31 5C D0 58 7E F5 A8 7B 03
|
||||
0050 | 28 1B 1B C0 66 ED 7E FA 5A B0 54 8B 35 E4 5F F8
|
||||
0060 | 02 00 00 00</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>p_q_inner_data_dc#a9f55f95 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data;</code></pre>
|
||||
|
@ -246,37 +246,37 @@ q = 1487208713</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>08156CE5959376D5E7000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1543861202868164071</td>
|
||||
<td><code>0817CC7CE1449EE965000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1714882865082067301</td>
|
||||
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>16, 8</td>
|
||||
<td><code>043DE00B6F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1038093167</td>
|
||||
<td><code>04462DDDC5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1177411013</td>
|
||||
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>q</td>
|
||||
<td>24, 8</td>
|
||||
<td><code>0458A50109000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1487208713</td>
|
||||
<td><code>0456D03721000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1456486177</td>
|
||||
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>32, 16</td>
|
||||
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>8FA51EFAFABD9F0FA8AFB996DF4551C9</code> <code>0002053D706534E2FFE9033E2EF3FDEE</code></td>
|
||||
<td><code>45221E84CF01B3315CD0587EF5A87B03</code> <code>281B1BC066ED7EFA5AB0548B35E45FF8</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1487208713</code></pre>
|
|||
<p>The serialization of <em>P_Q_inner_data</em> produces <strong>data</strong>, which is used to generate <strong>encrypted_data</strong> as specified in <a href="/mtproto/auth_key">step 4.1</a>.<br>
|
||||
These are the inputs to the algorithm specified in <a href="/mtproto/auth_key">step 4.1</a>:</p>
|
||||
<!-- start p_q_inner_data_input -->
|
||||
<pre><code>data = 955FF5A908156CE5959376D5E7000000043DE00B6F0000000458A50109000000296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB00508FA51EFAFABD9F0FA8AFB996DF4551C90002053D706534E2FFE9033E2EF3FDEE02000000
|
||||
random_padding_bytes = 65ABF7EDBB05E031AF979CF8CB1B2B6BC7DFE73CBFD2A8CA0915DA61897897EEB2DE6FEF7FD31967EBEFBAFDB62B68104A271171DB7A75E92B3E809EB15430D0EF0C1AEA64D4B3C769280861E345683C4E8C4130E7722CE3358D7BCF</code></pre>
|
||||
<pre><code>data = 955FF5A90817CC7CE1449EE96500000004462DDDC50000000456D037210000008F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860245221E84CF01B3315CD0587EF5A87B03281B1BC066ED7EFA5AB0548B35E45FF802000000
|
||||
random_padding_bytes = F6B9607966060ABF07770B6DAF766314D3CCBC96928C4A9D5442778EC4DE7FDD92E526B90AD9CF4A33A70DD66941324C3A047C6742ADC34B233A214DC7DD24DFD9C9A95D80E6488EB19C59C56FEE4629D4B93AB9A0F0926DA801FEE8</code></pre>
|
||||
<!-- end p_q_inner_data_input -->
|
||||
<p>And this is the output:</p>
|
||||
<!-- start p_q_inner_data_output -->
|
||||
<pre><code>encrypted_data = B4EAB301DB32ADD8E0F44AF3BFED05022387D3FC93F5FADB80AE0753CF76B0340F7DB1589C21C5ADB2BDF9CF47A698506BD262B22303A986813FCBEE65EAADFF68C8818F6FA3B2B5E616C7576E32A4E7D4305F596F3E34464FB49C0DC84A6F6495EED79BD59B121DBF1C5EFFDFC34DA250310F4ADC4E316C07539D6C01B135E5393273F1F9BCA7EF836995F48BBF143D704F64648F6A9F5CFC4B78FE936B78BF671EF301C289E4FA43FB2AFAEABF1A393F05DAFD8A1A1595EB37D0729BE0FFB2029F3C9CE2F1A53916DA1593D2E390349F4922BD0A92E748FD9F5A1ED25495A20379C2A0E005234875AFB45A98915B817FD0668F676ED69181F05DDEB63E7041</code></pre>
|
||||
<pre><code>encrypted_data = A5FD41F136810954512FDBA85D5FA73CACDCD121A2AA3D5DA13F644C0694AEC396F8A8D828AE04D37315DF10DB4232D823AD1F6E34E0BB80B390B787E99A794559033DDC9051CFE51176A0589482F65875B56466EC07E23BCD6BF55AA750BFCF02BA96E9926E8F8137DEBC73FE8D11C74EC11D4D0804A44C07CF9EE704A800862C1268582E67E4E4885D32981873B2F7265000ACF1B345139DA8FAEBAAB3435E9B3B470B4F77CBE677AEE05AE47080CB0AE5F13BD00EA454A23E2D9C78D180D9A9A150E4445C69598927C5357D86B6FCE9C6F078C243912670DBC37D9692C77F149F8FC319CBD38B119D958A1909608F8B1700536842E1FE94AD1F3C82E9B477</code></pre>
|
||||
<!-- end p_q_inner_data_output -->
|
||||
<p>The length of the final string is 256 bytes.</p>
|
||||
<h5><a class="anchor" href="#5-send-req-dh-params-query-with-generated-encrypted-data" id="5-send-req-dh-params-query-with-generated-encrypted-data" name="5-send-req-dh-params-query-with-generated-encrypted-data"><i class="anchor-icon"></i></a>5) Send req_DH_params query with generated <code>encrypted_data</code></h5>
|
||||
<!-- start req_DH_params -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 BC 9A 06 00 FC 35 C5 65
|
||||
0010 | 40 01 00 00 BE E4 12 D7 29 60 48 82 0D B2 4E 46
|
||||
0020 | 47 F1 10 A6 10 5B 39 B4 24 08 8C FF 48 75 8D B6
|
||||
0030 | 2B 59 5F AD 1C AB 00 50 04 3D E0 0B 6F 00 00 00
|
||||
0040 | 04 58 A5 01 09 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 B4 EA B3 01 DB 32 AD D8 E0 F4 4A F3
|
||||
0060 | BF ED 05 02 23 87 D3 FC 93 F5 FA DB 80 AE 07 53
|
||||
0070 | CF 76 B0 34 0F 7D B1 58 9C 21 C5 AD B2 BD F9 CF
|
||||
0080 | 47 A6 98 50 6B D2 62 B2 23 03 A9 86 81 3F CB EE
|
||||
0090 | 65 EA AD FF 68 C8 81 8F 6F A3 B2 B5 E6 16 C7 57
|
||||
00A0 | 6E 32 A4 E7 D4 30 5F 59 6F 3E 34 46 4F B4 9C 0D
|
||||
00B0 | C8 4A 6F 64 95 EE D7 9B D5 9B 12 1D BF 1C 5E FF
|
||||
00C0 | DF C3 4D A2 50 31 0F 4A DC 4E 31 6C 07 53 9D 6C
|
||||
00D0 | 01 B1 35 E5 39 32 73 F1 F9 BC A7 EF 83 69 95 F4
|
||||
00E0 | 8B BF 14 3D 70 4F 64 64 8F 6A 9F 5C FC 4B 78 FE
|
||||
00F0 | 93 6B 78 BF 67 1E F3 01 C2 89 E4 FA 43 FB 2A FA
|
||||
0100 | EA BF 1A 39 3F 05 DA FD 8A 1A 15 95 EB 37 D0 72
|
||||
0110 | 9B E0 FF B2 02 9F 3C 9C E2 F1 A5 39 16 DA 15 93
|
||||
0120 | D2 E3 90 34 9F 49 22 BD 0A 92 E7 48 FD 9F 5A 1E
|
||||
0130 | D2 54 95 A2 03 79 C2 A0 E0 05 23 48 75 AF B4 5A
|
||||
0140 | 98 91 5B 81 7F D0 66 8F 67 6E D6 91 81 F0 5D DE
|
||||
0150 | B6 3E 70 41</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 30 DF 0C 00 F2 37 C5 65
|
||||
0010 | 40 01 00 00 BE E4 12 D7 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61
|
||||
0030 | 17 19 3C 56 D9 EA 86 02 04 46 2D DD C5 00 00 00
|
||||
0040 | 04 56 D0 37 21 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 A5 FD 41 F1 36 81 09 54 51 2F DB A8
|
||||
0060 | 5D 5F A7 3C AC DC D1 21 A2 AA 3D 5D A1 3F 64 4C
|
||||
0070 | 06 94 AE C3 96 F8 A8 D8 28 AE 04 D3 73 15 DF 10
|
||||
0080 | DB 42 32 D8 23 AD 1F 6E 34 E0 BB 80 B3 90 B7 87
|
||||
0090 | E9 9A 79 45 59 03 3D DC 90 51 CF E5 11 76 A0 58
|
||||
00A0 | 94 82 F6 58 75 B5 64 66 EC 07 E2 3B CD 6B F5 5A
|
||||
00B0 | A7 50 BF CF 02 BA 96 E9 92 6E 8F 81 37 DE BC 73
|
||||
00C0 | FE 8D 11 C7 4E C1 1D 4D 08 04 A4 4C 07 CF 9E E7
|
||||
00D0 | 04 A8 00 86 2C 12 68 58 2E 67 E4 E4 88 5D 32 98
|
||||
00E0 | 18 73 B2 F7 26 50 00 AC F1 B3 45 13 9D A8 FA EB
|
||||
00F0 | AA B3 43 5E 9B 3B 47 0B 4F 77 CB E6 77 AE E0 5A
|
||||
0100 | E4 70 80 CB 0A E5 F1 3B D0 0E A4 54 A2 3E 2D 9C
|
||||
0110 | 78 D1 80 D9 A9 A1 50 E4 44 5C 69 59 89 27 C5 35
|
||||
0120 | 7D 86 B6 FC E9 C6 F0 78 C2 43 91 26 70 DB C3 7D
|
||||
0130 | 96 92 C7 7F 14 9F 8F C3 19 CB D3 8B 11 9D 95 8A
|
||||
0140 | 19 09 60 8F 8B 17 00 53 68 42 E1 FE 94 AD 1F 3C
|
||||
0150 | 82 E9 B4 77</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -345,7 +345,7 @@ random_padding_bytes = 65ABF7EDBB05E031AF979CF8CB1B2B6BC7DFE73CBFD2A8CA0915DA618
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>BC9A0600FC35C565</code></td>
|
||||
<td><code>30DF0C00F237C565</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -363,25 +363,25 @@ random_padding_bytes = 65ABF7EDBB05E031AF979CF8CB1B2B6BC7DFE73CBFD2A8CA0915DA618
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>043DE00B6F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1038093167</td>
|
||||
<td><code>04462DDDC5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1177411013</td>
|
||||
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>q</td>
|
||||
<td>64, 8</td>
|
||||
<td><code>0458A50109000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1487208713</td>
|
||||
<td><code>0456D03721000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1456486177</td>
|
||||
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -393,7 +393,7 @@ random_padding_bytes = 65ABF7EDBB05E031AF979CF8CB1B2B6BC7DFE73CBFD2A8CA0915DA618
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE000100B4EAB301DB32ADD8E0F44AF3</code> <code>BFED05022387D3FC93F5FADB80AE0753</code> <code>CF76B0340F7DB1589C21C5ADB2BDF9CF</code> <code>47A698506BD262B22303A986813FCBEE</code> <code>65EAADFF68C8818F6FA3B2B5E616C757</code> <code>6E32A4E7D4305F596F3E34464FB49C0D</code> <code>C84A6F6495EED79BD59B121DBF1C5EFF</code> <code>DFC34DA250310F4ADC4E316C07539D6C</code> <code>01B135E5393273F1F9BCA7EF836995F4</code> <code>8BBF143D704F64648F6A9F5CFC4B78FE</code> <code>936B78BF671EF301C289E4FA43FB2AFA</code> <code>EABF1A393F05DAFD8A1A1595EB37D072</code> <code>9BE0FFB2029F3C9CE2F1A53916DA1593</code> <code>D2E390349F4922BD0A92E748FD9F5A1E</code> <code>D25495A20379C2A0E005234875AFB45A</code> <code>98915B817FD0668F676ED69181F05DDE</code><br> <code>B63E7041</code></td>
|
||||
<td><code>FE000100A5FD41F136810954512FDBA8</code> <code>5D5FA73CACDCD121A2AA3D5DA13F644C</code> <code>0694AEC396F8A8D828AE04D37315DF10</code> <code>DB4232D823AD1F6E34E0BB80B390B787</code> <code>E99A794559033DDC9051CFE51176A058</code> <code>9482F65875B56466EC07E23BCD6BF55A</code> <code>A750BFCF02BA96E9926E8F8137DEBC73</code> <code>FE8D11C74EC11D4D0804A44C07CF9EE7</code> <code>04A800862C1268582E67E4E4885D3298</code> <code>1873B2F7265000ACF1B345139DA8FAEB</code> <code>AAB3435E9B3B470B4F77CBE677AEE05A</code> <code>E47080CB0AE5F13BD00EA454A23E2D9C</code> <code>78D180D9A9A150E4445C69598927C535</code> <code>7D86B6FCE9C6F078C243912670DBC37D</code> <code>9692C77F149F8FC319CBD38B119D958A</code> <code>1909608F8B1700536842E1FE94AD1F3C</code><br> <code>82E9B477</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = 65ABF7EDBB05E031AF979CF8CB1B2B6BC7DFE73CBFD2A8CA0915DA618
|
|||
<h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5>
|
||||
<!-- start server_DH_params_ok -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 38 64 08 FD 35 C5 65
|
||||
0010 | 9C 02 00 00 5C 07 E8 D0 29 60 48 82 0D B2 4E 46
|
||||
0020 | 47 F1 10 A6 10 5B 39 B4 24 08 8C FF 48 75 8D B6
|
||||
0030 | 2B 59 5F AD 1C AB 00 50 FE 50 02 00 AB BA 46 8A
|
||||
0040 | 62 67 D2 A0 DE B6 11 B4 67 CD E0 85 6A 5B C3 2E
|
||||
0050 | 26 FB 94 AE AF 13 92 3A B3 B4 E4 DC F2 13 CD A7
|
||||
0060 | 01 93 BA 1F 0C E9 6F 2C 2C 12 A3 4D EA 4F 16 0C
|
||||
0070 | BC 84 2F 25 5C F6 02 FB 27 8B 80 E1 3B F3 93 33
|
||||
0080 | AF EA 22 8C C8 DC 9E 82 B5 2F AF 58 FD C6 3E 6D
|
||||
0090 | 55 C7 4E 7D 8C EE 51 CE 57 7E AB A9 48 25 0D C1
|
||||
00A0 | D2 97 AB 63 A0 7B 4E 2D A0 34 FE C5 2E FF 26 B7
|
||||
00B0 | C0 81 C6 96 ED 5B A8 C0 A5 E2 B3 6B 8E BA 16 2D
|
||||
00C0 | CC 5F AE B2 FB 6B 1D 9A BE 54 FC 00 51 59 30 91
|
||||
00D0 | 11 7B D5 C3 80 D4 44 A4 47 6F 43 8C 00 E6 F5 F6
|
||||
00E0 | 67 93 47 0E 14 3E 94 AA A5 A3 D9 FA 0C CF E0 FD
|
||||
00F0 | BB 27 62 54 F6 84 B2 CF 19 70 9F E9 D8 EE 0F 79
|
||||
0100 | 6D 33 87 0D 5D AC 59 08 7B 4B 68 20 59 44 DE 79
|
||||
0110 | D7 E6 73 7A 28 FD F4 01 78 8F 2B 15 4B AD 63 F9
|
||||
0120 | 10 AE 0B D3 00 1B 02 48 37 59 66 E9 AD 39 70 C7
|
||||
0130 | 71 BE 37 AE 2D 22 2C A2 54 B4 04 0C 5F A8 80 C3
|
||||
0140 | B8 51 4A 26 18 7D 2A 00 87 F3 4C C2 60 0F FA 68
|
||||
0150 | C3 22 07 F9 83 37 0C 71 59 33 5C E4 99 4A 57 29
|
||||
0160 | C6 E5 82 40 64 7D 3F BD 1D 9E 58 95 52 19 FF E9
|
||||
0170 | 0C B7 B6 2A 89 53 FC CE 17 35 CB DC A8 B4 E9 9E
|
||||
0180 | B8 C5 D7 A8 CF B2 CF 00 0A 5C 0B 69 FD A6 99 AC
|
||||
0190 | 75 F1 CB 9D F9 DD CB DD 2B 2F 34 52 44 94 49 77
|
||||
01A0 | D6 6D 0F B2 B1 AF 4E 51 B3 F4 17 D8 CB 0D 56 DF
|
||||
01B0 | FD 71 CE 4B 1C C2 95 FE 4B A2 6F 8F 17 0B 41 D6
|
||||
01C0 | 17 84 FD 83 B8 B6 93 D8 2E 0C 28 39 9D 66 DE 69
|
||||
01D0 | 80 37 75 24 50 F6 F5 B1 4A EE 9C 99 4D CB C1 82
|
||||
01E0 | 1D 49 B8 0B 79 89 6C 90 54 0A F6 95 DB D9 6D C5
|
||||
01F0 | 7B 49 AA D8 B7 32 B1 AC 98 45 6F BB 4B 36 6C 01
|
||||
0200 | 34 06 DF DD 1E 07 30 DC 5B 54 2B 1F 5E 86 AA E5
|
||||
0210 | BA 6D 20 B5 9A 27 C6 FA 82 AE E0 21 F0 06 10 6D
|
||||
0220 | EE A6 A1 90 9A 6C 85 13 9F 57 65 33 FB D8 8C 5F
|
||||
0230 | FC 55 5C 5C 44 1D 7A 36 53 7F 88 18 C1 88 DF 02
|
||||
0240 | 57 CC 5C 0D 5C 23 66 4C B6 93 D8 D3 5A 62 6E 17
|
||||
0250 | 1F 5D 19 6F FC CE DF 6D 8E 0E B0 BE A3 5D 0F 53
|
||||
0260 | 39 27 2B F3 C2 53 25 36 6A 1C 83 B4 9E 32 4C 0B
|
||||
0270 | D0 2A F4 9A A5 ED A7 0F 43 4E C8 29 B3 AB 08 F7
|
||||
0280 | FD E4 E1 B2 BD 13 5B 17 E0 E9 26 42</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 6C E0 87 F3 37 C5 65
|
||||
0010 | E0 02 00 00 5C 07 E8 D0 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61
|
||||
0030 | 17 19 3C 56 D9 EA 86 02 FE 50 02 00 52 BE 74 05
|
||||
0040 | BE 2E AC 65 29 2B EC 6C 10 D4 D1 FB B7 9E 9B 4A
|
||||
0050 | EA 77 05 5F A5 44 1C 7C 47 95 A8 6E 91 20 A4 C0
|
||||
0060 | 7E 49 0D 9C 05 BF 08 01 97 25 32 FA FE 16 33 52
|
||||
0070 | 36 95 03 3A 32 6D 9A 15 FD 11 FA E3 1C 7A 40 07
|
||||
0080 | 56 56 F6 AC 1C 8B A0 EB 9F C1 CC BE F1 CF 34 E0
|
||||
0090 | 12 31 4A 2C 3C BF 13 65 8A C2 3E 80 13 36 5A F3
|
||||
00A0 | DC 46 DE E6 7B 93 7E A3 60 E7 91 FC 6D E3 58 94
|
||||
00B0 | AC 8E 4E 1F 25 AB CE 7B 26 F7 99 EB B9 A9 02 59
|
||||
00C0 | 77 39 C2 3B 64 5E D4 8D E2 70 53 AD C4 65 92 F7
|
||||
00D0 | EB 3A E3 80 29 31 10 1F A7 40 25 E2 74 D7 4E 12
|
||||
00E0 | B2 6D B4 A7 6D EC A4 79 43 24 67 55 12 C6 61 76
|
||||
00F0 | E1 9C E0 E8 CE 8D C7 6B DE EC 0D 36 BF 55 BF DC
|
||||
0100 | 11 9B A2 73 3D 84 8F 26 25 F5 99 43 7B 11 00 DC
|
||||
0110 | 16 B1 9A 60 FD FA E5 95 90 01 A5 E8 E1 85 3B 1A
|
||||
0120 | BD 53 51 BB 94 6C FC 30 7F 9A E7 18 0D BB 2B F0
|
||||
0130 | ED DB A3 2B DF 3A F8 B4 D4 61 C9 C2 39 E8 19 CB
|
||||
0140 | B2 95 28 D0 CD 67 24 93 87 69 04 C7 36 DB 79 18
|
||||
0150 | C8 3D 3F E4 6F DE 36 31 EF E8 FC 1D 87 4E B1 19
|
||||
0160 | 91 FB A8 AD 72 B1 B6 93 43 CE 91 EB F9 DB 91 03
|
||||
0170 | 30 89 91 5D EE C6 4A 7B C1 94 5D 35 41 02 58 7E
|
||||
0180 | 53 C1 70 4B 46 29 37 D8 20 6B 22 82 E3 A5 66 42
|
||||
0190 | AC 89 90 B1 62 4B A5 26 92 CD FE DD 9C 17 5A 5D
|
||||
01A0 | C1 5B DB 7E 5E A7 A0 BC 94 B9 1A 24 45 D0 FC AC
|
||||
01B0 | 32 BB 9E 71 5E FC 27 4E CA 0C 4C 7E E8 D3 2E A1
|
||||
01C0 | 12 6E 5C 7C 9C 61 FB E7 97 A1 DA 73 3F 69 59 93
|
||||
01D0 | 3C 5C 8B 28 51 80 F4 3C 2F 34 C5 8A 93 9D 92 01
|
||||
01E0 | 0D BE 41 D3 6B 58 0F D3 3D 81 78 AF 51 CC 2F 9C
|
||||
01F0 | E8 7E C6 A5 08 31 9F AA B3 60 4B 15 68 B4 6D 1D
|
||||
0200 | A3 D0 82 69 33 6A 7E 55 4A 7C 51 30 AB D4 D2 93
|
||||
0210 | EF 9E 1C B5 D9 C8 2E 6E C4 C3 BB BF 52 11 48 F0
|
||||
0220 | 60 E9 CF 2E 7E 27 CB 02 3A 21 26 2C 3F 70 A3 2E
|
||||
0230 | F7 CB EB 3A 79 51 0F FD F6 C6 A0 F2 66 6D 75 6C
|
||||
0240 | 6E E5 6F 1E FA C0 3D 8B D4 78 E1 2C 1B A4 FF D1
|
||||
0250 | DC DD 90 46 E6 02 14 AA 89 72 3A 60 25 64 71 58
|
||||
0260 | 4A F4 40 6D 21 C1 5E BA 97 01 8C 4F C0 A6 DC 83
|
||||
0270 | 22 A4 58 3B BF 74 AF 6E FF 04 BA 7F AC 5F 84 3D
|
||||
0280 | 08 5B 16 FD 2A 94 FD E9 00 D7 18 7E</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -464,13 +464,13 @@ random_padding_bytes = 65ABF7EDBB05E031AF979CF8CB1B2B6BC7DFE73CBFD2A8CA0915DA618
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01386408FD35C565</code></td>
|
||||
<td><code>016CE087F337C565</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>9C020000</code> (668 in decimal)</td>
|
||||
<td><code>E0020000</code> (736 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = 65ABF7EDBB05E031AF979CF8CB1B2B6BC7DFE73CBFD2A8CA0915DA618
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE500200ABBA468A6267D2A0DEB611B4</code> <code>67CDE0856A5BC32E26FB94AEAF13923A</code> <code>B3B4E4DCF213CDA70193BA1F0CE96F2C</code> <code>2C12A34DEA4F160CBC842F255CF602FB</code> <code>278B80E13BF39333AFEA228CC8DC9E82</code> <code>B52FAF58FDC63E6D55C74E7D8CEE51CE</code> <code>577EABA948250DC1D297AB63A07B4E2D</code> <code>A034FEC52EFF26B7C081C696ED5BA8C0</code> <code>A5E2B36B8EBA162DCC5FAEB2FB6B1D9A</code> <code>BE54FC0051593091117BD5C380D444A4</code> <code>476F438C00E6F5F66793470E143E94AA</code> <code>A5A3D9FA0CCFE0FDBB276254F684B2CF</code> <code>19709FE9D8EE0F796D33870D5DAC5908</code> <code>7B4B68205944DE79D7E6737A28FDF401</code> <code>788F2B154BAD63F910AE0BD3001B0248</code> <code>375966E9AD3970C771BE37AE2D222CA2</code> <code>54B4040C5FA880C3B8514A26187D2A00</code> <code>87F34CC2600FFA68C32207F983370C71</code> <code>59335CE4994A5729C6E58240647D3FBD</code> <code>1D9E58955219FFE90CB7B62A8953FCCE</code> <code>1735CBDCA8B4E99EB8C5D7A8CFB2CF00</code> <code>0A5C0B69FDA699AC75F1CB9DF9DDCBDD</code> <code>2B2F345244944977D66D0FB2B1AF4E51</code> <code>B3F417D8CB0D56DFFD71CE4B1CC295FE</code> <code>4BA26F8F170B41D61784FD83B8B693D8</code> <code>2E0C28399D66DE698037752450F6F5B1</code> <code>4AEE9C994DCBC1821D49B80B79896C90</code> <code>540AF695DBD96DC57B49AAD8B732B1AC</code> <code>98456FBB4B366C013406DFDD1E0730DC</code> <code>5B542B1F5E86AAE5BA6D20B59A27C6FA</code> <code>82AEE021F006106DEEA6A1909A6C8513</code> <code>9F576533FBD88C5FFC555C5C441D7A36</code> <code>537F8818C188DF0257CC5C0D5C23664C</code> <code>B693D8D35A626E171F5D196FFCCEDF6D</code> <code>8E0EB0BEA35D0F5339272BF3C2532536</code> <code>6A1C83B49E324C0BD02AF49AA5EDA70F</code> <code>434EC829B3AB08F7FDE4E1B2BD135B17</code><br> <code>E0E92642</code></td>
|
||||
<td><code>FE50020052BE7405BE2EAC65292BEC6C</code> <code>10D4D1FBB79E9B4AEA77055FA5441C7C</code> <code>4795A86E9120A4C07E490D9C05BF0801</code> <code>972532FAFE1633523695033A326D9A15</code> <code>FD11FAE31C7A40075656F6AC1C8BA0EB</code> <code>9FC1CCBEF1CF34E012314A2C3CBF1365</code> <code>8AC23E8013365AF3DC46DEE67B937EA3</code> <code>60E791FC6DE35894AC8E4E1F25ABCE7B</code> <code>26F799EBB9A902597739C23B645ED48D</code> <code>E27053ADC46592F7EB3AE3802931101F</code> <code>A74025E274D74E12B26DB4A76DECA479</code> <code>4324675512C66176E19CE0E8CE8DC76B</code> <code>DEEC0D36BF55BFDC119BA2733D848F26</code> <code>25F599437B1100DC16B19A60FDFAE595</code> <code>9001A5E8E1853B1ABD5351BB946CFC30</code> <code>7F9AE7180DBB2BF0EDDBA32BDF3AF8B4</code> <code>D461C9C239E819CBB29528D0CD672493</code> <code>876904C736DB7918C83D3FE46FDE3631</code> <code>EFE8FC1D874EB11991FBA8AD72B1B693</code> <code>43CE91EBF9DB91033089915DEEC64A7B</code> <code>C1945D354102587E53C1704B462937D8</code> <code>206B2282E3A56642AC8990B1624BA526</code> <code>92CDFEDD9C175A5DC15BDB7E5EA7A0BC</code> <code>94B91A2445D0FCAC32BB9E715EFC274E</code> <code>CA0C4C7EE8D32EA1126E5C7C9C61FBE7</code> <code>97A1DA733F6959933C5C8B285180F43C</code> <code>2F34C58A939D92010DBE41D36B580FD3</code> <code>3D8178AF51CC2F9CE87EC6A508319FAA</code> <code>B3604B1568B46D1DA3D08269336A7E55</code> <code>4A7C5130ABD4D293EF9E1CB5D9C82E6E</code> <code>C4C3BBBF521148F060E9CF2E7E27CB02</code> <code>3A21262C3F70A32EF7CBEB3A79510FFD</code> <code>F6C6A0F2666D756C6EE56F1EFAC03D8B</code> <code>D478E12C1BA4FFD1DCDD9046E60214AA</code> <code>89723A60256471584AF4406D21C15EBA</code> <code>97018C4FC0A6DC8322A4583BBF74AF6E</code> <code>FF04BA7FAC5F843D085B16FD2A94FDE9</code><br> <code>00D7187E</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = 65ABF7EDBB05E031AF979CF8CB1B2B6BC7DFE73CBFD2A8CA0915DA618
|
|||
<!-- end server_DH_params_ok -->
|
||||
<p>Decrypt <code>encrypted_answer</code> using the reverse of the process specified in <a href="/mtproto/auth_key#6-server-responds-with">step 6</a>:</p>
|
||||
<!-- start server_DH_inner_data_input -->
|
||||
<pre><code>encrypted_answer = ABBA468A6267D2A0DEB611B467CDE0856A5BC32E26FB94AEAF13923AB3B4E4DCF213CDA70193BA1F0CE96F2C2C12A34DEA4F160CBC842F255CF602FB278B80E13BF39333AFEA228CC8DC9E82B52FAF58FDC63E6D55C74E7D8CEE51CE577EABA948250DC1D297AB63A07B4E2DA034FEC52EFF26B7C081C696ED5BA8C0A5E2B36B8EBA162DCC5FAEB2FB6B1D9ABE54FC0051593091117BD5C380D444A4476F438C00E6F5F66793470E143E94AAA5A3D9FA0CCFE0FDBB276254F684B2CF19709FE9D8EE0F796D33870D5DAC59087B4B68205944DE79D7E6737A28FDF401788F2B154BAD63F910AE0BD3001B0248375966E9AD3970C771BE37AE2D222CA254B4040C5FA880C3B8514A26187D2A0087F34CC2600FFA68C32207F983370C7159335CE4994A5729C6E58240647D3FBD1D9E58955219FFE90CB7B62A8953FCCE1735CBDCA8B4E99EB8C5D7A8CFB2CF000A5C0B69FDA699AC75F1CB9DF9DDCBDD2B2F345244944977D66D0FB2B1AF4E51B3F417D8CB0D56DFFD71CE4B1CC295FE4BA26F8F170B41D61784FD83B8B693D82E0C28399D66DE698037752450F6F5B14AEE9C994DCBC1821D49B80B79896C90540AF695DBD96DC57B49AAD8B732B1AC98456FBB4B366C013406DFDD1E0730DC5B542B1F5E86AAE5BA6D20B59A27C6FA82AEE021F006106DEEA6A1909A6C85139F576533FBD88C5FFC555C5C441D7A36537F8818C188DF0257CC5C0D5C23664CB693D8D35A626E171F5D196FFCCEDF6D8E0EB0BEA35D0F5339272BF3C25325366A1C83B49E324C0BD02AF49AA5EDA70F434EC829B3AB08F7FDE4E1B2BD135B17E0E92642
|
||||
tmp_aes_key = C5613909EE08C44A27355DFCF68FF1243C3E1D20B77947F0969612672EEE9EFB
|
||||
tmp_aes_iv = F0D575BA184616046E8D221A48CAD8E797752CC09923299FF8F150548FA51EFA</code></pre>
|
||||
<pre><code>encrypted_answer = 52BE7405BE2EAC65292BEC6C10D4D1FBB79E9B4AEA77055FA5441C7C4795A86E9120A4C07E490D9C05BF0801972532FAFE1633523695033A326D9A15FD11FAE31C7A40075656F6AC1C8BA0EB9FC1CCBEF1CF34E012314A2C3CBF13658AC23E8013365AF3DC46DEE67B937EA360E791FC6DE35894AC8E4E1F25ABCE7B26F799EBB9A902597739C23B645ED48DE27053ADC46592F7EB3AE3802931101FA74025E274D74E12B26DB4A76DECA4794324675512C66176E19CE0E8CE8DC76BDEEC0D36BF55BFDC119BA2733D848F2625F599437B1100DC16B19A60FDFAE5959001A5E8E1853B1ABD5351BB946CFC307F9AE7180DBB2BF0EDDBA32BDF3AF8B4D461C9C239E819CBB29528D0CD672493876904C736DB7918C83D3FE46FDE3631EFE8FC1D874EB11991FBA8AD72B1B69343CE91EBF9DB91033089915DEEC64A7BC1945D354102587E53C1704B462937D8206B2282E3A56642AC8990B1624BA52692CDFEDD9C175A5DC15BDB7E5EA7A0BC94B91A2445D0FCAC32BB9E715EFC274ECA0C4C7EE8D32EA1126E5C7C9C61FBE797A1DA733F6959933C5C8B285180F43C2F34C58A939D92010DBE41D36B580FD33D8178AF51CC2F9CE87EC6A508319FAAB3604B1568B46D1DA3D08269336A7E554A7C5130ABD4D293EF9E1CB5D9C82E6EC4C3BBBF521148F060E9CF2E7E27CB023A21262C3F70A32EF7CBEB3A79510FFDF6C6A0F2666D756C6EE56F1EFAC03D8BD478E12C1BA4FFD1DCDD9046E60214AA89723A60256471584AF4406D21C15EBA97018C4FC0A6DC8322A4583BBF74AF6EFF04BA7FAC5F843D085B16FD2A94FDE900D7187E
|
||||
tmp_aes_key = B6DC3ABB4846E04549FA9E8BC439BE5946327ECE7BBD6A2C4C7A14623BD9F361
|
||||
tmp_aes_iv = 7E28D97049A23CBEA0233B5493865156A266BC2FA6EEE59087CE0BED45221E84</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = 03996BDD7DD4F977B3C7901ABBF6DEB906A0546EBA0D89B5296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB005003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001006D4EE939DE2899C07FF0D1931EB744A285CF996D6AB277916A53884E027AF2D518154C56EFDF5FC1122027DAC0DDB8B425088BF03F077D84E6EBBBBDF38F1E5C6BF9445EBE5CA0AD26DE1FC7FCF0141579660C6D469DFA6F36B7C608D35A47036FF40C1FCE395364134A5F6D1B0AA6E646F25D8390F5A816CAB019E02C1ECC4996CCCB24417120645017245D575C6340E85485657DD33599FAEC86334139597B45626F57EFB225A09A524ED14D4F76F3FC7C7EE0DEF28A4E3F349D2871D2A430C4A91569C11A76FF0AB15A1FF0229F7D0CC5B92240C7A96F44EA76097D5E4C2A17F321AC1A9BF089B1C04D912B12D575853AD0C515E04D7CF4DD225EEDA6DEF5FD35C565EA9024606A627DAD
|
||||
answer = BA0D89B5296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB005003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001006D4EE939DE2899C07FF0D1931EB744A285CF996D6AB277916A53884E027AF2D518154C56EFDF5FC1122027DAC0DDB8B425088BF03F077D84E6EBBBBDF38F1E5C6BF9445EBE5CA0AD26DE1FC7FCF0141579660C6D469DFA6F36B7C608D35A47036FF40C1FCE395364134A5F6D1B0AA6E646F25D8390F5A816CAB019E02C1ECC4996CCCB24417120645017245D575C6340E85485657DD33599FAEC86334139597B45626F57EFB225A09A524ED14D4F76F3FC7C7EE0DEF28A4E3F349D2871D2A430C4A91569C11A76FF0AB15A1FF0229F7D0CC5B92240C7A96F44EA76097D5E4C2A17F321AC1A9BF089B1C04D912B12D575853AD0C515E04D7CF4DD225EEDA6DEF5FD35C565EA9024606A627DAD</code></pre>
|
||||
<pre><code>answer_with_hash = 09115666EBE84000F4856D81DE414B23F4425976BA0D89B58F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100672D1D50C2F9F62B302A9D18D1DC3CCB0B96DEAD17FF998A5487C870C71BDC7BCFA11EFCAF2921D904C5882B11228CB6F36E07BFC3F784C647F2A9EA90A3227E4D368C5C07AA0D23204E6E18E694AAF259CCBB810B1741FFCAD0C1B2792CBF0D0FF4C51514435359DB2F5A6CF6D0277AB16EE4C183CA98306DAF502DCFD26E43AD629D58994E7BC127DDAB08F57C918E026431403151715CFA651F867879476695BE6F5E7A005AFDEA9FB823578A0F07A4F23A2E2DCED38C3C3F999B106A1DAC67332490AFF52140703CB5BF31D465C8DABCACD25EA99F72E69446BC053DBE5D53CDA6F677506A43CAAAB29B9D4E76BB78CF454BF6C391232EA210D83E9F6228F337C5652926F83C1A66E135
|
||||
answer = BA0D89B58F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100672D1D50C2F9F62B302A9D18D1DC3CCB0B96DEAD17FF998A5487C870C71BDC7BCFA11EFCAF2921D904C5882B11228CB6F36E07BFC3F784C647F2A9EA90A3227E4D368C5C07AA0D23204E6E18E694AAF259CCBB810B1741FFCAD0C1B2792CBF0D0FF4C51514435359DB2F5A6CF6D0277AB16EE4C183CA98306DAF502DCFD26E43AD629D58994E7BC127DDAB08F57C918E026431403151715CFA651F867879476695BE6F5E7A005AFDEA9FB823578A0F07A4F23A2E2DCED38C3C3F999B106A1DAC67332490AFF52140703CB5BF31D465C8DABCACD25EA99F72E69446BC053DBE5D53CDA6F677506A43CAAAB29B9D4E76BB78CF454BF6C391232EA210D83E9F6228F337C5652926F83C1A66E135</code></pre>
|
||||
<!-- end server_DH_inner_data_output -->
|
||||
<!-- start server_DH_inner_data -->
|
||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | BA 0D 89 B5 29 60 48 82 0D B2 4E 46 47 F1 10 A6
|
||||
0010 | 10 5B 39 B4 24 08 8C FF 48 75 8D B6 2B 59 5F AD
|
||||
0020 | 1C AB 00 50 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 8F 69 6E B0 53 F5 60 41 2B 22 A9 8B
|
||||
0010 | 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61 17 19 3C 56
|
||||
0020 | D9 EA 86 02 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
0030 | C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23
|
||||
0040 | 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A
|
||||
0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E
|
||||
|
@ -532,23 +532,23 @@ answer = BA0D89B5296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB005
|
|||
0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6
|
||||
0110 | 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0
|
||||
0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
|
||||
0130 | 6D 4E E9 39 DE 28 99 C0 7F F0 D1 93 1E B7 44 A2
|
||||
0140 | 85 CF 99 6D 6A B2 77 91 6A 53 88 4E 02 7A F2 D5
|
||||
0150 | 18 15 4C 56 EF DF 5F C1 12 20 27 DA C0 DD B8 B4
|
||||
0160 | 25 08 8B F0 3F 07 7D 84 E6 EB BB BD F3 8F 1E 5C
|
||||
0170 | 6B F9 44 5E BE 5C A0 AD 26 DE 1F C7 FC F0 14 15
|
||||
0180 | 79 66 0C 6D 46 9D FA 6F 36 B7 C6 08 D3 5A 47 03
|
||||
0190 | 6F F4 0C 1F CE 39 53 64 13 4A 5F 6D 1B 0A A6 E6
|
||||
01A0 | 46 F2 5D 83 90 F5 A8 16 CA B0 19 E0 2C 1E CC 49
|
||||
01B0 | 96 CC CB 24 41 71 20 64 50 17 24 5D 57 5C 63 40
|
||||
01C0 | E8 54 85 65 7D D3 35 99 FA EC 86 33 41 39 59 7B
|
||||
01D0 | 45 62 6F 57 EF B2 25 A0 9A 52 4E D1 4D 4F 76 F3
|
||||
01E0 | FC 7C 7E E0 DE F2 8A 4E 3F 34 9D 28 71 D2 A4 30
|
||||
01F0 | C4 A9 15 69 C1 1A 76 FF 0A B1 5A 1F F0 22 9F 7D
|
||||
0200 | 0C C5 B9 22 40 C7 A9 6F 44 EA 76 09 7D 5E 4C 2A
|
||||
0210 | 17 F3 21 AC 1A 9B F0 89 B1 C0 4D 91 2B 12 D5 75
|
||||
0220 | 85 3A D0 C5 15 E0 4D 7C F4 DD 22 5E ED A6 DE F5
|
||||
0230 | FD 35 C5 65</code></pre>
|
||||
0130 | 67 2D 1D 50 C2 F9 F6 2B 30 2A 9D 18 D1 DC 3C CB
|
||||
0140 | 0B 96 DE AD 17 FF 99 8A 54 87 C8 70 C7 1B DC 7B
|
||||
0150 | CF A1 1E FC AF 29 21 D9 04 C5 88 2B 11 22 8C B6
|
||||
0160 | F3 6E 07 BF C3 F7 84 C6 47 F2 A9 EA 90 A3 22 7E
|
||||
0170 | 4D 36 8C 5C 07 AA 0D 23 20 4E 6E 18 E6 94 AA F2
|
||||
0180 | 59 CC BB 81 0B 17 41 FF CA D0 C1 B2 79 2C BF 0D
|
||||
0190 | 0F F4 C5 15 14 43 53 59 DB 2F 5A 6C F6 D0 27 7A
|
||||
01A0 | B1 6E E4 C1 83 CA 98 30 6D AF 50 2D CF D2 6E 43
|
||||
01B0 | AD 62 9D 58 99 4E 7B C1 27 DD AB 08 F5 7C 91 8E
|
||||
01C0 | 02 64 31 40 31 51 71 5C FA 65 1F 86 78 79 47 66
|
||||
01D0 | 95 BE 6F 5E 7A 00 5A FD EA 9F B8 23 57 8A 0F 07
|
||||
01E0 | A4 F2 3A 2E 2D CE D3 8C 3C 3F 99 9B 10 6A 1D AC
|
||||
01F0 | 67 33 24 90 AF F5 21 40 70 3C B5 BF 31 D4 65 C8
|
||||
0200 | DA BC AC D2 5E A9 9F 72 E6 94 46 BC 05 3D BE 5D
|
||||
0210 | 53 CD A6 F6 77 50 6A 43 CA AA B2 9B 9D 4E 76 BB
|
||||
0220 | 78 CF 45 4B F6 C3 91 23 2E A2 10 D8 3E 9F 62 28
|
||||
0230 | F3 37 C5 65</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -570,13 +570,13 @@ answer = BA0D89B5296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB005
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B5296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB005
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE0001006D4EE939DE2899C07FF0D193</code> <code>1EB744A285CF996D6AB277916A53884E</code> <code>027AF2D518154C56EFDF5FC1122027DA</code> <code>C0DDB8B425088BF03F077D84E6EBBBBD</code> <code>F38F1E5C6BF9445EBE5CA0AD26DE1FC7</code> <code>FCF0141579660C6D469DFA6F36B7C608</code> <code>D35A47036FF40C1FCE395364134A5F6D</code> <code>1B0AA6E646F25D8390F5A816CAB019E0</code> <code>2C1ECC4996CCCB24417120645017245D</code> <code>575C6340E85485657DD33599FAEC8633</code> <code>4139597B45626F57EFB225A09A524ED1</code> <code>4D4F76F3FC7C7EE0DEF28A4E3F349D28</code> <code>71D2A430C4A91569C11A76FF0AB15A1F</code> <code>F0229F7D0CC5B92240C7A96F44EA7609</code> <code>7D5E4C2A17F321AC1A9BF089B1C04D91</code> <code>2B12D575853AD0C515E04D7CF4DD225E</code><br> <code>EDA6DEF5</code></td>
|
||||
<td><code>FE000100672D1D50C2F9F62B302A9D18</code> <code>D1DC3CCB0B96DEAD17FF998A5487C870</code> <code>C71BDC7BCFA11EFCAF2921D904C5882B</code> <code>11228CB6F36E07BFC3F784C647F2A9EA</code> <code>90A3227E4D368C5C07AA0D23204E6E18</code> <code>E694AAF259CCBB810B1741FFCAD0C1B2</code> <code>792CBF0D0FF4C51514435359DB2F5A6C</code> <code>F6D0277AB16EE4C183CA98306DAF502D</code> <code>CFD26E43AD629D58994E7BC127DDAB08</code> <code>F57C918E026431403151715CFA651F86</code> <code>7879476695BE6F5E7A005AFDEA9FB823</code> <code>578A0F07A4F23A2E2DCED38C3C3F999B</code> <code>106A1DAC67332490AFF52140703CB5BF</code> <code>31D465C8DABCACD25EA99F72E69446BC</code> <code>053DBE5D53CDA6F677506A43CAAAB29B</code> <code>9D4E76BB78CF454BF6C391232EA210D8</code><br> <code>3E9F6228</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>FD35C565</code> (1707423229 in decimal)</td>
|
||||
<td><code>F337C565</code> (1707423731 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B5296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB005
|
|||
<h5><a class="anchor" href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" id="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" name="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message"><i class="anchor-icon"></i></a>7) Client computes random 2048-bit number <em>b</em> (using a sufficient amount of entropy) and sends the server a message</h5>
|
||||
<p>First, generate a secure random 2048-bit number b:</p>
|
||||
<!-- start b -->
|
||||
<pre><code>b = 9510E46B1695BA56E30B2BCB0A400B7A3B99847BAEA0CCAAA6ABC466BAC51A18C4283F748919BEAC71668C8C417DA35B749161DAEBECC77AD9D59153BC7F08F0F4F4CD1DA1EEF670F231339406C24524DB01BF7A841746CBA29A5537CA3BE6758C2D38D85C97D987AFB0B21CE389128CB9193DA25AD2AFC5E652FABE76DFBC2A2C209DBBD8A6782ED3AAFA789926C62595EAE67D68346E85075E5C4B0A632975DB20B6A3C47D40BF73158DB83D0EF229DCB445BD08AD31A43928CD69504BF6D2E5A85A4C5E3759299B8D7B72706AE6FED21E0DFDE886BFD8EB9476E2B9F610DB447C8F20F20DD4681908D6DA67196A1F80A7887986A9E3F13E415FFCD61BA6C5</code></pre>
|
||||
<pre><code>b = FDB4FDE13A60F49A10304533622ABE32A0396ECE5AD89C308033BEDA82120AFDEE0C48FEC36DF5CCD75E4B3F6AC54A3D9387E682C72A9EABA0FBCC605050ED48C1179EAECB97FB350DF425BD830CE75CB8BE5C2F780EB6CB7CC5B3DC9C5386B75109A4D9B09B13F812CAFD2A8123F81026DBF383652AB4CF13BACB5DE60CD5CD552005A5BE728AF4A5B43A901B9A9DDC047C7DCE8580694DE4DE86C6508B004D5C3573EBA79481D51B7841970907E002A94D66869320A2B511166BEC320C296A186083C32B62860C045CEE991DE91FACFE6AC3E73E9DB9F520DFEADD1BDE8D7F25C7A74A79BC23E72805285E55E79D6BEB818829E4A8808BAF386062E3A803A4</code></pre>
|
||||
<!-- end b -->
|
||||
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
|
||||
<!-- start g_b -->
|
||||
<pre><code>g_b = 55606D890DEFBAAC50F8B833A2A8C062937665225725AC78AB34756A791D1B0368DC4F3F6897467833B97CAFC4F0D2E86EAD45830B7FED34A60214A7506A7B3988BA070EB9F31D14673854107898E73CB01746E1232080ED82C3BA29325DB8D600F246C5526BAAC62F372139529F7E0AA071C66ED5F503CCD80D12843F7C91D7597968C79D347B22556F2EF909061A18523CF3182019091E73C07767E9C77E8B0782CBCFA4FB2E03CC48F1BB8F4DF899166CEA2046FA236D2E5EF1EFEFA6C05CF6975B2643F421148C0A4E3873FBCF5A0CEDF48D8C0ABE6040DB1F0B81138EB9EDF34B34D835C41E7DA1FB84A6CC9B0B6A0B3BFE658E54EA2ADFF75A92084CD4</code></pre>
|
||||
<pre><code>g_b = 91BF40DC89956A1BAB9AD81375E9D7687F8AE76EC791525D1C3E79F7FC6C734C6B005B0D8E1AAC7FCEFC4B0C1347F6E44DF94057E0AA07CD283986FDEA742256638DD00C806B743049EBEB980FE373B871271DEAF508669370E362A83B16BD1565F1B81DF0C1C10887EEA4895499741F2A3051C130FEFC56EF9340A26707F190FE1426E39646A805FE59A58548CDED66A1E8611D94F4C69647F1FD8586886DA784371D0DE0215D7B67C440F879C9003894F131997EA80E3419BC54C9E4BBD1F34B0C79A71F2E9205D7B95E16EC1B469FAFAA59A09B3503D7197E6E0B7BD60D92A0DCE720192E91D5B77C8F6610FD7E3D95FDEFF40C172BF4439B2E24A05C57D5</code></pre>
|
||||
<!-- end g_b -->
|
||||
<h6>7.1) generation of encrypted_data</h6>
|
||||
<!-- start client_DH_inner_data -->
|
||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 54 B6 43 66 29 60 48 82 0D B2 4E 46 47 F1 10 A6
|
||||
0010 | 10 5B 39 B4 24 08 8C FF 48 75 8D B6 2B 59 5F AD
|
||||
0020 | 1C AB 00 50 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 55 60 6D 89 0D EF BA AC 50 F8 B8 33 A2 A8 C0 62
|
||||
0040 | 93 76 65 22 57 25 AC 78 AB 34 75 6A 79 1D 1B 03
|
||||
0050 | 68 DC 4F 3F 68 97 46 78 33 B9 7C AF C4 F0 D2 E8
|
||||
0060 | 6E AD 45 83 0B 7F ED 34 A6 02 14 A7 50 6A 7B 39
|
||||
0070 | 88 BA 07 0E B9 F3 1D 14 67 38 54 10 78 98 E7 3C
|
||||
0080 | B0 17 46 E1 23 20 80 ED 82 C3 BA 29 32 5D B8 D6
|
||||
0090 | 00 F2 46 C5 52 6B AA C6 2F 37 21 39 52 9F 7E 0A
|
||||
00A0 | A0 71 C6 6E D5 F5 03 CC D8 0D 12 84 3F 7C 91 D7
|
||||
00B0 | 59 79 68 C7 9D 34 7B 22 55 6F 2E F9 09 06 1A 18
|
||||
00C0 | 52 3C F3 18 20 19 09 1E 73 C0 77 67 E9 C7 7E 8B
|
||||
00D0 | 07 82 CB CF A4 FB 2E 03 CC 48 F1 BB 8F 4D F8 99
|
||||
00E0 | 16 6C EA 20 46 FA 23 6D 2E 5E F1 EF EF A6 C0 5C
|
||||
00F0 | F6 97 5B 26 43 F4 21 14 8C 0A 4E 38 73 FB CF 5A
|
||||
0100 | 0C ED F4 8D 8C 0A BE 60 40 DB 1F 0B 81 13 8E B9
|
||||
0110 | ED F3 4B 34 D8 35 C4 1E 7D A1 FB 84 A6 CC 9B 0B
|
||||
0120 | 6A 0B 3B FE 65 8E 54 EA 2A DF F7 5A 92 08 4C D4</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 8F 69 6E B0 53 F5 60 41 2B 22 A9 8B
|
||||
0010 | 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61 17 19 3C 56
|
||||
0020 | D9 EA 86 02 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 91 BF 40 DC 89 95 6A 1B AB 9A D8 13 75 E9 D7 68
|
||||
0040 | 7F 8A E7 6E C7 91 52 5D 1C 3E 79 F7 FC 6C 73 4C
|
||||
0050 | 6B 00 5B 0D 8E 1A AC 7F CE FC 4B 0C 13 47 F6 E4
|
||||
0060 | 4D F9 40 57 E0 AA 07 CD 28 39 86 FD EA 74 22 56
|
||||
0070 | 63 8D D0 0C 80 6B 74 30 49 EB EB 98 0F E3 73 B8
|
||||
0080 | 71 27 1D EA F5 08 66 93 70 E3 62 A8 3B 16 BD 15
|
||||
0090 | 65 F1 B8 1D F0 C1 C1 08 87 EE A4 89 54 99 74 1F
|
||||
00A0 | 2A 30 51 C1 30 FE FC 56 EF 93 40 A2 67 07 F1 90
|
||||
00B0 | FE 14 26 E3 96 46 A8 05 FE 59 A5 85 48 CD ED 66
|
||||
00C0 | A1 E8 61 1D 94 F4 C6 96 47 F1 FD 85 86 88 6D A7
|
||||
00D0 | 84 37 1D 0D E0 21 5D 7B 67 C4 40 F8 79 C9 00 38
|
||||
00E0 | 94 F1 31 99 7E A8 0E 34 19 BC 54 C9 E4 BB D1 F3
|
||||
00F0 | 4B 0C 79 A7 1F 2E 92 05 D7 B9 5E 16 EC 1B 46 9F
|
||||
0100 | AF AA 59 A0 9B 35 03 D7 19 7E 6E 0B 7B D6 0D 92
|
||||
0110 | A0 DC E7 20 19 2E 91 D5 B7 7C 8F 66 10 FD 7E 3D
|
||||
0120 | 95 FD EF F4 0C 17 2B F4 43 9B 2E 24 A0 5C 57 D5</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -658,19 +658,19 @@ answer = BA0D89B5296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB005
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE00010055606D890DEFBAAC50F8B833</code> <code>A2A8C062937665225725AC78AB34756A</code> <code>791D1B0368DC4F3F6897467833B97CAF</code> <code>C4F0D2E86EAD45830B7FED34A60214A7</code> <code>506A7B3988BA070EB9F31D1467385410</code> <code>7898E73CB01746E1232080ED82C3BA29</code> <code>325DB8D600F246C5526BAAC62F372139</code> <code>529F7E0AA071C66ED5F503CCD80D1284</code> <code>3F7C91D7597968C79D347B22556F2EF9</code> <code>09061A18523CF3182019091E73C07767</code> <code>E9C77E8B0782CBCFA4FB2E03CC48F1BB</code> <code>8F4DF899166CEA2046FA236D2E5EF1EF</code> <code>EFA6C05CF6975B2643F421148C0A4E38</code> <code>73FBCF5A0CEDF48D8C0ABE6040DB1F0B</code> <code>81138EB9EDF34B34D835C41E7DA1FB84</code> <code>A6CC9B0B6A0B3BFE658E54EA2ADFF75A</code><br> <code>92084CD4</code></td>
|
||||
<td><code>FE00010091BF40DC89956A1BAB9AD813</code> <code>75E9D7687F8AE76EC791525D1C3E79F7</code> <code>FC6C734C6B005B0D8E1AAC7FCEFC4B0C</code> <code>1347F6E44DF94057E0AA07CD283986FD</code> <code>EA742256638DD00C806B743049EBEB98</code> <code>0FE373B871271DEAF508669370E362A8</code> <code>3B16BD1565F1B81DF0C1C10887EEA489</code> <code>5499741F2A3051C130FEFC56EF9340A2</code> <code>6707F190FE1426E39646A805FE59A585</code> <code>48CDED66A1E8611D94F4C69647F1FD85</code> <code>86886DA784371D0DE0215D7B67C440F8</code> <code>79C9003894F131997EA80E3419BC54C9</code> <code>E4BBD1F34B0C79A71F2E9205D7B95E16</code> <code>EC1B469FAFAA59A09B3503D7197E6E0B</code> <code>7BD60D92A0DCE720192E91D5B77C8F66</code> <code>10FD7E3D95FDEFF40C172BF4439B2E24</code><br> <code>A05C57D5</code></td>
|
||||
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -684,47 +684,47 @@ answer = BA0D89B5296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB005
|
|||
<!-- end client_DH_inner_data -->
|
||||
<p>The serialization of <em>Client_DH_Inner_Data</em> produces a string <strong>data</strong>. This is used to generate <strong>encrypted_data</strong> as specified in <a href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message">step 6</a>, using the following inputs:</p>
|
||||
<!-- start client_DH_inner_data_input -->
|
||||
<pre><code>data = 54B64366296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB00500000000000000000FE00010055606D890DEFBAAC50F8B833A2A8C062937665225725AC78AB34756A791D1B0368DC4F3F6897467833B97CAFC4F0D2E86EAD45830B7FED34A60214A7506A7B3988BA070EB9F31D14673854107898E73CB01746E1232080ED82C3BA29325DB8D600F246C5526BAAC62F372139529F7E0AA071C66ED5F503CCD80D12843F7C91D7597968C79D347B22556F2EF909061A18523CF3182019091E73C07767E9C77E8B0782CBCFA4FB2E03CC48F1BB8F4DF899166CEA2046FA236D2E5EF1EFEFA6C05CF6975B2643F421148C0A4E3873FBCF5A0CEDF48D8C0ABE6040DB1F0B81138EB9EDF34B34D835C41E7DA1FB84A6CC9B0B6A0B3BFE658E54EA2ADFF75A92084CD4
|
||||
padding = 93FC4482E1118552DF6F273E
|
||||
tmp_aes_key = C5613909EE08C44A27355DFCF68FF1243C3E1D20B77947F0969612672EEE9EFB
|
||||
tmp_aes_iv = F0D575BA184616046E8D221A48CAD8E797752CC09923299FF8F150548FA51EFA</code></pre>
|
||||
<pre><code>data = 54B643668F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA86020000000000000000FE00010091BF40DC89956A1BAB9AD81375E9D7687F8AE76EC791525D1C3E79F7FC6C734C6B005B0D8E1AAC7FCEFC4B0C1347F6E44DF94057E0AA07CD283986FDEA742256638DD00C806B743049EBEB980FE373B871271DEAF508669370E362A83B16BD1565F1B81DF0C1C10887EEA4895499741F2A3051C130FEFC56EF9340A26707F190FE1426E39646A805FE59A58548CDED66A1E8611D94F4C69647F1FD8586886DA784371D0DE0215D7B67C440F879C9003894F131997EA80E3419BC54C9E4BBD1F34B0C79A71F2E9205D7B95E16EC1B469FAFAA59A09B3503D7197E6E0B7BD60D92A0DCE720192E91D5B77C8F6610FD7E3D95FDEFF40C172BF4439B2E24A05C57D5
|
||||
padding = D8F4B7CC1FB902EE46015016
|
||||
tmp_aes_key = B6DC3ABB4846E04549FA9E8BC439BE5946327ECE7BBD6A2C4C7A14623BD9F361
|
||||
tmp_aes_iv = 7E28D97049A23CBEA0233B5493865156A266BC2FA6EEE59087CE0BED45221E84</code></pre>
|
||||
<!-- end client_DH_inner_data_input -->
|
||||
<p>Process:</p>
|
||||
<pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16)
|
||||
encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre>
|
||||
<p>Output:</p>
|
||||
<!-- start client_DH_inner_data_output -->
|
||||
<pre><code>encrypted_data = 141F0B1A399FB3A198545F2D1DBCFC16DEE1DF9A1406B5F17437F244390F93E6B5C47ABDD57571DC136DF6DB9A1A0C3C0B9DD0BCF525DD214F0469A7913D1CDE62286AD1CAF6F8BA297FDF60743B8EFEE1CEB930950D2CF2C9FC9BDD3DAD1BF46912B0B07597416CF0828B57FF517CA350B13836C0F52A3FB6447A1D5E3034F516AB3B15B3EE63DE2B8AE602678BCB6F9F00354774EA04F7EEDDC65108CB20EE1C85806BFDC4703EDCB8FC5F751969BEAC84BA81F7D065230DCE443760058C6553B4885DF7DAAD3887FFE8AB451F511CF4401D7C6A2184D173622E844788A47DCDF1B2EFD09997D0E390A4836BFBCB05F471891384EC1EF4AC6B736A3EB4F3682B96D389D0776AA4EB161F4AC8F8F5CE01BA74F15F44D010E6435A929C2B79E4583552A0915739FAC9986B2B73CF8A2DDE752D1FA3453D2668B70AA831A2F2F31A70EE05CF31D5D53D4201F25FA12020</code></pre>
|
||||
<pre><code>encrypted_data = F0171BAA4EF91D1AEEAD8C6569B6CA796499A3D83AB9FC81741C22E9960BA09ABFD7ACBF400E95ED60A5749A416881D527284008F29FF4E596447D88E239E82EDF6A9FE315A9FB3EA09B8E3ED2D4755FACEC01336057F9A8A590D6F0F97565DA0694308E1C634ECD09A24B7FADC8F04884AEBC378C8703A2A716B382F84B813FB1BCFFDB4EF9473BCDE11E7CC3C9DB3A6B399FC1FAAC2EF48B1CABB4608849501B75A9B99673F56623C6356385D708532B95B1C980C99DAFA58EC9D7CC6BBC620C14E4A8649749D73E91D7D8DFBC4E95E54AEDBDDEAA800E6967A4C54894F42919E9C50725D003DCAB52637492F4200D63D5395EE80D171CD04161032CBC90836C8789D7F37365F832A003464A0F0DF7D27C382962064AC4812C7BA5BB8861A011575374AAABE05FB2D30DEA1ED1735A0D84D07B910FD8BF2099325B29E1B5A8799EF87922B459BFC796412312969A69</code></pre>
|
||||
<!-- end client_DH_inner_data_output -->
|
||||
<p>The length of the final string is 336 bytes.</p>
|
||||
<h6>7.2) set_client_DH_params query</h6>
|
||||
<!-- start set_client_DH_params -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 60 7C 03 00 FD 35 C5 65
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 29 60 48 82 0D B2 4E 46
|
||||
0020 | 47 F1 10 A6 10 5B 39 B4 24 08 8C FF 48 75 8D B6
|
||||
0030 | 2B 59 5F AD 1C AB 00 50 FE 50 01 00 14 1F 0B 1A
|
||||
0040 | 39 9F B3 A1 98 54 5F 2D 1D BC FC 16 DE E1 DF 9A
|
||||
0050 | 14 06 B5 F1 74 37 F2 44 39 0F 93 E6 B5 C4 7A BD
|
||||
0060 | D5 75 71 DC 13 6D F6 DB 9A 1A 0C 3C 0B 9D D0 BC
|
||||
0070 | F5 25 DD 21 4F 04 69 A7 91 3D 1C DE 62 28 6A D1
|
||||
0080 | CA F6 F8 BA 29 7F DF 60 74 3B 8E FE E1 CE B9 30
|
||||
0090 | 95 0D 2C F2 C9 FC 9B DD 3D AD 1B F4 69 12 B0 B0
|
||||
00A0 | 75 97 41 6C F0 82 8B 57 FF 51 7C A3 50 B1 38 36
|
||||
00B0 | C0 F5 2A 3F B6 44 7A 1D 5E 30 34 F5 16 AB 3B 15
|
||||
00C0 | B3 EE 63 DE 2B 8A E6 02 67 8B CB 6F 9F 00 35 47
|
||||
00D0 | 74 EA 04 F7 EE DD C6 51 08 CB 20 EE 1C 85 80 6B
|
||||
00E0 | FD C4 70 3E DC B8 FC 5F 75 19 69 BE AC 84 BA 81
|
||||
00F0 | F7 D0 65 23 0D CE 44 37 60 05 8C 65 53 B4 88 5D
|
||||
0100 | F7 DA AD 38 87 FF E8 AB 45 1F 51 1C F4 40 1D 7C
|
||||
0110 | 6A 21 84 D1 73 62 2E 84 47 88 A4 7D CD F1 B2 EF
|
||||
0120 | D0 99 97 D0 E3 90 A4 83 6B FB CB 05 F4 71 89 13
|
||||
0130 | 84 EC 1E F4 AC 6B 73 6A 3E B4 F3 68 2B 96 D3 89
|
||||
0140 | D0 77 6A A4 EB 16 1F 4A C8 F8 F5 CE 01 BA 74 F1
|
||||
0150 | 5F 44 D0 10 E6 43 5A 92 9C 2B 79 E4 58 35 52 A0
|
||||
0160 | 91 57 39 FA C9 98 6B 2B 73 CF 8A 2D DE 75 2D 1F
|
||||
0170 | A3 45 3D 26 68 B7 0A A8 31 A2 F2 F3 1A 70 EE 05
|
||||
0180 | CF 31 D5 D5 3D 42 01 F2 5F A1 20 20</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 3C D8 06 00 F4 37 C5 65
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61
|
||||
0030 | 17 19 3C 56 D9 EA 86 02 FE 50 01 00 F0 17 1B AA
|
||||
0040 | 4E F9 1D 1A EE AD 8C 65 69 B6 CA 79 64 99 A3 D8
|
||||
0050 | 3A B9 FC 81 74 1C 22 E9 96 0B A0 9A BF D7 AC BF
|
||||
0060 | 40 0E 95 ED 60 A5 74 9A 41 68 81 D5 27 28 40 08
|
||||
0070 | F2 9F F4 E5 96 44 7D 88 E2 39 E8 2E DF 6A 9F E3
|
||||
0080 | 15 A9 FB 3E A0 9B 8E 3E D2 D4 75 5F AC EC 01 33
|
||||
0090 | 60 57 F9 A8 A5 90 D6 F0 F9 75 65 DA 06 94 30 8E
|
||||
00A0 | 1C 63 4E CD 09 A2 4B 7F AD C8 F0 48 84 AE BC 37
|
||||
00B0 | 8C 87 03 A2 A7 16 B3 82 F8 4B 81 3F B1 BC FF DB
|
||||
00C0 | 4E F9 47 3B CD E1 1E 7C C3 C9 DB 3A 6B 39 9F C1
|
||||
00D0 | FA AC 2E F4 8B 1C AB B4 60 88 49 50 1B 75 A9 B9
|
||||
00E0 | 96 73 F5 66 23 C6 35 63 85 D7 08 53 2B 95 B1 C9
|
||||
00F0 | 80 C9 9D AF A5 8E C9 D7 CC 6B BC 62 0C 14 E4 A8
|
||||
0100 | 64 97 49 D7 3E 91 D7 D8 DF BC 4E 95 E5 4A ED BD
|
||||
0110 | DE AA 80 0E 69 67 A4 C5 48 94 F4 29 19 E9 C5 07
|
||||
0120 | 25 D0 03 DC AB 52 63 74 92 F4 20 0D 63 D5 39 5E
|
||||
0130 | E8 0D 17 1C D0 41 61 03 2C BC 90 83 6C 87 89 D7
|
||||
0140 | F3 73 65 F8 32 A0 03 46 4A 0F 0D F7 D2 7C 38 29
|
||||
0150 | 62 06 4A C4 81 2C 7B A5 BB 88 61 A0 11 57 53 74
|
||||
0160 | AA AB E0 5F B2 D3 0D EA 1E D1 73 5A 0D 84 D0 7B
|
||||
0170 | 91 0F D8 BF 20 99 32 5B 29 E1 B5 A8 79 9E F8 79
|
||||
0180 | 22 B4 59 BF C7 96 41 23 12 96 9A 69</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>607C0300FD35C565</code></td>
|
||||
<td><code>3CD80600F437C565</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE500100141F0B1A399FB3A198545F2D</code> <code>1DBCFC16DEE1DF9A1406B5F17437F244</code> <code>390F93E6B5C47ABDD57571DC136DF6DB</code> <code>9A1A0C3C0B9DD0BCF525DD214F0469A7</code> <code>913D1CDE62286AD1CAF6F8BA297FDF60</code> <code>743B8EFEE1CEB930950D2CF2C9FC9BDD</code> <code>3DAD1BF46912B0B07597416CF0828B57</code> <code>FF517CA350B13836C0F52A3FB6447A1D</code> <code>5E3034F516AB3B15B3EE63DE2B8AE602</code> <code>678BCB6F9F00354774EA04F7EEDDC651</code> <code>08CB20EE1C85806BFDC4703EDCB8FC5F</code> <code>751969BEAC84BA81F7D065230DCE4437</code> <code>60058C6553B4885DF7DAAD3887FFE8AB</code> <code>451F511CF4401D7C6A2184D173622E84</code> <code>4788A47DCDF1B2EFD09997D0E390A483</code> <code>6BFBCB05F471891384EC1EF4AC6B736A</code> <code>3EB4F3682B96D389D0776AA4EB161F4A</code> <code>C8F8F5CE01BA74F15F44D010E6435A92</code> <code>9C2B79E4583552A0915739FAC9986B2B</code> <code>73CF8A2DDE752D1FA3453D2668B70AA8</code> <code>31A2F2F31A70EE05CF31D5D53D4201F2</code><br> <code>5FA12020</code></td>
|
||||
<td><code>FE500100F0171BAA4EF91D1AEEAD8C65</code> <code>69B6CA796499A3D83AB9FC81741C22E9</code> <code>960BA09ABFD7ACBF400E95ED60A5749A</code> <code>416881D527284008F29FF4E596447D88</code> <code>E239E82EDF6A9FE315A9FB3EA09B8E3E</code> <code>D2D4755FACEC01336057F9A8A590D6F0</code> <code>F97565DA0694308E1C634ECD09A24B7F</code> <code>ADC8F04884AEBC378C8703A2A716B382</code> <code>F84B813FB1BCFFDB4EF9473BCDE11E7C</code> <code>C3C9DB3A6B399FC1FAAC2EF48B1CABB4</code> <code>608849501B75A9B99673F56623C63563</code> <code>85D708532B95B1C980C99DAFA58EC9D7</code> <code>CC6BBC620C14E4A8649749D73E91D7D8</code> <code>DFBC4E95E54AEDBDDEAA800E6967A4C5</code> <code>4894F42919E9C50725D003DCAB526374</code> <code>92F4200D63D5395EE80D171CD0416103</code> <code>2CBC90836C8789D7F37365F832A00346</code> <code>4A0F0DF7D27C382962064AC4812C7BA5</code> <code>BB8861A011575374AAABE05FB2D30DEA</code> <code>1ED1735A0D84D07B910FD8BF2099325B</code> <code>29E1B5A8799EF87922B459BFC7964123</code><br> <code>12969A69</code></td>
|
||||
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -785,17 +785,17 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<h5><a class="anchor" href="#8-auth-key-generation" id="8-auth-key-generation" name="8-auth-key-generation"><i class="anchor-icon"></i></a>8) Auth key generation</h5>
|
||||
<p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p>
|
||||
<!-- start auth_key -->
|
||||
<pre><code>auth_key = 74C9D850B2549A5CA6448C0A91C4183C8CD36918D190B13DBA703EA4996FFF5C13B830407392C9EDA472CB06786C31198B8A479D790A9D00B1877E217C7A9EE48E53F307663EF113C22BC5A05D64631C7E5557251C160D30F45F15E9125C4296CE819A038A712271A622EF3AAAC7441FDE6AACF628EEF5C1EE1190899032F8C3713114FEE0161D5DDDCF6E109D1C9A1B0F8EFC64789D597AC5FD5D6601381AEE2080106F409D2BBB5B40155509E5D468B14C554B893DEA28BBA1246147274D386AE223EC56679922C89646AA28E00B4C9975B65B0BC23C6DFCF86AC3188ADEB84B1E11CB7AE33F4E46A5AB73710B9795F936D0C2580CE20472EC213BF77FC204</code></pre>
|
||||
<pre><code>auth_key = A280484BE6F25A806DBD0A4248A8184A00620EAB23E97E5AC0649106A6A681DEC894D940002D4DD237BE987CE7412EB956076693D2ED74CC82083E0F5BE7AF19EC498B9CD8D371B6FE103C780AD4B671A957AEA771973255FC1BC044F8288C4A1E33D63A6B0E6C50C25ED67A18C60D6BB02E265B114B464C03EA8ADB92C03BAC6361B3759D47EFABD77C1F72FC0FFBCDB687571E45C5ED950BDFED277716F2E8142B8AEB10BED0F3BB7713FFAE73C0C8EEFA52244EF436319E397D04A632B8230696AED62F296E58FF60AA4B0BC78929396D422B339338F7D5655EF088788F08F22A6765CF653FBFA358AE4D249D597F82EE51B018779293DA2468F57444A71A</code></pre>
|
||||
<!-- end auth_key -->
|
||||
<h5><a class="anchor" href="#9-final-server-reply" id="9-final-server-reply" name="9-final-server-reply"><i class="anchor-icon"></i></a>9) Final server reply</h5>
|
||||
<p>The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:</p>
|
||||
<!-- start dh_gen_ok -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 08 2B 9B FD 35 C5 65
|
||||
0010 | 38 00 00 00 34 F7 CB 3B 29 60 48 82 0D B2 4E 46
|
||||
0020 | 47 F1 10 A6 10 5B 39 B4 24 08 8C FF 48 75 8D B6
|
||||
0030 | 2B 59 5F AD 1C AB 00 50 6C 57 D0 BA 1C 2B 32 31
|
||||
0040 | EC 49 28 D5 42 23 EB 9F</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 A4 AB B5 F4 37 C5 65
|
||||
0010 | AC 00 00 00 34 F7 CB 3B 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61
|
||||
0030 | 17 19 3C 56 D9 EA 86 02 1A 44 B0 BC B0 79 40 AD
|
||||
0040 | 51 6D 1F 57 E1 72 48 9F</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01082B9BFD35C565</code></td>
|
||||
<td><code>01A4ABB5F437C565</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>38000000</code> (56 in decimal)</td>
|
||||
<td><code>AC000000</code> (172 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>6C57D0BA1C2B3231EC4928D54223EB9F</code></td>
|
||||
<td><code>1A44B0BCB07940AD516D1F57E172489F</code></td>
|
||||
<td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in a new issue