Update content of files

This commit is contained in:
GitHub Action 2024-07-16 19:48:49 +00:00
parent 80c46d86cc
commit 24716871d7
6 changed files with 230 additions and 240 deletions

View file

@ -127,14 +127,14 @@ After reaching at least the boost level specified in the <a href="/api/config#ch
<p>After reaching at least the boost level specified in the <a href="/api/config#group-emoji-stickers-level-min"><code>group_emoji_stickers_level_min</code> »</a> config parameter, supergroups gain the ability to associate a <a href="/api/custom-emoji">custom emoji stickerset »</a>, which can be used by all users of the group (including non-<a href="/api/premium">Premium</a> users!), for messages sent within the group. </p>
<p>This feature is the custom emoji stickerset counterpart of the supergroup stickerset feature, available through <a href="/method/channels.setStickers">channels.setStickers</a>. </p>
<p>Invoke <a href="/method/channels.setEmojiStickers">channels.setEmojiStickers</a> to choose the custom emoji stickerset to associate to the supergroup, which will be available to users in <a href="/constructor/channelFull">channelFull</a>.<code>emojiset</code>, and should be prioritized when choosing a custom emoji; a <a href="/constructor/channelAdminLogEventActionChangeEmojiStickerSet">channelAdminLogEventActionChangeEmojiStickerSet</a> will be emitted to the <a href="/api/recent-actions">admin log</a> after invoking that method. </p>
<h4><a class="anchor" href="#reducing-ads-on-the-channel" id="reducing-ads-on-the-channel" name="reducing-ads-on-the-channel"><i class="anchor-icon"></i></a>Reducing ads on the channel</h4>
<h4><a class="anchor" href="#disable-ads-on-the-channel" id="disable-ads-on-the-channel" name="disable-ads-on-the-channel"><i class="anchor-icon"></i></a>Disable ads on the channel</h4>
<pre><code><a href='/constructor/channelFull'>channelFull</a>#bbab348d flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> can_delete_channel:flags2.0?<a href='/constructor/true'>true</a> antispam:flags2.1?<a href='/constructor/true'>true</a> participants_hidden:flags2.2?<a href='/constructor/true'>true</a> translations_disabled:flags2.3?<a href='/constructor/true'>true</a> stories_pinned_available:flags2.5?<a href='/constructor/true'>true</a> view_forum_as_messages:flags2.6?<a href='/constructor/true'>true</a> restricted_sponsored:flags2.11?<a href='/constructor/true'>true</a> can_view_revenue:flags2.12?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotInfo'>BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href='/type/long'>long</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/long'>long</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/string'>string</a>&gt; groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> requests_pending:flags.28?<a href='/type/int'>int</a> recent_requesters:flags.28?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; default_send_as:flags.29?<a href='/type/Peer'>Peer</a> available_reactions:flags.30?<a href='/type/ChatReactions'>ChatReactions</a> reactions_limit:flags2.13?<a href='/type/int'>int</a> stories:flags2.4?<a href='/type/PeerStories'>PeerStories</a> wallpaper:flags2.7?<a href='/type/WallPaper'>WallPaper</a> boosts_applied:flags2.8?<a href='/type/int'>int</a> boosts_unrestrict:flags2.9?<a href='/type/int'>int</a> emojiset:flags2.10?<a href='/type/StickerSet'>StickerSet</a> = <a href='/type/ChatFull'>ChatFull</a>;
---functions---
<a href='/method/channels.restrictSponsoredMessages'>channels.restrictSponsoredMessages</a>#9ae91519 channel:<a href='/type/InputChannel'>InputChannel</a> restricted:<a href='/type/Bool'>Bool</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-restrict-sponsored-level-min"><code>channel_restrict_sponsored_level_min</code> »</a> config parameter, channels may reduce ads on the channel for all users using <a href="/method/channels.restrictSponsoredMessages">channels.restrictSponsoredMessages</a>. </p>
<p>If ads are restricted on the channel, the <a href="/constructor/channelFull">channelFull</a>.<code>restricted_sponsored</code> flag will be set.</p></div>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-restrict-sponsored-level-min"><code>channel_restrict_sponsored_level_min</code> »</a> config parameter, channel owners may disable ads on the channel for all users using <a href="/method/channels.restrictSponsoredMessages">channels.restrictSponsoredMessages</a>. </p>
<p>If ads are disabled on the channel, the <a href="/constructor/channelFull">channelFull</a>.<code>restricted_sponsored</code> flag will be set (owners only).</p></div>
</div>

View file

@ -149,12 +149,12 @@
<tr>
<td><strong>restricted_sponsored</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.11?<a href="/constructor/true">true</a></td>
<td> </td>
<td>Whether ads on this channel were <a href="/api/boost#disable-ads-on-the-channel">disabled as specified here »</a> (this flag is only visible to the owner of the channel).</td>
</tr>
<tr>
<td><strong>can_view_revenue</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.12?<a href="/constructor/true">true</a></td>
<td> </td>
<td>If set, this user can view <a href="/api/revenue">ad revenue statistics »</a> for this channel.</td>
</tr>
<tr>
<td><strong>id</strong></td>
@ -383,6 +383,11 @@
<h4><a class="anchor" href="#channelstoggleviewforumasmessages" id="channelstoggleviewforumasmessages" name="channelstoggleviewforumasmessages"><i class="anchor-icon"></i></a><a href="/method/channels.toggleViewForumAsMessages">channels.toggleViewForumAsMessages</a></h4>
<p>Users may also choose to display messages from all topics of a <a href="/api/forum">forum</a> as if they were sent to a normal group, using a "View as messages" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method.</p>
<p>Invoking this method will update the value of the <code>view_forum_as_messages</code> flag of <a href="/constructor/channelFull">channelFull</a> or <a href="/constructor/dialog">dialog</a> and emit an <a href="/constructor/updateChannelViewForumAsMessages">updateChannelViewForumAsMessages</a>.</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>
<h4><a class="anchor" href="#channel-ad-revenue" id="channel-ad-revenue" name="channel-ad-revenue"><i class="anchor-icon"></i></a><a href="/api/revenue">Channel ad revenue</a></h4>
<p>Telegram has one of the <strong>most generous reward systems</strong> in the history of social media. Telegram channel owners can now receive <strong>50%</strong> of the revenue from ads displayed in their channels.</p>
<p>This page describes the methods used to withdraw channel ad revenue, as well as view detailed revenue stats.</p>
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</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>
@ -403,8 +408,6 @@
<p>Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.</p>
<h4><a class="anchor" href="#wallpapers" id="wallpapers" name="wallpapers"><i class="anchor-icon"></i></a><a href="/api/wallpapers">Wallpapers</a></h4>
<p>Telegram apps support generating, sharing and synchronizing chat backgrounds.</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>
<h4><a class="anchor" href="#custom-emojis" id="custom-emojis" name="custom-emojis"><i class="anchor-icon"></i></a><a href="/api/custom-emoji">Custom emojis</a></h4>
<p>Telegram allows including animated and static custom emojis inside of messages.</p>
<h4><a class="anchor" href="#channelssetemojistickers" id="channelssetemojistickers" name="channelssetemojistickers"><i class="anchor-icon"></i></a><a href="/method/channels.setEmojiStickers">channels.setEmojiStickers</a></h4>

View file

@ -4,26 +4,10 @@
<meta charset="utf-8">
<title>messages.availableEffects</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
hash
int
Hash for pagination, for more info click here
effects
Vector&lt;AvailableEffect&gt;…">
<meta property="description" content="The full list of usable animated message effects ».">
<meta property="og:title" content="messages.availableEffects">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
hash
int
Hash for pagination, for more info click here
effects
Vector&lt;AvailableEffect&gt;…">
<meta property="og:description" content="The full list of usable animated message effects ».">
<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">
@ -58,7 +42,8 @@ Vector&lt;AvailableEffect&gt;…">
<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/messages.availableEffects" >messages.availableEffects</a></li></ul></div>
<h1 id="dev_page_title">messages.availableEffects</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>The full list of usable <a href="/api/effects">animated message effects »</a>.</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 181 <b class="caret"></b></a>
@ -89,12 +74,12 @@ Vector&lt;AvailableEffect&gt;…">
<tr>
<td><strong>effects</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/AvailableEffect">AvailableEffect</a>&gt;</td>
<td> </td>
<td>Message effects</td>
</tr>
<tr>
<td><strong>documents</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/Document">Document</a>&gt;</td>
<td> </td>
<td>Documents specified in the <code>effects</code> constructors.</td>
</tr>
</tbody>
</table>
@ -102,7 +87,9 @@ Vector&lt;AvailableEffect&gt;…">
<p><a href="/type/messages.AvailableEffects">messages.AvailableEffects</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="#pagination-in-the-api" id="pagination-in-the-api" name="pagination-in-the-api"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination in the API</a></h4>
<p>How to fetch results from large lists of objects.</p></div>
<p>How to fetch results from large lists of objects.</p>
<h4><a class="anchor" href="#animated-message-effects" id="animated-message-effects" name="animated-message-effects"><i class="anchor-icon"></i></a><a href="/api/effects">Animated message effects</a></h4>
<p>Telegram allows adding spectacular <strong>animated effects</strong> to messages you send.</p></div>
</div>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>channels.restrictSponsoredMessages</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Reduce ads on the specified channel, for all users. Available only after reaching at least the boost level » specified in the channel_restrict_sponsored_level_min » config parameter.">
<meta property="description" content="Disable ads on the specified channel, for all users. Available only after reaching at least the boost level » specified in the channel_restrict_sponsored_level_min » config parameter.">
<meta property="og:title" content="channels.restrictSponsoredMessages">
<meta property="og:image" content="">
<meta property="og:description" content="Reduce ads on the specified channel, for all users. Available only after reaching at least the boost level » specified in the channel_restrict_sponsored_level_min » config parameter.">
<meta property="og:description" content="Disable ads on the specified channel, for all users. Available only after reaching at least the boost level » specified in the channel_restrict_sponsored_level_min » config parameter.">
<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">
@ -42,7 +42,7 @@
<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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/channels.restrictSponsoredMessages" >channels.restrictSponsoredMessages</a></li></ul></div>
<h1 id="dev_page_title">channels.restrictSponsoredMessages</h1>
<div id="dev_page_content"><p>Reduce ads on the specified channel, for all users.</p>
<div id="dev_page_content"><p>Disable ads on the specified channel, for all users.</p>
<p>Available only after reaching at least the <a href="/api/boost">boost level »</a> specified in the <a href="/api/config#channel-restrict-sponsored-level-min"><code>channel_restrict_sponsored_level_min</code> »</a> config parameter.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">

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 BC 40 0C 00 79 C9 96 66
0010 | 14 00 00 00 F1 8E 7E BE 24 E5 EC 8F 78 78 D3 00
0020 | 29 35 AF 06 12 85 0C BC</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 60 8D 08 00 B3 CB 96 66
0010 | 14 00 00 00 F1 8E 7E BE 4D 1C B7 28 44 DE 76 80
0020 | 1B C0 99 E2 67 2E CB A5</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>BC400C0079C99666</code></td>
<td><code>608D0800B3CB9666</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>24E5EC8F7878D3002935AF0612850CBC</code></td>
<td><code>4D1CB72844DE76801BC099E2672ECBA5</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 FC 92 CE 79 C9 96 66
0010 | B0 00 00 00 63 24 16 05 24 E5 EC 8F 78 78 D3 00
0020 | 29 35 AF 06 12 85 0C BC 4F 96 A4 2F 94 06 10 78
0030 | 84 FA A9 F9 69 30 65 C6 08 1A 23 D2 33 31 C7 F1
0040 | 37 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 4C 1B 4B B3 CB 96 66
0010 | 78 00 00 00 63 24 16 05 4D 1C B7 28 44 DE 76 80
0020 | 1B C0 99 E2 67 2E CB A5 4D 35 E8 A8 DE AA 39 AA
0030 | 5D F2 BF 85 78 8B 77 25 08 16 31 F9 E6 DF 5F 7C
0040 | B3 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>01FC92CE79C99666</code></td>
<td><code>014C1B4BB3CB9666</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>B0000000</code> (176 in decimal)</td>
<td><code>78000000</code> (120 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>24E5EC8F7878D3002935AF0612850CBC</code></td>
<td><code>4D1CB72844DE76801BC099E2672ECBA5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>4F96A42F9406107884FAA9F9693065C6</code></td>
<td><code>4D35E8A8DEAA39AA5DF2BF85788B7725</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>081A23D23331C7F137000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1883580186491351351</td>
<td><code>081631F9E6DF5F7CB3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1599334112678608051</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 = 1883580186491351351</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1883580186491351351 = 1128765499 * 1668708149</code></p>
<pre><code>p = 1128765499
q = 1668708149</code></pre>
<pre><code>pq = 1599334112678608051</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1599334112678608051 = 1022618293 * 1563960007</code></p>
<pre><code>p = 1022618293
q = 1563960007</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 1A 23 D2 33 31 C7 F1 37 00 00 00
0010 | 04 43 47 98 3B 00 00 00 04 63 76 77 35 00 00 00
0020 | 24 E5 EC 8F 78 78 D3 00 29 35 AF 06 12 85 0C BC
0030 | 4F 96 A4 2F 94 06 10 78 84 FA A9 F9 69 30 65 C6
0040 | 93 94 96 C1 D9 D5 74 29 39 BC A4 3C 8C B2 F9 FB
0050 | 6F 33 13 7D 3F DC 05 3E 8F 3D B9 60 23 5C 0B 48
<pre><code>0000 | 95 5F F5 A9 08 16 31 F9 E6 DF 5F 7C B3 00 00 00
0010 | 04 3C F3 EA B5 00 00 00 04 5D 38 22 C7 00 00 00
0020 | 4D 1C B7 28 44 DE 76 80 1B C0 99 E2 67 2E CB A5
0030 | 4D 35 E8 A8 DE AA 39 AA 5D F2 BF 85 78 8B 77 25
0040 | CE D7 B5 85 FF 04 84 46 48 7D 82 84 13 B6 23 C0
0050 | 0B 0F 48 1A D6 EA 0A 3F D9 59 86 BC D1 6F B5 28
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 = 1668708149</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>081A23D23331C7F137000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1883580186491351351</td>
<td><code>081631F9E6DF5F7CB3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1599334112678608051</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>044347983B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1128765499</td>
<td><code>043CF3EAB5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1022618293</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>0463767735000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1668708149</td>
<td><code>045D3822C7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1563960007</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>24E5EC8F7878D3002935AF0612850CBC</code></td>
<td><code>4D1CB72844DE76801BC099E2672ECBA5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>4F96A42F9406107884FAA9F9693065C6</code></td>
<td><code>4D35E8A8DEAA39AA5DF2BF85788B7725</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>939496C1D9D5742939BCA43C8CB2F9FB</code> <code>6F33137D3FDC053E8F3DB960235C0B48</code></td>
<td><code>CED7B585FF048446487D828413B623C0</code> <code>0B0F481AD6EA0A3FD95986BCD16FB528</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1668708149</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 = 955FF5A9081A23D23331C7F137000000044347983B000000046376773500000024E5EC8F7878D3002935AF0612850CBC4F96A42F9406107884FAA9F9693065C6939496C1D9D5742939BCA43C8CB2F9FB6F33137D3FDC053E8F3DB960235C0B4802000000
random_padding_bytes = 33CC1AC933811C9F2595F588D7116DAB038CAE4FC5F54EA41AD37BD4AEC1D3BE930F1248D18533299D9D1E5C2D6024E657C3BA150891EB1BE352890C8556F61FDB056B9A03CDBAB10859A4C8074277B7AC5BF85662125486FE07772E</code></pre>
<pre><code>data = 955FF5A9081631F9E6DF5F7CB3000000043CF3EAB5000000045D3822C70000004D1CB72844DE76801BC099E2672ECBA54D35E8A8DEAA39AA5DF2BF85788B7725CED7B585FF048446487D828413B623C00B0F481AD6EA0A3FD95986BCD16FB52802000000
random_padding_bytes = 5F30124D2F41E7C46C7161F32E28E709051744E278E304A58410ED4F71ED12C229BBAF08CCAEAAC1BC74879293FEC0336B4388454627357966ED32EA1A2CD1AF549652FAF720EC46510DEE64886AD8B2A15307226E12A69E27350DF0</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 = 9A9805F60AC0B64DB4A482F66A7B7A4FD719BD95604CD075B34259F9E592352F8EBD2BB6E500273E92951E3D0E8DAB326E30CCCDB7B2359F54881818082105C6BF236C1D86F0E92742CBD9B94E2D38BDAD4937869F2C6F37513DE8A9198085972363CC162FA2A63811F40DB3AE05D88BF059FB0DDA2F6E1E2ECD86C5C9E7FC1046A3CD665A701A14BB1276B6E5E0666BD8CBB9DC26E90D87479CF6A5B2F244368DDF8A61F149FD76C76CDE3B24823F4423AB4A755EE4DCDE8DD84670E46F8E0756E48CA91189C3D480A716FC5ABDE0FE5EAD6280CF56C7F5237A8F2ADB95F7E67A5B4B10E17777E557961FE857E780EDA6B742594CD667E99DF298C36B67E7CD</code></pre>
<pre><code>encrypted_data = 6847B76DE5E9C45E0C06C0990EA19274109FB5709139AF1C32B6483F79003FF0C168D76DD812B5D18950A88B859F2325EF639B32DECA05BA81AFA38A4E0C5CBFF599C1EBE9842BFAD83F46A3BB054EEE99EF5B757159759BF9EBC72B125FE56D03F8300D7A30A6A6793536589E564FB9CCDBB3DF83EA7425432482AC35AB22AD4971A597E2959B2D998DC55B1F287D8378EB9DE6A33923C5477F9F74BC7D43C479540BE9E0551D9BB22AB5D0136CC96999624B03A0A0AF9B224AE60892EB1A33FE08E2CECAC96EF64DFA952ECF83134C4E712561FC4FFA31AF28D30A4DFC82F7B8681DDE83D292F678DD617595232B60CD9A8B73A04ACB55916AFFC80515DCFE</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 C0 40 0C 00 79 C9 96 66
0010 | 40 01 00 00 BE E4 12 D7 24 E5 EC 8F 78 78 D3 00
0020 | 29 35 AF 06 12 85 0C BC 4F 96 A4 2F 94 06 10 78
0030 | 84 FA A9 F9 69 30 65 C6 04 43 47 98 3B 00 00 00
0040 | 04 63 76 77 35 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 9A 98 05 F6 0A C0 B6 4D B4 A4 82 F6
0060 | 6A 7B 7A 4F D7 19 BD 95 60 4C D0 75 B3 42 59 F9
0070 | E5 92 35 2F 8E BD 2B B6 E5 00 27 3E 92 95 1E 3D
0080 | 0E 8D AB 32 6E 30 CC CD B7 B2 35 9F 54 88 18 18
0090 | 08 21 05 C6 BF 23 6C 1D 86 F0 E9 27 42 CB D9 B9
00A0 | 4E 2D 38 BD AD 49 37 86 9F 2C 6F 37 51 3D E8 A9
00B0 | 19 80 85 97 23 63 CC 16 2F A2 A6 38 11 F4 0D B3
00C0 | AE 05 D8 8B F0 59 FB 0D DA 2F 6E 1E 2E CD 86 C5
00D0 | C9 E7 FC 10 46 A3 CD 66 5A 70 1A 14 BB 12 76 B6
00E0 | E5 E0 66 6B D8 CB B9 DC 26 E9 0D 87 47 9C F6 A5
00F0 | B2 F2 44 36 8D DF 8A 61 F1 49 FD 76 C7 6C DE 3B
0100 | 24 82 3F 44 23 AB 4A 75 5E E4 DC DE 8D D8 46 70
0110 | E4 6F 8E 07 56 E4 8C A9 11 89 C3 D4 80 A7 16 FC
0120 | 5A BD E0 FE 5E AD 62 80 CF 56 C7 F5 23 7A 8F 2A
0130 | DB 95 F7 E6 7A 5B 4B 10 E1 77 77 E5 57 96 1F E8
0140 | 57 E7 80 ED A6 B7 42 59 4C D6 67 E9 9D F2 98 C3
0150 | 6B 67 E7 CD</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 64 8D 08 00 B3 CB 96 66
0010 | 40 01 00 00 BE E4 12 D7 4D 1C B7 28 44 DE 76 80
0020 | 1B C0 99 E2 67 2E CB A5 4D 35 E8 A8 DE AA 39 AA
0030 | 5D F2 BF 85 78 8B 77 25 04 3C F3 EA B5 00 00 00
0040 | 04 5D 38 22 C7 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 68 47 B7 6D E5 E9 C4 5E 0C 06 C0 99
0060 | 0E A1 92 74 10 9F B5 70 91 39 AF 1C 32 B6 48 3F
0070 | 79 00 3F F0 C1 68 D7 6D D8 12 B5 D1 89 50 A8 8B
0080 | 85 9F 23 25 EF 63 9B 32 DE CA 05 BA 81 AF A3 8A
0090 | 4E 0C 5C BF F5 99 C1 EB E9 84 2B FA D8 3F 46 A3
00A0 | BB 05 4E EE 99 EF 5B 75 71 59 75 9B F9 EB C7 2B
00B0 | 12 5F E5 6D 03 F8 30 0D 7A 30 A6 A6 79 35 36 58
00C0 | 9E 56 4F B9 CC DB B3 DF 83 EA 74 25 43 24 82 AC
00D0 | 35 AB 22 AD 49 71 A5 97 E2 95 9B 2D 99 8D C5 5B
00E0 | 1F 28 7D 83 78 EB 9D E6 A3 39 23 C5 47 7F 9F 74
00F0 | BC 7D 43 C4 79 54 0B E9 E0 55 1D 9B B2 2A B5 D0
0100 | 13 6C C9 69 99 62 4B 03 A0 A0 AF 9B 22 4A E6 08
0110 | 92 EB 1A 33 FE 08 E2 CE CA C9 6E F6 4D FA 95 2E
0120 | CF 83 13 4C 4E 71 25 61 FC 4F FA 31 AF 28 D3 0A
0130 | 4D FC 82 F7 B8 68 1D DE 83 D2 92 F6 78 DD 61 75
0140 | 95 23 2B 60 CD 9A 8B 73 A0 4A CB 55 91 6A FF C8
0150 | 05 15 DC FE</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 = 33CC1AC933811C9F2595F588D7116DAB038CAE4FC5F54EA41AD37BD4A
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>C0400C0079C99666</code></td>
<td><code>648D0800B3CB9666</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 = 33CC1AC933811C9F2595F588D7116DAB038CAE4FC5F54EA41AD37BD4A
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>24E5EC8F7878D3002935AF0612850CBC</code></td>
<td><code>4D1CB72844DE76801BC099E2672ECBA5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>4F96A42F9406107884FAA9F9693065C6</code></td>
<td><code>4D35E8A8DEAA39AA5DF2BF85788B7725</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>044347983B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1128765499</td>
<td><code>043CF3EAB5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1022618293</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>0463767735000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1668708149</td>
<td><code>045D3822C7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1563960007</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 = 33CC1AC933811C9F2595F588D7116DAB038CAE4FC5F54EA41AD37BD4A
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001009A9805F60AC0B64DB4A482F6</code> <code>6A7B7A4FD719BD95604CD075B34259F9</code> <code>E592352F8EBD2BB6E500273E92951E3D</code> <code>0E8DAB326E30CCCDB7B2359F54881818</code> <code>082105C6BF236C1D86F0E92742CBD9B9</code> <code>4E2D38BDAD4937869F2C6F37513DE8A9</code> <code>198085972363CC162FA2A63811F40DB3</code> <code>AE05D88BF059FB0DDA2F6E1E2ECD86C5</code> <code>C9E7FC1046A3CD665A701A14BB1276B6</code> <code>E5E0666BD8CBB9DC26E90D87479CF6A5</code> <code>B2F244368DDF8A61F149FD76C76CDE3B</code> <code>24823F4423AB4A755EE4DCDE8DD84670</code> <code>E46F8E0756E48CA91189C3D480A716FC</code> <code>5ABDE0FE5EAD6280CF56C7F5237A8F2A</code> <code>DB95F7E67A5B4B10E17777E557961FE8</code> <code>57E780EDA6B742594CD667E99DF298C3</code><br> <code>6B67E7CD</code></td>
<td><code>FE0001006847B76DE5E9C45E0C06C099</code> <code>0EA19274109FB5709139AF1C32B6483F</code> <code>79003FF0C168D76DD812B5D18950A88B</code> <code>859F2325EF639B32DECA05BA81AFA38A</code> <code>4E0C5CBFF599C1EBE9842BFAD83F46A3</code> <code>BB054EEE99EF5B757159759BF9EBC72B</code> <code>125FE56D03F8300D7A30A6A679353658</code> <code>9E564FB9CCDBB3DF83EA7425432482AC</code> <code>35AB22AD4971A597E2959B2D998DC55B</code> <code>1F287D8378EB9DE6A33923C5477F9F74</code> <code>BC7D43C479540BE9E0551D9BB22AB5D0</code> <code>136CC96999624B03A0A0AF9B224AE608</code> <code>92EB1A33FE08E2CECAC96EF64DFA952E</code> <code>CF83134C4E712561FC4FFA31AF28D30A</code> <code>4DFC82F7B8681DDE83D292F678DD6175</code> <code>95232B60CD9A8B73A04ACB55916AFFC8</code><br> <code>0515DCFE</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 33CC1AC933811C9F2595F588D7116DAB038CAE4FC5F54EA41AD37BD4A
<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 68 02 99 7A C9 96 66
0010 | C8 02 00 00 5C 07 E8 D0 24 E5 EC 8F 78 78 D3 00
0020 | 29 35 AF 06 12 85 0C BC 4F 96 A4 2F 94 06 10 78
0030 | 84 FA A9 F9 69 30 65 C6 FE 50 02 00 06 C6 58 5F
0040 | DE 86 93 32 3C 6A 3B 68 39 82 93 0D 3F 3A 07 CA
0050 | 36 65 A5 05 12 D7 5A F0 4D EE 7A 3A 0B 4D 87 EB
0060 | 30 12 96 9F 13 27 0B 77 DD 63 9E 9F 43 1F BB 8F
0070 | 1D A0 36 99 E4 FE DA C3 0A C4 85 09 90 99 73 86
0080 | 60 7D AD DC 79 C6 FC 1E 17 96 9C AC 06 90 4D AB
0090 | A1 96 80 5D 02 C5 EB ED 27 80 B4 13 F4 1C 8A C2
00A0 | AC 7C 7B 72 7B B6 E2 F0 EB F7 BF E3 8E 4F 92 2A
00B0 | 89 1A A4 51 8F 33 E3 DF B8 69 53 4E 03 93 82 77
00C0 | 1A 94 86 70 E2 39 D1 DB 7A 6B B3 A2 22 F7 8F CF
00D0 | 65 4E 1B 98 45 D5 38 BE 3B 45 D8 D2 C0 E4 E0 BC
00E0 | BF CE 0F 37 3E AA D1 A6 DC 13 4C 33 66 E5 06 E9
00F0 | 23 D9 AA BE A5 3A C3 CE 4B CC F3 A6 7B 08 64 A6
0100 | 6D BA C6 99 FA 6D B4 58 44 96 5B 1F CD 6F 0D D0
0110 | 09 1B DA 60 36 3A 03 82 B8 DB 28 95 81 54 0B E9
0120 | 74 41 4C 9C 12 53 E7 FC 56 34 43 3D B5 CC A4 20
0130 | AF 6C FB DD 98 5A D1 90 53 97 AF 59 89 DA F0 F8
0140 | 08 F4 16 E3 6D 7A 96 6F E1 DE 1E 38 9B 81 B6 C1
0150 | C3 53 B4 2A 80 2B 6F 85 D7 F6 BE 6C 1D D3 D2 AA
0160 | 81 29 97 0D 14 F9 85 AB 51 72 7A 75 5E 7B D1 F0
0170 | BA CB 41 7F 96 44 C2 31 B6 B0 C5 C7 0B EE D2 24
0180 | 17 B3 E8 9C 80 CC 8C C4 14 BC 32 36 95 ED 7D 71
0190 | FF 20 B6 4E 9E 42 B2 7A F5 03 0C 73 9F A1 57 AD
01A0 | 32 21 93 A0 D1 B9 51 D7 D9 57 D7 0C C6 50 34 2D
01B0 | B4 03 87 05 16 5E 64 BA DC D7 15 57 42 2A 98 55
01C0 | 61 BD EB A5 A0 70 9C 35 0E F9 82 ED E4 5D 28 58
01D0 | 4B 27 C2 06 27 3B AE 0F E6 18 EA 94 9E 36 AC DA
01E0 | 3F D1 A5 1F A5 F2 BE 00 11 79 B5 77 79 8E 14 71
01F0 | 5A 14 EC C8 18 4A DA C6 3C 71 E2 3B AF 93 BB 8E
0200 | 13 17 02 8C 3E 46 26 2E AD AA 22 F6 5F A4 09 D0
0210 | 0C BD EC E6 CF D8 9E 09 20 52 B8 5E F4 B3 30 E6
0220 | 68 45 30 4B DB 34 76 2F 9E 8B 8C 0B 24 D6 3C 15
0230 | 6D EA 26 BB 1D D4 33 D7 88 7C BB DF 19 F4 C2 11
0240 | 2F 21 D0 12 2A E0 A4 F1 D8 CD 96 4E 02 5E B9 37
0250 | E1 36 8C 29 06 AF 6D E2 38 65 80 A8 AB 01 16 74
0260 | 1B 98 A3 86 F1 42 0A DC 2B 75 B3 19 84 27 B0 8E
0270 | 45 B9 43 A5 E3 91 9D FB F2 F1 94 58 A2 06 23 3A
0280 | 1A 3B 5B 44 F8 34 A3 29 80 B7 EF 83</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 30 69 1A B4 CB 96 66
0010 | F4 02 00 00 5C 07 E8 D0 4D 1C B7 28 44 DE 76 80
0020 | 1B C0 99 E2 67 2E CB A5 4D 35 E8 A8 DE AA 39 AA
0030 | 5D F2 BF 85 78 8B 77 25 FE 50 02 00 48 6F 87 03
0040 | A0 32 C3 10 0A 5B A2 54 34 8B D8 EC 52 84 B2 ED
0050 | 9A D7 A8 AF FC 8F 19 2F DA 7A ED 00 F8 C5 CB D7
0060 | 59 F3 5B 45 C9 37 0E A2 7E 8B 1B 83 B6 AA 60 53
0070 | 6D FB B8 58 A4 04 C9 61 BE F1 0D 70 C2 A3 D0 8A
0080 | 19 7C 3A 2C F8 A0 7D 71 26 D9 BE 10 C6 F4 F4 8E
0090 | 86 12 93 E1 D4 1C 08 B1 4D CA 4A 29 94 29 7A 7C
00A0 | 40 E9 DA 11 A4 45 CC 85 C5 DF 1C 6B 01 5F 8D 19
00B0 | 8A B0 80 F2 AD AB 74 E2 74 BF 81 CB 7A E1 41 58
00C0 | 4A 04 31 BC E3 25 8B 2D 53 D4 4F 5B 85 36 B2 D7
00D0 | 35 ED 45 2D F2 41 A1 24 04 3E BB 73 9B A4 3B 60
00E0 | 3F 17 35 97 4C 07 66 C7 23 ED AC B7 F4 0A 3B 8C
00F0 | 07 56 B0 54 41 0E AD 94 C3 97 78 E1 B4 AD 06 E1
0100 | F7 B6 39 99 F8 4A F4 4A 12 1E 4B 3D 24 FB D2 4A
0110 | 55 5F 62 D2 D5 2D 6B D9 D9 36 97 1D F3 31 75 6C
0120 | 22 34 88 97 01 8B 35 4B A5 1B 4D AF 23 74 E3 48
0130 | 3B 0B F1 52 88 E8 59 7E A1 FA 20 DC 6B A2 03 E0
0140 | 02 FF C3 31 EA 1C BE 17 E3 D8 B8 9D C0 3C 48 3C
0150 | A9 A8 61 1C 01 CF F5 AE B9 2C 4E B6 3A 37 FE 72
0160 | 87 52 BB F9 6B 7E 72 89 F4 00 8D 65 FB 7B 6D E1
0170 | 4D EF 6A 7B AF 3A 2B 01 B1 90 1B C8 DB 2F 33 F8
0180 | 0F 68 97 63 BD BA D8 2E 86 61 03 46 CF 7E 59 94
0190 | B1 22 82 DE 28 74 7E 3C AC 30 5B A3 1A CA 83 8C
01A0 | E5 4E 71 41 7F 99 BC E8 47 65 E1 49 AB BC 30 8E
01B0 | ED C9 73 3A 27 89 EE D8 45 E1 70 A3 CD DF F9 4D
01C0 | 87 16 8C F8 D8 33 B3 0A D1 6A 68 67 F6 CB DB CA
01D0 | 91 A5 3F 08 79 02 FB CD B2 79 AA 16 F1 32 CC E2
01E0 | 6A 9C 1B 09 BB EC 85 DE 47 A4 EA 2F DE 3F 2B 77
01F0 | 97 80 23 A9 78 93 38 E7 61 83 6D DF 55 77 33 E9
0200 | 20 29 BE F2 42 88 76 F0 D2 C5 D4 66 3C 41 D8 3A
0210 | 02 7D F1 A3 FB BF 9F 7B 68 1F BE 00 9A 83 98 B8
0220 | 36 4F 11 B8 7B A6 5C CB B9 C1 F3 43 31 E1 CC 43
0230 | 00 A3 A5 0F CC 4B 7C 6F 32 62 3B 15 F0 F0 34 9C
0240 | EC E3 83 1C DE C2 CB F1 A5 8D 1D 7F 4E 9A FD 6E
0250 | B4 AD 05 42 09 DD DE FF 7E C0 78 C4 5D 77 28 C5
0260 | 3F 47 44 2C EA 7A 25 16 D2 F4 8E 35 B4 B7 C1 B3
0270 | 15 34 32 21 21 DB 0C 06 7C E8 AB 04 3A 7D EB 35
0280 | 17 1B B2 8D 41 A1 70 C1 45 91 A2 5C</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 = 33CC1AC933811C9F2595F588D7116DAB038CAE4FC5F54EA41AD37BD4A
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>016802997AC99666</code></td>
<td><code>0130691AB4CB9666</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>C8020000</code> (712 in decimal)</td>
<td><code>F4020000</code> (756 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 33CC1AC933811C9F2595F588D7116DAB038CAE4FC5F54EA41AD37BD4A
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>24E5EC8F7878D3002935AF0612850CBC</code></td>
<td><code>4D1CB72844DE76801BC099E2672ECBA5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>4F96A42F9406107884FAA9F9693065C6</code></td>
<td><code>4D35E8A8DEAA39AA5DF2BF85788B7725</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE50020006C6585FDE8693323C6A3B68</code> <code>3982930D3F3A07CA3665A50512D75AF0</code> <code>4DEE7A3A0B4D87EB3012969F13270B77</code> <code>DD639E9F431FBB8F1DA03699E4FEDAC3</code> <code>0AC4850990997386607DADDC79C6FC1E</code> <code>17969CAC06904DABA196805D02C5EBED</code> <code>2780B413F41C8AC2AC7C7B727BB6E2F0</code> <code>EBF7BFE38E4F922A891AA4518F33E3DF</code> <code>B869534E039382771A948670E239D1DB</code> <code>7A6BB3A222F78FCF654E1B9845D538BE</code> <code>3B45D8D2C0E4E0BCBFCE0F373EAAD1A6</code> <code>DC134C3366E506E923D9AABEA53AC3CE</code> <code>4BCCF3A67B0864A66DBAC699FA6DB458</code> <code>44965B1FCD6F0DD0091BDA60363A0382</code> <code>B8DB289581540BE974414C9C1253E7FC</code> <code>5634433DB5CCA420AF6CFBDD985AD190</code> <code>5397AF5989DAF0F808F416E36D7A966F</code> <code>E1DE1E389B81B6C1C353B42A802B6F85</code> <code>D7F6BE6C1DD3D2AA8129970D14F985AB</code> <code>51727A755E7BD1F0BACB417F9644C231</code> <code>B6B0C5C70BEED22417B3E89C80CC8CC4</code> <code>14BC323695ED7D71FF20B64E9E42B27A</code> <code>F5030C739FA157AD322193A0D1B951D7</code> <code>D957D70CC650342DB4038705165E64BA</code> <code>DCD71557422A985561BDEBA5A0709C35</code> <code>0EF982EDE45D28584B27C206273BAE0F</code> <code>E618EA949E36ACDA3FD1A51FA5F2BE00</code> <code>1179B577798E14715A14ECC8184ADAC6</code> <code>3C71E23BAF93BB8E1317028C3E46262E</code> <code>ADAA22F65FA409D00CBDECE6CFD89E09</code> <code>2052B85EF4B330E66845304BDB34762F</code> <code>9E8B8C0B24D63C156DEA26BB1DD433D7</code> <code>887CBBDF19F4C2112F21D0122AE0A4F1</code> <code>D8CD964E025EB937E1368C2906AF6DE2</code> <code>386580A8AB0116741B98A386F1420ADC</code> <code>2B75B3198427B08E45B943A5E3919DFB</code> <code>F2F19458A206233A1A3B5B44F834A329</code><br> <code>80B7EF83</code></td>
<td><code>FE500200486F8703A032C3100A5BA254</code> <code>348BD8EC5284B2ED9AD7A8AFFC8F192F</code> <code>DA7AED00F8C5CBD759F35B45C9370EA2</code> <code>7E8B1B83B6AA60536DFBB858A404C961</code> <code>BEF10D70C2A3D08A197C3A2CF8A07D71</code> <code>26D9BE10C6F4F48E861293E1D41C08B1</code> <code>4DCA4A2994297A7C40E9DA11A445CC85</code> <code>C5DF1C6B015F8D198AB080F2ADAB74E2</code> <code>74BF81CB7AE141584A0431BCE3258B2D</code> <code>53D44F5B8536B2D735ED452DF241A124</code> <code>043EBB739BA43B603F1735974C0766C7</code> <code>23EDACB7F40A3B8C0756B054410EAD94</code> <code>C39778E1B4AD06E1F7B63999F84AF44A</code> <code>121E4B3D24FBD24A555F62D2D52D6BD9</code> <code>D936971DF331756C22348897018B354B</code> <code>A51B4DAF2374E3483B0BF15288E8597E</code> <code>A1FA20DC6BA203E002FFC331EA1CBE17</code> <code>E3D8B89DC03C483CA9A8611C01CFF5AE</code> <code>B92C4EB63A37FE728752BBF96B7E7289</code> <code>F4008D65FB7B6DE14DEF6A7BAF3A2B01</code> <code>B1901BC8DB2F33F80F689763BDBAD82E</code> <code>86610346CF7E5994B12282DE28747E3C</code> <code>AC305BA31ACA838CE54E71417F99BCE8</code> <code>4765E149ABBC308EEDC9733A2789EED8</code> <code>45E170A3CDDFF94D87168CF8D833B30A</code> <code>D16A6867F6CBDBCA91A53F087902FBCD</code> <code>B279AA16F132CCE26A9C1B09BBEC85DE</code> <code>47A4EA2FDE3F2B77978023A9789338E7</code> <code>61836DDF557733E92029BEF2428876F0</code> <code>D2C5D4663C41D83A027DF1A3FBBF9F7B</code> <code>681FBE009A8398B8364F11B87BA65CCB</code> <code>B9C1F34331E1CC4300A3A50FCC4B7C6F</code> <code>32623B15F0F0349CECE3831CDEC2CBF1</code> <code>A58D1D7F4E9AFD6EB4AD054209DDDEFF</code> <code>7EC078C45D7728C53F47442CEA7A2516</code> <code>D2F48E35B4B7C1B31534322121DB0C06</code> <code>7CE8AB043A7DEB35171BB28D41A170C1</code><br> <code>4591A25C</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 33CC1AC933811C9F2595F588D7116DAB038CAE4FC5F54EA41AD37BD4A
<!-- 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 = 06C6585FDE8693323C6A3B683982930D3F3A07CA3665A50512D75AF04DEE7A3A0B4D87EB3012969F13270B77DD639E9F431FBB8F1DA03699E4FEDAC30AC4850990997386607DADDC79C6FC1E17969CAC06904DABA196805D02C5EBED2780B413F41C8AC2AC7C7B727BB6E2F0EBF7BFE38E4F922A891AA4518F33E3DFB869534E039382771A948670E239D1DB7A6BB3A222F78FCF654E1B9845D538BE3B45D8D2C0E4E0BCBFCE0F373EAAD1A6DC134C3366E506E923D9AABEA53AC3CE4BCCF3A67B0864A66DBAC699FA6DB45844965B1FCD6F0DD0091BDA60363A0382B8DB289581540BE974414C9C1253E7FC5634433DB5CCA420AF6CFBDD985AD1905397AF5989DAF0F808F416E36D7A966FE1DE1E389B81B6C1C353B42A802B6F85D7F6BE6C1DD3D2AA8129970D14F985AB51727A755E7BD1F0BACB417F9644C231B6B0C5C70BEED22417B3E89C80CC8CC414BC323695ED7D71FF20B64E9E42B27AF5030C739FA157AD322193A0D1B951D7D957D70CC650342DB4038705165E64BADCD71557422A985561BDEBA5A0709C350EF982EDE45D28584B27C206273BAE0FE618EA949E36ACDA3FD1A51FA5F2BE001179B577798E14715A14ECC8184ADAC63C71E23BAF93BB8E1317028C3E46262EADAA22F65FA409D00CBDECE6CFD89E092052B85EF4B330E66845304BDB34762F9E8B8C0B24D63C156DEA26BB1DD433D7887CBBDF19F4C2112F21D0122AE0A4F1D8CD964E025EB937E1368C2906AF6DE2386580A8AB0116741B98A386F1420ADC2B75B3198427B08E45B943A5E3919DFBF2F19458A206233A1A3B5B44F834A32980B7EF83
tmp_aes_key = CBA34A0CA23CAE390443B17C123E1B2BCF07DCAC91C9376B31C61A33C610D388
tmp_aes_iv = 850ACE6466B4ECEA638E5E2A95460BF82F296AB589EE07EABFBC7821939496C1</code></pre>
<pre><code>encrypted_answer = 486F8703A032C3100A5BA254348BD8EC5284B2ED9AD7A8AFFC8F192FDA7AED00F8C5CBD759F35B45C9370EA27E8B1B83B6AA60536DFBB858A404C961BEF10D70C2A3D08A197C3A2CF8A07D7126D9BE10C6F4F48E861293E1D41C08B14DCA4A2994297A7C40E9DA11A445CC85C5DF1C6B015F8D198AB080F2ADAB74E274BF81CB7AE141584A0431BCE3258B2D53D44F5B8536B2D735ED452DF241A124043EBB739BA43B603F1735974C0766C723EDACB7F40A3B8C0756B054410EAD94C39778E1B4AD06E1F7B63999F84AF44A121E4B3D24FBD24A555F62D2D52D6BD9D936971DF331756C22348897018B354BA51B4DAF2374E3483B0BF15288E8597EA1FA20DC6BA203E002FFC331EA1CBE17E3D8B89DC03C483CA9A8611C01CFF5AEB92C4EB63A37FE728752BBF96B7E7289F4008D65FB7B6DE14DEF6A7BAF3A2B01B1901BC8DB2F33F80F689763BDBAD82E86610346CF7E5994B12282DE28747E3CAC305BA31ACA838CE54E71417F99BCE84765E149ABBC308EEDC9733A2789EED845E170A3CDDFF94D87168CF8D833B30AD16A6867F6CBDBCA91A53F087902FBCDB279AA16F132CCE26A9C1B09BBEC85DE47A4EA2FDE3F2B77978023A9789338E761836DDF557733E92029BEF2428876F0D2C5D4663C41D83A027DF1A3FBBF9F7B681FBE009A8398B8364F11B87BA65CCBB9C1F34331E1CC4300A3A50FCC4B7C6F32623B15F0F0349CECE3831CDEC2CBF1A58D1D7F4E9AFD6EB4AD054209DDDEFF7EC078C45D7728C53F47442CEA7A2516D2F48E35B4B7C1B31534322121DB0C067CE8AB043A7DEB35171BB28D41A170C14591A25C
tmp_aes_key = 4CC52DE314BD7B61B14811DD6F9DF2EF72E5D49D5AD7784699D9C8E9FB1F8990
tmp_aes_iv = 3DED1375676C6DA8205E6FCEBECF7DEB6D7B2DD03B09B98FBE93A8DBCED7B585</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = B88F80FCC66ACC005F1B21B5AA2ED052669C99D0BA0D89B524E5EC8F7878D3002935AF0612850CBC4F96A42F9406107884FAA9F9693065C603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100311E6FF1D5E5D0B8D264D0D4BA18A3706DFAF5E65E338121370BB5E3FCD91B0E5567B87BBB19BDBFF61CF62946182917DB05761FF2956FEF66D20C35CE6C5B4F535A55BDEDC960AEE8223E92B6A8A2CF98E8331FCAAE6894327A938B0EB2B208820C01689139E4EA44B42B5CD77DFE3130C0D69D70D3874F03DD15AF9835586DBFBCB07AD227C9230145B0C712B77C8440A312DC72C4A7A81D4345D12FCAE8302C5D0C218805C7B378794AFB9D9AC8F5CB7DFB2DDED5653411660763CE6501BD457C9DD4347DCFB4E311EEBC6730445B18E48DCE013A509B5F9E497766B9BBF5E500341626ECF8CCA084249D4AFE4CD2DD090C6071294588E8FC54BA5813F8F47AC99666F9248DEF2E7EDBA0
answer = BA0D89B524E5EC8F7878D3002935AF0612850CBC4F96A42F9406107884FAA9F9693065C603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100311E6FF1D5E5D0B8D264D0D4BA18A3706DFAF5E65E338121370BB5E3FCD91B0E5567B87BBB19BDBFF61CF62946182917DB05761FF2956FEF66D20C35CE6C5B4F535A55BDEDC960AEE8223E92B6A8A2CF98E8331FCAAE6894327A938B0EB2B208820C01689139E4EA44B42B5CD77DFE3130C0D69D70D3874F03DD15AF9835586DBFBCB07AD227C9230145B0C712B77C8440A312DC72C4A7A81D4345D12FCAE8302C5D0C218805C7B378794AFB9D9AC8F5CB7DFB2DDED5653411660763CE6501BD457C9DD4347DCFB4E311EEBC6730445B18E48DCE013A509B5F9E497766B9BBF5E500341626ECF8CCA084249D4AFE4CD2DD090C6071294588E8FC54BA5813F8F47AC99666F9248DEF2E7EDBA0</code></pre>
<pre><code>answer_with_hash = 7B402FAF7E1AEECF9A5287CC65BC1B84A7DA41AEBA0D89B54D1CB72844DE76801BC099E2672ECBA54D35E8A8DEAA39AA5DF2BF85788B772503000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010055B0ED467C121A0D726EFC61C454477E0984C1D323F605C11353171C5EE9807B6864C00B357E978882EF6FF6BFD6077152634FB8AF006D84663A887EDFCEEFAA47406298E5BC9A9FB07D395F4C396ECD3558283D36E850263E20D22F01497BE254D797D4C4AA681BC1A3C02A5A11829894B7F6B483735B190C2C4275BE90DAE197D8A603D1701E4100D3FABA109DC1255110EB4A1E8E21B26288A1DD07233423FF084F20100550EA018A65673FF3F5DE9E34055546A783EF8682D461C936BB4231F1812AB5E1D16FECA59C4EA2816AC08A67AEE95D9BE4E6485C5C9D038BC6FDD65807B20CD0A4E75FAF6327035A8E50781CBB1CC2050F888FDB14A7B1330F2BB4CB96664859722E5A280B1F
answer = BA0D89B54D1CB72844DE76801BC099E2672ECBA54D35E8A8DEAA39AA5DF2BF85788B772503000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010055B0ED467C121A0D726EFC61C454477E0984C1D323F605C11353171C5EE9807B6864C00B357E978882EF6FF6BFD6077152634FB8AF006D84663A887EDFCEEFAA47406298E5BC9A9FB07D395F4C396ECD3558283D36E850263E20D22F01497BE254D797D4C4AA681BC1A3C02A5A11829894B7F6B483735B190C2C4275BE90DAE197D8A603D1701E4100D3FABA109DC1255110EB4A1E8E21B26288A1DD07233423FF084F20100550EA018A65673FF3F5DE9E34055546A783EF8682D461C936BB4231F1812AB5E1D16FECA59C4EA2816AC08A67AEE95D9BE4E6485C5C9D038BC6FDD65807B20CD0A4E75FAF6327035A8E50781CBB1CC2050F888FDB14A7B1330F2BB4CB96664859722E5A280B1F</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 24 E5 EC 8F 78 78 D3 00 29 35 AF 06
0010 | 12 85 0C BC 4F 96 A4 2F 94 06 10 78 84 FA A9 F9
0020 | 69 30 65 C6 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 4D 1C B7 28 44 DE 76 80 1B C0 99 E2
0010 | 67 2E CB A5 4D 35 E8 A8 DE AA 39 AA 5D F2 BF 85
0020 | 78 8B 77 25 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 = BA0D89B524E5EC8F7878D3002935AF0612850CBC4F96A42F9406107884FAA9F9693065C
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 | 31 1E 6F F1 D5 E5 D0 B8 D2 64 D0 D4 BA 18 A3 70
0140 | 6D FA F5 E6 5E 33 81 21 37 0B B5 E3 FC D9 1B 0E
0150 | 55 67 B8 7B BB 19 BD BF F6 1C F6 29 46 18 29 17
0160 | DB 05 76 1F F2 95 6F EF 66 D2 0C 35 CE 6C 5B 4F
0170 | 53 5A 55 BD ED C9 60 AE E8 22 3E 92 B6 A8 A2 CF
0180 | 98 E8 33 1F CA AE 68 94 32 7A 93 8B 0E B2 B2 08
0190 | 82 0C 01 68 91 39 E4 EA 44 B4 2B 5C D7 7D FE 31
01A0 | 30 C0 D6 9D 70 D3 87 4F 03 DD 15 AF 98 35 58 6D
01B0 | BF BC B0 7A D2 27 C9 23 01 45 B0 C7 12 B7 7C 84
01C0 | 40 A3 12 DC 72 C4 A7 A8 1D 43 45 D1 2F CA E8 30
01D0 | 2C 5D 0C 21 88 05 C7 B3 78 79 4A FB 9D 9A C8 F5
01E0 | CB 7D FB 2D DE D5 65 34 11 66 07 63 CE 65 01 BD
01F0 | 45 7C 9D D4 34 7D CF B4 E3 11 EE BC 67 30 44 5B
0200 | 18 E4 8D CE 01 3A 50 9B 5F 9E 49 77 66 B9 BB F5
0210 | E5 00 34 16 26 EC F8 CC A0 84 24 9D 4A FE 4C D2
0220 | DD 09 0C 60 71 29 45 88 E8 FC 54 BA 58 13 F8 F4
0230 | 7A C9 96 66</code></pre>
0130 | 55 B0 ED 46 7C 12 1A 0D 72 6E FC 61 C4 54 47 7E
0140 | 09 84 C1 D3 23 F6 05 C1 13 53 17 1C 5E E9 80 7B
0150 | 68 64 C0 0B 35 7E 97 88 82 EF 6F F6 BF D6 07 71
0160 | 52 63 4F B8 AF 00 6D 84 66 3A 88 7E DF CE EF AA
0170 | 47 40 62 98 E5 BC 9A 9F B0 7D 39 5F 4C 39 6E CD
0180 | 35 58 28 3D 36 E8 50 26 3E 20 D2 2F 01 49 7B E2
0190 | 54 D7 97 D4 C4 AA 68 1B C1 A3 C0 2A 5A 11 82 98
01A0 | 94 B7 F6 B4 83 73 5B 19 0C 2C 42 75 BE 90 DA E1
01B0 | 97 D8 A6 03 D1 70 1E 41 00 D3 FA BA 10 9D C1 25
01C0 | 51 10 EB 4A 1E 8E 21 B2 62 88 A1 DD 07 23 34 23
01D0 | FF 08 4F 20 10 05 50 EA 01 8A 65 67 3F F3 F5 DE
01E0 | 9E 34 05 55 46 A7 83 EF 86 82 D4 61 C9 36 BB 42
01F0 | 31 F1 81 2A B5 E1 D1 6F EC A5 9C 4E A2 81 6A C0
0200 | 8A 67 AE E9 5D 9B E4 E6 48 5C 5C 9D 03 8B C6 FD
0210 | D6 58 07 B2 0C D0 A4 E7 5F AF 63 27 03 5A 8E 50
0220 | 78 1C BB 1C C2 05 0F 88 8F DB 14 A7 B1 33 0F 2B
0230 | B4 CB 96 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 = BA0D89B524E5EC8F7878D3002935AF0612850CBC4F96A42F9406107884FAA9F9693065C
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>24E5EC8F7878D3002935AF0612850CBC</code></td>
<td><code>4D1CB72844DE76801BC099E2672ECBA5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>4F96A42F9406107884FAA9F9693065C6</code></td>
<td><code>4D35E8A8DEAA39AA5DF2BF85788B7725</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B524E5EC8F7878D3002935AF0612850CBC4F96A42F9406107884FAA9F9693065C
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE000100311E6FF1D5E5D0B8D264D0D4</code> <code>BA18A3706DFAF5E65E338121370BB5E3</code> <code>FCD91B0E5567B87BBB19BDBFF61CF629</code> <code>46182917DB05761FF2956FEF66D20C35</code> <code>CE6C5B4F535A55BDEDC960AEE8223E92</code> <code>B6A8A2CF98E8331FCAAE6894327A938B</code> <code>0EB2B208820C01689139E4EA44B42B5C</code> <code>D77DFE3130C0D69D70D3874F03DD15AF</code> <code>9835586DBFBCB07AD227C9230145B0C7</code> <code>12B77C8440A312DC72C4A7A81D4345D1</code> <code>2FCAE8302C5D0C218805C7B378794AFB</code> <code>9D9AC8F5CB7DFB2DDED5653411660763</code> <code>CE6501BD457C9DD4347DCFB4E311EEBC</code> <code>6730445B18E48DCE013A509B5F9E4977</code> <code>66B9BBF5E500341626ECF8CCA084249D</code> <code>4AFE4CD2DD090C6071294588E8FC54BA</code><br> <code>5813F8F4</code></td>
<td><code>FE00010055B0ED467C121A0D726EFC61</code> <code>C454477E0984C1D323F605C11353171C</code> <code>5EE9807B6864C00B357E978882EF6FF6</code> <code>BFD6077152634FB8AF006D84663A887E</code> <code>DFCEEFAA47406298E5BC9A9FB07D395F</code> <code>4C396ECD3558283D36E850263E20D22F</code> <code>01497BE254D797D4C4AA681BC1A3C02A</code> <code>5A11829894B7F6B483735B190C2C4275</code> <code>BE90DAE197D8A603D1701E4100D3FABA</code> <code>109DC1255110EB4A1E8E21B26288A1DD</code> <code>07233423FF084F20100550EA018A6567</code> <code>3FF3F5DE9E34055546A783EF8682D461</code> <code>C936BB4231F1812AB5E1D16FECA59C4E</code> <code>A2816AC08A67AEE95D9BE4E6485C5C9D</code> <code>038BC6FDD65807B20CD0A4E75FAF6327</code> <code>035A8E50781CBB1CC2050F888FDB14A7</code><br> <code>B1330F2B</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>7AC99666</code> (1721158010 in decimal)</td>
<td><code>B4CB9666</code> (1721158580 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B524E5EC8F7878D3002935AF0612850CBC4F96A42F9406107884FAA9F9693065C
<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 = 7BAD48934102CE89B353C72C67EFB241BB8ABE9004BB389E8C7CE46C581D0F55F36768CCD5A79683087837BBBAAB72372E4CEBE10A9FD4C6AC4F5C4252FFBA05FFC90AB80E0824C6A7510D90A3C753FC87EEBEFF8002E2492A5EFDE70FD50C25801712000A78B6B3735E466B090C9D27619C0B0A256A2427EC3BDC4EB0D6D325064B77941F7D7A9DFF476EDDD57A666DB5D6199BCE6BC2031FCAAEA929C30C68E0E2F563C6EFEF6715C824372C4305C0AEAA64E65608B2B889B81EABC47F6A908852E28B642EBD57374F83B7FE9594CCF9EB4C58DA5663815C107BCA7D607403DA5A68053B92DB44BC6DD2AF71EA337A7FACAE47F529E8E506EFD90DEA8F5F29</code></pre>
<pre><code>b = 9D9E5FB92641D721433BD29AAE9B5F14D25CA024CE8790EC861B950D00A074F7A15853962033D53372A32A8BD7E4D66DE9576AE307175CA92ED926D4396CCC47F907F9A0AE666B1AEC45F520B456861319BF421DBE0C8316DEB4AD59E81D757B1D17333301C9649E4ABDDC12C1EE1262ED303C30CFB5B79479BCFB8AAE8C0C8F3A52A48DFC73D8C71E8D9A92843A819101065F34A70F5896DA7F20F73A20CA2AF1A13C01A1E3901D854424ADA3E2EFF1127D20C2A4F288CE5D7DB951B36A343C72087A75F1B8C24D38ACB8626BD4BDFC1CDCC642D5C69E14CE894F508DC486C175641F5C25F28315F7092E1601EF23BA07D78E1F47FD3EB6C3B575A14EF1EDDF</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 = 87603BA669EDAA7EDA5771820DE64E1261C258C0C5F22910AF325C2017DEA674BE11E3E394EEAA874FB948043A12269B927881A6D6BA817015C79F51C2140C78DF11F069B5CF5C72DE7D04E8A9CD44277DA70AB4688CBF5DA9866D5A099163EE81EAD2CD9AA9AF00E3BB69944826E607E59A78435620D084EF1D0A457087A98F5080F8AAE69CBA110CC83B31B9FC18E7154959FB1B2F3850EE0F09182D74ECCA03D18667BC625C0BD6B2E8F9FA6F4D6F4133D5720F98077DF4F6363083FF80860D53E33570AEFC575393B09557F93E83D76A120D0B0682C62CDC20FD88D67D0EE92DA0FB05C7BC22C8CE5234C77C1E4BCCEA67388675309DF2DF8370611A0622</code></pre>
<pre><code>g_b = 566EC30E615B0E69FD8048389CCC35B3F54345E2460A10AD2F72343663DAF713BBE95A2AF675E7D9FDBB5AEEAF38F8E40832CC976D535088591565CCCE85FD0A480351AE067A35055AA6EF7057E0BE6F52A86A2ADED66D2B77726E9517085C5A2C69A33FC1146E984841A0E21EDACDEBAECCAEE630AECC35184DB416026DFFA64AF738408434B9699F6F407A2A61E6279835DB556C5BDE9FBE64DC00273523594C915BA41F5B7C7329D023FDA8DA685533416C386AD888BB2482290453FABE78928843BCB5DF960B12124750AFB07276CF93A6518FF9B7DB436E596D7E7A45FEB22F3061A2C779876094E4D2748BE38CD85F511B37ABC8DAAB2F2C692A66D868</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 24 E5 EC 8F 78 78 D3 00 29 35 AF 06
0010 | 12 85 0C BC 4F 96 A4 2F 94 06 10 78 84 FA A9 F9
0020 | 69 30 65 C6 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 87 60 3B A6 69 ED AA 7E DA 57 71 82 0D E6 4E 12
0040 | 61 C2 58 C0 C5 F2 29 10 AF 32 5C 20 17 DE A6 74
0050 | BE 11 E3 E3 94 EE AA 87 4F B9 48 04 3A 12 26 9B
0060 | 92 78 81 A6 D6 BA 81 70 15 C7 9F 51 C2 14 0C 78
0070 | DF 11 F0 69 B5 CF 5C 72 DE 7D 04 E8 A9 CD 44 27
0080 | 7D A7 0A B4 68 8C BF 5D A9 86 6D 5A 09 91 63 EE
0090 | 81 EA D2 CD 9A A9 AF 00 E3 BB 69 94 48 26 E6 07
00A0 | E5 9A 78 43 56 20 D0 84 EF 1D 0A 45 70 87 A9 8F
00B0 | 50 80 F8 AA E6 9C BA 11 0C C8 3B 31 B9 FC 18 E7
00C0 | 15 49 59 FB 1B 2F 38 50 EE 0F 09 18 2D 74 EC CA
00D0 | 03 D1 86 67 BC 62 5C 0B D6 B2 E8 F9 FA 6F 4D 6F
00E0 | 41 33 D5 72 0F 98 07 7D F4 F6 36 30 83 FF 80 86
00F0 | 0D 53 E3 35 70 AE FC 57 53 93 B0 95 57 F9 3E 83
0100 | D7 6A 12 0D 0B 06 82 C6 2C DC 20 FD 88 D6 7D 0E
0110 | E9 2D A0 FB 05 C7 BC 22 C8 CE 52 34 C7 7C 1E 4B
0120 | CC EA 67 38 86 75 30 9D F2 DF 83 70 61 1A 06 22</code></pre>
<pre><code>0000 | 54 B6 43 66 4D 1C B7 28 44 DE 76 80 1B C0 99 E2
0010 | 67 2E CB A5 4D 35 E8 A8 DE AA 39 AA 5D F2 BF 85
0020 | 78 8B 77 25 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 56 6E C3 0E 61 5B 0E 69 FD 80 48 38 9C CC 35 B3
0040 | F5 43 45 E2 46 0A 10 AD 2F 72 34 36 63 DA F7 13
0050 | BB E9 5A 2A F6 75 E7 D9 FD BB 5A EE AF 38 F8 E4
0060 | 08 32 CC 97 6D 53 50 88 59 15 65 CC CE 85 FD 0A
0070 | 48 03 51 AE 06 7A 35 05 5A A6 EF 70 57 E0 BE 6F
0080 | 52 A8 6A 2A DE D6 6D 2B 77 72 6E 95 17 08 5C 5A
0090 | 2C 69 A3 3F C1 14 6E 98 48 41 A0 E2 1E DA CD EB
00A0 | AE CC AE E6 30 AE CC 35 18 4D B4 16 02 6D FF A6
00B0 | 4A F7 38 40 84 34 B9 69 9F 6F 40 7A 2A 61 E6 27
00C0 | 98 35 DB 55 6C 5B DE 9F BE 64 DC 00 27 35 23 59
00D0 | 4C 91 5B A4 1F 5B 7C 73 29 D0 23 FD A8 DA 68 55
00E0 | 33 41 6C 38 6A D8 88 BB 24 82 29 04 53 FA BE 78
00F0 | 92 88 43 BC B5 DF 96 0B 12 12 47 50 AF B0 72 76
0100 | CF 93 A6 51 8F F9 B7 DB 43 6E 59 6D 7E 7A 45 FE
0110 | B2 2F 30 61 A2 C7 79 87 60 94 E4 D2 74 8B E3 8C
0120 | D8 5F 51 1B 37 AB C8 DA AB 2F 2C 69 2A 66 D8 68</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 = BA0D89B524E5EC8F7878D3002935AF0612850CBC4F96A42F9406107884FAA9F9693065C
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>24E5EC8F7878D3002935AF0612850CBC</code></td>
<td><code>4D1CB72844DE76801BC099E2672ECBA5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>4F96A42F9406107884FAA9F9693065C6</code></td>
<td><code>4D35E8A8DEAA39AA5DF2BF85788B7725</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE00010087603BA669EDAA7EDA577182</code> <code>0DE64E1261C258C0C5F22910AF325C20</code> <code>17DEA674BE11E3E394EEAA874FB94804</code> <code>3A12269B927881A6D6BA817015C79F51</code> <code>C2140C78DF11F069B5CF5C72DE7D04E8</code> <code>A9CD44277DA70AB4688CBF5DA9866D5A</code> <code>099163EE81EAD2CD9AA9AF00E3BB6994</code> <code>4826E607E59A78435620D084EF1D0A45</code> <code>7087A98F5080F8AAE69CBA110CC83B31</code> <code>B9FC18E7154959FB1B2F3850EE0F0918</code> <code>2D74ECCA03D18667BC625C0BD6B2E8F9</code> <code>FA6F4D6F4133D5720F98077DF4F63630</code> <code>83FF80860D53E33570AEFC575393B095</code> <code>57F93E83D76A120D0B0682C62CDC20FD</code> <code>88D67D0EE92DA0FB05C7BC22C8CE5234</code> <code>C77C1E4BCCEA67388675309DF2DF8370</code><br> <code>611A0622</code></td>
<td><code>FE000100566EC30E615B0E69FD804838</code> <code>9CCC35B3F54345E2460A10AD2F723436</code> <code>63DAF713BBE95A2AF675E7D9FDBB5AEE</code> <code>AF38F8E40832CC976D535088591565CC</code> <code>CE85FD0A480351AE067A35055AA6EF70</code> <code>57E0BE6F52A86A2ADED66D2B77726E95</code> <code>17085C5A2C69A33FC1146E984841A0E2</code> <code>1EDACDEBAECCAEE630AECC35184DB416</code> <code>026DFFA64AF738408434B9699F6F407A</code> <code>2A61E6279835DB556C5BDE9FBE64DC00</code> <code>273523594C915BA41F5B7C7329D023FD</code> <code>A8DA685533416C386AD888BB24822904</code> <code>53FABE78928843BCB5DF960B12124750</code> <code>AFB07276CF93A6518FF9B7DB436E596D</code> <code>7E7A45FEB22F3061A2C779876094E4D2</code> <code>748BE38CD85F511B37ABC8DAAB2F2C69</code><br> <code>2A66D868</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 = BA0D89B524E5EC8F7878D3002935AF0612850CBC4F96A42F9406107884FAA9F9693065C
<!-- 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 = 54B6436624E5EC8F7878D3002935AF0612850CBC4F96A42F9406107884FAA9F9693065C60000000000000000FE00010087603BA669EDAA7EDA5771820DE64E1261C258C0C5F22910AF325C2017DEA674BE11E3E394EEAA874FB948043A12269B927881A6D6BA817015C79F51C2140C78DF11F069B5CF5C72DE7D04E8A9CD44277DA70AB4688CBF5DA9866D5A099163EE81EAD2CD9AA9AF00E3BB69944826E607E59A78435620D084EF1D0A457087A98F5080F8AAE69CBA110CC83B31B9FC18E7154959FB1B2F3850EE0F09182D74ECCA03D18667BC625C0BD6B2E8F9FA6F4D6F4133D5720F98077DF4F6363083FF80860D53E33570AEFC575393B09557F93E83D76A120D0B0682C62CDC20FD88D67D0EE92DA0FB05C7BC22C8CE5234C77C1E4BCCEA67388675309DF2DF8370611A0622
padding = 32C51D103308D12E9CCCFAF0
tmp_aes_key = CBA34A0CA23CAE390443B17C123E1B2BCF07DCAC91C9376B31C61A33C610D388
tmp_aes_iv = 850ACE6466B4ECEA638E5E2A95460BF82F296AB589EE07EABFBC7821939496C1</code></pre>
<pre><code>data = 54B643664D1CB72844DE76801BC099E2672ECBA54D35E8A8DEAA39AA5DF2BF85788B77250000000000000000FE000100566EC30E615B0E69FD8048389CCC35B3F54345E2460A10AD2F72343663DAF713BBE95A2AF675E7D9FDBB5AEEAF38F8E40832CC976D535088591565CCCE85FD0A480351AE067A35055AA6EF7057E0BE6F52A86A2ADED66D2B77726E9517085C5A2C69A33FC1146E984841A0E21EDACDEBAECCAEE630AECC35184DB416026DFFA64AF738408434B9699F6F407A2A61E6279835DB556C5BDE9FBE64DC00273523594C915BA41F5B7C7329D023FDA8DA685533416C386AD888BB2482290453FABE78928843BCB5DF960B12124750AFB07276CF93A6518FF9B7DB436E596D7E7A45FEB22F3061A2C779876094E4D2748BE38CD85F511B37ABC8DAAB2F2C692A66D868
padding = D2067C5471AC206EB5351854
tmp_aes_key = 4CC52DE314BD7B61B14811DD6F9DF2EF72E5D49D5AD7784699D9C8E9FB1F8990
tmp_aes_iv = 3DED1375676C6DA8205E6FCEBECF7DEB6D7B2DD03B09B98FBE93A8DBCED7B585</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 = 862919CE4F2082655DC74AD048BF070105F99A5C60443A39EDF17DC04EDA48D02D2A1CE5DA95F6DFE47F442D730B283AE1A9A5C9348F743E50D58EACADC15206F72A3E1FFCFDABC326F0919B7AA1AA540ED837220E16F59B651CE68D023629D3C87B74C30F612A828424E567CCC10D2E3ABEAEB41E54513FBD1EDC30F6740FBA1DFF5C615270BEDBF6358F4E516439C6BC60ADBFCB7A9C45C6BA8D42E71596A557EE469AB3FA2DB465A9FA3FDFD0402E4EC3968828AB0DF197198CCB10010A8B27463B388135401BBF2DA00CB54053A2120CCEBE6847813688D3CA49BBEE67FC60F43A77797A9CB33B68D5DA0452982999642FCDBA997ACBEB7B69C7AC91B23D7733D842B622ADF59E9073D1271734534A94E4EBE43ED9C082BC73E723E8852B1AC73DA03EB3139EDE1C20D50AEEFE3DA08A6221EF18B1520016579D6E8B94BE682D2534B4C252E550C274C169A0BE7C</code></pre>
<pre><code>encrypted_data = 55ADF2FDB57DA8CC4265076496A4EBEF499E672E3174C2E99D046EA8BA4BE8D8D398BCFDB17C1215AE22821DFFEB856D0FDE45AF22341F94C6F90058D77BE34FEC35EE47A78A0CF3D319BA5DA3DA63FCC5F85DC936DD3F64A89CA0274073B0D778C7B070339215540987C6D09B9B0C570BC8CE1825DC43D1D7FE0AE5B46C26F6C2B7534C4A6BEDDA38BBF25C6F725DDD370CE990C293A25246B8BD7F39B2558D7E462A55916C360016DCB589C9663C075F590CCDFBA961BBBEC51707254A103522BCE229148EA50E1BB3BBF542A3447059AC775BD42FFB7636C215F44E40226D633D509ACBC2EED24D42201DE5A7A48B15D7DE88BC537D4FE0028DFE9B523B47AD14FFA21E32BB0FEE7936301B2A189239B28B695F72327FBCBAF13196B62008B6B8BD19DDADE8AAD477018F0F3B7F8635B0006640E1D67E6323E0E0CD0C958026E7E9BE9F855CD6ED13080D27D0021E</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 98 68 0D 00 7A C9 96 66
0010 | 78 01 00 00 1F 5F 04 F5 24 E5 EC 8F 78 78 D3 00
0020 | 29 35 AF 06 12 85 0C BC 4F 96 A4 2F 94 06 10 78
0030 | 84 FA A9 F9 69 30 65 C6 FE 50 01 00 86 29 19 CE
0040 | 4F 20 82 65 5D C7 4A D0 48 BF 07 01 05 F9 9A 5C
0050 | 60 44 3A 39 ED F1 7D C0 4E DA 48 D0 2D 2A 1C E5
0060 | DA 95 F6 DF E4 7F 44 2D 73 0B 28 3A E1 A9 A5 C9
0070 | 34 8F 74 3E 50 D5 8E AC AD C1 52 06 F7 2A 3E 1F
0080 | FC FD AB C3 26 F0 91 9B 7A A1 AA 54 0E D8 37 22
0090 | 0E 16 F5 9B 65 1C E6 8D 02 36 29 D3 C8 7B 74 C3
00A0 | 0F 61 2A 82 84 24 E5 67 CC C1 0D 2E 3A BE AE B4
00B0 | 1E 54 51 3F BD 1E DC 30 F6 74 0F BA 1D FF 5C 61
00C0 | 52 70 BE DB F6 35 8F 4E 51 64 39 C6 BC 60 AD BF
00D0 | CB 7A 9C 45 C6 BA 8D 42 E7 15 96 A5 57 EE 46 9A
00E0 | B3 FA 2D B4 65 A9 FA 3F DF D0 40 2E 4E C3 96 88
00F0 | 28 AB 0D F1 97 19 8C CB 10 01 0A 8B 27 46 3B 38
0100 | 81 35 40 1B BF 2D A0 0C B5 40 53 A2 12 0C CE BE
0110 | 68 47 81 36 88 D3 CA 49 BB EE 67 FC 60 F4 3A 77
0120 | 79 7A 9C B3 3B 68 D5 DA 04 52 98 29 99 64 2F CD
0130 | BA 99 7A CB EB 7B 69 C7 AC 91 B2 3D 77 33 D8 42
0140 | B6 22 AD F5 9E 90 73 D1 27 17 34 53 4A 94 E4 EB
0150 | E4 3E D9 C0 82 BC 73 E7 23 E8 85 2B 1A C7 3D A0
0160 | 3E B3 13 9E DE 1C 20 D5 0A EE FE 3D A0 8A 62 21
0170 | EF 18 B1 52 00 16 57 9D 6E 8B 94 BE 68 2D 25 34
0180 | B4 C2 52 E5 50 C2 74 C1 69 A0 BE 7C</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 10 73 07 00 B4 CB 96 66
0010 | 78 01 00 00 1F 5F 04 F5 4D 1C B7 28 44 DE 76 80
0020 | 1B C0 99 E2 67 2E CB A5 4D 35 E8 A8 DE AA 39 AA
0030 | 5D F2 BF 85 78 8B 77 25 FE 50 01 00 55 AD F2 FD
0040 | B5 7D A8 CC 42 65 07 64 96 A4 EB EF 49 9E 67 2E
0050 | 31 74 C2 E9 9D 04 6E A8 BA 4B E8 D8 D3 98 BC FD
0060 | B1 7C 12 15 AE 22 82 1D FF EB 85 6D 0F DE 45 AF
0070 | 22 34 1F 94 C6 F9 00 58 D7 7B E3 4F EC 35 EE 47
0080 | A7 8A 0C F3 D3 19 BA 5D A3 DA 63 FC C5 F8 5D C9
0090 | 36 DD 3F 64 A8 9C A0 27 40 73 B0 D7 78 C7 B0 70
00A0 | 33 92 15 54 09 87 C6 D0 9B 9B 0C 57 0B C8 CE 18
00B0 | 25 DC 43 D1 D7 FE 0A E5 B4 6C 26 F6 C2 B7 53 4C
00C0 | 4A 6B ED DA 38 BB F2 5C 6F 72 5D DD 37 0C E9 90
00D0 | C2 93 A2 52 46 B8 BD 7F 39 B2 55 8D 7E 46 2A 55
00E0 | 91 6C 36 00 16 DC B5 89 C9 66 3C 07 5F 59 0C CD
00F0 | FB A9 61 BB BE C5 17 07 25 4A 10 35 22 BC E2 29
0100 | 14 8E A5 0E 1B B3 BB F5 42 A3 44 70 59 AC 77 5B
0110 | D4 2F FB 76 36 C2 15 F4 4E 40 22 6D 63 3D 50 9A
0120 | CB C2 EE D2 4D 42 20 1D E5 A7 A4 8B 15 D7 DE 88
0130 | BC 53 7D 4F E0 02 8D FE 9B 52 3B 47 AD 14 FF A2
0140 | 1E 32 BB 0F EE 79 36 30 1B 2A 18 92 39 B2 8B 69
0150 | 5F 72 32 7F BC BA F1 31 96 B6 20 08 B6 B8 BD 19
0160 | DD AD E8 AA D4 77 01 8F 0F 3B 7F 86 35 B0 00 66
0170 | 40 E1 D6 7E 63 23 E0 E0 CD 0C 95 80 26 E7 E9 BE
0180 | 9F 85 5C D6 ED 13 08 0D 27 D0 02 1E</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>98680D007AC99666</code></td>
<td><code>10730700B4CB9666</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>24E5EC8F7878D3002935AF0612850CBC</code></td>
<td><code>4D1CB72844DE76801BC099E2672ECBA5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>4F96A42F9406107884FAA9F9693065C6</code></td>
<td><code>4D35E8A8DEAA39AA5DF2BF85788B7725</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100862919CE4F2082655DC74AD0</code> <code>48BF070105F99A5C60443A39EDF17DC0</code> <code>4EDA48D02D2A1CE5DA95F6DFE47F442D</code> <code>730B283AE1A9A5C9348F743E50D58EAC</code> <code>ADC15206F72A3E1FFCFDABC326F0919B</code> <code>7AA1AA540ED837220E16F59B651CE68D</code> <code>023629D3C87B74C30F612A828424E567</code> <code>CCC10D2E3ABEAEB41E54513FBD1EDC30</code> <code>F6740FBA1DFF5C615270BEDBF6358F4E</code> <code>516439C6BC60ADBFCB7A9C45C6BA8D42</code> <code>E71596A557EE469AB3FA2DB465A9FA3F</code> <code>DFD0402E4EC3968828AB0DF197198CCB</code> <code>10010A8B27463B388135401BBF2DA00C</code> <code>B54053A2120CCEBE6847813688D3CA49</code> <code>BBEE67FC60F43A77797A9CB33B68D5DA</code> <code>0452982999642FCDBA997ACBEB7B69C7</code> <code>AC91B23D7733D842B622ADF59E9073D1</code> <code>271734534A94E4EBE43ED9C082BC73E7</code> <code>23E8852B1AC73DA03EB3139EDE1C20D5</code> <code>0AEEFE3DA08A6221EF18B1520016579D</code> <code>6E8B94BE682D2534B4C252E550C274C1</code><br> <code>69A0BE7C</code></td>
<td><code>FE50010055ADF2FDB57DA8CC42650764</code> <code>96A4EBEF499E672E3174C2E99D046EA8</code> <code>BA4BE8D8D398BCFDB17C1215AE22821D</code> <code>FFEB856D0FDE45AF22341F94C6F90058</code> <code>D77BE34FEC35EE47A78A0CF3D319BA5D</code> <code>A3DA63FCC5F85DC936DD3F64A89CA027</code> <code>4073B0D778C7B070339215540987C6D0</code> <code>9B9B0C570BC8CE1825DC43D1D7FE0AE5</code> <code>B46C26F6C2B7534C4A6BEDDA38BBF25C</code> <code>6F725DDD370CE990C293A25246B8BD7F</code> <code>39B2558D7E462A55916C360016DCB589</code> <code>C9663C075F590CCDFBA961BBBEC51707</code> <code>254A103522BCE229148EA50E1BB3BBF5</code> <code>42A3447059AC775BD42FFB7636C215F4</code> <code>4E40226D633D509ACBC2EED24D42201D</code> <code>E5A7A48B15D7DE88BC537D4FE0028DFE</code> <code>9B523B47AD14FFA21E32BB0FEE793630</code> <code>1B2A189239B28B695F72327FBCBAF131</code> <code>96B62008B6B8BD19DDADE8AAD477018F</code> <code>0F3B7F8635B0006640E1D67E6323E0E0</code> <code>CD0C958026E7E9BE9F855CD6ED13080D</code><br> <code>27D0021E</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 = 19E337BEE69A3DC8D9C80E17582C23DEA7F61473290E71A731F93EF1B21D442B94EB1431852DE8BF9066245F5840E9E175197B1B73601993008FC43E017C8CB5ADD6F90DCE3DD0A4C3AAD04CB140CDD99FF8C70F8A876DA54DC7AC91B42450DECF8245E2ABEA235903F71D5B41488798909C2B102B53AFAFBD05BDAD6C56419AD5928860F288C515187E6F442FB7DD9A63A97189CB8673C2C2DEBBB87D7C3EC7F796030013A8F4716B91FD2B6B14F880150DAD08FC166EC39AE877BCB56FC0E4F4C89886E7FEBB465B33F823618BC3C1A06EFDFC69121307AB44CE034D385A11C0E459AFD82BB38C69FDB633A37A5D698D6CA2B082AA67A4093B845AF04C29F3</code></pre>
<pre><code>auth_key = C13035258A69C36CCEAC7E92D76A44961467D812AA48518CDDAB99630402A6B17698311F3A2ABA8EE375333BA68F5EAD82754417C14811B2067A3FF55D4AA7C0390F8688DE3A7969970517AF6100CA4734347B5E82BF144436A711CC449E8B3D52BCD881283354EAFC4BBE97EAD7D9551AD8C2E50D7617F4A15AF2C6C8916B43AC95F72DF8944CE558211DE8803699E0EDA882523C92523651C036C9C56E244DC5FA6C2F4FFC5C00A58684782F02395711EC32EB3F319896AC33CA6990FCAD782C9BD187E407B0467CBDBC98445B1D95CBD5F9B5A5D1DB58E350318284D7E538C4CEF5207A6D9967A11C5DF2EF802CA5E6994FB5A29C89C68FA806390BB3BCE5</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 FC ED 25 7B C9 96 66
0010 | 84 00 00 00 34 F7 CB 3B 24 E5 EC 8F 78 78 D3 00
0020 | 29 35 AF 06 12 85 0C BC 4F 96 A4 2F 94 06 10 78
0030 | 84 FA A9 F9 69 30 65 C6 9B 7C A5 9C 50 F6 67 FD
0040 | 2E 29 1A 1A 2F 14 53 97</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 68 E3 25 B5 CB 96 66
0010 | 88 00 00 00 34 F7 CB 3B 4D 1C B7 28 44 DE 76 80
0020 | 1B C0 99 E2 67 2E CB A5 4D 35 E8 A8 DE AA 39 AA
0030 | 5D F2 BF 85 78 8B 77 25 CD 88 17 25 3C 41 33 28
0040 | C2 F2 26 76 85 DA 45 8B</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>01FCED257BC99666</code></td>
<td><code>0168E325B5CB9666</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>84000000</code> (132 in decimal)</td>
<td><code>88000000</code> (136 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>24E5EC8F7878D3002935AF0612850CBC</code></td>
<td><code>4D1CB72844DE76801BC099E2672ECBA5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>4F96A42F9406107884FAA9F9693065C6</code></td>
<td><code>4D35E8A8DEAA39AA5DF2BF85788B7725</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>9B7CA59C50F667FD2E291A1A2F145397</code></td>
<td><code>CD8817253C413328C2F2267685DA458B</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

@ -73,11 +73,11 @@
</tr>
<tr>
<td><a href="/constructor/emojiGroupGreeting">emojiGroupGreeting</a></td>
<td> </td>
<td>Represents an <a href="/api/emoji-categories">emoji category</a>, that should be moved to the top of the list when choosing a sticker for a <a href="/api/business#business-introduction">business introduction</a></td>
</tr>
<tr>
<td><a href="/constructor/emojiGroupPremium">emojiGroupPremium</a></td>
<td> </td>
<td>An <a href="/api/emoji-categories">emoji category</a>, used to select all <a href="/api/premium">Premium</a>-only stickers (i.e. those with a <a href="/api/stickers#premium-animated-sticker-effects">Premium effect »</a>)/<a href="/api/premium">Premium</a>-only <a href="/api/custom-emoji">custom emojis</a> (i.e. those where the <a href="/constructor/documentAttributeCustomEmoji">documentAttributeCustomEmoji</a>.<code>free</code> flag is <strong>not</strong> set)</td>
</tr>
</tbody>
</table>