Update content of files

This commit is contained in:
GitHub Action 2024-02-08 20:22:53 +00:00
parent a30fffda0b
commit 93b7b4a604
6 changed files with 225 additions and 215 deletions

View file

@ -628,9 +628,9 @@
<li>Added <a href="/api/push-updates#possible-notifications">CHANNEL_MESSAGE_STORY</a> - <code>{1} shared a story</code></li>
<li>Added <a href="/api/push-updates#possible-notifications">CHAT_MESSAGE_STORY</a> - <code>{1} shared a story to the group</code></li>
<li>Added <a href="/api/push-updates#possible-notifications">MESSAGE_STORY</a> - <code>{1} shared a story with you</code></li>
<li>Added <a href="/api/push-updates#possible-notifications">MESSAGE_STORY_MENTION</a> - <code>mentioned you in a story</code></li>
<li>Added <a href="/api/push-updates#possible-notifications">STORY_HIDDEN_AUTHOR</a> - ``</li>
<li>Added <a href="/api/push-updates#possible-notifications">STORY_NOTEXT</a> - <code>posted a story</code></li>
<li>Added <a href="/api/push-updates#possible-notifications">MESSAGE_STORY_MENTION</a> - <code>{1} mentioned you in a story</code></li>
<li>Added <a href="/api/push-updates#possible-notifications">STORY_HIDDEN_AUTHOR</a> - <code>A new story was posted (emitted when previews are hidden for this peer)</code></li>
<li>Added <a href="/api/push-updates#possible-notifications">STORY_NOTEXT</a> - <code>{1} posted a story</code></li>
</ul>
<h5><a class="anchor" href="#changed-push-notifications" id="changed-push-notifications" name="changed-push-notifications"><i class="anchor-icon"></i></a>Changed PUSH notifications</h5>
<ul>

View file

@ -761,8 +761,8 @@ Simple push works by sending a simple PUT request with a <code>version=number</c
</tr>
<tr>
<td>MESSAGE_STORY_MENTION</td>
<td>mentioned you in a story</td>
<td> </td>
<td>{1} mentioned you in a story</td>
<td>1. User name</td>
</tr>
<tr>
<td>MESSAGE_TEXT</td>
@ -1066,13 +1066,13 @@ Simple push works by sending a simple PUT request with a <code>version=number</c
</tr>
<tr>
<td>STORY_HIDDEN_AUTHOR</td>
<td> </td>
<td>A new story was posted (emitted when previews are hidden for this peer)</td>
<td> </td>
</tr>
<tr>
<td>STORY_NOTEXT</td>
<td>posted a story</td>
<td> </td>
<td>{1} posted a story</td>
<td>1.</td>
</tr>
</tbody>
</table></div>

View file

@ -105,6 +105,11 @@
</tr>
<tr>
<td>400</td>
<td>CHANNEL_PRIVATE</td>
<td>You haven't joined this channel/supergroup.</td>
</tr>
<tr>
<td>400</td>
<td>CHAT_ADMIN_REQUIRED</td>
<td>You must be an admin in this chat to do this.</td>
</tr>

View file

@ -200,6 +200,11 @@
</tr>
<tr>
<td>400</td>
<td>BUTTON_USER_INVALID</td>
<td>The <code>user_id</code> passed to inputKeyboardButtonUserProfile is invalid!</td>
</tr>
<tr>
<td>400</td>
<td>BUTTON_USER_PRIVACY_RESTRICTED</td>
<td>The privacy setting of the user specified in a <a href="/constructor/inputKeyboardButtonUserProfile">inputKeyboardButtonUserProfile</a> button do not allow creating such a button.</td>
</tr>

View file

@ -181,7 +181,7 @@
<tr>
<td>400</td>
<td>MEDIA_VIDEO_STORY_MISSING</td>
<td> </td>
<td>A non-story video cannot be repubblished as a story (emitted when trying to resend a non-story video as a story using inputDocument).</td>
</tr>
<tr>
<td>400</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 1C 5D 0E 00 90 2E C5 65
0010 | 14 00 00 00 F1 8E 7E BE 80 0B A7 18 BC 0E 7E A3
0020 | F5 90 50 67 F7 2A 95 64</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 B8 9A 06 00 FC 35 C5 65
0010 | 14 00 00 00 F1 8E 7E BE 29 60 48 82 0D B2 4E 46
0020 | 47 F1 10 A6 10 5B 39 B4</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>1C5D0E00902EC565</code></td>
<td><code>B89A0600FC35C565</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>800BA718BC0E7EA3F5905067F72A9564</code></td>
<td><code>296048820DB24E4647F110A6105B39B4</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 80 52 2D 90 2E C5 65
0010 | C4 00 00 00 63 24 16 05 80 0B A7 18 BC 0E 7E A3
0020 | F5 90 50 67 F7 2A 95 64 D6 A3 85 6C 3E 35 03 4B
0030 | 03 00 6E FB C2 7F 6E EF 08 25 2D 69 08 47 91 B6
0040 | D1 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 C8 31 59 FC 35 C5 65
0010 | 68 00 00 00 63 24 16 05 29 60 48 82 0D B2 4E 46
0020 | 47 F1 10 A6 10 5B 39 B4 24 08 8C FF 48 75 8D B6
0030 | 2B 59 5F AD 1C AB 00 50 08 15 6C E5 95 93 76 D5
0040 | E7 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>0180522D902EC565</code></td>
<td><code>01C83159FC35C565</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>C4000000</code> (196 in decimal)</td>
<td><code>68000000</code> (104 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>800BA718BC0E7EA3F5905067F72A9564</code></td>
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>D6A3856C3E35034B03006EFBC27F6EEF</code></td>
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>08252D69084791B6D1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2678912837636699857</td>
<td><code>08156CE5959376D5E7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1543861202868164071</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 = 2678912837636699857</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2678912837636699857 = 1396420087 * 1918414711</code></p>
<pre><code>p = 1396420087
q = 1918414711</code></pre>
<pre><code>pq = 1543861202868164071</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1543861202868164071 = 1038093167 * 1487208713</code></p>
<pre><code>p = 1038093167
q = 1487208713</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 25 2D 69 08 47 91 B6 D1 00 00 00
0010 | 04 53 3B AD F7 00 00 00 04 72 58 AF 77 00 00 00
0020 | 80 0B A7 18 BC 0E 7E A3 F5 90 50 67 F7 2A 95 64
0030 | D6 A3 85 6C 3E 35 03 4B 03 00 6E FB C2 7F 6E EF
0040 | 10 CA 08 B0 00 13 DB 56 A7 C3 8D FC E6 08 E2 50
0050 | DF A3 46 47 9E 07 5A 31 C0 7B C0 64 C0 66 1C E6
<pre><code>0000 | 95 5F F5 A9 08 15 6C E5 95 93 76 D5 E7 00 00 00
0010 | 04 3D E0 0B 6F 00 00 00 04 58 A5 01 09 00 00 00
0020 | 29 60 48 82 0D B2 4E 46 47 F1 10 A6 10 5B 39 B4
0030 | 24 08 8C FF 48 75 8D B6 2B 59 5F AD 1C AB 00 50
0040 | 8F A5 1E FA FA BD 9F 0F A8 AF B9 96 DF 45 51 C9
0050 | 00 02 05 3D 70 65 34 E2 FF E9 03 3E 2E F3 FD EE
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 = 1918414711</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>08252D69084791B6D1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2678912837636699857</td>
<td><code>08156CE5959376D5E7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1543861202868164071</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>04533BADF7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1396420087</td>
<td><code>043DE00B6F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1038093167</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>047258AF77000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1918414711</td>
<td><code>0458A50109000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1487208713</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>800BA718BC0E7EA3F5905067F72A9564</code></td>
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>D6A3856C3E35034B03006EFBC27F6EEF</code></td>
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>10CA08B00013DB56A7C38DFCE608E250</code> <code>DFA346479E075A31C07BC064C0661CE6</code></td>
<td><code>8FA51EFAFABD9F0FA8AFB996DF4551C9</code> <code>0002053D706534E2FFE9033E2EF3FDEE</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1918414711</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 = 955FF5A908252D69084791B6D100000004533BADF7000000047258AF77000000800BA718BC0E7EA3F5905067F72A9564D6A3856C3E35034B03006EFBC27F6EEF10CA08B00013DB56A7C38DFCE608E250DFA346479E075A31C07BC064C0661CE602000000
random_padding_bytes = 5602F0EF85C8F5C01164BE7AE51F8853BFC80F37140F9489ACDF5B9E85D22F97EC9D7D094053E4C8C035AD6F08BEA39D94C7B50F74D9EF318AADBB025DC5EB9D2F4898BC4BD969124E5ED89EDBBD680C11B882CA01ECEBA7F5CEF9C2</code></pre>
<pre><code>data = 955FF5A908156CE5959376D5E7000000043DE00B6F0000000458A50109000000296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB00508FA51EFAFABD9F0FA8AFB996DF4551C90002053D706534E2FFE9033E2EF3FDEE02000000
random_padding_bytes = 65ABF7EDBB05E031AF979CF8CB1B2B6BC7DFE73CBFD2A8CA0915DA61897897EEB2DE6FEF7FD31967EBEFBAFDB62B68104A271171DB7A75E92B3E809EB15430D0EF0C1AEA64D4B3C769280861E345683C4E8C4130E7722CE3358D7BCF</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 = 9ADEE1E1701055AC3B88E379136412DB5A0AC411CC4F2521BFEDFC4A8D5550955B79B4AB3785A575B4CA81B4E24A199BD1BD14B74107C5F1D93AA1369222018B1727AD469A055A2B98FB1D27190FACAA22D35391E5F6C6E5A7E9935003272F8A95A8608D9AB2BEDA7D47470F441B204A9CBDB4A8A44771CD6AA20B1514DBD75620DA1723D37E7BA13BAB536EA869B14D3C3608F85EFAE52825E7F6EAB56A1B9AED7EB82B3B57DC4900CF91C62B59B507188B5FE33986E7E45C5EB00093E0062144B5B9FB2412D835DDA7961D41AC39D201C72DD8A6EEC47D96B012801F35F62B7EF6BDDE0EC124AAB6A2C4EBB5A9F6207B8BF62A650B8C0C9F7C51DECF4748A7</code></pre>
<pre><code>encrypted_data = B4EAB301DB32ADD8E0F44AF3BFED05022387D3FC93F5FADB80AE0753CF76B0340F7DB1589C21C5ADB2BDF9CF47A698506BD262B22303A986813FCBEE65EAADFF68C8818F6FA3B2B5E616C7576E32A4E7D4305F596F3E34464FB49C0DC84A6F6495EED79BD59B121DBF1C5EFFDFC34DA250310F4ADC4E316C07539D6C01B135E5393273F1F9BCA7EF836995F48BBF143D704F64648F6A9F5CFC4B78FE936B78BF671EF301C289E4FA43FB2AFAEABF1A393F05DAFD8A1A1595EB37D0729BE0FFB2029F3C9CE2F1A53916DA1593D2E390349F4922BD0A92E748FD9F5A1ED25495A20379C2A0E005234875AFB45A98915B817FD0668F676ED69181F05DDEB63E7041</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 F0 CF 0E 00 90 2E C5 65
0010 | 40 01 00 00 BE E4 12 D7 80 0B A7 18 BC 0E 7E A3
0020 | F5 90 50 67 F7 2A 95 64 D6 A3 85 6C 3E 35 03 4B
0030 | 03 00 6E FB C2 7F 6E EF 04 53 3B AD F7 00 00 00
0040 | 04 72 58 AF 77 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 9A DE E1 E1 70 10 55 AC 3B 88 E3 79
0060 | 13 64 12 DB 5A 0A C4 11 CC 4F 25 21 BF ED FC 4A
0070 | 8D 55 50 95 5B 79 B4 AB 37 85 A5 75 B4 CA 81 B4
0080 | E2 4A 19 9B D1 BD 14 B7 41 07 C5 F1 D9 3A A1 36
0090 | 92 22 01 8B 17 27 AD 46 9A 05 5A 2B 98 FB 1D 27
00A0 | 19 0F AC AA 22 D3 53 91 E5 F6 C6 E5 A7 E9 93 50
00B0 | 03 27 2F 8A 95 A8 60 8D 9A B2 BE DA 7D 47 47 0F
00C0 | 44 1B 20 4A 9C BD B4 A8 A4 47 71 CD 6A A2 0B 15
00D0 | 14 DB D7 56 20 DA 17 23 D3 7E 7B A1 3B AB 53 6E
00E0 | A8 69 B1 4D 3C 36 08 F8 5E FA E5 28 25 E7 F6 EA
00F0 | B5 6A 1B 9A ED 7E B8 2B 3B 57 DC 49 00 CF 91 C6
0100 | 2B 59 B5 07 18 8B 5F E3 39 86 E7 E4 5C 5E B0 00
0110 | 93 E0 06 21 44 B5 B9 FB 24 12 D8 35 DD A7 96 1D
0120 | 41 AC 39 D2 01 C7 2D D8 A6 EE C4 7D 96 B0 12 80
0130 | 1F 35 F6 2B 7E F6 BD DE 0E C1 24 AA B6 A2 C4 EB
0140 | B5 A9 F6 20 7B 8B F6 2A 65 0B 8C 0C 9F 7C 51 DE
0150 | CF 47 48 A7</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 BC 9A 06 00 FC 35 C5 65
0010 | 40 01 00 00 BE E4 12 D7 29 60 48 82 0D B2 4E 46
0020 | 47 F1 10 A6 10 5B 39 B4 24 08 8C FF 48 75 8D B6
0030 | 2B 59 5F AD 1C AB 00 50 04 3D E0 0B 6F 00 00 00
0040 | 04 58 A5 01 09 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 B4 EA B3 01 DB 32 AD D8 E0 F4 4A F3
0060 | BF ED 05 02 23 87 D3 FC 93 F5 FA DB 80 AE 07 53
0070 | CF 76 B0 34 0F 7D B1 58 9C 21 C5 AD B2 BD F9 CF
0080 | 47 A6 98 50 6B D2 62 B2 23 03 A9 86 81 3F CB EE
0090 | 65 EA AD FF 68 C8 81 8F 6F A3 B2 B5 E6 16 C7 57
00A0 | 6E 32 A4 E7 D4 30 5F 59 6F 3E 34 46 4F B4 9C 0D
00B0 | C8 4A 6F 64 95 EE D7 9B D5 9B 12 1D BF 1C 5E FF
00C0 | DF C3 4D A2 50 31 0F 4A DC 4E 31 6C 07 53 9D 6C
00D0 | 01 B1 35 E5 39 32 73 F1 F9 BC A7 EF 83 69 95 F4
00E0 | 8B BF 14 3D 70 4F 64 64 8F 6A 9F 5C FC 4B 78 FE
00F0 | 93 6B 78 BF 67 1E F3 01 C2 89 E4 FA 43 FB 2A FA
0100 | EA BF 1A 39 3F 05 DA FD 8A 1A 15 95 EB 37 D0 72
0110 | 9B E0 FF B2 02 9F 3C 9C E2 F1 A5 39 16 DA 15 93
0120 | D2 E3 90 34 9F 49 22 BD 0A 92 E7 48 FD 9F 5A 1E
0130 | D2 54 95 A2 03 79 C2 A0 E0 05 23 48 75 AF B4 5A
0140 | 98 91 5B 81 7F D0 66 8F 67 6E D6 91 81 F0 5D DE
0150 | B6 3E 70 41</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 = 5602F0EF85C8F5C01164BE7AE51F8853BFC80F37140F9489ACDF5B9E8
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>F0CF0E00902EC565</code></td>
<td><code>BC9A0600FC35C565</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 = 5602F0EF85C8F5C01164BE7AE51F8853BFC80F37140F9489ACDF5B9E8
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>800BA718BC0E7EA3F5905067F72A9564</code></td>
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>D6A3856C3E35034B03006EFBC27F6EEF</code></td>
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>04533BADF7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1396420087</td>
<td><code>043DE00B6F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1038093167</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>047258AF77000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1918414711</td>
<td><code>0458A50109000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1487208713</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 = 5602F0EF85C8F5C01164BE7AE51F8853BFC80F37140F9489ACDF5B9E8
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001009ADEE1E1701055AC3B88E379</code> <code>136412DB5A0AC411CC4F2521BFEDFC4A</code> <code>8D5550955B79B4AB3785A575B4CA81B4</code> <code>E24A199BD1BD14B74107C5F1D93AA136</code> <code>9222018B1727AD469A055A2B98FB1D27</code> <code>190FACAA22D35391E5F6C6E5A7E99350</code> <code>03272F8A95A8608D9AB2BEDA7D47470F</code> <code>441B204A9CBDB4A8A44771CD6AA20B15</code> <code>14DBD75620DA1723D37E7BA13BAB536E</code> <code>A869B14D3C3608F85EFAE52825E7F6EA</code> <code>B56A1B9AED7EB82B3B57DC4900CF91C6</code> <code>2B59B507188B5FE33986E7E45C5EB000</code> <code>93E0062144B5B9FB2412D835DDA7961D</code> <code>41AC39D201C72DD8A6EEC47D96B01280</code> <code>1F35F62B7EF6BDDE0EC124AAB6A2C4EB</code> <code>B5A9F6207B8BF62A650B8C0C9F7C51DE</code><br> <code>CF4748A7</code></td>
<td><code>FE000100B4EAB301DB32ADD8E0F44AF3</code> <code>BFED05022387D3FC93F5FADB80AE0753</code> <code>CF76B0340F7DB1589C21C5ADB2BDF9CF</code> <code>47A698506BD262B22303A986813FCBEE</code> <code>65EAADFF68C8818F6FA3B2B5E616C757</code> <code>6E32A4E7D4305F596F3E34464FB49C0D</code> <code>C84A6F6495EED79BD59B121DBF1C5EFF</code> <code>DFC34DA250310F4ADC4E316C07539D6C</code> <code>01B135E5393273F1F9BCA7EF836995F4</code> <code>8BBF143D704F64648F6A9F5CFC4B78FE</code> <code>936B78BF671EF301C289E4FA43FB2AFA</code> <code>EABF1A393F05DAFD8A1A1595EB37D072</code> <code>9BE0FFB2029F3C9CE2F1A53916DA1593</code> <code>D2E390349F4922BD0A92E748FD9F5A1E</code> <code>D25495A20379C2A0E005234875AFB45A</code> <code>98915B817FD0668F676ED69181F05DDE</code><br> <code>B63E7041</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 5602F0EF85C8F5C01164BE7AE51F8853BFC80F37140F9489ACDF5B9E8
<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 E0 CE D3 90 2E C5 65
0010 | AC 02 00 00 5C 07 E8 D0 80 0B A7 18 BC 0E 7E A3
0020 | F5 90 50 67 F7 2A 95 64 D6 A3 85 6C 3E 35 03 4B
0030 | 03 00 6E FB C2 7F 6E EF FE 50 02 00 D8 2B AE D9
0040 | A0 26 FF 5D 2C 6E 90 A7 E0 CD 40 4C C9 45 B7 C8
0050 | 71 C9 AE 29 FD 2A B0 84 B5 E5 86 6E 4E DB 50 24
0060 | CA 86 B6 AE FB 1E 9B 9A 50 A5 D0 48 E7 19 DB 3C
0070 | 33 61 89 A4 D3 4E E0 08 75 95 85 C3 72 77 EF C8
0080 | 57 68 02 94 5B A7 5E 20 5B 6C CC 42 B5 91 34 F9
0090 | 2B 4D 70 FF CE 91 22 4F C4 AB 6C AB A1 D3 DE 6F
00A0 | A2 C8 76 77 0E 91 99 62 8B 13 88 0C 7A 7A 52 A4
00B0 | EA 02 C9 E4 F8 1B 75 31 42 78 A1 FF A7 38 E1 3B
00C0 | 38 34 8A 0B BB 71 72 D2 B4 1F B1 83 F2 2B A6 67
00D0 | 54 F9 6F 06 0C 10 3E CC 8E E9 27 4D 98 D7 D9 95
00E0 | C8 24 7E D7 F3 A5 B4 27 9E 54 19 AC 59 80 F1 38
00F0 | 85 C2 79 58 F4 F9 D8 E2 4B EE 35 4C 89 75 AB F5
0100 | 5C 57 48 F1 D9 39 32 FC B8 DA 03 40 77 C5 E6 D9
0110 | 65 4A 90 3A 02 B3 73 E9 31 8A 42 EE A0 D8 2B 35
0120 | D4 67 6B 86 9B E9 FD 19 D6 A9 AB 44 9C 9A A4 C8
0130 | D7 B0 3D 03 82 19 D2 A1 34 2C 31 C3 69 EB 57 3F
0140 | 4A D8 31 2C D6 E3 3F 59 ED F2 BC 3D 2D 42 C0 09
0150 | 55 6E 0C CC FF B5 20 05 B4 CF CD C2 94 86 C0 C3
0160 | 95 84 67 E9 02 95 60 F7 DA BE 76 D0 5A 7F 8A DC
0170 | E5 AB C5 47 F3 99 F6 8E F6 43 EF 52 5B 1D D0 3F
0180 | B7 BD D7 E4 EC 75 80 57 29 57 F1 96 79 88 FE BA
0190 | C3 FC 06 C0 75 8E B8 2B D2 19 E4 F4 E1 25 34 AB
01A0 | 50 12 BE 48 D0 0F 92 07 51 68 89 4F 3C 60 5A 76
01B0 | 17 58 BC 8C 7E EF 5D A7 2F 8D 79 8E AE 14 8F 44
01C0 | 85 68 C2 98 58 CB 89 93 64 34 D1 8A A0 3B CB C9
01D0 | C9 BF 8D 86 B0 49 3F A5 8C 8D 59 47 5A 44 99 25
01E0 | 5D C1 B2 15 C7 E2 1D CF 0D 3F 1D 6C F0 37 B9 BA
01F0 | 80 A7 BA 97 10 E9 87 1A 32 A7 83 29 95 15 E0 38
0200 | 03 71 66 60 85 F7 99 1F B9 B2 FA DC 90 90 D4 9B
0210 | 4C 1B 85 E5 B1 8A 72 21 83 85 C8 B5 C0 8F 4F F7
0220 | F3 E1 1E B4 08 60 53 2B F4 E5 D5 CB A2 11 30 46
0230 | 39 93 14 CA 83 ED 6F 04 2B 22 08 ED C2 48 0D F3
0240 | 0D CE E0 8F 6A F8 AA CD 15 62 5B C8 4B 32 A2 96
0250 | E4 77 16 7F BE 95 F0 56 0C ED 82 C8 16 C5 AE B4
0260 | 65 1B AF D0 C7 B4 1A B3 9F F3 6F 9D 94 A3 5C DD
0270 | F0 5D C1 35 77 69 C4 E6 A6 19 89 83 58 38 22 FB
0280 | CF A1 F5 0D 2B BB 74 C2 ED CD 75 EE</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 38 64 08 FD 35 C5 65
0010 | 9C 02 00 00 5C 07 E8 D0 29 60 48 82 0D B2 4E 46
0020 | 47 F1 10 A6 10 5B 39 B4 24 08 8C FF 48 75 8D B6
0030 | 2B 59 5F AD 1C AB 00 50 FE 50 02 00 AB BA 46 8A
0040 | 62 67 D2 A0 DE B6 11 B4 67 CD E0 85 6A 5B C3 2E
0050 | 26 FB 94 AE AF 13 92 3A B3 B4 E4 DC F2 13 CD A7
0060 | 01 93 BA 1F 0C E9 6F 2C 2C 12 A3 4D EA 4F 16 0C
0070 | BC 84 2F 25 5C F6 02 FB 27 8B 80 E1 3B F3 93 33
0080 | AF EA 22 8C C8 DC 9E 82 B5 2F AF 58 FD C6 3E 6D
0090 | 55 C7 4E 7D 8C EE 51 CE 57 7E AB A9 48 25 0D C1
00A0 | D2 97 AB 63 A0 7B 4E 2D A0 34 FE C5 2E FF 26 B7
00B0 | C0 81 C6 96 ED 5B A8 C0 A5 E2 B3 6B 8E BA 16 2D
00C0 | CC 5F AE B2 FB 6B 1D 9A BE 54 FC 00 51 59 30 91
00D0 | 11 7B D5 C3 80 D4 44 A4 47 6F 43 8C 00 E6 F5 F6
00E0 | 67 93 47 0E 14 3E 94 AA A5 A3 D9 FA 0C CF E0 FD
00F0 | BB 27 62 54 F6 84 B2 CF 19 70 9F E9 D8 EE 0F 79
0100 | 6D 33 87 0D 5D AC 59 08 7B 4B 68 20 59 44 DE 79
0110 | D7 E6 73 7A 28 FD F4 01 78 8F 2B 15 4B AD 63 F9
0120 | 10 AE 0B D3 00 1B 02 48 37 59 66 E9 AD 39 70 C7
0130 | 71 BE 37 AE 2D 22 2C A2 54 B4 04 0C 5F A8 80 C3
0140 | B8 51 4A 26 18 7D 2A 00 87 F3 4C C2 60 0F FA 68
0150 | C3 22 07 F9 83 37 0C 71 59 33 5C E4 99 4A 57 29
0160 | C6 E5 82 40 64 7D 3F BD 1D 9E 58 95 52 19 FF E9
0170 | 0C B7 B6 2A 89 53 FC CE 17 35 CB DC A8 B4 E9 9E
0180 | B8 C5 D7 A8 CF B2 CF 00 0A 5C 0B 69 FD A6 99 AC
0190 | 75 F1 CB 9D F9 DD CB DD 2B 2F 34 52 44 94 49 77
01A0 | D6 6D 0F B2 B1 AF 4E 51 B3 F4 17 D8 CB 0D 56 DF
01B0 | FD 71 CE 4B 1C C2 95 FE 4B A2 6F 8F 17 0B 41 D6
01C0 | 17 84 FD 83 B8 B6 93 D8 2E 0C 28 39 9D 66 DE 69
01D0 | 80 37 75 24 50 F6 F5 B1 4A EE 9C 99 4D CB C1 82
01E0 | 1D 49 B8 0B 79 89 6C 90 54 0A F6 95 DB D9 6D C5
01F0 | 7B 49 AA D8 B7 32 B1 AC 98 45 6F BB 4B 36 6C 01
0200 | 34 06 DF DD 1E 07 30 DC 5B 54 2B 1F 5E 86 AA E5
0210 | BA 6D 20 B5 9A 27 C6 FA 82 AE E0 21 F0 06 10 6D
0220 | EE A6 A1 90 9A 6C 85 13 9F 57 65 33 FB D8 8C 5F
0230 | FC 55 5C 5C 44 1D 7A 36 53 7F 88 18 C1 88 DF 02
0240 | 57 CC 5C 0D 5C 23 66 4C B6 93 D8 D3 5A 62 6E 17
0250 | 1F 5D 19 6F FC CE DF 6D 8E 0E B0 BE A3 5D 0F 53
0260 | 39 27 2B F3 C2 53 25 36 6A 1C 83 B4 9E 32 4C 0B
0270 | D0 2A F4 9A A5 ED A7 0F 43 4E C8 29 B3 AB 08 F7
0280 | FD E4 E1 B2 BD 13 5B 17 E0 E9 26 42</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 = 5602F0EF85C8F5C01164BE7AE51F8853BFC80F37140F9489ACDF5B9E8
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01E0CED3902EC565</code></td>
<td><code>01386408FD35C565</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>AC020000</code> (684 in decimal)</td>
<td><code>9C020000</code> (668 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 5602F0EF85C8F5C01164BE7AE51F8853BFC80F37140F9489ACDF5B9E8
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>800BA718BC0E7EA3F5905067F72A9564</code></td>
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>D6A3856C3E35034B03006EFBC27F6EEF</code></td>
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200D82BAED9A026FF5D2C6E90A7</code> <code>E0CD404CC945B7C871C9AE29FD2AB084</code> <code>B5E5866E4EDB5024CA86B6AEFB1E9B9A</code> <code>50A5D048E719DB3C336189A4D34EE008</code> <code>759585C37277EFC8576802945BA75E20</code> <code>5B6CCC42B59134F92B4D70FFCE91224F</code> <code>C4AB6CABA1D3DE6FA2C876770E919962</code> <code>8B13880C7A7A52A4EA02C9E4F81B7531</code> <code>4278A1FFA738E13B38348A0BBB7172D2</code> <code>B41FB183F22BA66754F96F060C103ECC</code> <code>8EE9274D98D7D995C8247ED7F3A5B427</code> <code>9E5419AC5980F13885C27958F4F9D8E2</code> <code>4BEE354C8975ABF55C5748F1D93932FC</code> <code>B8DA034077C5E6D9654A903A02B373E9</code> <code>318A42EEA0D82B35D4676B869BE9FD19</code> <code>D6A9AB449C9AA4C8D7B03D038219D2A1</code> <code>342C31C369EB573F4AD8312CD6E33F59</code> <code>EDF2BC3D2D42C009556E0CCCFFB52005</code> <code>B4CFCDC29486C0C3958467E9029560F7</code> <code>DABE76D05A7F8ADCE5ABC547F399F68E</code> <code>F643EF525B1DD03FB7BDD7E4EC758057</code> <code>2957F1967988FEBAC3FC06C0758EB82B</code> <code>D219E4F4E12534AB5012BE48D00F9207</code> <code>5168894F3C605A761758BC8C7EEF5DA7</code> <code>2F8D798EAE148F448568C29858CB8993</code> <code>6434D18AA03BCBC9C9BF8D86B0493FA5</code> <code>8C8D59475A4499255DC1B215C7E21DCF</code> <code>0D3F1D6CF037B9BA80A7BA9710E9871A</code> <code>32A783299515E0380371666085F7991F</code> <code>B9B2FADC9090D49B4C1B85E5B18A7221</code> <code>8385C8B5C08F4FF7F3E11EB40860532B</code> <code>F4E5D5CBA2113046399314CA83ED6F04</code> <code>2B2208EDC2480DF30DCEE08F6AF8AACD</code> <code>15625BC84B32A296E477167FBE95F056</code> <code>0CED82C816C5AEB4651BAFD0C7B41AB3</code> <code>9FF36F9D94A35CDDF05DC1357769C4E6</code> <code>A6198983583822FBCFA1F50D2BBB74C2</code><br> <code>EDCD75EE</code></td>
<td><code>FE500200ABBA468A6267D2A0DEB611B4</code> <code>67CDE0856A5BC32E26FB94AEAF13923A</code> <code>B3B4E4DCF213CDA70193BA1F0CE96F2C</code> <code>2C12A34DEA4F160CBC842F255CF602FB</code> <code>278B80E13BF39333AFEA228CC8DC9E82</code> <code>B52FAF58FDC63E6D55C74E7D8CEE51CE</code> <code>577EABA948250DC1D297AB63A07B4E2D</code> <code>A034FEC52EFF26B7C081C696ED5BA8C0</code> <code>A5E2B36B8EBA162DCC5FAEB2FB6B1D9A</code> <code>BE54FC0051593091117BD5C380D444A4</code> <code>476F438C00E6F5F66793470E143E94AA</code> <code>A5A3D9FA0CCFE0FDBB276254F684B2CF</code> <code>19709FE9D8EE0F796D33870D5DAC5908</code> <code>7B4B68205944DE79D7E6737A28FDF401</code> <code>788F2B154BAD63F910AE0BD3001B0248</code> <code>375966E9AD3970C771BE37AE2D222CA2</code> <code>54B4040C5FA880C3B8514A26187D2A00</code> <code>87F34CC2600FFA68C32207F983370C71</code> <code>59335CE4994A5729C6E58240647D3FBD</code> <code>1D9E58955219FFE90CB7B62A8953FCCE</code> <code>1735CBDCA8B4E99EB8C5D7A8CFB2CF00</code> <code>0A5C0B69FDA699AC75F1CB9DF9DDCBDD</code> <code>2B2F345244944977D66D0FB2B1AF4E51</code> <code>B3F417D8CB0D56DFFD71CE4B1CC295FE</code> <code>4BA26F8F170B41D61784FD83B8B693D8</code> <code>2E0C28399D66DE698037752450F6F5B1</code> <code>4AEE9C994DCBC1821D49B80B79896C90</code> <code>540AF695DBD96DC57B49AAD8B732B1AC</code> <code>98456FBB4B366C013406DFDD1E0730DC</code> <code>5B542B1F5E86AAE5BA6D20B59A27C6FA</code> <code>82AEE021F006106DEEA6A1909A6C8513</code> <code>9F576533FBD88C5FFC555C5C441D7A36</code> <code>537F8818C188DF0257CC5C0D5C23664C</code> <code>B693D8D35A626E171F5D196FFCCEDF6D</code> <code>8E0EB0BEA35D0F5339272BF3C2532536</code> <code>6A1C83B49E324C0BD02AF49AA5EDA70F</code> <code>434EC829B3AB08F7FDE4E1B2BD135B17</code><br> <code>E0E92642</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 5602F0EF85C8F5C01164BE7AE51F8853BFC80F37140F9489ACDF5B9E8
<!-- 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 = D82BAED9A026FF5D2C6E90A7E0CD404CC945B7C871C9AE29FD2AB084B5E5866E4EDB5024CA86B6AEFB1E9B9A50A5D048E719DB3C336189A4D34EE008759585C37277EFC8576802945BA75E205B6CCC42B59134F92B4D70FFCE91224FC4AB6CABA1D3DE6FA2C876770E9199628B13880C7A7A52A4EA02C9E4F81B75314278A1FFA738E13B38348A0BBB7172D2B41FB183F22BA66754F96F060C103ECC8EE9274D98D7D995C8247ED7F3A5B4279E5419AC5980F13885C27958F4F9D8E24BEE354C8975ABF55C5748F1D93932FCB8DA034077C5E6D9654A903A02B373E9318A42EEA0D82B35D4676B869BE9FD19D6A9AB449C9AA4C8D7B03D038219D2A1342C31C369EB573F4AD8312CD6E33F59EDF2BC3D2D42C009556E0CCCFFB52005B4CFCDC29486C0C3958467E9029560F7DABE76D05A7F8ADCE5ABC547F399F68EF643EF525B1DD03FB7BDD7E4EC7580572957F1967988FEBAC3FC06C0758EB82BD219E4F4E12534AB5012BE48D00F92075168894F3C605A761758BC8C7EEF5DA72F8D798EAE148F448568C29858CB89936434D18AA03BCBC9C9BF8D86B0493FA58C8D59475A4499255DC1B215C7E21DCF0D3F1D6CF037B9BA80A7BA9710E9871A32A783299515E0380371666085F7991FB9B2FADC9090D49B4C1B85E5B18A72218385C8B5C08F4FF7F3E11EB40860532BF4E5D5CBA2113046399314CA83ED6F042B2208EDC2480DF30DCEE08F6AF8AACD15625BC84B32A296E477167FBE95F0560CED82C816C5AEB4651BAFD0C7B41AB39FF36F9D94A35CDDF05DC1357769C4E6A6198983583822FBCFA1F50D2BBB74C2EDCD75EE
tmp_aes_key = 1694A711A6114B6BBABB94EE9CD3EE5351BD3878EBB313CE8AC4738062E9AD92
tmp_aes_iv = BED33E660AAB7A16C00377B33A6054E28E405B895CA9CF3DE96DDAA610CA08B0</code></pre>
<pre><code>encrypted_answer = ABBA468A6267D2A0DEB611B467CDE0856A5BC32E26FB94AEAF13923AB3B4E4DCF213CDA70193BA1F0CE96F2C2C12A34DEA4F160CBC842F255CF602FB278B80E13BF39333AFEA228CC8DC9E82B52FAF58FDC63E6D55C74E7D8CEE51CE577EABA948250DC1D297AB63A07B4E2DA034FEC52EFF26B7C081C696ED5BA8C0A5E2B36B8EBA162DCC5FAEB2FB6B1D9ABE54FC0051593091117BD5C380D444A4476F438C00E6F5F66793470E143E94AAA5A3D9FA0CCFE0FDBB276254F684B2CF19709FE9D8EE0F796D33870D5DAC59087B4B68205944DE79D7E6737A28FDF401788F2B154BAD63F910AE0BD3001B0248375966E9AD3970C771BE37AE2D222CA254B4040C5FA880C3B8514A26187D2A0087F34CC2600FFA68C32207F983370C7159335CE4994A5729C6E58240647D3FBD1D9E58955219FFE90CB7B62A8953FCCE1735CBDCA8B4E99EB8C5D7A8CFB2CF000A5C0B69FDA699AC75F1CB9DF9DDCBDD2B2F345244944977D66D0FB2B1AF4E51B3F417D8CB0D56DFFD71CE4B1CC295FE4BA26F8F170B41D61784FD83B8B693D82E0C28399D66DE698037752450F6F5B14AEE9C994DCBC1821D49B80B79896C90540AF695DBD96DC57B49AAD8B732B1AC98456FBB4B366C013406DFDD1E0730DC5B542B1F5E86AAE5BA6D20B59A27C6FA82AEE021F006106DEEA6A1909A6C85139F576533FBD88C5FFC555C5C441D7A36537F8818C188DF0257CC5C0D5C23664CB693D8D35A626E171F5D196FFCCEDF6D8E0EB0BEA35D0F5339272BF3C25325366A1C83B49E324C0BD02AF49AA5EDA70F434EC829B3AB08F7FDE4E1B2BD135B17E0E92642
tmp_aes_key = C5613909EE08C44A27355DFCF68FF1243C3E1D20B77947F0969612672EEE9EFB
tmp_aes_iv = F0D575BA184616046E8D221A48CAD8E797752CC09923299FF8F150548FA51EFA</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 9F9876C0901CCD5F876B90AF170A0537BA6A9029BA0D89B5800BA718BC0E7EA3F5905067F72A9564D6A3856C3E35034B03006EFBC27F6EEF03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007F300A42E28D0930B74A8EDC8EA47CEF91005DAC0EB568814CAE16890572EB063E7D5C0D0E22F5F8B70744FC091806B34374F130E56FE4C5B79CB038124E6612460CAD9E4D66F2061FD8EBB051CCEAE3E5E8C4D908E043B09C8ED2ED2AE60C7BEE2420F093B9FA8598C9C7DF765F04E9A628678A9D1932B2CECE9D5DA091CFB603BC45F31083C495B2169BC4CC2B67FEB2EAE6A2F6F8FD7EBFD1BAF3A7C12F8828C35C84641311F0A80A3244AC443F9EF80684F5C21F216AD2738D0E2AED09E6680A0E879AEA037B66D265037260CFBF7BB5B0F3BA8A40DC396AC4874B33B0A9160D19FECECE8060566B4CA5BC252DEF14637B12C998C696954667C419F1D2BA902EC565005886AFC04B2171
answer = BA0D89B5800BA718BC0E7EA3F5905067F72A9564D6A3856C3E35034B03006EFBC27F6EEF03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007F300A42E28D0930B74A8EDC8EA47CEF91005DAC0EB568814CAE16890572EB063E7D5C0D0E22F5F8B70744FC091806B34374F130E56FE4C5B79CB038124E6612460CAD9E4D66F2061FD8EBB051CCEAE3E5E8C4D908E043B09C8ED2ED2AE60C7BEE2420F093B9FA8598C9C7DF765F04E9A628678A9D1932B2CECE9D5DA091CFB603BC45F31083C495B2169BC4CC2B67FEB2EAE6A2F6F8FD7EBFD1BAF3A7C12F8828C35C84641311F0A80A3244AC443F9EF80684F5C21F216AD2738D0E2AED09E6680A0E879AEA037B66D265037260CFBF7BB5B0F3BA8A40DC396AC4874B33B0A9160D19FECECE8060566B4CA5BC252DEF14637B12C998C696954667C419F1D2BA902EC565005886AFC04B2171</code></pre>
<pre><code>answer_with_hash = 03996BDD7DD4F977B3C7901ABBF6DEB906A0546EBA0D89B5296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB005003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001006D4EE939DE2899C07FF0D1931EB744A285CF996D6AB277916A53884E027AF2D518154C56EFDF5FC1122027DAC0DDB8B425088BF03F077D84E6EBBBBDF38F1E5C6BF9445EBE5CA0AD26DE1FC7FCF0141579660C6D469DFA6F36B7C608D35A47036FF40C1FCE395364134A5F6D1B0AA6E646F25D8390F5A816CAB019E02C1ECC4996CCCB24417120645017245D575C6340E85485657DD33599FAEC86334139597B45626F57EFB225A09A524ED14D4F76F3FC7C7EE0DEF28A4E3F349D2871D2A430C4A91569C11A76FF0AB15A1FF0229F7D0CC5B92240C7A96F44EA76097D5E4C2A17F321AC1A9BF089B1C04D912B12D575853AD0C515E04D7CF4DD225EEDA6DEF5FD35C565EA9024606A627DAD
answer = BA0D89B5296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB005003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001006D4EE939DE2899C07FF0D1931EB744A285CF996D6AB277916A53884E027AF2D518154C56EFDF5FC1122027DAC0DDB8B425088BF03F077D84E6EBBBBDF38F1E5C6BF9445EBE5CA0AD26DE1FC7FCF0141579660C6D469DFA6F36B7C608D35A47036FF40C1FCE395364134A5F6D1B0AA6E646F25D8390F5A816CAB019E02C1ECC4996CCCB24417120645017245D575C6340E85485657DD33599FAEC86334139597B45626F57EFB225A09A524ED14D4F76F3FC7C7EE0DEF28A4E3F349D2871D2A430C4A91569C11A76FF0AB15A1FF0229F7D0CC5B92240C7A96F44EA76097D5E4C2A17F321AC1A9BF089B1C04D912B12D575853AD0C515E04D7CF4DD225EEDA6DEF5FD35C565EA9024606A627DAD</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 80 0B A7 18 BC 0E 7E A3 F5 90 50 67
0010 | F7 2A 95 64 D6 A3 85 6C 3E 35 03 4B 03 00 6E FB
0020 | C2 7F 6E EF 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 29 60 48 82 0D B2 4E 46 47 F1 10 A6
0010 | 10 5B 39 B4 24 08 8C FF 48 75 8D B6 2B 59 5F AD
0020 | 1C AB 00 50 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 = BA0D89B5800BA718BC0E7EA3F5905067F72A9564D6A3856C3E35034B03006EFBC27F6EE
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 | 7F 30 0A 42 E2 8D 09 30 B7 4A 8E DC 8E A4 7C EF
0140 | 91 00 5D AC 0E B5 68 81 4C AE 16 89 05 72 EB 06
0150 | 3E 7D 5C 0D 0E 22 F5 F8 B7 07 44 FC 09 18 06 B3
0160 | 43 74 F1 30 E5 6F E4 C5 B7 9C B0 38 12 4E 66 12
0170 | 46 0C AD 9E 4D 66 F2 06 1F D8 EB B0 51 CC EA E3
0180 | E5 E8 C4 D9 08 E0 43 B0 9C 8E D2 ED 2A E6 0C 7B
0190 | EE 24 20 F0 93 B9 FA 85 98 C9 C7 DF 76 5F 04 E9
01A0 | A6 28 67 8A 9D 19 32 B2 CE CE 9D 5D A0 91 CF B6
01B0 | 03 BC 45 F3 10 83 C4 95 B2 16 9B C4 CC 2B 67 FE
01C0 | B2 EA E6 A2 F6 F8 FD 7E BF D1 BA F3 A7 C1 2F 88
01D0 | 28 C3 5C 84 64 13 11 F0 A8 0A 32 44 AC 44 3F 9E
01E0 | F8 06 84 F5 C2 1F 21 6A D2 73 8D 0E 2A ED 09 E6
01F0 | 68 0A 0E 87 9A EA 03 7B 66 D2 65 03 72 60 CF BF
0200 | 7B B5 B0 F3 BA 8A 40 DC 39 6A C4 87 4B 33 B0 A9
0210 | 16 0D 19 FE CE CE 80 60 56 6B 4C A5 BC 25 2D EF
0220 | 14 63 7B 12 C9 98 C6 96 95 46 67 C4 19 F1 D2 BA
0230 | 90 2E C5 65</code></pre>
0130 | 6D 4E E9 39 DE 28 99 C0 7F F0 D1 93 1E B7 44 A2
0140 | 85 CF 99 6D 6A B2 77 91 6A 53 88 4E 02 7A F2 D5
0150 | 18 15 4C 56 EF DF 5F C1 12 20 27 DA C0 DD B8 B4
0160 | 25 08 8B F0 3F 07 7D 84 E6 EB BB BD F3 8F 1E 5C
0170 | 6B F9 44 5E BE 5C A0 AD 26 DE 1F C7 FC F0 14 15
0180 | 79 66 0C 6D 46 9D FA 6F 36 B7 C6 08 D3 5A 47 03
0190 | 6F F4 0C 1F CE 39 53 64 13 4A 5F 6D 1B 0A A6 E6
01A0 | 46 F2 5D 83 90 F5 A8 16 CA B0 19 E0 2C 1E CC 49
01B0 | 96 CC CB 24 41 71 20 64 50 17 24 5D 57 5C 63 40
01C0 | E8 54 85 65 7D D3 35 99 FA EC 86 33 41 39 59 7B
01D0 | 45 62 6F 57 EF B2 25 A0 9A 52 4E D1 4D 4F 76 F3
01E0 | FC 7C 7E E0 DE F2 8A 4E 3F 34 9D 28 71 D2 A4 30
01F0 | C4 A9 15 69 C1 1A 76 FF 0A B1 5A 1F F0 22 9F 7D
0200 | 0C C5 B9 22 40 C7 A9 6F 44 EA 76 09 7D 5E 4C 2A
0210 | 17 F3 21 AC 1A 9B F0 89 B1 C0 4D 91 2B 12 D5 75
0220 | 85 3A D0 C5 15 E0 4D 7C F4 DD 22 5E ED A6 DE F5
0230 | FD 35 C5 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 = BA0D89B5800BA718BC0E7EA3F5905067F72A9564D6A3856C3E35034B03006EFBC27F6EE
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>800BA718BC0E7EA3F5905067F72A9564</code></td>
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>D6A3856C3E35034B03006EFBC27F6EEF</code></td>
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B5800BA718BC0E7EA3F5905067F72A9564D6A3856C3E35034B03006EFBC27F6EE
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE0001007F300A42E28D0930B74A8EDC</code> <code>8EA47CEF91005DAC0EB568814CAE1689</code> <code>0572EB063E7D5C0D0E22F5F8B70744FC</code> <code>091806B34374F130E56FE4C5B79CB038</code> <code>124E6612460CAD9E4D66F2061FD8EBB0</code> <code>51CCEAE3E5E8C4D908E043B09C8ED2ED</code> <code>2AE60C7BEE2420F093B9FA8598C9C7DF</code> <code>765F04E9A628678A9D1932B2CECE9D5D</code> <code>A091CFB603BC45F31083C495B2169BC4</code> <code>CC2B67FEB2EAE6A2F6F8FD7EBFD1BAF3</code> <code>A7C12F8828C35C84641311F0A80A3244</code> <code>AC443F9EF80684F5C21F216AD2738D0E</code> <code>2AED09E6680A0E879AEA037B66D26503</code> <code>7260CFBF7BB5B0F3BA8A40DC396AC487</code> <code>4B33B0A9160D19FECECE8060566B4CA5</code> <code>BC252DEF14637B12C998C696954667C4</code><br> <code>19F1D2BA</code></td>
<td><code>FE0001006D4EE939DE2899C07FF0D193</code> <code>1EB744A285CF996D6AB277916A53884E</code> <code>027AF2D518154C56EFDF5FC1122027DA</code> <code>C0DDB8B425088BF03F077D84E6EBBBBD</code> <code>F38F1E5C6BF9445EBE5CA0AD26DE1FC7</code> <code>FCF0141579660C6D469DFA6F36B7C608</code> <code>D35A47036FF40C1FCE395364134A5F6D</code> <code>1B0AA6E646F25D8390F5A816CAB019E0</code> <code>2C1ECC4996CCCB24417120645017245D</code> <code>575C6340E85485657DD33599FAEC8633</code> <code>4139597B45626F57EFB225A09A524ED1</code> <code>4D4F76F3FC7C7EE0DEF28A4E3F349D28</code> <code>71D2A430C4A91569C11A76FF0AB15A1F</code> <code>F0229F7D0CC5B92240C7A96F44EA7609</code> <code>7D5E4C2A17F321AC1A9BF089B1C04D91</code> <code>2B12D575853AD0C515E04D7CF4DD225E</code><br> <code>EDA6DEF5</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>902EC565</code> (1707421328 in decimal)</td>
<td><code>FD35C565</code> (1707423229 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B5800BA718BC0E7EA3F5905067F72A9564D6A3856C3E35034B03006EFBC27F6EE
<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 = 2EC303EC47EBF359A8EF58553C5765B4350F0DB8BD1E88289C840D3921DC5DB3E583843026A862DFF6BABBD4128D5425355B2098CEBE676E45752DF24B80ACB39D66C214B318F8CE58DA27812278657B0FC3DA942DCDA52D2FDB5884C36FFB4540BF39EE43CA92F6F1921B152E0669BE3A955A03682E0BFDF1D5B209864FEDB2250B946C3F5D252E5E9905422944B5292A46F6E6CDA543981C2B608EAB1BA17104352972CA57866D285FE6C2660E416977913CDF28D3EC17BCE02F17052DDAADD5710F624C8A0E6790F4C97A245A6584C87DE00F4E9673DE92E406A61D247C5E8BB615A59F91EA73D28DCC95D235CC6CA412CA3E185116ED6CF963D2C15C23EB</code></pre>
<pre><code>b = 9510E46B1695BA56E30B2BCB0A400B7A3B99847BAEA0CCAAA6ABC466BAC51A18C4283F748919BEAC71668C8C417DA35B749161DAEBECC77AD9D59153BC7F08F0F4F4CD1DA1EEF670F231339406C24524DB01BF7A841746CBA29A5537CA3BE6758C2D38D85C97D987AFB0B21CE389128CB9193DA25AD2AFC5E652FABE76DFBC2A2C209DBBD8A6782ED3AAFA789926C62595EAE67D68346E85075E5C4B0A632975DB20B6A3C47D40BF73158DB83D0EF229DCB445BD08AD31A43928CD69504BF6D2E5A85A4C5E3759299B8D7B72706AE6FED21E0DFDE886BFD8EB9476E2B9F610DB447C8F20F20DD4681908D6DA67196A1F80A7887986A9E3F13E415FFCD61BA6C5</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 = 392EFB02FF06BE541AE2836DE1C443530B1CCE635FF07D9817B3532644A0CF3C5F4BD8F8C53F40E00AFEE41D1C478F7A7ACDAAE1601E52C42C86436A816F3AB39DACDB60AF51E04A7E9C36DD8EF081FA2E6DFBCD2FB24C312B02A45413C5D18A7E1D1B6C16FFB582D1C1D538946C8269ED1AE18A5FCFBAE4FCE2D4835D80ACC6400153CE43C54F3A9ABAB65F048E8661476AB2C4FAD76BE6B46B407A5419F92A19431D09BB2265A3135DC7F41BF18D88502997A1AD3E96ED533BBB409A9D3A51AE17FA2B7BFC81657851BCC4E73608FBFDF682D08893468FDC6D1247D2B5EAFD91A80D96B399E2B657144A8C41FCBF0A9FF8114E243EBA9D15325C1DEE3297E5</code></pre>
<pre><code>g_b = 55606D890DEFBAAC50F8B833A2A8C062937665225725AC78AB34756A791D1B0368DC4F3F6897467833B97CAFC4F0D2E86EAD45830B7FED34A60214A7506A7B3988BA070EB9F31D14673854107898E73CB01746E1232080ED82C3BA29325DB8D600F246C5526BAAC62F372139529F7E0AA071C66ED5F503CCD80D12843F7C91D7597968C79D347B22556F2EF909061A18523CF3182019091E73C07767E9C77E8B0782CBCFA4FB2E03CC48F1BB8F4DF899166CEA2046FA236D2E5EF1EFEFA6C05CF6975B2643F421148C0A4E3873FBCF5A0CEDF48D8C0ABE6040DB1F0B81138EB9EDF34B34D835C41E7DA1FB84A6CC9B0B6A0B3BFE658E54EA2ADFF75A92084CD4</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 80 0B A7 18 BC 0E 7E A3 F5 90 50 67
0010 | F7 2A 95 64 D6 A3 85 6C 3E 35 03 4B 03 00 6E FB
0020 | C2 7F 6E EF 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 39 2E FB 02 FF 06 BE 54 1A E2 83 6D E1 C4 43 53
0040 | 0B 1C CE 63 5F F0 7D 98 17 B3 53 26 44 A0 CF 3C
0050 | 5F 4B D8 F8 C5 3F 40 E0 0A FE E4 1D 1C 47 8F 7A
0060 | 7A CD AA E1 60 1E 52 C4 2C 86 43 6A 81 6F 3A B3
0070 | 9D AC DB 60 AF 51 E0 4A 7E 9C 36 DD 8E F0 81 FA
0080 | 2E 6D FB CD 2F B2 4C 31 2B 02 A4 54 13 C5 D1 8A
0090 | 7E 1D 1B 6C 16 FF B5 82 D1 C1 D5 38 94 6C 82 69
00A0 | ED 1A E1 8A 5F CF BA E4 FC E2 D4 83 5D 80 AC C6
00B0 | 40 01 53 CE 43 C5 4F 3A 9A BA B6 5F 04 8E 86 61
00C0 | 47 6A B2 C4 FA D7 6B E6 B4 6B 40 7A 54 19 F9 2A
00D0 | 19 43 1D 09 BB 22 65 A3 13 5D C7 F4 1B F1 8D 88
00E0 | 50 29 97 A1 AD 3E 96 ED 53 3B BB 40 9A 9D 3A 51
00F0 | AE 17 FA 2B 7B FC 81 65 78 51 BC C4 E7 36 08 FB
0100 | FD F6 82 D0 88 93 46 8F DC 6D 12 47 D2 B5 EA FD
0110 | 91 A8 0D 96 B3 99 E2 B6 57 14 4A 8C 41 FC BF 0A
0120 | 9F F8 11 4E 24 3E BA 9D 15 32 5C 1D EE 32 97 E5</code></pre>
<pre><code>0000 | 54 B6 43 66 29 60 48 82 0D B2 4E 46 47 F1 10 A6
0010 | 10 5B 39 B4 24 08 8C FF 48 75 8D B6 2B 59 5F AD
0020 | 1C AB 00 50 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 55 60 6D 89 0D EF BA AC 50 F8 B8 33 A2 A8 C0 62
0040 | 93 76 65 22 57 25 AC 78 AB 34 75 6A 79 1D 1B 03
0050 | 68 DC 4F 3F 68 97 46 78 33 B9 7C AF C4 F0 D2 E8
0060 | 6E AD 45 83 0B 7F ED 34 A6 02 14 A7 50 6A 7B 39
0070 | 88 BA 07 0E B9 F3 1D 14 67 38 54 10 78 98 E7 3C
0080 | B0 17 46 E1 23 20 80 ED 82 C3 BA 29 32 5D B8 D6
0090 | 00 F2 46 C5 52 6B AA C6 2F 37 21 39 52 9F 7E 0A
00A0 | A0 71 C6 6E D5 F5 03 CC D8 0D 12 84 3F 7C 91 D7
00B0 | 59 79 68 C7 9D 34 7B 22 55 6F 2E F9 09 06 1A 18
00C0 | 52 3C F3 18 20 19 09 1E 73 C0 77 67 E9 C7 7E 8B
00D0 | 07 82 CB CF A4 FB 2E 03 CC 48 F1 BB 8F 4D F8 99
00E0 | 16 6C EA 20 46 FA 23 6D 2E 5E F1 EF EF A6 C0 5C
00F0 | F6 97 5B 26 43 F4 21 14 8C 0A 4E 38 73 FB CF 5A
0100 | 0C ED F4 8D 8C 0A BE 60 40 DB 1F 0B 81 13 8E B9
0110 | ED F3 4B 34 D8 35 C4 1E 7D A1 FB 84 A6 CC 9B 0B
0120 | 6A 0B 3B FE 65 8E 54 EA 2A DF F7 5A 92 08 4C D4</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 = BA0D89B5800BA718BC0E7EA3F5905067F72A9564D6A3856C3E35034B03006EFBC27F6EE
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>800BA718BC0E7EA3F5905067F72A9564</code></td>
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>D6A3856C3E35034B03006EFBC27F6EEF</code></td>
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE000100392EFB02FF06BE541AE2836D</code> <code>E1C443530B1CCE635FF07D9817B35326</code> <code>44A0CF3C5F4BD8F8C53F40E00AFEE41D</code> <code>1C478F7A7ACDAAE1601E52C42C86436A</code> <code>816F3AB39DACDB60AF51E04A7E9C36DD</code> <code>8EF081FA2E6DFBCD2FB24C312B02A454</code> <code>13C5D18A7E1D1B6C16FFB582D1C1D538</code> <code>946C8269ED1AE18A5FCFBAE4FCE2D483</code> <code>5D80ACC6400153CE43C54F3A9ABAB65F</code> <code>048E8661476AB2C4FAD76BE6B46B407A</code> <code>5419F92A19431D09BB2265A3135DC7F4</code> <code>1BF18D88502997A1AD3E96ED533BBB40</code> <code>9A9D3A51AE17FA2B7BFC81657851BCC4</code> <code>E73608FBFDF682D08893468FDC6D1247</code> <code>D2B5EAFD91A80D96B399E2B657144A8C</code> <code>41FCBF0A9FF8114E243EBA9D15325C1D</code><br> <code>EE3297E5</code></td>
<td><code>FE00010055606D890DEFBAAC50F8B833</code> <code>A2A8C062937665225725AC78AB34756A</code> <code>791D1B0368DC4F3F6897467833B97CAF</code> <code>C4F0D2E86EAD45830B7FED34A60214A7</code> <code>506A7B3988BA070EB9F31D1467385410</code> <code>7898E73CB01746E1232080ED82C3BA29</code> <code>325DB8D600F246C5526BAAC62F372139</code> <code>529F7E0AA071C66ED5F503CCD80D1284</code> <code>3F7C91D7597968C79D347B22556F2EF9</code> <code>09061A18523CF3182019091E73C07767</code> <code>E9C77E8B0782CBCFA4FB2E03CC48F1BB</code> <code>8F4DF899166CEA2046FA236D2E5EF1EF</code> <code>EFA6C05CF6975B2643F421148C0A4E38</code> <code>73FBCF5A0CEDF48D8C0ABE6040DB1F0B</code> <code>81138EB9EDF34B34D835C41E7DA1FB84</code> <code>A6CC9B0B6A0B3BFE658E54EA2ADFF75A</code><br> <code>92084CD4</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 = BA0D89B5800BA718BC0E7EA3F5905067F72A9564D6A3856C3E35034B03006EFBC27F6EE
<!-- 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 = 54B64366800BA718BC0E7EA3F5905067F72A9564D6A3856C3E35034B03006EFBC27F6EEF0000000000000000FE000100392EFB02FF06BE541AE2836DE1C443530B1CCE635FF07D9817B3532644A0CF3C5F4BD8F8C53F40E00AFEE41D1C478F7A7ACDAAE1601E52C42C86436A816F3AB39DACDB60AF51E04A7E9C36DD8EF081FA2E6DFBCD2FB24C312B02A45413C5D18A7E1D1B6C16FFB582D1C1D538946C8269ED1AE18A5FCFBAE4FCE2D4835D80ACC6400153CE43C54F3A9ABAB65F048E8661476AB2C4FAD76BE6B46B407A5419F92A19431D09BB2265A3135DC7F41BF18D88502997A1AD3E96ED533BBB409A9D3A51AE17FA2B7BFC81657851BCC4E73608FBFDF682D08893468FDC6D1247D2B5EAFD91A80D96B399E2B657144A8C41FCBF0A9FF8114E243EBA9D15325C1DEE3297E5
padding = 8B75401CCCD9C0690F4B6A62
tmp_aes_key = 1694A711A6114B6BBABB94EE9CD3EE5351BD3878EBB313CE8AC4738062E9AD92
tmp_aes_iv = BED33E660AAB7A16C00377B33A6054E28E405B895CA9CF3DE96DDAA610CA08B0</code></pre>
<pre><code>data = 54B64366296048820DB24E4647F110A6105B39B424088CFF48758DB62B595FAD1CAB00500000000000000000FE00010055606D890DEFBAAC50F8B833A2A8C062937665225725AC78AB34756A791D1B0368DC4F3F6897467833B97CAFC4F0D2E86EAD45830B7FED34A60214A7506A7B3988BA070EB9F31D14673854107898E73CB01746E1232080ED82C3BA29325DB8D600F246C5526BAAC62F372139529F7E0AA071C66ED5F503CCD80D12843F7C91D7597968C79D347B22556F2EF909061A18523CF3182019091E73C07767E9C77E8B0782CBCFA4FB2E03CC48F1BB8F4DF899166CEA2046FA236D2E5EF1EFEFA6C05CF6975B2643F421148C0A4E3873FBCF5A0CEDF48D8C0ABE6040DB1F0B81138EB9EDF34B34D835C41E7DA1FB84A6CC9B0B6A0B3BFE658E54EA2ADFF75A92084CD4
padding = 93FC4482E1118552DF6F273E
tmp_aes_key = C5613909EE08C44A27355DFCF68FF1243C3E1D20B77947F0969612672EEE9EFB
tmp_aes_iv = F0D575BA184616046E8D221A48CAD8E797752CC09923299FF8F150548FA51EFA</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 = E57862B64D90687CBB358497FB42F308A5D004CBD9295103399DB4696CD5E6DBDF33284F40DEBAD95C7DD617FABD0C32BD7AA1F4D449CD3E4B2E8E89D652ACF81E112D881895DB37D5ECB74947A35C01DBCB77FB64A6790609FB752222D31179DC00A86308CD2AC55BC9695CA162039BA9D385A018063E6A70463F1B93DA6A8A06022ECF2395A763F909E86D921E40679300565703022F9E0FFEE1A5CE7D2EFC4E4562B734E6C22E8B16DF2C069BB6EA1BFD32DC93B9B15AB56A7B6026CF90653FEFA6720188CFD1F3F260EE2368997E237C406CFD06DD092C362A3D894D6DA33FCBFD60DAD3B6F2786869A89818553D48D6774588E3F1757363818165BE1E4A0FF1D2464D1A888D816916545D085951A540C8C50B61A7E7348728ED0DEA79EEF367E362D2A7DDB961F85B4A12424115BC394D8E3BC7E8B2AA3349D9C4AD2280823A1A3FE26D34548370865DC5B1497B</code></pre>
<pre><code>encrypted_data = 141F0B1A399FB3A198545F2D1DBCFC16DEE1DF9A1406B5F17437F244390F93E6B5C47ABDD57571DC136DF6DB9A1A0C3C0B9DD0BCF525DD214F0469A7913D1CDE62286AD1CAF6F8BA297FDF60743B8EFEE1CEB930950D2CF2C9FC9BDD3DAD1BF46912B0B07597416CF0828B57FF517CA350B13836C0F52A3FB6447A1D5E3034F516AB3B15B3EE63DE2B8AE602678BCB6F9F00354774EA04F7EEDDC65108CB20EE1C85806BFDC4703EDCB8FC5F751969BEAC84BA81F7D065230DCE443760058C6553B4885DF7DAAD3887FFE8AB451F511CF4401D7C6A2184D173622E844788A47DCDF1B2EFD09997D0E390A4836BFBCB05F471891384EC1EF4AC6B736A3EB4F3682B96D389D0776AA4EB161F4AC8F8F5CE01BA74F15F44D010E6435A929C2B79E4583552A0915739FAC9986B2B73CF8A2DDE752D1FA3453D2668B70AA831A2F2F31A70EE05CF31D5D53D4201F25FA12020</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 F4 CF 0E 00 90 2E C5 65
0010 | 78 01 00 00 1F 5F 04 F5 80 0B A7 18 BC 0E 7E A3
0020 | F5 90 50 67 F7 2A 95 64 D6 A3 85 6C 3E 35 03 4B
0030 | 03 00 6E FB C2 7F 6E EF FE 50 01 00 E5 78 62 B6
0040 | 4D 90 68 7C BB 35 84 97 FB 42 F3 08 A5 D0 04 CB
0050 | D9 29 51 03 39 9D B4 69 6C D5 E6 DB DF 33 28 4F
0060 | 40 DE BA D9 5C 7D D6 17 FA BD 0C 32 BD 7A A1 F4
0070 | D4 49 CD 3E 4B 2E 8E 89 D6 52 AC F8 1E 11 2D 88
0080 | 18 95 DB 37 D5 EC B7 49 47 A3 5C 01 DB CB 77 FB
0090 | 64 A6 79 06 09 FB 75 22 22 D3 11 79 DC 00 A8 63
00A0 | 08 CD 2A C5 5B C9 69 5C A1 62 03 9B A9 D3 85 A0
00B0 | 18 06 3E 6A 70 46 3F 1B 93 DA 6A 8A 06 02 2E CF
00C0 | 23 95 A7 63 F9 09 E8 6D 92 1E 40 67 93 00 56 57
00D0 | 03 02 2F 9E 0F FE E1 A5 CE 7D 2E FC 4E 45 62 B7
00E0 | 34 E6 C2 2E 8B 16 DF 2C 06 9B B6 EA 1B FD 32 DC
00F0 | 93 B9 B1 5A B5 6A 7B 60 26 CF 90 65 3F EF A6 72
0100 | 01 88 CF D1 F3 F2 60 EE 23 68 99 7E 23 7C 40 6C
0110 | FD 06 DD 09 2C 36 2A 3D 89 4D 6D A3 3F CB FD 60
0120 | DA D3 B6 F2 78 68 69 A8 98 18 55 3D 48 D6 77 45
0130 | 88 E3 F1 75 73 63 81 81 65 BE 1E 4A 0F F1 D2 46
0140 | 4D 1A 88 8D 81 69 16 54 5D 08 59 51 A5 40 C8 C5
0150 | 0B 61 A7 E7 34 87 28 ED 0D EA 79 EE F3 67 E3 62
0160 | D2 A7 DD B9 61 F8 5B 4A 12 42 41 15 BC 39 4D 8E
0170 | 3B C7 E8 B2 AA 33 49 D9 C4 AD 22 80 82 3A 1A 3F
0180 | E2 6D 34 54 83 70 86 5D C5 B1 49 7B</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 60 7C 03 00 FD 35 C5 65
0010 | 78 01 00 00 1F 5F 04 F5 29 60 48 82 0D B2 4E 46
0020 | 47 F1 10 A6 10 5B 39 B4 24 08 8C FF 48 75 8D B6
0030 | 2B 59 5F AD 1C AB 00 50 FE 50 01 00 14 1F 0B 1A
0040 | 39 9F B3 A1 98 54 5F 2D 1D BC FC 16 DE E1 DF 9A
0050 | 14 06 B5 F1 74 37 F2 44 39 0F 93 E6 B5 C4 7A BD
0060 | D5 75 71 DC 13 6D F6 DB 9A 1A 0C 3C 0B 9D D0 BC
0070 | F5 25 DD 21 4F 04 69 A7 91 3D 1C DE 62 28 6A D1
0080 | CA F6 F8 BA 29 7F DF 60 74 3B 8E FE E1 CE B9 30
0090 | 95 0D 2C F2 C9 FC 9B DD 3D AD 1B F4 69 12 B0 B0
00A0 | 75 97 41 6C F0 82 8B 57 FF 51 7C A3 50 B1 38 36
00B0 | C0 F5 2A 3F B6 44 7A 1D 5E 30 34 F5 16 AB 3B 15
00C0 | B3 EE 63 DE 2B 8A E6 02 67 8B CB 6F 9F 00 35 47
00D0 | 74 EA 04 F7 EE DD C6 51 08 CB 20 EE 1C 85 80 6B
00E0 | FD C4 70 3E DC B8 FC 5F 75 19 69 BE AC 84 BA 81
00F0 | F7 D0 65 23 0D CE 44 37 60 05 8C 65 53 B4 88 5D
0100 | F7 DA AD 38 87 FF E8 AB 45 1F 51 1C F4 40 1D 7C
0110 | 6A 21 84 D1 73 62 2E 84 47 88 A4 7D CD F1 B2 EF
0120 | D0 99 97 D0 E3 90 A4 83 6B FB CB 05 F4 71 89 13
0130 | 84 EC 1E F4 AC 6B 73 6A 3E B4 F3 68 2B 96 D3 89
0140 | D0 77 6A A4 EB 16 1F 4A C8 F8 F5 CE 01 BA 74 F1
0150 | 5F 44 D0 10 E6 43 5A 92 9C 2B 79 E4 58 35 52 A0
0160 | 91 57 39 FA C9 98 6B 2B 73 CF 8A 2D DE 75 2D 1F
0170 | A3 45 3D 26 68 B7 0A A8 31 A2 F2 F3 1A 70 EE 05
0180 | CF 31 D5 D5 3D 42 01 F2 5F A1 20 20</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>F4CF0E00902EC565</code></td>
<td><code>607C0300FD35C565</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>800BA718BC0E7EA3F5905067F72A9564</code></td>
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>D6A3856C3E35034B03006EFBC27F6EEF</code></td>
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100E57862B64D90687CBB358497</code> <code>FB42F308A5D004CBD9295103399DB469</code> <code>6CD5E6DBDF33284F40DEBAD95C7DD617</code> <code>FABD0C32BD7AA1F4D449CD3E4B2E8E89</code> <code>D652ACF81E112D881895DB37D5ECB749</code> <code>47A35C01DBCB77FB64A6790609FB7522</code> <code>22D31179DC00A86308CD2AC55BC9695C</code> <code>A162039BA9D385A018063E6A70463F1B</code> <code>93DA6A8A06022ECF2395A763F909E86D</code> <code>921E40679300565703022F9E0FFEE1A5</code> <code>CE7D2EFC4E4562B734E6C22E8B16DF2C</code> <code>069BB6EA1BFD32DC93B9B15AB56A7B60</code> <code>26CF90653FEFA6720188CFD1F3F260EE</code> <code>2368997E237C406CFD06DD092C362A3D</code> <code>894D6DA33FCBFD60DAD3B6F2786869A8</code> <code>9818553D48D6774588E3F17573638181</code> <code>65BE1E4A0FF1D2464D1A888D81691654</code> <code>5D085951A540C8C50B61A7E7348728ED</code> <code>0DEA79EEF367E362D2A7DDB961F85B4A</code> <code>12424115BC394D8E3BC7E8B2AA3349D9</code> <code>C4AD2280823A1A3FE26D34548370865D</code><br> <code>C5B1497B</code></td>
<td><code>FE500100141F0B1A399FB3A198545F2D</code> <code>1DBCFC16DEE1DF9A1406B5F17437F244</code> <code>390F93E6B5C47ABDD57571DC136DF6DB</code> <code>9A1A0C3C0B9DD0BCF525DD214F0469A7</code> <code>913D1CDE62286AD1CAF6F8BA297FDF60</code> <code>743B8EFEE1CEB930950D2CF2C9FC9BDD</code> <code>3DAD1BF46912B0B07597416CF0828B57</code> <code>FF517CA350B13836C0F52A3FB6447A1D</code> <code>5E3034F516AB3B15B3EE63DE2B8AE602</code> <code>678BCB6F9F00354774EA04F7EEDDC651</code> <code>08CB20EE1C85806BFDC4703EDCB8FC5F</code> <code>751969BEAC84BA81F7D065230DCE4437</code> <code>60058C6553B4885DF7DAAD3887FFE8AB</code> <code>451F511CF4401D7C6A2184D173622E84</code> <code>4788A47DCDF1B2EFD09997D0E390A483</code> <code>6BFBCB05F471891384EC1EF4AC6B736A</code> <code>3EB4F3682B96D389D0776AA4EB161F4A</code> <code>C8F8F5CE01BA74F15F44D010E6435A92</code> <code>9C2B79E4583552A0915739FAC9986B2B</code> <code>73CF8A2DDE752D1FA3453D2668B70AA8</code> <code>31A2F2F31A70EE05CF31D5D53D4201F2</code><br> <code>5FA12020</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 = 9AE6221027C2C63E4D6BBD1177C871115C9987F930120E68EE84E0DAD8FB56C13F5B0A8F2C60B534C9B3B3C67F75575EB40C6A5376AE4C234C4EFA71418CE1B2274C517321EEB5C78ED585B905C14ED119E3D5A3CF34F01F46078C4DB59227FE8E57D432AB20C830FE457EBA0412CBDAC0A5E665A77DC1244DFE2C0170B39446A1E9397F167305863CE52196F700FA0DE185C642D0CDB866EFA132C29025DB627BE5CCA9A1923A781E4F808CB3B7667505BDFF5D52DDB32623D03ABEE9BF849FDD94D34472EC3DF256711754CECF5F5EDD98D9321F3E5A39BC56119563B275A404B4E82EBE670AE52F0A092C9CFD72664263E938AF03DD1CC42F4A44A8A34400</code></pre>
<pre><code>auth_key = 74C9D850B2549A5CA6448C0A91C4183C8CD36918D190B13DBA703EA4996FFF5C13B830407392C9EDA472CB06786C31198B8A479D790A9D00B1877E217C7A9EE48E53F307663EF113C22BC5A05D64631C7E5557251C160D30F45F15E9125C4296CE819A038A712271A622EF3AAAC7441FDE6AACF628EEF5C1EE1190899032F8C3713114FEE0161D5DDDCF6E109D1C9A1B0F8EFC64789D597AC5FD5D6601381AEE2080106F409D2BBB5B40155509E5D468B14C554B893DEA28BBA1246147274D386AE223EC56679922C89646AA28E00B4C9975B65B0BC23C6DFCF86AC3188ADEB84B1E11CB7AE33F4E46A5AB73710B9795F936D0C2580CE20472EC213BF77FC204</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 94 68 83 91 2E C5 65
0010 | 94 00 00 00 34 F7 CB 3B 80 0B A7 18 BC 0E 7E A3
0020 | F5 90 50 67 F7 2A 95 64 D6 A3 85 6C 3E 35 03 4B
0030 | 03 00 6E FB C2 7F 6E EF 43 29 74 8B 0C 4D F3 30
0040 | C6 05 E9 BF A2 14 2E A6</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 08 2B 9B FD 35 C5 65
0010 | 38 00 00 00 34 F7 CB 3B 29 60 48 82 0D B2 4E 46
0020 | 47 F1 10 A6 10 5B 39 B4 24 08 8C FF 48 75 8D B6
0030 | 2B 59 5F AD 1C AB 00 50 6C 57 D0 BA 1C 2B 32 31
0040 | EC 49 28 D5 42 23 EB 9F</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>01946883912EC565</code></td>
<td><code>01082B9BFD35C565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>94000000</code> (148 in decimal)</td>
<td><code>38000000</code> (56 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>800BA718BC0E7EA3F5905067F72A9564</code></td>
<td><code>296048820DB24E4647F110A6105B39B4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>D6A3856C3E35034B03006EFBC27F6EEF</code></td>
<td><code>24088CFF48758DB62B595FAD1CAB0050</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>4329748B0C4DF330C605E9BFA2142EA6</code></td>
<td><code>6C57D0BA1C2B3231EC4928D54223EB9F</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>