Update content of files

This commit is contained in:
GitHub Action 2023-12-03 20:56:31 +00:00
parent 27e52cf1f2
commit 6970767ce9
5 changed files with 218 additions and 210 deletions

View file

@ -112,7 +112,7 @@
<h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>
<p>Telegram allows creating forums with multiple distinct topics.</p>
<h4><a class="anchor" href="#messagessearch" id="messagessearch" name="messagessearch"><i class="anchor-icon"></i></a><a href="/method/messages.search">messages.search</a></h4>
<p>Returns found messages</p></div>
<p>Search for messages.</p></div>
</div>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>messages.search</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Returns found messages">
<meta property="description" content="Search for messages.">
<meta property="og:title" content="messages.search">
<meta property="og:image" content="">
<meta property="og:description" content="Returns found messages">
<meta property="og:description" content="Search for messages.">
<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">
@ -220,6 +220,10 @@
<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="#inputpeerempty" id="inputpeerempty" name="inputpeerempty"><i class="anchor-icon"></i></a><a href="/constructor/inputPeerEmpty">inputPeerEmpty</a></h4>
<p>An empty constructor, no user or chat is defined.</p>
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>
<p>How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.</p>
<h4><a class="anchor" href="#messagessearchglobal" id="messagessearchglobal" name="messagessearchglobal"><i class="anchor-icon"></i></a><a href="/method/messages.searchGlobal">messages.searchGlobal</a></h4>
<p>Search for messages and peers globally</p>
<h4><a class="anchor" href="#threads" id="threads" name="threads"><i class="anchor-icon"></i></a><a href="/api/threads">Threads</a></h4>
<p>Telegram allows commenting on a channel post or on a generic supergroup message, thanks to message threads.</p>
<h4><a class="anchor" href="#pagination-in-the-api" id="pagination-in-the-api" name="pagination-in-the-api"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination in the API</a></h4>

View file

@ -2491,7 +2491,7 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
<tr>
<td><a href="/method/messages.search">messages.search</a></td>
<td>Returns found messages</td>
<td>Search for messages.</td>
</tr>
<tr>
<td><a href="/method/messages.getSearchResultsCalendar">messages.getSearchResultsCalendar</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 04 46 03 00 28 9B 6C 65
0010 | 14 00 00 00 F1 8E 7E BE B0 69 7A FD F7 E5 50 64
0020 | 0E A2 6A DB 92 59 0D E2</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 98 37 0B 00 07 EB 6C 65
0010 | 14 00 00 00 F1 8E 7E BE 2B 61 E8 CE 46 92 30 D3
0020 | F0 2E B0 DD 8B 34 7C 7A</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>04460300289B6C65</code></td>
<td><code>98370B0007EB6C65</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>B0697AFDF7E550640EA26ADB92590DE2</code></td>
<td><code>2B61E8CE469230D3F02EB0DD8B347C7A</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 E4 1F 0C 29 9B 6C 65
0010 | 8C 00 00 00 63 24 16 05 B0 69 7A FD F7 E5 50 64
0020 | 0E A2 6A DB 92 59 0D E2 FE AC 66 0A F9 82 4B 19
0030 | 0F 2A B1 7D A0 85 CE 8B 08 1D 6A 19 CB 72 22 7D
0040 | 65 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 48 CB 4A 07 EB 6C 65
0010 | C4 00 00 00 63 24 16 05 2B 61 E8 CE 46 92 30 D3
0020 | F0 2E B0 DD 8B 34 7C 7A 0B 13 97 9C AF 03 8B 9C
0030 | B1 CF FB 2E 5A 4C 90 B1 08 1B 02 0A 05 F2 85 48
0040 | 2D 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>01E41F0C299B6C65</code></td>
<td><code>0148CB4A07EB6C65</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>8C000000</code> (140 in decimal)</td>
<td><code>C4000000</code> (196 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>B0697AFDF7E550640EA26ADB92590DE2</code></td>
<td><code>2B61E8CE469230D3F02EB0DD8B347C7A</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>FEAC660AF9824B190F2AB17DA085CE8B</code></td>
<td><code>0B13979CAF038B9CB1CFFB2E5A4C90B1</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>081D6A19CB72227D65000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2119534936215158117</td>
<td><code>081B020A05F285482D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1946129009637410861</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 = 2119534936215158117</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2119534936215158117 = 1270235411 * 1668615847</code></p>
<pre><code>p = 1270235411
q = 1668615847</code></pre>
<pre><code>pq = 1946129009637410861</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1946129009637410861 = 1037997977 * 1874887093</code></p>
<pre><code>p = 1037997977
q = 1874887093</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 1D 6A 19 CB 72 22 7D 65 00 00 00
0010 | 04 4B B6 41 13 00 00 00 04 63 75 0E A7 00 00 00
0020 | B0 69 7A FD F7 E5 50 64 0E A2 6A DB 92 59 0D E2
0030 | FE AC 66 0A F9 82 4B 19 0F 2A B1 7D A0 85 CE 8B
0040 | C9 6C B7 3B 8E B7 D5 00 DF 50 C1 FB F6 11 A5 46
0050 | 0F 4B D9 A6 4C E6 91 8E 37 FC 77 0C 7F D4 B1 D3
<pre><code>0000 | 95 5F F5 A9 08 1B 02 0A 05 F2 85 48 2D 00 00 00
0010 | 04 3D DE 97 99 00 00 00 04 6F C0 81 B5 00 00 00
0020 | 2B 61 E8 CE 46 92 30 D3 F0 2E B0 DD 8B 34 7C 7A
0030 | 0B 13 97 9C AF 03 8B 9C B1 CF FB 2E 5A 4C 90 B1
0040 | 16 40 1E E2 AC E9 2F A4 AE 0E E0 BC EE EF FB 29
0050 | 69 3D CD 74 E7 07 FE 6F 97 33 4E 2C A1 6F 15 64
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 = 1668615847</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>081D6A19CB72227D65000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2119534936215158117</td>
<td><code>081B020A05F285482D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1946129009637410861</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>044BB64113000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1270235411</td>
<td><code>043DDE9799000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1037997977</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>0463750EA7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1668615847</td>
<td><code>046FC081B5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1874887093</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>B0697AFDF7E550640EA26ADB92590DE2</code></td>
<td><code>2B61E8CE469230D3F02EB0DD8B347C7A</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>FEAC660AF9824B190F2AB17DA085CE8B</code></td>
<td><code>0B13979CAF038B9CB1CFFB2E5A4C90B1</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>C96CB73B8EB7D500DF50C1FBF611A546</code> <code>0F4BD9A64CE6918E37FC770C7FD4B1D3</code></td>
<td><code>16401EE2ACE92FA4AE0EE0BCEEEFFB29</code> <code>693DCD74E707FE6F97334E2CA16F1564</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1668615847</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 = 955FF5A9081D6A19CB72227D65000000044BB641130000000463750EA7000000B0697AFDF7E550640EA26ADB92590DE2FEAC660AF9824B190F2AB17DA085CE8BC96CB73B8EB7D500DF50C1FBF611A5460F4BD9A64CE6918E37FC770C7FD4B1D302000000
random_padding_bytes = B8F5B0C105FF2BF073B6C18AC3401F4F4576029E2DB1738EB5D5C5E244397C3568C4E5958747D7F88A32EE625B17E6C469D8BCB5485D5FBCC871AA9BE9CF77A613960B7940BF9F6C823EBF4D3569CF243F3C445E1C2CC27B75DD6063</code></pre>
<pre><code>data = 955FF5A9081B020A05F285482D000000043DDE9799000000046FC081B50000002B61E8CE469230D3F02EB0DD8B347C7A0B13979CAF038B9CB1CFFB2E5A4C90B116401EE2ACE92FA4AE0EE0BCEEEFFB29693DCD74E707FE6F97334E2CA16F156402000000
random_padding_bytes = 038B6B72765B208DFB7DD5D30A19AC5B73DBBA1920AA200A4B1987D2248993E1A8DCABFF33C447069EA746881CC901111E6C8DDF5E102C734C35F3D9A7E512D98CB7BF509C07DBA2DF796C8554D58513AFF799E58260D6D47334B6C7</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 = E860B93D4388D29FEE6F4A6A3FD9C40FF5D1AEE7A7C6F34FFDAAC5074CB2C40DF66A4EAADBE7A5F9507092103285799B5DB0D22DC49CEF81573E06AB5C3A22C6512A55C6451426643C2CA784B3B1F5F54DEB82A908B76C7B69C7CFC685EC9806F2B74FC0A8EBE2BF6134A3000BE438AADB7E8AF0222C164FE10777475A536D1DBFFB1F442765D860FDFEA1DF48FB3707FA1D49DADFDBCDC1FE2CC4024DE0CA09F6A0F72B85E658A2471B551B53ECE9A844AB2933397E331033B90FF8DBB808D53977F29785D855CEF4A53EE6DE4ED8C87255E3D46E2E7865555B9DCDC025DC35CFF85B91189AFF56150E53A4F5EB4C640C10B0CC5625163E07F89B4E78FCC704</code></pre>
<pre><code>encrypted_data = 7C7116856E39AEE23DA81918C4964BFEDB3446BB7225CB18068BCAEFFB302AE8D231A4AED8E27893126979F9A667AABB485D5BCFFA4EB8A4DB98E623F513E88AD39FD7A10C5317BB73F43C12926A7B7589B076BBC3BB6EEC22622C68C2DBDA42806A7CB1295DACD847F50D455C417FD37298907D8805AFA4961347ADD77A6B1A118E78C6A721B2BC15EEABB498EB44838FE64839E075CFB822C597F6DB17B82967AAB3379906AB78BEC7B0BDA340479186E3BB6516E781E216954CF4B856247256DA25B6EF332D86C682A841694B05FAB3DFB8DFB766AE7A06D996BBB7DCB56659D13F67D22221EA37502ECC98AF03AF55D20530D2DB5BBB3476CBA3FD0F3C8E</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 B0 3A 0A 00 29 9B 6C 65
0010 | 40 01 00 00 BE E4 12 D7 B0 69 7A FD F7 E5 50 64
0020 | 0E A2 6A DB 92 59 0D E2 FE AC 66 0A F9 82 4B 19
0030 | 0F 2A B1 7D A0 85 CE 8B 04 4B B6 41 13 00 00 00
0040 | 04 63 75 0E A7 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 E8 60 B9 3D 43 88 D2 9F EE 6F 4A 6A
0060 | 3F D9 C4 0F F5 D1 AE E7 A7 C6 F3 4F FD AA C5 07
0070 | 4C B2 C4 0D F6 6A 4E AA DB E7 A5 F9 50 70 92 10
0080 | 32 85 79 9B 5D B0 D2 2D C4 9C EF 81 57 3E 06 AB
0090 | 5C 3A 22 C6 51 2A 55 C6 45 14 26 64 3C 2C A7 84
00A0 | B3 B1 F5 F5 4D EB 82 A9 08 B7 6C 7B 69 C7 CF C6
00B0 | 85 EC 98 06 F2 B7 4F C0 A8 EB E2 BF 61 34 A3 00
00C0 | 0B E4 38 AA DB 7E 8A F0 22 2C 16 4F E1 07 77 47
00D0 | 5A 53 6D 1D BF FB 1F 44 27 65 D8 60 FD FE A1 DF
00E0 | 48 FB 37 07 FA 1D 49 DA DF DB CD C1 FE 2C C4 02
00F0 | 4D E0 CA 09 F6 A0 F7 2B 85 E6 58 A2 47 1B 55 1B
0100 | 53 EC E9 A8 44 AB 29 33 39 7E 33 10 33 B9 0F F8
0110 | DB B8 08 D5 39 77 F2 97 85 D8 55 CE F4 A5 3E E6
0120 | DE 4E D8 C8 72 55 E3 D4 6E 2E 78 65 55 5B 9D CD
0130 | C0 25 DC 35 CF F8 5B 91 18 9A FF 56 15 0E 53 A4
0140 | F5 EB 4C 64 0C 10 B0 CC 56 25 16 3E 07 F8 9B 4E
0150 | 78 FC C7 04</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 9C EB 0D 00 07 EB 6C 65
0010 | 40 01 00 00 BE E4 12 D7 2B 61 E8 CE 46 92 30 D3
0020 | F0 2E B0 DD 8B 34 7C 7A 0B 13 97 9C AF 03 8B 9C
0030 | B1 CF FB 2E 5A 4C 90 B1 04 3D DE 97 99 00 00 00
0040 | 04 6F C0 81 B5 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 7C 71 16 85 6E 39 AE E2 3D A8 19 18
0060 | C4 96 4B FE DB 34 46 BB 72 25 CB 18 06 8B CA EF
0070 | FB 30 2A E8 D2 31 A4 AE D8 E2 78 93 12 69 79 F9
0080 | A6 67 AA BB 48 5D 5B CF FA 4E B8 A4 DB 98 E6 23
0090 | F5 13 E8 8A D3 9F D7 A1 0C 53 17 BB 73 F4 3C 12
00A0 | 92 6A 7B 75 89 B0 76 BB C3 BB 6E EC 22 62 2C 68
00B0 | C2 DB DA 42 80 6A 7C B1 29 5D AC D8 47 F5 0D 45
00C0 | 5C 41 7F D3 72 98 90 7D 88 05 AF A4 96 13 47 AD
00D0 | D7 7A 6B 1A 11 8E 78 C6 A7 21 B2 BC 15 EE AB B4
00E0 | 98 EB 44 83 8F E6 48 39 E0 75 CF B8 22 C5 97 F6
00F0 | DB 17 B8 29 67 AA B3 37 99 06 AB 78 BE C7 B0 BD
0100 | A3 40 47 91 86 E3 BB 65 16 E7 81 E2 16 95 4C F4
0110 | B8 56 24 72 56 DA 25 B6 EF 33 2D 86 C6 82 A8 41
0120 | 69 4B 05 FA B3 DF B8 DF B7 66 AE 7A 06 D9 96 BB
0130 | B7 DC B5 66 59 D1 3F 67 D2 22 21 EA 37 50 2E CC
0140 | 98 AF 03 AF 55 D2 05 30 D2 DB 5B BB 34 76 CB A3
0150 | FD 0F 3C 8E</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 = B8F5B0C105FF2BF073B6C18AC3401F4F4576029E2DB1738EB5D5C5E24
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>B03A0A00299B6C65</code></td>
<td><code>9CEB0D0007EB6C65</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 = B8F5B0C105FF2BF073B6C18AC3401F4F4576029E2DB1738EB5D5C5E24
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>B0697AFDF7E550640EA26ADB92590DE2</code></td>
<td><code>2B61E8CE469230D3F02EB0DD8B347C7A</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>FEAC660AF9824B190F2AB17DA085CE8B</code></td>
<td><code>0B13979CAF038B9CB1CFFB2E5A4C90B1</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>044BB64113000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1270235411</td>
<td><code>043DDE9799000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1037997977</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>0463750EA7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1668615847</td>
<td><code>046FC081B5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1874887093</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 = B8F5B0C105FF2BF073B6C18AC3401F4F4576029E2DB1738EB5D5C5E24
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE000100E860B93D4388D29FEE6F4A6A</code> <code>3FD9C40FF5D1AEE7A7C6F34FFDAAC507</code> <code>4CB2C40DF66A4EAADBE7A5F950709210</code> <code>3285799B5DB0D22DC49CEF81573E06AB</code> <code>5C3A22C6512A55C6451426643C2CA784</code> <code>B3B1F5F54DEB82A908B76C7B69C7CFC6</code> <code>85EC9806F2B74FC0A8EBE2BF6134A300</code> <code>0BE438AADB7E8AF0222C164FE1077747</code> <code>5A536D1DBFFB1F442765D860FDFEA1DF</code> <code>48FB3707FA1D49DADFDBCDC1FE2CC402</code> <code>4DE0CA09F6A0F72B85E658A2471B551B</code> <code>53ECE9A844AB2933397E331033B90FF8</code> <code>DBB808D53977F29785D855CEF4A53EE6</code> <code>DE4ED8C87255E3D46E2E7865555B9DCD</code> <code>C025DC35CFF85B91189AFF56150E53A4</code> <code>F5EB4C640C10B0CC5625163E07F89B4E</code><br> <code>78FCC704</code></td>
<td><code>FE0001007C7116856E39AEE23DA81918</code> <code>C4964BFEDB3446BB7225CB18068BCAEF</code> <code>FB302AE8D231A4AED8E27893126979F9</code> <code>A667AABB485D5BCFFA4EB8A4DB98E623</code> <code>F513E88AD39FD7A10C5317BB73F43C12</code> <code>926A7B7589B076BBC3BB6EEC22622C68</code> <code>C2DBDA42806A7CB1295DACD847F50D45</code> <code>5C417FD37298907D8805AFA4961347AD</code> <code>D77A6B1A118E78C6A721B2BC15EEABB4</code> <code>98EB44838FE64839E075CFB822C597F6</code> <code>DB17B82967AAB3379906AB78BEC7B0BD</code> <code>A340479186E3BB6516E781E216954CF4</code> <code>B856247256DA25B6EF332D86C682A841</code> <code>694B05FAB3DFB8DFB766AE7A06D996BB</code> <code>B7DCB56659D13F67D22221EA37502ECC</code> <code>98AF03AF55D20530D2DB5BBB3476CBA3</code><br> <code>FD0F3C8E</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = B8F5B0C105FF2BF073B6C18AC3401F4F4576029E2DB1738EB5D5C5E24
<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 94 D1 CA 29 9B 6C 65
0010 | EC 02 00 00 5C 07 E8 D0 B0 69 7A FD F7 E5 50 64
0020 | 0E A2 6A DB 92 59 0D E2 FE AC 66 0A F9 82 4B 19
0030 | 0F 2A B1 7D A0 85 CE 8B FE 50 02 00 C3 9E E2 09
0040 | EC 80 96 71 0D 35 2E 3B BE 1D 4B 26 12 41 CA 3F
0050 | 83 F6 C5 ED 1E 42 72 13 DB C9 30 C4 15 0E 73 A1
0060 | 18 5D F1 A2 5B 99 88 1C 8A 3C 2A 5E 12 0A B1 4E
0070 | 51 05 C4 C2 41 4F D6 BD 25 79 89 25 D0 A4 62 18
0080 | 67 6F B6 0A 19 89 CF F8 9C AC 9B 20 61 BE 4B 68
0090 | CD E5 9B 0B CA 81 B4 47 75 B3 DE 66 A3 E3 05 AA
00A0 | B9 06 AF 0E 5D 4D C0 06 F1 60 97 6E 21 45 43 E4
00B0 | 78 EF A9 E9 1D 19 C3 AF FC FB 96 B1 DA E5 FE 18
00C0 | AA ED 6F A3 96 E3 CE 63 63 42 83 EB 6E 61 90 66
00D0 | A3 36 F3 F0 5D 4A 4F 95 37 01 53 31 4F F1 CC 0D
00E0 | 5C 8E 7C FC 25 A9 22 F1 17 50 BD FA 60 50 1A B7
00F0 | 0C 74 D0 C7 3D 13 10 33 74 2E 85 E8 9C EF 90 93
0100 | 76 08 52 84 47 A8 A4 07 33 B9 3C D6 7C B3 FF A7
0110 | C2 EE 74 29 6A 07 83 5E 16 07 27 80 AA E5 D3 E2
0120 | 71 86 63 7C 7B 34 EB 97 43 2A A2 C8 98 0F 79 8C
0130 | 1B C6 E5 BB B6 D6 F6 E0 CB A7 35 E7 7A 56 55 A3
0140 | E4 55 22 A0 2B BC 29 F1 89 3C 53 7D B1 FC 3E E8
0150 | A0 FD 9B 89 F6 F7 96 ED 6B B8 90 BE 2E E4 00 CB
0160 | 02 86 69 90 B9 E4 3B AB 90 18 F9 B1 5C F3 AF BC
0170 | 06 FD FB 82 3E 9A AD 0C B4 9C F4 E1 D0 C6 DD 39
0180 | DE 93 25 A4 2B 5B D0 6E 7C 76 BC 16 F6 52 53 D1
0190 | F7 24 6C E7 BE 1B D4 62 AD B2 7B A8 B0 2B 35 8C
01A0 | 22 6C 84 DA 56 2A E0 56 13 92 02 61 F3 7C 77 1B
01B0 | 89 F1 A1 B0 37 8C 4D 6D CE 71 A5 7E 25 80 39 43
01C0 | 6F AF D7 FD 88 78 69 C7 37 D0 5E 9B FC 8D 95 A0
01D0 | A8 63 3E 48 A6 39 08 A6 BD F4 E5 FC 12 B4 07 75
01E0 | C8 40 CD CF 26 EE 68 44 AF 13 A4 E3 4C 53 9E F3
01F0 | A6 15 D0 A7 38 1C 40 B0 03 E2 B1 8C 6D 27 DD 4F
0200 | A5 87 64 27 4C DF 2F D5 26 FF 51 92 F7 0B D8 4D
0210 | E9 B5 21 4C 07 31 06 30 EE 10 0B 5A 77 F2 6B F1
0220 | B3 EA 3C 01 A5 11 33 79 91 B6 05 E6 71 7D A5 AB
0230 | 0F E6 60 35 C1 18 D4 E1 05 46 F6 0E 30 17 B0 28
0240 | 11 62 C8 95 88 E3 7A 69 15 9E E2 13 47 E9 C0 70
0250 | 7E AB C9 DF 97 03 EE BC 88 78 45 97 E6 B9 3E D6
0260 | 46 ED FE D5 D9 D3 7E 1C D0 88 FD 13 52 84 5B FB
0270 | 6B 66 22 F8 02 BD 53 F3 AA 5A EC 62 F8 A5 69 8F
0280 | 80 75 26 84 A0 9F 8C DA 95 90 F1 46</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 B4 EA F2 07 EB 6C 65
0010 | BC 02 00 00 5C 07 E8 D0 2B 61 E8 CE 46 92 30 D3
0020 | F0 2E B0 DD 8B 34 7C 7A 0B 13 97 9C AF 03 8B 9C
0030 | B1 CF FB 2E 5A 4C 90 B1 FE 50 02 00 F5 31 B3 DD
0040 | 83 6C AE 3B E2 8E 2C 1B 46 86 CA F7 70 06 58 FF
0050 | DE 89 1B 3B 49 DD 4C E5 B7 3D 9F FA 6C 86 62 90
0060 | 18 57 39 93 9A F0 D6 AE CA B0 A0 B7 85 F5 3B 62
0070 | C4 C3 C4 F8 F5 97 27 86 CC ED 85 3D 2C FE C7 C6
0080 | F0 1A 38 36 ED 3C 67 B7 98 AB 8A 7A 5D 40 FF 09
0090 | A5 A1 89 F0 4C EB AD CC 7F D8 A2 25 86 B7 EF 6A
00A0 | 39 F3 98 82 FF 5C A4 85 5A B6 95 36 83 B6 7D F8
00B0 | DE 80 3D 15 75 30 01 F7 51 10 E8 B9 7D 48 49 49
00C0 | 7A 11 0D 0A 8C 8B 21 98 3B 0E CF 8D 43 AB 9F 14
00D0 | 95 8A 48 12 C5 FF 13 DA 1C 32 B9 59 66 B5 39 2C
00E0 | 93 16 39 F6 21 56 77 2D A2 06 A4 91 39 89 56 A1
00F0 | 28 7E 70 02 17 4F 71 FA 22 12 BC EE C1 A3 DA AE
0100 | 61 79 89 D9 43 92 6C 3B 1B AE 39 FE 9E F2 77 ED
0110 | 39 EF D4 22 62 E1 CD FD 1D C9 EF 3D 9E 89 ED A6
0120 | 86 64 57 FC 7E 5F FB C5 CB C6 CC 89 86 EF 9B F6
0130 | 56 E2 50 CD BF 1D 00 BF F9 B9 9C C8 7B EC B3 86
0140 | 38 FD 67 36 6E 61 6B 79 9B B4 BF 6F 09 0A 61 87
0150 | 68 EC 3A E6 26 53 AD 5A 0B 8D 15 95 0A 40 A7 A0
0160 | B3 3A 3B 35 5B A1 0E 0B 04 26 9F F0 42 C4 91 6E
0170 | DA 6D 53 2E 0C DE CC F3 CE 11 6D 65 E4 17 4A BA
0180 | 90 51 ED B8 0F 12 45 95 A2 92 8B 8E A8 E2 8C 2D
0190 | D9 B9 93 C4 5B A1 6E 26 51 E3 0E 9B 63 B4 00 EA
01A0 | 65 89 96 2D CC 05 F4 EE 32 2D AA FB 47 5E 97 C3
01B0 | 37 C2 FF 2B 07 55 E9 6B 9D E4 02 E9 EE BB C0 D4
01C0 | 20 D5 E4 46 8A 3D 00 9A A5 1C 32 7B 54 C2 EA F4
01D0 | 63 90 DE 0C EA D4 51 C7 B6 06 DD 13 24 B8 AB D5
01E0 | 82 4D FF 7A 59 5B 4E FD 37 90 F1 CF F4 0E 58 F3
01F0 | D2 DA 00 00 D9 BD 1C CC F4 54 75 E5 E9 60 26 AC
0200 | 34 DD 5E 72 E1 90 88 AC 41 43 2F 39 8F F0 42 0F
0210 | 40 BF 9F 63 BF B3 2C 92 4A 40 C4 14 83 02 60 33
0220 | 12 D3 55 B7 21 8A CB 70 CA DB 13 1A 9D 16 D7 4E
0230 | 9F 17 73 C0 BF 03 F3 BB 88 7F 22 A8 A4 EA 40 F6
0240 | 1F 33 51 DD 9A 84 4C 8E AE 16 70 83 B4 C7 2B 39
0250 | 58 E8 E2 D7 20 92 EE F3 49 18 FD 25 6C 8E 9B B4
0260 | FE 12 C6 77 74 D1 F4 7E BA EE 20 67 48 81 3F 5A
0270 | AC 44 36 A6 7E A7 B2 FC 08 EA FF E6 BB 22 31 8C
0280 | 83 E3 A7 5B 0F 3F 47 EE E9 BF 7C 70</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 = B8F5B0C105FF2BF073B6C18AC3401F4F4576029E2DB1738EB5D5C5E24
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>0194D1CA299B6C65</code></td>
<td><code>01B4EAF207EB6C65</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>EC020000</code> (748 in decimal)</td>
<td><code>BC020000</code> (700 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = B8F5B0C105FF2BF073B6C18AC3401F4F4576029E2DB1738EB5D5C5E24
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>B0697AFDF7E550640EA26ADB92590DE2</code></td>
<td><code>2B61E8CE469230D3F02EB0DD8B347C7A</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>FEAC660AF9824B190F2AB17DA085CE8B</code></td>
<td><code>0B13979CAF038B9CB1CFFB2E5A4C90B1</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200C39EE209EC8096710D352E3B</code> <code>BE1D4B261241CA3F83F6C5ED1E427213</code> <code>DBC930C4150E73A1185DF1A25B99881C</code> <code>8A3C2A5E120AB14E5105C4C2414FD6BD</code> <code>25798925D0A46218676FB60A1989CFF8</code> <code>9CAC9B2061BE4B68CDE59B0BCA81B447</code> <code>75B3DE66A3E305AAB906AF0E5D4DC006</code> <code>F160976E214543E478EFA9E91D19C3AF</code> <code>FCFB96B1DAE5FE18AAED6FA396E3CE63</code> <code>634283EB6E619066A336F3F05D4A4F95</code> <code>370153314FF1CC0D5C8E7CFC25A922F1</code> <code>1750BDFA60501AB70C74D0C73D131033</code> <code>742E85E89CEF90937608528447A8A407</code> <code>33B93CD67CB3FFA7C2EE74296A07835E</code> <code>16072780AAE5D3E27186637C7B34EB97</code> <code>432AA2C8980F798C1BC6E5BBB6D6F6E0</code> <code>CBA735E77A5655A3E45522A02BBC29F1</code> <code>893C537DB1FC3EE8A0FD9B89F6F796ED</code> <code>6BB890BE2EE400CB02866990B9E43BAB</code> <code>9018F9B15CF3AFBC06FDFB823E9AAD0C</code> <code>B49CF4E1D0C6DD39DE9325A42B5BD06E</code> <code>7C76BC16F65253D1F7246CE7BE1BD462</code> <code>ADB27BA8B02B358C226C84DA562AE056</code> <code>13920261F37C771B89F1A1B0378C4D6D</code> <code>CE71A57E258039436FAFD7FD887869C7</code> <code>37D05E9BFC8D95A0A8633E48A63908A6</code> <code>BDF4E5FC12B40775C840CDCF26EE6844</code> <code>AF13A4E34C539EF3A615D0A7381C40B0</code> <code>03E2B18C6D27DD4FA58764274CDF2FD5</code> <code>26FF5192F70BD84DE9B5214C07310630</code> <code>EE100B5A77F26BF1B3EA3C01A5113379</code> <code>91B605E6717DA5AB0FE66035C118D4E1</code> <code>0546F60E3017B0281162C89588E37A69</code> <code>159EE21347E9C0707EABC9DF9703EEBC</code> <code>88784597E6B93ED646EDFED5D9D37E1C</code> <code>D088FD1352845BFB6B6622F802BD53F3</code> <code>AA5AEC62F8A5698F80752684A09F8CDA</code><br> <code>9590F146</code></td>
<td><code>FE500200F531B3DD836CAE3BE28E2C1B</code> <code>4686CAF7700658FFDE891B3B49DD4CE5</code> <code>B73D9FFA6C866290185739939AF0D6AE</code> <code>CAB0A0B785F53B62C4C3C4F8F5972786</code> <code>CCED853D2CFEC7C6F01A3836ED3C67B7</code> <code>98AB8A7A5D40FF09A5A189F04CEBADCC</code> <code>7FD8A22586B7EF6A39F39882FF5CA485</code> <code>5AB6953683B67DF8DE803D15753001F7</code> <code>5110E8B97D4849497A110D0A8C8B2198</code> <code>3B0ECF8D43AB9F14958A4812C5FF13DA</code> <code>1C32B95966B5392C931639F62156772D</code> <code>A206A491398956A1287E7002174F71FA</code> <code>2212BCEEC1A3DAAE617989D943926C3B</code> <code>1BAE39FE9EF277ED39EFD42262E1CDFD</code> <code>1DC9EF3D9E89EDA6866457FC7E5FFBC5</code> <code>CBC6CC8986EF9BF656E250CDBF1D00BF</code> <code>F9B99CC87BECB38638FD67366E616B79</code> <code>9BB4BF6F090A618768EC3AE62653AD5A</code> <code>0B8D15950A40A7A0B33A3B355BA10E0B</code> <code>04269FF042C4916EDA6D532E0CDECCF3</code> <code>CE116D65E4174ABA9051EDB80F124595</code> <code>A2928B8EA8E28C2DD9B993C45BA16E26</code> <code>51E30E9B63B400EA6589962DCC05F4EE</code> <code>322DAAFB475E97C337C2FF2B0755E96B</code> <code>9DE402E9EEBBC0D420D5E4468A3D009A</code> <code>A51C327B54C2EAF46390DE0CEAD451C7</code> <code>B606DD1324B8ABD5824DFF7A595B4EFD</code> <code>3790F1CFF40E58F3D2DA0000D9BD1CCC</code> <code>F45475E5E96026AC34DD5E72E19088AC</code> <code>41432F398FF0420F40BF9F63BFB32C92</code> <code>4A40C4148302603312D355B7218ACB70</code> <code>CADB131A9D16D74E9F1773C0BF03F3BB</code> <code>887F22A8A4EA40F61F3351DD9A844C8E</code> <code>AE167083B4C72B3958E8E2D72092EEF3</code> <code>4918FD256C8E9BB4FE12C67774D1F47E</code> <code>BAEE206748813F5AAC4436A67EA7B2FC</code> <code>08EAFFE6BB22318C83E3A75B0F3F47EE</code><br> <code>E9BF7C70</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = B8F5B0C105FF2BF073B6C18AC3401F4F4576029E2DB1738EB5D5C5E24
<!-- 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 = C39EE209EC8096710D352E3BBE1D4B261241CA3F83F6C5ED1E427213DBC930C4150E73A1185DF1A25B99881C8A3C2A5E120AB14E5105C4C2414FD6BD25798925D0A46218676FB60A1989CFF89CAC9B2061BE4B68CDE59B0BCA81B44775B3DE66A3E305AAB906AF0E5D4DC006F160976E214543E478EFA9E91D19C3AFFCFB96B1DAE5FE18AAED6FA396E3CE63634283EB6E619066A336F3F05D4A4F95370153314FF1CC0D5C8E7CFC25A922F11750BDFA60501AB70C74D0C73D131033742E85E89CEF90937608528447A8A40733B93CD67CB3FFA7C2EE74296A07835E16072780AAE5D3E27186637C7B34EB97432AA2C8980F798C1BC6E5BBB6D6F6E0CBA735E77A5655A3E45522A02BBC29F1893C537DB1FC3EE8A0FD9B89F6F796ED6BB890BE2EE400CB02866990B9E43BAB9018F9B15CF3AFBC06FDFB823E9AAD0CB49CF4E1D0C6DD39DE9325A42B5BD06E7C76BC16F65253D1F7246CE7BE1BD462ADB27BA8B02B358C226C84DA562AE05613920261F37C771B89F1A1B0378C4D6DCE71A57E258039436FAFD7FD887869C737D05E9BFC8D95A0A8633E48A63908A6BDF4E5FC12B40775C840CDCF26EE6844AF13A4E34C539EF3A615D0A7381C40B003E2B18C6D27DD4FA58764274CDF2FD526FF5192F70BD84DE9B5214C07310630EE100B5A77F26BF1B3EA3C01A511337991B605E6717DA5AB0FE66035C118D4E10546F60E3017B0281162C89588E37A69159EE21347E9C0707EABC9DF9703EEBC88784597E6B93ED646EDFED5D9D37E1CD088FD1352845BFB6B6622F802BD53F3AA5AEC62F8A5698F80752684A09F8CDA9590F146
tmp_aes_key = 668610D763D3448CD0105B192110D48F48A44E8F8881873208DAB2E4C0909447
tmp_aes_iv = A922BBD641DBFA4F93367A356DC3477420A3D1E970DFECEAF029345EC96CB73B</code></pre>
<pre><code>encrypted_answer = F531B3DD836CAE3BE28E2C1B4686CAF7700658FFDE891B3B49DD4CE5B73D9FFA6C866290185739939AF0D6AECAB0A0B785F53B62C4C3C4F8F5972786CCED853D2CFEC7C6F01A3836ED3C67B798AB8A7A5D40FF09A5A189F04CEBADCC7FD8A22586B7EF6A39F39882FF5CA4855AB6953683B67DF8DE803D15753001F75110E8B97D4849497A110D0A8C8B21983B0ECF8D43AB9F14958A4812C5FF13DA1C32B95966B5392C931639F62156772DA206A491398956A1287E7002174F71FA2212BCEEC1A3DAAE617989D943926C3B1BAE39FE9EF277ED39EFD42262E1CDFD1DC9EF3D9E89EDA6866457FC7E5FFBC5CBC6CC8986EF9BF656E250CDBF1D00BFF9B99CC87BECB38638FD67366E616B799BB4BF6F090A618768EC3AE62653AD5A0B8D15950A40A7A0B33A3B355BA10E0B04269FF042C4916EDA6D532E0CDECCF3CE116D65E4174ABA9051EDB80F124595A2928B8EA8E28C2DD9B993C45BA16E2651E30E9B63B400EA6589962DCC05F4EE322DAAFB475E97C337C2FF2B0755E96B9DE402E9EEBBC0D420D5E4468A3D009AA51C327B54C2EAF46390DE0CEAD451C7B606DD1324B8ABD5824DFF7A595B4EFD3790F1CFF40E58F3D2DA0000D9BD1CCCF45475E5E96026AC34DD5E72E19088AC41432F398FF0420F40BF9F63BFB32C924A40C4148302603312D355B7218ACB70CADB131A9D16D74E9F1773C0BF03F3BB887F22A8A4EA40F61F3351DD9A844C8EAE167083B4C72B3958E8E2D72092EEF34918FD256C8E9BB4FE12C67774D1F47EBAEE206748813F5AAC4436A67EA7B2FC08EAFFE6BB22318C83E3A75B0F3F47EEE9BF7C70
tmp_aes_key = 0EC4F0C14F035104D377C5113F23FFDF8E92F502C8482FACE4396EE318ACBEA1
tmp_aes_iv = FC4DDAFCB1351D8B0E53DB5B10E1B7F5EFA5AB0F2B8188414A4BC90C16401EE2</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = F64B0014BE61E1AA96FCAA18C13FCCAB03858EBDBA0D89B5B0697AFDF7E550640EA26ADB92590DE2FEAC660AF9824B190F2AB17DA085CE8B03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100065039438661DCE2B8224967E92227644F6D61438224ECEAA11CD6B63A0CBB4D2845541292732A09720806035A6D3AC2DA0A4C49D15BDBC4B51663304FA8E0BAE80899FBAA3CD646D6A11701CF0F35F6E5678183C05B490507675F06434CEB2AAE2C9270A02FC0567D48211477A0767431E8E7E643B2527EF560ABB35CDB2C14C68B5ED55A11DF0EDF590E8D71FD9958C287112914B9E28B1382EDFF40362DD10ECBE73511C99BF6890BB126BA8D5F7F8B36436D2778A2101505D0909679C84D46A6887A8933FF36EAB1DC626D9A252F51AD6226734ED439CDE480F1D06A07E9E56E195675389FB017C8B2B3114CE1D4E2D16743EAD3176E00714BD9E1817FCC299B6C6570C651999F693459
answer = BA0D89B5B0697AFDF7E550640EA26ADB92590DE2FEAC660AF9824B190F2AB17DA085CE8B03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100065039438661DCE2B8224967E92227644F6D61438224ECEAA11CD6B63A0CBB4D2845541292732A09720806035A6D3AC2DA0A4C49D15BDBC4B51663304FA8E0BAE80899FBAA3CD646D6A11701CF0F35F6E5678183C05B490507675F06434CEB2AAE2C9270A02FC0567D48211477A0767431E8E7E643B2527EF560ABB35CDB2C14C68B5ED55A11DF0EDF590E8D71FD9958C287112914B9E28B1382EDFF40362DD10ECBE73511C99BF6890BB126BA8D5F7F8B36436D2778A2101505D0909679C84D46A6887A8933FF36EAB1DC626D9A252F51AD6226734ED439CDE480F1D06A07E9E56E195675389FB017C8B2B3114CE1D4E2D16743EAD3176E00714BD9E1817FCC299B6C6570C651999F693459</code></pre>
<pre><code>answer_with_hash = 4025DC61AA8D3AD9FCF7D215C8FB2808285ACBD8BA0D89B52B61E8CE469230D3F02EB0DD8B347C7A0B13979CAF038B9CB1CFFB2E5A4C90B103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002DDF0E0962C4FF122336959E5F1EF9ECDE0D5133DDA3F5226BF41BAAAFF1E406040D53EA007E1F860A6C492FDBC9081F5C961331348B8F53BB48EAA9F0CBD48FB8B8BD70DB1158296F0BF749D70DD32DBA7D83C5C4CE6B59B433030AE2C262BC0E39928A8120A262EF2B6BE8C1EADB73F39B77C85432B8230223774AF46ABBD790D4833CA1C169E0DA63F98CB9471AE9C9E12BCA8131C93B299E1A2EEA8FA3D452F80C72AC032AF5691560E84D2C4E7F89216C33B9ECE8D7C886DBC704C906DA70C459DADDBD31A891968A0876E66E634D635653A80985D5D9B19FB3A2E0C35415613F272CE291166B4D7C354BEA323B11930D99E2E405EF8B3CCEDCE1B4B2CB07EB6C6513675A1B626B5E92
answer = BA0D89B52B61E8CE469230D3F02EB0DD8B347C7A0B13979CAF038B9CB1CFFB2E5A4C90B103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002DDF0E0962C4FF122336959E5F1EF9ECDE0D5133DDA3F5226BF41BAAAFF1E406040D53EA007E1F860A6C492FDBC9081F5C961331348B8F53BB48EAA9F0CBD48FB8B8BD70DB1158296F0BF749D70DD32DBA7D83C5C4CE6B59B433030AE2C262BC0E39928A8120A262EF2B6BE8C1EADB73F39B77C85432B8230223774AF46ABBD790D4833CA1C169E0DA63F98CB9471AE9C9E12BCA8131C93B299E1A2EEA8FA3D452F80C72AC032AF5691560E84D2C4E7F89216C33B9ECE8D7C886DBC704C906DA70C459DADDBD31A891968A0876E66E634D635653A80985D5D9B19FB3A2E0C35415613F272CE291166B4D7C354BEA323B11930D99E2E405EF8B3CCEDCE1B4B2CB07EB6C6513675A1B626B5E92</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 B0 69 7A FD F7 E5 50 64 0E A2 6A DB
0010 | 92 59 0D E2 FE AC 66 0A F9 82 4B 19 0F 2A B1 7D
0020 | A0 85 CE 8B 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 2B 61 E8 CE 46 92 30 D3 F0 2E B0 DD
0010 | 8B 34 7C 7A 0B 13 97 9C AF 03 8B 9C B1 CF FB 2E
0020 | 5A 4C 90 B1 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 = BA0D89B5B0697AFDF7E550640EA26ADB92590DE2FEAC660AF9824B190F2AB17DA085CE8
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 | 06 50 39 43 86 61 DC E2 B8 22 49 67 E9 22 27 64
0140 | 4F 6D 61 43 82 24 EC EA A1 1C D6 B6 3A 0C BB 4D
0150 | 28 45 54 12 92 73 2A 09 72 08 06 03 5A 6D 3A C2
0160 | DA 0A 4C 49 D1 5B DB C4 B5 16 63 30 4F A8 E0 BA
0170 | E8 08 99 FB AA 3C D6 46 D6 A1 17 01 CF 0F 35 F6
0180 | E5 67 81 83 C0 5B 49 05 07 67 5F 06 43 4C EB 2A
0190 | AE 2C 92 70 A0 2F C0 56 7D 48 21 14 77 A0 76 74
01A0 | 31 E8 E7 E6 43 B2 52 7E F5 60 AB B3 5C DB 2C 14
01B0 | C6 8B 5E D5 5A 11 DF 0E DF 59 0E 8D 71 FD 99 58
01C0 | C2 87 11 29 14 B9 E2 8B 13 82 ED FF 40 36 2D D1
01D0 | 0E CB E7 35 11 C9 9B F6 89 0B B1 26 BA 8D 5F 7F
01E0 | 8B 36 43 6D 27 78 A2 10 15 05 D0 90 96 79 C8 4D
01F0 | 46 A6 88 7A 89 33 FF 36 EA B1 DC 62 6D 9A 25 2F
0200 | 51 AD 62 26 73 4E D4 39 CD E4 80 F1 D0 6A 07 E9
0210 | E5 6E 19 56 75 38 9F B0 17 C8 B2 B3 11 4C E1 D4
0220 | E2 D1 67 43 EA D3 17 6E 00 71 4B D9 E1 81 7F CC
0230 | 29 9B 6C 65</code></pre>
0130 | 2D DF 0E 09 62 C4 FF 12 23 36 95 9E 5F 1E F9 EC
0140 | DE 0D 51 33 DD A3 F5 22 6B F4 1B AA AF F1 E4 06
0150 | 04 0D 53 EA 00 7E 1F 86 0A 6C 49 2F DB C9 08 1F
0160 | 5C 96 13 31 34 8B 8F 53 BB 48 EA A9 F0 CB D4 8F
0170 | B8 B8 BD 70 DB 11 58 29 6F 0B F7 49 D7 0D D3 2D
0180 | BA 7D 83 C5 C4 CE 6B 59 B4 33 03 0A E2 C2 62 BC
0190 | 0E 39 92 8A 81 20 A2 62 EF 2B 6B E8 C1 EA DB 73
01A0 | F3 9B 77 C8 54 32 B8 23 02 23 77 4A F4 6A BB D7
01B0 | 90 D4 83 3C A1 C1 69 E0 DA 63 F9 8C B9 47 1A E9
01C0 | C9 E1 2B CA 81 31 C9 3B 29 9E 1A 2E EA 8F A3 D4
01D0 | 52 F8 0C 72 AC 03 2A F5 69 15 60 E8 4D 2C 4E 7F
01E0 | 89 21 6C 33 B9 EC E8 D7 C8 86 DB C7 04 C9 06 DA
01F0 | 70 C4 59 DA DD BD 31 A8 91 96 8A 08 76 E6 6E 63
0200 | 4D 63 56 53 A8 09 85 D5 D9 B1 9F B3 A2 E0 C3 54
0210 | 15 61 3F 27 2C E2 91 16 6B 4D 7C 35 4B EA 32 3B
0220 | 11 93 0D 99 E2 E4 05 EF 8B 3C CE DC E1 B4 B2 CB
0230 | 07 EB 6C 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 = BA0D89B5B0697AFDF7E550640EA26ADB92590DE2FEAC660AF9824B190F2AB17DA085CE8
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>B0697AFDF7E550640EA26ADB92590DE2</code></td>
<td><code>2B61E8CE469230D3F02EB0DD8B347C7A</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>FEAC660AF9824B190F2AB17DA085CE8B</code></td>
<td><code>0B13979CAF038B9CB1CFFB2E5A4C90B1</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B5B0697AFDF7E550640EA26ADB92590DE2FEAC660AF9824B190F2AB17DA085CE8
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE000100065039438661DCE2B8224967</code> <code>E92227644F6D61438224ECEAA11CD6B6</code> <code>3A0CBB4D2845541292732A0972080603</code> <code>5A6D3AC2DA0A4C49D15BDBC4B5166330</code> <code>4FA8E0BAE80899FBAA3CD646D6A11701</code> <code>CF0F35F6E5678183C05B490507675F06</code> <code>434CEB2AAE2C9270A02FC0567D482114</code> <code>77A0767431E8E7E643B2527EF560ABB3</code> <code>5CDB2C14C68B5ED55A11DF0EDF590E8D</code> <code>71FD9958C287112914B9E28B1382EDFF</code> <code>40362DD10ECBE73511C99BF6890BB126</code> <code>BA8D5F7F8B36436D2778A2101505D090</code> <code>9679C84D46A6887A8933FF36EAB1DC62</code> <code>6D9A252F51AD6226734ED439CDE480F1</code> <code>D06A07E9E56E195675389FB017C8B2B3</code> <code>114CE1D4E2D16743EAD3176E00714BD9</code><br> <code>E1817FCC</code></td>
<td><code>FE0001002DDF0E0962C4FF122336959E</code> <code>5F1EF9ECDE0D5133DDA3F5226BF41BAA</code> <code>AFF1E406040D53EA007E1F860A6C492F</code> <code>DBC9081F5C961331348B8F53BB48EAA9</code> <code>F0CBD48FB8B8BD70DB1158296F0BF749</code> <code>D70DD32DBA7D83C5C4CE6B59B433030A</code> <code>E2C262BC0E39928A8120A262EF2B6BE8</code> <code>C1EADB73F39B77C85432B8230223774A</code> <code>F46ABBD790D4833CA1C169E0DA63F98C</code> <code>B9471AE9C9E12BCA8131C93B299E1A2E</code> <code>EA8FA3D452F80C72AC032AF5691560E8</code> <code>4D2C4E7F89216C33B9ECE8D7C886DBC7</code> <code>04C906DA70C459DADDBD31A891968A08</code> <code>76E66E634D635653A80985D5D9B19FB3</code> <code>A2E0C35415613F272CE291166B4D7C35</code> <code>4BEA323B11930D99E2E405EF8B3CCEDC</code><br> <code>E1B4B2CB</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>299B6C65</code> (1701616425 in decimal)</td>
<td><code>07EB6C65</code> (1701636871 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B5B0697AFDF7E550640EA26ADB92590DE2FEAC660AF9824B190F2AB17DA085CE8
<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 = A6B98A45AB89CF2E759A556982AF732D1E78F44276DB83C371FD474ECBE1020CD825CE8DCC077B8CC8404514449BB66C2DD075E3C050CA0C2176948F033197912A1C32783A1C807ED82E76EE4203654D76A57601CDA8E4F45F03F4BD4418015380CBF778ED9ED702CB1954D9EE019A1530D635BA6A13F0D31CF7E1ECFC3C1482A159F1F7C6F801619D5D3C783D84EABA01D2B0A2BF926E4307EA5C8B0A2AAFBAE6A41F2E70E28D0B92BBA7D6F77CC724D297C6296AB3CAFB49CF6C82514FE075D86FA4DD20B4BBFAA91CDD5543325F6C700C3C560BF0CD3049066D01D3B9E2925273B32FF49710E5B24C5A3109490799F87E9026917147A47A820EC6A119A016</code></pre>
<pre><code>b = 7CAC5DD30984C50AA842F48F90D80FBB1B7C7E480D5094E366EF8CD9A3B9A653AA5AF5EAA939787618D5A4AB2D7BE565CB706BF7AD36F0BC9C9D518E25FBCC0404E9C815647B604A08CC827286D898058C7B4582B27956543D102CFD3D74F7874DCE8BA87E543A79FD89155B066119373A8D71B7A10D6774C21E5C8A9CDDFF75FDD6A5A38F5CD0FAB8206DAC93E6AE19004F7DE83A1542657ABD407E388F1AE26A789D0B136B64A20954914404A2E9605E71578D1B8B2F6D60CE51A26A39DA4ABFC1186FA3753F1A335F0FA2EAD84C00A2A1DA24E1E066569FADFD43FD1A1C21582600FD42352831965A3410FD163065CEAADE55EF6727EB613BD709543171C0</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 = 593D04663CDA5975735282EE4A67E7A1BCA672A2E44E1CECAEE63110734C101E8D1504CA33F98A94CD5DC904A4DE45C4117CE07E6D30AF3370E5AFCA20D0BCCE86B97B74A613DF0841A981CA8C6E2768D5041A371DF571EAD4BDD6645EB15742F4FEF19BEE1F317A400279D095CDB54B8A73998A7A46B50DAC02177537040412C72E1E103AE8E7D4E49C7D193DB043821EF06EA6EE4667F05B643B6C47C4AB13F3B1BE81DF776E2FC0A1C9969A8451833800E25537070E4FF6F78D017654B3C58168152D8959DA48DB34BBA1937D327A4891B2CB935D1CD9F624F599E5734D9D6CE4C8BDA382D331BCBE126E0598C86E55BF2BF98AF1BEDC695A1009F78AD0B1</code></pre>
<pre><code>g_b = 5DE63467EDB3BFAA85242250ED73AD59FFB6421128FC16D29B5863532214029F0A553DA6AFE4C6C9B0B8471156308B17DBC829B8DDA7D48A762AE917726E80380AE83915F29A76D44964F6EFE3171CAC12EB3293FF42F2430793219478BABD6575F30BD1FCA2D1386421ABFA37D064D15F95E3B20F12171485150EFAA6F4EAF7F6B7CC3F8BA663322962005380A9BE9E3D7C1F4C3C080862DD7420488B072EC81873F872B62A7FCD3798E7E92C5F53DD730E92AB882406C4A10644A9B71A86F3C96229F5A11C1B1EDB40817556F15075A3CB9B5CCA73BA1CE7B3EF3EB4D0661D01F5EC8A2AF64928C902DDE03BCAF13AA51417A81116817CA753EF924020F12A</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 B0 69 7A FD F7 E5 50 64 0E A2 6A DB
0010 | 92 59 0D E2 FE AC 66 0A F9 82 4B 19 0F 2A B1 7D
0020 | A0 85 CE 8B 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 59 3D 04 66 3C DA 59 75 73 52 82 EE 4A 67 E7 A1
0040 | BC A6 72 A2 E4 4E 1C EC AE E6 31 10 73 4C 10 1E
0050 | 8D 15 04 CA 33 F9 8A 94 CD 5D C9 04 A4 DE 45 C4
0060 | 11 7C E0 7E 6D 30 AF 33 70 E5 AF CA 20 D0 BC CE
0070 | 86 B9 7B 74 A6 13 DF 08 41 A9 81 CA 8C 6E 27 68
0080 | D5 04 1A 37 1D F5 71 EA D4 BD D6 64 5E B1 57 42
0090 | F4 FE F1 9B EE 1F 31 7A 40 02 79 D0 95 CD B5 4B
00A0 | 8A 73 99 8A 7A 46 B5 0D AC 02 17 75 37 04 04 12
00B0 | C7 2E 1E 10 3A E8 E7 D4 E4 9C 7D 19 3D B0 43 82
00C0 | 1E F0 6E A6 EE 46 67 F0 5B 64 3B 6C 47 C4 AB 13
00D0 | F3 B1 BE 81 DF 77 6E 2F C0 A1 C9 96 9A 84 51 83
00E0 | 38 00 E2 55 37 07 0E 4F F6 F7 8D 01 76 54 B3 C5
00F0 | 81 68 15 2D 89 59 DA 48 DB 34 BB A1 93 7D 32 7A
0100 | 48 91 B2 CB 93 5D 1C D9 F6 24 F5 99 E5 73 4D 9D
0110 | 6C E4 C8 BD A3 82 D3 31 BC BE 12 6E 05 98 C8 6E
0120 | 55 BF 2B F9 8A F1 BE DC 69 5A 10 09 F7 8A D0 B1</code></pre>
<pre><code>0000 | 54 B6 43 66 2B 61 E8 CE 46 92 30 D3 F0 2E B0 DD
0010 | 8B 34 7C 7A 0B 13 97 9C AF 03 8B 9C B1 CF FB 2E
0020 | 5A 4C 90 B1 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 5D E6 34 67 ED B3 BF AA 85 24 22 50 ED 73 AD 59
0040 | FF B6 42 11 28 FC 16 D2 9B 58 63 53 22 14 02 9F
0050 | 0A 55 3D A6 AF E4 C6 C9 B0 B8 47 11 56 30 8B 17
0060 | DB C8 29 B8 DD A7 D4 8A 76 2A E9 17 72 6E 80 38
0070 | 0A E8 39 15 F2 9A 76 D4 49 64 F6 EF E3 17 1C AC
0080 | 12 EB 32 93 FF 42 F2 43 07 93 21 94 78 BA BD 65
0090 | 75 F3 0B D1 FC A2 D1 38 64 21 AB FA 37 D0 64 D1
00A0 | 5F 95 E3 B2 0F 12 17 14 85 15 0E FA A6 F4 EA F7
00B0 | F6 B7 CC 3F 8B A6 63 32 29 62 00 53 80 A9 BE 9E
00C0 | 3D 7C 1F 4C 3C 08 08 62 DD 74 20 48 8B 07 2E C8
00D0 | 18 73 F8 72 B6 2A 7F CD 37 98 E7 E9 2C 5F 53 DD
00E0 | 73 0E 92 AB 88 24 06 C4 A1 06 44 A9 B7 1A 86 F3
00F0 | C9 62 29 F5 A1 1C 1B 1E DB 40 81 75 56 F1 50 75
0100 | A3 CB 9B 5C CA 73 BA 1C E7 B3 EF 3E B4 D0 66 1D
0110 | 01 F5 EC 8A 2A F6 49 28 C9 02 DD E0 3B CA F1 3A
0120 | A5 14 17 A8 11 16 81 7C A7 53 EF 92 40 20 F1 2A</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 = BA0D89B5B0697AFDF7E550640EA26ADB92590DE2FEAC660AF9824B190F2AB17DA085CE8
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>B0697AFDF7E550640EA26ADB92590DE2</code></td>
<td><code>2B61E8CE469230D3F02EB0DD8B347C7A</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>FEAC660AF9824B190F2AB17DA085CE8B</code></td>
<td><code>0B13979CAF038B9CB1CFFB2E5A4C90B1</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE000100593D04663CDA5975735282EE</code> <code>4A67E7A1BCA672A2E44E1CECAEE63110</code> <code>734C101E8D1504CA33F98A94CD5DC904</code> <code>A4DE45C4117CE07E6D30AF3370E5AFCA</code> <code>20D0BCCE86B97B74A613DF0841A981CA</code> <code>8C6E2768D5041A371DF571EAD4BDD664</code> <code>5EB15742F4FEF19BEE1F317A400279D0</code> <code>95CDB54B8A73998A7A46B50DAC021775</code> <code>37040412C72E1E103AE8E7D4E49C7D19</code> <code>3DB043821EF06EA6EE4667F05B643B6C</code> <code>47C4AB13F3B1BE81DF776E2FC0A1C996</code> <code>9A8451833800E25537070E4FF6F78D01</code> <code>7654B3C58168152D8959DA48DB34BBA1</code> <code>937D327A4891B2CB935D1CD9F624F599</code> <code>E5734D9D6CE4C8BDA382D331BCBE126E</code> <code>0598C86E55BF2BF98AF1BEDC695A1009</code><br> <code>F78AD0B1</code></td>
<td><code>FE0001005DE63467EDB3BFAA85242250</code> <code>ED73AD59FFB6421128FC16D29B586353</code> <code>2214029F0A553DA6AFE4C6C9B0B84711</code> <code>56308B17DBC829B8DDA7D48A762AE917</code> <code>726E80380AE83915F29A76D44964F6EF</code> <code>E3171CAC12EB3293FF42F24307932194</code> <code>78BABD6575F30BD1FCA2D1386421ABFA</code> <code>37D064D15F95E3B20F12171485150EFA</code> <code>A6F4EAF7F6B7CC3F8BA6633229620053</code> <code>80A9BE9E3D7C1F4C3C080862DD742048</code> <code>8B072EC81873F872B62A7FCD3798E7E9</code> <code>2C5F53DD730E92AB882406C4A10644A9</code> <code>B71A86F3C96229F5A11C1B1EDB408175</code> <code>56F15075A3CB9B5CCA73BA1CE7B3EF3E</code> <code>B4D0661D01F5EC8A2AF64928C902DDE0</code> <code>3BCAF13AA51417A81116817CA753EF92</code><br> <code>4020F12A</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 = BA0D89B5B0697AFDF7E550640EA26ADB92590DE2FEAC660AF9824B190F2AB17DA085CE8
<!-- 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 = 54B64366B0697AFDF7E550640EA26ADB92590DE2FEAC660AF9824B190F2AB17DA085CE8B0000000000000000FE000100593D04663CDA5975735282EE4A67E7A1BCA672A2E44E1CECAEE63110734C101E8D1504CA33F98A94CD5DC904A4DE45C4117CE07E6D30AF3370E5AFCA20D0BCCE86B97B74A613DF0841A981CA8C6E2768D5041A371DF571EAD4BDD6645EB15742F4FEF19BEE1F317A400279D095CDB54B8A73998A7A46B50DAC02177537040412C72E1E103AE8E7D4E49C7D193DB043821EF06EA6EE4667F05B643B6C47C4AB13F3B1BE81DF776E2FC0A1C9969A8451833800E25537070E4FF6F78D017654B3C58168152D8959DA48DB34BBA1937D327A4891B2CB935D1CD9F624F599E5734D9D6CE4C8BDA382D331BCBE126E0598C86E55BF2BF98AF1BEDC695A1009F78AD0B1
padding = 3873AFAE5B7795F8342CB49B
tmp_aes_key = 668610D763D3448CD0105B192110D48F48A44E8F8881873208DAB2E4C0909447
tmp_aes_iv = A922BBD641DBFA4F93367A356DC3477420A3D1E970DFECEAF029345EC96CB73B</code></pre>
<pre><code>data = 54B643662B61E8CE469230D3F02EB0DD8B347C7A0B13979CAF038B9CB1CFFB2E5A4C90B10000000000000000FE0001005DE63467EDB3BFAA85242250ED73AD59FFB6421128FC16D29B5863532214029F0A553DA6AFE4C6C9B0B8471156308B17DBC829B8DDA7D48A762AE917726E80380AE83915F29A76D44964F6EFE3171CAC12EB3293FF42F2430793219478BABD6575F30BD1FCA2D1386421ABFA37D064D15F95E3B20F12171485150EFAA6F4EAF7F6B7CC3F8BA663322962005380A9BE9E3D7C1F4C3C080862DD7420488B072EC81873F872B62A7FCD3798E7E92C5F53DD730E92AB882406C4A10644A9B71A86F3C96229F5A11C1B1EDB40817556F15075A3CB9B5CCA73BA1CE7B3EF3EB4D0661D01F5EC8A2AF64928C902DDE03BCAF13AA51417A81116817CA753EF924020F12A
padding = 31258D84C9988CCA58689670
tmp_aes_key = 0EC4F0C14F035104D377C5113F23FFDF8E92F502C8482FACE4396EE318ACBEA1
tmp_aes_iv = FC4DDAFCB1351D8B0E53DB5B10E1B7F5EFA5AB0F2B8188414A4BC90C16401EE2</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 = EE7E78B01E5C903C68FD369A20E2D31A5CB0CB4432972ACEFCA6C070AB87655B43B7564834D9E2BFBF790113A20E36789236A264E29E086BBCE67D3284A0BACD1928C088D01091C494068365E22733C7FCE094332BFD5B621030808B96871B57122C4C338BDB5F03F7EA2B3D820A55E35285BC0A86135AEA53A49CF309CF4ADF083A64FD0E604044FDD2E2A1DF386C5A3B12DA3BCEB7F26AA8E49B358D1BC0B246F530E5BB834D24B62442EC257790F3DBBB1856F178511A0A7B8F6D531599F738C684D8AEC684BF9BE886FC5AA588D1C7045FCF542D8AC850C668DF948D739C425E3FBC2382E3EEFDBA4D1524CBE57934FC7DC6CDE2B69A581D1A6F1C4BA10FEB3E4DD8211DAF073143B8A916AA043C00587B9B1AB75843D63720A96BA9A6E9E06480F3A56451176C4AC5B4B99267423A93907A5E0F97BF080D924072A303D520B337904B2DBA47517CD7D2ECFCE551</code></pre>
<pre><code>encrypted_data = 03B6A54797F1485038D9AE309CA59FDA675B09F363EC6A9728D282D71AEC467BC5451C0C80A8E87AC073591ED197E3DDE2E026B4C375B60089C5AF1899FBB86CFBD763F5E295BB8B256E40027C536B6835265FA270708ECE9BE46388706839EC90C9EA697B69985277F1AD4C96C939E6A4C5E0245BF4C4BFA36E7083EFD5701F72845137C88FFAEEEB15546DE8DD405120755D022C68888A55546C28A4982B2E06030297A18C720AE560E7C86764D3B239469E07BEE02D804104163C5176D6FF881724C279614AC53DDCBE47DDA625F5D2BFCF249904AABC474DCDA70298178F4D5EFB295E6ECB97742939B335163B204145B0A4ABEE779B14FB956FEDD6DB6C4960E029F16E14CD45A14BB8612F4814933541D4E9BBC32489E120604DF76FA043B9131A83CA20C3BF129C5846DF6E802259401E482BA5314901DB1ED9713A8ACCBAEC6E74AE2F18DB566EB2ED354768</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 64 2C 0E 00 29 9B 6C 65
0010 | 78 01 00 00 1F 5F 04 F5 B0 69 7A FD F7 E5 50 64
0020 | 0E A2 6A DB 92 59 0D E2 FE AC 66 0A F9 82 4B 19
0030 | 0F 2A B1 7D A0 85 CE 8B FE 50 01 00 EE 7E 78 B0
0040 | 1E 5C 90 3C 68 FD 36 9A 20 E2 D3 1A 5C B0 CB 44
0050 | 32 97 2A CE FC A6 C0 70 AB 87 65 5B 43 B7 56 48
0060 | 34 D9 E2 BF BF 79 01 13 A2 0E 36 78 92 36 A2 64
0070 | E2 9E 08 6B BC E6 7D 32 84 A0 BA CD 19 28 C0 88
0080 | D0 10 91 C4 94 06 83 65 E2 27 33 C7 FC E0 94 33
0090 | 2B FD 5B 62 10 30 80 8B 96 87 1B 57 12 2C 4C 33
00A0 | 8B DB 5F 03 F7 EA 2B 3D 82 0A 55 E3 52 85 BC 0A
00B0 | 86 13 5A EA 53 A4 9C F3 09 CF 4A DF 08 3A 64 FD
00C0 | 0E 60 40 44 FD D2 E2 A1 DF 38 6C 5A 3B 12 DA 3B
00D0 | CE B7 F2 6A A8 E4 9B 35 8D 1B C0 B2 46 F5 30 E5
00E0 | BB 83 4D 24 B6 24 42 EC 25 77 90 F3 DB BB 18 56
00F0 | F1 78 51 1A 0A 7B 8F 6D 53 15 99 F7 38 C6 84 D8
0100 | AE C6 84 BF 9B E8 86 FC 5A A5 88 D1 C7 04 5F CF
0110 | 54 2D 8A C8 50 C6 68 DF 94 8D 73 9C 42 5E 3F BC
0120 | 23 82 E3 EE FD BA 4D 15 24 CB E5 79 34 FC 7D C6
0130 | CD E2 B6 9A 58 1D 1A 6F 1C 4B A1 0F EB 3E 4D D8
0140 | 21 1D AF 07 31 43 B8 A9 16 AA 04 3C 00 58 7B 9B
0150 | 1A B7 58 43 D6 37 20 A9 6B A9 A6 E9 E0 64 80 F3
0160 | A5 64 51 17 6C 4A C5 B4 B9 92 67 42 3A 93 90 7A
0170 | 5E 0F 97 BF 08 0D 92 40 72 A3 03 D5 20 B3 37 90
0180 | 4B 2D BA 47 51 7C D7 D2 EC FC E5 51</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 A0 EB 0D 00 07 EB 6C 65
0010 | 78 01 00 00 1F 5F 04 F5 2B 61 E8 CE 46 92 30 D3
0020 | F0 2E B0 DD 8B 34 7C 7A 0B 13 97 9C AF 03 8B 9C
0030 | B1 CF FB 2E 5A 4C 90 B1 FE 50 01 00 03 B6 A5 47
0040 | 97 F1 48 50 38 D9 AE 30 9C A5 9F DA 67 5B 09 F3
0050 | 63 EC 6A 97 28 D2 82 D7 1A EC 46 7B C5 45 1C 0C
0060 | 80 A8 E8 7A C0 73 59 1E D1 97 E3 DD E2 E0 26 B4
0070 | C3 75 B6 00 89 C5 AF 18 99 FB B8 6C FB D7 63 F5
0080 | E2 95 BB 8B 25 6E 40 02 7C 53 6B 68 35 26 5F A2
0090 | 70 70 8E CE 9B E4 63 88 70 68 39 EC 90 C9 EA 69
00A0 | 7B 69 98 52 77 F1 AD 4C 96 C9 39 E6 A4 C5 E0 24
00B0 | 5B F4 C4 BF A3 6E 70 83 EF D5 70 1F 72 84 51 37
00C0 | C8 8F FA EE EB 15 54 6D E8 DD 40 51 20 75 5D 02
00D0 | 2C 68 88 8A 55 54 6C 28 A4 98 2B 2E 06 03 02 97
00E0 | A1 8C 72 0A E5 60 E7 C8 67 64 D3 B2 39 46 9E 07
00F0 | BE E0 2D 80 41 04 16 3C 51 76 D6 FF 88 17 24 C2
0100 | 79 61 4A C5 3D DC BE 47 DD A6 25 F5 D2 BF CF 24
0110 | 99 04 AA BC 47 4D CD A7 02 98 17 8F 4D 5E FB 29
0120 | 5E 6E CB 97 74 29 39 B3 35 16 3B 20 41 45 B0 A4
0130 | AB EE 77 9B 14 FB 95 6F ED D6 DB 6C 49 60 E0 29
0140 | F1 6E 14 CD 45 A1 4B B8 61 2F 48 14 93 35 41 D4
0150 | E9 BB C3 24 89 E1 20 60 4D F7 6F A0 43 B9 13 1A
0160 | 83 CA 20 C3 BF 12 9C 58 46 DF 6E 80 22 59 40 1E
0170 | 48 2B A5 31 49 01 DB 1E D9 71 3A 8A CC BA EC 6E
0180 | 74 AE 2F 18 DB 56 6E B2 ED 35 47 68</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>642C0E00299B6C65</code></td>
<td><code>A0EB0D0007EB6C65</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>B0697AFDF7E550640EA26ADB92590DE2</code></td>
<td><code>2B61E8CE469230D3F02EB0DD8B347C7A</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>FEAC660AF9824B190F2AB17DA085CE8B</code></td>
<td><code>0B13979CAF038B9CB1CFFB2E5A4C90B1</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100EE7E78B01E5C903C68FD369A</code> <code>20E2D31A5CB0CB4432972ACEFCA6C070</code> <code>AB87655B43B7564834D9E2BFBF790113</code> <code>A20E36789236A264E29E086BBCE67D32</code> <code>84A0BACD1928C088D01091C494068365</code> <code>E22733C7FCE094332BFD5B621030808B</code> <code>96871B57122C4C338BDB5F03F7EA2B3D</code> <code>820A55E35285BC0A86135AEA53A49CF3</code> <code>09CF4ADF083A64FD0E604044FDD2E2A1</code> <code>DF386C5A3B12DA3BCEB7F26AA8E49B35</code> <code>8D1BC0B246F530E5BB834D24B62442EC</code> <code>257790F3DBBB1856F178511A0A7B8F6D</code> <code>531599F738C684D8AEC684BF9BE886FC</code> <code>5AA588D1C7045FCF542D8AC850C668DF</code> <code>948D739C425E3FBC2382E3EEFDBA4D15</code> <code>24CBE57934FC7DC6CDE2B69A581D1A6F</code> <code>1C4BA10FEB3E4DD8211DAF073143B8A9</code> <code>16AA043C00587B9B1AB75843D63720A9</code> <code>6BA9A6E9E06480F3A56451176C4AC5B4</code> <code>B99267423A93907A5E0F97BF080D9240</code> <code>72A303D520B337904B2DBA47517CD7D2</code><br> <code>ECFCE551</code></td>
<td><code>FE50010003B6A54797F1485038D9AE30</code> <code>9CA59FDA675B09F363EC6A9728D282D7</code> <code>1AEC467BC5451C0C80A8E87AC073591E</code> <code>D197E3DDE2E026B4C375B60089C5AF18</code> <code>99FBB86CFBD763F5E295BB8B256E4002</code> <code>7C536B6835265FA270708ECE9BE46388</code> <code>706839EC90C9EA697B69985277F1AD4C</code> <code>96C939E6A4C5E0245BF4C4BFA36E7083</code> <code>EFD5701F72845137C88FFAEEEB15546D</code> <code>E8DD405120755D022C68888A55546C28</code> <code>A4982B2E06030297A18C720AE560E7C8</code> <code>6764D3B239469E07BEE02D804104163C</code> <code>5176D6FF881724C279614AC53DDCBE47</code> <code>DDA625F5D2BFCF249904AABC474DCDA7</code> <code>0298178F4D5EFB295E6ECB97742939B3</code> <code>35163B204145B0A4ABEE779B14FB956F</code> <code>EDD6DB6C4960E029F16E14CD45A14BB8</code> <code>612F4814933541D4E9BBC32489E12060</code> <code>4DF76FA043B9131A83CA20C3BF129C58</code> <code>46DF6E802259401E482BA5314901DB1E</code> <code>D9713A8ACCBAEC6E74AE2F18DB566EB2</code><br> <code>ED354768</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 = 4376473535A11FC78F947EA41F4CA6B3851B063824F7E6DA8D6E3643887D2865AAD3A0448CF0641170409ACE280B325AC0CF3802CA8E73F64675D59C90B750ADF2013A273D7AE5BD1D06BF9B59FA7FA62E9C3980E3A21E33B52FDA1CB10549CF6DB2945F7F295CD4EE605F81F7F9CCF819455B331DC860C5158733E4A6B3EF21EC93E4E7E3D7410EAAC498BDD40400FAE56941E59B514DF52B1201FA9489AFB7AC7FE222C71159E3BEAC0526E4207B80F0B37F2906B9C9BD6EBDF8959368758C26431EE83CAE372CA6BC8D3F0DFB349C72433A0A16E8ADF4161F362EF31F66E0A5FDF69A0547D8E5198BA128206E7A93EA4FAFCBA0A48C68279A0CA89536B2EA</code></pre>
<pre><code>auth_key = 10A41ACBEB34EDFDA504136358684DEE79845B3F59EA5ABEEC92302CABE37EA27DAEE8FA3B166A7C2CB36BA2259D8CF672BCE6DAFF76AB911B20752C48528E4319C5B88CA7DF1D97939BB5284B397A774EC894333C3528D39A976B94A60D065319CCE1D1B4D650F2ED5DE99232DB3C98D0D308586BEB91BA320A0B9871A81B2907767D27FE7A471B36DC0DCA1BBB50EE2602164C15AF164789481AEFE05C26BD78C2AFDA9B8E59239D29657EA48CE1BB7AFBDF725385BF274B47F81DA572D2B605AD0D204010A2CBC24615CA00891A7EA1894BE20C5B1417AC679DD701E4AE748AB72609AD05FEE7A10C29419A452E5EC329D98F7BE8BD9EA581BFE96876F1CE</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 B0 E6 10 2A 9B 6C 65
0010 | 74 00 00 00 34 F7 CB 3B B0 69 7A FD F7 E5 50 64
0020 | 0E A2 6A DB 92 59 0D E2 FE AC 66 0A F9 82 4B 19
0030 | 0F 2A B1 7D A0 85 CE 8B E8 E4 7E DE 0C 39 66 FA
0040 | 4F 82 5E D6 F5 4B 76 C5</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 24 37 6D 08 EB 6C 65
0010 | 70 00 00 00 34 F7 CB 3B 2B 61 E8 CE 46 92 30 D3
0020 | F0 2E B0 DD 8B 34 7C 7A 0B 13 97 9C AF 03 8B 9C
0030 | B1 CF FB 2E 5A 4C 90 B1 F3 20 D2 E3 91 44 F6 0F
0040 | 39 72 C9 BD 33 79 36 E1</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>01B0E6102A9B6C65</code></td>
<td><code>0124376D08EB6C65</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>74000000</code> (116 in decimal)</td>
<td><code>70000000</code> (112 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>B0697AFDF7E550640EA26ADB92590DE2</code></td>
<td><code>2B61E8CE469230D3F02EB0DD8B347C7A</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>FEAC660AF9824B190F2AB17DA085CE8B</code></td>
<td><code>0B13979CAF038B9CB1CFFB2E5A4C90B1</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>E8E47EDE0C3966FA4F825ED6F54B76C5</code></td>
<td><code>F320D2E39144F60F3972C9BD337936E1</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

@ -153,6 +153,10 @@
<td>Message entity representing <del>strikethrough</del> text.</td>
</tr>
<tr>
<td><a href="/constructor/messageEntityBlockquote">messageEntityBlockquote</a></td>
<td>Message entity representing a block quote.</td>
</tr>
<tr>
<td><a href="/constructor/messageEntityBankCard">messageEntityBankCard</a></td>
<td>Indicates a credit card number</td>
</tr>