Update content of files

This commit is contained in:
GitHub Action 2024-08-08 20:15:49 +00:00
parent 507552216b
commit c4e7c196ed
2 changed files with 206 additions and 209 deletions

View file

@ -310,7 +310,6 @@ While <a href="/method/help.getConfig">help.getConfig</a> returns MTProto-specif
"chatlist_update_period": 300,
"small_queue_max_active_operations_count": 5,
"large_queue_max_active_operations_count": 2,
"story_expire_period": 86400,
"story_viewers_expire_period": 86400,
"story_expiring_limit_default": 3,
"story_expiring_limit_premium": 100,
@ -325,9 +324,7 @@ While <a href="/method/help.getConfig">help.getConfig</a> returns MTProto-specif
"stories_sent_monthly_limit_default": 30,
"stories_sent_monthly_limit_premium": 3000,
"stories_venue_search_username": "foursquare",
"stories_all_hidden": false,
"stories_entities": "premium",
"stories_export_nopublic_link": true,
"stories_changelog_user_id": 777000,
"authorization_autoconfirm_period": 604800,
"stories_suggested_reactions_limit_default": 1,

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 08 C3 0C 00 CF 86 B4 66
0010 | 14 00 00 00 F1 8E 7E BE 7B D0 9C F3 4A 78 7B 68
0020 | 00 C2 38 51 E9 C5 4D AA</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 B0 6C 01 00 AF 87 B4 66
0010 | 14 00 00 00 F1 8E 7E BE 99 EC CC 0F 6B 19 C1 6F
0020 | DD 4F FC 71 78 87 18 9E</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>08C30C00CF86B466</code></td>
<td><code>B06C0100AF87B466</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>7BD09CF34A787B6800C23851E9C54DAA</code></td>
<td><code>99ECCC0F6B19C16FDD4FFC717887189E</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 AC 29 F9 D0 86 B4 66
0010 | B4 00 00 00 63 24 16 05 7B D0 9C F3 4A 78 7B 68
0020 | 00 C2 38 51 E9 C5 4D AA C6 DF 0C 6A AF C0 E1 E2
0030 | 5A DF 65 38 56 25 59 30 08 11 CD 1A 7F F4 47 6C
0040 | EB 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 A8 FF CC AF 87 B4 66
0010 | 6C 00 00 00 63 24 16 05 99 EC CC 0F 6B 19 C1 6F
0020 | DD 4F FC 71 78 87 18 9E AC 68 B1 64 19 5C 2E FC
0030 | 74 7D D7 3B 71 E2 04 53 08 16 49 06 B8 D4 FD 1B
0040 | BF 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>01AC29F9D086B466</code></td>
<td><code>01A8FFCCAF87B466</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>B4000000</code> (180 in decimal)</td>
<td><code>6C000000</code> (108 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>7BD09CF34A787B6800C23851E9C54DAA</code></td>
<td><code>99ECCC0F6B19C16FDD4FFC717887189E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>C6DF0C6AAFC0E1E25ADF653856255930</code></td>
<td><code>AC68B164195C2EFC747DD73B71E20453</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>0811CD1A7FF4476CEB000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1282710605731949803</td>
<td><code>08164906B8D4FD1BBF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1605822133051399103</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 = 1282710605731949803</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1282710605731949803 = 1010888009 * 1268894867</code></p>
<pre><code>p = 1010888009
q = 1268894867</code></pre>
<pre><code>pq = 1605822133051399103</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1605822133051399103 = 1025649271 * 1565663993</code></p>
<pre><code>p = 1025649271
q = 1565663993</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 11 CD 1A 7F F4 47 6C EB 00 00 00
0010 | 04 3C 40 ED 49 00 00 00 04 4B A1 CC 93 00 00 00
0020 | 7B D0 9C F3 4A 78 7B 68 00 C2 38 51 E9 C5 4D AA
0030 | C6 DF 0C 6A AF C0 E1 E2 5A DF 65 38 56 25 59 30
0040 | E5 27 5D A6 B8 4C 33 5B DA 78 85 FD 06 5A C1 B1
0050 | 07 CD C4 5E 97 F6 DF 66 46 2A B6 24 97 7F 2D 0A
<pre><code>0000 | 95 5F F5 A9 08 16 49 06 B8 D4 FD 1B BF 00 00 00
0010 | 04 3D 22 2A 77 00 00 00 04 5D 52 22 F9 00 00 00
0020 | 99 EC CC 0F 6B 19 C1 6F DD 4F FC 71 78 87 18 9E
0030 | AC 68 B1 64 19 5C 2E FC 74 7D D7 3B 71 E2 04 53
0040 | F7 C5 B9 A0 ED D3 6C C2 FC B9 A3 D1 E4 E4 4B 2E
0050 | C0 B6 32 CA 3C D6 04 2C A6 E6 19 72 96 A2 7C 31
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 = 1268894867</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>0811CD1A7FF4476CEB000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1282710605731949803</td>
<td><code>08164906B8D4FD1BBF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1605822133051399103</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>043C40ED49000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1010888009</td>
<td><code>043D222A77000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1025649271</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>044BA1CC93000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1268894867</td>
<td><code>045D5222F9000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1565663993</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>7BD09CF34A787B6800C23851E9C54DAA</code></td>
<td><code>99ECCC0F6B19C16FDD4FFC717887189E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>C6DF0C6AAFC0E1E25ADF653856255930</code></td>
<td><code>AC68B164195C2EFC747DD73B71E20453</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>E5275DA6B84C335BDA7885FD065AC1B1</code> <code>07CDC45E97F6DF66462AB624977F2D0A</code></td>
<td><code>F7C5B9A0EDD36CC2FCB9A3D1E4E44B2E</code> <code>C0B632CA3CD6042CA6E6197296A27C31</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1268894867</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 = 955FF5A90811CD1A7FF4476CEB000000043C40ED49000000044BA1CC930000007BD09CF34A787B6800C23851E9C54DAAC6DF0C6AAFC0E1E25ADF653856255930E5275DA6B84C335BDA7885FD065AC1B107CDC45E97F6DF66462AB624977F2D0A02000000
random_padding_bytes = 7AFED3ADE8049D4B312DBC99135E78B356A04E57DA3F178FB3439B457F4A2088C0A8A143BC4F11A114DE10F43A28A8D333883B9851F3288EC09B9CF4DC110860BA751068FA0DD974897097CC5B73474FE90FA9D98F1E95CA9F5135A6</code></pre>
<pre><code>data = 955FF5A908164906B8D4FD1BBF000000043D222A77000000045D5222F900000099ECCC0F6B19C16FDD4FFC717887189EAC68B164195C2EFC747DD73B71E20453F7C5B9A0EDD36CC2FCB9A3D1E4E44B2EC0B632CA3CD6042CA6E6197296A27C3102000000
random_padding_bytes = E23B1704D32FCBC16E74965D14350B320D29AB7D4E2122F16AD2D1918AB3ECC21DC7F80AE0B3CCF693BCFF1FD3E4ED32475BF98CE1F2266E02A1E38A8E063E45275FEDE5440761FE23290D9540EB6C29438CFFE901B62EB67B35DE30</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 = 24DAA34BCCAD2FBBD2208DB6DB23111EE68D22C54E7B85227146E3EF4D18F4DE1180F263A0683C83BD388F05BC4286A1840D3C025F1F2F6E12E05CBD64662F2837B5408A37E49A6A02597DF5FBA55A5039E453C7A29202104E5BA6D81977D483C6CA95816E1108C0957636ED792A583A29EFBB6E58A5CE580B60EAC14CB4BE11717353DCC25B022355EC0A20BA34CE884ACB4D7DBA189DBE013D62C009EB1890F43D598FAEDFF5BAEFCD1146DDEC1368D1718A51D2E4D067A9A04225A01CFE6CE64131F31108EAF186A943C15AA420E9FE8BF9F0E147D539E811B31F3E4FE3AF1593448C9E7FE203BE10DEF79BE0CA2928DE794990B3E98503B1D3A2666A210E</code></pre>
<pre><code>encrypted_data = B16201FAAC617C02890E3F2EF4E38AF92BC4098F4C5305670692872400A38855D3420A9C6E43E5CA84A675EFE5E8032432ED760A3293F243CEEB7E15249C0C3DFECC4E62E080F47A304DC7FC6A41260D3D58635754BDD6733EF31C7ABC7AFC37F0D3E911CC307EBFCFF1A2FAE5EECB3B8F8393CAA164C4BB4DF39D287FC2E33D03A91C8BE671CFE4596C52134659FFD1B569EC63F5E51559F13B4A6AD17E1494CD5653FBD85EB7592F7A80246AD0A164979E1A885BEEF08CE018982F39D2AAFC6C6EF52399D9812C5D0804E48877E5FDF4EB5E02D5B7EC19DBA6C5BEBB39EF6D4EE4B9CACF2090A423E4783B8F8437CE4A1E8586379077E58CFAB70FE26D68D4</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 CC 13 07 00 D0 86 B4 66
0010 | 40 01 00 00 BE E4 12 D7 7B D0 9C F3 4A 78 7B 68
0020 | 00 C2 38 51 E9 C5 4D AA C6 DF 0C 6A AF C0 E1 E2
0030 | 5A DF 65 38 56 25 59 30 04 3C 40 ED 49 00 00 00
0040 | 04 4B A1 CC 93 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 24 DA A3 4B CC AD 2F BB D2 20 8D B6
0060 | DB 23 11 1E E6 8D 22 C5 4E 7B 85 22 71 46 E3 EF
0070 | 4D 18 F4 DE 11 80 F2 63 A0 68 3C 83 BD 38 8F 05
0080 | BC 42 86 A1 84 0D 3C 02 5F 1F 2F 6E 12 E0 5C BD
0090 | 64 66 2F 28 37 B5 40 8A 37 E4 9A 6A 02 59 7D F5
00A0 | FB A5 5A 50 39 E4 53 C7 A2 92 02 10 4E 5B A6 D8
00B0 | 19 77 D4 83 C6 CA 95 81 6E 11 08 C0 95 76 36 ED
00C0 | 79 2A 58 3A 29 EF BB 6E 58 A5 CE 58 0B 60 EA C1
00D0 | 4C B4 BE 11 71 73 53 DC C2 5B 02 23 55 EC 0A 20
00E0 | BA 34 CE 88 4A CB 4D 7D BA 18 9D BE 01 3D 62 C0
00F0 | 09 EB 18 90 F4 3D 59 8F AE DF F5 BA EF CD 11 46
0100 | DD EC 13 68 D1 71 8A 51 D2 E4 D0 67 A9 A0 42 25
0110 | A0 1C FE 6C E6 41 31 F3 11 08 EA F1 86 A9 43 C1
0120 | 5A A4 20 E9 FE 8B F9 F0 E1 47 D5 39 E8 11 B3 1F
0130 | 3E 4F E3 AF 15 93 44 8C 9E 7F E2 03 BE 10 DE F7
0140 | 9B E0 CA 29 28 DE 79 49 90 B3 E9 85 03 B1 D3 A2
0150 | 66 6A 21 0E</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 38 F7 07 00 AF 87 B4 66
0010 | 40 01 00 00 BE E4 12 D7 99 EC CC 0F 6B 19 C1 6F
0020 | DD 4F FC 71 78 87 18 9E AC 68 B1 64 19 5C 2E FC
0030 | 74 7D D7 3B 71 E2 04 53 04 3D 22 2A 77 00 00 00
0040 | 04 5D 52 22 F9 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 B1 62 01 FA AC 61 7C 02 89 0E 3F 2E
0060 | F4 E3 8A F9 2B C4 09 8F 4C 53 05 67 06 92 87 24
0070 | 00 A3 88 55 D3 42 0A 9C 6E 43 E5 CA 84 A6 75 EF
0080 | E5 E8 03 24 32 ED 76 0A 32 93 F2 43 CE EB 7E 15
0090 | 24 9C 0C 3D FE CC 4E 62 E0 80 F4 7A 30 4D C7 FC
00A0 | 6A 41 26 0D 3D 58 63 57 54 BD D6 73 3E F3 1C 7A
00B0 | BC 7A FC 37 F0 D3 E9 11 CC 30 7E BF CF F1 A2 FA
00C0 | E5 EE CB 3B 8F 83 93 CA A1 64 C4 BB 4D F3 9D 28
00D0 | 7F C2 E3 3D 03 A9 1C 8B E6 71 CF E4 59 6C 52 13
00E0 | 46 59 FF D1 B5 69 EC 63 F5 E5 15 59 F1 3B 4A 6A
00F0 | D1 7E 14 94 CD 56 53 FB D8 5E B7 59 2F 7A 80 24
0100 | 6A D0 A1 64 97 9E 1A 88 5B EE F0 8C E0 18 98 2F
0110 | 39 D2 AA FC 6C 6E F5 23 99 D9 81 2C 5D 08 04 E4
0120 | 88 77 E5 FD F4 EB 5E 02 D5 B7 EC 19 DB A6 C5 BE
0130 | BB 39 EF 6D 4E E4 B9 CA CF 20 90 A4 23 E4 78 3B
0140 | 8F 84 37 CE 4A 1E 85 86 37 90 77 E5 8C FA B7 0F
0150 | E2 6D 68 D4</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 = 7AFED3ADE8049D4B312DBC99135E78B356A04E57DA3F178FB3439B457
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>CC130700D086B466</code></td>
<td><code>38F70700AF87B466</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 = 7AFED3ADE8049D4B312DBC99135E78B356A04E57DA3F178FB3439B457
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>7BD09CF34A787B6800C23851E9C54DAA</code></td>
<td><code>99ECCC0F6B19C16FDD4FFC717887189E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>C6DF0C6AAFC0E1E25ADF653856255930</code></td>
<td><code>AC68B164195C2EFC747DD73B71E20453</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>043C40ED49000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1010888009</td>
<td><code>043D222A77000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1025649271</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>044BA1CC93000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1268894867</td>
<td><code>045D5222F9000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1565663993</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 = 7AFED3ADE8049D4B312DBC99135E78B356A04E57DA3F178FB3439B457
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE00010024DAA34BCCAD2FBBD2208DB6</code> <code>DB23111EE68D22C54E7B85227146E3EF</code> <code>4D18F4DE1180F263A0683C83BD388F05</code> <code>BC4286A1840D3C025F1F2F6E12E05CBD</code> <code>64662F2837B5408A37E49A6A02597DF5</code> <code>FBA55A5039E453C7A29202104E5BA6D8</code> <code>1977D483C6CA95816E1108C0957636ED</code> <code>792A583A29EFBB6E58A5CE580B60EAC1</code> <code>4CB4BE11717353DCC25B022355EC0A20</code> <code>BA34CE884ACB4D7DBA189DBE013D62C0</code> <code>09EB1890F43D598FAEDFF5BAEFCD1146</code> <code>DDEC1368D1718A51D2E4D067A9A04225</code> <code>A01CFE6CE64131F31108EAF186A943C1</code> <code>5AA420E9FE8BF9F0E147D539E811B31F</code> <code>3E4FE3AF1593448C9E7FE203BE10DEF7</code> <code>9BE0CA2928DE794990B3E98503B1D3A2</code><br> <code>666A210E</code></td>
<td><code>FE000100B16201FAAC617C02890E3F2E</code> <code>F4E38AF92BC4098F4C53056706928724</code> <code>00A38855D3420A9C6E43E5CA84A675EF</code> <code>E5E8032432ED760A3293F243CEEB7E15</code> <code>249C0C3DFECC4E62E080F47A304DC7FC</code> <code>6A41260D3D58635754BDD6733EF31C7A</code> <code>BC7AFC37F0D3E911CC307EBFCFF1A2FA</code> <code>E5EECB3B8F8393CAA164C4BB4DF39D28</code> <code>7FC2E33D03A91C8BE671CFE4596C5213</code> <code>4659FFD1B569EC63F5E51559F13B4A6A</code> <code>D17E1494CD5653FBD85EB7592F7A8024</code> <code>6AD0A164979E1A885BEEF08CE018982F</code> <code>39D2AAFC6C6EF52399D9812C5D0804E4</code> <code>8877E5FDF4EB5E02D5B7EC19DBA6C5BE</code> <code>BB39EF6D4EE4B9CACF2090A423E4783B</code> <code>8F8437CE4A1E8586379077E58CFAB70F</code><br> <code>E26D68D4</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 7AFED3ADE8049D4B312DBC99135E78B356A04E57DA3F178FB3439B457
<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 64 B3 D6 D1 86 B4 66
0010 | E4 02 00 00 5C 07 E8 D0 7B D0 9C F3 4A 78 7B 68
0020 | 00 C2 38 51 E9 C5 4D AA C6 DF 0C 6A AF C0 E1 E2
0030 | 5A DF 65 38 56 25 59 30 FE 50 02 00 41 7D 04 C1
0040 | 9F EC 88 C7 9A ED 8F 36 45 AB 2F FF 82 FB 75 84
0050 | 4F B3 26 9A 9F 14 4E 6C B3 DA D0 03 E7 BC 89 BA
0060 | DE F3 00 13 55 F9 9B 08 04 BD 83 64 C9 0C D2 79
0070 | 8C 22 6B E2 5B 4E 1E 44 EA 7F 22 1B 91 F9 63 36
0080 | 21 6E 8C 04 DD F6 54 7A 5D 3A 8F 4A EF FA 35 34
0090 | 00 63 6D 4D 6F 9A 4A 0B 01 36 17 55 CD FC 0C F6
00A0 | E9 33 03 DA 4B 38 51 F3 0A 66 7A 57 0E 79 2B 4F
00B0 | A3 57 47 2D 1B CF A7 C5 15 EA 42 03 1C D5 C0 6E
00C0 | 49 3B 85 86 D1 E7 9C 27 57 80 C7 E4 A9 AA 10 C8
00D0 | EE A8 B4 7A 1C 45 00 D8 AC 1D 31 12 66 1C 0E 4B
00E0 | 9E 0A 65 A5 E2 FC B4 C0 6F 12 64 34 08 C7 E7 F5
00F0 | F5 AB 42 BA CD 4B 10 C2 A6 B9 0F 01 44 9D 62 2A
0100 | E4 3E 1B 40 43 27 DE 59 E7 F4 59 FF 64 2E FE 23
0110 | 6F C3 49 08 5F D4 D8 A7 D2 EB 2C A0 BC 20 7A A4
0120 | D3 C4 6B 66 A2 AF 0A B1 59 AC 2F 41 0A 48 D0 ED
0130 | 87 90 D3 DC 97 8A 4A 37 31 4D B3 80 A2 F1 1A 75
0140 | 58 EE 07 5B DC 2F 87 57 13 25 DA 6E 48 C6 61 31
0150 | 63 B0 12 43 7D 88 7B 23 0D EB AF B2 2D 5D 37 E5
0160 | 98 75 FD 51 DA 92 AF 68 36 0D 6E B5 11 C5 E0 AE
0170 | 19 DC 66 45 DD 97 D1 BE A6 90 FE 32 42 B2 2A A0
0180 | 9F 34 4E A2 9F A3 28 A0 50 A1 F3 67 98 28 DD 4C
0190 | AD 06 66 6E 6F F6 CD 5E 93 7C F7 69 E5 03 8F 05
01A0 | 9A A0 60 2B B3 FD 75 EA 92 39 AF 67 C2 00 40 7E
01B0 | EB 18 92 66 76 71 93 D3 2B A8 BF AD EF 55 81 AC
01C0 | 58 33 E7 E9 84 96 6A D3 4A 69 88 5D BC 79 C9 15
01D0 | A4 9E 82 36 2E 8D 30 7D 2A A6 B4 61 5F 55 FA 23
01E0 | 67 A0 82 17 C3 3E 40 92 DB F8 C1 D6 76 1D B8 A8
01F0 | F4 AA DB 2A F4 EE 5E 10 B5 59 BD C3 C3 7E 69 AF
0200 | 31 B6 4B 65 E8 85 8A 9C 0C C1 06 1D 12 1D 00 82
0210 | 7C 24 BF 3C CF 28 44 BE DF 5A 67 15 94 14 31 CF
0220 | 81 E0 46 DC 75 23 26 F2 C2 96 8D 8B 82 FF DE A5
0230 | 7D 81 A6 6A FC 77 7E 18 BC B5 60 9C 62 D6 59 48
0240 | A5 04 8C FE DE CE 4E 49 68 CD 35 3F 1F 5A 12 3F
0250 | 3A FD 1A 62 65 4D 82 6A A2 1C C4 04 E2 85 61 4B
0260 | 1C 45 96 FC 9A F2 4A 88 78 FF 0F 13 F4 60 38 09
0270 | 42 90 28 8E C3 A4 0D 23 5F F0 57 A9 FB CD 1A EE
0280 | F4 BC 81 6E 6E 49 0F 13 8C 92 EA D0</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 E8 3B 9E B0 87 B4 66
0010 | C8 02 00 00 5C 07 E8 D0 99 EC CC 0F 6B 19 C1 6F
0020 | DD 4F FC 71 78 87 18 9E AC 68 B1 64 19 5C 2E FC
0030 | 74 7D D7 3B 71 E2 04 53 FE 50 02 00 62 98 E1 76
0040 | DA E1 BE 81 E1 23 EC BE F2 A1 75 C5 B4 0D 7B F1
0050 | 54 3F FE 88 13 10 23 37 20 B6 9A 46 3E F4 97 6D
0060 | 78 A9 62 08 BD C0 76 13 D9 74 99 B6 C9 20 31 95
0070 | D8 7E 19 5E AE 38 EE 31 A2 D4 83 02 D4 30 9B 0E
0080 | 18 EE 96 19 58 CE 17 1D 34 D2 07 BA AD A5 B7 B5
0090 | F9 3D 13 02 BE 19 E5 F6 4D 8C 2D DC EA E4 72 92
00A0 | 12 49 1A EF 7D 9A A9 EF 5B 55 DE DD 16 08 A7 5B
00B0 | A0 D2 B7 B9 6C 33 AF FF 91 CD 7C 64 16 EE 08 F5
00C0 | F5 4B 07 61 FD DE F5 6A 5C CB 37 24 FB B1 34 6B
00D0 | B4 63 91 ED 90 D7 12 FE 55 B1 6D DF F9 3D 49 BD
00E0 | A3 52 0E CB CA 9E 09 69 C4 F5 D7 97 70 20 DD 08
00F0 | 17 C0 38 6D B0 80 9E 70 18 E0 04 F5 DD 53 A3 10
0100 | C6 38 F4 80 A8 09 AC 17 61 66 96 0C 86 60 86 EB
0110 | 30 5D 41 3C E2 CB 96 A4 4B 9E F1 F7 7C AE C0 88
0120 | 88 E9 D0 82 E5 F4 94 D7 88 09 DE 12 F2 43 88 CA
0130 | F2 E0 FA E1 AC 46 0D 57 E2 1F E5 4D E5 66 D1 79
0140 | 67 4F F1 50 6A 57 B2 54 BD 79 9A 15 63 F8 3C 6D
0150 | 2D CE 53 2F 0D 4B CF 6E 5D 2D 17 B7 F2 27 64 DC
0160 | 4E 23 95 D0 E9 F4 52 12 2B 40 82 F7 CE 60 25 4F
0170 | A8 92 D3 4B CB 86 C5 2F 60 19 46 07 67 29 BE 7E
0180 | FA 98 3A 9B 74 7E AA A6 29 3F 69 78 4A FC DB 17
0190 | 75 31 A5 D3 E7 D4 A2 84 21 90 78 4C 6F FF D7 B9
01A0 | F3 69 D0 B8 34 DE 79 9C 8A FA 31 C8 CF 80 46 F5
01B0 | FE 06 CE 67 C1 A7 34 AF 75 DC 4F F0 B3 33 E1 A2
01C0 | 30 00 C5 D0 7B 45 1F 92 B0 09 67 B4 85 3E 70 44
01D0 | A7 C4 77 C1 82 19 1E 76 E5 7C 2C EB 6E 1D D0 FA
01E0 | 2C F6 DB 82 44 32 CA 77 41 09 C1 36 3C AD 58 E4
01F0 | F0 F9 C6 C4 D0 61 77 93 73 2B C5 F0 B0 9C 9F 8C
0200 | EF 2E 38 BF EB 62 42 21 8C F6 FF 7D 95 C9 01 86
0210 | 5E FA 06 F6 F1 CF 00 28 9A B7 AE 83 BB E7 1A 0C
0220 | 40 A9 77 42 19 1E 5E F1 05 BA 13 35 87 71 E4 CE
0230 | D8 BD EE A9 DC 68 44 BA C6 BE 89 7C 95 C2 09 C6
0240 | 70 CC 38 6B E9 14 8D 41 63 72 28 3F E6 7D C5 70
0250 | 68 62 B8 9E F3 0A 6E 65 62 2A 0B 50 13 BC BA B0
0260 | 6E 67 ED B4 3A 20 23 9D 95 1E 46 9C 5B B0 6F 3D
0270 | 6D 02 36 29 18 12 40 1B 7B F5 12 81 F8 14 92 E7
0280 | 3F DA 2B DC AF F3 3A 82 89 C3 41 57</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 = 7AFED3ADE8049D4B312DBC99135E78B356A04E57DA3F178FB3439B457
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>0164B3D6D186B466</code></td>
<td><code>01E83B9EB087B466</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>E4020000</code> (740 in decimal)</td>
<td><code>C8020000</code> (712 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 7AFED3ADE8049D4B312DBC99135E78B356A04E57DA3F178FB3439B457
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>7BD09CF34A787B6800C23851E9C54DAA</code></td>
<td><code>99ECCC0F6B19C16FDD4FFC717887189E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>C6DF0C6AAFC0E1E25ADF653856255930</code></td>
<td><code>AC68B164195C2EFC747DD73B71E20453</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200417D04C19FEC88C79AED8F36</code> <code>45AB2FFF82FB75844FB3269A9F144E6C</code> <code>B3DAD003E7BC89BADEF3001355F99B08</code> <code>04BD8364C90CD2798C226BE25B4E1E44</code> <code>EA7F221B91F96336216E8C04DDF6547A</code> <code>5D3A8F4AEFFA353400636D4D6F9A4A0B</code> <code>01361755CDFC0CF6E93303DA4B3851F3</code> <code>0A667A570E792B4FA357472D1BCFA7C5</code> <code>15EA42031CD5C06E493B8586D1E79C27</code> <code>5780C7E4A9AA10C8EEA8B47A1C4500D8</code> <code>AC1D3112661C0E4B9E0A65A5E2FCB4C0</code> <code>6F12643408C7E7F5F5AB42BACD4B10C2</code> <code>A6B90F01449D622AE43E1B404327DE59</code> <code>E7F459FF642EFE236FC349085FD4D8A7</code> <code>D2EB2CA0BC207AA4D3C46B66A2AF0AB1</code> <code>59AC2F410A48D0ED8790D3DC978A4A37</code> <code>314DB380A2F11A7558EE075BDC2F8757</code> <code>1325DA6E48C6613163B012437D887B23</code> <code>0DEBAFB22D5D37E59875FD51DA92AF68</code> <code>360D6EB511C5E0AE19DC6645DD97D1BE</code> <code>A690FE3242B22AA09F344EA29FA328A0</code> <code>50A1F3679828DD4CAD06666E6FF6CD5E</code> <code>937CF769E5038F059AA0602BB3FD75EA</code> <code>9239AF67C200407EEB189266767193D3</code> <code>2BA8BFADEF5581AC5833E7E984966AD3</code> <code>4A69885DBC79C915A49E82362E8D307D</code> <code>2AA6B4615F55FA2367A08217C33E4092</code> <code>DBF8C1D6761DB8A8F4AADB2AF4EE5E10</code> <code>B559BDC3C37E69AF31B64B65E8858A9C</code> <code>0CC1061D121D00827C24BF3CCF2844BE</code> <code>DF5A6715941431CF81E046DC752326F2</code> <code>C2968D8B82FFDEA57D81A66AFC777E18</code> <code>BCB5609C62D65948A5048CFEDECE4E49</code> <code>68CD353F1F5A123F3AFD1A62654D826A</code> <code>A21CC404E285614B1C4596FC9AF24A88</code> <code>78FF0F13F46038094290288EC3A40D23</code> <code>5FF057A9FBCD1AEEF4BC816E6E490F13</code><br> <code>8C92EAD0</code></td>
<td><code>FE5002006298E176DAE1BE81E123ECBE</code> <code>F2A175C5B40D7BF1543FFE8813102337</code> <code>20B69A463EF4976D78A96208BDC07613</code> <code>D97499B6C9203195D87E195EAE38EE31</code> <code>A2D48302D4309B0E18EE961958CE171D</code> <code>34D207BAADA5B7B5F93D1302BE19E5F6</code> <code>4D8C2DDCEAE4729212491AEF7D9AA9EF</code> <code>5B55DEDD1608A75BA0D2B7B96C33AFFF</code> <code>91CD7C6416EE08F5F54B0761FDDEF56A</code> <code>5CCB3724FBB1346BB46391ED90D712FE</code> <code>55B16DDFF93D49BDA3520ECBCA9E0969</code> <code>C4F5D7977020DD0817C0386DB0809E70</code> <code>18E004F5DD53A310C638F480A809AC17</code> <code>6166960C866086EB305D413CE2CB96A4</code> <code>4B9EF1F77CAEC08888E9D082E5F494D7</code> <code>8809DE12F24388CAF2E0FAE1AC460D57</code> <code>E21FE54DE566D179674FF1506A57B254</code> <code>BD799A1563F83C6D2DCE532F0D4BCF6E</code> <code>5D2D17B7F22764DC4E2395D0E9F45212</code> <code>2B4082F7CE60254FA892D34BCB86C52F</code> <code>601946076729BE7EFA983A9B747EAAA6</code> <code>293F69784AFCDB177531A5D3E7D4A284</code> <code>2190784C6FFFD7B9F369D0B834DE799C</code> <code>8AFA31C8CF8046F5FE06CE67C1A734AF</code> <code>75DC4FF0B333E1A23000C5D07B451F92</code> <code>B00967B4853E7044A7C477C182191E76</code> <code>E57C2CEB6E1DD0FA2CF6DB824432CA77</code> <code>4109C1363CAD58E4F0F9C6C4D0617793</code> <code>732BC5F0B09C9F8CEF2E38BFEB624221</code> <code>8CF6FF7D95C901865EFA06F6F1CF0028</code> <code>9AB7AE83BBE71A0C40A97742191E5EF1</code> <code>05BA13358771E4CED8BDEEA9DC6844BA</code> <code>C6BE897C95C209C670CC386BE9148D41</code> <code>6372283FE67DC5706862B89EF30A6E65</code> <code>622A0B5013BCBAB06E67EDB43A20239D</code> <code>951E469C5BB06F3D6D0236291812401B</code> <code>7BF51281F81492E73FDA2BDCAFF33A82</code><br> <code>89C34157</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 7AFED3ADE8049D4B312DBC99135E78B356A04E57DA3F178FB3439B457
<!-- 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 = 417D04C19FEC88C79AED8F3645AB2FFF82FB75844FB3269A9F144E6CB3DAD003E7BC89BADEF3001355F99B0804BD8364C90CD2798C226BE25B4E1E44EA7F221B91F96336216E8C04DDF6547A5D3A8F4AEFFA353400636D4D6F9A4A0B01361755CDFC0CF6E93303DA4B3851F30A667A570E792B4FA357472D1BCFA7C515EA42031CD5C06E493B8586D1E79C275780C7E4A9AA10C8EEA8B47A1C4500D8AC1D3112661C0E4B9E0A65A5E2FCB4C06F12643408C7E7F5F5AB42BACD4B10C2A6B90F01449D622AE43E1B404327DE59E7F459FF642EFE236FC349085FD4D8A7D2EB2CA0BC207AA4D3C46B66A2AF0AB159AC2F410A48D0ED8790D3DC978A4A37314DB380A2F11A7558EE075BDC2F87571325DA6E48C6613163B012437D887B230DEBAFB22D5D37E59875FD51DA92AF68360D6EB511C5E0AE19DC6645DD97D1BEA690FE3242B22AA09F344EA29FA328A050A1F3679828DD4CAD06666E6FF6CD5E937CF769E5038F059AA0602BB3FD75EA9239AF67C200407EEB189266767193D32BA8BFADEF5581AC5833E7E984966AD34A69885DBC79C915A49E82362E8D307D2AA6B4615F55FA2367A08217C33E4092DBF8C1D6761DB8A8F4AADB2AF4EE5E10B559BDC3C37E69AF31B64B65E8858A9C0CC1061D121D00827C24BF3CCF2844BEDF5A6715941431CF81E046DC752326F2C2968D8B82FFDEA57D81A66AFC777E18BCB5609C62D65948A5048CFEDECE4E4968CD353F1F5A123F3AFD1A62654D826AA21CC404E285614B1C4596FC9AF24A8878FF0F13F46038094290288EC3A40D235FF057A9FBCD1AEEF4BC816E6E490F138C92EAD0
tmp_aes_key = 40B6732602856F6EE65A440754D4D649C0EA440BA91054B5AEB8469DA6F64660
tmp_aes_iv = CE4B145477DA8934B9D6C79304FED9A787000E60091DD4938CAB4799E5275DA6</code></pre>
<pre><code>encrypted_answer = 6298E176DAE1BE81E123ECBEF2A175C5B40D7BF1543FFE881310233720B69A463EF4976D78A96208BDC07613D97499B6C9203195D87E195EAE38EE31A2D48302D4309B0E18EE961958CE171D34D207BAADA5B7B5F93D1302BE19E5F64D8C2DDCEAE4729212491AEF7D9AA9EF5B55DEDD1608A75BA0D2B7B96C33AFFF91CD7C6416EE08F5F54B0761FDDEF56A5CCB3724FBB1346BB46391ED90D712FE55B16DDFF93D49BDA3520ECBCA9E0969C4F5D7977020DD0817C0386DB0809E7018E004F5DD53A310C638F480A809AC176166960C866086EB305D413CE2CB96A44B9EF1F77CAEC08888E9D082E5F494D78809DE12F24388CAF2E0FAE1AC460D57E21FE54DE566D179674FF1506A57B254BD799A1563F83C6D2DCE532F0D4BCF6E5D2D17B7F22764DC4E2395D0E9F452122B4082F7CE60254FA892D34BCB86C52F601946076729BE7EFA983A9B747EAAA6293F69784AFCDB177531A5D3E7D4A2842190784C6FFFD7B9F369D0B834DE799C8AFA31C8CF8046F5FE06CE67C1A734AF75DC4FF0B333E1A23000C5D07B451F92B00967B4853E7044A7C477C182191E76E57C2CEB6E1DD0FA2CF6DB824432CA774109C1363CAD58E4F0F9C6C4D0617793732BC5F0B09C9F8CEF2E38BFEB6242218CF6FF7D95C901865EFA06F6F1CF00289AB7AE83BBE71A0C40A97742191E5EF105BA13358771E4CED8BDEEA9DC6844BAC6BE897C95C209C670CC386BE9148D416372283FE67DC5706862B89EF30A6E65622A0B5013BCBAB06E67EDB43A20239D951E469C5BB06F3D6D0236291812401B7BF51281F81492E73FDA2BDCAFF33A8289C34157
tmp_aes_key = B57216FBF6DAB012F1B4998A01FFE22401270B9925B87167DB7FE54C40CBB7A7
tmp_aes_iv = 0C456240B4813C535B6552A331F66BF653407346266DEC029EA59885F7C5B9A0</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = FBCF51CDEA13F4DA73B70521F53FF72AC5FB2515BA0D89B57BD09CF34A787B6800C23851E9C54DAAC6DF0C6AAFC0E1E25ADF65385625593003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100599250D19D9B3790FB63E9F73A6A890FBB6294DB99087DC8B484C720FB9B0960B34F2704523D90EA534802922D3475696543E49C0240ED7609A7C557ED3B5F416DBA23971B00A3AFCB4BEE7ACAB12CDA914C186ACC7E65897FCE222563DFBD96791156EA6E1EFFA8987C32700E86E26AA2F6E4CC42A1C45EE34DC630C5DA448B723660A500E4D96A8896112A297E3A24F5118615B7FA2FA8F1D0C504618FC1FE9E2AA01CEE99E8DD58220ED5D54EA9993D5A85C7D724C4EA6239554423F1D43C12D96E9210E08D8D6A6EB5CB3C3CD6CD943BE376C8B3E7D62BD5C50EB048FEF326DA71DC468678AC6DC70441DF419E55E0AEEF4D1B2AFEC64D97F573FDD9C265D186B466855637A8F90B72DF
answer = BA0D89B57BD09CF34A787B6800C23851E9C54DAAC6DF0C6AAFC0E1E25ADF65385625593003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100599250D19D9B3790FB63E9F73A6A890FBB6294DB99087DC8B484C720FB9B0960B34F2704523D90EA534802922D3475696543E49C0240ED7609A7C557ED3B5F416DBA23971B00A3AFCB4BEE7ACAB12CDA914C186ACC7E65897FCE222563DFBD96791156EA6E1EFFA8987C32700E86E26AA2F6E4CC42A1C45EE34DC630C5DA448B723660A500E4D96A8896112A297E3A24F5118615B7FA2FA8F1D0C504618FC1FE9E2AA01CEE99E8DD58220ED5D54EA9993D5A85C7D724C4EA6239554423F1D43C12D96E9210E08D8D6A6EB5CB3C3CD6CD943BE376C8B3E7D62BD5C50EB048FEF326DA71DC468678AC6DC70441DF419E55E0AEEF4D1B2AFEC64D97F573FDD9C265D186B466855637A8F90B72DF</code></pre>
<pre><code>answer_with_hash = BA102B9BF0233800932346CD26E3CFEF440FEFD4BA0D89B599ECCC0F6B19C16FDD4FFC717887189EAC68B164195C2EFC747DD73B71E2045303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001003EB790B75D1E855DAE0C9A87507EC82ABCE4D43B84836A9158B77E7F14B98E1684D00913A8715C5D876AD60EE1FEB6C6D76B5240B765F193904722B631611900BD5ACCF84AD0FC9066A352FF4CDBC65E64A6A42E1A3865A84FB7DD34E11598043A0039428836711CA2D3A5AC9524A5E5C74FE64118399A949EABD4036B5CAA16807D15EB908F88EE5B80B0CBD460622A23F4B8CAAD924E7A7B98C9C6280C5CA447E00493C2FC5546C09A674F5BFA7402B5AAEA8736BA976F2B24F2169300FC3D5EA50A879E7EF0B89A2C997035392DAD6DF7D8E7F21E9C5928E0ADD571A31077ADFC85DDA17BAD2559656CADE175786D47ED62B50B19D6710409D9AC3319477FB087B466C78D940B1F4C9846
answer = BA0D89B599ECCC0F6B19C16FDD4FFC717887189EAC68B164195C2EFC747DD73B71E2045303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001003EB790B75D1E855DAE0C9A87507EC82ABCE4D43B84836A9158B77E7F14B98E1684D00913A8715C5D876AD60EE1FEB6C6D76B5240B765F193904722B631611900BD5ACCF84AD0FC9066A352FF4CDBC65E64A6A42E1A3865A84FB7DD34E11598043A0039428836711CA2D3A5AC9524A5E5C74FE64118399A949EABD4036B5CAA16807D15EB908F88EE5B80B0CBD460622A23F4B8CAAD924E7A7B98C9C6280C5CA447E00493C2FC5546C09A674F5BFA7402B5AAEA8736BA976F2B24F2169300FC3D5EA50A879E7EF0B89A2C997035392DAD6DF7D8E7F21E9C5928E0ADD571A31077ADFC85DDA17BAD2559656CADE175786D47ED62B50B19D6710409D9AC3319477FB087B466C78D940B1F4C9846</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 7B D0 9C F3 4A 78 7B 68 00 C2 38 51
0010 | E9 C5 4D AA C6 DF 0C 6A AF C0 E1 E2 5A DF 65 38
0020 | 56 25 59 30 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 99 EC CC 0F 6B 19 C1 6F DD 4F FC 71
0010 | 78 87 18 9E AC 68 B1 64 19 5C 2E FC 74 7D D7 3B
0020 | 71 E2 04 53 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 = BA0D89B57BD09CF34A787B6800C23851E9C54DAAC6DF0C6AAFC0E1E25ADF65385625593
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 | 59 92 50 D1 9D 9B 37 90 FB 63 E9 F7 3A 6A 89 0F
0140 | BB 62 94 DB 99 08 7D C8 B4 84 C7 20 FB 9B 09 60
0150 | B3 4F 27 04 52 3D 90 EA 53 48 02 92 2D 34 75 69
0160 | 65 43 E4 9C 02 40 ED 76 09 A7 C5 57 ED 3B 5F 41
0170 | 6D BA 23 97 1B 00 A3 AF CB 4B EE 7A CA B1 2C DA
0180 | 91 4C 18 6A CC 7E 65 89 7F CE 22 25 63 DF BD 96
0190 | 79 11 56 EA 6E 1E FF A8 98 7C 32 70 0E 86 E2 6A
01A0 | A2 F6 E4 CC 42 A1 C4 5E E3 4D C6 30 C5 DA 44 8B
01B0 | 72 36 60 A5 00 E4 D9 6A 88 96 11 2A 29 7E 3A 24
01C0 | F5 11 86 15 B7 FA 2F A8 F1 D0 C5 04 61 8F C1 FE
01D0 | 9E 2A A0 1C EE 99 E8 DD 58 22 0E D5 D5 4E A9 99
01E0 | 3D 5A 85 C7 D7 24 C4 EA 62 39 55 44 23 F1 D4 3C
01F0 | 12 D9 6E 92 10 E0 8D 8D 6A 6E B5 CB 3C 3C D6 CD
0200 | 94 3B E3 76 C8 B3 E7 D6 2B D5 C5 0E B0 48 FE F3
0210 | 26 DA 71 DC 46 86 78 AC 6D C7 04 41 DF 41 9E 55
0220 | E0 AE EF 4D 1B 2A FE C6 4D 97 F5 73 FD D9 C2 65
0230 | D1 86 B4 66</code></pre>
0130 | 3E B7 90 B7 5D 1E 85 5D AE 0C 9A 87 50 7E C8 2A
0140 | BC E4 D4 3B 84 83 6A 91 58 B7 7E 7F 14 B9 8E 16
0150 | 84 D0 09 13 A8 71 5C 5D 87 6A D6 0E E1 FE B6 C6
0160 | D7 6B 52 40 B7 65 F1 93 90 47 22 B6 31 61 19 00
0170 | BD 5A CC F8 4A D0 FC 90 66 A3 52 FF 4C DB C6 5E
0180 | 64 A6 A4 2E 1A 38 65 A8 4F B7 DD 34 E1 15 98 04
0190 | 3A 00 39 42 88 36 71 1C A2 D3 A5 AC 95 24 A5 E5
01A0 | C7 4F E6 41 18 39 9A 94 9E AB D4 03 6B 5C AA 16
01B0 | 80 7D 15 EB 90 8F 88 EE 5B 80 B0 CB D4 60 62 2A
01C0 | 23 F4 B8 CA AD 92 4E 7A 7B 98 C9 C6 28 0C 5C A4
01D0 | 47 E0 04 93 C2 FC 55 46 C0 9A 67 4F 5B FA 74 02
01E0 | B5 AA EA 87 36 BA 97 6F 2B 24 F2 16 93 00 FC 3D
01F0 | 5E A5 0A 87 9E 7E F0 B8 9A 2C 99 70 35 39 2D AD
0200 | 6D F7 D8 E7 F2 1E 9C 59 28 E0 AD D5 71 A3 10 77
0210 | AD FC 85 DD A1 7B AD 25 59 65 6C AD E1 75 78 6D
0220 | 47 ED 62 B5 0B 19 D6 71 04 09 D9 AC 33 19 47 7F
0230 | B0 87 B4 66</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
<table class="table">
@ -570,13 +570,13 @@ answer = BA0D89B57BD09CF34A787B6800C23851E9C54DAAC6DF0C6AAFC0E1E25ADF65385625593
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>7BD09CF34A787B6800C23851E9C54DAA</code></td>
<td><code>99ECCC0F6B19C16FDD4FFC717887189E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>C6DF0C6AAFC0E1E25ADF653856255930</code></td>
<td><code>AC68B164195C2EFC747DD73B71E20453</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B57BD09CF34A787B6800C23851E9C54DAAC6DF0C6AAFC0E1E25ADF65385625593
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE000100599250D19D9B3790FB63E9F7</code> <code>3A6A890FBB6294DB99087DC8B484C720</code> <code>FB9B0960B34F2704523D90EA53480292</code> <code>2D3475696543E49C0240ED7609A7C557</code> <code>ED3B5F416DBA23971B00A3AFCB4BEE7A</code> <code>CAB12CDA914C186ACC7E65897FCE2225</code> <code>63DFBD96791156EA6E1EFFA8987C3270</code> <code>0E86E26AA2F6E4CC42A1C45EE34DC630</code> <code>C5DA448B723660A500E4D96A8896112A</code> <code>297E3A24F5118615B7FA2FA8F1D0C504</code> <code>618FC1FE9E2AA01CEE99E8DD58220ED5</code> <code>D54EA9993D5A85C7D724C4EA62395544</code> <code>23F1D43C12D96E9210E08D8D6A6EB5CB</code> <code>3C3CD6CD943BE376C8B3E7D62BD5C50E</code> <code>B048FEF326DA71DC468678AC6DC70441</code> <code>DF419E55E0AEEF4D1B2AFEC64D97F573</code><br> <code>FDD9C265</code></td>
<td><code>FE0001003EB790B75D1E855DAE0C9A87</code> <code>507EC82ABCE4D43B84836A9158B77E7F</code> <code>14B98E1684D00913A8715C5D876AD60E</code> <code>E1FEB6C6D76B5240B765F193904722B6</code> <code>31611900BD5ACCF84AD0FC9066A352FF</code> <code>4CDBC65E64A6A42E1A3865A84FB7DD34</code> <code>E11598043A0039428836711CA2D3A5AC</code> <code>9524A5E5C74FE64118399A949EABD403</code> <code>6B5CAA16807D15EB908F88EE5B80B0CB</code> <code>D460622A23F4B8CAAD924E7A7B98C9C6</code> <code>280C5CA447E00493C2FC5546C09A674F</code> <code>5BFA7402B5AAEA8736BA976F2B24F216</code> <code>9300FC3D5EA50A879E7EF0B89A2C9970</code> <code>35392DAD6DF7D8E7F21E9C5928E0ADD5</code> <code>71A31077ADFC85DDA17BAD2559656CAD</code> <code>E175786D47ED62B50B19D6710409D9AC</code><br> <code>3319477F</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>D186B466</code> (1723107025 in decimal)</td>
<td><code>B087B466</code> (1723107248 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B57BD09CF34A787B6800C23851E9C54DAAC6DF0C6AAFC0E1E25ADF65385625593
<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 = 45B9C32453692EBEBC16E1FCF7F821531522BF17939B60FAC74707BA527BC4DB4B98B25EFC01A77A7150468ECCEB3FB457690B48A21B7C1208BFD200A56EB40CC376B90B7C677392B8E2571CD1BCCBACC2C653E36760CCE065CD7D67071ADCEAC14EF7D834211333B814A2E95E524D4106242FEF20BA36CA8F47BAB6866CC9DB2EC663E439994649CAEB2765855F07C7CDDCBBC6ED0C5726CF627E4AD315010CC09866785FC23DECBF6205F4BF433C53D9CFC68B5886F8591CEF52BDC78DF8710412C7FEDA349C88CCC1E16F7267459B0FD809398792C171B28A8AB039C7F85C252201276998C95A5B4B8E1A93483186F295FFB9791B66F12CA9DA1DF960158F</code></pre>
<pre><code>b = EB10955BE3815A9B4A0190824E516024BC4CB1260A37A0264383E7EE188C119CA4B5768F979D81F6328659B57306E800AF9D5CA4B122D167B4F7D4CBA38B3251F57F873E804B4A83F5531F6ED9D5220DE33C27BCC7FE4642B5BE7DEC47AC9EA4F49C42E1B400BE48A8C700EDF3A925F107BC9FAE32DC5D8DC52AAF6E0BAEE1D999AA1E9257CFA4EF0525BC57F29E3D9CE2149680D410346F865FDE6294D9B08B7375FF4B3236C87CFA03AF897E94568A513FE45F55BA0852E390EAFA46326EA4F3CB05C358BACA1767BB657D885C6E99D4BE2723396366E553DADD67187124C3EDF6824DFC608C69FE818C5F7B35BAAD32BEF1F5707D1EC1508731F8C726037A</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 = 10C3445D110331FC26F48F8827480015DF98A8BFF7DEF60B60F6CDB65E99A662D1493D974D04E3543F4E949A7E0BA60438629071D79EA0D47A021F867F197B6203F67393C6949B32CD8D422757296AEA0ACBCCBF42A4EA9D0BCF765440CC9CC75A7078862418D53646B4360BCA3D00A63272622314907A1CB6534F2913C3638EBD04D15ECE501D47F860B1D7E41DD796679ACD31BF650218EEFE802BC5E01AD0295CADC5E8F97FAE9D352E592E9D416A133EDE579EBF0E40BA19E24CB6E90A3938469D41BE0E32C78B9C394657A4388FC838086305B6BE7DA6B618698EBB393A2D96BF6E323BE850007DA5809A001D5447E23FE3BE7D246C88E8E4A7B9FD8E36</code></pre>
<pre><code>g_b = 97F8134E9580C5F6B35503AE99F15F06068FE414F1AD84FC1A8EB94590755AD20BF6B06A30998FF6FAD05C4455E5DF8757F85AB25AB17AF0AEACE4CCC530B1750ED5DF2150D34D4FB0C9B07719E37A7FEF020F3852B9EEFD8CCD96ECA15803EACB21FF7EDFA6C04F10EAEC4C062513119F2CA789ACCD0F77952A1FC8B292D7A0AE6EE4570DFB0F9D9ABEDF829E4145FD11AEFBA573C39329277674C85E5DA3CB36B98ADD317D864AFD84A3DADF27F51C22BD4521C36F00BA9F769EACDBAB9D6812FA03E4134B31BCDA52DBD4882B51DAF4659D891B5BAC0A3879F6E10351CEFB123ED46FB109ADC2D0ADEE31C06ADBEA8844BFAFADF0DB631275D1D82851AF15</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 7B D0 9C F3 4A 78 7B 68 00 C2 38 51
0010 | E9 C5 4D AA C6 DF 0C 6A AF C0 E1 E2 5A DF 65 38
0020 | 56 25 59 30 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 10 C3 44 5D 11 03 31 FC 26 F4 8F 88 27 48 00 15
0040 | DF 98 A8 BF F7 DE F6 0B 60 F6 CD B6 5E 99 A6 62
0050 | D1 49 3D 97 4D 04 E3 54 3F 4E 94 9A 7E 0B A6 04
0060 | 38 62 90 71 D7 9E A0 D4 7A 02 1F 86 7F 19 7B 62
0070 | 03 F6 73 93 C6 94 9B 32 CD 8D 42 27 57 29 6A EA
0080 | 0A CB CC BF 42 A4 EA 9D 0B CF 76 54 40 CC 9C C7
0090 | 5A 70 78 86 24 18 D5 36 46 B4 36 0B CA 3D 00 A6
00A0 | 32 72 62 23 14 90 7A 1C B6 53 4F 29 13 C3 63 8E
00B0 | BD 04 D1 5E CE 50 1D 47 F8 60 B1 D7 E4 1D D7 96
00C0 | 67 9A CD 31 BF 65 02 18 EE FE 80 2B C5 E0 1A D0
00D0 | 29 5C AD C5 E8 F9 7F AE 9D 35 2E 59 2E 9D 41 6A
00E0 | 13 3E DE 57 9E BF 0E 40 BA 19 E2 4C B6 E9 0A 39
00F0 | 38 46 9D 41 BE 0E 32 C7 8B 9C 39 46 57 A4 38 8F
0100 | C8 38 08 63 05 B6 BE 7D A6 B6 18 69 8E BB 39 3A
0110 | 2D 96 BF 6E 32 3B E8 50 00 7D A5 80 9A 00 1D 54
0120 | 47 E2 3F E3 BE 7D 24 6C 88 E8 E4 A7 B9 FD 8E 36</code></pre>
<pre><code>0000 | 54 B6 43 66 99 EC CC 0F 6B 19 C1 6F DD 4F FC 71
0010 | 78 87 18 9E AC 68 B1 64 19 5C 2E FC 74 7D D7 3B
0020 | 71 E2 04 53 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 97 F8 13 4E 95 80 C5 F6 B3 55 03 AE 99 F1 5F 06
0040 | 06 8F E4 14 F1 AD 84 FC 1A 8E B9 45 90 75 5A D2
0050 | 0B F6 B0 6A 30 99 8F F6 FA D0 5C 44 55 E5 DF 87
0060 | 57 F8 5A B2 5A B1 7A F0 AE AC E4 CC C5 30 B1 75
0070 | 0E D5 DF 21 50 D3 4D 4F B0 C9 B0 77 19 E3 7A 7F
0080 | EF 02 0F 38 52 B9 EE FD 8C CD 96 EC A1 58 03 EA
0090 | CB 21 FF 7E DF A6 C0 4F 10 EA EC 4C 06 25 13 11
00A0 | 9F 2C A7 89 AC CD 0F 77 95 2A 1F C8 B2 92 D7 A0
00B0 | AE 6E E4 57 0D FB 0F 9D 9A BE DF 82 9E 41 45 FD
00C0 | 11 AE FB A5 73 C3 93 29 27 76 74 C8 5E 5D A3 CB
00D0 | 36 B9 8A DD 31 7D 86 4A FD 84 A3 DA DF 27 F5 1C
00E0 | 22 BD 45 21 C3 6F 00 BA 9F 76 9E AC DB AB 9D 68
00F0 | 12 FA 03 E4 13 4B 31 BC DA 52 DB D4 88 2B 51 DA
0100 | F4 65 9D 89 1B 5B AC 0A 38 79 F6 E1 03 51 CE FB
0110 | 12 3E D4 6F B1 09 AD C2 D0 AD EE 31 C0 6A DB EA
0120 | 88 44 BF AF AD F0 DB 63 12 75 D1 D8 28 51 AF 15</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 = BA0D89B57BD09CF34A787B6800C23851E9C54DAAC6DF0C6AAFC0E1E25ADF65385625593
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>7BD09CF34A787B6800C23851E9C54DAA</code></td>
<td><code>99ECCC0F6B19C16FDD4FFC717887189E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>C6DF0C6AAFC0E1E25ADF653856255930</code></td>
<td><code>AC68B164195C2EFC747DD73B71E20453</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE00010010C3445D110331FC26F48F88</code> <code>27480015DF98A8BFF7DEF60B60F6CDB6</code> <code>5E99A662D1493D974D04E3543F4E949A</code> <code>7E0BA60438629071D79EA0D47A021F86</code> <code>7F197B6203F67393C6949B32CD8D4227</code> <code>57296AEA0ACBCCBF42A4EA9D0BCF7654</code> <code>40CC9CC75A7078862418D53646B4360B</code> <code>CA3D00A63272622314907A1CB6534F29</code> <code>13C3638EBD04D15ECE501D47F860B1D7</code> <code>E41DD796679ACD31BF650218EEFE802B</code> <code>C5E01AD0295CADC5E8F97FAE9D352E59</code> <code>2E9D416A133EDE579EBF0E40BA19E24C</code> <code>B6E90A3938469D41BE0E32C78B9C3946</code> <code>57A4388FC838086305B6BE7DA6B61869</code> <code>8EBB393A2D96BF6E323BE850007DA580</code> <code>9A001D5447E23FE3BE7D246C88E8E4A7</code><br> <code>B9FD8E36</code></td>
<td><code>FE00010097F8134E9580C5F6B35503AE</code> <code>99F15F06068FE414F1AD84FC1A8EB945</code> <code>90755AD20BF6B06A30998FF6FAD05C44</code> <code>55E5DF8757F85AB25AB17AF0AEACE4CC</code> <code>C530B1750ED5DF2150D34D4FB0C9B077</code> <code>19E37A7FEF020F3852B9EEFD8CCD96EC</code> <code>A15803EACB21FF7EDFA6C04F10EAEC4C</code> <code>062513119F2CA789ACCD0F77952A1FC8</code> <code>B292D7A0AE6EE4570DFB0F9D9ABEDF82</code> <code>9E4145FD11AEFBA573C39329277674C8</code> <code>5E5DA3CB36B98ADD317D864AFD84A3DA</code> <code>DF27F51C22BD4521C36F00BA9F769EAC</code> <code>DBAB9D6812FA03E4134B31BCDA52DBD4</code> <code>882B51DAF4659D891B5BAC0A3879F6E1</code> <code>0351CEFB123ED46FB109ADC2D0ADEE31</code> <code>C06ADBEA8844BFAFADF0DB631275D1D8</code><br> <code>2851AF15</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 = BA0D89B57BD09CF34A787B6800C23851E9C54DAAC6DF0C6AAFC0E1E25ADF65385625593
<!-- 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 = 54B643667BD09CF34A787B6800C23851E9C54DAAC6DF0C6AAFC0E1E25ADF6538562559300000000000000000FE00010010C3445D110331FC26F48F8827480015DF98A8BFF7DEF60B60F6CDB65E99A662D1493D974D04E3543F4E949A7E0BA60438629071D79EA0D47A021F867F197B6203F67393C6949B32CD8D422757296AEA0ACBCCBF42A4EA9D0BCF765440CC9CC75A7078862418D53646B4360BCA3D00A63272622314907A1CB6534F2913C3638EBD04D15ECE501D47F860B1D7E41DD796679ACD31BF650218EEFE802BC5E01AD0295CADC5E8F97FAE9D352E592E9D416A133EDE579EBF0E40BA19E24CB6E90A3938469D41BE0E32C78B9C394657A4388FC838086305B6BE7DA6B618698EBB393A2D96BF6E323BE850007DA5809A001D5447E23FE3BE7D246C88E8E4A7B9FD8E36
padding = B456048A0A7A890CDF5F49A4
tmp_aes_key = 40B6732602856F6EE65A440754D4D649C0EA440BA91054B5AEB8469DA6F64660
tmp_aes_iv = CE4B145477DA8934B9D6C79304FED9A787000E60091DD4938CAB4799E5275DA6</code></pre>
<pre><code>data = 54B6436699ECCC0F6B19C16FDD4FFC717887189EAC68B164195C2EFC747DD73B71E204530000000000000000FE00010097F8134E9580C5F6B35503AE99F15F06068FE414F1AD84FC1A8EB94590755AD20BF6B06A30998FF6FAD05C4455E5DF8757F85AB25AB17AF0AEACE4CCC530B1750ED5DF2150D34D4FB0C9B07719E37A7FEF020F3852B9EEFD8CCD96ECA15803EACB21FF7EDFA6C04F10EAEC4C062513119F2CA789ACCD0F77952A1FC8B292D7A0AE6EE4570DFB0F9D9ABEDF829E4145FD11AEFBA573C39329277674C85E5DA3CB36B98ADD317D864AFD84A3DADF27F51C22BD4521C36F00BA9F769EACDBAB9D6812FA03E4134B31BCDA52DBD4882B51DAF4659D891B5BAC0A3879F6E10351CEFB123ED46FB109ADC2D0ADEE31C06ADBEA8844BFAFADF0DB631275D1D82851AF15
padding = 43C273A1022B254B5DD69898
tmp_aes_key = B57216FBF6DAB012F1B4998A01FFE22401270B9925B87167DB7FE54C40CBB7A7
tmp_aes_iv = 0C456240B4813C535B6552A331F66BF653407346266DEC029EA59885F7C5B9A0</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 = D9B2FE48E960432E4AFAABA9EBD7417A8B70EA09552DF8D3ACF49001D9135AE9C52377C66AB9A25DFE8691CBC5E58BB60E8723E943795134867D486191581AE748DF0E732497C47C79A3A886358405A4114322DE6ED3BE97A398F277DE2F9D6C5EF67963F0B682AD0DF74F11EBB74B5858447854B089E09785235F3C2BD26D7182F2386867B3F16B506718C369A00F99A10681671FC16F2ADDAE894B5B320ECC4EE0DF16EBE2FDC6AF159671B5E0F7CDAA16D866546252B3EF475A9953819A8718B22DAA6AEC3CDE3EA4C8179837A2E060CCED41A7A83061A6721352705514D620FDFCAD3811D489FE4669EF66AB3E39D0E62D197EB24DC2FF53D43DE0A28009B806DB200FE1FEE5452FDFD88991101316F3C91CD5D14A4039D12CF1729200B9E698BE6CD4F5A53794BDCCBAF5951A1E7B79EB606C0EEB99728F00FC4B474CE3AA3F23FEE7AC37DAF4806EE772C3B92F</code></pre>
<pre><code>encrypted_data = 2A17055B4CB3149B442D350CC072C58755D0F192D9AFCF916667E5286434ABF6E36338B99D04506460A79C660D8C39833630BED623DB67D716E40B295407A1B7508D7DD8CE0568E491A7277DD22541EE705A3273B909241EF099610282D9D5F38C0EEB1840142088F3186D0DE351F5FF61D0B954980CBB5FF7B2316BD2016D2418D990CED17C2E3142D98B960113A7ABB0B32ABF695968D0283EEC4BEDDA8499E67787396D18C849871DC6231C45FA9363B58FCFE00505D516760BCEDF4229C0E8DFAE8B9395F082CBFBB26C4CD88E1522675F58AEE2B766C8818527CFBF08D7742F968C111F7E0CE49ECC9A147CFC53B01AF4303E0A4C6E1BB32B5065A459893961FB2066D933FC25D8A16D9630E1084F75CA52F4B28334C133A26FCB268A5F9D2D8F35553BB6E5D565C6C0A416D18EB46CB04D4418229EEE37BCB3B06B8BB182610FAA4F57B8B74D10C4BB900C295C</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 A0 D3 01 00 D1 86 B4 66
0010 | 78 01 00 00 1F 5F 04 F5 7B D0 9C F3 4A 78 7B 68
0020 | 00 C2 38 51 E9 C5 4D AA C6 DF 0C 6A AF C0 E1 E2
0030 | 5A DF 65 38 56 25 59 30 FE 50 01 00 D9 B2 FE 48
0040 | E9 60 43 2E 4A FA AB A9 EB D7 41 7A 8B 70 EA 09
0050 | 55 2D F8 D3 AC F4 90 01 D9 13 5A E9 C5 23 77 C6
0060 | 6A B9 A2 5D FE 86 91 CB C5 E5 8B B6 0E 87 23 E9
0070 | 43 79 51 34 86 7D 48 61 91 58 1A E7 48 DF 0E 73
0080 | 24 97 C4 7C 79 A3 A8 86 35 84 05 A4 11 43 22 DE
0090 | 6E D3 BE 97 A3 98 F2 77 DE 2F 9D 6C 5E F6 79 63
00A0 | F0 B6 82 AD 0D F7 4F 11 EB B7 4B 58 58 44 78 54
00B0 | B0 89 E0 97 85 23 5F 3C 2B D2 6D 71 82 F2 38 68
00C0 | 67 B3 F1 6B 50 67 18 C3 69 A0 0F 99 A1 06 81 67
00D0 | 1F C1 6F 2A DD AE 89 4B 5B 32 0E CC 4E E0 DF 16
00E0 | EB E2 FD C6 AF 15 96 71 B5 E0 F7 CD AA 16 D8 66
00F0 | 54 62 52 B3 EF 47 5A 99 53 81 9A 87 18 B2 2D AA
0100 | 6A EC 3C DE 3E A4 C8 17 98 37 A2 E0 60 CC ED 41
0110 | A7 A8 30 61 A6 72 13 52 70 55 14 D6 20 FD FC AD
0120 | 38 11 D4 89 FE 46 69 EF 66 AB 3E 39 D0 E6 2D 19
0130 | 7E B2 4D C2 FF 53 D4 3D E0 A2 80 09 B8 06 DB 20
0140 | 0F E1 FE E5 45 2F DF D8 89 91 10 13 16 F3 C9 1C
0150 | D5 D1 4A 40 39 D1 2C F1 72 92 00 B9 E6 98 BE 6C
0160 | D4 F5 A5 37 94 BD CC BA F5 95 1A 1E 7B 79 EB 60
0170 | 6C 0E EB 99 72 8F 00 FC 4B 47 4C E3 AA 3F 23 FE
0180 | E7 AC 37 DA F4 80 6E E7 72 C3 B9 2F</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 6C 5F 0A 00 B1 87 B4 66
0010 | 78 01 00 00 1F 5F 04 F5 99 EC CC 0F 6B 19 C1 6F
0020 | DD 4F FC 71 78 87 18 9E AC 68 B1 64 19 5C 2E FC
0030 | 74 7D D7 3B 71 E2 04 53 FE 50 01 00 2A 17 05 5B
0040 | 4C B3 14 9B 44 2D 35 0C C0 72 C5 87 55 D0 F1 92
0050 | D9 AF CF 91 66 67 E5 28 64 34 AB F6 E3 63 38 B9
0060 | 9D 04 50 64 60 A7 9C 66 0D 8C 39 83 36 30 BE D6
0070 | 23 DB 67 D7 16 E4 0B 29 54 07 A1 B7 50 8D 7D D8
0080 | CE 05 68 E4 91 A7 27 7D D2 25 41 EE 70 5A 32 73
0090 | B9 09 24 1E F0 99 61 02 82 D9 D5 F3 8C 0E EB 18
00A0 | 40 14 20 88 F3 18 6D 0D E3 51 F5 FF 61 D0 B9 54
00B0 | 98 0C BB 5F F7 B2 31 6B D2 01 6D 24 18 D9 90 CE
00C0 | D1 7C 2E 31 42 D9 8B 96 01 13 A7 AB B0 B3 2A BF
00D0 | 69 59 68 D0 28 3E EC 4B ED DA 84 99 E6 77 87 39
00E0 | 6D 18 C8 49 87 1D C6 23 1C 45 FA 93 63 B5 8F CF
00F0 | E0 05 05 D5 16 76 0B CE DF 42 29 C0 E8 DF AE 8B
0100 | 93 95 F0 82 CB FB B2 6C 4C D8 8E 15 22 67 5F 58
0110 | AE E2 B7 66 C8 81 85 27 CF BF 08 D7 74 2F 96 8C
0120 | 11 1F 7E 0C E4 9E CC 9A 14 7C FC 53 B0 1A F4 30
0130 | 3E 0A 4C 6E 1B B3 2B 50 65 A4 59 89 39 61 FB 20
0140 | 66 D9 33 FC 25 D8 A1 6D 96 30 E1 08 4F 75 CA 52
0150 | F4 B2 83 34 C1 33 A2 6F CB 26 8A 5F 9D 2D 8F 35
0160 | 55 3B B6 E5 D5 65 C6 C0 A4 16 D1 8E B4 6C B0 4D
0170 | 44 18 22 9E EE 37 BC B3 B0 6B 8B B1 82 61 0F AA
0180 | 4F 57 B8 B7 4D 10 C4 BB 90 0C 29 5C</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>A0D30100D186B466</code></td>
<td><code>6C5F0A00B187B466</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>7BD09CF34A787B6800C23851E9C54DAA</code></td>
<td><code>99ECCC0F6B19C16FDD4FFC717887189E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>C6DF0C6AAFC0E1E25ADF653856255930</code></td>
<td><code>AC68B164195C2EFC747DD73B71E20453</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100D9B2FE48E960432E4AFAABA9</code> <code>EBD7417A8B70EA09552DF8D3ACF49001</code> <code>D9135AE9C52377C66AB9A25DFE8691CB</code> <code>C5E58BB60E8723E943795134867D4861</code> <code>91581AE748DF0E732497C47C79A3A886</code> <code>358405A4114322DE6ED3BE97A398F277</code> <code>DE2F9D6C5EF67963F0B682AD0DF74F11</code> <code>EBB74B5858447854B089E09785235F3C</code> <code>2BD26D7182F2386867B3F16B506718C3</code> <code>69A00F99A10681671FC16F2ADDAE894B</code> <code>5B320ECC4EE0DF16EBE2FDC6AF159671</code> <code>B5E0F7CDAA16D866546252B3EF475A99</code> <code>53819A8718B22DAA6AEC3CDE3EA4C817</code> <code>9837A2E060CCED41A7A83061A6721352</code> <code>705514D620FDFCAD3811D489FE4669EF</code> <code>66AB3E39D0E62D197EB24DC2FF53D43D</code> <code>E0A28009B806DB200FE1FEE5452FDFD8</code> <code>8991101316F3C91CD5D14A4039D12CF1</code> <code>729200B9E698BE6CD4F5A53794BDCCBA</code> <code>F5951A1E7B79EB606C0EEB99728F00FC</code> <code>4B474CE3AA3F23FEE7AC37DAF4806EE7</code><br> <code>72C3B92F</code></td>
<td><code>FE5001002A17055B4CB3149B442D350C</code> <code>C072C58755D0F192D9AFCF916667E528</code> <code>6434ABF6E36338B99D04506460A79C66</code> <code>0D8C39833630BED623DB67D716E40B29</code> <code>5407A1B7508D7DD8CE0568E491A7277D</code> <code>D22541EE705A3273B909241EF0996102</code> <code>82D9D5F38C0EEB1840142088F3186D0D</code> <code>E351F5FF61D0B954980CBB5FF7B2316B</code> <code>D2016D2418D990CED17C2E3142D98B96</code> <code>0113A7ABB0B32ABF695968D0283EEC4B</code> <code>EDDA8499E67787396D18C849871DC623</code> <code>1C45FA9363B58FCFE00505D516760BCE</code> <code>DF4229C0E8DFAE8B9395F082CBFBB26C</code> <code>4CD88E1522675F58AEE2B766C8818527</code> <code>CFBF08D7742F968C111F7E0CE49ECC9A</code> <code>147CFC53B01AF4303E0A4C6E1BB32B50</code> <code>65A459893961FB2066D933FC25D8A16D</code> <code>9630E1084F75CA52F4B28334C133A26F</code> <code>CB268A5F9D2D8F35553BB6E5D565C6C0</code> <code>A416D18EB46CB04D4418229EEE37BCB3</code> <code>B06B8BB182610FAA4F57B8B74D10C4BB</code><br> <code>900C295C</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 = 2A026F2B9C149C34EDE732FE5FCCCE57EB0052F8B564ECFA70DAB818A3B096DBBFFF4E73342351734FDF48CC0CD21C311E13468E644585CA2FAB93D96C6ED85BAF2E01178F8F2BE059CD176576F60367AB15265D97F9E01514BD8AB0C9DEF78F0FFF839ABFC8DB92365EE8160393D49D0B48AF46D390191C20B3F6CBB18E42E097767287F23872E313234025B597D90864DA7FFC9CF64D5F111C44317E96D4EA00ED2F41C34D9EA3707F6B665E5833A7781878DC642AD3F7CC5F7518338CEEE17D224E4DFE754378D9F7D1EAD9DB5DE8E20EB692DE435B9EF356709F1D23F336F8B3AC8117F985FB4B00C2A816B569E1269AB289F3C5B1B762D932CC36AF2989</code></pre>
<pre><code>auth_key = 758C0E3DB229EBA3721E6B42DECE38FB9413051408102434FFCD50B54670A6D6B1305E4162509339151FE43028254EAA0D5B59755E7B997169F28FBA5A5131F51BCF7F7B3AA2254EEEAED50334A1FAC9DCBB927F1B1FD967C26909A8423E8472C13651A594CF6CF19B367AF0C1EBE7DAEF96834CDFB029DD72CB21D9DB50BC833CD09F7DFDA5A1E4A04B10E73DE9C1B05911668BFE8885A14470BAD146A794145B66E57B5A11B8A12BD4C1197208DC21EA75656148DF23CF4CD2A2564882256AF2ACB1680EB981FE2DDBC6D85711F8AE0E9973857BCDDF9EE8BB6EC3E2EC79366211914D12E51027F0ED1CFA01878BAAA5A518EB87B0C843FDF759AF0608994D</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 58 E2 D0 D2 86 B4 66
0010 | A8 00 00 00 34 F7 CB 3B 7B D0 9C F3 4A 78 7B 68
0020 | 00 C2 38 51 E9 C5 4D AA C6 DF 0C 6A AF C0 E1 E2
0030 | 5A DF 65 38 56 25 59 30 0D 81 6B 3B 60 DF 19 81
0040 | 01 A5 16 6B CE 44 35 17</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 50 AC 24 B2 87 B4 66
0010 | 84 00 00 00 34 F7 CB 3B 99 EC CC 0F 6B 19 C1 6F
0020 | DD 4F FC 71 78 87 18 9E AC 68 B1 64 19 5C 2E FC
0030 | 74 7D D7 3B 71 E2 04 53 3B 75 62 C1 AA 43 05 11
0040 | CD 97 3D 4A 31 DC 36 E9</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>0158E2D0D286B466</code></td>
<td><code>0150AC24B287B466</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>A8000000</code> (168 in decimal)</td>
<td><code>84000000</code> (132 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>7BD09CF34A787B6800C23851E9C54DAA</code></td>
<td><code>99ECCC0F6B19C16FDD4FFC717887189E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>C6DF0C6AAFC0E1E25ADF653856255930</code></td>
<td><code>AC68B164195C2EFC747DD73B71E20453</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>0D816B3B60DF198101A5166BCE443517</code></td>
<td><code>3B7562C1AA430511CD973D4A31DC36E9</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>