Update content of files

This commit is contained in:
GitHub Action 2024-07-18 15:52:22 +00:00
parent 0b921af26b
commit 03fbfe8b36
15 changed files with 253 additions and 258 deletions

View file

@ -312,8 +312,8 @@
<li>Added <a href="/constructor/contacts.contactBirthdays">contacts.contactBirthdays</a> - Birthday information of our contacts.</li>
<li>Added <a href="/constructor/inputPrivacyKeyBirthday">inputPrivacyKeyBirthday</a> - Whether the user can see our birthday.</li>
<li>Added <a href="/constructor/privacyKeyBirthday">privacyKeyBirthday</a> - Whether the user can see our birthday.</li>
<li>Added <a href="/constructor/inputPrivacyValueAllowPremium">inputPrivacyValueAllowPremium</a> - </li>
<li>Added <a href="/constructor/privacyValueAllowPremium">privacyValueAllowPremium</a> - </li>
<li>Added <a href="/constructor/inputPrivacyValueAllowPremium">inputPrivacyValueAllowPremium</a> - Allow only users with a <a href="/api/premium">Premium subscription »</a>, currently only usable for <a href="/constructor/inputPrivacyKeyChatInvite">inputPrivacyKeyChatInvite</a>.</li>
<li>Added <a href="/constructor/privacyValueAllowPremium">privacyValueAllowPremium</a> - Allow only users with a <a href="/api/premium">Premium subscription »</a>, currently only usable for <a href="/constructor/inputPrivacyKeyChatInvite">inputPrivacyKeyChatInvite</a>.</li>
<li>Added <a href="/constructor/missingInvitee">missingInvitee</a> - Info about why a specific user could not be <a href="/api/invites#direct-invites">invited »</a>.</li>
<li>Added <a href="/constructor/messages.invitedUsers">messages.invitedUsers</a> - Contains info about successfully or unsuccessfully <a href="/api/invites#direct-invites">invited »</a> users.</li>
<li>Added <a href="/constructor/inputBusinessChatLink">inputBusinessChatLink</a> - Contains info about a <a href="/api/business#business-chat-links">business chat deep link »</a> to be created by the current account.</li>
@ -450,7 +450,7 @@
<li>Added <a href="/method/messages.deleteQuickReplyMessages">messages.deleteQuickReplyMessages</a> - Delete one or more messages from a <a href="/api/business#quick-reply-shortcuts">quick reply shortcut</a>. This will also emit an <a href="/constructor/updateDeleteQuickReplyMessages">updateDeleteQuickReplyMessages</a> update.</li>
<li>Added <a href="/method/account.updateConnectedBot">account.updateConnectedBot</a> - Connect a <a href="/api/business#connected-bots">business bot »</a> to the current account, or to change the current connection settings.</li>
<li>Added <a href="/method/account.getConnectedBots">account.getConnectedBots</a> - List all currently connected <a href="/api/business#connected-bots">business bots »</a></li>
<li>Added <a href="/method/messages.toggleDialogFilterTags">messages.toggleDialogFilterTags</a> - </li>
<li>Added <a href="/method/messages.toggleDialogFilterTags">messages.toggleDialogFilterTags</a> - Enable or disable <a href="/api/folders#folder-tags">folder tags »</a>.</li>
</ul>
<h5><a class="anchor" href="#changed-methods" id="changed-methods" name="changed-methods"><i class="anchor-icon"></i></a>Changed Methods</h5>
<ul>
@ -491,7 +491,7 @@
<li>Added <a href="/constructor/updateDeleteQuickReplyMessages">updateDeleteQuickReplyMessages</a> - One or more messages in a <a href="/api/business#quick-reply-shortcuts">quick reply shortcut »</a> were deleted.</li>
<li>Added <a href="/constructor/connectedBot">connectedBot</a> - Contains info about a <a href="/api/business#connected-bots">connected business bot »</a>.</li>
<li>Added <a href="/constructor/account.connectedBots">account.connectedBots</a> - Info about currently connected <a href="/api/business#connected-bots">business bots</a>.</li>
<li>Added <a href="/constructor/messages.dialogFilters">messages.dialogFilters</a> - <a href="/api/folders">Folder</a> information</li>
<li>Added <a href="/constructor/messages.dialogFilters">messages.dialogFilters</a> - <a href="/api/folders">Folder and folder tags</a> information</li>
</ul>
<h5><a class="anchor" href="#changed-constructors" id="changed-constructors" name="changed-constructors"><i class="anchor-icon"></i></a>Changed Constructors</h5>
<ul>

View file

@ -190,6 +190,8 @@
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p>
<h4><a class="anchor" href="#message-reactions" id="message-reactions" name="message-reactions"><i class="anchor-icon"></i></a><a href="/api/reactions">Message reactions</a></h4>
<p>Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.</p>
<h4><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.</p>
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>
<p>How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.</p></div>

View file

@ -106,10 +106,10 @@
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/help.PeerColorOption">help.PeerColorOption</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="#channel-and-supergroup-boosts" id="channel-and-supergroup-boosts" name="channel-and-supergroup-boosts"><i class="anchor-icon"></i></a><a href="/api/boost">Channel and supergroup boosts</a></h4>
<p>Telegram Premium users can grant their favorite channels and supergroups additional features like the ability to post stories by giving them boosts.</p>
<h4><a class="anchor" href="#accent-colors" id="accent-colors" name="accent-colors"><i class="anchor-icon"></i></a><a href="/api/colors">Accent colors</a></h4>
<p>Telegram users and channels can change the accent color and background pattern of their profile page and their messages!</p></div>
<p>Telegram users and channels can change the accent color and background pattern of their profile page and their messages!</p>
<h4><a class="anchor" href="#channel-and-supergroup-boosts" id="channel-and-supergroup-boosts" name="channel-and-supergroup-boosts"><i class="anchor-icon"></i></a><a href="/api/boost">Channel and supergroup boosts</a></h4>
<p>Telegram Premium users can grant their favorite channels and supergroups additional features like the ability to post stories by giving them boosts.</p></div>
</div>

View file

@ -4,14 +4,10 @@
<meta charset="utf-8">
<title>inputPrivacyValueAllowPremium</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Allow only users with a Premium subscription », currently only usable for inputPrivacyKeyChatInvite.
Parameters
This constructor…">
<meta property="description" content="Allow only users with a Premium subscription », currently only usable for inputPrivacyKeyChatInvite.">
<meta property="og:title" content="inputPrivacyValueAllowPremium">
<meta property="og:image" content="">
<meta property="og:description" content="Allow only users with a Premium subscription », currently only usable for inputPrivacyKeyChatInvite.
Parameters
This constructor…">
<meta property="og:description" content="Allow only users with a Premium subscription », currently only usable for inputPrivacyKeyChatInvite.">
<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">
@ -46,7 +42,7 @@ This constructor…">
<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/inputPrivacyValueAllowPremium" >inputPrivacyValueAllowPremium</a></li></ul></div>
<h1 id="dev_page_title">inputPrivacyValueAllowPremium</h1>
<div id="dev_page_content"><p>Allow only users with a <a href="/api/premium">Premium subscription »</a>, currently only usable for <a href="/constructor/inputPrivacyKeyChatInvite">inputPrivacyKeyChatInvite</a>. </p>
<div id="dev_page_content"><p>Allow only users with a <a href="/api/premium">Premium subscription »</a>, currently only usable for <a href="/constructor/inputPrivacyKeyChatInvite">inputPrivacyKeyChatInvite</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -63,7 +59,12 @@ This constructor…">
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/InputPrivacyRule">InputPrivacyRule</a></p></div>
<p><a href="/type/InputPrivacyRule">InputPrivacyRule</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="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p>
<h4><a class="anchor" href="#inputprivacykeychatinvite" id="inputprivacykeychatinvite" name="inputprivacykeychatinvite"><i class="anchor-icon"></i></a><a href="/constructor/inputPrivacyKeyChatInvite">inputPrivacyKeyChatInvite</a></h4>
<p>Whether people will be able to invite you to chats</p></div>
</div>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>messages.dialogFilters</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Folder information">
<meta property="description" content="Folder and folder tags information">
<meta property="og:title" content="messages.dialogFilters">
<meta property="og:image" content="">
<meta property="og:description" content="Folder information">
<meta property="og:description" content="Folder and folder tags information">
<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">

View file

@ -134,7 +134,7 @@
<tr>
<td><strong>custom_parameters</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/type/DataJSON">DataJSON</a></td>
<td> </td>
<td>Custom JSON-encoded call parameters to be passed to tgcalls.</td>
</tr>
</tbody>
</table>

View file

@ -4,14 +4,10 @@
<meta charset="utf-8">
<title>privacyValueAllowPremium</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Allow only users with a Premium subscription », currently only usable for inputPrivacyKeyChatInvite.
Parameters
This constructor…">
<meta property="description" content="Allow only users with a Premium subscription », currently only usable for inputPrivacyKeyChatInvite.">
<meta property="og:title" content="privacyValueAllowPremium">
<meta property="og:image" content="">
<meta property="og:description" content="Allow only users with a Premium subscription », currently only usable for inputPrivacyKeyChatInvite.
Parameters
This constructor…">
<meta property="og:description" content="Allow only users with a Premium subscription », currently only usable for inputPrivacyKeyChatInvite.">
<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">
@ -46,7 +42,7 @@ This constructor…">
<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/privacyValueAllowPremium" >privacyValueAllowPremium</a></li></ul></div>
<h1 id="dev_page_title">privacyValueAllowPremium</h1>
<div id="dev_page_content"><p>Allow only users with a <a href="/api/premium">Premium subscription »</a>, currently only usable for <a href="/constructor/inputPrivacyKeyChatInvite">inputPrivacyKeyChatInvite</a>. </p>
<div id="dev_page_content"><p>Allow only users with a <a href="/api/premium">Premium subscription »</a>, currently only usable for <a href="/constructor/inputPrivacyKeyChatInvite">inputPrivacyKeyChatInvite</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -63,7 +59,12 @@ This constructor…">
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/PrivacyRule">PrivacyRule</a></p></div>
<p><a href="/type/PrivacyRule">PrivacyRule</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="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p>
<h4><a class="anchor" href="#inputprivacykeychatinvite" id="inputprivacykeychatinvite" name="inputprivacykeychatinvite"><i class="anchor-icon"></i></a><a href="/constructor/inputPrivacyKeyChatInvite">inputPrivacyKeyChatInvite</a></h4>
<p>Whether people will be able to invite you to chats</p></div>
</div>

View file

@ -126,6 +126,12 @@
</tbody>
</table>
<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="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.</p>
<h4><a class="anchor" href="#channelfull" id="channelfull" name="channelfull"><i class="anchor-icon"></i></a><a href="/constructor/channelFull">channelFull</a></h4>
<p>Full info about a <a href="/api/channel#channels">channel</a>, <a href="/api/channel#supergroups">supergroup</a> or <a href="/api/channel#gigagroups">gigagroup</a>.</p>
<h4><a class="anchor" href="#chatfull" id="chatfull" name="chatfull"><i class="anchor-icon"></i></a><a href="/constructor/chatFull">chatFull</a></h4>
<p>Full info about a <a href="/api/channel#basic-groups">basic group</a>.</p>
<h4><a class="anchor" href="#message-reactions" id="message-reactions" name="message-reactions"><i class="anchor-icon"></i></a><a href="/api/reactions">Message reactions</a></h4>
<p>Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.</p></div>

View file

@ -4,28 +4,10 @@
<meta charset="utf-8">
<title>messages.toggleDialogFilterTags</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Enable or disable folder tags ».
Parameters
Name
Type
Description
enabled
Bool
Enable or disable folder tags.
Result
Bool">
<meta property="description" content="Enable or disable folder tags ».">
<meta property="og:title" content="messages.toggleDialogFilterTags">
<meta property="og:image" content="">
<meta property="og:description" content="Enable or disable folder tags ».
Parameters
Name
Type
Description
enabled
Bool
Enable or disable folder tags.
Result
Bool">
<meta property="og:description" content="Enable or disable folder tags ».">
<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">
@ -95,7 +77,10 @@ Bool">
</tbody>
</table>
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
<p><a href="/type/Bool">Bool</a></p></div>
<p><a href="/type/Bool">Bool</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="#folders" id="folders" name="folders"><i class="anchor-icon"></i></a><a href="/api/folders">Folders</a></h4>
<p>Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.</p></div>
</div>

View file

@ -3628,7 +3628,7 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
<tr>
<td><a href="/method/messages.toggleDialogFilterTags">messages.toggleDialogFilterTags</a></td>
<td> </td>
<td>Enable or disable <a href="/api/folders#folder-tags">folder tags »</a>.</td>
</tr>
<tr>
<td><a href="/method/stickers.replaceSticker">stickers.replaceSticker</a></td>

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 9C DD 09 00 E9 16 98 66
0010 | 14 00 00 00 F1 8E 7E BE 87 51 47 D4 3D 52 0F 2C
0020 | E6 A9 C6 58 93 51 DE 4A</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 1C 68 0C 00 97 35 99 66
0010 | 14 00 00 00 F1 8E 7E BE C8 F3 B5 E5 D1 E1 8A E5
0020 | 62 0C 86 F3 D3 B8 7E 04</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>9CDD0900E9169866</code></td>
<td><code>1C680C0097359966</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>875147D43D520F2CE6A9C6589351DE4A</code></td>
<td><code>C8F3B5E5D1E18AE5620C86F3D3B87E04</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 C6 5A E9 16 98 66
0010 | A8 00 00 00 63 24 16 05 87 51 47 D4 3D 52 0F 2C
0020 | E6 A9 C6 58 93 51 DE 4A 55 9B C4 34 A1 A8 62 79
0030 | DC 59 A2 D6 4E 03 D4 D9 08 15 14 A0 2B BC 2F 32
0040 | 81 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 84 21 15 98 35 99 66
0010 | 54 00 00 00 63 24 16 05 C8 F3 B5 E5 D1 E1 8A E5
0020 | 62 0C 86 F3 D3 B8 7E 04 5A 53 37 05 01 23 D9 C6
0030 | 09 E0 A6 E7 E7 60 9D 5C 08 1D A8 72 53 E5 51 E8
0040 | 61 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>010CC65AE9169866</code></td>
<td><code>0184211598359966</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>A8000000</code> (168 in decimal)</td>
<td><code>54000000</code> (84 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>875147D43D520F2CE6A9C6589351DE4A</code></td>
<td><code>C8F3B5E5D1E18AE5620C86F3D3B87E04</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>559BC434A1A86279DC59A2D64E03D4D9</code></td>
<td><code>5A5337050123D9C609E0A6E7E7609D5C</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>081514A02BBC2F3281000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1519015084031947393</td>
<td><code>081DA87253E551E861000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2137083727842502753</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 = 1519015084031947393</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1519015084031947393 = 1073734861 * 1414702213</code></p>
<pre><code>p = 1073734861
q = 1414702213</code></pre>
<pre><code>pq = 2137083727842502753</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2137083727842502753 = 1315428619 * 1624629187</code></p>
<pre><code>p = 1315428619
q = 1624629187</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 14 A0 2B BC 2F 32 81 00 00 00
0010 | 04 3F FF E4 CD 00 00 00 04 54 52 A4 85 00 00 00
0020 | 87 51 47 D4 3D 52 0F 2C E6 A9 C6 58 93 51 DE 4A
0030 | 55 9B C4 34 A1 A8 62 79 DC 59 A2 D6 4E 03 D4 D9
0040 | 43 B0 78 B3 C1 11 61 FA B7 03 FF AD AA 6A 7A 2E
0050 | 4F 98 8E 81 A2 85 E0 49 66 6C EE D2 58 22 9F 0E
<pre><code>0000 | 95 5F F5 A9 08 1D A8 72 53 E5 51 E8 61 00 00 00
0010 | 04 4E 67 D9 0B 00 00 00 04 60 D5 DF C3 00 00 00
0020 | C8 F3 B5 E5 D1 E1 8A E5 62 0C 86 F3 D3 B8 7E 04
0030 | 5A 53 37 05 01 23 D9 C6 09 E0 A6 E7 E7 60 9D 5C
0040 | 50 1C A9 81 B3 5E 6D B1 23 C1 15 94 8C E8 AE 3B
0050 | DE F2 DA 3A 71 A6 F8 A8 7D 17 60 68 3F 23 1D C3
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 = 1414702213</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>081514A02BBC2F3281000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1519015084031947393</td>
<td><code>081DA87253E551E861000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2137083727842502753</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>043FFFE4CD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1073734861</td>
<td><code>044E67D90B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1315428619</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>045452A485000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1414702213</td>
<td><code>0460D5DFC3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1624629187</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>875147D43D520F2CE6A9C6589351DE4A</code></td>
<td><code>C8F3B5E5D1E18AE5620C86F3D3B87E04</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>559BC434A1A86279DC59A2D64E03D4D9</code></td>
<td><code>5A5337050123D9C609E0A6E7E7609D5C</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>43B078B3C11161FAB703FFADAA6A7A2E</code> <code>4F988E81A285E049666CEED258229F0E</code></td>
<td><code>501CA981B35E6DB123C115948CE8AE3B</code> <code>DEF2DA3A71A6F8A87D1760683F231DC3</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1414702213</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 = 955FF5A9081514A02BBC2F3281000000043FFFE4CD000000045452A485000000875147D43D520F2CE6A9C6589351DE4A559BC434A1A86279DC59A2D64E03D4D943B078B3C11161FAB703FFADAA6A7A2E4F988E81A285E049666CEED258229F0E02000000
random_padding_bytes = BA0E6C2A8C5767D265D9982FAE9BC933B1CFFD7B8571C5D7493EE9A9418562BB8F792EF4CF4AB5720B4547203FE1BBF6A509134294ECBB7885AA582C575730EFAEFE269EF6B06D23112774102BC389A91CD0EFE146562C078AC368D6</code></pre>
<pre><code>data = 955FF5A9081DA87253E551E861000000044E67D90B0000000460D5DFC3000000C8F3B5E5D1E18AE5620C86F3D3B87E045A5337050123D9C609E0A6E7E7609D5C501CA981B35E6DB123C115948CE8AE3BDEF2DA3A71A6F8A87D1760683F231DC302000000
random_padding_bytes = D234E4F4F806B759AF1209AD9FB84A64F2FFD8E58D4ECF57FDC43CF54D0DA7C9E5833AA741E1B7DAE72F32A94CAEA84876773AE086B1A35D6C84E3DAB0A529E495354A50AC2D5D54800B7368C36C9B2EEAAB5E4765F1EDB173DD85CC</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 = 5F6650D0D7988ED3C32ADE7F9940FEF2C216C2D1B3EB5996125C0B92F97C2EB74C08FAA98D39942864910AF495EB735C7DDD0F5C957E05D8EA75A8E365B7D7ADBC788422DAF37B9807B5F84DAB5F9EFF046F276B3DAA18464DEBF9F5B0E90F87B844FF56021842889333B063E29D1BFE4BAD19C94D1E045E973A26A1AACDD96D51A32680169DB78E608C457E01A724FF68A5AA2C0BDFDA2631BF57EA175D5B05F157217D241092817DFC08EC65C1C78A7E3EACD3E62CBD55F800E9949D9E677941D1ADF6F6A61C781E90E33FC2E26E2C62DEF458E0505775495A562D766C315A92813DA0D0D87859C93704821EF10684A69D2DD337A5628B176809686ED5B3AF</code></pre>
<pre><code>encrypted_data = 40AE9D77BA6C56218BF76863057E2C63F00A27B64F8E54B075DF60DDADEA36B03BAB674D398480BB1B7F63F0B2E8E7BC31E99C11DD28D96BDAA660672AB9063BAE6F45625935E1E31C52475F408AB63F216004AA08CC8E9BA9D18C8D78FEFC7775174DF4F9994950A39C6FE7F3D620CD44E3EF49ADD39DF00783D68C5EDE7B92053BF979A497BC6C9A06E6DDEAE06234319883E38B43BEBD615EB8353D64E0D9BDC31832C5E7BAF100A69867DD34EE47AFECB7A0B2D9883E346CB65D7DB59B777888D42CDD3A21E8D17359A35B12209FA426937521C5892CA42A16F784F745DB5BFE1C551007B91D7F1716410F326FEE22060A0EEAD5DF95B321DC106B21E798</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 88 9C 0C 00 E9 16 98 66
0010 | 40 01 00 00 BE E4 12 D7 87 51 47 D4 3D 52 0F 2C
0020 | E6 A9 C6 58 93 51 DE 4A 55 9B C4 34 A1 A8 62 79
0030 | DC 59 A2 D6 4E 03 D4 D9 04 3F FF E4 CD 00 00 00
0040 | 04 54 52 A4 85 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 5F 66 50 D0 D7 98 8E D3 C3 2A DE 7F
0060 | 99 40 FE F2 C2 16 C2 D1 B3 EB 59 96 12 5C 0B 92
0070 | F9 7C 2E B7 4C 08 FA A9 8D 39 94 28 64 91 0A F4
0080 | 95 EB 73 5C 7D DD 0F 5C 95 7E 05 D8 EA 75 A8 E3
0090 | 65 B7 D7 AD BC 78 84 22 DA F3 7B 98 07 B5 F8 4D
00A0 | AB 5F 9E FF 04 6F 27 6B 3D AA 18 46 4D EB F9 F5
00B0 | B0 E9 0F 87 B8 44 FF 56 02 18 42 88 93 33 B0 63
00C0 | E2 9D 1B FE 4B AD 19 C9 4D 1E 04 5E 97 3A 26 A1
00D0 | AA CD D9 6D 51 A3 26 80 16 9D B7 8E 60 8C 45 7E
00E0 | 01 A7 24 FF 68 A5 AA 2C 0B DF DA 26 31 BF 57 EA
00F0 | 17 5D 5B 05 F1 57 21 7D 24 10 92 81 7D FC 08 EC
0100 | 65 C1 C7 8A 7E 3E AC D3 E6 2C BD 55 F8 00 E9 94
0110 | 9D 9E 67 79 41 D1 AD F6 F6 A6 1C 78 1E 90 E3 3F
0120 | C2 E2 6E 2C 62 DE F4 58 E0 50 57 75 49 5A 56 2D
0130 | 76 6C 31 5A 92 81 3D A0 D0 D8 78 59 C9 37 04 82
0140 | 1E F1 06 84 A6 9D 2D D3 37 A5 62 8B 17 68 09 68
0150 | 6E D5 B3 AF</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 14 EF 0A 00 98 35 99 66
0010 | 40 01 00 00 BE E4 12 D7 C8 F3 B5 E5 D1 E1 8A E5
0020 | 62 0C 86 F3 D3 B8 7E 04 5A 53 37 05 01 23 D9 C6
0030 | 09 E0 A6 E7 E7 60 9D 5C 04 4E 67 D9 0B 00 00 00
0040 | 04 60 D5 DF C3 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 40 AE 9D 77 BA 6C 56 21 8B F7 68 63
0060 | 05 7E 2C 63 F0 0A 27 B6 4F 8E 54 B0 75 DF 60 DD
0070 | AD EA 36 B0 3B AB 67 4D 39 84 80 BB 1B 7F 63 F0
0080 | B2 E8 E7 BC 31 E9 9C 11 DD 28 D9 6B DA A6 60 67
0090 | 2A B9 06 3B AE 6F 45 62 59 35 E1 E3 1C 52 47 5F
00A0 | 40 8A B6 3F 21 60 04 AA 08 CC 8E 9B A9 D1 8C 8D
00B0 | 78 FE FC 77 75 17 4D F4 F9 99 49 50 A3 9C 6F E7
00C0 | F3 D6 20 CD 44 E3 EF 49 AD D3 9D F0 07 83 D6 8C
00D0 | 5E DE 7B 92 05 3B F9 79 A4 97 BC 6C 9A 06 E6 DD
00E0 | EA E0 62 34 31 98 83 E3 8B 43 BE BD 61 5E B8 35
00F0 | 3D 64 E0 D9 BD C3 18 32 C5 E7 BA F1 00 A6 98 67
0100 | DD 34 EE 47 AF EC B7 A0 B2 D9 88 3E 34 6C B6 5D
0110 | 7D B5 9B 77 78 88 D4 2C DD 3A 21 E8 D1 73 59 A3
0120 | 5B 12 20 9F A4 26 93 75 21 C5 89 2C A4 2A 16 F7
0130 | 84 F7 45 DB 5B FE 1C 55 10 07 B9 1D 7F 17 16 41
0140 | 0F 32 6F EE 22 06 0A 0E EA D5 DF 95 B3 21 DC 10
0150 | 6B 21 E7 98</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 = BA0E6C2A8C5767D265D9982FAE9BC933B1CFFD7B8571C5D7493EE9A94
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>889C0C00E9169866</code></td>
<td><code>14EF0A0098359966</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 = BA0E6C2A8C5767D265D9982FAE9BC933B1CFFD7B8571C5D7493EE9A94
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>875147D43D520F2CE6A9C6589351DE4A</code></td>
<td><code>C8F3B5E5D1E18AE5620C86F3D3B87E04</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>559BC434A1A86279DC59A2D64E03D4D9</code></td>
<td><code>5A5337050123D9C609E0A6E7E7609D5C</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>043FFFE4CD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1073734861</td>
<td><code>044E67D90B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1315428619</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>045452A485000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1414702213</td>
<td><code>0460D5DFC3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1624629187</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 = BA0E6C2A8C5767D265D9982FAE9BC933B1CFFD7B8571C5D7493EE9A94
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001005F6650D0D7988ED3C32ADE7F</code> <code>9940FEF2C216C2D1B3EB5996125C0B92</code> <code>F97C2EB74C08FAA98D39942864910AF4</code> <code>95EB735C7DDD0F5C957E05D8EA75A8E3</code> <code>65B7D7ADBC788422DAF37B9807B5F84D</code> <code>AB5F9EFF046F276B3DAA18464DEBF9F5</code> <code>B0E90F87B844FF56021842889333B063</code> <code>E29D1BFE4BAD19C94D1E045E973A26A1</code> <code>AACDD96D51A32680169DB78E608C457E</code> <code>01A724FF68A5AA2C0BDFDA2631BF57EA</code> <code>175D5B05F157217D241092817DFC08EC</code> <code>65C1C78A7E3EACD3E62CBD55F800E994</code> <code>9D9E677941D1ADF6F6A61C781E90E33F</code> <code>C2E26E2C62DEF458E0505775495A562D</code> <code>766C315A92813DA0D0D87859C9370482</code> <code>1EF10684A69D2DD337A5628B17680968</code><br> <code>6ED5B3AF</code></td>
<td><code>FE00010040AE9D77BA6C56218BF76863</code> <code>057E2C63F00A27B64F8E54B075DF60DD</code> <code>ADEA36B03BAB674D398480BB1B7F63F0</code> <code>B2E8E7BC31E99C11DD28D96BDAA66067</code> <code>2AB9063BAE6F45625935E1E31C52475F</code> <code>408AB63F216004AA08CC8E9BA9D18C8D</code> <code>78FEFC7775174DF4F9994950A39C6FE7</code> <code>F3D620CD44E3EF49ADD39DF00783D68C</code> <code>5EDE7B92053BF979A497BC6C9A06E6DD</code> <code>EAE06234319883E38B43BEBD615EB835</code> <code>3D64E0D9BDC31832C5E7BAF100A69867</code> <code>DD34EE47AFECB7A0B2D9883E346CB65D</code> <code>7DB59B777888D42CDD3A21E8D17359A3</code> <code>5B12209FA426937521C5892CA42A16F7</code> <code>84F745DB5BFE1C551007B91D7F171641</code> <code>0F326FEE22060A0EEAD5DF95B321DC10</code><br> <code>6B21E798</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = BA0E6C2A8C5767D265D9982FAE9BC933B1CFFD7B8571C5D7493EE9A94
<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 54 CB 45 EA 16 98 66
0010 | E4 02 00 00 5C 07 E8 D0 87 51 47 D4 3D 52 0F 2C
0020 | E6 A9 C6 58 93 51 DE 4A 55 9B C4 34 A1 A8 62 79
0030 | DC 59 A2 D6 4E 03 D4 D9 FE 50 02 00 DF 6F 99 9A
0040 | F9 02 9D 33 4C 1E 62 B5 28 B0 F1 7F FB 58 B0 AD
0050 | 76 BA 12 9B 62 5F 3B 7C 73 0B 19 D1 21 8F 54 80
0060 | C9 61 EC EE EA 28 D3 C4 C5 C1 06 49 5B 27 7F AB
0070 | 5B E8 90 C8 B3 C3 06 C4 F8 69 7E 68 81 01 52 6E
0080 | 4B EC F4 1A 68 C4 03 23 84 94 D0 2D 8B AB A1 99
0090 | 53 50 65 40 D9 DE 22 1C 83 6E A7 08 1E D2 68 9F
00A0 | 67 89 60 B6 CD DD 85 12 14 12 99 F6 D9 3F 42 59
00B0 | 1F 41 41 23 50 BE 6D 10 26 68 ED D7 EF 88 93 DE
00C0 | 01 3B 9E 09 7D 30 CF 9A AD 05 0C FD EA 6D 12 A2
00D0 | F4 E8 EB C9 C3 94 FE BC 6E 5D 51 F7 85 82 22 8D
00E0 | 6D 1B C0 E6 10 CD 4F A2 0C 39 09 AC 2D 0B BB FD
00F0 | 5D B0 FC AB C7 9B 56 64 57 C6 AC 1D 4C 1C A0 B7
0100 | CF 3B 92 0A C7 F1 90 F7 4C 0A AE A9 B8 C7 68 BE
0110 | 0E 1D 4A 18 44 B5 02 26 21 23 E7 B1 CE 7A 9A A5
0120 | B7 55 F6 E9 41 1B F8 07 FF 6D 38 06 D1 A1 B8 12
0130 | 42 79 51 16 49 4B F5 36 57 15 EA 0B 3E AE 84 BF
0140 | 7F FC 85 BD 35 0C 7B B6 08 2E F3 AF D6 AF 4E B4
0150 | 3F C4 69 AD 4F 92 E0 86 AE 54 57 6F 3A F7 A9 0F
0160 | ED 1F 92 82 E6 FC 22 11 E9 B7 90 18 3C EB 58 94
0170 | FC BE 90 C3 72 99 E2 36 34 C4 5A B6 C9 02 3A 5D
0180 | 07 55 00 BE 27 D9 DA 5F CE BA 67 11 76 51 03 27
0190 | C7 C2 6B A0 F6 87 4E 19 59 FA 0B 62 EC 09 53 88
01A0 | 11 32 11 D1 C6 C5 22 A1 B8 63 16 FE 60 F3 1D 30
01B0 | F1 F9 32 76 A7 7A 07 EE 5D 51 56 65 E8 DC 35 93
01C0 | 1E 10 68 5E 07 D3 C9 57 9E F3 76 DA B0 7B 52 8D
01D0 | DE 65 C9 27 36 C3 94 AF 82 99 C5 06 D1 30 6D 1F
01E0 | 60 1F 7F B6 2F A6 08 25 C5 4B 4B B8 44 8C A7 6A
01F0 | 13 14 7D 80 67 C7 CC 0C AD E9 BF 0D 5E EA D4 0D
0200 | F7 B3 2C 4F 57 18 6F 36 90 D2 E8 61 8D 29 30 23
0210 | 3D 36 CF 79 54 1B 9F 40 E5 AC D1 CF C5 CC 94 72
0220 | A3 A2 63 0C AD 0A 26 38 F5 C1 DF 87 46 01 D1 BE
0230 | 5C 49 F4 A3 A7 09 1D 86 4C 95 B2 3A 79 A3 92 9A
0240 | DA 5B 08 D6 85 0C F6 BF D6 EB 43 AD F0 54 60 B6
0250 | C8 5D 48 76 7D 8F 12 12 29 A6 76 97 78 00 63 CA
0260 | D8 AB 2B 81 B4 BB 15 14 D3 88 4C D0 7B 50 96 1A
0270 | 1D F5 5D 21 88 FD 29 A4 99 05 E8 58 D0 06 B0 12
0280 | 47 F2 95 34 3F 81 C9 F0 3B B2 21 4E</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 FC 70 D9 98 35 99 66
0010 | 80 02 00 00 5C 07 E8 D0 C8 F3 B5 E5 D1 E1 8A E5
0020 | 62 0C 86 F3 D3 B8 7E 04 5A 53 37 05 01 23 D9 C6
0030 | 09 E0 A6 E7 E7 60 9D 5C FE 50 02 00 D5 30 2E 38
0040 | C1 E7 C5 43 69 C7 0F 17 73 7D 89 52 1B F7 9E 8A
0050 | F4 4C 33 34 B8 A6 52 E5 4D CA C5 E1 11 29 CE 57
0060 | FE CA 87 DF 47 9E FF 70 60 9A C1 C6 B2 56 0C 16
0070 | F1 03 04 3B 33 AA 16 0D 98 C6 20 BB D9 14 4E 14
0080 | C1 61 0B CF 87 79 07 26 69 56 2A 4A 64 1D EF C9
0090 | 5B 70 FA D3 00 06 87 FA 20 FC 5A 4B F6 B2 8C 31
00A0 | 69 41 83 D0 92 86 39 23 56 89 8D 93 F6 AD 85 37
00B0 | F3 2C B8 E3 29 95 55 58 16 A4 06 89 7F DF 17 2E
00C0 | 06 DC 07 C2 99 96 5F 83 89 6B 5D 5C C4 7D A7 AE
00D0 | 06 9A 16 71 2E CA E1 21 B6 09 18 AE DD BE 07 7F
00E0 | 4E 82 26 A3 C5 25 0E 88 91 A6 CF 30 1D 83 C6 20
00F0 | BC 66 10 A5 A2 6A 10 1E 90 D9 81 FD F8 10 21 F6
0100 | 29 14 A7 44 76 48 28 77 97 E2 78 64 9C CF 1C 60
0110 | 99 44 B9 B3 D0 59 A3 E9 D8 15 8E 8A 2F 3C E2 84
0120 | 1E 50 8C DF A9 3C 14 F8 E0 71 58 C3 60 E9 E9 4B
0130 | 3C DB 18 0E B8 76 09 D6 55 A5 38 D7 05 3C 70 BF
0140 | BE 3D 1D DD 97 94 20 52 0D 37 05 93 71 D4 B8 9D
0150 | C9 22 D1 77 C8 F5 77 D3 ED EA 35 CF 09 7C 99 B5
0160 | E9 AD 7A A5 9C B7 4C 33 66 A9 8A D9 D8 2E 6D 11
0170 | 57 CB 91 06 1C 44 EA BB D4 2E 2E B9 B8 22 41 FC
0180 | BE CD 70 73 74 08 9D BF 09 5D F2 93 0F 71 E8 ED
0190 | 5F EE B0 31 79 75 B2 90 02 ED 39 99 59 14 7E FC
01A0 | AB 0B 75 4B 45 87 BA 69 79 F3 DA AF F0 1E 9C 9D
01B0 | E9 32 45 48 A2 9A 60 58 5A D8 B8 3E B0 B7 52 23
01C0 | CC 07 5F CA 76 F6 3A FA 15 60 5F E4 2A 7D FE 72
01D0 | EC 5E 59 02 D3 71 1F 67 CD 8E CB F7 E4 29 F3 4C
01E0 | C6 8E E2 03 13 A1 A6 98 36 A4 6D 46 13 75 62 7F
01F0 | 02 17 3A 6E 6E 41 73 E3 40 56 39 D3 31 04 52 3D
0200 | 8B 8A 9B 37 B2 D8 65 89 4D 9E E7 B2 02 9B 74 3B
0210 | 3A 2C 7A B2 C5 90 E3 2C 4A A3 A5 C6 5A DD 40 24
0220 | EA B6 E2 1B A4 A9 38 F4 D1 41 C4 32 77 E3 D0 B0
0230 | 63 B0 DA DC 8C 93 D5 C2 33 D1 F5 42 07 D4 9B 74
0240 | 6B D7 8D 68 7D FB AA 27 7D 7A F0 29 3A B5 03 3F
0250 | 5A 65 37 83 6D D0 AF 34 DC F7 9B 13 18 DD ED 42
0260 | 7E BC 45 76 75 32 06 1E D4 66 5B 6D E6 E7 49 F9
0270 | D0 81 71 7E 27 BB FD 06 D3 F1 08 88 48 58 B0 FD
0280 | 3F 9B 35 3B 6C 75 34 B6 83 CB 12 79</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 = BA0E6C2A8C5767D265D9982FAE9BC933B1CFFD7B8571C5D7493EE9A94
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>0154CB45EA169866</code></td>
<td><code>01FC70D998359966</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>E4020000</code> (740 in decimal)</td>
<td><code>80020000</code> (640 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = BA0E6C2A8C5767D265D9982FAE9BC933B1CFFD7B8571C5D7493EE9A94
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>875147D43D520F2CE6A9C6589351DE4A</code></td>
<td><code>C8F3B5E5D1E18AE5620C86F3D3B87E04</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>559BC434A1A86279DC59A2D64E03D4D9</code></td>
<td><code>5A5337050123D9C609E0A6E7E7609D5C</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200DF6F999AF9029D334C1E62B5</code> <code>28B0F17FFB58B0AD76BA129B625F3B7C</code> <code>730B19D1218F5480C961ECEEEA28D3C4</code> <code>C5C106495B277FAB5BE890C8B3C306C4</code> <code>F8697E688101526E4BECF41A68C40323</code> <code>8494D02D8BABA19953506540D9DE221C</code> <code>836EA7081ED2689F678960B6CDDD8512</code> <code>141299F6D93F42591F41412350BE6D10</code> <code>2668EDD7EF8893DE013B9E097D30CF9A</code> <code>AD050CFDEA6D12A2F4E8EBC9C394FEBC</code> <code>6E5D51F78582228D6D1BC0E610CD4FA2</code> <code>0C3909AC2D0BBBFD5DB0FCABC79B5664</code> <code>57C6AC1D4C1CA0B7CF3B920AC7F190F7</code> <code>4C0AAEA9B8C768BE0E1D4A1844B50226</code> <code>2123E7B1CE7A9AA5B755F6E9411BF807</code> <code>FF6D3806D1A1B81242795116494BF536</code> <code>5715EA0B3EAE84BF7FFC85BD350C7BB6</code> <code>082EF3AFD6AF4EB43FC469AD4F92E086</code> <code>AE54576F3AF7A90FED1F9282E6FC2211</code> <code>E9B790183CEB5894FCBE90C37299E236</code> <code>34C45AB6C9023A5D075500BE27D9DA5F</code> <code>CEBA671176510327C7C26BA0F6874E19</code> <code>59FA0B62EC095388113211D1C6C522A1</code> <code>B86316FE60F31D30F1F93276A77A07EE</code> <code>5D515665E8DC35931E10685E07D3C957</code> <code>9EF376DAB07B528DDE65C92736C394AF</code> <code>8299C506D1306D1F601F7FB62FA60825</code> <code>C54B4BB8448CA76A13147D8067C7CC0C</code> <code>ADE9BF0D5EEAD40DF7B32C4F57186F36</code> <code>90D2E8618D2930233D36CF79541B9F40</code> <code>E5ACD1CFC5CC9472A3A2630CAD0A2638</code> <code>F5C1DF874601D1BE5C49F4A3A7091D86</code> <code>4C95B23A79A3929ADA5B08D6850CF6BF</code> <code>D6EB43ADF05460B6C85D48767D8F1212</code> <code>29A67697780063CAD8AB2B81B4BB1514</code> <code>D3884CD07B50961A1DF55D2188FD29A4</code> <code>9905E858D006B01247F295343F81C9F0</code><br> <code>3BB2214E</code></td>
<td><code>FE500200D5302E38C1E7C54369C70F17</code> <code>737D89521BF79E8AF44C3334B8A652E5</code> <code>4DCAC5E11129CE57FECA87DF479EFF70</code> <code>609AC1C6B2560C16F103043B33AA160D</code> <code>98C620BBD9144E14C1610BCF87790726</code> <code>69562A4A641DEFC95B70FAD3000687FA</code> <code>20FC5A4BF6B28C31694183D092863923</code> <code>56898D93F6AD8537F32CB8E329955558</code> <code>16A406897FDF172E06DC07C299965F83</code> <code>896B5D5CC47DA7AE069A16712ECAE121</code> <code>B60918AEDDBE077F4E8226A3C5250E88</code> <code>91A6CF301D83C620BC6610A5A26A101E</code> <code>90D981FDF81021F62914A74476482877</code> <code>97E278649CCF1C609944B9B3D059A3E9</code> <code>D8158E8A2F3CE2841E508CDFA93C14F8</code> <code>E07158C360E9E94B3CDB180EB87609D6</code> <code>55A538D7053C70BFBE3D1DDD97942052</code> <code>0D37059371D4B89DC922D177C8F577D3</code> <code>EDEA35CF097C99B5E9AD7AA59CB74C33</code> <code>66A98AD9D82E6D1157CB91061C44EABB</code> <code>D42E2EB9B82241FCBECD707374089DBF</code> <code>095DF2930F71E8ED5FEEB0317975B290</code> <code>02ED399959147EFCAB0B754B4587BA69</code> <code>79F3DAAFF01E9C9DE9324548A29A6058</code> <code>5AD8B83EB0B75223CC075FCA76F63AFA</code> <code>15605FE42A7DFE72EC5E5902D3711F67</code> <code>CD8ECBF7E429F34CC68EE20313A1A698</code> <code>36A46D461375627F02173A6E6E4173E3</code> <code>405639D33104523D8B8A9B37B2D86589</code> <code>4D9EE7B2029B743B3A2C7AB2C590E32C</code> <code>4AA3A5C65ADD4024EAB6E21BA4A938F4</code> <code>D141C43277E3D0B063B0DADC8C93D5C2</code> <code>33D1F54207D49B746BD78D687DFBAA27</code> <code>7D7AF0293AB5033F5A6537836DD0AF34</code> <code>DCF79B1318DDED427EBC45767532061E</code> <code>D4665B6DE6E749F9D081717E27BBFD06</code> <code>D3F108884858B0FD3F9B353B6C7534B6</code><br> <code>83CB1279</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = BA0E6C2A8C5767D265D9982FAE9BC933B1CFFD7B8571C5D7493EE9A94
<!-- 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 = DF6F999AF9029D334C1E62B528B0F17FFB58B0AD76BA129B625F3B7C730B19D1218F5480C961ECEEEA28D3C4C5C106495B277FAB5BE890C8B3C306C4F8697E688101526E4BECF41A68C403238494D02D8BABA19953506540D9DE221C836EA7081ED2689F678960B6CDDD8512141299F6D93F42591F41412350BE6D102668EDD7EF8893DE013B9E097D30CF9AAD050CFDEA6D12A2F4E8EBC9C394FEBC6E5D51F78582228D6D1BC0E610CD4FA20C3909AC2D0BBBFD5DB0FCABC79B566457C6AC1D4C1CA0B7CF3B920AC7F190F74C0AAEA9B8C768BE0E1D4A1844B502262123E7B1CE7A9AA5B755F6E9411BF807FF6D3806D1A1B81242795116494BF5365715EA0B3EAE84BF7FFC85BD350C7BB6082EF3AFD6AF4EB43FC469AD4F92E086AE54576F3AF7A90FED1F9282E6FC2211E9B790183CEB5894FCBE90C37299E23634C45AB6C9023A5D075500BE27D9DA5FCEBA671176510327C7C26BA0F6874E1959FA0B62EC095388113211D1C6C522A1B86316FE60F31D30F1F93276A77A07EE5D515665E8DC35931E10685E07D3C9579EF376DAB07B528DDE65C92736C394AF8299C506D1306D1F601F7FB62FA60825C54B4BB8448CA76A13147D8067C7CC0CADE9BF0D5EEAD40DF7B32C4F57186F3690D2E8618D2930233D36CF79541B9F40E5ACD1CFC5CC9472A3A2630CAD0A2638F5C1DF874601D1BE5C49F4A3A7091D864C95B23A79A3929ADA5B08D6850CF6BFD6EB43ADF05460B6C85D48767D8F121229A67697780063CAD8AB2B81B4BB1514D3884CD07B50961A1DF55D2188FD29A49905E858D006B01247F295343F81C9F03BB2214E
tmp_aes_key = 665C5BF385AD7E705C53659CDC9488797EDE43ADCF41D9677F3855C39503844E
tmp_aes_iv = 7B05C24D32998307061DF0285067B79D753290EA29BBD9A6DBC947C043B078B3</code></pre>
<pre><code>encrypted_answer = D5302E38C1E7C54369C70F17737D89521BF79E8AF44C3334B8A652E54DCAC5E11129CE57FECA87DF479EFF70609AC1C6B2560C16F103043B33AA160D98C620BBD9144E14C1610BCF8779072669562A4A641DEFC95B70FAD3000687FA20FC5A4BF6B28C31694183D09286392356898D93F6AD8537F32CB8E32995555816A406897FDF172E06DC07C299965F83896B5D5CC47DA7AE069A16712ECAE121B60918AEDDBE077F4E8226A3C5250E8891A6CF301D83C620BC6610A5A26A101E90D981FDF81021F62914A7447648287797E278649CCF1C609944B9B3D059A3E9D8158E8A2F3CE2841E508CDFA93C14F8E07158C360E9E94B3CDB180EB87609D655A538D7053C70BFBE3D1DDD979420520D37059371D4B89DC922D177C8F577D3EDEA35CF097C99B5E9AD7AA59CB74C3366A98AD9D82E6D1157CB91061C44EABBD42E2EB9B82241FCBECD707374089DBF095DF2930F71E8ED5FEEB0317975B29002ED399959147EFCAB0B754B4587BA6979F3DAAFF01E9C9DE9324548A29A60585AD8B83EB0B75223CC075FCA76F63AFA15605FE42A7DFE72EC5E5902D3711F67CD8ECBF7E429F34CC68EE20313A1A69836A46D461375627F02173A6E6E4173E3405639D33104523D8B8A9B37B2D865894D9EE7B2029B743B3A2C7AB2C590E32C4AA3A5C65ADD4024EAB6E21BA4A938F4D141C43277E3D0B063B0DADC8C93D5C233D1F54207D49B746BD78D687DFBAA277D7AF0293AB5033F5A6537836DD0AF34DCF79B1318DDED427EBC45767532061ED4665B6DE6E749F9D081717E27BBFD06D3F108884858B0FD3F9B353B6C7534B683CB1279
tmp_aes_key = 9311A3560EBA4F1AC8F10B61C3B4D908A4097225C24928C0F67178FEB7E728C8
tmp_aes_iv = 9654BCFF9F182F35DDB4EBC383B3181B640364ACDB66FC10032CC576501CA981</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 39E497771B694165CE3FCC5DA0AF6DCE0FFFA34ABA0D89B5875147D43D520F2CE6A9C6589351DE4A559BC434A1A86279DC59A2D64E03D4D903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001009FEE30D53DF78108845A3D5013D9E27E55BB6953A4545A315642B005B0BB158C0C61088196003B36BA5A4A7BACF7F34E9B86539684EA2192A49CB5F1C9434E41C4894BDDBF65F6812213558E7A3953DE252CD682089B5102B9949CE28A7F6F8268A199A7D6A320CEA20D4000EEE9CC6BC9C2F80C290B9AD8FF5AAB52E5F442C9FCCB7C808F6A37190AE0463458E394024819A4B3D0A5CC534F079C0AC7994AB95EC099A410DBFBC8B128120F8A786F4E0DE13C52C7A7C741C68B2CEE606922579F4E554AD2973F08BB13A9C56918F82EE452094203CC226050F040C0E76CB80C2E0AD071F0EF0B75F30AEF61BE952DDF6FC718D0BD08336A3E75A3A8B85C6C88EA16986699791F231C87498D
answer = BA0D89B5875147D43D520F2CE6A9C6589351DE4A559BC434A1A86279DC59A2D64E03D4D903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001009FEE30D53DF78108845A3D5013D9E27E55BB6953A4545A315642B005B0BB158C0C61088196003B36BA5A4A7BACF7F34E9B86539684EA2192A49CB5F1C9434E41C4894BDDBF65F6812213558E7A3953DE252CD682089B5102B9949CE28A7F6F8268A199A7D6A320CEA20D4000EEE9CC6BC9C2F80C290B9AD8FF5AAB52E5F442C9FCCB7C808F6A37190AE0463458E394024819A4B3D0A5CC534F079C0AC7994AB95EC099A410DBFBC8B128120F8A786F4E0DE13C52C7A7C741C68B2CEE606922579F4E554AD2973F08BB13A9C56918F82EE452094203CC226050F040C0E76CB80C2E0AD071F0EF0B75F30AEF61BE952DDF6FC718D0BD08336A3E75A3A8B85C6C88EA16986699791F231C87498D</code></pre>
<pre><code>answer_with_hash = 3119B348BE57F0DD1E97804676264A29ED78A9D7BA0D89B5C8F3B5E5D1E18AE5620C86F3D3B87E045A5337050123D9C609E0A6E7E7609D5C03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010005DC2D2AF2A2729AE421C84C118642B9F6E35FC51FC6F7AF365030430FB346A7E35F8D3420F9000C5327A7C07DC09005485481F311358D9255548CE69739CBA4F6A103903EFF484D873AE9745DF02DC55F932C946533ACCAF69D608A2C55548189BDCD455A2E447F875904C34E3A479DE79ACB32801196717D9EEAA1D88B9C1E8795C7A47E2A10403982E950CBE2E6ECCAEC3A7B41217F45C6DBD5EDCA0104E9B42FB063DE6203A8C98B04F363AAD618BD251E7091A24957BE94F955272EDE2405F24A47F26DCE9F86F140ADDB0863C5CF827F767608E5F613815164BEF796D504FE18218908ECC9B8A6B1E720EC9E91DE1BB64A1D16E2A0A20C8D77044D4A47983599664C8D5C621398CAAB
answer = BA0D89B5C8F3B5E5D1E18AE5620C86F3D3B87E045A5337050123D9C609E0A6E7E7609D5C03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010005DC2D2AF2A2729AE421C84C118642B9F6E35FC51FC6F7AF365030430FB346A7E35F8D3420F9000C5327A7C07DC09005485481F311358D9255548CE69739CBA4F6A103903EFF484D873AE9745DF02DC55F932C946533ACCAF69D608A2C55548189BDCD455A2E447F875904C34E3A479DE79ACB32801196717D9EEAA1D88B9C1E8795C7A47E2A10403982E950CBE2E6ECCAEC3A7B41217F45C6DBD5EDCA0104E9B42FB063DE6203A8C98B04F363AAD618BD251E7091A24957BE94F955272EDE2405F24A47F26DCE9F86F140ADDB0863C5CF827F767608E5F613815164BEF796D504FE18218908ECC9B8A6B1E720EC9E91DE1BB64A1D16E2A0A20C8D77044D4A47983599664C8D5C621398CAAB</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 87 51 47 D4 3D 52 0F 2C E6 A9 C6 58
0010 | 93 51 DE 4A 55 9B C4 34 A1 A8 62 79 DC 59 A2 D6
0020 | 4E 03 D4 D9 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 C8 F3 B5 E5 D1 E1 8A E5 62 0C 86 F3
0010 | D3 B8 7E 04 5A 53 37 05 01 23 D9 C6 09 E0 A6 E7
0020 | E7 60 9D 5C 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 = BA0D89B5875147D43D520F2CE6A9C6589351DE4A559BC434A1A86279DC59A2D64E03D4D
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 | 9F EE 30 D5 3D F7 81 08 84 5A 3D 50 13 D9 E2 7E
0140 | 55 BB 69 53 A4 54 5A 31 56 42 B0 05 B0 BB 15 8C
0150 | 0C 61 08 81 96 00 3B 36 BA 5A 4A 7B AC F7 F3 4E
0160 | 9B 86 53 96 84 EA 21 92 A4 9C B5 F1 C9 43 4E 41
0170 | C4 89 4B DD BF 65 F6 81 22 13 55 8E 7A 39 53 DE
0180 | 25 2C D6 82 08 9B 51 02 B9 94 9C E2 8A 7F 6F 82
0190 | 68 A1 99 A7 D6 A3 20 CE A2 0D 40 00 EE E9 CC 6B
01A0 | C9 C2 F8 0C 29 0B 9A D8 FF 5A AB 52 E5 F4 42 C9
01B0 | FC CB 7C 80 8F 6A 37 19 0A E0 46 34 58 E3 94 02
01C0 | 48 19 A4 B3 D0 A5 CC 53 4F 07 9C 0A C7 99 4A B9
01D0 | 5E C0 99 A4 10 DB FB C8 B1 28 12 0F 8A 78 6F 4E
01E0 | 0D E1 3C 52 C7 A7 C7 41 C6 8B 2C EE 60 69 22 57
01F0 | 9F 4E 55 4A D2 97 3F 08 BB 13 A9 C5 69 18 F8 2E
0200 | E4 52 09 42 03 CC 22 60 50 F0 40 C0 E7 6C B8 0C
0210 | 2E 0A D0 71 F0 EF 0B 75 F3 0A EF 61 BE 95 2D DF
0220 | 6F C7 18 D0 BD 08 33 6A 3E 75 A3 A8 B8 5C 6C 88
0230 | EA 16 98 66</code></pre>
0130 | 05 DC 2D 2A F2 A2 72 9A E4 21 C8 4C 11 86 42 B9
0140 | F6 E3 5F C5 1F C6 F7 AF 36 50 30 43 0F B3 46 A7
0150 | E3 5F 8D 34 20 F9 00 0C 53 27 A7 C0 7D C0 90 05
0160 | 48 54 81 F3 11 35 8D 92 55 54 8C E6 97 39 CB A4
0170 | F6 A1 03 90 3E FF 48 4D 87 3A E9 74 5D F0 2D C5
0180 | 5F 93 2C 94 65 33 AC CA F6 9D 60 8A 2C 55 54 81
0190 | 89 BD CD 45 5A 2E 44 7F 87 59 04 C3 4E 3A 47 9D
01A0 | E7 9A CB 32 80 11 96 71 7D 9E EA A1 D8 8B 9C 1E
01B0 | 87 95 C7 A4 7E 2A 10 40 39 82 E9 50 CB E2 E6 EC
01C0 | CA EC 3A 7B 41 21 7F 45 C6 DB D5 ED CA 01 04 E9
01D0 | B4 2F B0 63 DE 62 03 A8 C9 8B 04 F3 63 AA D6 18
01E0 | BD 25 1E 70 91 A2 49 57 BE 94 F9 55 27 2E DE 24
01F0 | 05 F2 4A 47 F2 6D CE 9F 86 F1 40 AD DB 08 63 C5
0200 | CF 82 7F 76 76 08 E5 F6 13 81 51 64 BE F7 96 D5
0210 | 04 FE 18 21 89 08 EC C9 B8 A6 B1 E7 20 EC 9E 91
0220 | DE 1B B6 4A 1D 16 E2 A0 A2 0C 8D 77 04 4D 4A 47
0230 | 98 35 99 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 = BA0D89B5875147D43D520F2CE6A9C6589351DE4A559BC434A1A86279DC59A2D64E03D4D
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>875147D43D520F2CE6A9C6589351DE4A</code></td>
<td><code>C8F3B5E5D1E18AE5620C86F3D3B87E04</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>559BC434A1A86279DC59A2D64E03D4D9</code></td>
<td><code>5A5337050123D9C609E0A6E7E7609D5C</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B5875147D43D520F2CE6A9C6589351DE4A559BC434A1A86279DC59A2D64E03D4D
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE0001009FEE30D53DF78108845A3D50</code> <code>13D9E27E55BB6953A4545A315642B005</code> <code>B0BB158C0C61088196003B36BA5A4A7B</code> <code>ACF7F34E9B86539684EA2192A49CB5F1</code> <code>C9434E41C4894BDDBF65F6812213558E</code> <code>7A3953DE252CD682089B5102B9949CE2</code> <code>8A7F6F8268A199A7D6A320CEA20D4000</code> <code>EEE9CC6BC9C2F80C290B9AD8FF5AAB52</code> <code>E5F442C9FCCB7C808F6A37190AE04634</code> <code>58E394024819A4B3D0A5CC534F079C0A</code> <code>C7994AB95EC099A410DBFBC8B128120F</code> <code>8A786F4E0DE13C52C7A7C741C68B2CEE</code> <code>606922579F4E554AD2973F08BB13A9C5</code> <code>6918F82EE452094203CC226050F040C0</code> <code>E76CB80C2E0AD071F0EF0B75F30AEF61</code> <code>BE952DDF6FC718D0BD08336A3E75A3A8</code><br> <code>B85C6C88</code></td>
<td><code>FE00010005DC2D2AF2A2729AE421C84C</code> <code>118642B9F6E35FC51FC6F7AF36503043</code> <code>0FB346A7E35F8D3420F9000C5327A7C0</code> <code>7DC09005485481F311358D9255548CE6</code> <code>9739CBA4F6A103903EFF484D873AE974</code> <code>5DF02DC55F932C946533ACCAF69D608A</code> <code>2C55548189BDCD455A2E447F875904C3</code> <code>4E3A479DE79ACB32801196717D9EEAA1</code> <code>D88B9C1E8795C7A47E2A10403982E950</code> <code>CBE2E6ECCAEC3A7B41217F45C6DBD5ED</code> <code>CA0104E9B42FB063DE6203A8C98B04F3</code> <code>63AAD618BD251E7091A24957BE94F955</code> <code>272EDE2405F24A47F26DCE9F86F140AD</code> <code>DB0863C5CF827F767608E5F613815164</code> <code>BEF796D504FE18218908ECC9B8A6B1E7</code> <code>20EC9E91DE1BB64A1D16E2A0A20C8D77</code><br> <code>044D4A47</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>EA169866</code> (1721243370 in decimal)</td>
<td><code>98359966</code> (1721316760 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B5875147D43D520F2CE6A9C6589351DE4A559BC434A1A86279DC59A2D64E03D4D
<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 = DF3CA92440B635DF27C9EA9475D257B213B665362482515BCB2ECA71C2583B56527F707D6FF99F571386D9D16E36393CA474FD6A0C69D4F4FE84C2390ED3A67947FF121D41D5315B655F94FBBC5C08E4D1E8AD3D814EC723A3C8AA0E03BA34508977BC61EB3124A34336AAEB82E9D6418F6EF584097014B7C55078B2C74232491CAFBE7D28F9C95DC7DEDD7243C7FA0CB1E64F7D35DAC12137257B97829D69818C779E22BDBE296019A390F9163280946AD1E400841137414183FB99712A280EA16E0BD1788D358947FD76548D87192B17F8D8F34865E0A45A6E97DB0A9D44701E2758AE5DF94CA5F4EB3AA63294D4F58ED7E2718FDAF68D330D5C5704FD158F</code></pre>
<pre><code>b = D212BC5F0094BEFDEF0122852071EFE77C58908D3DB52868DC575E0F86B739EFCAF57DEC91DB996BA0953199B8BB93A053C448B871E66DB42A98952032331FDEAFE45C19B167B84D1F86B7F56A27599D8B3A31F01859742FC4ED4EF04A10DC1AB38F43E3BA7DA461900A5D202BF2B48ED64BA5D15DE499E568938E5DDE6D372798DB81A4CB2AE8D705ACCC7AAE37F90FCB3023E78854BF0696D183F3FC865A9BA9E4A889A535A63086C274764030D2F15A24C5D04D314A6565DC0602C50C59A83FF2C2ED67051B065D840E08EB9DC4AEBDAD6E7CE8C5E40A8EB93BD90B440E0EC57D551E74F8A16777EC88361DAF6C61EB5E31EA21D89DCA2852FFBCB2D16F4E</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 = 680E4A820ADCE87346A6C6A6D8CFDF8971422C9CFB977CE89C66B4E8041A1D9A7783844819B6DF8B154063644CF959B8A70CE0FB2D96396CFC9536CC03C708B07B32A1E57F90CF18FA723B66A3B58C105F878DF5797085989CD6E89A0D22BA26F412F0F622B91D3848A5B7569773D0A4E921C933A111C4067F5B9ADC4E6F34AF5F01545E71CD73D43A31A976BBE4F817A95161ABFC6E67527A4798E11808B8913EB928EE128DA015A371FE47D0DBB9243301CEE256E8518A06BB7EF4D9A0EDCFDBF96E4433F3F3F5DBC2452D2D312DBDB60214831EDAEA9F170782B1264B46DED924C44BF6AA38327731879EE84414C993349B19F64442A434EA9CF392452D22</code></pre>
<pre><code>g_b = 53BBF51BFC41A8273396B461F399681EFD22AAF17CC4130FB0C972F0751FC5688495D36B65A7FEA60754C772DA1DF9B74C968CC446C4139E183F56CE5B3BC04BD29FC1253B0A3E128ED06BFFC85D61A6417C2A34250632643D8F2C913AD52ED30540FFF47E09F3F52FE35682F254DF51EC35F3C3BAF3D14CA7AE79813430969EE6DFBC69D2C66F723C9ECE6D2000A8CBD4E4CB2720968AF2C2E65BD31DA95B589722BAE7D3E814E7358D06A5D33EC08C7068329643B59A3B6030FA8A261BC8526A036ED2340FD008702E0BFAA5B21AD09E645891B295B87CE1B173866181EFC4AB59175466199553DD1630633F4370EE5277997A5044A32E119668A7B4E3CA05</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 87 51 47 D4 3D 52 0F 2C E6 A9 C6 58
0010 | 93 51 DE 4A 55 9B C4 34 A1 A8 62 79 DC 59 A2 D6
0020 | 4E 03 D4 D9 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 68 0E 4A 82 0A DC E8 73 46 A6 C6 A6 D8 CF DF 89
0040 | 71 42 2C 9C FB 97 7C E8 9C 66 B4 E8 04 1A 1D 9A
0050 | 77 83 84 48 19 B6 DF 8B 15 40 63 64 4C F9 59 B8
0060 | A7 0C E0 FB 2D 96 39 6C FC 95 36 CC 03 C7 08 B0
0070 | 7B 32 A1 E5 7F 90 CF 18 FA 72 3B 66 A3 B5 8C 10
0080 | 5F 87 8D F5 79 70 85 98 9C D6 E8 9A 0D 22 BA 26
0090 | F4 12 F0 F6 22 B9 1D 38 48 A5 B7 56 97 73 D0 A4
00A0 | E9 21 C9 33 A1 11 C4 06 7F 5B 9A DC 4E 6F 34 AF
00B0 | 5F 01 54 5E 71 CD 73 D4 3A 31 A9 76 BB E4 F8 17
00C0 | A9 51 61 AB FC 6E 67 52 7A 47 98 E1 18 08 B8 91
00D0 | 3E B9 28 EE 12 8D A0 15 A3 71 FE 47 D0 DB B9 24
00E0 | 33 01 CE E2 56 E8 51 8A 06 BB 7E F4 D9 A0 ED CF
00F0 | DB F9 6E 44 33 F3 F3 F5 DB C2 45 2D 2D 31 2D BD
0100 | B6 02 14 83 1E DA EA 9F 17 07 82 B1 26 4B 46 DE
0110 | D9 24 C4 4B F6 AA 38 32 77 31 87 9E E8 44 14 C9
0120 | 93 34 9B 19 F6 44 42 A4 34 EA 9C F3 92 45 2D 22</code></pre>
<pre><code>0000 | 54 B6 43 66 C8 F3 B5 E5 D1 E1 8A E5 62 0C 86 F3
0010 | D3 B8 7E 04 5A 53 37 05 01 23 D9 C6 09 E0 A6 E7
0020 | E7 60 9D 5C 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 53 BB F5 1B FC 41 A8 27 33 96 B4 61 F3 99 68 1E
0040 | FD 22 AA F1 7C C4 13 0F B0 C9 72 F0 75 1F C5 68
0050 | 84 95 D3 6B 65 A7 FE A6 07 54 C7 72 DA 1D F9 B7
0060 | 4C 96 8C C4 46 C4 13 9E 18 3F 56 CE 5B 3B C0 4B
0070 | D2 9F C1 25 3B 0A 3E 12 8E D0 6B FF C8 5D 61 A6
0080 | 41 7C 2A 34 25 06 32 64 3D 8F 2C 91 3A D5 2E D3
0090 | 05 40 FF F4 7E 09 F3 F5 2F E3 56 82 F2 54 DF 51
00A0 | EC 35 F3 C3 BA F3 D1 4C A7 AE 79 81 34 30 96 9E
00B0 | E6 DF BC 69 D2 C6 6F 72 3C 9E CE 6D 20 00 A8 CB
00C0 | D4 E4 CB 27 20 96 8A F2 C2 E6 5B D3 1D A9 5B 58
00D0 | 97 22 BA E7 D3 E8 14 E7 35 8D 06 A5 D3 3E C0 8C
00E0 | 70 68 32 96 43 B5 9A 3B 60 30 FA 8A 26 1B C8 52
00F0 | 6A 03 6E D2 34 0F D0 08 70 2E 0B FA A5 B2 1A D0
0100 | 9E 64 58 91 B2 95 B8 7C E1 B1 73 86 61 81 EF C4
0110 | AB 59 17 54 66 19 95 53 DD 16 30 63 3F 43 70 EE
0120 | 52 77 99 7A 50 44 A3 2E 11 96 68 A7 B4 E3 CA 05</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 = BA0D89B5875147D43D520F2CE6A9C6589351DE4A559BC434A1A86279DC59A2D64E03D4D
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>875147D43D520F2CE6A9C6589351DE4A</code></td>
<td><code>C8F3B5E5D1E18AE5620C86F3D3B87E04</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>559BC434A1A86279DC59A2D64E03D4D9</code></td>
<td><code>5A5337050123D9C609E0A6E7E7609D5C</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE000100680E4A820ADCE87346A6C6A6</code> <code>D8CFDF8971422C9CFB977CE89C66B4E8</code> <code>041A1D9A7783844819B6DF8B15406364</code> <code>4CF959B8A70CE0FB2D96396CFC9536CC</code> <code>03C708B07B32A1E57F90CF18FA723B66</code> <code>A3B58C105F878DF5797085989CD6E89A</code> <code>0D22BA26F412F0F622B91D3848A5B756</code> <code>9773D0A4E921C933A111C4067F5B9ADC</code> <code>4E6F34AF5F01545E71CD73D43A31A976</code> <code>BBE4F817A95161ABFC6E67527A4798E1</code> <code>1808B8913EB928EE128DA015A371FE47</code> <code>D0DBB9243301CEE256E8518A06BB7EF4</code> <code>D9A0EDCFDBF96E4433F3F3F5DBC2452D</code> <code>2D312DBDB60214831EDAEA9F170782B1</code> <code>264B46DED924C44BF6AA38327731879E</code> <code>E84414C993349B19F64442A434EA9CF3</code><br> <code>92452D22</code></td>
<td><code>FE00010053BBF51BFC41A8273396B461</code> <code>F399681EFD22AAF17CC4130FB0C972F0</code> <code>751FC5688495D36B65A7FEA60754C772</code> <code>DA1DF9B74C968CC446C4139E183F56CE</code> <code>5B3BC04BD29FC1253B0A3E128ED06BFF</code> <code>C85D61A6417C2A34250632643D8F2C91</code> <code>3AD52ED30540FFF47E09F3F52FE35682</code> <code>F254DF51EC35F3C3BAF3D14CA7AE7981</code> <code>3430969EE6DFBC69D2C66F723C9ECE6D</code> <code>2000A8CBD4E4CB2720968AF2C2E65BD3</code> <code>1DA95B589722BAE7D3E814E7358D06A5</code> <code>D33EC08C7068329643B59A3B6030FA8A</code> <code>261BC8526A036ED2340FD008702E0BFA</code> <code>A5B21AD09E645891B295B87CE1B17386</code> <code>6181EFC4AB59175466199553DD163063</code> <code>3F4370EE5277997A5044A32E119668A7</code><br> <code>B4E3CA05</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 = BA0D89B5875147D43D520F2CE6A9C6589351DE4A559BC434A1A86279DC59A2D64E03D4D
<!-- 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 = 54B64366875147D43D520F2CE6A9C6589351DE4A559BC434A1A86279DC59A2D64E03D4D90000000000000000FE000100680E4A820ADCE87346A6C6A6D8CFDF8971422C9CFB977CE89C66B4E8041A1D9A7783844819B6DF8B154063644CF959B8A70CE0FB2D96396CFC9536CC03C708B07B32A1E57F90CF18FA723B66A3B58C105F878DF5797085989CD6E89A0D22BA26F412F0F622B91D3848A5B7569773D0A4E921C933A111C4067F5B9ADC4E6F34AF5F01545E71CD73D43A31A976BBE4F817A95161ABFC6E67527A4798E11808B8913EB928EE128DA015A371FE47D0DBB9243301CEE256E8518A06BB7EF4D9A0EDCFDBF96E4433F3F3F5DBC2452D2D312DBDB60214831EDAEA9F170782B1264B46DED924C44BF6AA38327731879EE84414C993349B19F64442A434EA9CF392452D22
padding = 936119E63C8C391D17234525
tmp_aes_key = 665C5BF385AD7E705C53659CDC9488797EDE43ADCF41D9677F3855C39503844E
tmp_aes_iv = 7B05C24D32998307061DF0285067B79D753290EA29BBD9A6DBC947C043B078B3</code></pre>
<pre><code>data = 54B64366C8F3B5E5D1E18AE5620C86F3D3B87E045A5337050123D9C609E0A6E7E7609D5C0000000000000000FE00010053BBF51BFC41A8273396B461F399681EFD22AAF17CC4130FB0C972F0751FC5688495D36B65A7FEA60754C772DA1DF9B74C968CC446C4139E183F56CE5B3BC04BD29FC1253B0A3E128ED06BFFC85D61A6417C2A34250632643D8F2C913AD52ED30540FFF47E09F3F52FE35682F254DF51EC35F3C3BAF3D14CA7AE79813430969EE6DFBC69D2C66F723C9ECE6D2000A8CBD4E4CB2720968AF2C2E65BD31DA95B589722BAE7D3E814E7358D06A5D33EC08C7068329643B59A3B6030FA8A261BC8526A036ED2340FD008702E0BFAA5B21AD09E645891B295B87CE1B173866181EFC4AB59175466199553DD1630633F4370EE5277997A5044A32E119668A7B4E3CA05
padding = 80D6A3E093B83E0D0AB654FA
tmp_aes_key = 9311A3560EBA4F1AC8F10B61C3B4D908A4097225C24928C0F67178FEB7E728C8
tmp_aes_iv = 9654BCFF9F182F35DDB4EBC383B3181B640364ACDB66FC10032CC576501CA981</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 = 838CB61F8CFC73B2D3B9B427A4443397439FB54E438D8CDCBF6DA99C459D538907992F59A0270515DB084C51C1D9DDE39AB3E4226AB7759E549F47485F80B52BA74BE85F65595B125508A70176FB582A2D5E17D9E71EAF29338C5A7DBDFADCA975F788062EF057FBCB25B8719C8D2276BE847944E579C6824BF35A0C5BE1BDFFC4F54D08F49B58832F95D1363BB08E01BF2EB5100C17F45F5930101D2B8AC8983178B149DC2AF350E18DD1CA5B8FE269899E2FA7DF5F3D150EA2467C3FDE85C717E277DBEB23E66099D958ACBFDBABEF3B47773FE15919AF5C44D84985722D18779279BDE8FED0CCFD3CFABAB7AC9633D8A8917C1664D8FCAC2A2977827F1D590DB66A8032EE1AF973745EEB98ED694EB34BED7A7524D710C813B9DBB729148512D62BDB9DF3E87B347645B925C791BB55C1513A0A861836E441DA97B6571636076225641B82B4AAB59BDE06B7B6494B</code></pre>
<pre><code>encrypted_data = 08E8E6B96B2D5E5109C95F8B172FA57F005FCA5D73CD6C314919E1FBCE9237A7DE3962C3FD69C12299C1E2FB0FFFC1E7CB7EB691D66934C4E12D92DAC0561A0AF10D651B1518585BECA3B60C896762A434A5EB6D8ED0CEA8C885485EB0BF654A30D9978BB2EBCD5BB9C55DA9AE968A18A34F72355CE1A5BAD01B20BE212270939BF227E4B1F81F382541434F897DCDB4A2E7922689BE70E3358315FA412A4F322493AF96FAFF1B3FAD69A08D14C335B778B3D6A8A7F1ACF98811731B736A145E275675771FDBC2BA58140ACF76EDBAA794941345F1A16129BDF1DEF06BE74B604FDDEAA1068D52EEF009B726834D53B0935ECE48D3A6E0955D20407CA82993B883D611F1CA40BD8C906B0B75FCF0AEE6CBD3E9C0E6341DB2C9444023D7750BA29F48A5E40015D75F2165C1FDADFF4E91D6567BD009D001D27A83848B413DEF6A23A44140683FCFE20353C977E67353F4</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 8C 0C 00 EA 16 98 66
0010 | 78 01 00 00 1F 5F 04 F5 87 51 47 D4 3D 52 0F 2C
0020 | E6 A9 C6 58 93 51 DE 4A 55 9B C4 34 A1 A8 62 79
0030 | DC 59 A2 D6 4E 03 D4 D9 FE 50 01 00 83 8C B6 1F
0040 | 8C FC 73 B2 D3 B9 B4 27 A4 44 33 97 43 9F B5 4E
0050 | 43 8D 8C DC BF 6D A9 9C 45 9D 53 89 07 99 2F 59
0060 | A0 27 05 15 DB 08 4C 51 C1 D9 DD E3 9A B3 E4 22
0070 | 6A B7 75 9E 54 9F 47 48 5F 80 B5 2B A7 4B E8 5F
0080 | 65 59 5B 12 55 08 A7 01 76 FB 58 2A 2D 5E 17 D9
0090 | E7 1E AF 29 33 8C 5A 7D BD FA DC A9 75 F7 88 06
00A0 | 2E F0 57 FB CB 25 B8 71 9C 8D 22 76 BE 84 79 44
00B0 | E5 79 C6 82 4B F3 5A 0C 5B E1 BD FF C4 F5 4D 08
00C0 | F4 9B 58 83 2F 95 D1 36 3B B0 8E 01 BF 2E B5 10
00D0 | 0C 17 F4 5F 59 30 10 1D 2B 8A C8 98 31 78 B1 49
00E0 | DC 2A F3 50 E1 8D D1 CA 5B 8F E2 69 89 9E 2F A7
00F0 | DF 5F 3D 15 0E A2 46 7C 3F DE 85 C7 17 E2 77 DB
0100 | EB 23 E6 60 99 D9 58 AC BF DB AB EF 3B 47 77 3F
0110 | E1 59 19 AF 5C 44 D8 49 85 72 2D 18 77 92 79 BD
0120 | E8 FE D0 CC FD 3C FA BA B7 AC 96 33 D8 A8 91 7C
0130 | 16 64 D8 FC AC 2A 29 77 82 7F 1D 59 0D B6 6A 80
0140 | 32 EE 1A F9 73 74 5E EB 98 ED 69 4E B3 4B ED 7A
0150 | 75 24 D7 10 C8 13 B9 DB B7 29 14 85 12 D6 2B DB
0160 | 9D F3 E8 7B 34 76 45 B9 25 C7 91 BB 55 C1 51 3A
0170 | 0A 86 18 36 E4 41 DA 97 B6 57 16 36 07 62 25 64
0180 | 1B 82 B4 AA B5 9B DE 06 B7 B6 49 4B</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 D4 74 0B 00 99 35 99 66
0010 | 78 01 00 00 1F 5F 04 F5 C8 F3 B5 E5 D1 E1 8A E5
0020 | 62 0C 86 F3 D3 B8 7E 04 5A 53 37 05 01 23 D9 C6
0030 | 09 E0 A6 E7 E7 60 9D 5C FE 50 01 00 08 E8 E6 B9
0040 | 6B 2D 5E 51 09 C9 5F 8B 17 2F A5 7F 00 5F CA 5D
0050 | 73 CD 6C 31 49 19 E1 FB CE 92 37 A7 DE 39 62 C3
0060 | FD 69 C1 22 99 C1 E2 FB 0F FF C1 E7 CB 7E B6 91
0070 | D6 69 34 C4 E1 2D 92 DA C0 56 1A 0A F1 0D 65 1B
0080 | 15 18 58 5B EC A3 B6 0C 89 67 62 A4 34 A5 EB 6D
0090 | 8E D0 CE A8 C8 85 48 5E B0 BF 65 4A 30 D9 97 8B
00A0 | B2 EB CD 5B B9 C5 5D A9 AE 96 8A 18 A3 4F 72 35
00B0 | 5C E1 A5 BA D0 1B 20 BE 21 22 70 93 9B F2 27 E4
00C0 | B1 F8 1F 38 25 41 43 4F 89 7D CD B4 A2 E7 92 26
00D0 | 89 BE 70 E3 35 83 15 FA 41 2A 4F 32 24 93 AF 96
00E0 | FA FF 1B 3F AD 69 A0 8D 14 C3 35 B7 78 B3 D6 A8
00F0 | A7 F1 AC F9 88 11 73 1B 73 6A 14 5E 27 56 75 77
0100 | 1F DB C2 BA 58 14 0A CF 76 ED BA A7 94 94 13 45
0110 | F1 A1 61 29 BD F1 DE F0 6B E7 4B 60 4F DD EA A1
0120 | 06 8D 52 EE F0 09 B7 26 83 4D 53 B0 93 5E CE 48
0130 | D3 A6 E0 95 5D 20 40 7C A8 29 93 B8 83 D6 11 F1
0140 | CA 40 BD 8C 90 6B 0B 75 FC F0 AE E6 CB D3 E9 C0
0150 | E6 34 1D B2 C9 44 40 23 D7 75 0B A2 9F 48 A5 E4
0160 | 00 15 D7 5F 21 65 C1 FD AD FF 4E 91 D6 56 7B D0
0170 | 09 D0 01 D2 7A 83 84 8B 41 3D EF 6A 23 A4 41 40
0180 | 68 3F CF E2 03 53 C9 77 E6 73 53 F4</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>C08C0C00EA169866</code></td>
<td><code>D4740B0099359966</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>875147D43D520F2CE6A9C6589351DE4A</code></td>
<td><code>C8F3B5E5D1E18AE5620C86F3D3B87E04</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>559BC434A1A86279DC59A2D64E03D4D9</code></td>
<td><code>5A5337050123D9C609E0A6E7E7609D5C</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100838CB61F8CFC73B2D3B9B427</code> <code>A4443397439FB54E438D8CDCBF6DA99C</code> <code>459D538907992F59A0270515DB084C51</code> <code>C1D9DDE39AB3E4226AB7759E549F4748</code> <code>5F80B52BA74BE85F65595B125508A701</code> <code>76FB582A2D5E17D9E71EAF29338C5A7D</code> <code>BDFADCA975F788062EF057FBCB25B871</code> <code>9C8D2276BE847944E579C6824BF35A0C</code> <code>5BE1BDFFC4F54D08F49B58832F95D136</code> <code>3BB08E01BF2EB5100C17F45F5930101D</code> <code>2B8AC8983178B149DC2AF350E18DD1CA</code> <code>5B8FE269899E2FA7DF5F3D150EA2467C</code> <code>3FDE85C717E277DBEB23E66099D958AC</code> <code>BFDBABEF3B47773FE15919AF5C44D849</code> <code>85722D18779279BDE8FED0CCFD3CFABA</code> <code>B7AC9633D8A8917C1664D8FCAC2A2977</code> <code>827F1D590DB66A8032EE1AF973745EEB</code> <code>98ED694EB34BED7A7524D710C813B9DB</code> <code>B729148512D62BDB9DF3E87B347645B9</code> <code>25C791BB55C1513A0A861836E441DA97</code> <code>B6571636076225641B82B4AAB59BDE06</code><br> <code>B7B6494B</code></td>
<td><code>FE50010008E8E6B96B2D5E5109C95F8B</code> <code>172FA57F005FCA5D73CD6C314919E1FB</code> <code>CE9237A7DE3962C3FD69C12299C1E2FB</code> <code>0FFFC1E7CB7EB691D66934C4E12D92DA</code> <code>C0561A0AF10D651B1518585BECA3B60C</code> <code>896762A434A5EB6D8ED0CEA8C885485E</code> <code>B0BF654A30D9978BB2EBCD5BB9C55DA9</code> <code>AE968A18A34F72355CE1A5BAD01B20BE</code> <code>212270939BF227E4B1F81F382541434F</code> <code>897DCDB4A2E7922689BE70E3358315FA</code> <code>412A4F322493AF96FAFF1B3FAD69A08D</code> <code>14C335B778B3D6A8A7F1ACF98811731B</code> <code>736A145E275675771FDBC2BA58140ACF</code> <code>76EDBAA794941345F1A16129BDF1DEF0</code> <code>6BE74B604FDDEAA1068D52EEF009B726</code> <code>834D53B0935ECE48D3A6E0955D20407C</code> <code>A82993B883D611F1CA40BD8C906B0B75</code> <code>FCF0AEE6CBD3E9C0E6341DB2C9444023</code> <code>D7750BA29F48A5E40015D75F2165C1FD</code> <code>ADFF4E91D6567BD009D001D27A83848B</code> <code>413DEF6A23A44140683FCFE20353C977</code><br> <code>E67353F4</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 = 2FD04B560BC77FB9F0257650E34E3F2DB3C7AF4E0084BE0DF217617C42D7B7E52464CFB8DBD25492EA98F6E7D2B0B837E545430EB7A5BE1039621459C05DBCCA3581D7E2BB64C8BD4B417C9F9D5EE2C185637DEFCC324C52B094DF4038A4D8BD58DA7090AF8496782541301E4E419A2807D50A2635CA5C2BA0CE15D53863FEDAB1E53A26EB9391C7CBC25AD3D8BA9E4E0BA843E5BACB9BEA92A890792379B60177785D23140F0C6FA2CA3E45F4AEF660BF02C3E4783FB6E6014664B1B989FF13A6C2EB4022007D6035520847261CB5AD2A27765D9F3F831522DC191AFB1E124F9EED5CF48E6207651B50EAFD35E07F93DE3E20F85D88A8129F21C5091041EDA5</code></pre>
<pre><code>auth_key = 6BA30E6411867F15A7CA2468D3477F52EF311F72ABCB8CA41C42ED50C767D32B1B1491E017DC5B3B2A11644D2DC99BC3E5312E99C2B009A5616F5CF0A6C420F3E4143E649BDEF676BE5FD7D988EFC4A600B2C6ED873F7CDAC273CF56DFD5A53255D4AAA47D41633EE03D4CC1FF7115B30786EB7708296A3E88687F2A425EBCF296DEB30C66B63F850BE0CC128D1D7EF2F29D2A0DED7432FA4FE8B5B3FBB48131BFEF27D1D331A992E18DACD8F92058800F6E33CF6B390D9EC81FCABD74C30B25105EFF3B5583F9211790C4C4843DF36FBD055A074947FB5DE5C87B9BDE12122A5CDE1372E9E2617817D14FBC534E07D37BB738DEABF6B3281E65FCEF12BD5B52</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 E0 79 EF EB 16 98 66
0010 | A8 00 00 00 34 F7 CB 3B 87 51 47 D4 3D 52 0F 2C
0020 | E6 A9 C6 58 93 51 DE 4A 55 9B C4 34 A1 A8 62 79
0030 | DC 59 A2 D6 4E 03 D4 D9 20 E9 EA 8C 4A D4 B4 41
0040 | 86 E8 B4 32 8E D7 C5 D7</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 44 91 34 9A 35 99 66
0010 | B0 00 00 00 34 F7 CB 3B C8 F3 B5 E5 D1 E1 8A E5
0020 | 62 0C 86 F3 D3 B8 7E 04 5A 53 37 05 01 23 D9 C6
0030 | 09 E0 A6 E7 E7 60 9D 5C 80 80 F6 F1 0E E0 B3 06
0040 | F1 29 37 C3 E3 00 AE FB</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>01E079EFEB169866</code></td>
<td><code>014491349A359966</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>A8000000</code> (168 in decimal)</td>
<td><code>B0000000</code> (176 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>875147D43D520F2CE6A9C6589351DE4A</code></td>
<td><code>C8F3B5E5D1E18AE5620C86F3D3B87E04</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>559BC434A1A86279DC59A2D64E03D4D9</code></td>
<td><code>5A5337050123D9C609E0A6E7E7609D5C</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>20E9EA8C4AD4B44186E8B4328ED7C5D7</code></td>
<td><code>8080F6F10EE0B306F12937C3E300AEFB</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

@ -944,7 +944,7 @@
</tr>
<tr>
<td><a href="/method/messages.toggleDialogFilterTags">messages.toggleDialogFilterTags</a></td>
<td> </td>
<td>Enable or disable <a href="/api/folders#folder-tags">folder tags »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.updateBusinessIntro">account.updateBusinessIntro</a></td>

View file

@ -113,7 +113,7 @@
</tr>
<tr>
<td><a href="/constructor/inputPrivacyValueAllowPremium">inputPrivacyValueAllowPremium</a></td>
<td> </td>
<td>Allow only users with a <a href="/api/premium">Premium subscription »</a>, currently only usable for <a href="/constructor/inputPrivacyKeyChatInvite">inputPrivacyKeyChatInvite</a>.</td>
</tr>
</tbody>
</table>

View file

@ -113,7 +113,7 @@
</tr>
<tr>
<td><a href="/constructor/privacyValueAllowPremium">privacyValueAllowPremium</a></td>
<td> </td>
<td>Allow only users with a <a href="/api/premium">Premium subscription »</a>, currently only usable for <a href="/constructor/inputPrivacyKeyChatInvite">inputPrivacyKeyChatInvite</a>.</td>
</tr>
</tbody>
</table>

View file

@ -71,7 +71,7 @@
<tbody>
<tr>
<td><a href="/constructor/messages.dialogFilters">messages.dialogFilters</a></td>
<td><a href="/api/folders">Folder</a> information</td>
<td><a href="/api/folders">Folder and folder tags</a> information</td>
</tr>
</tbody>
</table>