Update content of files

This commit is contained in:
GitHub Action 2023-12-05 21:40:52 +00:00
parent 8e194f9aa5
commit 1baed606b8
6 changed files with 234 additions and 215 deletions

View file

@ -62,7 +62,7 @@
<p>A discussion group can be associated to a channel using <a href="/method/channels.setDiscussionGroup">channels.setDiscussionGroup</a>.<br>
The discussion group can be accessed in the client by clicking on the discuss button of the channel, or by accessing the <a href="/api/threads">comment section</a> of a specific post; the discussion group ID is also present in the <code>linked_chat_id</code> field of the <a href="/constructor/channelFull">channelFull</a> constructor. </p>
<p>All messages sent to the channel will also be forwarded to the linked group (with sender peer <code>from_id</code> equal to the peer of the linked channel); those messages will also be automatically <a href="/api/pin">pinned</a> in the group. </p>
<p>The comment section of a channel post is simply the <a href="#message-threads">message thread</a> of the automatically forwarded channel message in the linked discussion supergroup.<br>
<p>The comment section of a channel post is simply the <a href="/api/threads">message thread</a> of the automatically forwarded channel message in the linked discussion supergroup.<br>
Thus, the comment section of a particular post can be disabled by removing the autoforwarded channel post message from the discussion group. </p>
<p>A <a href="/constructor/messageReplies">messageReplies</a> constructor will be attached the channel post in the original channel, containing information about the comment section, specifically:</p>
<ul>

View file

@ -46,6 +46,25 @@
<p>Below you will find information on schema changes. For more details on the use of layers, see <a href="/api/invoking#layers">Invoking API methods</a>.</p>
<h3><a class="anchor" href="#layer-164" id="layer-164" name="layer-164"><i class="anchor-icon"></i></a><a href="/schema?layer=164">Layer 164</a></h3>
<p>To view all the changes since the last update, start reading the changelog @ <a href="#layer-159">Layer 159</a>.</p>
<p>Most importantly, the following detailed articles were added:</p>
<ul>
<li><a href="/api/action-bar">Working with action bar</a></li>
<li><a href="/api/contacts">Working with contacts</a></li>
<li><a href="/api/block">Working with the blocklist</a></li>
<li><a href="/api/nearby">Working with geochats</a></li>
<li><a href="/api/privacy">Working with privacy settings</a></li>
<li><a href="/api/takeout">Working with the takeout API</a></li>
</ul>
<p>Also added documentation for <a href="/api/files#streamed-uploads">streamed uploads</a> and improved the <a href="/api/invoking#sequential-requests">method queue</a> documentation.</p>
<p>The following new deep links were added:</p>
<ul>
<li><a href="/api/links#story-links">Story links</a></li>
<li><a href="/api/links#boost-links">Boost links</a></li>
<li><a href="/api/links#mini-app-links">Direct mini app links</a></li>
</ul>
<p>And now, here are the changes that were made in this layer.</p>
<p>Introducing <a href="/api/stories">Telegram Stories</a>, <a href="/api/boost">channel boosts</a>, <a href="/api/auth#confirming-login">session confirmation</a>, <a href="/api/bots/webapps#side-menu-mini-apps">side menu Mini Apps</a>, <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini Apps</a>, custom methods and multiple new events for <a href="/api/bots/webapps">Mini Apps</a> and a <a href="/api/privacy">close friends list</a>.</p>
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
<ul>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>contacts.blockFromReplies</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Stop getting notifications about thread replies of a certain user in @replies">
<meta property="description" content="Stop getting notifications about discussion replies of a certain user in @replies">
<meta property="og:title" content="contacts.blockFromReplies">
<meta property="og:image" content="">
<meta property="og:description" content="Stop getting notifications about thread replies of a certain user in @replies">
<meta property="og:description" content="Stop getting notifications about discussion replies of a certain user in @replies">
<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/contacts.blockFromReplies" >contacts.blockFromReplies</a></li></ul></div>
<h1 id="dev_page_title">contacts.blockFromReplies</h1>
<div id="dev_page_content"><p>Stop getting notifications about <a href="/api/threads">thread replies</a> of a certain user in <code>@replies</code></p>
<div id="dev_page_content"><p>Stop getting notifications about <a href="/api/discussion">discussion replies</a> of a certain user in <code>@replies</code></p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -97,15 +97,15 @@
<tr>
<td><strong>msg_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>ID of the message in the <a href="/api/threads#replies">@replies</a> chat</td>
<td>ID of the message in the <a href="/api/discussion#replies">@replies</a> chat</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
<p><a href="/type/Updates">Updates</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="#threads" id="threads" name="threads"><i class="anchor-icon"></i></a><a href="/api/threads">Threads</a></h4>
<p>Telegram allows commenting on a channel post or on a generic supergroup message, thanks to message threads.</p></div>
<h4><a class="anchor" href="#discussion-groups" id="discussion-groups" name="discussion-groups"><i class="anchor-icon"></i></a><a href="/api/discussion">Discussion groups</a></h4>
<p>Groups can be associated to a channel as a discussion group, to allow users to discuss about posts.</p></div>
</div>

View file

@ -2404,7 +2404,7 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
<tr>
<td><a href="/method/contacts.blockFromReplies">contacts.blockFromReplies</a></td>
<td>Stop getting notifications about <a href="/api/threads">thread replies</a> of a certain user in <code>@replies</code></td>
<td>Stop getting notifications about <a href="/api/discussion">discussion replies</a> of a certain user in <code>@replies</code></td>
</tr>
<tr>
<td><a href="/method/messages.getDiscussionMessage">messages.getDiscussionMessage</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 D4 6C 0C 00 5D 54 6E 65
0010 | 14 00 00 00 F1 8E 7E BE A9 A9 E7 60 C1 90 09 93
0020 | EF 1D D3 FA 51 4A 0E 34</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 38 90 08 00 16 96 6F 65
0010 | 14 00 00 00 F1 8E 7E BE 60 A4 66 1D F2 9F 2D 88
0020 | C0 27 52 BD D7 77 C0 EA</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>D46C0C005D546E65</code></td>
<td><code>3890080016966F65</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>A9A9E760C1900993EF1DD3FA514A0E34</code></td>
<td><code>60A4661DF29F2D88C02752BDD777C0EA</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 00 27 D4 5D 54 6E 65
0010 | 60 00 00 00 63 24 16 05 A9 A9 E7 60 C1 90 09 93
0020 | EF 1D D3 FA 51 4A 0E 34 69 41 64 B6 A2 26 86 5F
0030 | 51 76 4C C1 1D 1D 1C C1 08 2B E8 4F 32 72 57 A7
0040 | 45 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 A8 8A 89 16 96 6F 65
0010 | CC 00 00 00 63 24 16 05 60 A4 66 1D F2 9F 2D 88
0020 | C0 27 52 BD D7 77 C0 EA C9 9B 0B 86 CC DD D6 5E
0030 | 85 5C 0C 7D AE 5F 05 FB 08 28 19 65 5D 31 AC 69
0040 | 7F 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>010027D45D546E65</code></td>
<td><code>01A88A8916966F65</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>60000000</code> (96 in decimal)</td>
<td><code>CC000000</code> (204 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>A9A9E760C1900993EF1DD3FA514A0E34</code></td>
<td><code>60A4661DF29F2D88C02752BDD777C0EA</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>694164B6A226865F51764CC11D1D1CC1</code></td>
<td><code>C99B0B86CCDDD65E855C0C7DAE5F05FB</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>082BE84F327257A745000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 3163865816313079621</td>
<td><code>082819655D31AC697F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2889452086874630527</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 = 3163865816313079621</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>3163865816313079621 = 1751455103 * 1806421307</code></p>
<pre><code>p = 1751455103
q = 1806421307</code></pre>
<pre><code>pq = 2889452086874630527</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2889452086874630527 = 1512121901 * 1910859227</code></p>
<pre><code>p = 1512121901
q = 1910859227</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 2B E8 4F 32 72 57 A7 45 00 00 00
0010 | 04 68 65 15 7F 00 00 00 04 6B AB CD 3B 00 00 00
0020 | A9 A9 E7 60 C1 90 09 93 EF 1D D3 FA 51 4A 0E 34
0030 | 69 41 64 B6 A2 26 86 5F 51 76 4C C1 1D 1D 1C C1
0040 | 28 80 34 A2 9E 8F 8D 40 A2 76 0B BA AC 78 99 1B
0050 | F1 AD BF 24 F2 D6 68 DA 91 2D BD 36 C4 1A DA EE
<pre><code>0000 | 95 5F F5 A9 08 28 19 65 5D 31 AC 69 7F 00 00 00
0010 | 04 5A 21 26 2D 00 00 00 04 71 E5 65 DB 00 00 00
0020 | 60 A4 66 1D F2 9F 2D 88 C0 27 52 BD D7 77 C0 EA
0030 | C9 9B 0B 86 CC DD D6 5E 85 5C 0C 7D AE 5F 05 FB
0040 | 3A 68 70 9D 66 35 FF 73 A8 1B D6 C4 B3 DF FA F0
0050 | 4C 56 75 A6 51 D6 1A 03 6C 22 AB B6 B8 83 41 41
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 = 1806421307</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>082BE84F327257A745000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 3163865816313079621</td>
<td><code>082819655D31AC697F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2889452086874630527</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>046865157F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1751455103</td>
<td><code>045A21262D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1512121901</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>046BABCD3B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1806421307</td>
<td><code>0471E565DB000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1910859227</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>A9A9E760C1900993EF1DD3FA514A0E34</code></td>
<td><code>60A4661DF29F2D88C02752BDD777C0EA</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>694164B6A226865F51764CC11D1D1CC1</code></td>
<td><code>C99B0B86CCDDD65E855C0C7DAE5F05FB</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>288034A29E8F8D40A2760BBAAC78991B</code> <code>F1ADBF24F2D668DA912DBD36C41ADAEE</code></td>
<td><code>3A68709D6635FF73A81BD6C4B3DFFAF0</code> <code>4C5675A651D61A036C22ABB6B8834141</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1806421307</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 = 955FF5A9082BE84F327257A745000000046865157F000000046BABCD3B000000A9A9E760C1900993EF1DD3FA514A0E34694164B6A226865F51764CC11D1D1CC1288034A29E8F8D40A2760BBAAC78991BF1ADBF24F2D668DA912DBD36C41ADAEE02000000
random_padding_bytes = 62802FD3A854F23BC3BAA4B2784CC11390362E1839E954F5CA27D3DFB0172A3CE3D5A92E066E5560611C3848F65DE71D73970E063E23B113E36237D21EE06BF414B3E954FCCED55A2F97B9CBA320CC800A387B2CFF90D3C229D9DC6F</code></pre>
<pre><code>data = 955FF5A9082819655D31AC697F000000045A21262D0000000471E565DB00000060A4661DF29F2D88C02752BDD777C0EAC99B0B86CCDDD65E855C0C7DAE5F05FB3A68709D6635FF73A81BD6C4B3DFFAF04C5675A651D61A036C22ABB6B883414102000000
random_padding_bytes = EA9C0F23B9F7D66C4C9358CDAAEA0EB07F1C283012543E5C9623AE14811F68C16A62AEC2BF150EEF71985F687041A1C737EC5FA791F7A76B65CF2FFB2E3A00083B31922BDDE7C2155A2C25EB440EBFF36BC7818E33723593FDFF1817</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 = 859CE2A8C3343953B8B51FD840A5E91FC5068B2996283AD7AFF31CEC7239C4F280B193EC199B8F37FAAC476589AEAAA308EF5623EF7C596FA3E7FF808E205073AE98CDD56F3C8F57347E0A1601D9F6BF4435E14CB099DD9EA4FBD85EFC6A69C49324FFA923058A366C9B1416EAB246F90091F4D17B5455B606AF1DDE9E19C44AED6F243BE547B79E804E7683246D14D1D7B6A66A89C7DD1536BD9C26AC8826341787FCEDA5A0DEB8411E5EC5B0D547721EC1D278D92C83C9D79B405F9AA6C41C61AEF0476577ACD165C8AD3E29079ACADDA7F3A22D44A16BCE21C5C10778779AF9BDCB7F6CA1A6D709D2B55C4B34195B9ACBFE3FBD38A33FFEA4BD3F7541DA94</code></pre>
<pre><code>encrypted_data = 14C3DEF474D1170E440780B6232705AB1E82F1D3956FA873FDD141972B87FCFB053A424A8602DE811956E40DDE34789EDEA4C4E8F093FBC58ED9B96D7D2AB485B1BC6EC3CFCDC0F2EDDE2435BB213952C98B3052CBA5847FD984D7FF978A92EF56E96D28DF5B0563634491A4D81A5CFF779E0792A06F8B739CC625D697BC45F186107053EB8B865172743ECA58ECB89F96D0D08B407A093FE11FF874B338F6636A4A70C34A04A716758D3B46118A1AC050A248AF9BDDF0388BC95FAA60704D66C2D3A5B22944FE6D8C89D7FEC9C5085B38D43DD91410F3F96D282C27A366195519BF40A14CD811577F94A02D8F7A164FC50404EF5526EB521D41774E92224381</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 D8 6C 0C 00 5D 54 6E 65
0010 | 40 01 00 00 BE E4 12 D7 A9 A9 E7 60 C1 90 09 93
0020 | EF 1D D3 FA 51 4A 0E 34 69 41 64 B6 A2 26 86 5F
0030 | 51 76 4C C1 1D 1D 1C C1 04 68 65 15 7F 00 00 00
0040 | 04 6B AB CD 3B 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 85 9C E2 A8 C3 34 39 53 B8 B5 1F D8
0060 | 40 A5 E9 1F C5 06 8B 29 96 28 3A D7 AF F3 1C EC
0070 | 72 39 C4 F2 80 B1 93 EC 19 9B 8F 37 FA AC 47 65
0080 | 89 AE AA A3 08 EF 56 23 EF 7C 59 6F A3 E7 FF 80
0090 | 8E 20 50 73 AE 98 CD D5 6F 3C 8F 57 34 7E 0A 16
00A0 | 01 D9 F6 BF 44 35 E1 4C B0 99 DD 9E A4 FB D8 5E
00B0 | FC 6A 69 C4 93 24 FF A9 23 05 8A 36 6C 9B 14 16
00C0 | EA B2 46 F9 00 91 F4 D1 7B 54 55 B6 06 AF 1D DE
00D0 | 9E 19 C4 4A ED 6F 24 3B E5 47 B7 9E 80 4E 76 83
00E0 | 24 6D 14 D1 D7 B6 A6 6A 89 C7 DD 15 36 BD 9C 26
00F0 | AC 88 26 34 17 87 FC ED A5 A0 DE B8 41 1E 5E C5
0100 | B0 D5 47 72 1E C1 D2 78 D9 2C 83 C9 D7 9B 40 5F
0110 | 9A A6 C4 1C 61 AE F0 47 65 77 AC D1 65 C8 AD 3E
0120 | 29 07 9A CA DD A7 F3 A2 2D 44 A1 6B CE 21 C5 C1
0130 | 07 78 77 9A F9 BD CB 7F 6C A1 A6 D7 09 D2 B5 5C
0140 | 4B 34 19 5B 9A CB FE 3F BD 38 A3 3F FE A4 BD 3F
0150 | 75 41 DA 94</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C4 8C 0C 00 16 96 6F 65
0010 | 40 01 00 00 BE E4 12 D7 60 A4 66 1D F2 9F 2D 88
0020 | C0 27 52 BD D7 77 C0 EA C9 9B 0B 86 CC DD D6 5E
0030 | 85 5C 0C 7D AE 5F 05 FB 04 5A 21 26 2D 00 00 00
0040 | 04 71 E5 65 DB 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 14 C3 DE F4 74 D1 17 0E 44 07 80 B6
0060 | 23 27 05 AB 1E 82 F1 D3 95 6F A8 73 FD D1 41 97
0070 | 2B 87 FC FB 05 3A 42 4A 86 02 DE 81 19 56 E4 0D
0080 | DE 34 78 9E DE A4 C4 E8 F0 93 FB C5 8E D9 B9 6D
0090 | 7D 2A B4 85 B1 BC 6E C3 CF CD C0 F2 ED DE 24 35
00A0 | BB 21 39 52 C9 8B 30 52 CB A5 84 7F D9 84 D7 FF
00B0 | 97 8A 92 EF 56 E9 6D 28 DF 5B 05 63 63 44 91 A4
00C0 | D8 1A 5C FF 77 9E 07 92 A0 6F 8B 73 9C C6 25 D6
00D0 | 97 BC 45 F1 86 10 70 53 EB 8B 86 51 72 74 3E CA
00E0 | 58 EC B8 9F 96 D0 D0 8B 40 7A 09 3F E1 1F F8 74
00F0 | B3 38 F6 63 6A 4A 70 C3 4A 04 A7 16 75 8D 3B 46
0100 | 11 8A 1A C0 50 A2 48 AF 9B DD F0 38 8B C9 5F AA
0110 | 60 70 4D 66 C2 D3 A5 B2 29 44 FE 6D 8C 89 D7 FE
0120 | C9 C5 08 5B 38 D4 3D D9 14 10 F3 F9 6D 28 2C 27
0130 | A3 66 19 55 19 BF 40 A1 4C D8 11 57 7F 94 A0 2D
0140 | 8F 7A 16 4F C5 04 04 EF 55 26 EB 52 1D 41 77 4E
0150 | 92 22 43 81</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 = 62802FD3A854F23BC3BAA4B2784CC11390362E1839E954F5CA27D3DFB
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>D86C0C005D546E65</code></td>
<td><code>C48C0C0016966F65</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 = 62802FD3A854F23BC3BAA4B2784CC11390362E1839E954F5CA27D3DFB
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>A9A9E760C1900993EF1DD3FA514A0E34</code></td>
<td><code>60A4661DF29F2D88C02752BDD777C0EA</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>694164B6A226865F51764CC11D1D1CC1</code></td>
<td><code>C99B0B86CCDDD65E855C0C7DAE5F05FB</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>046865157F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1751455103</td>
<td><code>045A21262D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1512121901</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>046BABCD3B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1806421307</td>
<td><code>0471E565DB000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1910859227</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 = 62802FD3A854F23BC3BAA4B2784CC11390362E1839E954F5CA27D3DFB
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE000100859CE2A8C3343953B8B51FD8</code> <code>40A5E91FC5068B2996283AD7AFF31CEC</code> <code>7239C4F280B193EC199B8F37FAAC4765</code> <code>89AEAAA308EF5623EF7C596FA3E7FF80</code> <code>8E205073AE98CDD56F3C8F57347E0A16</code> <code>01D9F6BF4435E14CB099DD9EA4FBD85E</code> <code>FC6A69C49324FFA923058A366C9B1416</code> <code>EAB246F90091F4D17B5455B606AF1DDE</code> <code>9E19C44AED6F243BE547B79E804E7683</code> <code>246D14D1D7B6A66A89C7DD1536BD9C26</code> <code>AC8826341787FCEDA5A0DEB8411E5EC5</code> <code>B0D547721EC1D278D92C83C9D79B405F</code> <code>9AA6C41C61AEF0476577ACD165C8AD3E</code> <code>29079ACADDA7F3A22D44A16BCE21C5C1</code> <code>0778779AF9BDCB7F6CA1A6D709D2B55C</code> <code>4B34195B9ACBFE3FBD38A33FFEA4BD3F</code><br> <code>7541DA94</code></td>
<td><code>FE00010014C3DEF474D1170E440780B6</code> <code>232705AB1E82F1D3956FA873FDD14197</code> <code>2B87FCFB053A424A8602DE811956E40D</code> <code>DE34789EDEA4C4E8F093FBC58ED9B96D</code> <code>7D2AB485B1BC6EC3CFCDC0F2EDDE2435</code> <code>BB213952C98B3052CBA5847FD984D7FF</code> <code>978A92EF56E96D28DF5B0563634491A4</code> <code>D81A5CFF779E0792A06F8B739CC625D6</code> <code>97BC45F186107053EB8B865172743ECA</code> <code>58ECB89F96D0D08B407A093FE11FF874</code> <code>B338F6636A4A70C34A04A716758D3B46</code> <code>118A1AC050A248AF9BDDF0388BC95FAA</code> <code>60704D66C2D3A5B22944FE6D8C89D7FE</code> <code>C9C5085B38D43DD91410F3F96D282C27</code> <code>A366195519BF40A14CD811577F94A02D</code> <code>8F7A164FC50404EF5526EB521D41774E</code><br> <code>92224381</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 62802FD3A854F23BC3BAA4B2784CC11390362E1839E954F5CA27D3DFB
<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 70 B2 7B 5E 54 6E 65
0010 | 98 02 00 00 5C 07 E8 D0 A9 A9 E7 60 C1 90 09 93
0020 | EF 1D D3 FA 51 4A 0E 34 69 41 64 B6 A2 26 86 5F
0030 | 51 76 4C C1 1D 1D 1C C1 FE 50 02 00 C9 EF 02 01
0040 | 32 84 BC 69 5E FF AA 67 C2 90 7D 89 E3 E6 A4 06
0050 | AD 58 0B BF 65 16 27 9B 4A DD 57 F9 F9 AE A7 CE
0060 | 38 AE 90 4A D5 65 D7 6D C5 18 45 2B AE 9B B9 B6
0070 | DA 5A 1A D1 20 3D FC 5A 6E 45 8C 0E 13 1A 8D 8F
0080 | 9E 67 19 2A 3E E1 AF 22 30 6D F7 72 ED ED 7C 56
0090 | 87 FB FD B3 76 DC 17 76 FF 84 4C B4 52 6E 61 21
00A0 | DD 82 5F 8D 4A A3 94 43 B5 11 1A 1A 0E C4 83 2A
00B0 | 55 71 36 3A CB EC 73 B7 77 16 08 B2 8B 14 F5 E3
00C0 | 5D 5D 8E 9F A8 B7 A4 7A AB 42 08 C3 43 78 70 3C
00D0 | 3E 6A 5F 3A 22 E7 DA 67 05 10 B6 44 BA FB 30 14
00E0 | 92 CD C6 7C 7D 99 50 24 E8 2E 99 E3 1A E7 6F FD
00F0 | 2B F4 00 E0 66 63 2B F3 A6 22 3F B9 99 61 74 A9
0100 | 37 C3 E8 BE 22 8F 07 47 E6 92 DC 69 66 A2 5E 1F
0110 | BE 2F 84 1C 29 27 FB 63 45 34 CC 0F 27 D5 B2 97
0120 | 6B 3D BF 32 73 B6 05 BF 82 FC 6A F9 44 3D F7 7F
0130 | 25 53 A2 30 81 9B CE CA 28 25 98 8E 9C E6 E3 6B
0140 | 2B FF 5F A9 36 D1 F8 5D 0E 6F 93 50 E2 C4 37 3C
0150 | 5F 3C EB C1 80 B0 D1 CB 57 6E 0F 33 32 32 D9 F1
0160 | 18 13 FE 4C 17 3B B2 EA 73 63 8E 8E 93 29 2F 4C
0170 | 99 D9 AA DA 44 7C BD 2D CB 6A 96 0F 0D C3 90 71
0180 | 02 FC 67 72 DF 40 D2 F2 0C 97 80 16 0E 95 F0 C6
0190 | 6C 76 74 80 F5 D2 09 4E 4B 68 2A EA 02 67 AC 63
01A0 | B7 F5 BE C6 D2 71 34 87 36 42 A8 93 93 BF FF 61
01B0 | 3D F0 5E 6C AD C5 BE D2 B1 C1 03 4D 25 5D 91 C5
01C0 | 3E DF 4D 2F 31 77 28 F4 81 44 EF 54 B9 6A 65 93
01D0 | 15 2C 03 8D 5B 2E 8F A5 7F 06 AC BF 38 33 D8 BD
01E0 | 3D D2 B6 7C 4B AB 60 AD F4 27 84 E0 3A 97 CC 65
01F0 | 6C A8 44 E8 06 30 CC 19 93 62 4B 30 6E E9 64 ED
0200 | 16 84 BF BC C2 25 18 7E C9 5C 69 6A 92 0F 34 F5
0210 | DF 0A 3B A1 52 68 26 97 58 ED B7 0F F8 66 54 1D
0220 | 28 58 8A DE 93 4B DF BE 55 90 5E 6F 3E 8B FD 1A
0230 | 66 0B 34 B2 1B BD 94 C4 CD FE 50 C6 0A 36 0A C1
0240 | 33 DA 1B B6 73 F6 77 39 17 C1 15 01 AF 67 EF DE
0250 | 31 16 58 AC C9 6B D2 59 FF 56 3A B4 0A CE 0E 06
0260 | F7 0E 2B FA 2C 84 05 F3 F3 95 DE 5F D8 58 62 2B
0270 | D1 A1 8E 1C 3A 6A 4D B5 A8 F8 2B B9 F7 EC 52 D4
0280 | 10 83 DC 58 94 8E F3 7F CD 24 E8 39</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 9C 52 2C 17 96 6F 65
0010 | F4 02 00 00 5C 07 E8 D0 60 A4 66 1D F2 9F 2D 88
0020 | C0 27 52 BD D7 77 C0 EA C9 9B 0B 86 CC DD D6 5E
0030 | 85 5C 0C 7D AE 5F 05 FB FE 50 02 00 39 C2 86 3F
0040 | 1F E5 AE 55 69 77 08 3D 94 B9 88 9E 67 DC 46 75
0050 | 8F 36 A1 A2 67 C6 37 09 19 3F 10 8D CF 7F 2B 2C
0060 | 60 B2 55 8D 1E 57 89 F2 ED 21 44 D9 B7 A9 E3 9E
0070 | 0F DB 4E A8 32 D5 1A 8E AE E5 E1 57 32 2A 59 DE
0080 | 71 22 53 F8 5C 34 4C C8 2B 22 B7 41 BA 96 42 D5
0090 | 15 12 07 C5 83 44 8D CA DD DD A6 4B F6 E2 F7 BF
00A0 | CC 4D D6 64 A0 C0 45 C8 5D 07 86 90 3E EC C8 F1
00B0 | A1 8E BB 19 20 FE DE 0B 75 DD 79 F3 0E 53 5D A1
00C0 | 51 28 90 57 0F 8B 1A 3E 20 C4 D4 4F 84 98 86 D3
00D0 | A8 E7 8E 81 EF B0 4D 11 DC BA 39 29 B6 11 23 DD
00E0 | C1 1D 65 6D AE 2E 5F 3D 7F 8F 18 AF 24 35 30 A3
00F0 | 09 30 75 63 83 2C 8C CE 7F F0 1B C7 D6 9D B1 40
0100 | 39 B9 E7 8D B8 EF 24 6B D4 12 79 AB 20 95 C2 1A
0110 | 09 AD E3 CC E0 20 61 7E 46 76 3A D9 0E 9B 71 73
0120 | 23 2C CF 17 21 1A 6F BA 74 54 8B B6 57 74 79 B1
0130 | 60 B7 0D A8 24 35 CD 10 12 55 50 AC BC C5 E5 E3
0140 | 05 9D B4 1F 5C 6E C3 DB F0 CE C9 AD 6E A0 E0 30
0150 | EA 6A B9 F8 BC 4F 7B 1C C0 8A F6 9D 8E 5E 1F C7
0160 | FC E9 E6 DA C3 1E 15 21 C0 9D AA 13 BD 40 E1 7E
0170 | 1A 1B 3E 46 02 59 C3 C0 5C 85 A3 CB 26 60 48 69
0180 | 1C A8 79 C5 5D D2 B2 1F B2 91 93 70 D4 A4 1A 69
0190 | EC C8 C8 AA 8D C8 BC 89 50 C6 BA F8 30 A6 8B 75
01A0 | BA 81 A8 3A F4 20 B8 42 FF BF 2B 9F 78 1A 23 94
01B0 | 18 9B 82 57 0E 2F 2B 85 4E 47 06 80 15 20 E4 CE
01C0 | AB 36 95 26 C5 40 54 25 27 0B 72 E8 17 A4 F3 2A
01D0 | E6 4A 29 D9 4A B0 B2 F1 99 EF CE CB FE 1B 86 0D
01E0 | 5E B0 B8 C8 20 8E 15 61 2D EB 9E CB 32 81 28 18
01F0 | 53 5D EB 09 13 5F 63 29 62 67 7C 62 7B 09 61 4B
0200 | 2F 30 48 B6 CE 20 6D 18 C4 30 E1 6E 59 FD 4F 04
0210 | C6 04 FA E1 C0 27 C9 42 17 A0 8F 6B 57 6E B8 36
0220 | 6C B6 06 68 72 C8 50 6E EE 08 00 96 DF D4 94 BA
0230 | 4F 29 DF DE E2 12 A4 DD 09 2F A9 DB 13 E8 C1 1B
0240 | 5E 03 F9 97 78 3C FA 78 2F 12 69 42 CA 57 B0 D3
0250 | 57 D8 B7 31 A6 FA 54 FC A1 74 A5 84 3C CB 5D FF
0260 | E9 0F A4 E4 24 A4 90 FD AD 9F 8B 3F F8 B1 13 CA
0270 | C0 94 70 CF D7 3E D9 54 63 5B C5 BA 49 EB AB 36
0280 | D6 83 6A 2D B0 90 BF 43 48 DF B5 15</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 = 62802FD3A854F23BC3BAA4B2784CC11390362E1839E954F5CA27D3DFB
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>0170B27B5E546E65</code></td>
<td><code>019C522C17966F65</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>98020000</code> (664 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 = 62802FD3A854F23BC3BAA4B2784CC11390362E1839E954F5CA27D3DFB
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>A9A9E760C1900993EF1DD3FA514A0E34</code></td>
<td><code>60A4661DF29F2D88C02752BDD777C0EA</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>694164B6A226865F51764CC11D1D1CC1</code></td>
<td><code>C99B0B86CCDDD65E855C0C7DAE5F05FB</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200C9EF02013284BC695EFFAA67</code> <code>C2907D89E3E6A406AD580BBF6516279B</code> <code>4ADD57F9F9AEA7CE38AE904AD565D76D</code> <code>C518452BAE9BB9B6DA5A1AD1203DFC5A</code> <code>6E458C0E131A8D8F9E67192A3EE1AF22</code> <code>306DF772EDED7C5687FBFDB376DC1776</code> <code>FF844CB4526E6121DD825F8D4AA39443</code> <code>B5111A1A0EC4832A5571363ACBEC73B7</code> <code>771608B28B14F5E35D5D8E9FA8B7A47A</code> <code>AB4208C34378703C3E6A5F3A22E7DA67</code> <code>0510B644BAFB301492CDC67C7D995024</code> <code>E82E99E31AE76FFD2BF400E066632BF3</code> <code>A6223FB9996174A937C3E8BE228F0747</code> <code>E692DC6966A25E1FBE2F841C2927FB63</code> <code>4534CC0F27D5B2976B3DBF3273B605BF</code> <code>82FC6AF9443DF77F2553A230819BCECA</code> <code>2825988E9CE6E36B2BFF5FA936D1F85D</code> <code>0E6F9350E2C4373C5F3CEBC180B0D1CB</code> <code>576E0F333232D9F11813FE4C173BB2EA</code> <code>73638E8E93292F4C99D9AADA447CBD2D</code> <code>CB6A960F0DC3907102FC6772DF40D2F2</code> <code>0C9780160E95F0C66C767480F5D2094E</code> <code>4B682AEA0267AC63B7F5BEC6D2713487</code> <code>3642A89393BFFF613DF05E6CADC5BED2</code> <code>B1C1034D255D91C53EDF4D2F317728F4</code> <code>8144EF54B96A6593152C038D5B2E8FA5</code> <code>7F06ACBF3833D8BD3DD2B67C4BAB60AD</code> <code>F42784E03A97CC656CA844E80630CC19</code> <code>93624B306EE964ED1684BFBCC225187E</code> <code>C95C696A920F34F5DF0A3BA152682697</code> <code>58EDB70FF866541D28588ADE934BDFBE</code> <code>55905E6F3E8BFD1A660B34B21BBD94C4</code> <code>CDFE50C60A360AC133DA1BB673F67739</code> <code>17C11501AF67EFDE311658ACC96BD259</code> <code>FF563AB40ACE0E06F70E2BFA2C8405F3</code> <code>F395DE5FD858622BD1A18E1C3A6A4DB5</code> <code>A8F82BB9F7EC52D41083DC58948EF37F</code><br> <code>CD24E839</code></td>
<td><code>FE50020039C2863F1FE5AE556977083D</code> <code>94B9889E67DC46758F36A1A267C63709</code> <code>193F108DCF7F2B2C60B2558D1E5789F2</code> <code>ED2144D9B7A9E39E0FDB4EA832D51A8E</code> <code>AEE5E157322A59DE712253F85C344CC8</code> <code>2B22B741BA9642D5151207C583448DCA</code> <code>DDDDA64BF6E2F7BFCC4DD664A0C045C8</code> <code>5D0786903EECC8F1A18EBB1920FEDE0B</code> <code>75DD79F30E535DA1512890570F8B1A3E</code> <code>20C4D44F849886D3A8E78E81EFB04D11</code> <code>DCBA3929B61123DDC11D656DAE2E5F3D</code> <code>7F8F18AF243530A309307563832C8CCE</code> <code>7FF01BC7D69DB14039B9E78DB8EF246B</code> <code>D41279AB2095C21A09ADE3CCE020617E</code> <code>46763AD90E9B7173232CCF17211A6FBA</code> <code>74548BB6577479B160B70DA82435CD10</code> <code>125550ACBCC5E5E3059DB41F5C6EC3DB</code> <code>F0CEC9AD6EA0E030EA6AB9F8BC4F7B1C</code> <code>C08AF69D8E5E1FC7FCE9E6DAC31E1521</code> <code>C09DAA13BD40E17E1A1B3E460259C3C0</code> <code>5C85A3CB266048691CA879C55DD2B21F</code> <code>B2919370D4A41A69ECC8C8AA8DC8BC89</code> <code>50C6BAF830A68B75BA81A83AF420B842</code> <code>FFBF2B9F781A2394189B82570E2F2B85</code> <code>4E4706801520E4CEAB369526C5405425</code> <code>270B72E817A4F32AE64A29D94AB0B2F1</code> <code>99EFCECBFE1B860D5EB0B8C8208E1561</code> <code>2DEB9ECB32812818535DEB09135F6329</code> <code>62677C627B09614B2F3048B6CE206D18</code> <code>C430E16E59FD4F04C604FAE1C027C942</code> <code>17A08F6B576EB8366CB6066872C8506E</code> <code>EE080096DFD494BA4F29DFDEE212A4DD</code> <code>092FA9DB13E8C11B5E03F997783CFA78</code> <code>2F126942CA57B0D357D8B731A6FA54FC</code> <code>A174A5843CCB5DFFE90FA4E424A490FD</code> <code>AD9F8B3FF8B113CAC09470CFD73ED954</code> <code>635BC5BA49EBAB36D6836A2DB090BF43</code><br> <code>48DFB515</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 62802FD3A854F23BC3BAA4B2784CC11390362E1839E954F5CA27D3DFB
<!-- 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 = C9EF02013284BC695EFFAA67C2907D89E3E6A406AD580BBF6516279B4ADD57F9F9AEA7CE38AE904AD565D76DC518452BAE9BB9B6DA5A1AD1203DFC5A6E458C0E131A8D8F9E67192A3EE1AF22306DF772EDED7C5687FBFDB376DC1776FF844CB4526E6121DD825F8D4AA39443B5111A1A0EC4832A5571363ACBEC73B7771608B28B14F5E35D5D8E9FA8B7A47AAB4208C34378703C3E6A5F3A22E7DA670510B644BAFB301492CDC67C7D995024E82E99E31AE76FFD2BF400E066632BF3A6223FB9996174A937C3E8BE228F0747E692DC6966A25E1FBE2F841C2927FB634534CC0F27D5B2976B3DBF3273B605BF82FC6AF9443DF77F2553A230819BCECA2825988E9CE6E36B2BFF5FA936D1F85D0E6F9350E2C4373C5F3CEBC180B0D1CB576E0F333232D9F11813FE4C173BB2EA73638E8E93292F4C99D9AADA447CBD2DCB6A960F0DC3907102FC6772DF40D2F20C9780160E95F0C66C767480F5D2094E4B682AEA0267AC63B7F5BEC6D27134873642A89393BFFF613DF05E6CADC5BED2B1C1034D255D91C53EDF4D2F317728F48144EF54B96A6593152C038D5B2E8FA57F06ACBF3833D8BD3DD2B67C4BAB60ADF42784E03A97CC656CA844E80630CC1993624B306EE964ED1684BFBCC225187EC95C696A920F34F5DF0A3BA15268269758EDB70FF866541D28588ADE934BDFBE55905E6F3E8BFD1A660B34B21BBD94C4CDFE50C60A360AC133DA1BB673F6773917C11501AF67EFDE311658ACC96BD259FF563AB40ACE0E06F70E2BFA2C8405F3F395DE5FD858622BD1A18E1C3A6A4DB5A8F82BB9F7EC52D41083DC58948EF37FCD24E839
tmp_aes_key = E96A1792988B55D95430AE549C488BF681641EC28E79158F9E3CC33BFDF87960
tmp_aes_iv = 8861AD3E24391A7C3CC470124711FB6AC4F42268A01FFE4DD29D9FCA288034A2</code></pre>
<pre><code>encrypted_answer = 39C2863F1FE5AE556977083D94B9889E67DC46758F36A1A267C63709193F108DCF7F2B2C60B2558D1E5789F2ED2144D9B7A9E39E0FDB4EA832D51A8EAEE5E157322A59DE712253F85C344CC82B22B741BA9642D5151207C583448DCADDDDA64BF6E2F7BFCC4DD664A0C045C85D0786903EECC8F1A18EBB1920FEDE0B75DD79F30E535DA1512890570F8B1A3E20C4D44F849886D3A8E78E81EFB04D11DCBA3929B61123DDC11D656DAE2E5F3D7F8F18AF243530A309307563832C8CCE7FF01BC7D69DB14039B9E78DB8EF246BD41279AB2095C21A09ADE3CCE020617E46763AD90E9B7173232CCF17211A6FBA74548BB6577479B160B70DA82435CD10125550ACBCC5E5E3059DB41F5C6EC3DBF0CEC9AD6EA0E030EA6AB9F8BC4F7B1CC08AF69D8E5E1FC7FCE9E6DAC31E1521C09DAA13BD40E17E1A1B3E460259C3C05C85A3CB266048691CA879C55DD2B21FB2919370D4A41A69ECC8C8AA8DC8BC8950C6BAF830A68B75BA81A83AF420B842FFBF2B9F781A2394189B82570E2F2B854E4706801520E4CEAB369526C5405425270B72E817A4F32AE64A29D94AB0B2F199EFCECBFE1B860D5EB0B8C8208E15612DEB9ECB32812818535DEB09135F632962677C627B09614B2F3048B6CE206D18C430E16E59FD4F04C604FAE1C027C94217A08F6B576EB8366CB6066872C8506EEE080096DFD494BA4F29DFDEE212A4DD092FA9DB13E8C11B5E03F997783CFA782F126942CA57B0D357D8B731A6FA54FCA174A5843CCB5DFFE90FA4E424A490FDAD9F8B3FF8B113CAC09470CFD73ED954635BC5BA49EBAB36D6836A2DB090BF4348DFB515
tmp_aes_key = 1F5005ED5D25B09D0E1B530B9A88EB7DDF60B70431DA1594FAA1309BDFBE9624
tmp_aes_iv = 13452520C02EA8FD9DC3FE8959CC7B61F0222CDBDB5518A21C2A316A3A68709D</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 04EFE59D8CA105B3FEFD125A52ED14A395F52677BA0D89B5A9A9E760C1900993EF1DD3FA514A0E34694164B6A226865F51764CC11D1D1CC103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100B0C038130ECF205F6785B02CF13BA26796D2DCE18D6C8ADE7C682D7F8214CE9404A30DF9B071B2713CE3F6CC9F690245BAB323F905E1B6811C19BEDEB515F9297C7C4ADC9F0C2C045223128E6443B7CD05C004C4F5A36851114ED6E8FC6580C48C7A1955B21EC90ECFC30E8F30F9E97854755920040CEC5E75FDCABE9E2C2EC3BD895CED053B0BBD3A251DDF321E17EC81757155ECB0DC3770D3FD5F60A287C42CF298DB44E1F68D54921DDE2D17227C1121D75F37952EAC2B350C3F8E8059D65F404BB1FCEA36FFB996150D41DD0624CEB2628A085A859CFF174D5C366983451D50D912C722D44B80924A19138F7DCBFA56273E9119643FFC4B5A782FFE0AC45E546E65C1255A8B7D9F86A3
answer = BA0D89B5A9A9E760C1900993EF1DD3FA514A0E34694164B6A226865F51764CC11D1D1CC103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100B0C038130ECF205F6785B02CF13BA26796D2DCE18D6C8ADE7C682D7F8214CE9404A30DF9B071B2713CE3F6CC9F690245BAB323F905E1B6811C19BEDEB515F9297C7C4ADC9F0C2C045223128E6443B7CD05C004C4F5A36851114ED6E8FC6580C48C7A1955B21EC90ECFC30E8F30F9E97854755920040CEC5E75FDCABE9E2C2EC3BD895CED053B0BBD3A251DDF321E17EC81757155ECB0DC3770D3FD5F60A287C42CF298DB44E1F68D54921DDE2D17227C1121D75F37952EAC2B350C3F8E8059D65F404BB1FCEA36FFB996150D41DD0624CEB2628A085A859CFF174D5C366983451D50D912C722D44B80924A19138F7DCBFA56273E9119643FFC4B5A782FFE0AC45E546E65C1255A8B7D9F86A3</code></pre>
<pre><code>answer_with_hash = 88DCC9EFF3156A1CE32557AED9710A9A4BB46F0FBA0D89B560A4661DF29F2D88C02752BDD777C0EAC99B0B86CCDDD65E855C0C7DAE5F05FB03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100920DCE2F05DF719D1B4D89FA4FD430EF585B2E8A489D9E7D16A07DA223928361D237EF96EFED0D7987193F5AE3E1FC703C2BF5EF4139F617215D3E673FDCB36F5A93F35E411023347FA599DC1FEE97E8B970472D0384AAA4340D713935B38F617A88CDB258F5D6DB9149FE1E0A76B65E8D391384D046109D1CCA55C45671D33C30B3DA7C3DA931E0AE81E653C337034A157A96145D977397346FE913505AD8C43119620E74F5A793B6EAE720D7E0EA4596F39A5BEE3209185BD1682B0B358D9C55D8F27F250865B005CE0DD20E43AB05E38FADB691FE85C8D10B5FAD2EA6305B887797DECA920A4410E7D43853CB34965AB250414A09CDFFDF5BE791BF6AAFF417966F65445D78FB42837187
answer = BA0D89B560A4661DF29F2D88C02752BDD777C0EAC99B0B86CCDDD65E855C0C7DAE5F05FB03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100920DCE2F05DF719D1B4D89FA4FD430EF585B2E8A489D9E7D16A07DA223928361D237EF96EFED0D7987193F5AE3E1FC703C2BF5EF4139F617215D3E673FDCB36F5A93F35E411023347FA599DC1FEE97E8B970472D0384AAA4340D713935B38F617A88CDB258F5D6DB9149FE1E0A76B65E8D391384D046109D1CCA55C45671D33C30B3DA7C3DA931E0AE81E653C337034A157A96145D977397346FE913505AD8C43119620E74F5A793B6EAE720D7E0EA4596F39A5BEE3209185BD1682B0B358D9C55D8F27F250865B005CE0DD20E43AB05E38FADB691FE85C8D10B5FAD2EA6305B887797DECA920A4410E7D43853CB34965AB250414A09CDFFDF5BE791BF6AAFF417966F65445D78FB42837187</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 A9 A9 E7 60 C1 90 09 93 EF 1D D3 FA
0010 | 51 4A 0E 34 69 41 64 B6 A2 26 86 5F 51 76 4C C1
0020 | 1D 1D 1C C1 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 60 A4 66 1D F2 9F 2D 88 C0 27 52 BD
0010 | D7 77 C0 EA C9 9B 0B 86 CC DD D6 5E 85 5C 0C 7D
0020 | AE 5F 05 FB 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 = BA0D89B5A9A9E760C1900993EF1DD3FA514A0E34694164B6A226865F51764CC11D1D1CC
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 | B0 C0 38 13 0E CF 20 5F 67 85 B0 2C F1 3B A2 67
0140 | 96 D2 DC E1 8D 6C 8A DE 7C 68 2D 7F 82 14 CE 94
0150 | 04 A3 0D F9 B0 71 B2 71 3C E3 F6 CC 9F 69 02 45
0160 | BA B3 23 F9 05 E1 B6 81 1C 19 BE DE B5 15 F9 29
0170 | 7C 7C 4A DC 9F 0C 2C 04 52 23 12 8E 64 43 B7 CD
0180 | 05 C0 04 C4 F5 A3 68 51 11 4E D6 E8 FC 65 80 C4
0190 | 8C 7A 19 55 B2 1E C9 0E CF C3 0E 8F 30 F9 E9 78
01A0 | 54 75 59 20 04 0C EC 5E 75 FD CA BE 9E 2C 2E C3
01B0 | BD 89 5C ED 05 3B 0B BD 3A 25 1D DF 32 1E 17 EC
01C0 | 81 75 71 55 EC B0 DC 37 70 D3 FD 5F 60 A2 87 C4
01D0 | 2C F2 98 DB 44 E1 F6 8D 54 92 1D DE 2D 17 22 7C
01E0 | 11 21 D7 5F 37 95 2E AC 2B 35 0C 3F 8E 80 59 D6
01F0 | 5F 40 4B B1 FC EA 36 FF B9 96 15 0D 41 DD 06 24
0200 | CE B2 62 8A 08 5A 85 9C FF 17 4D 5C 36 69 83 45
0210 | 1D 50 D9 12 C7 22 D4 4B 80 92 4A 19 13 8F 7D CB
0220 | FA 56 27 3E 91 19 64 3F FC 4B 5A 78 2F FE 0A C4
0230 | 5E 54 6E 65</code></pre>
0130 | 92 0D CE 2F 05 DF 71 9D 1B 4D 89 FA 4F D4 30 EF
0140 | 58 5B 2E 8A 48 9D 9E 7D 16 A0 7D A2 23 92 83 61
0150 | D2 37 EF 96 EF ED 0D 79 87 19 3F 5A E3 E1 FC 70
0160 | 3C 2B F5 EF 41 39 F6 17 21 5D 3E 67 3F DC B3 6F
0170 | 5A 93 F3 5E 41 10 23 34 7F A5 99 DC 1F EE 97 E8
0180 | B9 70 47 2D 03 84 AA A4 34 0D 71 39 35 B3 8F 61
0190 | 7A 88 CD B2 58 F5 D6 DB 91 49 FE 1E 0A 76 B6 5E
01A0 | 8D 39 13 84 D0 46 10 9D 1C CA 55 C4 56 71 D3 3C
01B0 | 30 B3 DA 7C 3D A9 31 E0 AE 81 E6 53 C3 37 03 4A
01C0 | 15 7A 96 14 5D 97 73 97 34 6F E9 13 50 5A D8 C4
01D0 | 31 19 62 0E 74 F5 A7 93 B6 EA E7 20 D7 E0 EA 45
01E0 | 96 F3 9A 5B EE 32 09 18 5B D1 68 2B 0B 35 8D 9C
01F0 | 55 D8 F2 7F 25 08 65 B0 05 CE 0D D2 0E 43 AB 05
0200 | E3 8F AD B6 91 FE 85 C8 D1 0B 5F AD 2E A6 30 5B
0210 | 88 77 97 DE CA 92 0A 44 10 E7 D4 38 53 CB 34 96
0220 | 5A B2 50 41 4A 09 CD FF DF 5B E7 91 BF 6A AF F4
0230 | 17 96 6F 65</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
<table class="table">
@ -570,13 +570,13 @@ answer = BA0D89B5A9A9E760C1900993EF1DD3FA514A0E34694164B6A226865F51764CC11D1D1CC
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>A9A9E760C1900993EF1DD3FA514A0E34</code></td>
<td><code>60A4661DF29F2D88C02752BDD777C0EA</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>694164B6A226865F51764CC11D1D1CC1</code></td>
<td><code>C99B0B86CCDDD65E855C0C7DAE5F05FB</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B5A9A9E760C1900993EF1DD3FA514A0E34694164B6A226865F51764CC11D1D1CC
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE000100B0C038130ECF205F6785B02C</code> <code>F13BA26796D2DCE18D6C8ADE7C682D7F</code> <code>8214CE9404A30DF9B071B2713CE3F6CC</code> <code>9F690245BAB323F905E1B6811C19BEDE</code> <code>B515F9297C7C4ADC9F0C2C045223128E</code> <code>6443B7CD05C004C4F5A36851114ED6E8</code> <code>FC6580C48C7A1955B21EC90ECFC30E8F</code> <code>30F9E97854755920040CEC5E75FDCABE</code> <code>9E2C2EC3BD895CED053B0BBD3A251DDF</code> <code>321E17EC81757155ECB0DC3770D3FD5F</code> <code>60A287C42CF298DB44E1F68D54921DDE</code> <code>2D17227C1121D75F37952EAC2B350C3F</code> <code>8E8059D65F404BB1FCEA36FFB996150D</code> <code>41DD0624CEB2628A085A859CFF174D5C</code> <code>366983451D50D912C722D44B80924A19</code> <code>138F7DCBFA56273E9119643FFC4B5A78</code><br> <code>2FFE0AC4</code></td>
<td><code>FE000100920DCE2F05DF719D1B4D89FA</code> <code>4FD430EF585B2E8A489D9E7D16A07DA2</code> <code>23928361D237EF96EFED0D7987193F5A</code> <code>E3E1FC703C2BF5EF4139F617215D3E67</code> <code>3FDCB36F5A93F35E411023347FA599DC</code> <code>1FEE97E8B970472D0384AAA4340D7139</code> <code>35B38F617A88CDB258F5D6DB9149FE1E</code> <code>0A76B65E8D391384D046109D1CCA55C4</code> <code>5671D33C30B3DA7C3DA931E0AE81E653</code> <code>C337034A157A96145D977397346FE913</code> <code>505AD8C43119620E74F5A793B6EAE720</code> <code>D7E0EA4596F39A5BEE3209185BD1682B</code> <code>0B358D9C55D8F27F250865B005CE0DD2</code> <code>0E43AB05E38FADB691FE85C8D10B5FAD</code> <code>2EA6305B887797DECA920A4410E7D438</code> <code>53CB34965AB250414A09CDFFDF5BE791</code><br> <code>BF6AAFF4</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>5E546E65</code> (1701729374 in decimal)</td>
<td><code>17966F65</code> (1701811735 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B5A9A9E760C1900993EF1DD3FA514A0E34694164B6A226865F51764CC11D1D1CC
<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 = 98E98E89E25659746BB1B7D32360E34685BD948BC6B8D6B1EA94A994E018D7E45F8A218021B583C181E8F0FAB182796B011ABE552528E4BB9600AC0CE69D17F1AF0099F412F037F1E5D54784F8B57DB102B2D02B00AD84D4A33F7EAF049EFFB4ADAC676099D2C680BA2D6C508DC6D6E56898EB8504D4E46C64D3277A643EC1A53CAF435D47C35F1BF2D53B298269459B36FAF38BAF8429CD72BEB0467E75B4867B291D5D18A18CDA3372E7B714E28A8CAEFAA3476E007EE8AB54D482CC9814B13F7CF5B8DA04E4303BBA0F58A4A1BA7A3077A02619F435E638B9A520996E9A545FC09EB97D7C404AA451878B9FE0B5C5F48C178B099400DDF627200AA06A4FEC</code></pre>
<pre><code>b = 8F8D470511408FAECB9F4EB44616FC4EF2EC1608CBDF757EE02833FFD414E55409BA4EE8CAA76863D7D8355F32D0F171C23ADD933D9F179C30EBE8A8741B9F79F2C2D14AFFF9A49D0923D43C2A7EC080F8386DAA9D6912FE9411AE547B620D56C1195BAA0D96CD5B075A2DEA1180D1B5B920D08FD6A5251E4C637E21008AF8DA425E54BEA446C1CF8CC50BD132FF7BD0D5A3BD90395C3521FA8482A21F5177A483CE403D7C3B969B4DB042DC5CF0D86F5DAA5B4F513F1C601025C6B2AB3EC6F82A05B64C7A98440828392F31CC80492F2C24C2823A8E3C5E62C5A5852576C0FBB1AC1F009158B001E1796FFF2A0FB49282C2F9A7F47A5F87CEC2B8E35F6EC8B7</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 = 2588E25A92633AD1B5FC851F5A4B9F8BB0A26145EC5E160369577DFF86CAF703A4D02DB7F512E696ECA856DA52C0D3FCFE91991D1A7D7207AEE7C20B0553EE13DFFF4CBE3771299FA40C2AC5281DF37B68E9E314440CFE3C59C2A2AD607C13607815AB8A6744551F2F6F890AA3C2BA8649DFB1C910BD1B166698B7A75B00BCA5D2F0444C88D97B843350AE83095C1BE4BACDF25720BA2248D473CDD6571A35E54C2E350892AD752CF92D6F5D1189C7914A2D6033D78591FB2EF7DAFD3F3E9A43AA84875CDCAAD4AC423A2856BFC110226C9688981F5AE981FB84432D49FF2FC04ACFC6A82BA89BC336D93359C6CECE1C1ECCE7450B079DB9581D01A895805CD6</code></pre>
<pre><code>g_b = C07C8885A3B2052FEF87207D621BFB19ECFC77DE64D2869E91162AD87FC0EE2CBEE339C64223C054CB39F66749DC31BBA97C94F5D0CD1CE9D8B3F1F853733F5E93FF5267818C1EB55C22CD00F9722EDE1A58D20B78C7C548CC4ADB2B4672458DBFC76FA3666290820729AD9771391BDF2FE607D9B7B9DB89B58FC3688F856E1939A21E022B76743EA6A574AD7C533443A75FC35C27632D5B872C642503B61BD21008675BC2DF80C3F469E450E75375C9701022A06C47E104EEADE717A5426FD0C0E7CE7944DC2872EF098B980484935A426CAF81B0CC698C528B4297D691E63A717C61167FF63962D14D835CAE3E73B4B201D43B8FE01F157A615BFCE612241C</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 A9 A9 E7 60 C1 90 09 93 EF 1D D3 FA
0010 | 51 4A 0E 34 69 41 64 B6 A2 26 86 5F 51 76 4C C1
0020 | 1D 1D 1C C1 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 25 88 E2 5A 92 63 3A D1 B5 FC 85 1F 5A 4B 9F 8B
0040 | B0 A2 61 45 EC 5E 16 03 69 57 7D FF 86 CA F7 03
0050 | A4 D0 2D B7 F5 12 E6 96 EC A8 56 DA 52 C0 D3 FC
0060 | FE 91 99 1D 1A 7D 72 07 AE E7 C2 0B 05 53 EE 13
0070 | DF FF 4C BE 37 71 29 9F A4 0C 2A C5 28 1D F3 7B
0080 | 68 E9 E3 14 44 0C FE 3C 59 C2 A2 AD 60 7C 13 60
0090 | 78 15 AB 8A 67 44 55 1F 2F 6F 89 0A A3 C2 BA 86
00A0 | 49 DF B1 C9 10 BD 1B 16 66 98 B7 A7 5B 00 BC A5
00B0 | D2 F0 44 4C 88 D9 7B 84 33 50 AE 83 09 5C 1B E4
00C0 | BA CD F2 57 20 BA 22 48 D4 73 CD D6 57 1A 35 E5
00D0 | 4C 2E 35 08 92 AD 75 2C F9 2D 6F 5D 11 89 C7 91
00E0 | 4A 2D 60 33 D7 85 91 FB 2E F7 DA FD 3F 3E 9A 43
00F0 | AA 84 87 5C DC AA D4 AC 42 3A 28 56 BF C1 10 22
0100 | 6C 96 88 98 1F 5A E9 81 FB 84 43 2D 49 FF 2F C0
0110 | 4A CF C6 A8 2B A8 9B C3 36 D9 33 59 C6 CE CE 1C
0120 | 1E CC E7 45 0B 07 9D B9 58 1D 01 A8 95 80 5C D6</code></pre>
<pre><code>0000 | 54 B6 43 66 60 A4 66 1D F2 9F 2D 88 C0 27 52 BD
0010 | D7 77 C0 EA C9 9B 0B 86 CC DD D6 5E 85 5C 0C 7D
0020 | AE 5F 05 FB 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | C0 7C 88 85 A3 B2 05 2F EF 87 20 7D 62 1B FB 19
0040 | EC FC 77 DE 64 D2 86 9E 91 16 2A D8 7F C0 EE 2C
0050 | BE E3 39 C6 42 23 C0 54 CB 39 F6 67 49 DC 31 BB
0060 | A9 7C 94 F5 D0 CD 1C E9 D8 B3 F1 F8 53 73 3F 5E
0070 | 93 FF 52 67 81 8C 1E B5 5C 22 CD 00 F9 72 2E DE
0080 | 1A 58 D2 0B 78 C7 C5 48 CC 4A DB 2B 46 72 45 8D
0090 | BF C7 6F A3 66 62 90 82 07 29 AD 97 71 39 1B DF
00A0 | 2F E6 07 D9 B7 B9 DB 89 B5 8F C3 68 8F 85 6E 19
00B0 | 39 A2 1E 02 2B 76 74 3E A6 A5 74 AD 7C 53 34 43
00C0 | A7 5F C3 5C 27 63 2D 5B 87 2C 64 25 03 B6 1B D2
00D0 | 10 08 67 5B C2 DF 80 C3 F4 69 E4 50 E7 53 75 C9
00E0 | 70 10 22 A0 6C 47 E1 04 EE AD E7 17 A5 42 6F D0
00F0 | C0 E7 CE 79 44 DC 28 72 EF 09 8B 98 04 84 93 5A
0100 | 42 6C AF 81 B0 CC 69 8C 52 8B 42 97 D6 91 E6 3A
0110 | 71 7C 61 16 7F F6 39 62 D1 4D 83 5C AE 3E 73 B4
0120 | B2 01 D4 3B 8F E0 1F 15 7A 61 5B FC E6 12 24 1C</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 = BA0D89B5A9A9E760C1900993EF1DD3FA514A0E34694164B6A226865F51764CC11D1D1CC
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>A9A9E760C1900993EF1DD3FA514A0E34</code></td>
<td><code>60A4661DF29F2D88C02752BDD777C0EA</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>694164B6A226865F51764CC11D1D1CC1</code></td>
<td><code>C99B0B86CCDDD65E855C0C7DAE5F05FB</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE0001002588E25A92633AD1B5FC851F</code> <code>5A4B9F8BB0A26145EC5E160369577DFF</code> <code>86CAF703A4D02DB7F512E696ECA856DA</code> <code>52C0D3FCFE91991D1A7D7207AEE7C20B</code> <code>0553EE13DFFF4CBE3771299FA40C2AC5</code> <code>281DF37B68E9E314440CFE3C59C2A2AD</code> <code>607C13607815AB8A6744551F2F6F890A</code> <code>A3C2BA8649DFB1C910BD1B166698B7A7</code> <code>5B00BCA5D2F0444C88D97B843350AE83</code> <code>095C1BE4BACDF25720BA2248D473CDD6</code> <code>571A35E54C2E350892AD752CF92D6F5D</code> <code>1189C7914A2D6033D78591FB2EF7DAFD</code> <code>3F3E9A43AA84875CDCAAD4AC423A2856</code> <code>BFC110226C9688981F5AE981FB84432D</code> <code>49FF2FC04ACFC6A82BA89BC336D93359</code> <code>C6CECE1C1ECCE7450B079DB9581D01A8</code><br> <code>95805CD6</code></td>
<td><code>FE000100C07C8885A3B2052FEF87207D</code> <code>621BFB19ECFC77DE64D2869E91162AD8</code> <code>7FC0EE2CBEE339C64223C054CB39F667</code> <code>49DC31BBA97C94F5D0CD1CE9D8B3F1F8</code> <code>53733F5E93FF5267818C1EB55C22CD00</code> <code>F9722EDE1A58D20B78C7C548CC4ADB2B</code> <code>4672458DBFC76FA3666290820729AD97</code> <code>71391BDF2FE607D9B7B9DB89B58FC368</code> <code>8F856E1939A21E022B76743EA6A574AD</code> <code>7C533443A75FC35C27632D5B872C6425</code> <code>03B61BD21008675BC2DF80C3F469E450</code> <code>E75375C9701022A06C47E104EEADE717</code> <code>A5426FD0C0E7CE7944DC2872EF098B98</code> <code>0484935A426CAF81B0CC698C528B4297</code> <code>D691E63A717C61167FF63962D14D835C</code> <code>AE3E73B4B201D43B8FE01F157A615BFC</code><br> <code>E612241C</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 = BA0D89B5A9A9E760C1900993EF1DD3FA514A0E34694164B6A226865F51764CC11D1D1CC
<!-- 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 = 54B64366A9A9E760C1900993EF1DD3FA514A0E34694164B6A226865F51764CC11D1D1CC10000000000000000FE0001002588E25A92633AD1B5FC851F5A4B9F8BB0A26145EC5E160369577DFF86CAF703A4D02DB7F512E696ECA856DA52C0D3FCFE91991D1A7D7207AEE7C20B0553EE13DFFF4CBE3771299FA40C2AC5281DF37B68E9E314440CFE3C59C2A2AD607C13607815AB8A6744551F2F6F890AA3C2BA8649DFB1C910BD1B166698B7A75B00BCA5D2F0444C88D97B843350AE83095C1BE4BACDF25720BA2248D473CDD6571A35E54C2E350892AD752CF92D6F5D1189C7914A2D6033D78591FB2EF7DAFD3F3E9A43AA84875CDCAAD4AC423A2856BFC110226C9688981F5AE981FB84432D49FF2FC04ACFC6A82BA89BC336D93359C6CECE1C1ECCE7450B079DB9581D01A895805CD6
padding = 970F83BB03E563DE1C1C370E
tmp_aes_key = E96A1792988B55D95430AE549C488BF681641EC28E79158F9E3CC33BFDF87960
tmp_aes_iv = 8861AD3E24391A7C3CC470124711FB6AC4F42268A01FFE4DD29D9FCA288034A2</code></pre>
<pre><code>data = 54B6436660A4661DF29F2D88C02752BDD777C0EAC99B0B86CCDDD65E855C0C7DAE5F05FB0000000000000000FE000100C07C8885A3B2052FEF87207D621BFB19ECFC77DE64D2869E91162AD87FC0EE2CBEE339C64223C054CB39F66749DC31BBA97C94F5D0CD1CE9D8B3F1F853733F5E93FF5267818C1EB55C22CD00F9722EDE1A58D20B78C7C548CC4ADB2B4672458DBFC76FA3666290820729AD9771391BDF2FE607D9B7B9DB89B58FC3688F856E1939A21E022B76743EA6A574AD7C533443A75FC35C27632D5B872C642503B61BD21008675BC2DF80C3F469E450E75375C9701022A06C47E104EEADE717A5426FD0C0E7CE7944DC2872EF098B980484935A426CAF81B0CC698C528B4297D691E63A717C61167FF63962D14D835CAE3E73B4B201D43B8FE01F157A615BFCE612241C
padding = 30BFD35285B442908738B3A8
tmp_aes_key = 1F5005ED5D25B09D0E1B530B9A88EB7DDF60B70431DA1594FAA1309BDFBE9624
tmp_aes_iv = 13452520C02EA8FD9DC3FE8959CC7B61F0222CDBDB5518A21C2A316A3A68709D</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 = 3100EDA298CD8244750C6E6C869D860C090E77B7E459E730FF1536D707787EC4BCDC65955E0E0A6A35FD241EE8AA3D04F4182F096CB43E85AD31A07AFDE27D64196B4E7FB7076057F12C7DA829D0B188645DC2674E466D031C93CEF333AD57FABD08ED86A5431DA34BFFAE8BAD98FB379875DB69316DA8A4B2678A5DE565DC380659155C50855C279B7CC76C599E66DA2DCCD9ECEF66539B1C2DCE512FD7FB5F5F5426BB64C01BADA6D5D98665022C5EC2B201F162404A66CDC6B27F5CCAA9AF971EB7D7CC07098FB8D3D9BA6F511753F8D11E2797CC3632D5B87AB4B5AB11E708D81BF0CC62695D5150460BAD2C14D918B50BA4E57026992692CDF299537458BBD977907EA0DB2EAC49E29523AE767F57C60EE317F4E9F541115EE445B2D8B91983ADABDE5D05C2269FA3062F4FAACC148574F5127C814F2C9CE550F0D5E9D9F19C5031836655CD773082ABAC0BE5A9</code></pre>
<pre><code>encrypted_data = 72295EAAA9388467487CEA2EAB3CBDB0D5CDCDC6AC0EA61C4B11EA56D7704343BCAC9D5BEC3CAA836C9E32DEFF1F1003740790FB0519E5A4D91A6B61BBC5BD244747E79795EC673A95DF8B6CD3B4E2838B38732C9AF6F9FAEA50D3C9F5FC7CEFE838E5DDC9A2BF81EE05BCEE007ED9FD4D778F7181A61166DFE40703DF27A1BF4287D3956BC4015786E61AF31325A2E18290F011AB03EF985FB3AE44AFA6D1092A72E601FA061D403605B4CDC1C687F9C86AB2DB3C235F70C18CB348FF7250146104F8CD19E0F3C54D42267803215EF89B33D4103AD1834FC8BFA56E9E4ACE2FC8463F927EFF956EB65A5FEE4CA48B48AB87E5E9C93207F5B0730BFE3E53D4B93DFD86DC35DBFFA0D40EBBEA78A5CED9DF83F44A8F7DB2E55C19462CE41F6508C869F4C5A78E5664D65DC831958586FEAA7A730FF6989A1EEB11A9ED3F582561D92DEBB33B44C30015970CE65D0B9C5B</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 B0 17 03 00 5E 54 6E 65
0010 | 78 01 00 00 1F 5F 04 F5 A9 A9 E7 60 C1 90 09 93
0020 | EF 1D D3 FA 51 4A 0E 34 69 41 64 B6 A2 26 86 5F
0030 | 51 76 4C C1 1D 1D 1C C1 FE 50 01 00 31 00 ED A2
0040 | 98 CD 82 44 75 0C 6E 6C 86 9D 86 0C 09 0E 77 B7
0050 | E4 59 E7 30 FF 15 36 D7 07 78 7E C4 BC DC 65 95
0060 | 5E 0E 0A 6A 35 FD 24 1E E8 AA 3D 04 F4 18 2F 09
0070 | 6C B4 3E 85 AD 31 A0 7A FD E2 7D 64 19 6B 4E 7F
0080 | B7 07 60 57 F1 2C 7D A8 29 D0 B1 88 64 5D C2 67
0090 | 4E 46 6D 03 1C 93 CE F3 33 AD 57 FA BD 08 ED 86
00A0 | A5 43 1D A3 4B FF AE 8B AD 98 FB 37 98 75 DB 69
00B0 | 31 6D A8 A4 B2 67 8A 5D E5 65 DC 38 06 59 15 5C
00C0 | 50 85 5C 27 9B 7C C7 6C 59 9E 66 DA 2D CC D9 EC
00D0 | EF 66 53 9B 1C 2D CE 51 2F D7 FB 5F 5F 54 26 BB
00E0 | 64 C0 1B AD A6 D5 D9 86 65 02 2C 5E C2 B2 01 F1
00F0 | 62 40 4A 66 CD C6 B2 7F 5C CA A9 AF 97 1E B7 D7
0100 | CC 07 09 8F B8 D3 D9 BA 6F 51 17 53 F8 D1 1E 27
0110 | 97 CC 36 32 D5 B8 7A B4 B5 AB 11 E7 08 D8 1B F0
0120 | CC 62 69 5D 51 50 46 0B AD 2C 14 D9 18 B5 0B A4
0130 | E5 70 26 99 26 92 CD F2 99 53 74 58 BB D9 77 90
0140 | 7E A0 DB 2E AC 49 E2 95 23 AE 76 7F 57 C6 0E E3
0150 | 17 F4 E9 F5 41 11 5E E4 45 B2 D8 B9 19 83 AD AB
0160 | DE 5D 05 C2 26 9F A3 06 2F 4F AA CC 14 85 74 F5
0170 | 12 7C 81 4F 2C 9C E5 50 F0 D5 E9 D9 F1 9C 50 31
0180 | 83 66 55 CD 77 30 82 AB AC 0B E5 A9</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C8 44 08 00 17 96 6F 65
0010 | 78 01 00 00 1F 5F 04 F5 60 A4 66 1D F2 9F 2D 88
0020 | C0 27 52 BD D7 77 C0 EA C9 9B 0B 86 CC DD D6 5E
0030 | 85 5C 0C 7D AE 5F 05 FB FE 50 01 00 72 29 5E AA
0040 | A9 38 84 67 48 7C EA 2E AB 3C BD B0 D5 CD CD C6
0050 | AC 0E A6 1C 4B 11 EA 56 D7 70 43 43 BC AC 9D 5B
0060 | EC 3C AA 83 6C 9E 32 DE FF 1F 10 03 74 07 90 FB
0070 | 05 19 E5 A4 D9 1A 6B 61 BB C5 BD 24 47 47 E7 97
0080 | 95 EC 67 3A 95 DF 8B 6C D3 B4 E2 83 8B 38 73 2C
0090 | 9A F6 F9 FA EA 50 D3 C9 F5 FC 7C EF E8 38 E5 DD
00A0 | C9 A2 BF 81 EE 05 BC EE 00 7E D9 FD 4D 77 8F 71
00B0 | 81 A6 11 66 DF E4 07 03 DF 27 A1 BF 42 87 D3 95
00C0 | 6B C4 01 57 86 E6 1A F3 13 25 A2 E1 82 90 F0 11
00D0 | AB 03 EF 98 5F B3 AE 44 AF A6 D1 09 2A 72 E6 01
00E0 | FA 06 1D 40 36 05 B4 CD C1 C6 87 F9 C8 6A B2 DB
00F0 | 3C 23 5F 70 C1 8C B3 48 FF 72 50 14 61 04 F8 CD
0100 | 19 E0 F3 C5 4D 42 26 78 03 21 5E F8 9B 33 D4 10
0110 | 3A D1 83 4F C8 BF A5 6E 9E 4A CE 2F C8 46 3F 92
0120 | 7E FF 95 6E B6 5A 5F EE 4C A4 8B 48 AB 87 E5 E9
0130 | C9 32 07 F5 B0 73 0B FE 3E 53 D4 B9 3D FD 86 DC
0140 | 35 DB FF A0 D4 0E BB EA 78 A5 CE D9 DF 83 F4 4A
0150 | 8F 7D B2 E5 5C 19 46 2C E4 1F 65 08 C8 69 F4 C5
0160 | A7 8E 56 64 D6 5D C8 31 95 85 86 FE AA 7A 73 0F
0170 | F6 98 9A 1E EB 11 A9 ED 3F 58 25 61 D9 2D EB B3
0180 | 3B 44 C3 00 15 97 0C E6 5D 0B 9C 5B</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>B01703005E546E65</code></td>
<td><code>C844080017966F65</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>A9A9E760C1900993EF1DD3FA514A0E34</code></td>
<td><code>60A4661DF29F2D88C02752BDD777C0EA</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>694164B6A226865F51764CC11D1D1CC1</code></td>
<td><code>C99B0B86CCDDD65E855C0C7DAE5F05FB</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE5001003100EDA298CD8244750C6E6C</code> <code>869D860C090E77B7E459E730FF1536D7</code> <code>07787EC4BCDC65955E0E0A6A35FD241E</code> <code>E8AA3D04F4182F096CB43E85AD31A07A</code> <code>FDE27D64196B4E7FB7076057F12C7DA8</code> <code>29D0B188645DC2674E466D031C93CEF3</code> <code>33AD57FABD08ED86A5431DA34BFFAE8B</code> <code>AD98FB379875DB69316DA8A4B2678A5D</code> <code>E565DC380659155C50855C279B7CC76C</code> <code>599E66DA2DCCD9ECEF66539B1C2DCE51</code> <code>2FD7FB5F5F5426BB64C01BADA6D5D986</code> <code>65022C5EC2B201F162404A66CDC6B27F</code> <code>5CCAA9AF971EB7D7CC07098FB8D3D9BA</code> <code>6F511753F8D11E2797CC3632D5B87AB4</code> <code>B5AB11E708D81BF0CC62695D5150460B</code> <code>AD2C14D918B50BA4E57026992692CDF2</code> <code>99537458BBD977907EA0DB2EAC49E295</code> <code>23AE767F57C60EE317F4E9F541115EE4</code> <code>45B2D8B91983ADABDE5D05C2269FA306</code> <code>2F4FAACC148574F5127C814F2C9CE550</code> <code>F0D5E9D9F19C5031836655CD773082AB</code><br> <code>AC0BE5A9</code></td>
<td><code>FE50010072295EAAA9388467487CEA2E</code> <code>AB3CBDB0D5CDCDC6AC0EA61C4B11EA56</code> <code>D7704343BCAC9D5BEC3CAA836C9E32DE</code> <code>FF1F1003740790FB0519E5A4D91A6B61</code> <code>BBC5BD244747E79795EC673A95DF8B6C</code> <code>D3B4E2838B38732C9AF6F9FAEA50D3C9</code> <code>F5FC7CEFE838E5DDC9A2BF81EE05BCEE</code> <code>007ED9FD4D778F7181A61166DFE40703</code> <code>DF27A1BF4287D3956BC4015786E61AF3</code> <code>1325A2E18290F011AB03EF985FB3AE44</code> <code>AFA6D1092A72E601FA061D403605B4CD</code> <code>C1C687F9C86AB2DB3C235F70C18CB348</code> <code>FF7250146104F8CD19E0F3C54D422678</code> <code>03215EF89B33D4103AD1834FC8BFA56E</code> <code>9E4ACE2FC8463F927EFF956EB65A5FEE</code> <code>4CA48B48AB87E5E9C93207F5B0730BFE</code> <code>3E53D4B93DFD86DC35DBFFA0D40EBBEA</code> <code>78A5CED9DF83F44A8F7DB2E55C19462C</code> <code>E41F6508C869F4C5A78E5664D65DC831</code> <code>958586FEAA7A730FF6989A1EEB11A9ED</code> <code>3F582561D92DEBB33B44C30015970CE6</code><br> <code>5D0B9C5B</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 = 7C74EC0C28CA50F65EC0A400A634F917DE855D8C4D09B0B0B0C1173D40CD5F4B90D8867F70AA2B60807F3F505D09ACD4926E6C90D99E68E2D613D587886228C9F276202908ACDE0D5B26D201FD990AD6E3179B986AF47C8FECDC163857289E908DDF6CC4A28135B319C8E6221A411D3E4D0463D10B92C96668383A77E7F91AAC2ADBD81D21A3C0536D3A3CE873D1442FB17FEA7315AF1A37F64C98D95BC6388C3FDDD03C6D1952D517AF0470EA2CD89CF74A3AC7358B10B9F6D631DCD74B68478CB5EAF9EBB2020217D943C552F3D121169928B9DD98E8514A4E3BC0831F51E88EBA9D913C48FA4DD607CA2E5C7B2628515521E3FF6222CAE80D764FB1A9C425</code></pre>
<pre><code>auth_key = 7C14296D430E38751FE5D28A2D9C1B71C4FD67157B0820BEB0BBE836BEC6E310652B9359362BA773297499DEF6FF6F9CF5461818649423AC14F235C5911B9CA2C926EC6B472F13BAE9CF149C49E7D7C6B850B34E4C0F6BA19EA22CD6478933892060C8FF258ACD3413F234F95EF23C64305CF1DA7EB3CB7FCFC75AAAEF368F4D1B518E1096D5CFEBEE42E19860AAE52925947179FF109F71778D8B47166EDB5FA0AD6DB92CD2D3BA77F77A93FE87B34D81A5FEFF20E6D5C0940527A4D2BFFB1BB5B4965F14226B5BB84C2D1BE40FBCB06A66DFF1ABDF53680CC1C07D380971E92254E02371B89F701D0830D94FD5AD350554032FD25ADDF652F9715CEDECBD0E</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 24 18 C2 5E 54 6E 65
0010 | 6C 00 00 00 34 F7 CB 3B A9 A9 E7 60 C1 90 09 93
0020 | EF 1D D3 FA 51 4A 0E 34 69 41 64 B6 A2 26 86 5F
0030 | 51 76 4C C1 1D 1D 1C C1 C8 E5 6F BE FD E6 B6 53
0040 | 16 C3 3D FE DF 77 06 E2</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 70 92 7A 17 96 6F 65
0010 | 60 00 00 00 34 F7 CB 3B 60 A4 66 1D F2 9F 2D 88
0020 | C0 27 52 BD D7 77 C0 EA C9 9B 0B 86 CC DD D6 5E
0030 | 85 5C 0C 7D AE 5F 05 FB 18 F4 EC D7 63 12 72 FD
0040 | 9E 17 B6 79 C5 91 AE E5</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>012418C25E546E65</code></td>
<td><code>0170927A17966F65</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>6C000000</code> (108 in decimal)</td>
<td><code>60000000</code> (96 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>A9A9E760C1900993EF1DD3FA514A0E34</code></td>
<td><code>60A4661DF29F2D88C02752BDD777C0EA</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>694164B6A226865F51764CC11D1D1CC1</code></td>
<td><code>C99B0B86CCDDD65E855C0C7DAE5F05FB</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>C8E56FBEFDE6B65316C33DFEDF7706E2</code></td>
<td><code>18F4ECD7631272FD9E17B679C591AEE5</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

@ -402,7 +402,7 @@
</tr>
<tr>
<td><a href="/method/contacts.blockFromReplies">contacts.blockFromReplies</a></td>
<td>Stop getting notifications about <a href="/api/threads">thread replies</a> of a certain user in <code>@replies</code></td>
<td>Stop getting notifications about <a href="/api/discussion">discussion replies</a> of a certain user in <code>@replies</code></td>
</tr>
<tr>
<td><a href="/method/phone.createGroupCall">phone.createGroupCall</a></td>