Update content of files

This commit is contained in:
GitHub Action 2024-07-25 17:14:32 +00:00
parent e42e237eab
commit ac29ed0aca
8 changed files with 234 additions and 247 deletions

View file

@ -53,7 +53,12 @@
---functions---
<a href='/method/messages.getFactCheck'>messages.getFactCheck</a>#b9cdc5ee peer:<a href='/type/InputPeer'>InputPeer</a> msg_id:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; = <a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/FactCheck'>FactCheck</a>&gt;;</code></pre>
<p>Fact-checks are represented by <a href="/constructor/factCheck">factCheck</a> constructors, optionally contained in the <code>factcheck</code> field of the <a href="/constructor/message">message</a> constructor. </p>
<p>Fact-checks are represented by <a href="/constructor/factCheck">factCheck</a> constructors, contained in the <code>factcheck</code> field of the <a href="/constructor/message">message</a> constructor. </p>
<p>Sometimes (i.e. for performance reasons), even if a message <em>does</em> have a factcheck, it may not be returned in the <code>text</code> field of the <a href="/constructor/factCheck">factCheck</a> associated to the <a href="/constructor/message">message</a>: in this case, the <a href="/constructor/factCheck">factCheck</a>.<code>need_check</code> flag will be set and the <code>country</code>/<code>text</code> flags won't be set, and the client should request the full text of the fact check manually using <a href="/method/messages.getFactCheck">messages.getFactCheck</a> when the message scrolls into view. </p>
<p>These manual requests should be bundled: every time a new ID is added to the queue of factchecks to manually fetch, postpone fetching by 80ms. </p>
<p>Store all <em>full</em> (i.e. those with a <code>country</code>/<code>text</code>) factchecks in a local database, using the <code>hash</code> as key.<br>
Avoid fetching <em>min</em> (i.e. those where <code>need_check</code> is set) factchecks if a factcheck with the same <code>hash</code> is already cached in the local database. </p>
<p>Example implementation: <a href="https://github.com/DrKLO/Telegram/blob/5fa5549a4a7f48476be29cc0facf68990ea10f62/TMessagesProj/src/main/java/org/telegram/messenger/FactCheckController.java">android</a>.</p>
<h3><a class="anchor" href="#editing-fact-checks" id="editing-fact-checks" name="editing-fact-checks"><i class="anchor-icon"></i></a>Editing fact-checks</h3>
<pre><code><a href='/constructor/factCheck'>factCheck</a>#b89bfccf flags:<a href='/type/%23'>#</a> need_check:flags.0?<a href='/constructor/true'>true</a> country:flags.1?<a href='/type/string'>string</a> text:flags.1?<a href='/type/TextWithEntities'>TextWithEntities</a> hash:<a href='/type/long'>long</a> = <a href='/type/FactCheck'>FactCheck</a>;

View file

@ -169,7 +169,7 @@
<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>
<li>Added <a href="/method/auth.reportMissingCode">auth.reportMissingCode</a> - </li>
<li>Added <a href="/method/auth.reportMissingCode">auth.reportMissingCode</a> - Official apps only, reports that the SMS authentication code wasn't delivered.</li>
<li>Added <a href="/method/messages.getEmojiStickerGroups">messages.getEmojiStickerGroups</a> - Represents a list of <a href="/api/emoji-categories">emoji categories</a>, to be used when choosing a sticker.</li>
</ul>
<h5><a class="anchor" href="#new-constructors" id="new-constructors" name="new-constructors"><i class="anchor-icon"></i></a>New Constructors</h5>

View file

@ -74,7 +74,7 @@
<tr>
<td><strong>need_check</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td> </td>
<td>If set, the <code>country</code>/<code>text</code> fields will <strong>not</strong> be set, and the fact check must be fetched manually by the client (if it isn't already cached with the key specified in <code>hash</code>) using bundled <a href="/method/messages.getFactCheck">messages.getFactCheck</a> requests, when the message with the factcheck scrolls into view.</td>
</tr>
<tr>
<td><strong>country</strong></td>

View file

@ -4,20 +4,10 @@
<meta charset="utf-8">
<title>auth.reportMissingCode</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Official apps only, reports that the SMS authentication code wasn&#39;t delivered.
Parameters
Name
Type
Description
phone_number…">
<meta property="description" content="Official apps only, reports that the SMS authentication code wasn&#39;t delivered.">
<meta property="og:title" content="auth.reportMissingCode">
<meta property="og:image" content="">
<meta property="og:description" content="Official apps only, reports that the SMS authentication code wasn&#39;t delivered.
Parameters
Name
Type
Description
phone_number…">
<meta property="og:description" content="Official apps only, reports that the SMS authentication code wasn&#39;t delivered.">
<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">
@ -114,7 +104,10 @@ phone_number…">
<td>The phone number is invalid.</td>
</tr>
</tbody>
</table></div>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#authsendcode" id="authsendcode" name="authsendcode"><i class="anchor-icon"></i></a><a href="/method/auth.sendCode">auth.sendCode</a></h4>
<p>Send the verification code for login</p></div>
</div>

View file

@ -4,38 +4,26 @@
<meta charset="utf-8">
<title>messages.getFactCheck</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
<meta property="description" content="Fetch one or more factchecks ».
Parameters
Name
Type
Description
peer
InputPeer
 
msg_id
Vector&lt;int&gt;
 
Result
Vector&lt;FactCheck&gt;
Possible errors
Code
Type…">
Peer where the messages were sent.
msg_id…">
<meta property="og:title" content="messages.getFactCheck">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
<meta property="og:description" content="Fetch one or more factchecks ».
Parameters
Name
Type
Description
peer
InputPeer
 
msg_id
Vector&lt;int&gt;
 
Result
Vector&lt;FactCheck&gt;
Possible errors
Code
Type…">
Peer where the messages were sent.
msg_id…">
<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">
@ -70,7 +58,8 @@ Type…">
<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/messages.getFactCheck" >messages.getFactCheck</a></li></ul></div>
<h1 id="dev_page_title">messages.getFactCheck</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Fetch one or more <a href="/api/factcheck">factchecks »</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>
@ -97,12 +86,12 @@ Type…">
<tr>
<td><strong>peer</strong></td>
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
<td> </td>
<td>Peer where the messages were sent.</td>
</tr>
<tr>
<td><strong>msg_id</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/int">int</a>&gt;</td>
<td> </td>
<td>Messages that have associated <a href="/constructor/factCheck">factCheck</a> constructors with the <code>need_check</code> flag set.</td>
</tr>
</tbody>
</table>

View file

@ -308,7 +308,7 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
<tr>
<td><a href="/method/auth.reportMissingCode">auth.reportMissingCode</a></td>
<td> </td>
<td>Official apps only, reports that the SMS authentication code wasn't delivered.</td>
</tr>
<tr>
<td><a href="/method/auth.signIn">auth.signIn</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 80 22 01 00 1C 80 A2 66
0010 | 14 00 00 00 F1 8E 7E BE 83 B0 58 5B 19 7D 96 F7
0020 | BF 9A D3 67 84 FA 35 A1</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 14 A0 0C 00 30 83 A2 66
0010 | 14 00 00 00 F1 8E 7E BE 36 0B 8A A0 07 4A 79 27
0020 | 37 AB 0C 91 14 60 FE 24</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>802201001C80A266</code></td>
<td><code>14A00C003083A266</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>83B0585B197D96F7BF9AD36784FA35A1</code></td>
<td><code>360B8AA0074A792737AB0C911460FE24</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 A4 B3 F5 1C 80 A2 66
0010 | 50 00 00 00 63 24 16 05 83 B0 58 5B 19 7D 96 F7
0020 | BF 9A D3 67 84 FA 35 A1 13 31 71 3E 97 3C FD 9A
0030 | AA 92 CB F4 6F 51 58 C0 08 16 34 14 91 F1 0D F2
0040 | 47 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 50 FD 0D 31 83 A2 66
0010 | B4 00 00 00 63 24 16 05 36 0B 8A A0 07 4A 79 27
0020 | 37 AB 0C 91 14 60 FE 24 DF 49 12 EC 8A 55 7D 05
0030 | 16 A5 31 B6 83 E3 2E 71 08 11 7F 8E 7E 39 B3 96
0040 | D7 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>01A4B3F51C80A266</code></td>
<td><code>0150FD0D3183A266</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>50000000</code> (80 in decimal)</td>
<td><code>B4000000</code> (180 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>83B0585B197D96F7BF9AD36784FA35A1</code></td>
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>1331713E973CFD9AAA92CBF46F5158C0</code></td>
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>0816341491F10DF247000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1599926384670405191</td>
<td><code>08117F8E7E39B396D7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1260883093472122583</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 = 1599926384670405191</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1599926384670405191 = 1191256111 * 1343058281</code></p>
<pre><code>p = 1191256111
q = 1343058281</code></pre>
<pre><code>pq = 1260883093472122583</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1260883093472122583 = 1072752257 * 1175372119</code></p>
<pre><code>p = 1072752257
q = 1175372119</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 16 34 14 91 F1 0D F2 47 00 00 00
0010 | 04 47 01 20 2F 00 00 00 04 50 0D 71 69 00 00 00
0020 | 83 B0 58 5B 19 7D 96 F7 BF 9A D3 67 84 FA 35 A1
0030 | 13 31 71 3E 97 3C FD 9A AA 92 CB F4 6F 51 58 C0
0040 | 79 68 97 19 BE 03 14 A2 99 5F DE 1F BA 86 20 98
0050 | 1A EB 50 99 10 BE 5F 92 5C 93 98 65 5D BB 9D 33
<pre><code>0000 | 95 5F F5 A9 08 11 7F 8E 7E 39 B3 96 D7 00 00 00
0010 | 04 3F F0 E6 81 00 00 00 04 46 0E C1 57 00 00 00
0020 | 36 0B 8A A0 07 4A 79 27 37 AB 0C 91 14 60 FE 24
0030 | DF 49 12 EC 8A 55 7D 05 16 A5 31 B6 83 E3 2E 71
0040 | 42 31 B6 F3 F3 4A 57 AC 62 68 8A 89 AF 95 39 CE
0050 | 89 F5 85 54 C5 EE EC 02 02 0D 76 0C 5F D6 C0 8D
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 = 1343058281</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>0816341491F10DF247000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1599926384670405191</td>
<td><code>08117F8E7E39B396D7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1260883093472122583</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>044701202F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1191256111</td>
<td><code>043FF0E681000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1072752257</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>04500D7169000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1343058281</td>
<td><code>04460EC157000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1175372119</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>83B0585B197D96F7BF9AD36784FA35A1</code></td>
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>1331713E973CFD9AAA92CBF46F5158C0</code></td>
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>79689719BE0314A2995FDE1FBA862098</code> <code>1AEB509910BE5F925C9398655DBB9D33</code></td>
<td><code>4231B6F3F34A57AC62688A89AF9539CE</code> <code>89F58554C5EEEC02020D760C5FD6C08D</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1343058281</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 = 955FF5A90816341491F10DF247000000044701202F00000004500D716900000083B0585B197D96F7BF9AD36784FA35A11331713E973CFD9AAA92CBF46F5158C079689719BE0314A2995FDE1FBA8620981AEB509910BE5F925C9398655DBB9D3302000000
random_padding_bytes = C8E4576EF64B3977CB5C690948A7B8F9372499FEA2EAAB77F1ECEAA0BCDC116018A90D87C362454B47BA9DD16F8B02F31219A142AAFE6147C39DA25F4BFF755818B6A817316741BDC3B244C246FCF3CFF64C7DC544F77E45DD8D7066</code></pre>
<pre><code>data = 955FF5A908117F8E7E39B396D7000000043FF0E68100000004460EC157000000360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E714231B6F3F34A57AC62688A89AF9539CE89F58554C5EEEC02020D760C5FD6C08D02000000
random_padding_bytes = 10694FFD7C36A351BDF613AD4D2256CBD9F97DC96834A8CC3638FCECF113AB5C3686D7CF7D76DE5C25B87DBBA3583241652BB725FCC6451CE339974A0C9A0375F35DE6DFD24DC11712CCE942D77B54FF59D679791474DE8FB94DEF90</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 = 4F3F03A204A2F836A9E9DEEC0BD637AB712E6BD26076D3658D029D5FC9BD6D5037242603AA51BC288DD35C82DC27F10F34DC197D652A4D563B81B3AC6485A1050783CC418E7B496C61CFCBF379A51614F50F9C6A79F4DA9A2FAAAFD6C630F53565DE6DA19F27E60791871155599876738A476490CFBDA7ED00726747C98428C14F6BA3C3684080244E986AAF750C6515143DB0749BE4F3EFCD5F2E64CEBD5678FB3C93B484D272E9CFBEC8D7E752B81D16DA6C5C241A1A53E95FA086F1B5D7D9AE302E88BFF11AA724E930A27453D3110D64614443FDE0DE832D9F794B3E731D8A063AA2B23FAAA30BA22C2DFFDA63D5A8CB7C325ABE85DFE610FE3288B9CFA2</code></pre>
<pre><code>encrypted_data = A8FB6FD79ECB4EA77F8DBEECC43417259046FC6491DA890F1AEDF55648C3529012B1B3E04D3FC1614E369A3E61FC64BF6D4D12C6B50E1BCE62EF9A88978900278CAB8486CA105BD8D88123D5639E37BF6CBFEDC469FFE888E420A07059F6CE998C759FDE513557F35C119A5996C43E1044128AAF5EACFA0DBE911FCE75F03BA251097C22C9D5F0239E1174EECA68E5FE3237DBE6FC48A2C3302418401A73734FFB220B6187D61F52C57E1D15C6D2D93F76D6B99EF46E01C180C92F92F0BA530CD0FEB60A28FB855E138901C2DA27C41EBAA09453A45C2F2AFDD41EB545A792F16CD1879951AAA2FAF259F54383069483001B466715BBB3E37615A5618C2B87D5</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 E4 9E 03 00 1D 80 A2 66
0010 | 40 01 00 00 BE E4 12 D7 83 B0 58 5B 19 7D 96 F7
0020 | BF 9A D3 67 84 FA 35 A1 13 31 71 3E 97 3C FD 9A
0030 | AA 92 CB F4 6F 51 58 C0 04 47 01 20 2F 00 00 00
0040 | 04 50 0D 71 69 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 4F 3F 03 A2 04 A2 F8 36 A9 E9 DE EC
0060 | 0B D6 37 AB 71 2E 6B D2 60 76 D3 65 8D 02 9D 5F
0070 | C9 BD 6D 50 37 24 26 03 AA 51 BC 28 8D D3 5C 82
0080 | DC 27 F1 0F 34 DC 19 7D 65 2A 4D 56 3B 81 B3 AC
0090 | 64 85 A1 05 07 83 CC 41 8E 7B 49 6C 61 CF CB F3
00A0 | 79 A5 16 14 F5 0F 9C 6A 79 F4 DA 9A 2F AA AF D6
00B0 | C6 30 F5 35 65 DE 6D A1 9F 27 E6 07 91 87 11 55
00C0 | 59 98 76 73 8A 47 64 90 CF BD A7 ED 00 72 67 47
00D0 | C9 84 28 C1 4F 6B A3 C3 68 40 80 24 4E 98 6A AF
00E0 | 75 0C 65 15 14 3D B0 74 9B E4 F3 EF CD 5F 2E 64
00F0 | CE BD 56 78 FB 3C 93 B4 84 D2 72 E9 CF BE C8 D7
0100 | E7 52 B8 1D 16 DA 6C 5C 24 1A 1A 53 E9 5F A0 86
0110 | F1 B5 D7 D9 AE 30 2E 88 BF F1 1A A7 24 E9 30 A2
0120 | 74 53 D3 11 0D 64 61 44 43 FD E0 DE 83 2D 9F 79
0130 | 4B 3E 73 1D 8A 06 3A A2 B2 3F AA A3 0B A2 2C 2D
0140 | FF DA 63 D5 A8 CB 7C 32 5A BE 85 DF E6 10 FE 32
0150 | 88 B9 CF A2</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 98 DD 0E 00 31 83 A2 66
0010 | 40 01 00 00 BE E4 12 D7 36 0B 8A A0 07 4A 79 27
0020 | 37 AB 0C 91 14 60 FE 24 DF 49 12 EC 8A 55 7D 05
0030 | 16 A5 31 B6 83 E3 2E 71 04 3F F0 E6 81 00 00 00
0040 | 04 46 0E C1 57 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 A8 FB 6F D7 9E CB 4E A7 7F 8D BE EC
0060 | C4 34 17 25 90 46 FC 64 91 DA 89 0F 1A ED F5 56
0070 | 48 C3 52 90 12 B1 B3 E0 4D 3F C1 61 4E 36 9A 3E
0080 | 61 FC 64 BF 6D 4D 12 C6 B5 0E 1B CE 62 EF 9A 88
0090 | 97 89 00 27 8C AB 84 86 CA 10 5B D8 D8 81 23 D5
00A0 | 63 9E 37 BF 6C BF ED C4 69 FF E8 88 E4 20 A0 70
00B0 | 59 F6 CE 99 8C 75 9F DE 51 35 57 F3 5C 11 9A 59
00C0 | 96 C4 3E 10 44 12 8A AF 5E AC FA 0D BE 91 1F CE
00D0 | 75 F0 3B A2 51 09 7C 22 C9 D5 F0 23 9E 11 74 EE
00E0 | CA 68 E5 FE 32 37 DB E6 FC 48 A2 C3 30 24 18 40
00F0 | 1A 73 73 4F FB 22 0B 61 87 D6 1F 52 C5 7E 1D 15
0100 | C6 D2 D9 3F 76 D6 B9 9E F4 6E 01 C1 80 C9 2F 92
0110 | F0 BA 53 0C D0 FE B6 0A 28 FB 85 5E 13 89 01 C2
0120 | DA 27 C4 1E BA A0 94 53 A4 5C 2F 2A FD D4 1E B5
0130 | 45 A7 92 F1 6C D1 87 99 51 AA A2 FA F2 59 F5 43
0140 | 83 06 94 83 00 1B 46 67 15 BB B3 E3 76 15 A5 61
0150 | 8C 2B 87 D5</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 = C8E4576EF64B3977CB5C690948A7B8F9372499FEA2EAAB77F1ECEAA0B
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>E49E03001D80A266</code></td>
<td><code>98DD0E003183A266</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 = C8E4576EF64B3977CB5C690948A7B8F9372499FEA2EAAB77F1ECEAA0B
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>83B0585B197D96F7BF9AD36784FA35A1</code></td>
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>1331713E973CFD9AAA92CBF46F5158C0</code></td>
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>044701202F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1191256111</td>
<td><code>043FF0E681000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1072752257</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>04500D7169000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1343058281</td>
<td><code>04460EC157000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1175372119</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 = C8E4576EF64B3977CB5C690948A7B8F9372499FEA2EAAB77F1ECEAA0B
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001004F3F03A204A2F836A9E9DEEC</code> <code>0BD637AB712E6BD26076D3658D029D5F</code> <code>C9BD6D5037242603AA51BC288DD35C82</code> <code>DC27F10F34DC197D652A4D563B81B3AC</code> <code>6485A1050783CC418E7B496C61CFCBF3</code> <code>79A51614F50F9C6A79F4DA9A2FAAAFD6</code> <code>C630F53565DE6DA19F27E60791871155</code> <code>599876738A476490CFBDA7ED00726747</code> <code>C98428C14F6BA3C3684080244E986AAF</code> <code>750C6515143DB0749BE4F3EFCD5F2E64</code> <code>CEBD5678FB3C93B484D272E9CFBEC8D7</code> <code>E752B81D16DA6C5C241A1A53E95FA086</code> <code>F1B5D7D9AE302E88BFF11AA724E930A2</code> <code>7453D3110D64614443FDE0DE832D9F79</code> <code>4B3E731D8A063AA2B23FAAA30BA22C2D</code> <code>FFDA63D5A8CB7C325ABE85DFE610FE32</code><br> <code>88B9CFA2</code></td>
<td><code>FE000100A8FB6FD79ECB4EA77F8DBEEC</code> <code>C43417259046FC6491DA890F1AEDF556</code> <code>48C3529012B1B3E04D3FC1614E369A3E</code> <code>61FC64BF6D4D12C6B50E1BCE62EF9A88</code> <code>978900278CAB8486CA105BD8D88123D5</code> <code>639E37BF6CBFEDC469FFE888E420A070</code> <code>59F6CE998C759FDE513557F35C119A59</code> <code>96C43E1044128AAF5EACFA0DBE911FCE</code> <code>75F03BA251097C22C9D5F0239E1174EE</code> <code>CA68E5FE3237DBE6FC48A2C330241840</code> <code>1A73734FFB220B6187D61F52C57E1D15</code> <code>C6D2D93F76D6B99EF46E01C180C92F92</code> <code>F0BA530CD0FEB60A28FB855E138901C2</code> <code>DA27C41EBAA09453A45C2F2AFDD41EB5</code> <code>45A792F16CD1879951AAA2FAF259F543</code> <code>83069483001B466715BBB3E37615A561</code><br> <code>8C2B87D5</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = C8E4576EF64B3977CB5C690948A7B8F9372499FEA2EAAB77F1ECEAA0B
<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 5C D3 9E 1D 80 A2 66
0010 | DC 02 00 00 5C 07 E8 D0 83 B0 58 5B 19 7D 96 F7
0020 | BF 9A D3 67 84 FA 35 A1 13 31 71 3E 97 3C FD 9A
0030 | AA 92 CB F4 6F 51 58 C0 FE 50 02 00 25 EE 70 E7
0040 | 96 2F B4 DC 4E 6E 8B 22 66 97 4D F9 65 0E EF 9C
0050 | 64 2E C3 EF 9D 62 12 26 B3 49 25 5E 68 E8 EC DB
0060 | 1E 28 33 39 3E 6C C7 5D 0D 08 59 9C 95 CA 3F 47
0070 | 2E 7C FD B9 BF 91 7D 46 6B 9E 05 47 41 FB 26 36
0080 | 8B D4 B3 EB AD 64 75 35 4B 06 83 5E 41 31 34 CA
0090 | A6 BE D5 42 A3 CB 6E 16 AA F9 0C 12 C6 05 21 40
00A0 | AD B9 DD 4B 0C 2A 92 7E A7 CB 7F 56 9E 85 06 B6
00B0 | CD 22 B7 60 0A 99 00 2C B5 77 2F 4B B1 68 2E 1F
00C0 | CD C1 18 72 27 53 91 F3 3D 5F 5F 43 62 92 4D ED
00D0 | 68 02 07 10 8B AD 62 80 DE FE B1 EA 49 1C 09 0F
00E0 | 6A 57 82 E0 C0 F5 29 1E 73 38 11 FF 24 A3 BA 4A
00F0 | F4 66 55 6C A5 05 33 AE F1 1F 2B C9 EA 65 B9 25
0100 | A7 D0 B2 5F DE B7 99 4C 0B B3 65 E4 26 BE 78 6C
0110 | 92 7E 34 6E 80 B3 AD 7D C7 17 7C 3D 7F 03 7C 6B
0120 | EF 0F CF B6 93 C9 13 06 A5 2D BD 9D A1 E7 BB 46
0130 | EF 1C D4 56 05 81 0C 50 93 7E C2 E5 7B 55 2A 84
0140 | 6E 32 E8 57 DF FE E8 51 A2 4A 39 B6 73 5E 71 F7
0150 | 23 07 BD D7 85 16 60 EA 27 9B 89 5D A4 95 22 49
0160 | 7F E4 1B 7E 10 74 8D 09 92 EC 05 81 B1 C1 DE 34
0170 | 5F 31 00 5A 92 AC D1 9F A6 42 98 4F E0 43 7C 20
0180 | 49 B1 C5 04 24 01 3F 1F D6 79 1D E0 4A 79 2F 85
0190 | D0 01 88 7A 94 E4 07 FA 26 7A 56 91 62 8C 30 A7
01A0 | CE D1 F2 11 DD 6C 86 D8 62 92 44 F7 42 D9 48 28
01B0 | 6C C7 D5 DE 9B 05 9B 86 A1 59 64 B9 B8 BE 46 2F
01C0 | 3F 26 9F 39 39 17 BD 39 C9 8E 0A 0E D4 67 A3 65
01D0 | 59 FF 1F A5 FA 91 35 AA 98 B9 F9 49 70 91 01 AA
01E0 | BB 36 0C 1F 67 13 F2 0F 51 C5 E0 B5 FF 6B BD 6D
01F0 | 7B CE 3B 82 3C C8 86 E6 D9 FD 22 6F 40 3D 03 A6
0200 | 65 84 4D 8A 37 6E 94 2F CA 68 1C 20 38 ED 7B 30
0210 | 6D 42 09 B6 46 95 2C B8 0A B7 55 E8 D6 E3 49 0B
0220 | E9 80 08 EA 89 8F 26 A6 8F 6D FC E2 09 D1 45 F5
0230 | BA FA 67 AB 0D 91 E6 45 C3 79 B5 AE 2A 84 B5 7F
0240 | 09 E0 81 F8 6E 9C 31 FD 64 52 04 81 57 00 69 A6
0250 | 51 40 A1 B6 47 00 3B 0D B5 0B 39 EC C2 CB 04 FC
0260 | 53 D4 37 D5 43 A0 9D F3 70 87 C3 B7 76 96 5C 91
0270 | D6 8E D8 07 D7 6C 82 B1 56 FD 8D 78 54 29 7B E8
0280 | 26 FA A5 73 3E 50 91 18 87 86 E5 14</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 F4 E2 CF 31 83 A2 66
0010 | F4 02 00 00 5C 07 E8 D0 36 0B 8A A0 07 4A 79 27
0020 | 37 AB 0C 91 14 60 FE 24 DF 49 12 EC 8A 55 7D 05
0030 | 16 A5 31 B6 83 E3 2E 71 FE 50 02 00 6E 2D B7 C1
0040 | F0 23 DB 2F D9 05 E4 FF BC D8 E8 64 1B 0E 9E 0D
0050 | EB 08 FC 63 07 8E 3D FC 2E F4 71 B7 DD AC 9B 12
0060 | 89 A1 55 37 40 AB D4 48 45 B4 77 F2 48 20 14 6D
0070 | 08 19 2C 89 3C E0 EF 46 F4 4F CF 26 A5 F1 09 3D
0080 | 1E 80 FB D6 5E 94 3D FF B2 62 4C E2 61 0C A9 A5
0090 | 50 CD 32 EC A0 FF 2F AD 43 CE C6 FF BC C0 03 CD
00A0 | AE 6C 98 1F FD C3 32 5F 90 86 86 EC 0D 21 11 73
00B0 | D9 13 EA 8D DA C7 BC 49 F7 C1 EC D8 1A 4B 41 B4
00C0 | EE 83 EF 2B 56 D4 A8 4D C1 4A 8A 54 46 DB 02 08
00D0 | 1B 97 A4 76 E3 E4 2F 60 75 82 92 EA 1E 08 C9 D7
00E0 | BB 50 41 C6 C2 28 14 5B 3E E2 3E B9 1C 19 F0 CF
00F0 | 0E D1 94 8C B2 04 0D 04 4C 87 69 BE 18 18 11 B7
0100 | 8C 22 79 15 B1 ED BA 41 09 F8 07 8C 55 7F 8E 45
0110 | 45 12 A3 F8 72 A4 4D AB 39 19 7C D6 7F B9 F4 62
0120 | 04 DD C6 C2 FB 35 9B 16 BC EB 56 37 3D 17 5C BF
0130 | DC 94 92 24 D3 2D 0F 7C C2 38 9F 12 BB 9C 44 23
0140 | 06 9F 99 05 CF 42 1F ED 8D D7 2A E1 3D 0D 46 98
0150 | 8F 30 2E 09 44 5B E9 E6 2D F1 A8 A5 01 97 83 97
0160 | FE 55 30 B0 F1 8C BB 73 62 DC FC 2B FD 13 78 6E
0170 | A4 2A E9 BF 6C A8 1A 6E 2C CF 7E E2 A6 88 18 F0
0180 | 00 B7 81 C2 87 E8 2A 87 CA FA A3 4C 69 44 B6 7A
0190 | 72 F8 28 24 D0 80 AD B8 97 E0 AC 9A 68 31 3B 61
01A0 | 88 16 72 61 22 C2 33 76 CD CF DA F0 EE 82 13 75
01B0 | CC 04 BC 12 91 9D A8 8B 34 9D E1 7E 5F B4 C1 09
01C0 | 7A 12 51 67 60 74 D5 B5 6E EE 9D 11 21 FB D7 B5
01D0 | 9E D7 0E 53 5D BE 21 C3 5F 75 BD 73 07 17 4F DF
01E0 | 59 78 DA 6B 78 0F 9E 0A 3D BE 68 BB 32 80 88 7C
01F0 | EF 25 B8 0C 32 C9 19 91 D6 3A 7C E9 E8 35 50 D9
0200 | 5F D1 E2 EA A5 65 3B DD 39 78 07 28 53 0E 64 AB
0210 | FC 25 F3 06 D7 81 91 40 24 D1 24 00 EA 85 C7 B5
0220 | F9 A2 D2 71 3C 52 A1 26 BA 21 14 72 1B 23 CE A9
0230 | 28 68 B8 8C 49 36 FE 76 D1 84 28 E3 A5 59 BD 68
0240 | 9D 77 96 26 4C C2 6C 7E 08 F1 65 74 A3 CA 44 5B
0250 | 5F 43 B1 13 5E D9 94 54 72 16 77 D8 6C C9 0A DF
0260 | 89 DE 0C EB A4 28 A7 70 4F 20 6C 1E F0 14 A3 10
0270 | C3 EF 1C E0 79 94 11 BA FB 99 41 0A D2 3E F4 04
0280 | 53 26 15 28 34 AA 2A 4F 4F 34 C7 32</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 = C8E4576EF64B3977CB5C690948A7B8F9372499FEA2EAAB77F1ECEAA0B
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>015CD39E1D80A266</code></td>
<td><code>01F4E2CF3183A266</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>DC020000</code> (732 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 = C8E4576EF64B3977CB5C690948A7B8F9372499FEA2EAAB77F1ECEAA0B
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>83B0585B197D96F7BF9AD36784FA35A1</code></td>
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>1331713E973CFD9AAA92CBF46F5158C0</code></td>
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE50020025EE70E7962FB4DC4E6E8B22</code> <code>66974DF9650EEF9C642EC3EF9D621226</code> <code>B349255E68E8ECDB1E2833393E6CC75D</code> <code>0D08599C95CA3F472E7CFDB9BF917D46</code> <code>6B9E054741FB26368BD4B3EBAD647535</code> <code>4B06835E413134CAA6BED542A3CB6E16</code> <code>AAF90C12C6052140ADB9DD4B0C2A927E</code> <code>A7CB7F569E8506B6CD22B7600A99002C</code> <code>B5772F4BB1682E1FCDC11872275391F3</code> <code>3D5F5F4362924DED680207108BAD6280</code> <code>DEFEB1EA491C090F6A5782E0C0F5291E</code> <code>733811FF24A3BA4AF466556CA50533AE</code> <code>F11F2BC9EA65B925A7D0B25FDEB7994C</code> <code>0BB365E426BE786C927E346E80B3AD7D</code> <code>C7177C3D7F037C6BEF0FCFB693C91306</code> <code>A52DBD9DA1E7BB46EF1CD45605810C50</code> <code>937EC2E57B552A846E32E857DFFEE851</code> <code>A24A39B6735E71F72307BDD7851660EA</code> <code>279B895DA49522497FE41B7E10748D09</code> <code>92EC0581B1C1DE345F31005A92ACD19F</code> <code>A642984FE0437C2049B1C50424013F1F</code> <code>D6791DE04A792F85D001887A94E407FA</code> <code>267A5691628C30A7CED1F211DD6C86D8</code> <code>629244F742D948286CC7D5DE9B059B86</code> <code>A15964B9B8BE462F3F269F393917BD39</code> <code>C98E0A0ED467A36559FF1FA5FA9135AA</code> <code>98B9F949709101AABB360C1F6713F20F</code> <code>51C5E0B5FF6BBD6D7BCE3B823CC886E6</code> <code>D9FD226F403D03A665844D8A376E942F</code> <code>CA681C2038ED7B306D4209B646952CB8</code> <code>0AB755E8D6E3490BE98008EA898F26A6</code> <code>8F6DFCE209D145F5BAFA67AB0D91E645</code> <code>C379B5AE2A84B57F09E081F86E9C31FD</code> <code>64520481570069A65140A1B647003B0D</code> <code>B50B39ECC2CB04FC53D437D543A09DF3</code> <code>7087C3B776965C91D68ED807D76C82B1</code> <code>56FD8D7854297BE826FAA5733E509118</code><br> <code>8786E514</code></td>
<td><code>FE5002006E2DB7C1F023DB2FD905E4FF</code> <code>BCD8E8641B0E9E0DEB08FC63078E3DFC</code> <code>2EF471B7DDAC9B1289A1553740ABD448</code> <code>45B477F24820146D08192C893CE0EF46</code> <code>F44FCF26A5F1093D1E80FBD65E943DFF</code> <code>B2624CE2610CA9A550CD32ECA0FF2FAD</code> <code>43CEC6FFBCC003CDAE6C981FFDC3325F</code> <code>908686EC0D211173D913EA8DDAC7BC49</code> <code>F7C1ECD81A4B41B4EE83EF2B56D4A84D</code> <code>C14A8A5446DB02081B97A476E3E42F60</code> <code>758292EA1E08C9D7BB5041C6C228145B</code> <code>3EE23EB91C19F0CF0ED1948CB2040D04</code> <code>4C8769BE181811B78C227915B1EDBA41</code> <code>09F8078C557F8E454512A3F872A44DAB</code> <code>39197CD67FB9F46204DDC6C2FB359B16</code> <code>BCEB56373D175CBFDC949224D32D0F7C</code> <code>C2389F12BB9C4423069F9905CF421FED</code> <code>8DD72AE13D0D46988F302E09445BE9E6</code> <code>2DF1A8A501978397FE5530B0F18CBB73</code> <code>62DCFC2BFD13786EA42AE9BF6CA81A6E</code> <code>2CCF7EE2A68818F000B781C287E82A87</code> <code>CAFAA34C6944B67A72F82824D080ADB8</code> <code>97E0AC9A68313B618816726122C23376</code> <code>CDCFDAF0EE821375CC04BC12919DA88B</code> <code>349DE17E5FB4C1097A1251676074D5B5</code> <code>6EEE9D1121FBD7B59ED70E535DBE21C3</code> <code>5F75BD7307174FDF5978DA6B780F9E0A</code> <code>3DBE68BB3280887CEF25B80C32C91991</code> <code>D63A7CE9E83550D95FD1E2EAA5653BDD</code> <code>39780728530E64ABFC25F306D7819140</code> <code>24D12400EA85C7B5F9A2D2713C52A126</code> <code>BA2114721B23CEA92868B88C4936FE76</code> <code>D18428E3A559BD689D7796264CC26C7E</code> <code>08F16574A3CA445B5F43B1135ED99454</code> <code>721677D86CC90ADF89DE0CEBA428A770</code> <code>4F206C1EF014A310C3EF1CE0799411BA</code> <code>FB99410AD23EF4045326152834AA2A4F</code><br> <code>4F34C732</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = C8E4576EF64B3977CB5C690948A7B8F9372499FEA2EAAB77F1ECEAA0B
<!-- 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 = 25EE70E7962FB4DC4E6E8B2266974DF9650EEF9C642EC3EF9D621226B349255E68E8ECDB1E2833393E6CC75D0D08599C95CA3F472E7CFDB9BF917D466B9E054741FB26368BD4B3EBAD6475354B06835E413134CAA6BED542A3CB6E16AAF90C12C6052140ADB9DD4B0C2A927EA7CB7F569E8506B6CD22B7600A99002CB5772F4BB1682E1FCDC11872275391F33D5F5F4362924DED680207108BAD6280DEFEB1EA491C090F6A5782E0C0F5291E733811FF24A3BA4AF466556CA50533AEF11F2BC9EA65B925A7D0B25FDEB7994C0BB365E426BE786C927E346E80B3AD7DC7177C3D7F037C6BEF0FCFB693C91306A52DBD9DA1E7BB46EF1CD45605810C50937EC2E57B552A846E32E857DFFEE851A24A39B6735E71F72307BDD7851660EA279B895DA49522497FE41B7E10748D0992EC0581B1C1DE345F31005A92ACD19FA642984FE0437C2049B1C50424013F1FD6791DE04A792F85D001887A94E407FA267A5691628C30A7CED1F211DD6C86D8629244F742D948286CC7D5DE9B059B86A15964B9B8BE462F3F269F393917BD39C98E0A0ED467A36559FF1FA5FA9135AA98B9F949709101AABB360C1F6713F20F51C5E0B5FF6BBD6D7BCE3B823CC886E6D9FD226F403D03A665844D8A376E942FCA681C2038ED7B306D4209B646952CB80AB755E8D6E3490BE98008EA898F26A68F6DFCE209D145F5BAFA67AB0D91E645C379B5AE2A84B57F09E081F86E9C31FD64520481570069A65140A1B647003B0DB50B39ECC2CB04FC53D437D543A09DF37087C3B776965C91D68ED807D76C82B156FD8D7854297BE826FAA5733E5091188786E514
tmp_aes_key = 67630CD17CB12A5126F4CB291AEB81CC809995FC713CCAFD7626920004ADFDD5
tmp_aes_iv = 75F9EF2A2C236C84B0E7EF83548AFA321BAE5B84A8BADBBE10DDA22879689719</code></pre>
<pre><code>encrypted_answer = 6E2DB7C1F023DB2FD905E4FFBCD8E8641B0E9E0DEB08FC63078E3DFC2EF471B7DDAC9B1289A1553740ABD44845B477F24820146D08192C893CE0EF46F44FCF26A5F1093D1E80FBD65E943DFFB2624CE2610CA9A550CD32ECA0FF2FAD43CEC6FFBCC003CDAE6C981FFDC3325F908686EC0D211173D913EA8DDAC7BC49F7C1ECD81A4B41B4EE83EF2B56D4A84DC14A8A5446DB02081B97A476E3E42F60758292EA1E08C9D7BB5041C6C228145B3EE23EB91C19F0CF0ED1948CB2040D044C8769BE181811B78C227915B1EDBA4109F8078C557F8E454512A3F872A44DAB39197CD67FB9F46204DDC6C2FB359B16BCEB56373D175CBFDC949224D32D0F7CC2389F12BB9C4423069F9905CF421FED8DD72AE13D0D46988F302E09445BE9E62DF1A8A501978397FE5530B0F18CBB7362DCFC2BFD13786EA42AE9BF6CA81A6E2CCF7EE2A68818F000B781C287E82A87CAFAA34C6944B67A72F82824D080ADB897E0AC9A68313B618816726122C23376CDCFDAF0EE821375CC04BC12919DA88B349DE17E5FB4C1097A1251676074D5B56EEE9D1121FBD7B59ED70E535DBE21C35F75BD7307174FDF5978DA6B780F9E0A3DBE68BB3280887CEF25B80C32C91991D63A7CE9E83550D95FD1E2EAA5653BDD39780728530E64ABFC25F306D781914024D12400EA85C7B5F9A2D2713C52A126BA2114721B23CEA92868B88C4936FE76D18428E3A559BD689D7796264CC26C7E08F16574A3CA445B5F43B1135ED99454721677D86CC90ADF89DE0CEBA428A7704F206C1EF014A310C3EF1CE0799411BAFB99410AD23EF4045326152834AA2A4F4F34C732
tmp_aes_key = 4131366BCDC37DE0F9F2C322156B2273B99716D08D9617072D5B59E91C39A3BB
tmp_aes_iv = 8DDFDB48BDE5C9337FBEA0E6631450F49F5AF34FCB2DD6E9D6F12E854231B6F3</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 8874EC20B27CF30D45E77DEAA9951DD810042416BA0D89B583B0585B197D96F7BF9AD36784FA35A11331713E973CFD9AAA92CBF46F5158C003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001008DD333670D6BD116DC20BB073A65921A8F20E1890F595D3490038C4E8987BEE08D5B9EFE0B942B1CAB7D34B611F7A136E7EF0D9F5FF621CCC0D2FB1DC452D88C3FABBF5BBE965A19E56FC3B9B76070C6AE03FFECF9C7FB17B46ACA2B61B2F6DAA1CBD3EEEAE719D06FB5A01EAA016075B7DAC7C934C8F3CFB79E8E3594549725D6B1121A22AD93B9BBB003066863F59FC819C16B963CCE9A71E327DD6AD135792DDC17B05DB6C33A0A14E3458EFBA402989D504152C489FDF42D20121D35EF573D06838351938ED47F38E91142E08D2907AEFB4D8A289B6173BD04AC05A165C6EE2B5CB158BB712F87CB32C02D5991070BCD367235A04F8CFB83E2AD1D3C65391D80A266C404F3D9970E6900
answer = BA0D89B583B0585B197D96F7BF9AD36784FA35A11331713E973CFD9AAA92CBF46F5158C003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001008DD333670D6BD116DC20BB073A65921A8F20E1890F595D3490038C4E8987BEE08D5B9EFE0B942B1CAB7D34B611F7A136E7EF0D9F5FF621CCC0D2FB1DC452D88C3FABBF5BBE965A19E56FC3B9B76070C6AE03FFECF9C7FB17B46ACA2B61B2F6DAA1CBD3EEEAE719D06FB5A01EAA016075B7DAC7C934C8F3CFB79E8E3594549725D6B1121A22AD93B9BBB003066863F59FC819C16B963CCE9A71E327DD6AD135792DDC17B05DB6C33A0A14E3458EFBA402989D504152C489FDF42D20121D35EF573D06838351938ED47F38E91142E08D2907AEFB4D8A289B6173BD04AC05A165C6EE2B5CB158BB712F87CB32C02D5991070BCD367235A04F8CFB83E2AD1D3C65391D80A266C404F3D9970E6900</code></pre>
<pre><code>answer_with_hash = 176DA7897229161C3A853684D9320E2C1F24BEA5BA0D89B5360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E7103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010048FA333952503724BEB83C8B3556866188CBF3A7BBD784AF2ABBE1B6F6B359527EFAB872C88C17DF5A38D741AFFF54F04229D2013D9CEE1DA647D34BD1813BC9D7C3F2446BD0DF3594B236096F24AB0E7D174C3EBD2DC9E2483E27CE56676FD1C530C533213651EFBB98CAFB574F783248BB3D2DE6FBA2ACE6B2E5D16A8C2B8515FCD247D7466E54F90BC587284E27E3C95ED2E20E8FEF65CE181FA5883978C221CA8E6D6E462AC43BF4A338840224224F7927070D33AD6D763DCF74C0DF1B7A67DD471E2194F7025839522F7F9E05001BD2753193D847491DE3C83B8F4DD68ACA578F9F5D3DDF24A5C5AC1F2241FB54B79BA337770E3D82E4FC07DA8B43BFEB3183A26678742767C1C0E2FF
answer = BA0D89B5360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E7103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010048FA333952503724BEB83C8B3556866188CBF3A7BBD784AF2ABBE1B6F6B359527EFAB872C88C17DF5A38D741AFFF54F04229D2013D9CEE1DA647D34BD1813BC9D7C3F2446BD0DF3594B236096F24AB0E7D174C3EBD2DC9E2483E27CE56676FD1C530C533213651EFBB98CAFB574F783248BB3D2DE6FBA2ACE6B2E5D16A8C2B8515FCD247D7466E54F90BC587284E27E3C95ED2E20E8FEF65CE181FA5883978C221CA8E6D6E462AC43BF4A338840224224F7927070D33AD6D763DCF74C0DF1B7A67DD471E2194F7025839522F7F9E05001BD2753193D847491DE3C83B8F4DD68ACA578F9F5D3DDF24A5C5AC1F2241FB54B79BA337770E3D82E4FC07DA8B43BFEB3183A26678742767C1C0E2FF</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 83 B0 58 5B 19 7D 96 F7 BF 9A D3 67
0010 | 84 FA 35 A1 13 31 71 3E 97 3C FD 9A AA 92 CB F4
0020 | 6F 51 58 C0 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 36 0B 8A A0 07 4A 79 27 37 AB 0C 91
0010 | 14 60 FE 24 DF 49 12 EC 8A 55 7D 05 16 A5 31 B6
0020 | 83 E3 2E 71 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 = BA0D89B583B0585B197D96F7BF9AD36784FA35A11331713E973CFD9AAA92CBF46F5158C
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 | 8D D3 33 67 0D 6B D1 16 DC 20 BB 07 3A 65 92 1A
0140 | 8F 20 E1 89 0F 59 5D 34 90 03 8C 4E 89 87 BE E0
0150 | 8D 5B 9E FE 0B 94 2B 1C AB 7D 34 B6 11 F7 A1 36
0160 | E7 EF 0D 9F 5F F6 21 CC C0 D2 FB 1D C4 52 D8 8C
0170 | 3F AB BF 5B BE 96 5A 19 E5 6F C3 B9 B7 60 70 C6
0180 | AE 03 FF EC F9 C7 FB 17 B4 6A CA 2B 61 B2 F6 DA
0190 | A1 CB D3 EE EA E7 19 D0 6F B5 A0 1E AA 01 60 75
01A0 | B7 DA C7 C9 34 C8 F3 CF B7 9E 8E 35 94 54 97 25
01B0 | D6 B1 12 1A 22 AD 93 B9 BB B0 03 06 68 63 F5 9F
01C0 | C8 19 C1 6B 96 3C CE 9A 71 E3 27 DD 6A D1 35 79
01D0 | 2D DC 17 B0 5D B6 C3 3A 0A 14 E3 45 8E FB A4 02
01E0 | 98 9D 50 41 52 C4 89 FD F4 2D 20 12 1D 35 EF 57
01F0 | 3D 06 83 83 51 93 8E D4 7F 38 E9 11 42 E0 8D 29
0200 | 07 AE FB 4D 8A 28 9B 61 73 BD 04 AC 05 A1 65 C6
0210 | EE 2B 5C B1 58 BB 71 2F 87 CB 32 C0 2D 59 91 07
0220 | 0B CD 36 72 35 A0 4F 8C FB 83 E2 AD 1D 3C 65 39
0230 | 1D 80 A2 66</code></pre>
0130 | 48 FA 33 39 52 50 37 24 BE B8 3C 8B 35 56 86 61
0140 | 88 CB F3 A7 BB D7 84 AF 2A BB E1 B6 F6 B3 59 52
0150 | 7E FA B8 72 C8 8C 17 DF 5A 38 D7 41 AF FF 54 F0
0160 | 42 29 D2 01 3D 9C EE 1D A6 47 D3 4B D1 81 3B C9
0170 | D7 C3 F2 44 6B D0 DF 35 94 B2 36 09 6F 24 AB 0E
0180 | 7D 17 4C 3E BD 2D C9 E2 48 3E 27 CE 56 67 6F D1
0190 | C5 30 C5 33 21 36 51 EF BB 98 CA FB 57 4F 78 32
01A0 | 48 BB 3D 2D E6 FB A2 AC E6 B2 E5 D1 6A 8C 2B 85
01B0 | 15 FC D2 47 D7 46 6E 54 F9 0B C5 87 28 4E 27 E3
01C0 | C9 5E D2 E2 0E 8F EF 65 CE 18 1F A5 88 39 78 C2
01D0 | 21 CA 8E 6D 6E 46 2A C4 3B F4 A3 38 84 02 24 22
01E0 | 4F 79 27 07 0D 33 AD 6D 76 3D CF 74 C0 DF 1B 7A
01F0 | 67 DD 47 1E 21 94 F7 02 58 39 52 2F 7F 9E 05 00
0200 | 1B D2 75 31 93 D8 47 49 1D E3 C8 3B 8F 4D D6 8A
0210 | CA 57 8F 9F 5D 3D DF 24 A5 C5 AC 1F 22 41 FB 54
0220 | B7 9B A3 37 77 0E 3D 82 E4 FC 07 DA 8B 43 BF EB
0230 | 31 83 A2 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 = BA0D89B583B0585B197D96F7BF9AD36784FA35A11331713E973CFD9AAA92CBF46F5158C
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>83B0585B197D96F7BF9AD36784FA35A1</code></td>
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>1331713E973CFD9AAA92CBF46F5158C0</code></td>
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B583B0585B197D96F7BF9AD36784FA35A11331713E973CFD9AAA92CBF46F5158C
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE0001008DD333670D6BD116DC20BB07</code> <code>3A65921A8F20E1890F595D3490038C4E</code> <code>8987BEE08D5B9EFE0B942B1CAB7D34B6</code> <code>11F7A136E7EF0D9F5FF621CCC0D2FB1D</code> <code>C452D88C3FABBF5BBE965A19E56FC3B9</code> <code>B76070C6AE03FFECF9C7FB17B46ACA2B</code> <code>61B2F6DAA1CBD3EEEAE719D06FB5A01E</code> <code>AA016075B7DAC7C934C8F3CFB79E8E35</code> <code>94549725D6B1121A22AD93B9BBB00306</code> <code>6863F59FC819C16B963CCE9A71E327DD</code> <code>6AD135792DDC17B05DB6C33A0A14E345</code> <code>8EFBA402989D504152C489FDF42D2012</code> <code>1D35EF573D06838351938ED47F38E911</code> <code>42E08D2907AEFB4D8A289B6173BD04AC</code> <code>05A165C6EE2B5CB158BB712F87CB32C0</code> <code>2D5991070BCD367235A04F8CFB83E2AD</code><br> <code>1D3C6539</code></td>
<td><code>FE00010048FA333952503724BEB83C8B</code> <code>3556866188CBF3A7BBD784AF2ABBE1B6</code> <code>F6B359527EFAB872C88C17DF5A38D741</code> <code>AFFF54F04229D2013D9CEE1DA647D34B</code> <code>D1813BC9D7C3F2446BD0DF3594B23609</code> <code>6F24AB0E7D174C3EBD2DC9E2483E27CE</code> <code>56676FD1C530C533213651EFBB98CAFB</code> <code>574F783248BB3D2DE6FBA2ACE6B2E5D1</code> <code>6A8C2B8515FCD247D7466E54F90BC587</code> <code>284E27E3C95ED2E20E8FEF65CE181FA5</code> <code>883978C221CA8E6D6E462AC43BF4A338</code> <code>840224224F7927070D33AD6D763DCF74</code> <code>C0DF1B7A67DD471E2194F7025839522F</code> <code>7F9E05001BD2753193D847491DE3C83B</code> <code>8F4DD68ACA578F9F5D3DDF24A5C5AC1F</code> <code>2241FB54B79BA337770E3D82E4FC07DA</code><br> <code>8B43BFEB</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>1D80A266</code> (1721925661 in decimal)</td>
<td><code>3183A266</code> (1721926449 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B583B0585B197D96F7BF9AD36784FA35A11331713E973CFD9AAA92CBF46F5158C
<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 = 4030612088CBABF5B36205D028CABC1B2BB0A966F03E92E00ADF21DE80B56E7B03B8A3997B9ED47F3B5A6C2B765DF0D7C27B4337D967E2C5940936487CA6451802F100ED0C6F95A7EAA29269A1429E0C5287C735D96979B17A37CF00DF60526E1EDB7E22AAF40693EC3B7AF50C7A402AEED2E84E8B927D500920AA171EA836B3B868E30C92B850DCD78B0BE11CA91313BA6840E7AEF59B8B894AAA1594C1111055B616FB5FB79C873CE1DC79CCF4D496AB0A41DDB03F16A14D664BA28C57F5B397B4CE12B30AF1C509C54B2D75427DA4D78C4A0211A8060323C7A1766703ACEE86445200A985EA1EBA5969AB74A1E00A95830472B062DA18D5D314DA23E76CBA</code></pre>
<pre><code>b = 28E28FCB1EF9C40F65D3185DB34037CA6822764BFB21073BBC160278B050933F4F469F3751E7A5E89E8E5A0F8F36CABA015C5D3F0049566E49193082FA127E86D83F2C1E09FB81E8130A34DB1AACCF39FD4DF8233049BF3AE10862E4F884D49C7AC937F604DC37CB05F33310F79BDD7A1FCBACE4019BBB0ABC2CBC1CF005AE12A39E16D2F3248409616E22F1E49A21653317AE7847F917235B901C8F5015E8EA4E85F5E093401E6B0B219B4155926890D11158895D00711FFC1ED67B6034A644710A900A7E12B7BF9CEC3C500552D3A667DD3330DAD28B5EDEF5FC5BF58D12400A76DAFD23D081676A89EC7D8EECC239358C16D8C1DEA780EB0A3E6C2560BF2B</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 = 1BE9C56BC2F495CD45ACF44410F7B823CCD5DDE747A32CCDAD82042A879B4D604F6530676402940645FD9227974B55B02AC7226789601429E187D1227B234E60D1E2E36C084589FD7DCDD10A46C214AB5956023DCAF68A062238332ACA6FC89034375C7A1080D7A97AD7C2F2765F8CECF1C486AD4D195902013008204A36EDF0BD45A4F3F5A42BEE532D721FF31DED4FB03D8FC48293EBD37D0D4D3457806B3680905DA1DC7E481F3F49F56FB878060CCD33A7F86C4EF17D0A00A29A2BF5AF423DBD881C2538FD38A62D5143C5AF4CC9823465A0BF07BE942D4E36132CA373374F6E49056D98122C1ECBAD99A230C8749D2EB72D7551E9EEAC37A4E8E7C55A46</code></pre>
<pre><code>g_b = A47532855E5420FF3338DD301512ECE2906FEEB0D702E917E020882692C36C1F59530D5CC91D2900D934D76125C89DE963E0E3C1BB21FF168FBF2823A89C7EC0DE83EA81D9A9FC8D822BB98FA3F5682AFB1828DA3232EB6D10E9C4ED456DB6D563A0B2B019880A2AC954B1DB9064715E7476D4DC127C6AA0B02B77F90AF3F9CE46771D41395B61EF5A077C21B7F45878A42C2C736B0795D78856A5B78A4353CDDB04EC1F838E89FC4284403C043B606642B6CF76FB5021353F850D076AF7D50F91F4CEB2A3464FC5743C2610C4F0B103CB27209E5F03EA70E319A8F40740A3E08BD7925042A91AAC07FFD31035DD666C7E94527CDCF87FCBF5AB693043F38002</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 83 B0 58 5B 19 7D 96 F7 BF 9A D3 67
0010 | 84 FA 35 A1 13 31 71 3E 97 3C FD 9A AA 92 CB F4
0020 | 6F 51 58 C0 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 1B E9 C5 6B C2 F4 95 CD 45 AC F4 44 10 F7 B8 23
0040 | CC D5 DD E7 47 A3 2C CD AD 82 04 2A 87 9B 4D 60
0050 | 4F 65 30 67 64 02 94 06 45 FD 92 27 97 4B 55 B0
0060 | 2A C7 22 67 89 60 14 29 E1 87 D1 22 7B 23 4E 60
0070 | D1 E2 E3 6C 08 45 89 FD 7D CD D1 0A 46 C2 14 AB
0080 | 59 56 02 3D CA F6 8A 06 22 38 33 2A CA 6F C8 90
0090 | 34 37 5C 7A 10 80 D7 A9 7A D7 C2 F2 76 5F 8C EC
00A0 | F1 C4 86 AD 4D 19 59 02 01 30 08 20 4A 36 ED F0
00B0 | BD 45 A4 F3 F5 A4 2B EE 53 2D 72 1F F3 1D ED 4F
00C0 | B0 3D 8F C4 82 93 EB D3 7D 0D 4D 34 57 80 6B 36
00D0 | 80 90 5D A1 DC 7E 48 1F 3F 49 F5 6F B8 78 06 0C
00E0 | CD 33 A7 F8 6C 4E F1 7D 0A 00 A2 9A 2B F5 AF 42
00F0 | 3D BD 88 1C 25 38 FD 38 A6 2D 51 43 C5 AF 4C C9
0100 | 82 34 65 A0 BF 07 BE 94 2D 4E 36 13 2C A3 73 37
0110 | 4F 6E 49 05 6D 98 12 2C 1E CB AD 99 A2 30 C8 74
0120 | 9D 2E B7 2D 75 51 E9 EE AC 37 A4 E8 E7 C5 5A 46</code></pre>
<pre><code>0000 | 54 B6 43 66 36 0B 8A A0 07 4A 79 27 37 AB 0C 91
0010 | 14 60 FE 24 DF 49 12 EC 8A 55 7D 05 16 A5 31 B6
0020 | 83 E3 2E 71 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | A4 75 32 85 5E 54 20 FF 33 38 DD 30 15 12 EC E2
0040 | 90 6F EE B0 D7 02 E9 17 E0 20 88 26 92 C3 6C 1F
0050 | 59 53 0D 5C C9 1D 29 00 D9 34 D7 61 25 C8 9D E9
0060 | 63 E0 E3 C1 BB 21 FF 16 8F BF 28 23 A8 9C 7E C0
0070 | DE 83 EA 81 D9 A9 FC 8D 82 2B B9 8F A3 F5 68 2A
0080 | FB 18 28 DA 32 32 EB 6D 10 E9 C4 ED 45 6D B6 D5
0090 | 63 A0 B2 B0 19 88 0A 2A C9 54 B1 DB 90 64 71 5E
00A0 | 74 76 D4 DC 12 7C 6A A0 B0 2B 77 F9 0A F3 F9 CE
00B0 | 46 77 1D 41 39 5B 61 EF 5A 07 7C 21 B7 F4 58 78
00C0 | A4 2C 2C 73 6B 07 95 D7 88 56 A5 B7 8A 43 53 CD
00D0 | DB 04 EC 1F 83 8E 89 FC 42 84 40 3C 04 3B 60 66
00E0 | 42 B6 CF 76 FB 50 21 35 3F 85 0D 07 6A F7 D5 0F
00F0 | 91 F4 CE B2 A3 46 4F C5 74 3C 26 10 C4 F0 B1 03
0100 | CB 27 20 9E 5F 03 EA 70 E3 19 A8 F4 07 40 A3 E0
0110 | 8B D7 92 50 42 A9 1A AC 07 FF D3 10 35 DD 66 6C
0120 | 7E 94 52 7C DC F8 7F CB F5 AB 69 30 43 F3 80 02</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 = BA0D89B583B0585B197D96F7BF9AD36784FA35A11331713E973CFD9AAA92CBF46F5158C
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>83B0585B197D96F7BF9AD36784FA35A1</code></td>
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>1331713E973CFD9AAA92CBF46F5158C0</code></td>
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE0001001BE9C56BC2F495CD45ACF444</code> <code>10F7B823CCD5DDE747A32CCDAD82042A</code> <code>879B4D604F6530676402940645FD9227</code> <code>974B55B02AC7226789601429E187D122</code> <code>7B234E60D1E2E36C084589FD7DCDD10A</code> <code>46C214AB5956023DCAF68A062238332A</code> <code>CA6FC89034375C7A1080D7A97AD7C2F2</code> <code>765F8CECF1C486AD4D19590201300820</code> <code>4A36EDF0BD45A4F3F5A42BEE532D721F</code> <code>F31DED4FB03D8FC48293EBD37D0D4D34</code> <code>57806B3680905DA1DC7E481F3F49F56F</code> <code>B878060CCD33A7F86C4EF17D0A00A29A</code> <code>2BF5AF423DBD881C2538FD38A62D5143</code> <code>C5AF4CC9823465A0BF07BE942D4E3613</code> <code>2CA373374F6E49056D98122C1ECBAD99</code> <code>A230C8749D2EB72D7551E9EEAC37A4E8</code><br> <code>E7C55A46</code></td>
<td><code>FE000100A47532855E5420FF3338DD30</code> <code>1512ECE2906FEEB0D702E917E0208826</code> <code>92C36C1F59530D5CC91D2900D934D761</code> <code>25C89DE963E0E3C1BB21FF168FBF2823</code> <code>A89C7EC0DE83EA81D9A9FC8D822BB98F</code> <code>A3F5682AFB1828DA3232EB6D10E9C4ED</code> <code>456DB6D563A0B2B019880A2AC954B1DB</code> <code>9064715E7476D4DC127C6AA0B02B77F9</code> <code>0AF3F9CE46771D41395B61EF5A077C21</code> <code>B7F45878A42C2C736B0795D78856A5B7</code> <code>8A4353CDDB04EC1F838E89FC4284403C</code> <code>043B606642B6CF76FB5021353F850D07</code> <code>6AF7D50F91F4CEB2A3464FC5743C2610</code> <code>C4F0B103CB27209E5F03EA70E319A8F4</code> <code>0740A3E08BD7925042A91AAC07FFD310</code> <code>35DD666C7E94527CDCF87FCBF5AB6930</code><br> <code>43F38002</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 = BA0D89B583B0585B197D96F7BF9AD36784FA35A11331713E973CFD9AAA92CBF46F5158C
<!-- 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 = 54B6436683B0585B197D96F7BF9AD36784FA35A11331713E973CFD9AAA92CBF46F5158C00000000000000000FE0001001BE9C56BC2F495CD45ACF44410F7B823CCD5DDE747A32CCDAD82042A879B4D604F6530676402940645FD9227974B55B02AC7226789601429E187D1227B234E60D1E2E36C084589FD7DCDD10A46C214AB5956023DCAF68A062238332ACA6FC89034375C7A1080D7A97AD7C2F2765F8CECF1C486AD4D195902013008204A36EDF0BD45A4F3F5A42BEE532D721FF31DED4FB03D8FC48293EBD37D0D4D3457806B3680905DA1DC7E481F3F49F56FB878060CCD33A7F86C4EF17D0A00A29A2BF5AF423DBD881C2538FD38A62D5143C5AF4CC9823465A0BF07BE942D4E36132CA373374F6E49056D98122C1ECBAD99A230C8749D2EB72D7551E9EEAC37A4E8E7C55A46
padding = 6D823D3CA76D5F34328264AC
tmp_aes_key = 67630CD17CB12A5126F4CB291AEB81CC809995FC713CCAFD7626920004ADFDD5
tmp_aes_iv = 75F9EF2A2C236C84B0E7EF83548AFA321BAE5B84A8BADBBE10DDA22879689719</code></pre>
<pre><code>data = 54B64366360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E710000000000000000FE000100A47532855E5420FF3338DD301512ECE2906FEEB0D702E917E020882692C36C1F59530D5CC91D2900D934D76125C89DE963E0E3C1BB21FF168FBF2823A89C7EC0DE83EA81D9A9FC8D822BB98FA3F5682AFB1828DA3232EB6D10E9C4ED456DB6D563A0B2B019880A2AC954B1DB9064715E7476D4DC127C6AA0B02B77F90AF3F9CE46771D41395B61EF5A077C21B7F45878A42C2C736B0795D78856A5B78A4353CDDB04EC1F838E89FC4284403C043B606642B6CF76FB5021353F850D076AF7D50F91F4CEB2A3464FC5743C2610C4F0B103CB27209E5F03EA70E319A8F40740A3E08BD7925042A91AAC07FFD31035DD666C7E94527CDCF87FCBF5AB693043F38002
padding = E7A24CA0EB8E4B9CB42B8B69
tmp_aes_key = 4131366BCDC37DE0F9F2C322156B2273B99716D08D9617072D5B59E91C39A3BB
tmp_aes_iv = 8DDFDB48BDE5C9337FBEA0E6631450F49F5AF34FCB2DD6E9D6F12E854231B6F3</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 = 3DADC7C4EFED521B1D284817E75E255DFE4B0A1793312E3B0E0FE8B27FEEA2CED932DD07A780E871552073D4A3D5EC939C3441B28781E9A61CD34D9AA25E6122A4D876D00507CAC07280585B70253425E55DBDFE0A3930DD57382BAF7F7F9E5DDC26651B1DB19B4D24E40D9D12ADA32585C1356A8287462A5424A26CCD31442CAF51BA175039BD21F451C557F898B3D3A8191FD3E7A60D39C7A7B4E4B4C774649A6172745BC8398AE89C95EA6524053E3265DD68F722E9E1BE7FBC9397B821B0AE83FC095BA72DEF29082EDDAC4FAFF49C119B6A808EB92C635D5F109D90B3F23AC33683BE8292204C9FB210A08B8021B1CB61A72898F88D9C5B7116113F34582E970642BE781925CA2B7B7BD49498A32B6A8630A99F36F6F24ADFB06265AE4FD405E9D868B4F96F1BF215BD0865DAA20328A4013702409FCF0FB1744D45A44210E12B30450F0A15245D8190A9761F48</code></pre>
<pre><code>encrypted_data = 5D446BE5F151CE5B82324598A4C13A875293FD63FA2659F66A11632424BAC35E38509DE9F3EA180FEE39C9DE879E67299E3B843EDB15A9EB236E2005F0C055877DD752D63444EB7246B15FED5364DC7B2F9FF3016349BD1AF2ACF8C251C8AAC28D4851458047B925A815E2E4F99FDE495139380A85E52E3EB9BDEAEF9F30EDCE11CF28868A09D23543A5FC71D6CCD2E7F09829BB0BFB538CE840FF2B18D1AB5F2680817FBFBF6B44559B27692DFAA65252F30F7BCA8BADE43C7D7522DF82DC42252376044F505530618D70383240D8047ED93A2A0DA2682AAE804056E624F7FF820128707FDF6F3C1F678D6896474516B8B30F774F0631AF5A8D082F0D99E90EBDB4FEDB4EC6415F28EED8BC2614ED75FDCA353508E4C35ACBC755B8AAF3724E968B7610904AAB2BA86FB2865B683D78CB84751BADD49814C2DC3B6EB0DE78848F418AB8FC89FCC684D120B77FEF478A</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 C8 78 07 00 1D 80 A2 66
0010 | 78 01 00 00 1F 5F 04 F5 83 B0 58 5B 19 7D 96 F7
0020 | BF 9A D3 67 84 FA 35 A1 13 31 71 3E 97 3C FD 9A
0030 | AA 92 CB F4 6F 51 58 C0 FE 50 01 00 3D AD C7 C4
0040 | EF ED 52 1B 1D 28 48 17 E7 5E 25 5D FE 4B 0A 17
0050 | 93 31 2E 3B 0E 0F E8 B2 7F EE A2 CE D9 32 DD 07
0060 | A7 80 E8 71 55 20 73 D4 A3 D5 EC 93 9C 34 41 B2
0070 | 87 81 E9 A6 1C D3 4D 9A A2 5E 61 22 A4 D8 76 D0
0080 | 05 07 CA C0 72 80 58 5B 70 25 34 25 E5 5D BD FE
0090 | 0A 39 30 DD 57 38 2B AF 7F 7F 9E 5D DC 26 65 1B
00A0 | 1D B1 9B 4D 24 E4 0D 9D 12 AD A3 25 85 C1 35 6A
00B0 | 82 87 46 2A 54 24 A2 6C CD 31 44 2C AF 51 BA 17
00C0 | 50 39 BD 21 F4 51 C5 57 F8 98 B3 D3 A8 19 1F D3
00D0 | E7 A6 0D 39 C7 A7 B4 E4 B4 C7 74 64 9A 61 72 74
00E0 | 5B C8 39 8A E8 9C 95 EA 65 24 05 3E 32 65 DD 68
00F0 | F7 22 E9 E1 BE 7F BC 93 97 B8 21 B0 AE 83 FC 09
0100 | 5B A7 2D EF 29 08 2E DD AC 4F AF F4 9C 11 9B 6A
0110 | 80 8E B9 2C 63 5D 5F 10 9D 90 B3 F2 3A C3 36 83
0120 | BE 82 92 20 4C 9F B2 10 A0 8B 80 21 B1 CB 61 A7
0130 | 28 98 F8 8D 9C 5B 71 16 11 3F 34 58 2E 97 06 42
0140 | BE 78 19 25 CA 2B 7B 7B D4 94 98 A3 2B 6A 86 30
0150 | A9 9F 36 F6 F2 4A DF B0 62 65 AE 4F D4 05 E9 D8
0160 | 68 B4 F9 6F 1B F2 15 BD 08 65 DA A2 03 28 A4 01
0170 | 37 02 40 9F CF 0F B1 74 4D 45 A4 42 10 E1 2B 30
0180 | 45 0F 0A 15 24 5D 81 90 A9 76 1F 48</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 9C DD 0E 00 31 83 A2 66
0010 | 78 01 00 00 1F 5F 04 F5 36 0B 8A A0 07 4A 79 27
0020 | 37 AB 0C 91 14 60 FE 24 DF 49 12 EC 8A 55 7D 05
0030 | 16 A5 31 B6 83 E3 2E 71 FE 50 01 00 5D 44 6B E5
0040 | F1 51 CE 5B 82 32 45 98 A4 C1 3A 87 52 93 FD 63
0050 | FA 26 59 F6 6A 11 63 24 24 BA C3 5E 38 50 9D E9
0060 | F3 EA 18 0F EE 39 C9 DE 87 9E 67 29 9E 3B 84 3E
0070 | DB 15 A9 EB 23 6E 20 05 F0 C0 55 87 7D D7 52 D6
0080 | 34 44 EB 72 46 B1 5F ED 53 64 DC 7B 2F 9F F3 01
0090 | 63 49 BD 1A F2 AC F8 C2 51 C8 AA C2 8D 48 51 45
00A0 | 80 47 B9 25 A8 15 E2 E4 F9 9F DE 49 51 39 38 0A
00B0 | 85 E5 2E 3E B9 BD EA EF 9F 30 ED CE 11 CF 28 86
00C0 | 8A 09 D2 35 43 A5 FC 71 D6 CC D2 E7 F0 98 29 BB
00D0 | 0B FB 53 8C E8 40 FF 2B 18 D1 AB 5F 26 80 81 7F
00E0 | BF BF 6B 44 55 9B 27 69 2D FA A6 52 52 F3 0F 7B
00F0 | CA 8B AD E4 3C 7D 75 22 DF 82 DC 42 25 23 76 04
0100 | 4F 50 55 30 61 8D 70 38 32 40 D8 04 7E D9 3A 2A
0110 | 0D A2 68 2A AE 80 40 56 E6 24 F7 FF 82 01 28 70
0120 | 7F DF 6F 3C 1F 67 8D 68 96 47 45 16 B8 B3 0F 77
0130 | 4F 06 31 AF 5A 8D 08 2F 0D 99 E9 0E BD B4 FE DB
0140 | 4E C6 41 5F 28 EE D8 BC 26 14 ED 75 FD CA 35 35
0150 | 08 E4 C3 5A CB C7 55 B8 AA F3 72 4E 96 8B 76 10
0160 | 90 4A AB 2B A8 6F B2 86 5B 68 3D 78 CB 84 75 1B
0170 | AD D4 98 14 C2 DC 3B 6E B0 DE 78 84 8F 41 8A B8
0180 | FC 89 FC C6 84 D1 20 B7 7F EF 47 8A</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>C87807001D80A266</code></td>
<td><code>9CDD0E003183A266</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>83B0585B197D96F7BF9AD36784FA35A1</code></td>
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>1331713E973CFD9AAA92CBF46F5158C0</code></td>
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE5001003DADC7C4EFED521B1D284817</code> <code>E75E255DFE4B0A1793312E3B0E0FE8B2</code> <code>7FEEA2CED932DD07A780E871552073D4</code> <code>A3D5EC939C3441B28781E9A61CD34D9A</code> <code>A25E6122A4D876D00507CAC07280585B</code> <code>70253425E55DBDFE0A3930DD57382BAF</code> <code>7F7F9E5DDC26651B1DB19B4D24E40D9D</code> <code>12ADA32585C1356A8287462A5424A26C</code> <code>CD31442CAF51BA175039BD21F451C557</code> <code>F898B3D3A8191FD3E7A60D39C7A7B4E4</code> <code>B4C774649A6172745BC8398AE89C95EA</code> <code>6524053E3265DD68F722E9E1BE7FBC93</code> <code>97B821B0AE83FC095BA72DEF29082EDD</code> <code>AC4FAFF49C119B6A808EB92C635D5F10</code> <code>9D90B3F23AC33683BE8292204C9FB210</code> <code>A08B8021B1CB61A72898F88D9C5B7116</code> <code>113F34582E970642BE781925CA2B7B7B</code> <code>D49498A32B6A8630A99F36F6F24ADFB0</code> <code>6265AE4FD405E9D868B4F96F1BF215BD</code> <code>0865DAA20328A4013702409FCF0FB174</code> <code>4D45A44210E12B30450F0A15245D8190</code><br> <code>A9761F48</code></td>
<td><code>FE5001005D446BE5F151CE5B82324598</code> <code>A4C13A875293FD63FA2659F66A116324</code> <code>24BAC35E38509DE9F3EA180FEE39C9DE</code> <code>879E67299E3B843EDB15A9EB236E2005</code> <code>F0C055877DD752D63444EB7246B15FED</code> <code>5364DC7B2F9FF3016349BD1AF2ACF8C2</code> <code>51C8AAC28D4851458047B925A815E2E4</code> <code>F99FDE495139380A85E52E3EB9BDEAEF</code> <code>9F30EDCE11CF28868A09D23543A5FC71</code> <code>D6CCD2E7F09829BB0BFB538CE840FF2B</code> <code>18D1AB5F2680817FBFBF6B44559B2769</code> <code>2DFAA65252F30F7BCA8BADE43C7D7522</code> <code>DF82DC42252376044F505530618D7038</code> <code>3240D8047ED93A2A0DA2682AAE804056</code> <code>E624F7FF820128707FDF6F3C1F678D68</code> <code>96474516B8B30F774F0631AF5A8D082F</code> <code>0D99E90EBDB4FEDB4EC6415F28EED8BC</code> <code>2614ED75FDCA353508E4C35ACBC755B8</code> <code>AAF3724E968B7610904AAB2BA86FB286</code> <code>5B683D78CB84751BADD49814C2DC3B6E</code> <code>B0DE78848F418AB8FC89FCC684D120B7</code><br> <code>7FEF478A</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 = 2C1B305A1CD023A6FB0A0F9B7A7C3B905BDA3D2F6BAB6BDC40881D071DD4A4119BA66061E2693E9E95EB99663370F980F69AA469171EB0F9AEEB7415ABEDCFF874FB65C0730D5ECA2DC0F1852C38BC022CA6E8C423F02F3351F72AEE42B5D66CE99DC99EF930255F2A7EE0F835D910184B31FB415DE142F79E52F39F203BEEC60BCE968FE12499C335CD39D4898756624D1F86D0224BA0257FE7FB3BC63C8E3ABB150E839F0DB55342A01C7BD12031EE5E8785970F9C77B42FAA995810CE38D98EE0D7A109012D9F3AB3582271779099B8530D50CCBC5E55807B8B46C568C11887DB471E8C517AE933FEDB453F176633CD675F865CF07A04E7D8BA29A0CFED56</code></pre>
<pre><code>auth_key = 9E2DF222F60F1870365DF0C7C1F7C2206A3197A6EBBE94316536FEA167D303FBDB20989FEB6931A2C1C5F8AB3DDE971C0A8E55BE1E5259A90A23A94A2283B91B335E8F44FC2C143FFD18E1C813002C7C448C5D455DD253DF1BE8E788EF83BFF29FFBB5DBA46E10646F1D2ACA4B52AE63BD6D167882803E8098C1617988451448A1362A56D0B567ED08D6C5BD6FA95B1C10EA031AF95E857BE4044245CDDF7DC1321D9D2BA5334C14F7C36C14CE7CC05E6984E3525F5E2A31865FA81F01AA5EC4E53B4FD478534B45591A345D6106555D4684619B3C915877CE17D734213E368A6253CE1C951E728D794CCFD92792074F7F6B92FD6CF0DC8BFC4FE4EFA66FD5F6</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 A0 E9 63 1E 80 A2 66
0010 | 40 00 00 00 34 F7 CB 3B 83 B0 58 5B 19 7D 96 F7
0020 | BF 9A D3 67 84 FA 35 A1 13 31 71 3E 97 3C FD 9A
0030 | AA 92 CB F4 6F 51 58 C0 66 15 3C 8E 75 C2 9B DB
0040 | AF AF 0F EE 28 29 98 01</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 0C 22 33 32 83 A2 66
0010 | 54 00 00 00 34 F7 CB 3B 36 0B 8A A0 07 4A 79 27
0020 | 37 AB 0C 91 14 60 FE 24 DF 49 12 EC 8A 55 7D 05
0030 | 16 A5 31 B6 83 E3 2E 71 57 68 6B 1E 83 D6 2D 7B
0040 | 7A C8 55 EF 4C 73 64 FE</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>01A0E9631E80A266</code></td>
<td><code>010C22333283A266</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>40000000</code> (64 in decimal)</td>
<td><code>54000000</code> (84 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>83B0585B197D96F7BF9AD36784FA35A1</code></td>
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>1331713E973CFD9AAA92CBF46F5158C0</code></td>
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>66153C8E75C29BDBAFAF0FEE28299801</code></td>
<td><code>57686B1E83D62D7B7AC855EF4C7364FE</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

@ -980,7 +980,7 @@
</tr>
<tr>
<td><a href="/method/auth.reportMissingCode">auth.reportMissingCode</a></td>
<td> </td>
<td>Official apps only, reports that the SMS authentication code wasn't delivered.</td>
</tr>
</tbody>
</table></div>