Update content of files

This commit is contained in:
GitHub Action 2024-08-03 09:25:17 +00:00
parent 4c7b04aa9b
commit a8ef08ccd7
7 changed files with 241 additions and 249 deletions

View file

@ -169,13 +169,15 @@ This is just a way of verifying the identity of the user, mainly used by the off
<a href='/constructor/updateInlineBotCallbackQuery'>updateInlineBotCallbackQuery</a>#691e9052 flags:<a href='/type/%23'>#</a> query_id:<a href='/type/long'>long</a> user_id:<a href='/type/long'>long</a> msg_id:<a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a> chat_instance:<a href='/type/long'>long</a> data:flags.0?<a href='/type/bytes'>bytes</a> game_short_name:flags.1?<a href='/type/string'>string</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/updateBusinessBotCallbackQuery'>updateBusinessBotCallbackQuery</a>#1ea2fda7 flags:<a href='/type/%23'>#</a> query_id:<a href='/type/long'>long</a> user_id:<a href='/type/long'>long</a> connection_id:<a href='/type/string'>string</a> message:<a href='/type/Message'>Message</a> reply_to_message:flags.2?<a href='/type/Message'>Message</a> chat_instance:<a href='/type/long'>long</a> data:flags.0?<a href='/type/bytes'>bytes</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.setBotCallbackAnswer'>messages.setBotCallbackAnswer</a>#d58f130a flags:<a href='/type/%23'>#</a> alert:flags.1?<a href='/constructor/true'>true</a> query_id:<a href='/type/long'>long</a> message:flags.0?<a href='/type/string'>string</a> url:flags.2?<a href='/type/string'>string</a> cache_time:<a href='/type/int'>int</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>After the user invokes <a href="/method/messages.getBotCallbackAnswer">messages.getBotCallbackAnswer</a>, an <a href="/constructor/updateBotCallbackQuery">updateBotCallbackQuery</a> or <a href="/constructor/updateInlineBotCallbackQuery">updateInlineBotCallbackQuery</a> is generated and sent to the bot, depending on whether the query originated from a normal message sent by the bot, or from a message sent from an <a href="/api/bots/inline">inline query</a>. </p>
<p>After the user invokes <a href="/method/messages.getBotCallbackAnswer">messages.getBotCallbackAnswer</a>, an <a href="/constructor/updateBotCallbackQuery">updateBotCallbackQuery</a>, <a href="/constructor/updateInlineBotCallbackQuery">updateInlineBotCallbackQuery</a> or <a href="/constructor/updateBusinessBotCallbackQuery">updateBusinessBotCallbackQuery</a> is generated and sent to the bot, depending on whether the query originated from a normal message sent by the bot, from a message sent from an <a href="/api/bots/inline">inline query</a>, or from a message sent via a <a href="/api/business#connected-bots">business connection</a>. </p>
<p>Either way, bots must reply to the query as quickly as possible using <a href="/method/messages.setBotCallbackAnswer">messages.setBotCallbackAnswer</a>: </p>
<ul>
<li><code>query_id</code> is the <code>query_id</code> from <a href="/method/messages.getBotCallbackAnswer">messages.getBotCallbackAnswer</a>, an <a href="/constructor/updateBotCallbackQuery">updateBotCallbackQuery</a> or <a href="/constructor/updateInlineBotCallbackQuery">updateInlineBotCallbackQuery</a></li>
<li><code>query_id</code> is the <code>query_id</code> from <a href="/method/messages.getBotCallbackAnswer">messages.getBotCallbackAnswer</a>, an <a href="/constructor/updateBotCallbackQuery">updateBotCallbackQuery</a>, <a href="/constructor/updateInlineBotCallbackQuery">updateInlineBotCallbackQuery</a> or <a href="/constructor/updateBusinessBotCallbackQuery">updateBusinessBotCallbackQuery</a></li>
<li><code>message</code>, <code>alert</code>, <code>url</code> can contain messages and URLs to trigger different client behaviour, as <a href="#sending-a-callback-query">specified above »</a></li>
<li><code>cache_time</code> indicates the maximum amount of time in seconds that the result of the callback query may be cached by the <strong>client</strong>. </li>
</ul>

View file

@ -350,6 +350,7 @@ The created <a href="/api/links#business-chat-links">deep link</a> is returned i
<a href='/constructor/updateBotNewBusinessMessage'>updateBotNewBusinessMessage</a>#9ddb347c flags:<a href='/type/%23'>#</a> connection_id:<a href='/type/string'>string</a> message:<a href='/type/Message'>Message</a> reply_to_message:flags.0?<a href='/type/Message'>Message</a> qts:<a href='/type/int'>int</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/updateBotEditBusinessMessage'>updateBotEditBusinessMessage</a>#7df587c flags:<a href='/type/%23'>#</a> connection_id:<a href='/type/string'>string</a> message:<a href='/type/Message'>Message</a> reply_to_message:flags.0?<a href='/type/Message'>Message</a> qts:<a href='/type/int'>int</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/updateBotDeleteBusinessMessage'>updateBotDeleteBusinessMessage</a>#a02a982e connection_id:<a href='/type/string'>string</a> peer:<a href='/type/Peer'>Peer</a> messages:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; qts:<a href='/type/int'>int</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/updateBusinessBotCallbackQuery'>updateBusinessBotCallbackQuery</a>#1ea2fda7 flags:<a href='/type/%23'>#</a> query_id:<a href='/type/long'>long</a> user_id:<a href='/type/long'>long</a> connection_id:<a href='/type/string'>string</a> message:<a href='/type/Message'>Message</a> reply_to_message:flags.2?<a href='/type/Message'>Message</a> chat_instance:<a href='/type/long'>long</a> data:flags.0?<a href='/type/bytes'>bytes</a> = <a href='/type/Update'>Update</a>;
---functions---
@ -385,10 +386,12 @@ This method can be used to fetch info about a not-yet-cached business connection
<li><a href="/method/messages.sendMedia">messages.sendMedia</a></li>
<li><a href="/method/messages.sendMultiMedia">messages.sendMultiMedia</a></li>
<li><a href="/method/messages.setTyping">messages.setTyping</a></li>
<li><a href="/method/messages.updatePinnedMessage">messages.updatePinnedMessage</a></li>
</ul>
<p>Make sure to always send queries wrapped in a <code>invokeWithBusinessConnection</code> to the datacenter ID, specified in the <code>dc_id</code> field of the <a href="/constructor/botBusinessConnection">botBusinessConnection</a> that is being used. </p>
<p>Make sure to always send queries wrapped in an <code>invokeWithBusinessConnection</code> to the datacenter ID, specified in the <code>dc_id</code> field of the <a href="/constructor/botBusinessConnection">botBusinessConnection</a> that is being used. </p>
<p><a href="/method/messages.uploadMedia">messages.uploadMedia</a> may also be used in business connections, <em>not</em> by wrapping it in <a href="/method/invokeWithBusinessConnection">invokeWithBusinessConnection »</a>, but rather by specifying the business connection ID in the <code>business_connection_id</code> parameter.</p>
<p><a href="/constructor/message">Message</a>s sent by business bots on behalf of the user using this method will have the <code>via_business_connection</code> flag set, indicating that the message was sent by the business bot indicated in <a href="/constructor/message">message</a>.<code>via_bot_id</code>. </p>
<p><a href="/constructor/message">Message</a>s sent by business bots on behalf of the user may also contain <a href="/api/bots/buttons">inline keyboards</a>, including <a href="/api/bots/buttons#answering-a-callback-query">callback buttons</a>, which when pressed will emit an <a href="/constructor/updateBusinessBotCallbackQuery">updateBusinessBotCallbackQuery</a> which should be handled as specified <a href="/api/bots/buttons#answering-a-callback-query">here »</a> (<em>without</em> wrapping the query in an <code>invokeWithBusinessConnection</code>).</p>
<h3><a class="anchor" href="#re-enable-ads" id="re-enable-ads" name="re-enable-ads"><i class="anchor-icon"></i></a>Re-enable ads</h3>
<pre><code><a href='/constructor/userFull'>userFull</a>#cc997720 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> wallpaper_overridden:flags.28?<a href='/constructor/true'>true</a> contact_require_premium:flags.29?<a href='/constructor/true'>true</a> read_dates_private:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> sponsored_enabled:flags2.7?<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>&lt;<a href='/type/PremiumGiftOption'>PremiumGiftOption</a>&gt; wallpaper:flags.24?<a href='/type/WallPaper'>WallPaper</a> stories:flags.25?<a href='/type/PeerStories'>PeerStories</a> business_work_hours:flags2.0?<a href='/type/BusinessWorkHours'>BusinessWorkHours</a> business_location:flags2.1?<a href='/type/BusinessLocation'>BusinessLocation</a> business_greeting_message:flags2.2?<a href='/type/BusinessGreetingMessage'>BusinessGreetingMessage</a> business_away_message:flags2.3?<a href='/type/BusinessAwayMessage'>BusinessAwayMessage</a> business_intro:flags2.4?<a href='/type/BusinessIntro'>BusinessIntro</a> birthday:flags2.5?<a href='/type/Birthday'>Birthday</a> personal_channel_id:flags2.6?<a href='/type/long'>long</a> personal_channel_message:flags2.6?<a href='/type/int'>int</a> = <a href='/type/UserFull'>UserFull</a>;

View file

@ -218,6 +218,7 @@
<li><a href="/api/stories#urls">URL media areas »</a></li>
<li><a href="/api/stories#location-tags">Addresses in geolocation (non-venue) media areas »</a></li>
<li><a href="/constructor/mediaAreaCoordinates">Custom radiuses for rectangle corner rounding in media areas »</a></li>
<li><a href="/api/business#connected-bots">Callback buttons and queries for users via business bots »</a></li>
<li>Saving message <a href="/api/effects">effects</a> in <a href="/api/drafts">drafts</a></li>
</ul>
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
@ -239,7 +240,7 @@
<li>Added <a href="/constructor/foundStory">foundStory</a> - </li>
<li>Added <a href="/constructor/stories.foundStories">stories.foundStories</a> - </li>
<li>Added <a href="/constructor/geoPointAddress">geoPointAddress</a> - Address optionally associated to a <a href="/constructor/geoPoint">geoPoint</a>.</li>
<li>Added <a href="/constructor/updateBusinessBotCallbackQuery">updateBusinessBotCallbackQuery</a> - </li>
<li>Added <a href="/constructor/updateBusinessBotCallbackQuery">updateBusinessBotCallbackQuery</a> - A callback button sent via a <a href="/api/business#connected-bots">business connection</a> was pressed, and the button data was sent to the bot that created the button.</li>
<li>Added <a href="/constructor/starsRevenueStatus">starsRevenueStatus</a> - </li>
<li>Added <a href="/constructor/payments.starsRevenueStats">payments.starsRevenueStats</a> - </li>
<li>Added <a href="/constructor/payments.starsRevenueWithdrawalUrl">payments.starsRevenueWithdrawalUrl</a> - </li>

View file

@ -4,36 +4,10 @@
<meta charset="utf-8">
<title>updateBusinessBotCallbackQuery</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
query_id
long
 
user_id
long
 
connection_id…">
<meta property="description" content="A callback button sent via a business connection was pressed, and the button data was sent to the bot that created the button.">
<meta property="og:title" content="updateBusinessBotCallbackQuery">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
query_id
long
 
user_id
long
 
connection_id…">
<meta property="og:description" content="A callback button sent via a business connection was pressed, and the button data was sent to the bot that created the button.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -68,7 +42,8 @@ connection_id…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/updateBusinessBotCallbackQuery" >updateBusinessBotCallbackQuery</a></li></ul></div>
<h1 id="dev_page_title">updateBusinessBotCallbackQuery</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>A callback button sent via a <a href="/api/business#connected-bots">business connection</a> was pressed, and the button data was sent to the bot that created the button.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 185 <b class="caret"></b></a>
@ -99,42 +74,45 @@ connection_id…">
<tr>
<td><strong>query_id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td> </td>
<td>Query ID</td>
</tr>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td> </td>
<td>ID of the user that pressed the button</td>
</tr>
<tr>
<td><strong>connection_id</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td> </td>
<td><a href="/api/business#connected-bots">Business connection ID</a></td>
</tr>
<tr>
<td><strong>message</strong></td>
<td style="text-align: center;"><a href="/type/Message">Message</a></td>
<td> </td>
<td>Message that contains the keyboard (also contains info about the chat where the message was sent).</td>
</tr>
<tr>
<td><strong>reply_to_message</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/Message">Message</a></td>
<td> </td>
<td>The message that <code>message</code> is replying to.</td>
</tr>
<tr>
<td><strong>chat_instance</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td> </td>
<td>Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.</td>
</tr>
<tr>
<td><strong>data</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/bytes">bytes</a></td>
<td> </td>
<td>Callback data</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Update">Update</a></p></div>
<p><a href="/type/Update">Update</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -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 00 5D 09 00 B0 2B AD 66
0010 | 14 00 00 00 F1 8E 7E BE 82 91 BF CD 2A 9A 38 CE
0020 | F5 EB EE 6C AD 60 F4 63</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 B4 BF 0C 00 0B F6 AD 66
0010 | 14 00 00 00 F1 8E 7E BE F0 AC A2 9E DD B1 89 60
0020 | 29 31 4F 12 DB 62 CD 21</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>005D0900B02BAD66</code></td>
<td><code>B4BF0C000BF6AD66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -95,7 +95,7 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>8291BFCD2A9A38CEF5EBEE6CAD60F463</code></td>
<td><code>F0ACA29EDDB1896029314F12DB62CD21</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 0C 41 22 B0 2B AD 66
0010 | 80 00 00 00 63 24 16 05 82 91 BF CD 2A 9A 38 CE
0020 | F5 EB EE 6C AD 60 F4 63 A1 EE AF 50 0B C3 0D 41
0030 | 09 77 56 B4 2D 34 DE 4D 08 1D 84 81 1A 9E 2F 59
0040 | F3 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 50 FF D1 0B F6 AD 66
0010 | A8 00 00 00 63 24 16 05 F0 AC A2 9E DD B1 89 60
0020 | 29 31 4F 12 DB 62 CD 21 83 76 EE 2E 1C 63 67 59
0030 | F4 6E 2E 73 0E 2E 6E C7 08 26 2A 73 7B 1A 84 6A
0040 | B9 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>010C4122B02BAD66</code></td>
<td><code>0150FFD10BF6AD66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>80000000</code> (128 in decimal)</td>
<td><code>A8000000</code> (168 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>8291BFCD2A9A38CEF5EBEE6CAD60F463</code></td>
<td><code>F0ACA29EDDB1896029314F12DB62CD21</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>A1EEAF500BC30D41097756B42D34DE4D</code></td>
<td><code>8376EE2E1C636759F46E2E730E2E6EC7</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>081D84811A9E2F59F3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2126966875348752883</td>
<td><code>08262A737B1A846AB9000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2750137495026166457</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 &lt; q.</h5>
<!-- start pq -->
<pre><code>pq = 2126966875348752883</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2126966875348752883 = 1142860457 * 1861090619</code></p>
<pre><code>p = 1142860457
q = 1861090619</code></pre>
<pre><code>pq = 2750137495026166457</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2750137495026166457 = 1552845121 * 1771031417</code></p>
<pre><code>p = 1552845121
q = 1771031417</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 1D 84 81 1A 9E 2F 59 F3 00 00 00
0010 | 04 44 1E AA A9 00 00 00 04 6E ED FD 3B 00 00 00
0020 | 82 91 BF CD 2A 9A 38 CE F5 EB EE 6C AD 60 F4 63
0030 | A1 EE AF 50 0B C3 0D 41 09 77 56 B4 2D 34 DE 4D
0040 | E0 FD 6F AF 1B 19 C2 06 30 2B F3 8B A4 6A AD 96
0050 | FE 2E AC BC 62 11 8E FE 9A D9 1D BC 9B 5D 35 96
<pre><code>0000 | 95 5F F5 A9 08 26 2A 73 7B 1A 84 6A B9 00 00 00
0010 | 04 5C 8E 89 41 00 00 00 04 69 8F CB 79 00 00 00
0020 | F0 AC A2 9E DD B1 89 60 29 31 4F 12 DB 62 CD 21
0030 | 83 76 EE 2E 1C 63 67 59 F4 6E 2E 73 0E 2E 6E C7
0040 | 6D F4 78 EF 94 4C E8 1C 45 EE 89 A8 3C F7 C0 BB
0050 | C2 EA F7 22 B7 02 E6 98 7D 0C 1E C1 48 2D 61 A0
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 = 1861090619</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>081D84811A9E2F59F3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2126966875348752883</td>
<td><code>08262A737B1A846AB9000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2750137495026166457</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>04441EAAA9000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1142860457</td>
<td><code>045C8E8941000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1552845121</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>046EEDFD3B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1861090619</td>
<td><code>04698FCB79000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1771031417</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>8291BFCD2A9A38CEF5EBEE6CAD60F463</code></td>
<td><code>F0ACA29EDDB1896029314F12DB62CD21</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>A1EEAF500BC30D41097756B42D34DE4D</code></td>
<td><code>8376EE2E1C636759F46E2E730E2E6EC7</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>E0FD6FAF1B19C206302BF38BA46AAD96</code> <code>FE2EACBC62118EFE9AD91DBC9B5D3596</code></td>
<td><code>6DF478EF944CE81C45EE89A83CF7C0BB</code> <code>C2EAF722B702E6987D0C1EC1482D61A0</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1861090619</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 = 955FF5A9081D84811A9E2F59F300000004441EAAA9000000046EEDFD3B0000008291BFCD2A9A38CEF5EBEE6CAD60F463A1EEAF500BC30D41097756B42D34DE4DE0FD6FAF1B19C206302BF38BA46AAD96FE2EACBC62118EFE9AD91DBC9B5D359602000000
random_padding_bytes = DAB834055781E41EA6A1AB7A455298F68CD372DB39D83DD17D29D8B9095DEED7F588C302C0E95EE57F2FFE72A78149DE28B6B39D22C9ACC112302ADCF7CA01774C6922018F5CE769A351682F66908202298FC3A0710BDD69C7AF1FA5</code></pre>
<pre><code>data = 955FF5A908262A737B1A846AB9000000045C8E894100000004698FCB79000000F0ACA29EDDB1896029314F12DB62CD218376EE2E1C636759F46E2E730E2E6EC76DF478EF944CE81C45EE89A83CF7C0BBC2EAF722B702E6987D0C1EC1482D61A002000000
random_padding_bytes = C1F2D2CDEF3854AE89B94056EFFB2698D5800FC9810C28426AB1E84921930053171ADAF0766CCB184C5CCDC510AD510376574A587BCBCA889B4A12BB5A0018325CC489B62FC1F26D08EAE2FC658FC3D253196A9AA976595C11CB68E7</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 = 5C1D9E4E77F14C499F888FB25DD6AF577825AEE3A5F72615BF629FC52625FA8E0C01CEC78586D42FD6FA0995F506E2EE380CA35D4900D16716BA17667B3AFF9B829EBF3A238CC925A67384F8A0526390F57EDC9B56AA0705F7BB44C7900B3AF4D5F7F12B15FDD6EE91122C388B1294B8ECC2B1E7C34DBB2607BE6B8BD002A3E73ED6FC0128255E92E2EC9245764E8C5B55416E715BF0BAD2F8A926EAD0D90ECD64DA6BF1C3905ED158E66BE3FF5E0FE0ADE8F8B403C285300B2D686D4E6C70375EF2E14E74365CF952862E0F88004FB70CBCDC45E96FE03423AF921C11BB7893D4E3362A29561D84D752ABCA7A2CE3C7DBB8E01826821A512D6A2EA24F05C6E3</code></pre>
<pre><code>encrypted_data = 61795825E9E858533CA4821B1E5301DFC47AD6ECBCB491F6526F390698EFE9CE7023E6EFB80B736694F4F69644D8B048869DD23895F323E82AB98D4269B99957AB1DE53D0C976D96B55EC9B6C6A0D8F93710FD474CA788C2820937F8DD3F815E233A3819C3EABBB0EFB1BAD9D02206D683109D7F3EADA7FF15ADC9EE7303EDF7E72E60AD9EA19E628885ED3A754C4D06F07D389F00142CA3B25C5DC954B319D25D27CCB0AA0D108163E861AD08278F4B9B20A98DED9885954EF0731910A07CF82FD6A3047D99D18F9E3D7D422F72C2222C2743BA23251B0EC6548D767D8CB138F82952E05AD343C3D8BF959008D496137B6ED55969BBC2C71B96903947467D84</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 0C 68 0E 00 B0 2B AD 66
0010 | 40 01 00 00 BE E4 12 D7 82 91 BF CD 2A 9A 38 CE
0020 | F5 EB EE 6C AD 60 F4 63 A1 EE AF 50 0B C3 0D 41
0030 | 09 77 56 B4 2D 34 DE 4D 04 44 1E AA A9 00 00 00
0040 | 04 6E ED FD 3B 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 5C 1D 9E 4E 77 F1 4C 49 9F 88 8F B2
0060 | 5D D6 AF 57 78 25 AE E3 A5 F7 26 15 BF 62 9F C5
0070 | 26 25 FA 8E 0C 01 CE C7 85 86 D4 2F D6 FA 09 95
0080 | F5 06 E2 EE 38 0C A3 5D 49 00 D1 67 16 BA 17 66
0090 | 7B 3A FF 9B 82 9E BF 3A 23 8C C9 25 A6 73 84 F8
00A0 | A0 52 63 90 F5 7E DC 9B 56 AA 07 05 F7 BB 44 C7
00B0 | 90 0B 3A F4 D5 F7 F1 2B 15 FD D6 EE 91 12 2C 38
00C0 | 8B 12 94 B8 EC C2 B1 E7 C3 4D BB 26 07 BE 6B 8B
00D0 | D0 02 A3 E7 3E D6 FC 01 28 25 5E 92 E2 EC 92 45
00E0 | 76 4E 8C 5B 55 41 6E 71 5B F0 BA D2 F8 A9 26 EA
00F0 | D0 D9 0E CD 64 DA 6B F1 C3 90 5E D1 58 E6 6B E3
0100 | FF 5E 0F E0 AD E8 F8 B4 03 C2 85 30 0B 2D 68 6D
0110 | 4E 6C 70 37 5E F2 E1 4E 74 36 5C F9 52 86 2E 0F
0120 | 88 00 4F B7 0C BC DC 45 E9 6F E0 34 23 AF 92 1C
0130 | 11 BB 78 93 D4 E3 36 2A 29 56 1D 84 D7 52 AB CA
0140 | 7A 2C E3 C7 DB B8 E0 18 26 82 1A 51 2D 6A 2E A2
0150 | 4F 05 C6 E3</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 48 92 0D 00 0C F6 AD 66
0010 | 40 01 00 00 BE E4 12 D7 F0 AC A2 9E DD B1 89 60
0020 | 29 31 4F 12 DB 62 CD 21 83 76 EE 2E 1C 63 67 59
0030 | F4 6E 2E 73 0E 2E 6E C7 04 5C 8E 89 41 00 00 00
0040 | 04 69 8F CB 79 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 61 79 58 25 E9 E8 58 53 3C A4 82 1B
0060 | 1E 53 01 DF C4 7A D6 EC BC B4 91 F6 52 6F 39 06
0070 | 98 EF E9 CE 70 23 E6 EF B8 0B 73 66 94 F4 F6 96
0080 | 44 D8 B0 48 86 9D D2 38 95 F3 23 E8 2A B9 8D 42
0090 | 69 B9 99 57 AB 1D E5 3D 0C 97 6D 96 B5 5E C9 B6
00A0 | C6 A0 D8 F9 37 10 FD 47 4C A7 88 C2 82 09 37 F8
00B0 | DD 3F 81 5E 23 3A 38 19 C3 EA BB B0 EF B1 BA D9
00C0 | D0 22 06 D6 83 10 9D 7F 3E AD A7 FF 15 AD C9 EE
00D0 | 73 03 ED F7 E7 2E 60 AD 9E A1 9E 62 88 85 ED 3A
00E0 | 75 4C 4D 06 F0 7D 38 9F 00 14 2C A3 B2 5C 5D C9
00F0 | 54 B3 19 D2 5D 27 CC B0 AA 0D 10 81 63 E8 61 AD
0100 | 08 27 8F 4B 9B 20 A9 8D ED 98 85 95 4E F0 73 19
0110 | 10 A0 7C F8 2F D6 A3 04 7D 99 D1 8F 9E 3D 7D 42
0120 | 2F 72 C2 22 2C 27 43 BA 23 25 1B 0E C6 54 8D 76
0130 | 7D 8C B1 38 F8 29 52 E0 5A D3 43 C3 D8 BF 95 90
0140 | 08 D4 96 13 7B 6E D5 59 69 BB C2 C7 1B 96 90 39
0150 | 47 46 7D 84</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 = DAB834055781E41EA6A1AB7A455298F68CD372DB39D83DD17D29D8B90
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>0C680E00B02BAD66</code></td>
<td><code>48920D000CF6AD66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -363,25 +363,25 @@ random_padding_bytes = DAB834055781E41EA6A1AB7A455298F68CD372DB39D83DD17D29D8B90
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>8291BFCD2A9A38CEF5EBEE6CAD60F463</code></td>
<td><code>F0ACA29EDDB1896029314F12DB62CD21</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>A1EEAF500BC30D41097756B42D34DE4D</code></td>
<td><code>8376EE2E1C636759F46E2E730E2E6EC7</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>04441EAAA9000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1142860457</td>
<td><code>045C8E8941000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1552845121</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>046EEDFD3B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1861090619</td>
<td><code>04698FCB79000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1771031417</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 = DAB834055781E41EA6A1AB7A455298F68CD372DB39D83DD17D29D8B90
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001005C1D9E4E77F14C499F888FB2</code> <code>5DD6AF577825AEE3A5F72615BF629FC5</code> <code>2625FA8E0C01CEC78586D42FD6FA0995</code> <code>F506E2EE380CA35D4900D16716BA1766</code> <code>7B3AFF9B829EBF3A238CC925A67384F8</code> <code>A0526390F57EDC9B56AA0705F7BB44C7</code> <code>900B3AF4D5F7F12B15FDD6EE91122C38</code> <code>8B1294B8ECC2B1E7C34DBB2607BE6B8B</code> <code>D002A3E73ED6FC0128255E92E2EC9245</code> <code>764E8C5B55416E715BF0BAD2F8A926EA</code> <code>D0D90ECD64DA6BF1C3905ED158E66BE3</code> <code>FF5E0FE0ADE8F8B403C285300B2D686D</code> <code>4E6C70375EF2E14E74365CF952862E0F</code> <code>88004FB70CBCDC45E96FE03423AF921C</code> <code>11BB7893D4E3362A29561D84D752ABCA</code> <code>7A2CE3C7DBB8E01826821A512D6A2EA2</code><br> <code>4F05C6E3</code></td>
<td><code>FE00010061795825E9E858533CA4821B</code> <code>1E5301DFC47AD6ECBCB491F6526F3906</code> <code>98EFE9CE7023E6EFB80B736694F4F696</code> <code>44D8B048869DD23895F323E82AB98D42</code> <code>69B99957AB1DE53D0C976D96B55EC9B6</code> <code>C6A0D8F93710FD474CA788C2820937F8</code> <code>DD3F815E233A3819C3EABBB0EFB1BAD9</code> <code>D02206D683109D7F3EADA7FF15ADC9EE</code> <code>7303EDF7E72E60AD9EA19E628885ED3A</code> <code>754C4D06F07D389F00142CA3B25C5DC9</code> <code>54B319D25D27CCB0AA0D108163E861AD</code> <code>08278F4B9B20A98DED9885954EF07319</code> <code>10A07CF82FD6A3047D99D18F9E3D7D42</code> <code>2F72C2222C2743BA23251B0EC6548D76</code> <code>7D8CB138F82952E05AD343C3D8BF9590</code> <code>08D496137B6ED55969BBC2C71B969039</code><br> <code>47467D84</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = DAB834055781E41EA6A1AB7A455298F68CD372DB39D83DD17D29D8B90
<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 D0 45 F2 B0 2B AD 66
0010 | 78 02 00 00 5C 07 E8 D0 82 91 BF CD 2A 9A 38 CE
0020 | F5 EB EE 6C AD 60 F4 63 A1 EE AF 50 0B C3 0D 41
0030 | 09 77 56 B4 2D 34 DE 4D FE 50 02 00 89 0C 30 D8
0040 | 26 06 8A 80 A7 19 07 E4 5D 17 3E 47 57 0B 28 ED
0050 | 48 8D D0 EB C2 10 39 2D 79 99 D1 8D 11 10 DB 65
0060 | 00 41 9B 5B B5 8A 11 D0 63 11 22 99 E8 7E C0 E4
0070 | 49 7F C6 13 9D 55 CB 4E 59 8E 1C 92 FB 77 DA 96
0080 | 61 5C 22 34 47 5B E3 61 5D 9E 79 82 6E AE E4 85
0090 | DD 2D 30 22 18 68 66 8E 9B A9 D6 62 19 30 DF 0E
00A0 | A2 D4 44 F4 B2 00 75 58 67 EC 82 98 F4 86 67 97
00B0 | 77 BA 82 5C 0A 01 97 60 BD CD 28 FF 79 E7 C9 A4
00C0 | D3 70 26 BE BD A0 9D F0 D6 EF B0 AA FC 70 C7 D0
00D0 | A7 2F A5 FA A0 72 EA BB EE 22 6C FA 81 E4 14 F5
00E0 | E1 4B 18 99 50 71 A9 0B 4B AD 6C 85 51 AB AF 69
00F0 | F6 70 19 8D 29 01 49 FF 98 E3 CC D0 6A 8E 22 33
0100 | 91 82 D0 42 DE CA FB 01 1F 43 44 21 36 3F 63 AC
0110 | DB 41 A8 0F 05 EB DE 43 F5 19 50 7D 0E 7B 05 B1
0120 | E6 CA 23 75 9F 62 BC E5 1E B0 B4 FD 7A 75 C9 AA
0130 | A8 36 C0 31 1A C1 90 64 BF 5B E6 CE 41 2E E1 82
0140 | C3 41 3E C6 F7 5C 57 84 7E 1B 55 9F 6B 9C 1A 0A
0150 | 86 03 A4 13 FC CD 45 37 F1 D1 41 DB 99 69 47 AD
0160 | C2 E4 49 A2 E7 FD BB A5 56 9C D3 07 FD 3C 3F 6C
0170 | 34 B5 9B CC C0 D4 0E F1 29 B9 B7 FF AE 60 B5 A4
0180 | 32 FD BF 66 A7 47 D6 18 A9 A1 3D 31 4C B9 5A 5A
0190 | BE 53 3D 60 26 BF 92 C0 93 8D C3 DB E7 B0 71 3E
01A0 | 09 BE 93 85 44 EA CC 85 D3 3D 39 CD 8F 2F C4 FA
01B0 | FB 52 D0 D0 75 6E 36 6E 35 4D C3 F0 4D EB 6D 69
01C0 | 50 60 10 0E B4 BC F6 6A 04 92 11 A7 3D AC 4E 2E
01D0 | 94 E9 75 19 CA 0E 7A 78 F7 1C 49 E8 04 6E 64 80
01E0 | 44 CA 50 C9 3F 2F FB 12 32 A2 7B FB D7 D3 BB 3A
01F0 | 4B 20 08 88 E1 1A 68 0A A9 B6 3F CB 79 D7 9A 5E
0200 | 78 EF DA 6F 95 FF 0C A9 63 A2 3C B3 41 F0 47 34
0210 | 2A 0D 8A B4 E3 EB 51 E8 17 1F DD 3D 8A B0 56 C2
0220 | BE A4 54 E3 60 AE F3 D2 12 72 4F 34 A1 E9 2F 4C
0230 | 77 27 D3 54 F8 8F 6B 2F 13 A1 A8 61 29 F3 08 2C
0240 | 9E C2 24 2C 67 57 9B 71 33 56 77 7A 7E EE 19 C7
0250 | 52 34 CD 26 47 C8 B8 F0 50 35 CA F4 07 99 22 C0
0260 | 4C 1C D4 0B 73 1D 40 87 57 86 27 CE 44 EC 04 67
0270 | 06 91 9E 6B 38 4F 8A D9 B5 9E D5 89 A2 51 2B A5
0280 | 75 26 B6 DE EA B5 B9 FA 4F 63 52 11</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 A0 D3 92 0C F6 AD 66
0010 | D0 02 00 00 5C 07 E8 D0 F0 AC A2 9E DD B1 89 60
0020 | 29 31 4F 12 DB 62 CD 21 83 76 EE 2E 1C 63 67 59
0030 | F4 6E 2E 73 0E 2E 6E C7 FE 50 02 00 AD EF FE 96
0040 | 37 BB DF B6 39 ED FD CE 09 8D 22 3C 20 6C 55 04
0050 | A1 3A 67 FF E4 99 40 4D 4C B3 34 17 A2 75 3A A0
0060 | 70 2A 0F BE 62 33 35 33 F1 BB 27 A0 C3 C0 43 F9
0070 | 7F A6 7A 94 EE 3E A7 7C D7 19 17 14 5F 96 3C 43
0080 | EF CF B4 82 81 F9 6C 2A 77 8F 93 87 96 14 64 7D
0090 | 8B BF AC 2C B9 48 73 77 64 63 4B CA 6F 8A 4E 75
00A0 | AA 98 29 25 EF 60 AD CE AB 3A 29 EA D2 AD 4C 79
00B0 | AE C2 94 A2 0C FB D3 D0 A7 17 75 20 11 3E 6E F2
00C0 | 97 B9 4C FF 0C 12 0F A7 A2 3F 63 DF DD C0 78 D1
00D0 | DB 5E 45 25 CF AC E8 A0 0E 1C AF F9 3E 83 F8 49
00E0 | 2B 2D 79 F2 FC 82 E4 F6 0F 6A 49 4C E9 33 0B 40
00F0 | 9D 5B DB B2 A5 94 BA C1 13 40 14 02 4F 7E 94 99
0100 | 8E 6A 82 A5 8F 58 54 CF 73 B3 64 7C 33 A9 35 E7
0110 | 3C B1 BA CF B7 57 69 5D E7 E6 B6 C4 1D 58 EB AD
0120 | 47 27 B5 5C D0 26 42 68 58 E3 60 CC 4B FB 44 05
0130 | 3D D4 81 C8 B0 29 BA DF 19 03 0F 36 FF B6 7D B1
0140 | 26 D0 D2 19 6F A1 BA A3 F0 6E 47 47 56 4A 94 4C
0150 | 79 CC 7A 01 2F 61 1C 28 93 4E 61 61 54 99 F5 40
0160 | D9 D7 BE EE A8 A4 C1 F1 7E 4B D0 D8 74 B1 D8 BD
0170 | 1D E1 5F 70 FC 4E 4D D8 E8 5D 26 52 DA BE BE B8
0180 | 51 BB 37 2F D3 4C 76 86 C0 77 8E BF 06 0A 3D C7
0190 | EF 92 F9 60 DE F0 2D 64 05 6D AC 3D 31 A8 B5 95
01A0 | 09 51 39 03 5A 81 57 79 E0 BF B1 BF 19 D6 95 43
01B0 | F3 D6 F1 72 A8 DF 15 46 CD 69 58 FE 63 61 59 C5
01C0 | CD 10 48 13 B5 72 A5 9B 6B E0 AA C3 8A 26 49 B0
01D0 | 8F D6 BD A5 B1 AA 5C F0 42 C0 C5 7D 60 69 5B 35
01E0 | 22 E1 D8 41 CE 34 44 C9 30 FF D5 D6 9E A4 3F 76
01F0 | AB 87 03 7F 7E A9 29 FD F8 0D 36 28 4B C9 74 E5
0200 | 3A BF 5D 32 20 45 B5 56 96 4A BD 42 F1 BF 62 AA
0210 | 5D 78 43 EC 11 69 C7 AC 71 44 13 AB AA 4B B5 6A
0220 | EB 5C EE 9A 0C 98 B0 DD 38 5C BF D0 EA 68 8B 25
0230 | F2 4E 8F 1C 53 BE 8E FF B9 EC 43 E5 E0 35 0B B4
0240 | 69 56 D0 C7 FF 5F E1 F8 16 8A EA 5B A5 6B CA ED
0250 | CC B6 60 7C 6B 2E 6F ED B6 EA C9 34 3E 36 D6 4D
0260 | 10 60 CB 56 4B 2B 27 DA A4 37 27 37 79 C3 EA 45
0270 | 50 CA C5 66 C6 79 EA 07 01 3C C8 CD A4 E4 29 92
0280 | 11 02 C3 5D 5E 24 FB D1 94 41 C8 66</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 = DAB834055781E41EA6A1AB7A455298F68CD372DB39D83DD17D29D8B90
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01D045F2B02BAD66</code></td>
<td><code>01A0D3920CF6AD66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>78020000</code> (632 in decimal)</td>
<td><code>D0020000</code> (720 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = DAB834055781E41EA6A1AB7A455298F68CD372DB39D83DD17D29D8B90
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>8291BFCD2A9A38CEF5EBEE6CAD60F463</code></td>
<td><code>F0ACA29EDDB1896029314F12DB62CD21</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>A1EEAF500BC30D41097756B42D34DE4D</code></td>
<td><code>8376EE2E1C636759F46E2E730E2E6EC7</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200890C30D826068A80A71907E4</code> <code>5D173E47570B28ED488DD0EBC210392D</code> <code>7999D18D1110DB6500419B5BB58A11D0</code> <code>63112299E87EC0E4497FC6139D55CB4E</code> <code>598E1C92FB77DA96615C2234475BE361</code> <code>5D9E79826EAEE485DD2D30221868668E</code> <code>9BA9D6621930DF0EA2D444F4B2007558</code> <code>67EC8298F486679777BA825C0A019760</code> <code>BDCD28FF79E7C9A4D37026BEBDA09DF0</code> <code>D6EFB0AAFC70C7D0A72FA5FAA072EABB</code> <code>EE226CFA81E414F5E14B18995071A90B</code> <code>4BAD6C8551ABAF69F670198D290149FF</code> <code>98E3CCD06A8E22339182D042DECAFB01</code> <code>1F434421363F63ACDB41A80F05EBDE43</code> <code>F519507D0E7B05B1E6CA23759F62BCE5</code> <code>1EB0B4FD7A75C9AAA836C0311AC19064</code> <code>BF5BE6CE412EE182C3413EC6F75C5784</code> <code>7E1B559F6B9C1A0A8603A413FCCD4537</code> <code>F1D141DB996947ADC2E449A2E7FDBBA5</code> <code>569CD307FD3C3F6C34B59BCCC0D40EF1</code> <code>29B9B7FFAE60B5A432FDBF66A747D618</code> <code>A9A13D314CB95A5ABE533D6026BF92C0</code> <code>938DC3DBE7B0713E09BE938544EACC85</code> <code>D33D39CD8F2FC4FAFB52D0D0756E366E</code> <code>354DC3F04DEB6D695060100EB4BCF66A</code> <code>049211A73DAC4E2E94E97519CA0E7A78</code> <code>F71C49E8046E648044CA50C93F2FFB12</code> <code>32A27BFBD7D3BB3A4B200888E11A680A</code> <code>A9B63FCB79D79A5E78EFDA6F95FF0CA9</code> <code>63A23CB341F047342A0D8AB4E3EB51E8</code> <code>171FDD3D8AB056C2BEA454E360AEF3D2</code> <code>12724F34A1E92F4C7727D354F88F6B2F</code> <code>13A1A86129F3082C9EC2242C67579B71</code> <code>3356777A7EEE19C75234CD2647C8B8F0</code> <code>5035CAF4079922C04C1CD40B731D4087</code> <code>578627CE44EC046706919E6B384F8AD9</code> <code>B59ED589A2512BA57526B6DEEAB5B9FA</code><br> <code>4F635211</code></td>
<td><code>FE500200ADEFFE9637BBDFB639EDFDCE</code> <code>098D223C206C5504A13A67FFE499404D</code> <code>4CB33417A2753AA0702A0FBE62333533</code> <code>F1BB27A0C3C043F97FA67A94EE3EA77C</code> <code>D71917145F963C43EFCFB48281F96C2A</code> <code>778F93879614647D8BBFAC2CB9487377</code> <code>64634BCA6F8A4E75AA982925EF60ADCE</code> <code>AB3A29EAD2AD4C79AEC294A20CFBD3D0</code> <code>A7177520113E6EF297B94CFF0C120FA7</code> <code>A23F63DFDDC078D1DB5E4525CFACE8A0</code> <code>0E1CAFF93E83F8492B2D79F2FC82E4F6</code> <code>0F6A494CE9330B409D5BDBB2A594BAC1</code> <code>134014024F7E94998E6A82A58F5854CF</code> <code>73B3647C33A935E73CB1BACFB757695D</code> <code>E7E6B6C41D58EBAD4727B55CD0264268</code> <code>58E360CC4BFB44053DD481C8B029BADF</code> <code>19030F36FFB67DB126D0D2196FA1BAA3</code> <code>F06E4747564A944C79CC7A012F611C28</code> <code>934E61615499F540D9D7BEEEA8A4C1F1</code> <code>7E4BD0D874B1D8BD1DE15F70FC4E4DD8</code> <code>E85D2652DABEBEB851BB372FD34C7686</code> <code>C0778EBF060A3DC7EF92F960DEF02D64</code> <code>056DAC3D31A8B595095139035A815779</code> <code>E0BFB1BF19D69543F3D6F172A8DF1546</code> <code>CD6958FE636159C5CD104813B572A59B</code> <code>6BE0AAC38A2649B08FD6BDA5B1AA5CF0</code> <code>42C0C57D60695B3522E1D841CE3444C9</code> <code>30FFD5D69EA43F76AB87037F7EA929FD</code> <code>F80D36284BC974E53ABF5D322045B556</code> <code>964ABD42F1BF62AA5D7843EC1169C7AC</code> <code>714413ABAA4BB56AEB5CEE9A0C98B0DD</code> <code>385CBFD0EA688B25F24E8F1C53BE8EFF</code> <code>B9EC43E5E0350BB46956D0C7FF5FE1F8</code> <code>168AEA5BA56BCAEDCCB6607C6B2E6FED</code> <code>B6EAC9343E36D64D1060CB564B2B27DA</code> <code>A437273779C3EA4550CAC566C679EA07</code> <code>013CC8CDA4E429921102C35D5E24FBD1</code><br> <code>9441C866</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = DAB834055781E41EA6A1AB7A455298F68CD372DB39D83DD17D29D8B90
<!-- 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 = 890C30D826068A80A71907E45D173E47570B28ED488DD0EBC210392D7999D18D1110DB6500419B5BB58A11D063112299E87EC0E4497FC6139D55CB4E598E1C92FB77DA96615C2234475BE3615D9E79826EAEE485DD2D30221868668E9BA9D6621930DF0EA2D444F4B200755867EC8298F486679777BA825C0A019760BDCD28FF79E7C9A4D37026BEBDA09DF0D6EFB0AAFC70C7D0A72FA5FAA072EABBEE226CFA81E414F5E14B18995071A90B4BAD6C8551ABAF69F670198D290149FF98E3CCD06A8E22339182D042DECAFB011F434421363F63ACDB41A80F05EBDE43F519507D0E7B05B1E6CA23759F62BCE51EB0B4FD7A75C9AAA836C0311AC19064BF5BE6CE412EE182C3413EC6F75C57847E1B559F6B9C1A0A8603A413FCCD4537F1D141DB996947ADC2E449A2E7FDBBA5569CD307FD3C3F6C34B59BCCC0D40EF129B9B7FFAE60B5A432FDBF66A747D618A9A13D314CB95A5ABE533D6026BF92C0938DC3DBE7B0713E09BE938544EACC85D33D39CD8F2FC4FAFB52D0D0756E366E354DC3F04DEB6D695060100EB4BCF66A049211A73DAC4E2E94E97519CA0E7A78F71C49E8046E648044CA50C93F2FFB1232A27BFBD7D3BB3A4B200888E11A680AA9B63FCB79D79A5E78EFDA6F95FF0CA963A23CB341F047342A0D8AB4E3EB51E8171FDD3D8AB056C2BEA454E360AEF3D212724F34A1E92F4C7727D354F88F6B2F13A1A86129F3082C9EC2242C67579B713356777A7EEE19C75234CD2647C8B8F05035CAF4079922C04C1CD40B731D4087578627CE44EC046706919E6B384F8AD9B59ED589A2512BA57526B6DEEAB5B9FA4F635211
tmp_aes_key = 6D848880E69F68B2DCF8956FADABFA6670B22AD2FA517E2DE6D304C85C9037E7
tmp_aes_iv = F53CBAADFD57CD5DA787712E20BFAA9A7EE079C06825E4DE074FAAD1E0FD6FAF</code></pre>
<pre><code>encrypted_answer = ADEFFE9637BBDFB639EDFDCE098D223C206C5504A13A67FFE499404D4CB33417A2753AA0702A0FBE62333533F1BB27A0C3C043F97FA67A94EE3EA77CD71917145F963C43EFCFB48281F96C2A778F93879614647D8BBFAC2CB948737764634BCA6F8A4E75AA982925EF60ADCEAB3A29EAD2AD4C79AEC294A20CFBD3D0A7177520113E6EF297B94CFF0C120FA7A23F63DFDDC078D1DB5E4525CFACE8A00E1CAFF93E83F8492B2D79F2FC82E4F60F6A494CE9330B409D5BDBB2A594BAC1134014024F7E94998E6A82A58F5854CF73B3647C33A935E73CB1BACFB757695DE7E6B6C41D58EBAD4727B55CD026426858E360CC4BFB44053DD481C8B029BADF19030F36FFB67DB126D0D2196FA1BAA3F06E4747564A944C79CC7A012F611C28934E61615499F540D9D7BEEEA8A4C1F17E4BD0D874B1D8BD1DE15F70FC4E4DD8E85D2652DABEBEB851BB372FD34C7686C0778EBF060A3DC7EF92F960DEF02D64056DAC3D31A8B595095139035A815779E0BFB1BF19D69543F3D6F172A8DF1546CD6958FE636159C5CD104813B572A59B6BE0AAC38A2649B08FD6BDA5B1AA5CF042C0C57D60695B3522E1D841CE3444C930FFD5D69EA43F76AB87037F7EA929FDF80D36284BC974E53ABF5D322045B556964ABD42F1BF62AA5D7843EC1169C7AC714413ABAA4BB56AEB5CEE9A0C98B0DD385CBFD0EA688B25F24E8F1C53BE8EFFB9EC43E5E0350BB46956D0C7FF5FE1F8168AEA5BA56BCAEDCCB6607C6B2E6FEDB6EAC9343E36D64D1060CB564B2B27DAA437273779C3EA4550CAC566C679EA07013CC8CDA4E429921102C35D5E24FBD19441C866
tmp_aes_key = 8634B5B575895BB3222A82D51134822E39AF5B7980C38A8C69B2CC5A99BB75F8
tmp_aes_iv = D80196DAD8E089E3845420D104466664471C270AAD44A0C1D02D09226DF478EF</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 1549CE96572BA03A35EF560F6EC58EC2D9851823BA0D89B58291BFCD2A9A38CEF5EBEE6CAD60F463A1EEAF500BC30D41097756B42D34DE4D03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001000A9322F43BC15A8C0AF7F41311899555F92420BA08DA07B79E3E9DCD12C19A700D60D5DCA48260651A90F586D49E5BED116CCEA6EF35412F6EE5E9DC9DE04235851A3D997B093803B12BB68AE0C36A9DD7B73AE3061B02B42B999613E178BBA7E7920700F6FF8AA1BEC34D2A6AFCA1242A2661DEB61D2EA15A4A9C4738E494D22627C4BCEE44E9D344C9E48E600D1387FDA1699F4A0FF1D7D3D18F60131101F3B9C41B0C91EC1D3D7A28E25CDBEBDEB274539996171F0C8D0B117C65F5E6AF799B772EFE062AA3EEA195B5B4663570C83B26AD596020ED27C85AA31EC1EE3AC0A11FBEA062E044A386D6D82009BE96504DAE4354529DAB9794D514BCC5CBD801B02BAD6683C513BE6E3A9F89
answer = BA0D89B58291BFCD2A9A38CEF5EBEE6CAD60F463A1EEAF500BC30D41097756B42D34DE4D03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001000A9322F43BC15A8C0AF7F41311899555F92420BA08DA07B79E3E9DCD12C19A700D60D5DCA48260651A90F586D49E5BED116CCEA6EF35412F6EE5E9DC9DE04235851A3D997B093803B12BB68AE0C36A9DD7B73AE3061B02B42B999613E178BBA7E7920700F6FF8AA1BEC34D2A6AFCA1242A2661DEB61D2EA15A4A9C4738E494D22627C4BCEE44E9D344C9E48E600D1387FDA1699F4A0FF1D7D3D18F60131101F3B9C41B0C91EC1D3D7A28E25CDBEBDEB274539996171F0C8D0B117C65F5E6AF799B772EFE062AA3EEA195B5B4663570C83B26AD596020ED27C85AA31EC1EE3AC0A11FBEA062E044A386D6D82009BE96504DAE4354529DAB9794D514BCC5CBD801B02BAD6683C513BE6E3A9F89</code></pre>
<pre><code>answer_with_hash = 61EC5F0CF1AE9AAAC1F9B8C3BD98C9C6EF88FB20BA0D89B5F0ACA29EDDB1896029314F12DB62CD218376EE2E1C636759F46E2E730E2E6EC703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010064742883AE847796873D5C9CBE20D6596437737F7D2CF2DCE49F3592EC16ED1316357BFC3E536D8DB852D879EA0F11AD292D86E56167788D53D562BFF6F8455871B81E0E15432CF99051EF92A4C1C9E0761FBADC22664B8594F116109818FD6801B2B385949FE0DAEF266CE093046759DB29BC4593F4821780170F8F04A7172F6BBDFDA4AC2482B14AAFAC815DA8F2C262C38009F6F3CABB6EFADED2022728DB909DC9B1803D36DA3487E17307BA3CD5F38CAA08147C8989ACE4041899A7ABE27AF8194F34BA64C4ADC714135571A26746A870CF283822C5D6BA0FEE962DEC61EACA32637FDD30ECB8C73EFAD5C9B307215379FF889299074D92B9D8F154F49B0CF6AD6695DC5A732F9B3982
answer = BA0D89B5F0ACA29EDDB1896029314F12DB62CD218376EE2E1C636759F46E2E730E2E6EC703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010064742883AE847796873D5C9CBE20D6596437737F7D2CF2DCE49F3592EC16ED1316357BFC3E536D8DB852D879EA0F11AD292D86E56167788D53D562BFF6F8455871B81E0E15432CF99051EF92A4C1C9E0761FBADC22664B8594F116109818FD6801B2B385949FE0DAEF266CE093046759DB29BC4593F4821780170F8F04A7172F6BBDFDA4AC2482B14AAFAC815DA8F2C262C38009F6F3CABB6EFADED2022728DB909DC9B1803D36DA3487E17307BA3CD5F38CAA08147C8989ACE4041899A7ABE27AF8194F34BA64C4ADC714135571A26746A870CF283822C5D6BA0FEE962DEC61EACA32637FDD30ECB8C73EFAD5C9B307215379FF889299074D92B9D8F154F49B0CF6AD6695DC5A732F9B3982</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 82 91 BF CD 2A 9A 38 CE F5 EB EE 6C
0010 | AD 60 F4 63 A1 EE AF 50 0B C3 0D 41 09 77 56 B4
0020 | 2D 34 DE 4D 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 F0 AC A2 9E DD B1 89 60 29 31 4F 12
0010 | DB 62 CD 21 83 76 EE 2E 1C 63 67 59 F4 6E 2E 73
0020 | 0E 2E 6E C7 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 = BA0D89B58291BFCD2A9A38CEF5EBEE6CAD60F463A1EEAF500BC30D41097756B42D34DE4
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 | 0A 93 22 F4 3B C1 5A 8C 0A F7 F4 13 11 89 95 55
0140 | F9 24 20 BA 08 DA 07 B7 9E 3E 9D CD 12 C1 9A 70
0150 | 0D 60 D5 DC A4 82 60 65 1A 90 F5 86 D4 9E 5B ED
0160 | 11 6C CE A6 EF 35 41 2F 6E E5 E9 DC 9D E0 42 35
0170 | 85 1A 3D 99 7B 09 38 03 B1 2B B6 8A E0 C3 6A 9D
0180 | D7 B7 3A E3 06 1B 02 B4 2B 99 96 13 E1 78 BB A7
0190 | E7 92 07 00 F6 FF 8A A1 BE C3 4D 2A 6A FC A1 24
01A0 | 2A 26 61 DE B6 1D 2E A1 5A 4A 9C 47 38 E4 94 D2
01B0 | 26 27 C4 BC EE 44 E9 D3 44 C9 E4 8E 60 0D 13 87
01C0 | FD A1 69 9F 4A 0F F1 D7 D3 D1 8F 60 13 11 01 F3
01D0 | B9 C4 1B 0C 91 EC 1D 3D 7A 28 E2 5C DB EB DE B2
01E0 | 74 53 99 96 17 1F 0C 8D 0B 11 7C 65 F5 E6 AF 79
01F0 | 9B 77 2E FE 06 2A A3 EE A1 95 B5 B4 66 35 70 C8
0200 | 3B 26 AD 59 60 20 ED 27 C8 5A A3 1E C1 EE 3A C0
0210 | A1 1F BE A0 62 E0 44 A3 86 D6 D8 20 09 BE 96 50
0220 | 4D AE 43 54 52 9D AB 97 94 D5 14 BC C5 CB D8 01
0230 | B0 2B AD 66</code></pre>
0130 | 64 74 28 83 AE 84 77 96 87 3D 5C 9C BE 20 D6 59
0140 | 64 37 73 7F 7D 2C F2 DC E4 9F 35 92 EC 16 ED 13
0150 | 16 35 7B FC 3E 53 6D 8D B8 52 D8 79 EA 0F 11 AD
0160 | 29 2D 86 E5 61 67 78 8D 53 D5 62 BF F6 F8 45 58
0170 | 71 B8 1E 0E 15 43 2C F9 90 51 EF 92 A4 C1 C9 E0
0180 | 76 1F BA DC 22 66 4B 85 94 F1 16 10 98 18 FD 68
0190 | 01 B2 B3 85 94 9F E0 DA EF 26 6C E0 93 04 67 59
01A0 | DB 29 BC 45 93 F4 82 17 80 17 0F 8F 04 A7 17 2F
01B0 | 6B BD FD A4 AC 24 82 B1 4A AF AC 81 5D A8 F2 C2
01C0 | 62 C3 80 09 F6 F3 CA BB 6E FA DE D2 02 27 28 DB
01D0 | 90 9D C9 B1 80 3D 36 DA 34 87 E1 73 07 BA 3C D5
01E0 | F3 8C AA 08 14 7C 89 89 AC E4 04 18 99 A7 AB E2
01F0 | 7A F8 19 4F 34 BA 64 C4 AD C7 14 13 55 71 A2 67
0200 | 46 A8 70 CF 28 38 22 C5 D6 BA 0F EE 96 2D EC 61
0210 | EA CA 32 63 7F DD 30 EC B8 C7 3E FA D5 C9 B3 07
0220 | 21 53 79 FF 88 92 99 07 4D 92 B9 D8 F1 54 F4 9B
0230 | 0C F6 AD 66</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 = BA0D89B58291BFCD2A9A38CEF5EBEE6CAD60F463A1EEAF500BC30D41097756B42D34DE4
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>8291BFCD2A9A38CEF5EBEE6CAD60F463</code></td>
<td><code>F0ACA29EDDB1896029314F12DB62CD21</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>A1EEAF500BC30D41097756B42D34DE4D</code></td>
<td><code>8376EE2E1C636759F46E2E730E2E6EC7</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B58291BFCD2A9A38CEF5EBEE6CAD60F463A1EEAF500BC30D41097756B42D34DE4
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE0001000A9322F43BC15A8C0AF7F413</code> <code>11899555F92420BA08DA07B79E3E9DCD</code> <code>12C19A700D60D5DCA48260651A90F586</code> <code>D49E5BED116CCEA6EF35412F6EE5E9DC</code> <code>9DE04235851A3D997B093803B12BB68A</code> <code>E0C36A9DD7B73AE3061B02B42B999613</code> <code>E178BBA7E7920700F6FF8AA1BEC34D2A</code> <code>6AFCA1242A2661DEB61D2EA15A4A9C47</code> <code>38E494D22627C4BCEE44E9D344C9E48E</code> <code>600D1387FDA1699F4A0FF1D7D3D18F60</code> <code>131101F3B9C41B0C91EC1D3D7A28E25C</code> <code>DBEBDEB274539996171F0C8D0B117C65</code> <code>F5E6AF799B772EFE062AA3EEA195B5B4</code> <code>663570C83B26AD596020ED27C85AA31E</code> <code>C1EE3AC0A11FBEA062E044A386D6D820</code> <code>09BE96504DAE4354529DAB9794D514BC</code><br> <code>C5CBD801</code></td>
<td><code>FE00010064742883AE847796873D5C9C</code> <code>BE20D6596437737F7D2CF2DCE49F3592</code> <code>EC16ED1316357BFC3E536D8DB852D879</code> <code>EA0F11AD292D86E56167788D53D562BF</code> <code>F6F8455871B81E0E15432CF99051EF92</code> <code>A4C1C9E0761FBADC22664B8594F11610</code> <code>9818FD6801B2B385949FE0DAEF266CE0</code> <code>93046759DB29BC4593F4821780170F8F</code> <code>04A7172F6BBDFDA4AC2482B14AAFAC81</code> <code>5DA8F2C262C38009F6F3CABB6EFADED2</code> <code>022728DB909DC9B1803D36DA3487E173</code> <code>07BA3CD5F38CAA08147C8989ACE40418</code> <code>99A7ABE27AF8194F34BA64C4ADC71413</code> <code>5571A26746A870CF283822C5D6BA0FEE</code> <code>962DEC61EACA32637FDD30ECB8C73EFA</code> <code>D5C9B307215379FF889299074D92B9D8</code><br> <code>F154F49B</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>B02BAD66</code> (1722624944 in decimal)</td>
<td><code>0CF6AD66</code> (1722676748 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B58291BFCD2A9A38CEF5EBEE6CAD60F463A1EEAF500BC30D41097756B42D34DE4
<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 = ECC62DE6CA382AA921460B5A4D2392808E7FCDB0CAA212113D10E3882BCAE0B6F259E3D7E2F406694590CA60C472240702F2B40F0A09A51843367F6CECCB4F4815B3F90011915FF9267116BAD195860FCAF6E4B27A20E196C95FED261E4D6C0B40FF15D4318E5710357DD9EAB8C3683C0134BE9C415B83518EA585DEDABE89AD7C0EBC39E28432E4954C42B69EBEAF1919F3A203A5E7184605D91D95D07A92792E1201DCAB3F0882CC4285D6185D515A90F39C9B54CCB847263B772F71594DC852F41CE9FF3C9CA0A8C4BF54336A946F0CCE02BB8BC33EE10F85610A4954F1F8452B704F3BB11C83C3E53AB52185B22BD01E6EC98FE77E8FC770CA82A79E98F3</code></pre>
<pre><code>b = 3A2498FB54437CFDDE53CA8594C530099D5764323CC4F3DD14B284C3A5B1F7046C3E64AA735FCD34AB6A974ACE2AB74D804945E141A9C52C2F2CB2A6BCD4E014AA1AE45254B00709FE3AB02EF94634607C178ECF777A9E11D4B70538133387C8EF5676125B97416A6B18916AED91C309EE10EBBDF4A3055E17100A9512D56C5D99FA1B840C5728AD92A39A539DCEDA500C040DCAF1735492B6977568FFB66C781258351793368C58824F1D168DD601116FBD6386696FB3852BE78599AA5CB934698B6EDE651A8277CB1DD2BA53F30C45E53EBB634D195B00EDD17B665ADF3F69DA1CF84952A1AAEC46AA7D9BD366C3C373446DAE905BDBDDBDA5D7C0BB04AF88</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 = A5562D78CDE79D9C8BFB9732B939B00A7F5783C7653775BF92CA7376A4ED7E445A48EC4DB8DBE741FE02A8A3E5577990A668B80DE7066D6BA7AE53C1FA9C71331A22AF5F9837A9D1555CF55FA5AC245F0AE3CEDDB86F6795743BEA444A8242FC7D62E777AF350F55F9A03A6610BD302FA9B52EC2700EE1814501C15BBCFD8105F54E48835BE72D099010069ECD40193519D1D43705A52B55D4E4E1ADE192746A817FCCAA4462017E4EA9377B23ECDC4513C5E8E622EBCC601F64B903036EEF680ADC7BE8B530EE514B7D1F55AA7531AE849E0AA178B1D0F56C2C20FD4DA92E830150FBE272714F73788208832BDB0DA4AEC617C3170EAE75BD9CFB7592E594E6</code></pre>
<pre><code>g_b = 90297F04CFBED9CE1BA3A89945D7B51226393CBCBC6F919FF6C75F90BCB7BC2D2F701122970F36778AF8E1BFF3A8EAD277B3268B7BAD14E5914649E6B0104BA2BBE0E8D2B08C947ECED000962F9BB67E95F3729383192B2071E9C06B5802FE474DDB3CE2936DCB1F557838B94C3003B984CD07FF5D1857E36A7322C53DF59EC2C975CB339AE2CE7578E14567A138A5089BE60C4C0090E8946E984199B5F62B0C5E2038CD4FD70D63B9408B79D7F75DBF2B35E170B274126695E035482C0108A85BDA10802DEEA7E863064B14499F6B2104D46DDDB41CE2239EE70C8E404B10C6CD00749D785BDFDC83BBAD39CBFE6917529EE5FDB438888D288975B86F7D24E7</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 82 91 BF CD 2A 9A 38 CE F5 EB EE 6C
0010 | AD 60 F4 63 A1 EE AF 50 0B C3 0D 41 09 77 56 B4
0020 | 2D 34 DE 4D 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | A5 56 2D 78 CD E7 9D 9C 8B FB 97 32 B9 39 B0 0A
0040 | 7F 57 83 C7 65 37 75 BF 92 CA 73 76 A4 ED 7E 44
0050 | 5A 48 EC 4D B8 DB E7 41 FE 02 A8 A3 E5 57 79 90
0060 | A6 68 B8 0D E7 06 6D 6B A7 AE 53 C1 FA 9C 71 33
0070 | 1A 22 AF 5F 98 37 A9 D1 55 5C F5 5F A5 AC 24 5F
0080 | 0A E3 CE DD B8 6F 67 95 74 3B EA 44 4A 82 42 FC
0090 | 7D 62 E7 77 AF 35 0F 55 F9 A0 3A 66 10 BD 30 2F
00A0 | A9 B5 2E C2 70 0E E1 81 45 01 C1 5B BC FD 81 05
00B0 | F5 4E 48 83 5B E7 2D 09 90 10 06 9E CD 40 19 35
00C0 | 19 D1 D4 37 05 A5 2B 55 D4 E4 E1 AD E1 92 74 6A
00D0 | 81 7F CC AA 44 62 01 7E 4E A9 37 7B 23 EC DC 45
00E0 | 13 C5 E8 E6 22 EB CC 60 1F 64 B9 03 03 6E EF 68
00F0 | 0A DC 7B E8 B5 30 EE 51 4B 7D 1F 55 AA 75 31 AE
0100 | 84 9E 0A A1 78 B1 D0 F5 6C 2C 20 FD 4D A9 2E 83
0110 | 01 50 FB E2 72 71 4F 73 78 82 08 83 2B DB 0D A4
0120 | AE C6 17 C3 17 0E AE 75 BD 9C FB 75 92 E5 94 E6</code></pre>
<pre><code>0000 | 54 B6 43 66 F0 AC A2 9E DD B1 89 60 29 31 4F 12
0010 | DB 62 CD 21 83 76 EE 2E 1C 63 67 59 F4 6E 2E 73
0020 | 0E 2E 6E C7 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 90 29 7F 04 CF BE D9 CE 1B A3 A8 99 45 D7 B5 12
0040 | 26 39 3C BC BC 6F 91 9F F6 C7 5F 90 BC B7 BC 2D
0050 | 2F 70 11 22 97 0F 36 77 8A F8 E1 BF F3 A8 EA D2
0060 | 77 B3 26 8B 7B AD 14 E5 91 46 49 E6 B0 10 4B A2
0070 | BB E0 E8 D2 B0 8C 94 7E CE D0 00 96 2F 9B B6 7E
0080 | 95 F3 72 93 83 19 2B 20 71 E9 C0 6B 58 02 FE 47
0090 | 4D DB 3C E2 93 6D CB 1F 55 78 38 B9 4C 30 03 B9
00A0 | 84 CD 07 FF 5D 18 57 E3 6A 73 22 C5 3D F5 9E C2
00B0 | C9 75 CB 33 9A E2 CE 75 78 E1 45 67 A1 38 A5 08
00C0 | 9B E6 0C 4C 00 90 E8 94 6E 98 41 99 B5 F6 2B 0C
00D0 | 5E 20 38 CD 4F D7 0D 63 B9 40 8B 79 D7 F7 5D BF
00E0 | 2B 35 E1 70 B2 74 12 66 95 E0 35 48 2C 01 08 A8
00F0 | 5B DA 10 80 2D EE A7 E8 63 06 4B 14 49 9F 6B 21
0100 | 04 D4 6D DD B4 1C E2 23 9E E7 0C 8E 40 4B 10 C6
0110 | CD 00 74 9D 78 5B DF DC 83 BB AD 39 CB FE 69 17
0120 | 52 9E E5 FD B4 38 88 8D 28 89 75 B8 6F 7D 24 E7</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 = BA0D89B58291BFCD2A9A38CEF5EBEE6CAD60F463A1EEAF500BC30D41097756B42D34DE4
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>8291BFCD2A9A38CEF5EBEE6CAD60F463</code></td>
<td><code>F0ACA29EDDB1896029314F12DB62CD21</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>A1EEAF500BC30D41097756B42D34DE4D</code></td>
<td><code>8376EE2E1C636759F46E2E730E2E6EC7</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE000100A5562D78CDE79D9C8BFB9732</code> <code>B939B00A7F5783C7653775BF92CA7376</code> <code>A4ED7E445A48EC4DB8DBE741FE02A8A3</code> <code>E5577990A668B80DE7066D6BA7AE53C1</code> <code>FA9C71331A22AF5F9837A9D1555CF55F</code> <code>A5AC245F0AE3CEDDB86F6795743BEA44</code> <code>4A8242FC7D62E777AF350F55F9A03A66</code> <code>10BD302FA9B52EC2700EE1814501C15B</code> <code>BCFD8105F54E48835BE72D099010069E</code> <code>CD40193519D1D43705A52B55D4E4E1AD</code> <code>E192746A817FCCAA4462017E4EA9377B</code> <code>23ECDC4513C5E8E622EBCC601F64B903</code> <code>036EEF680ADC7BE8B530EE514B7D1F55</code> <code>AA7531AE849E0AA178B1D0F56C2C20FD</code> <code>4DA92E830150FBE272714F7378820883</code> <code>2BDB0DA4AEC617C3170EAE75BD9CFB75</code><br> <code>92E594E6</code></td>
<td><code>FE00010090297F04CFBED9CE1BA3A899</code> <code>45D7B51226393CBCBC6F919FF6C75F90</code> <code>BCB7BC2D2F701122970F36778AF8E1BF</code> <code>F3A8EAD277B3268B7BAD14E5914649E6</code> <code>B0104BA2BBE0E8D2B08C947ECED00096</code> <code>2F9BB67E95F3729383192B2071E9C06B</code> <code>5802FE474DDB3CE2936DCB1F557838B9</code> <code>4C3003B984CD07FF5D1857E36A7322C5</code> <code>3DF59EC2C975CB339AE2CE7578E14567</code> <code>A138A5089BE60C4C0090E8946E984199</code> <code>B5F62B0C5E2038CD4FD70D63B9408B79</code> <code>D7F75DBF2B35E170B274126695E03548</code> <code>2C0108A85BDA10802DEEA7E863064B14</code> <code>499F6B2104D46DDDB41CE2239EE70C8E</code> <code>404B10C6CD00749D785BDFDC83BBAD39</code> <code>CBFE6917529EE5FDB438888D288975B8</code><br> <code>6F7D24E7</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 = BA0D89B58291BFCD2A9A38CEF5EBEE6CAD60F463A1EEAF500BC30D41097756B42D34DE4
<!-- 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 = 54B643668291BFCD2A9A38CEF5EBEE6CAD60F463A1EEAF500BC30D41097756B42D34DE4D0000000000000000FE000100A5562D78CDE79D9C8BFB9732B939B00A7F5783C7653775BF92CA7376A4ED7E445A48EC4DB8DBE741FE02A8A3E5577990A668B80DE7066D6BA7AE53C1FA9C71331A22AF5F9837A9D1555CF55FA5AC245F0AE3CEDDB86F6795743BEA444A8242FC7D62E777AF350F55F9A03A6610BD302FA9B52EC2700EE1814501C15BBCFD8105F54E48835BE72D099010069ECD40193519D1D43705A52B55D4E4E1ADE192746A817FCCAA4462017E4EA9377B23ECDC4513C5E8E622EBCC601F64B903036EEF680ADC7BE8B530EE514B7D1F55AA7531AE849E0AA178B1D0F56C2C20FD4DA92E830150FBE272714F73788208832BDB0DA4AEC617C3170EAE75BD9CFB7592E594E6
padding = 3E72C6297A21CAC75CA2CB11
tmp_aes_key = 6D848880E69F68B2DCF8956FADABFA6670B22AD2FA517E2DE6D304C85C9037E7
tmp_aes_iv = F53CBAADFD57CD5DA787712E20BFAA9A7EE079C06825E4DE074FAAD1E0FD6FAF</code></pre>
<pre><code>data = 54B64366F0ACA29EDDB1896029314F12DB62CD218376EE2E1C636759F46E2E730E2E6EC70000000000000000FE00010090297F04CFBED9CE1BA3A89945D7B51226393CBCBC6F919FF6C75F90BCB7BC2D2F701122970F36778AF8E1BFF3A8EAD277B3268B7BAD14E5914649E6B0104BA2BBE0E8D2B08C947ECED000962F9BB67E95F3729383192B2071E9C06B5802FE474DDB3CE2936DCB1F557838B94C3003B984CD07FF5D1857E36A7322C53DF59EC2C975CB339AE2CE7578E14567A138A5089BE60C4C0090E8946E984199B5F62B0C5E2038CD4FD70D63B9408B79D7F75DBF2B35E170B274126695E035482C0108A85BDA10802DEEA7E863064B14499F6B2104D46DDDB41CE2239EE70C8E404B10C6CD00749D785BDFDC83BBAD39CBFE6917529EE5FDB438888D288975B86F7D24E7
padding = C5DCECD2014C582EE6132DF6
tmp_aes_key = 8634B5B575895BB3222A82D51134822E39AF5B7980C38A8C69B2CC5A99BB75F8
tmp_aes_iv = D80196DAD8E089E3845420D104466664471C270AAD44A0C1D02D09226DF478EF</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 = 896CD15E5BD7D97ACF6D62726F22C7347401FB362966ED17F14C59E3C391EDDE598E058692ABF10A20C0E4C5A9FA6009005CCBDF4146F658AC01C5DEBF5C790E0714E27F6EA124AD6C8BB1F78F40B2132B7789BDCCA32290161D628F583324B1E4ADD666BC50C79DDC1126043009CA36446B0692424A51E8609B738C316825BEBC27AC78485DF524E9D1F1E060AB6322FCB2BC2485164022E664693D4591245951CE83B649F9C3D8CB7BFAAF7D7C6FCCC241D3C4599FA792C3C5FD422946759B8F6FA25960BF67A7291F041F1447024B16EAD2363635A7F9CDA97E07E89C3C6DFB7B7DA7F5CBB48815ECB86CBABA51E248B6DC98276CF71F18DB4701DB79471D24F8A6C4079B1136CD03A8B3E5A4F867088343EC77EC8F1BC9AD253A982D6068CD5528BFDC9FC0C0CCB7B600EA775EA1ED15B21E050434C316CA5EF093D796C50492C84989450B55240456AB155AD5C9</code></pre>
<pre><code>encrypted_data = 26BA265725E6B69D7BE65E8A8CA9CBD03B55C305666D8946477EE8C61C21DDAD5D6CF55B7C903FC2ABAFF0DDD480377C748F7C436B3857E44F3CA0834D373041F2930B97E6B104E73363C7DF08271EABF1362E2F0F6231FECF3C94F12EC0882B777DA19CC40035277A5CFD86285F99B9010B57A662526A9C1A1E68A5DD09BA98A98E4B5A99CDCBA44F944CB75363FC1B6586681182F7AAAC027A45A937C165B8E0ADFE94730C9D287E820E4A6CFFFDEE201E19FDA876DA20DAC5859325375767031C5EAFF6C83756EDA6674E6CA2A14994B85854FAF59EE7D1480CD78AB20767EC603FB9056262C1671D03D42408B3E9CA23BA948C263AC3211C96DA547FE030C069F129526C337C2C3E4B4A882BE11CC1271B09F20906AAAD9095C5F0B646FF673B8EA52D07399B48F5D21C54158BF8E11D66838743B7D9B8C7383A147BD4CB54C5F88B516A8B9938E5187DA0BA5B45</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 C0 92 0A 00 B1 2B AD 66
0010 | 78 01 00 00 1F 5F 04 F5 82 91 BF CD 2A 9A 38 CE
0020 | F5 EB EE 6C AD 60 F4 63 A1 EE AF 50 0B C3 0D 41
0030 | 09 77 56 B4 2D 34 DE 4D FE 50 01 00 89 6C D1 5E
0040 | 5B D7 D9 7A CF 6D 62 72 6F 22 C7 34 74 01 FB 36
0050 | 29 66 ED 17 F1 4C 59 E3 C3 91 ED DE 59 8E 05 86
0060 | 92 AB F1 0A 20 C0 E4 C5 A9 FA 60 09 00 5C CB DF
0070 | 41 46 F6 58 AC 01 C5 DE BF 5C 79 0E 07 14 E2 7F
0080 | 6E A1 24 AD 6C 8B B1 F7 8F 40 B2 13 2B 77 89 BD
0090 | CC A3 22 90 16 1D 62 8F 58 33 24 B1 E4 AD D6 66
00A0 | BC 50 C7 9D DC 11 26 04 30 09 CA 36 44 6B 06 92
00B0 | 42 4A 51 E8 60 9B 73 8C 31 68 25 BE BC 27 AC 78
00C0 | 48 5D F5 24 E9 D1 F1 E0 60 AB 63 22 FC B2 BC 24
00D0 | 85 16 40 22 E6 64 69 3D 45 91 24 59 51 CE 83 B6
00E0 | 49 F9 C3 D8 CB 7B FA AF 7D 7C 6F CC C2 41 D3 C4
00F0 | 59 9F A7 92 C3 C5 FD 42 29 46 75 9B 8F 6F A2 59
0100 | 60 BF 67 A7 29 1F 04 1F 14 47 02 4B 16 EA D2 36
0110 | 36 35 A7 F9 CD A9 7E 07 E8 9C 3C 6D FB 7B 7D A7
0120 | F5 CB B4 88 15 EC B8 6C BA BA 51 E2 48 B6 DC 98
0130 | 27 6C F7 1F 18 DB 47 01 DB 79 47 1D 24 F8 A6 C4
0140 | 07 9B 11 36 CD 03 A8 B3 E5 A4 F8 67 08 83 43 EC
0150 | 77 EC 8F 1B C9 AD 25 3A 98 2D 60 68 CD 55 28 BF
0160 | DC 9F C0 C0 CC B7 B6 00 EA 77 5E A1 ED 15 B2 1E
0170 | 05 04 34 C3 16 CA 5E F0 93 D7 96 C5 04 92 C8 49
0180 | 89 45 0B 55 24 04 56 AB 15 5A D5 C9</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 60 26 0E 00 0C F6 AD 66
0010 | 78 01 00 00 1F 5F 04 F5 F0 AC A2 9E DD B1 89 60
0020 | 29 31 4F 12 DB 62 CD 21 83 76 EE 2E 1C 63 67 59
0030 | F4 6E 2E 73 0E 2E 6E C7 FE 50 01 00 26 BA 26 57
0040 | 25 E6 B6 9D 7B E6 5E 8A 8C A9 CB D0 3B 55 C3 05
0050 | 66 6D 89 46 47 7E E8 C6 1C 21 DD AD 5D 6C F5 5B
0060 | 7C 90 3F C2 AB AF F0 DD D4 80 37 7C 74 8F 7C 43
0070 | 6B 38 57 E4 4F 3C A0 83 4D 37 30 41 F2 93 0B 97
0080 | E6 B1 04 E7 33 63 C7 DF 08 27 1E AB F1 36 2E 2F
0090 | 0F 62 31 FE CF 3C 94 F1 2E C0 88 2B 77 7D A1 9C
00A0 | C4 00 35 27 7A 5C FD 86 28 5F 99 B9 01 0B 57 A6
00B0 | 62 52 6A 9C 1A 1E 68 A5 DD 09 BA 98 A9 8E 4B 5A
00C0 | 99 CD CB A4 4F 94 4C B7 53 63 FC 1B 65 86 68 11
00D0 | 82 F7 AA AC 02 7A 45 A9 37 C1 65 B8 E0 AD FE 94
00E0 | 73 0C 9D 28 7E 82 0E 4A 6C FF FD EE 20 1E 19 FD
00F0 | A8 76 DA 20 DA C5 85 93 25 37 57 67 03 1C 5E AF
0100 | F6 C8 37 56 ED A6 67 4E 6C A2 A1 49 94 B8 58 54
0110 | FA F5 9E E7 D1 48 0C D7 8A B2 07 67 EC 60 3F B9
0120 | 05 62 62 C1 67 1D 03 D4 24 08 B3 E9 CA 23 BA 94
0130 | 8C 26 3A C3 21 1C 96 DA 54 7F E0 30 C0 69 F1 29
0140 | 52 6C 33 7C 2C 3E 4B 4A 88 2B E1 1C C1 27 1B 09
0150 | F2 09 06 AA AD 90 95 C5 F0 B6 46 FF 67 3B 8E A5
0160 | 2D 07 39 9B 48 F5 D2 1C 54 15 8B F8 E1 1D 66 83
0170 | 87 43 B7 D9 B8 C7 38 3A 14 7B D4 CB 54 C5 F8 8B
0180 | 51 6A 8B 99 38 E5 18 7D A0 BA 5B 45</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>C0920A00B12BAD66</code></td>
<td><code>60260E000CF6AD66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 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>8291BFCD2A9A38CEF5EBEE6CAD60F463</code></td>
<td><code>F0ACA29EDDB1896029314F12DB62CD21</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>A1EEAF500BC30D41097756B42D34DE4D</code></td>
<td><code>8376EE2E1C636759F46E2E730E2E6EC7</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100896CD15E5BD7D97ACF6D6272</code> <code>6F22C7347401FB362966ED17F14C59E3</code> <code>C391EDDE598E058692ABF10A20C0E4C5</code> <code>A9FA6009005CCBDF4146F658AC01C5DE</code> <code>BF5C790E0714E27F6EA124AD6C8BB1F7</code> <code>8F40B2132B7789BDCCA32290161D628F</code> <code>583324B1E4ADD666BC50C79DDC112604</code> <code>3009CA36446B0692424A51E8609B738C</code> <code>316825BEBC27AC78485DF524E9D1F1E0</code> <code>60AB6322FCB2BC2485164022E664693D</code> <code>4591245951CE83B649F9C3D8CB7BFAAF</code> <code>7D7C6FCCC241D3C4599FA792C3C5FD42</code> <code>2946759B8F6FA25960BF67A7291F041F</code> <code>1447024B16EAD2363635A7F9CDA97E07</code> <code>E89C3C6DFB7B7DA7F5CBB48815ECB86C</code> <code>BABA51E248B6DC98276CF71F18DB4701</code> <code>DB79471D24F8A6C4079B1136CD03A8B3</code> <code>E5A4F867088343EC77EC8F1BC9AD253A</code> <code>982D6068CD5528BFDC9FC0C0CCB7B600</code> <code>EA775EA1ED15B21E050434C316CA5EF0</code> <code>93D796C50492C84989450B55240456AB</code><br> <code>155AD5C9</code></td>
<td><code>FE50010026BA265725E6B69D7BE65E8A</code> <code>8CA9CBD03B55C305666D8946477EE8C6</code> <code>1C21DDAD5D6CF55B7C903FC2ABAFF0DD</code> <code>D480377C748F7C436B3857E44F3CA083</code> <code>4D373041F2930B97E6B104E73363C7DF</code> <code>08271EABF1362E2F0F6231FECF3C94F1</code> <code>2EC0882B777DA19CC40035277A5CFD86</code> <code>285F99B9010B57A662526A9C1A1E68A5</code> <code>DD09BA98A98E4B5A99CDCBA44F944CB7</code> <code>5363FC1B6586681182F7AAAC027A45A9</code> <code>37C165B8E0ADFE94730C9D287E820E4A</code> <code>6CFFFDEE201E19FDA876DA20DAC58593</code> <code>25375767031C5EAFF6C83756EDA6674E</code> <code>6CA2A14994B85854FAF59EE7D1480CD7</code> <code>8AB20767EC603FB9056262C1671D03D4</code> <code>2408B3E9CA23BA948C263AC3211C96DA</code> <code>547FE030C069F129526C337C2C3E4B4A</code> <code>882BE11CC1271B09F20906AAAD9095C5</code> <code>F0B646FF673B8EA52D07399B48F5D21C</code> <code>54158BF8E11D66838743B7D9B8C7383A</code> <code>147BD4CB54C5F88B516A8B9938E5187D</code><br> <code>A0BA5B45</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 = 899610CDC590BF2CB34BD46C6098072E43779543CFAD667B2DE5A4F785F75E806ED20D5C89625A8E0E6D13A97CCE3EF0923D6DE31BDC722032792FE0FF4F51D59583E766644298EB29FC7728C30106FD2A095E4F4556BB655F6D8E96BB11B5C0DBCD849765C09690FAB6DF692A9BB90FFDBAF98B2052F589D4F54A3F6E823320083A3101E8B417C682CF1C432B8AA58A3C1B0F50589856E75DB38A7338DFFFE1C732CE91A2EE41427C155A58145B2F53B91DA189AFCDC80373F75E6A043358F424A3540CC9B18B7F072250D2DCB8FFF794FCB825FD241599F262BD9E0381420CE586022DC42F12D32E9F11173153C5C5D2211E5C828E0E20497543207AC9F999</code></pre>
<pre><code>auth_key = B3AB5D60CE414D8461090AADA560C4EC7A0B00EB5E3483D58C99E0819A1A202463BD92431CAD3FA9FAFFBAFBF0189476B9D9BA725118D7AA2E6D87B69B357D3DA80EB179261A511E56A6BFE81BC5489A8AC816BF545D1C757151336749E8119646925774EECD3C3F19989391F97EB8B310C69A13333464A153686EFD5F3D9490645791908F4A8FA646E17FBD4548CE04962DCFED11DE7DDCD11AF8AD7F62853D1862DAF878DE9988E55398B4E10105DB2B15408FE6475BB3356E87BEA0880E93E61BDA9C6C8CBB65C952B1D4E4442869C13F9045B2F305574D3E30BDA244C237C0BE4B648F0913D2CD87A15D2C0D872FC0C0DE7A62A1C226729BF96386E3C1EE</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 78 5C 8C B2 2B AD 66
0010 | 94 00 00 00 34 F7 CB 3B 82 91 BF CD 2A 9A 38 CE
0020 | F5 EB EE 6C AD 60 F4 63 A1 EE AF 50 0B C3 0D 41
0030 | 09 77 56 B4 2D 34 DE 4D 00 F0 D0 9C 50 95 F4 06
0040 | 94 ED BD 9D 6C 81 80 02</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 68 66 36 0D F6 AD 66
0010 | 70 00 00 00 34 F7 CB 3B F0 AC A2 9E DD B1 89 60
0020 | 29 31 4F 12 DB 62 CD 21 83 76 EE 2E 1C 63 67 59
0030 | F4 6E 2E 73 0E 2E 6E C7 58 A6 42 1F 01 10 E8 FD
0040 | 11 8B BF 82 46 39 DA 85</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>01785C8CB22BAD66</code></td>
<td><code>016866360DF6AD66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>94000000</code> (148 in decimal)</td>
<td><code>70000000</code> (112 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>8291BFCD2A9A38CEF5EBEE6CAD60F463</code></td>
<td><code>F0ACA29EDDB1896029314F12DB62CD21</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>A1EEAF500BC30D41097756B42D34DE4D</code></td>
<td><code>8376EE2E1C636759F46E2E730E2E6EC7</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>00F0D09C5095F40694EDBD9D6C818002</code></td>
<td><code>58A6421F0110E8FD118BBF824639DA85</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>

View file

@ -753,7 +753,7 @@
</tr>
<tr>
<td><a href="/constructor/updateBusinessBotCallbackQuery">updateBusinessBotCallbackQuery</a></td>
<td> </td>
<td>A callback button sent via a <a href="/api/business#connected-bots">business connection</a> was pressed, and the button data was sent to the bot that created the button.</td>
</tr>
<tr>
<td><a href="/constructor/updateStarsRevenueStatus">updateStarsRevenueStatus</a></td>

View file

@ -587,6 +587,8 @@ i.icon {
right: 0;
top: 0;
z-index: 100;
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
background-color: var(--header-bg-color);
-webkit-backdrop-filter: blur(25px);
backdrop-filter: blur(25px);
@ -937,6 +939,7 @@ a.tm-pagination-item.active:focus {
right: 0;
top: 0;
bottom: 0;
padding-bottom: env(safe-area-inset-bottom);
background: var(--bg-color);
transition: transform var(--def-transition);
}
@ -1135,6 +1138,8 @@ a.tm-menu-link:focus {
}
.tm-footer {
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
background-color: var(--footer-bg-color);
}
.tm-footer-links {
@ -1305,7 +1310,7 @@ a.tm-menu-link:focus {
.tm-main {
margin: 0 auto;
width: 100%;
width: auto;
max-width: 480px;
padding-bottom: 70px;
flex-grow: 1;
@ -3816,6 +3821,9 @@ a.tm-table-action-link:hover {
.tm-main {
max-width: 720px;
box-sizing: content-box;
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
.tm-main-premium {
max-width: 480px;