Update content of files

This commit is contained in:
GitHub Action 2024-06-17 16:34:41 +00:00
parent 98b7d34aec
commit a67237bfc0
6 changed files with 209 additions and 209 deletions

View file

@ -1 +0,0 @@
0453746ab056c94e51cc7dc993e333727ef2144dcf8a5472c8939e2cfa4628b7

View file

@ -0,0 +1 @@
466b362a0ea0fb2b8365f0e6b7e0dc73bca89860a08e3b3b2cc7b39daed11687

View file

@ -101,7 +101,7 @@
<tr>
<td>400</td>
<td>FILE_TOKEN_INVALID</td>
<td>The specified file token is invalid.</td>
<td>The master DC did not accept the <code>file_token</code> (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile.</td>
</tr>
</tbody>
</table>

View file

@ -104,7 +104,7 @@
<tr>
<td>400</td>
<td>FILE_TOKEN_INVALID</td>
<td>The specified file token is invalid.</td>
<td>The master DC did not accept the <code>file_token</code> (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile.</td>
</tr>
<tr>
<td>400</td>

View file

@ -104,7 +104,7 @@
<tr>
<td>400</td>
<td>FILE_TOKEN_INVALID</td>
<td>The specified file token is invalid.</td>
<td>The master DC did not accept the <code>file_token</code> (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile.</td>
</tr>
<tr>
<td>400</td>

View file

@ -53,9 +53,9 @@
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
<!-- start req_pq_multi -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 34 71 05 00 54 60 70 66
0010 | 14 00 00 00 F1 8E 7E BE 2B 9B B4 57 48 8F 49 54
0020 | 41 48 B3 ED 2C 05 34 66</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 6C B5 02 00 0B 64 70 66
0010 | 14 00 00 00 F1 8E 7E BE 17 62 E3 D8 C2 13 A8 FA
0020 | C5 F4 12 25 E3 60 13 1E</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>3471050054607066</code></td>
<td><code>6CB502000B647066</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>2B9BB457488F49544148B3ED2C053466</code></td>
<td><code>1762E3D8C213A8FAC5F41225E360131E</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 40 6E 24 54 60 70 66
0010 | 7C 00 00 00 63 24 16 05 2B 9B B4 57 48 8F 49 54
0020 | 41 48 B3 ED 2C 05 34 66 67 AF D3 E0 E0 69 4C 75
0030 | FE F5 FF DC A1 EE F5 BE 08 18 29 A6 FC 82 9C D2
0040 | 85 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 84 15 7C 0B 64 70 66
0010 | C8 00 00 00 63 24 16 05 17 62 E3 D8 C2 13 A8 FA
0020 | C5 F4 12 25 E3 60 13 1E B2 70 60 7F 52 AD 68 D1
0030 | 56 29 8C 9D DC 64 5F 70 08 24 94 4C C1 89 C8 19
0040 | 35 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>01406E2454607066</code></td>
<td><code>0184157C0B647066</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>7C000000</code> (124 in decimal)</td>
<td><code>C8000000</code> (200 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>2B9BB457488F49544148B3ED2C053466</code></td>
<td><code>1762E3D8C213A8FAC5F41225E360131E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>67AFD3E0E0694C75FEF5FFDCA1EEF5BE</code></td>
<td><code>B270607F52AD68D156298C9DDC645F70</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>081829A6FC829CD285000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1741106334408692357</td>
<td><code>0824944CC189C81935000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2635816076042574133</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 = 1741106334408692357</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1741106334408692357 = 1223184373 * 1423421009</code></p>
<pre><code>p = 1223184373
q = 1423421009</code></pre>
<pre><code>pq = 2635816076042574133</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2635816076042574133 = 1483259383 * 1777043251</code></p>
<pre><code>p = 1483259383
q = 1777043251</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 18 29 A6 FC 82 9C D2 85 00 00 00
0010 | 04 48 E8 4F F5 00 00 00 04 54 D7 AE 51 00 00 00
0020 | 2B 9B B4 57 48 8F 49 54 41 48 B3 ED 2C 05 34 66
0030 | 67 AF D3 E0 E0 69 4C 75 FE F5 FF DC A1 EE F5 BE
0040 | FD AD 13 44 75 3B A4 0D 15 FE 37 57 7E 21 2B 4A
0050 | 59 35 38 F7 84 54 A0 91 08 DE 84 2A B1 E4 2E B9
<pre><code>0000 | 95 5F F5 A9 08 24 94 4C C1 89 C8 19 35 00 00 00
0010 | 04 58 68 BD F7 00 00 00 04 69 EB 87 33 00 00 00
0020 | 17 62 E3 D8 C2 13 A8 FA C5 F4 12 25 E3 60 13 1E
0030 | B2 70 60 7F 52 AD 68 D1 56 29 8C 9D DC 64 5F 70
0040 | C2 50 D3 66 BC D2 3A F7 90 B2 10 E6 A0 28 2F 21
0050 | 53 41 D4 F8 F0 DA 17 FB 19 CC 86 ED 4E 88 42 8E
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 = 1423421009</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>081829A6FC829CD285000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1741106334408692357</td>
<td><code>0824944CC189C81935000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2635816076042574133</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>0448E84FF5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1223184373</td>
<td><code>045868BDF7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1483259383</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>0454D7AE51000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1423421009</td>
<td><code>0469EB8733000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1777043251</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>2B9BB457488F49544148B3ED2C053466</code></td>
<td><code>1762E3D8C213A8FAC5F41225E360131E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>67AFD3E0E0694C75FEF5FFDCA1EEF5BE</code></td>
<td><code>B270607F52AD68D156298C9DDC645F70</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>FDAD1344753BA40D15FE37577E212B4A</code> <code>593538F78454A09108DE842AB1E42EB9</code></td>
<td><code>C250D366BCD23AF790B210E6A0282F21</code> <code>5341D4F8F0DA17FB19CC86ED4E88428E</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1423421009</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 = 955FF5A9081829A6FC829CD2850000000448E84FF50000000454D7AE510000002B9BB457488F49544148B3ED2C05346667AFD3E0E0694C75FEF5FFDCA1EEF5BEFDAD1344753BA40D15FE37577E212B4A593538F78454A09108DE842AB1E42EB902000000
random_padding_bytes = 7F89BA0B54DC1E08135D26489A60394E3403A1CD162553C3A943E59812CA5D76CF8F95D62690E411473A3FB0FC25E6D543C805939D41BBF9712B3A754AC72B79199B6A9A98E565DEF7317DE3BF32FC437D4FAAE501754E1C233FE51E</code></pre>
<pre><code>data = 955FF5A90824944CC189C81935000000045868BDF70000000469EB87330000001762E3D8C213A8FAC5F41225E360131EB270607F52AD68D156298C9DDC645F70C250D366BCD23AF790B210E6A0282F215341D4F8F0DA17FB19CC86ED4E88428E02000000
random_padding_bytes = AE894413AD56A8DB9DFDCC19CB18DD30032C25DFCD9E780E7974F4A9348814AB223D786762F142BDF503FA2CCD238D35EB42FCE3A4E25DC3792884979375C1140E889FB5100A16622665BFA428462B23AA146DEA7CE09E56C94C90CA</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 = 7C952FEEBEBCE714B40299147C955728D91CA53ED40AA5911B1C6889535D0859EAF80837908F5DF023382BA2EDC1A557C27DEFD124050F78DF9760A69F3AFBEE87AA68A992C2F042D57990952C801FC40438BC14D0C4DA149FAC4B5EA0E6C5AFF2C88D4463C1EB337614CBCB148F1147D6EA3B0AC56AD46B286A59D8E4DAE2D4EFC3AFABF9045C67E02CD05BAC5D822FD504ECD8BDA0C6594863E806D2896DB359FDADCAE2E59B2542B43A2E1951C1EC1699BF7B5C34C5F552FC98A922F8623CA1E12ECDFA6EE30F5D4109EA02DCEF2550827A173BD0EA9637A256310DEBD60E9CF8B60F8D70B2B44113ED12EB1F6058A16FD21BE6FA9F3A72863141CF19278D</code></pre>
<pre><code>encrypted_data = 3EEF398E2F83E13916B2C845F347C16F06255E8BB779C8F35F7DD834842B88735F8199A5603755DBD12F7A9232DCC9C0E00E8A6AA42515C93AC245AC29DB1888C74F2523BC387F37FC602158617AB0F8CCF27FAF12A199683CD4829AB14FE94FDB27181BF46D178B1CCC705BDF7FB8A6496FEBA611DE84B689F7A0E7C6E0F1D307E4ABEF1B7E30E46A1335EE7E98A4FD69EB6F0CA7356B64509AF68196F57586D81DE5CEB9321E36E63D626DEF496AE9560C0ABDF11EE71C915D71C889F161DBCA905728DC6F52C942C82785F6C854B71B0E853773174E922F48B51E968D90DE22DE605CDF3E1BD1BDD9C5E1D351640C6373A0821ABB1D8F42988368734F602D</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 38 71 05 00 54 60 70 66
0010 | 40 01 00 00 BE E4 12 D7 2B 9B B4 57 48 8F 49 54
0020 | 41 48 B3 ED 2C 05 34 66 67 AF D3 E0 E0 69 4C 75
0030 | FE F5 FF DC A1 EE F5 BE 04 48 E8 4F F5 00 00 00
0040 | 04 54 D7 AE 51 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 7C 95 2F EE BE BC E7 14 B4 02 99 14
0060 | 7C 95 57 28 D9 1C A5 3E D4 0A A5 91 1B 1C 68 89
0070 | 53 5D 08 59 EA F8 08 37 90 8F 5D F0 23 38 2B A2
0080 | ED C1 A5 57 C2 7D EF D1 24 05 0F 78 DF 97 60 A6
0090 | 9F 3A FB EE 87 AA 68 A9 92 C2 F0 42 D5 79 90 95
00A0 | 2C 80 1F C4 04 38 BC 14 D0 C4 DA 14 9F AC 4B 5E
00B0 | A0 E6 C5 AF F2 C8 8D 44 63 C1 EB 33 76 14 CB CB
00C0 | 14 8F 11 47 D6 EA 3B 0A C5 6A D4 6B 28 6A 59 D8
00D0 | E4 DA E2 D4 EF C3 AF AB F9 04 5C 67 E0 2C D0 5B
00E0 | AC 5D 82 2F D5 04 EC D8 BD A0 C6 59 48 63 E8 06
00F0 | D2 89 6D B3 59 FD AD CA E2 E5 9B 25 42 B4 3A 2E
0100 | 19 51 C1 EC 16 99 BF 7B 5C 34 C5 F5 52 FC 98 A9
0110 | 22 F8 62 3C A1 E1 2E CD FA 6E E3 0F 5D 41 09 EA
0120 | 02 DC EF 25 50 82 7A 17 3B D0 EA 96 37 A2 56 31
0130 | 0D EB D6 0E 9C F8 B6 0F 8D 70 B2 B4 41 13 ED 12
0140 | EB 1F 60 58 A1 6F D2 1B E6 FA 9F 3A 72 86 31 41
0150 | CF 19 27 8D</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 08 A3 06 00 0B 64 70 66
0010 | 40 01 00 00 BE E4 12 D7 17 62 E3 D8 C2 13 A8 FA
0020 | C5 F4 12 25 E3 60 13 1E B2 70 60 7F 52 AD 68 D1
0030 | 56 29 8C 9D DC 64 5F 70 04 58 68 BD F7 00 00 00
0040 | 04 69 EB 87 33 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 3E EF 39 8E 2F 83 E1 39 16 B2 C8 45
0060 | F3 47 C1 6F 06 25 5E 8B B7 79 C8 F3 5F 7D D8 34
0070 | 84 2B 88 73 5F 81 99 A5 60 37 55 DB D1 2F 7A 92
0080 | 32 DC C9 C0 E0 0E 8A 6A A4 25 15 C9 3A C2 45 AC
0090 | 29 DB 18 88 C7 4F 25 23 BC 38 7F 37 FC 60 21 58
00A0 | 61 7A B0 F8 CC F2 7F AF 12 A1 99 68 3C D4 82 9A
00B0 | B1 4F E9 4F DB 27 18 1B F4 6D 17 8B 1C CC 70 5B
00C0 | DF 7F B8 A6 49 6F EB A6 11 DE 84 B6 89 F7 A0 E7
00D0 | C6 E0 F1 D3 07 E4 AB EF 1B 7E 30 E4 6A 13 35 EE
00E0 | 7E 98 A4 FD 69 EB 6F 0C A7 35 6B 64 50 9A F6 81
00F0 | 96 F5 75 86 D8 1D E5 CE B9 32 1E 36 E6 3D 62 6D
0100 | EF 49 6A E9 56 0C 0A BD F1 1E E7 1C 91 5D 71 C8
0110 | 89 F1 61 DB CA 90 57 28 DC 6F 52 C9 42 C8 27 85
0120 | F6 C8 54 B7 1B 0E 85 37 73 17 4E 92 2F 48 B5 1E
0130 | 96 8D 90 DE 22 DE 60 5C DF 3E 1B D1 BD D9 C5 E1
0140 | D3 51 64 0C 63 73 A0 82 1A BB 1D 8F 42 98 83 68
0150 | 73 4F 60 2D</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 = 7F89BA0B54DC1E08135D26489A60394E3403A1CD162553C3A943E5981
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>3871050054607066</code></td>
<td><code>08A306000B647066</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 = 7F89BA0B54DC1E08135D26489A60394E3403A1CD162553C3A943E5981
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>2B9BB457488F49544148B3ED2C053466</code></td>
<td><code>1762E3D8C213A8FAC5F41225E360131E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>67AFD3E0E0694C75FEF5FFDCA1EEF5BE</code></td>
<td><code>B270607F52AD68D156298C9DDC645F70</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>0448E84FF5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1223184373</td>
<td><code>045868BDF7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1483259383</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>0454D7AE51000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1423421009</td>
<td><code>0469EB8733000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1777043251</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 = 7F89BA0B54DC1E08135D26489A60394E3403A1CD162553C3A943E5981
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001007C952FEEBEBCE714B4029914</code> <code>7C955728D91CA53ED40AA5911B1C6889</code> <code>535D0859EAF80837908F5DF023382BA2</code> <code>EDC1A557C27DEFD124050F78DF9760A6</code> <code>9F3AFBEE87AA68A992C2F042D5799095</code> <code>2C801FC40438BC14D0C4DA149FAC4B5E</code> <code>A0E6C5AFF2C88D4463C1EB337614CBCB</code> <code>148F1147D6EA3B0AC56AD46B286A59D8</code> <code>E4DAE2D4EFC3AFABF9045C67E02CD05B</code> <code>AC5D822FD504ECD8BDA0C6594863E806</code> <code>D2896DB359FDADCAE2E59B2542B43A2E</code> <code>1951C1EC1699BF7B5C34C5F552FC98A9</code> <code>22F8623CA1E12ECDFA6EE30F5D4109EA</code> <code>02DCEF2550827A173BD0EA9637A25631</code> <code>0DEBD60E9CF8B60F8D70B2B44113ED12</code> <code>EB1F6058A16FD21BE6FA9F3A72863141</code><br> <code>CF19278D</code></td>
<td><code>FE0001003EEF398E2F83E13916B2C845</code> <code>F347C16F06255E8BB779C8F35F7DD834</code> <code>842B88735F8199A5603755DBD12F7A92</code> <code>32DCC9C0E00E8A6AA42515C93AC245AC</code> <code>29DB1888C74F2523BC387F37FC602158</code> <code>617AB0F8CCF27FAF12A199683CD4829A</code> <code>B14FE94FDB27181BF46D178B1CCC705B</code> <code>DF7FB8A6496FEBA611DE84B689F7A0E7</code> <code>C6E0F1D307E4ABEF1B7E30E46A1335EE</code> <code>7E98A4FD69EB6F0CA7356B64509AF681</code> <code>96F57586D81DE5CEB9321E36E63D626D</code> <code>EF496AE9560C0ABDF11EE71C915D71C8</code> <code>89F161DBCA905728DC6F52C942C82785</code> <code>F6C854B71B0E853773174E922F48B51E</code> <code>968D90DE22DE605CDF3E1BD1BDD9C5E1</code> <code>D351640C6373A0821ABB1D8F42988368</code><br> <code>734F602D</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 7F89BA0B54DC1E08135D26489A60394E3403A1CD162553C3A943E5981
<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 1C 54 CA 54 60 70 66
0010 | B8 02 00 00 5C 07 E8 D0 2B 9B B4 57 48 8F 49 54
0020 | 41 48 B3 ED 2C 05 34 66 67 AF D3 E0 E0 69 4C 75
0030 | FE F5 FF DC A1 EE F5 BE FE 50 02 00 8C DE 11 D6
0040 | 0A 7D C0 F0 39 91 0D 3F E8 FF 23 F2 E0 2A 21 91
0050 | 94 E0 D5 AB E4 C8 BC 74 CC 4B 8B 33 9D 22 FF B6
0060 | A1 F1 D7 FE BE 13 78 8D DD 5B B6 02 DC 12 41 70
0070 | A2 D4 24 D2 B7 91 4F E5 CF ED BB E9 DB 06 F2 12
0080 | 6E EB 6E E6 0D 91 CC 98 31 41 29 A2 3C 63 1E 88
0090 | 08 92 ED 77 61 F2 C9 60 89 B6 39 CF 7E 46 9B ED
00A0 | 00 D7 B6 7E B6 1C B2 19 63 57 07 90 2C A3 18 0D
00B0 | A7 9F 8E 88 D6 53 30 E9 AF 92 C0 72 B6 95 96 CD
00C0 | 16 03 36 96 18 AE 81 6A C9 59 D1 16 2E 60 8E BC
00D0 | C6 C2 8B 7D D2 36 10 55 C2 79 8C B8 0A B8 4B BE
00E0 | 66 1E 88 57 6A 85 90 D5 B4 BC 2A AF 28 0B B7 40
00F0 | 8E 09 40 BE 19 B9 4B 90 9E 54 51 11 6C DE D4 FA
0100 | 3A C1 99 C2 79 33 32 9D DF 4A 71 6C F1 59 84 89
0110 | 77 6C 96 63 02 AC E2 42 2E D3 9F 99 77 FC E4 E8
0120 | 29 91 F4 C7 49 2A FC 39 4A F4 B6 E7 82 7D 3F 0D
0130 | 10 4B 02 E9 32 84 1D 63 A6 FE CD 7B 72 43 C0 A9
0140 | F5 61 74 23 60 86 A5 9A 1A E8 B4 35 BE 81 61 6A
0150 | 64 9D 80 D7 F3 35 59 5A 7B 47 0B CB CD 9C 2D 6D
0160 | 0C 6B D6 68 B3 E1 88 97 53 C2 CC 16 D3 EE CC 8A
0170 | B9 7D 0A 6D 34 86 7C E2 BA 63 A4 74 42 0A 0C D6
0180 | 35 FA FE F4 11 07 C8 EA 47 65 E8 39 16 BF B4 66
0190 | 46 4C 5C EC 2F 4E 08 82 D7 6C 37 23 C7 C4 6F 69
01A0 | 97 3A 50 A3 C9 AC E3 61 29 A9 C3 17 2E EE 95 20
01B0 | DF AB A9 36 8A 08 11 0A 20 8B D3 94 71 83 B8 E3
01C0 | 91 24 81 8B 91 37 71 48 7B EF BB B6 53 CD 62 B3
01D0 | 1B BF 80 94 BA D9 09 2D 48 21 A3 B4 EF 53 6C 2F
01E0 | 41 5A A6 B8 C3 59 09 EA F8 C7 A2 C5 44 6B 91 B5
01F0 | 96 48 4B 30 EE 79 FB 61 4F 1C 15 10 81 08 31 E6
0200 | DD D4 12 C4 3B 77 DC C2 A3 C7 A7 31 C9 81 EA BE
0210 | 1F EE 0D C8 EF 40 05 B5 79 36 3C 96 8D AA 0F 0F
0220 | 8A 7F 23 B2 BF 8A D8 7E 5E 94 BB 93 EE CC 3D 57
0230 | BF 32 03 A2 41 E8 F1 CD 1B 5E 2B B5 C6 2D 3E B0
0240 | 49 B5 2C FB 38 16 A4 A8 37 EE 48 4F 69 22 13 F2
0250 | 3B 8F AB 9B 4E 87 75 3A 16 28 E9 96 93 78 41 30
0260 | E9 62 67 96 F2 F4 26 AF 46 D6 AA 8D E8 9C 7C 9C
0270 | 46 53 30 E8 16 11 FD 18 3E 8B 99 AD 65 16 3B 6E
0280 | A8 99 E8 08 28 14 ED 92 81 F3 96 19</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 68 7D 3D 0C 64 70 66
0010 | E8 02 00 00 5C 07 E8 D0 17 62 E3 D8 C2 13 A8 FA
0020 | C5 F4 12 25 E3 60 13 1E B2 70 60 7F 52 AD 68 D1
0030 | 56 29 8C 9D DC 64 5F 70 FE 50 02 00 E1 E2 B2 FC
0040 | 85 EB 30 7F 56 AC 3A A1 09 FB 02 65 93 E0 84 6C
0050 | BB B7 06 E7 25 0A 6B C5 CE 72 39 BE 64 D8 00 F5
0060 | 8D D6 27 37 24 37 0A B5 4F 1E CD B9 4D 9C 9A 03
0070 | DA 0F C1 85 E1 E7 72 9B 4A DE 2C 6A B5 09 1D 14
0080 | E3 31 00 9A 27 0D D2 22 A5 FC E8 22 10 22 04 01
0090 | A1 C2 B1 9D DF 21 48 D6 44 3B D6 B6 CC B4 0E 15
00A0 | BC 49 BD B3 AC 6B 72 49 E2 AD 51 97 80 CF 03 3A
00B0 | 0A E8 F4 EB BC 59 78 9D 80 30 4E 51 D5 80 9B 05
00C0 | A6 58 EF 1E 12 D8 90 DA 2E AF 6E 21 9D F2 7C EC
00D0 | 1C 76 05 A5 53 84 62 A9 5F D1 59 7C 79 EF E8 A5
00E0 | F4 1F 11 AE E7 59 75 18 06 9A 9F EA 54 0E 63 CA
00F0 | A1 CA 39 62 C0 A8 88 3B 9D C3 AA B1 67 8F FD CC
0100 | B0 78 10 6C 57 B4 E5 1C 1D D7 5A A8 2A FD EC 25
0110 | 0B 9C 6E 73 71 21 4A 64 BE 6A CF 23 C9 7E 4B 04
0120 | B6 D4 40 26 04 5E B8 0F B6 DC 7E 42 C0 34 92 11
0130 | 5F 0F 39 D5 7E 8D 71 81 B7 08 6E 90 E1 71 BC 3A
0140 | D5 C5 DD 3D 2E 37 FD 14 9D 9D F1 95 87 17 97 4A
0150 | 8B 5B 9F 7C 52 03 18 07 94 54 6F 77 50 03 E8 0C
0160 | 6E 38 F9 66 64 1C 4F A3 77 BE 42 E4 27 4B C4 45
0170 | DE 19 71 5A 36 CE 2F 30 99 3A 29 86 10 4D 71 62
0180 | 46 C5 4D 4A D8 B9 CA 2C 3B 00 8F F1 1B B0 AE ED
0190 | A5 A7 03 61 2B DF CB 09 AD FE 26 F8 44 6C 86 10
01A0 | 42 A4 79 AF 15 27 27 B0 22 00 BB 04 70 12 57 3E
01B0 | 59 36 44 E4 58 65 0B 03 EB E3 8C B3 B8 D0 1B AE
01C0 | EF FD 2B 74 4F A2 06 B0 1E D7 E1 9B 49 95 63 25
01D0 | A3 04 13 3C 8E 0A 09 F5 EE 4F B9 A9 C1 42 D2 33
01E0 | F3 5E 19 6A 30 14 9F 5D 07 06 F1 41 E9 64 C1 39
01F0 | A6 13 BF 84 55 75 3E 57 99 50 9A 40 7E AD 06 9E
0200 | E5 D8 0C 29 23 70 57 05 9B B6 C7 70 E0 4B 3B E8
0210 | 3F 76 F6 2C 5D 01 35 92 08 4B 7F 9D D4 04 44 CE
0220 | 87 33 53 CE 57 E3 24 AE 3B EA 2A A7 49 39 37 C0
0230 | 8B 7B 3B 5A 2E 68 31 FB F6 A5 13 96 9F A5 DE 85
0240 | 30 69 FA 45 B8 5E 81 43 0D 09 21 23 31 4C 39 C3
0250 | E8 12 B9 32 BB 93 94 8F 33 1E CA 54 DC 5C 74 FA
0260 | E3 0C FB 4B 8F 60 89 14 0D 26 B5 EB 14 F2 43 B0
0270 | 88 75 23 CE 45 69 82 F0 A4 12 01 38 52 F9 EC AE
0280 | 5C 96 2A 89 D0 F5 DC 53 F0 88 6C 27</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 = 7F89BA0B54DC1E08135D26489A60394E3403A1CD162553C3A943E5981
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>011C54CA54607066</code></td>
<td><code>01687D3D0C647066</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>B8020000</code> (696 in decimal)</td>
<td><code>E8020000</code> (744 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 7F89BA0B54DC1E08135D26489A60394E3403A1CD162553C3A943E5981
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>2B9BB457488F49544148B3ED2C053466</code></td>
<td><code>1762E3D8C213A8FAC5F41225E360131E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>67AFD3E0E0694C75FEF5FFDCA1EEF5BE</code></td>
<td><code>B270607F52AD68D156298C9DDC645F70</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE5002008CDE11D60A7DC0F039910D3F</code> <code>E8FF23F2E02A219194E0D5ABE4C8BC74</code> <code>CC4B8B339D22FFB6A1F1D7FEBE13788D</code> <code>DD5BB602DC124170A2D424D2B7914FE5</code> <code>CFEDBBE9DB06F2126EEB6EE60D91CC98</code> <code>314129A23C631E880892ED7761F2C960</code> <code>89B639CF7E469BED00D7B67EB61CB219</code> <code>635707902CA3180DA79F8E88D65330E9</code> <code>AF92C072B69596CD1603369618AE816A</code> <code>C959D1162E608EBCC6C28B7DD2361055</code> <code>C2798CB80AB84BBE661E88576A8590D5</code> <code>B4BC2AAF280BB7408E0940BE19B94B90</code> <code>9E5451116CDED4FA3AC199C27933329D</code> <code>DF4A716CF1598489776C966302ACE242</code> <code>2ED39F9977FCE4E82991F4C7492AFC39</code> <code>4AF4B6E7827D3F0D104B02E932841D63</code> <code>A6FECD7B7243C0A9F56174236086A59A</code> <code>1AE8B435BE81616A649D80D7F335595A</code> <code>7B470BCBCD9C2D6D0C6BD668B3E18897</code> <code>53C2CC16D3EECC8AB97D0A6D34867CE2</code> <code>BA63A474420A0CD635FAFEF41107C8EA</code> <code>4765E83916BFB466464C5CEC2F4E0882</code> <code>D76C3723C7C46F69973A50A3C9ACE361</code> <code>29A9C3172EEE9520DFABA9368A08110A</code> <code>208BD3947183B8E39124818B91377148</code> <code>7BEFBBB653CD62B31BBF8094BAD9092D</code> <code>4821A3B4EF536C2F415AA6B8C35909EA</code> <code>F8C7A2C5446B91B596484B30EE79FB61</code> <code>4F1C1510810831E6DDD412C43B77DCC2</code> <code>A3C7A731C981EABE1FEE0DC8EF4005B5</code> <code>79363C968DAA0F0F8A7F23B2BF8AD87E</code> <code>5E94BB93EECC3D57BF3203A241E8F1CD</code> <code>1B5E2BB5C62D3EB049B52CFB3816A4A8</code> <code>37EE484F692213F23B8FAB9B4E87753A</code> <code>1628E99693784130E9626796F2F426AF</code> <code>46D6AA8DE89C7C9C465330E81611FD18</code> <code>3E8B99AD65163B6EA899E8082814ED92</code><br> <code>81F39619</code></td>
<td><code>FE500200E1E2B2FC85EB307F56AC3AA1</code> <code>09FB026593E0846CBBB706E7250A6BC5</code> <code>CE7239BE64D800F58DD6273724370AB5</code> <code>4F1ECDB94D9C9A03DA0FC185E1E7729B</code> <code>4ADE2C6AB5091D14E331009A270DD222</code> <code>A5FCE82210220401A1C2B19DDF2148D6</code> <code>443BD6B6CCB40E15BC49BDB3AC6B7249</code> <code>E2AD519780CF033A0AE8F4EBBC59789D</code> <code>80304E51D5809B05A658EF1E12D890DA</code> <code>2EAF6E219DF27CEC1C7605A5538462A9</code> <code>5FD1597C79EFE8A5F41F11AEE7597518</code> <code>069A9FEA540E63CAA1CA3962C0A8883B</code> <code>9DC3AAB1678FFDCCB078106C57B4E51C</code> <code>1DD75AA82AFDEC250B9C6E7371214A64</code> <code>BE6ACF23C97E4B04B6D44026045EB80F</code> <code>B6DC7E42C03492115F0F39D57E8D7181</code> <code>B7086E90E171BC3AD5C5DD3D2E37FD14</code> <code>9D9DF1958717974A8B5B9F7C52031807</code> <code>94546F775003E80C6E38F966641C4FA3</code> <code>77BE42E4274BC445DE19715A36CE2F30</code> <code>993A2986104D716246C54D4AD8B9CA2C</code> <code>3B008FF11BB0AEEDA5A703612BDFCB09</code> <code>ADFE26F8446C861042A479AF152727B0</code> <code>2200BB047012573E593644E458650B03</code> <code>EBE38CB3B8D01BAEEFFD2B744FA206B0</code> <code>1ED7E19B49956325A304133C8E0A09F5</code> <code>EE4FB9A9C142D233F35E196A30149F5D</code> <code>0706F141E964C139A613BF8455753E57</code> <code>99509A407EAD069EE5D80C2923705705</code> <code>9BB6C770E04B3BE83F76F62C5D013592</code> <code>084B7F9DD40444CE873353CE57E324AE</code> <code>3BEA2AA7493937C08B7B3B5A2E6831FB</code> <code>F6A513969FA5DE853069FA45B85E8143</code> <code>0D092123314C39C3E812B932BB93948F</code> <code>331ECA54DC5C74FAE30CFB4B8F608914</code> <code>0D26B5EB14F243B0887523CE456982F0</code> <code>A412013852F9ECAE5C962A89D0F5DC53</code><br> <code>F0886C27</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 7F89BA0B54DC1E08135D26489A60394E3403A1CD162553C3A943E5981
<!-- 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 = 8CDE11D60A7DC0F039910D3FE8FF23F2E02A219194E0D5ABE4C8BC74CC4B8B339D22FFB6A1F1D7FEBE13788DDD5BB602DC124170A2D424D2B7914FE5CFEDBBE9DB06F2126EEB6EE60D91CC98314129A23C631E880892ED7761F2C96089B639CF7E469BED00D7B67EB61CB219635707902CA3180DA79F8E88D65330E9AF92C072B69596CD1603369618AE816AC959D1162E608EBCC6C28B7DD2361055C2798CB80AB84BBE661E88576A8590D5B4BC2AAF280BB7408E0940BE19B94B909E5451116CDED4FA3AC199C27933329DDF4A716CF1598489776C966302ACE2422ED39F9977FCE4E82991F4C7492AFC394AF4B6E7827D3F0D104B02E932841D63A6FECD7B7243C0A9F56174236086A59A1AE8B435BE81616A649D80D7F335595A7B470BCBCD9C2D6D0C6BD668B3E1889753C2CC16D3EECC8AB97D0A6D34867CE2BA63A474420A0CD635FAFEF41107C8EA4765E83916BFB466464C5CEC2F4E0882D76C3723C7C46F69973A50A3C9ACE36129A9C3172EEE9520DFABA9368A08110A208BD3947183B8E39124818B913771487BEFBBB653CD62B31BBF8094BAD9092D4821A3B4EF536C2F415AA6B8C35909EAF8C7A2C5446B91B596484B30EE79FB614F1C1510810831E6DDD412C43B77DCC2A3C7A731C981EABE1FEE0DC8EF4005B579363C968DAA0F0F8A7F23B2BF8AD87E5E94BB93EECC3D57BF3203A241E8F1CD1B5E2BB5C62D3EB049B52CFB3816A4A837EE484F692213F23B8FAB9B4E87753A1628E99693784130E9626796F2F426AF46D6AA8DE89C7C9C465330E81611FD183E8B99AD65163B6EA899E8082814ED9281F39619
tmp_aes_key = 41ED86D5625B49E5AD48B6334FCAF9206338B1310F40B11218CE95FE0D8BD3D7
tmp_aes_iv = 62CC8A87DF311B326FD17693D711769B78AA2670C42F7B76F3448D39FDAD1344</code></pre>
<pre><code>encrypted_answer = E1E2B2FC85EB307F56AC3AA109FB026593E0846CBBB706E7250A6BC5CE7239BE64D800F58DD6273724370AB54F1ECDB94D9C9A03DA0FC185E1E7729B4ADE2C6AB5091D14E331009A270DD222A5FCE82210220401A1C2B19DDF2148D6443BD6B6CCB40E15BC49BDB3AC6B7249E2AD519780CF033A0AE8F4EBBC59789D80304E51D5809B05A658EF1E12D890DA2EAF6E219DF27CEC1C7605A5538462A95FD1597C79EFE8A5F41F11AEE7597518069A9FEA540E63CAA1CA3962C0A8883B9DC3AAB1678FFDCCB078106C57B4E51C1DD75AA82AFDEC250B9C6E7371214A64BE6ACF23C97E4B04B6D44026045EB80FB6DC7E42C03492115F0F39D57E8D7181B7086E90E171BC3AD5C5DD3D2E37FD149D9DF1958717974A8B5B9F7C5203180794546F775003E80C6E38F966641C4FA377BE42E4274BC445DE19715A36CE2F30993A2986104D716246C54D4AD8B9CA2C3B008FF11BB0AEEDA5A703612BDFCB09ADFE26F8446C861042A479AF152727B02200BB047012573E593644E458650B03EBE38CB3B8D01BAEEFFD2B744FA206B01ED7E19B49956325A304133C8E0A09F5EE4FB9A9C142D233F35E196A30149F5D0706F141E964C139A613BF8455753E5799509A407EAD069EE5D80C29237057059BB6C770E04B3BE83F76F62C5D013592084B7F9DD40444CE873353CE57E324AE3BEA2AA7493937C08B7B3B5A2E6831FBF6A513969FA5DE853069FA45B85E81430D092123314C39C3E812B932BB93948F331ECA54DC5C74FAE30CFB4B8F6089140D26B5EB14F243B0887523CE456982F0A412013852F9ECAE5C962A89D0F5DC53F0886C27
tmp_aes_key = B0B3A3AAB2040BDFDACC0ED2FDF2D766E3FAA894B9E3DBE96430E6C2794C9B1D
tmp_aes_iv = 0C4B1363835D9408D10AA3D134F1E30010658955718C19A6FDEA3EC7C250D366</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = C0045CD65EBBDF5F7725AAF94217DA495692D6C0BA0D89B52B9BB457488F49544148B3ED2C05346667AFD3E0E0694C75FEF5FFDCA1EEF5BE03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010030CA71E79409CE75E5E01F0F49D7C331D0EC962A6DC5C0FDA2EC500DD7E977D9B82258AD4519A533CE319AA1FBCE0DD730554FD2CB13CECFD073DE230D90B7BC5A7AEB4D6F89D74486891DB72530BA1696E9DA3F33E6BB0BB3F24943276410BAA650602C1C16A6B88DF8D797E48A6155DB88AC2EC93BB3535521597C519CACECB1AB52FCD1EEA5EC67073BAD76E09ACCFECCF67E8EF9A8BD049BC30E3D277BCB6B8713BC2845CF5404AAC6C1189DFC0575309527FF4ECC21085D87638606036F0482C4739C40D7A15C5F16D1446FF8C1B57AEA5BEE9B87FDCA6B548937014AAD610AC78B0603ACFE1F8C1453504FA019F57ABA05B55FDB6EFE46D71AEAEC98C7546070661A6398BDAABADEF3
answer = BA0D89B52B9BB457488F49544148B3ED2C05346667AFD3E0E0694C75FEF5FFDCA1EEF5BE03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010030CA71E79409CE75E5E01F0F49D7C331D0EC962A6DC5C0FDA2EC500DD7E977D9B82258AD4519A533CE319AA1FBCE0DD730554FD2CB13CECFD073DE230D90B7BC5A7AEB4D6F89D74486891DB72530BA1696E9DA3F33E6BB0BB3F24943276410BAA650602C1C16A6B88DF8D797E48A6155DB88AC2EC93BB3535521597C519CACECB1AB52FCD1EEA5EC67073BAD76E09ACCFECCF67E8EF9A8BD049BC30E3D277BCB6B8713BC2845CF5404AAC6C1189DFC0575309527FF4ECC21085D87638606036F0482C4739C40D7A15C5F16D1446FF8C1B57AEA5BEE9B87FDCA6B548937014AAD610AC78B0603ACFE1F8C1453504FA019F57ABA05B55FDB6EFE46D71AEAEC98C7546070661A6398BDAABADEF3</code></pre>
<pre><code>answer_with_hash = 88903DE3A32E750A262EF1F40C7B6DA1D935DABFBA0D89B51762E3D8C213A8FAC5F41225E360131EB270607F52AD68D156298C9DDC645F7003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100410090887964CEE17E9C053A404F9F241CCF1605B68150C675CB248E4E35D41F82C6ED283660A7482F1DFF41853FB6E570A30666B6350393641A9C87B2EE65D1A13118C083282D631CECC7281D29E94E426BA1AC357CC7732D6AB9DCA77CC93BB6020407F2C78B4B1FE7BB12F45DE24B530F500803B860AC5DA0791CE8F30C60E7F0A15CC5CC48C51FA02AF87E6D240FD70C3A8CD490CE0A4FB2C5F70A99851CFBB1764A9DD1F458A3407B70E457BAD41D21D763F321258D3669479C63638C789C3816D731155C209E87D10A573FE3D061BAA4D7CA7CFFDADC10976498347C7A0230E1708F9777A3F64D66871975BA3C0C1A06E171FF3B4D4BF15653607E02580C64706697FA2829946E9345
answer = BA0D89B51762E3D8C213A8FAC5F41225E360131EB270607F52AD68D156298C9DDC645F7003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100410090887964CEE17E9C053A404F9F241CCF1605B68150C675CB248E4E35D41F82C6ED283660A7482F1DFF41853FB6E570A30666B6350393641A9C87B2EE65D1A13118C083282D631CECC7281D29E94E426BA1AC357CC7732D6AB9DCA77CC93BB6020407F2C78B4B1FE7BB12F45DE24B530F500803B860AC5DA0791CE8F30C60E7F0A15CC5CC48C51FA02AF87E6D240FD70C3A8CD490CE0A4FB2C5F70A99851CFBB1764A9DD1F458A3407B70E457BAD41D21D763F321258D3669479C63638C789C3816D731155C209E87D10A573FE3D061BAA4D7CA7CFFDADC10976498347C7A0230E1708F9777A3F64D66871975BA3C0C1A06E171FF3B4D4BF15653607E02580C64706697FA2829946E9345</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 2B 9B B4 57 48 8F 49 54 41 48 B3 ED
0010 | 2C 05 34 66 67 AF D3 E0 E0 69 4C 75 FE F5 FF DC
0020 | A1 EE F5 BE 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 17 62 E3 D8 C2 13 A8 FA C5 F4 12 25
0010 | E3 60 13 1E B2 70 60 7F 52 AD 68 D1 56 29 8C 9D
0020 | DC 64 5F 70 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 = BA0D89B52B9BB457488F49544148B3ED2C05346667AFD3E0E0694C75FEF5FFDCA1EEF5B
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 | 30 CA 71 E7 94 09 CE 75 E5 E0 1F 0F 49 D7 C3 31
0140 | D0 EC 96 2A 6D C5 C0 FD A2 EC 50 0D D7 E9 77 D9
0150 | B8 22 58 AD 45 19 A5 33 CE 31 9A A1 FB CE 0D D7
0160 | 30 55 4F D2 CB 13 CE CF D0 73 DE 23 0D 90 B7 BC
0170 | 5A 7A EB 4D 6F 89 D7 44 86 89 1D B7 25 30 BA 16
0180 | 96 E9 DA 3F 33 E6 BB 0B B3 F2 49 43 27 64 10 BA
0190 | A6 50 60 2C 1C 16 A6 B8 8D F8 D7 97 E4 8A 61 55
01A0 | DB 88 AC 2E C9 3B B3 53 55 21 59 7C 51 9C AC EC
01B0 | B1 AB 52 FC D1 EE A5 EC 67 07 3B AD 76 E0 9A CC
01C0 | FE CC F6 7E 8E F9 A8 BD 04 9B C3 0E 3D 27 7B CB
01D0 | 6B 87 13 BC 28 45 CF 54 04 AA C6 C1 18 9D FC 05
01E0 | 75 30 95 27 FF 4E CC 21 08 5D 87 63 86 06 03 6F
01F0 | 04 82 C4 73 9C 40 D7 A1 5C 5F 16 D1 44 6F F8 C1
0200 | B5 7A EA 5B EE 9B 87 FD CA 6B 54 89 37 01 4A AD
0210 | 61 0A C7 8B 06 03 AC FE 1F 8C 14 53 50 4F A0 19
0220 | F5 7A BA 05 B5 5F DB 6E FE 46 D7 1A EA EC 98 C7
0230 | 54 60 70 66</code></pre>
0130 | 41 00 90 88 79 64 CE E1 7E 9C 05 3A 40 4F 9F 24
0140 | 1C CF 16 05 B6 81 50 C6 75 CB 24 8E 4E 35 D4 1F
0150 | 82 C6 ED 28 36 60 A7 48 2F 1D FF 41 85 3F B6 E5
0160 | 70 A3 06 66 B6 35 03 93 64 1A 9C 87 B2 EE 65 D1
0170 | A1 31 18 C0 83 28 2D 63 1C EC C7 28 1D 29 E9 4E
0180 | 42 6B A1 AC 35 7C C7 73 2D 6A B9 DC A7 7C C9 3B
0190 | B6 02 04 07 F2 C7 8B 4B 1F E7 BB 12 F4 5D E2 4B
01A0 | 53 0F 50 08 03 B8 60 AC 5D A0 79 1C E8 F3 0C 60
01B0 | E7 F0 A1 5C C5 CC 48 C5 1F A0 2A F8 7E 6D 24 0F
01C0 | D7 0C 3A 8C D4 90 CE 0A 4F B2 C5 F7 0A 99 85 1C
01D0 | FB B1 76 4A 9D D1 F4 58 A3 40 7B 70 E4 57 BA D4
01E0 | 1D 21 D7 63 F3 21 25 8D 36 69 47 9C 63 63 8C 78
01F0 | 9C 38 16 D7 31 15 5C 20 9E 87 D1 0A 57 3F E3 D0
0200 | 61 BA A4 D7 CA 7C FF DA DC 10 97 64 98 34 7C 7A
0210 | 02 30 E1 70 8F 97 77 A3 F6 4D 66 87 19 75 BA 3C
0220 | 0C 1A 06 E1 71 FF 3B 4D 4B F1 56 53 60 7E 02 58
0230 | 0C 64 70 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 = BA0D89B52B9BB457488F49544148B3ED2C05346667AFD3E0E0694C75FEF5FFDCA1EEF5B
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>2B9BB457488F49544148B3ED2C053466</code></td>
<td><code>1762E3D8C213A8FAC5F41225E360131E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>67AFD3E0E0694C75FEF5FFDCA1EEF5BE</code></td>
<td><code>B270607F52AD68D156298C9DDC645F70</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B52B9BB457488F49544148B3ED2C05346667AFD3E0E0694C75FEF5FFDCA1EEF5B
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE00010030CA71E79409CE75E5E01F0F</code> <code>49D7C331D0EC962A6DC5C0FDA2EC500D</code> <code>D7E977D9B82258AD4519A533CE319AA1</code> <code>FBCE0DD730554FD2CB13CECFD073DE23</code> <code>0D90B7BC5A7AEB4D6F89D74486891DB7</code> <code>2530BA1696E9DA3F33E6BB0BB3F24943</code> <code>276410BAA650602C1C16A6B88DF8D797</code> <code>E48A6155DB88AC2EC93BB3535521597C</code> <code>519CACECB1AB52FCD1EEA5EC67073BAD</code> <code>76E09ACCFECCF67E8EF9A8BD049BC30E</code> <code>3D277BCB6B8713BC2845CF5404AAC6C1</code> <code>189DFC0575309527FF4ECC21085D8763</code> <code>8606036F0482C4739C40D7A15C5F16D1</code> <code>446FF8C1B57AEA5BEE9B87FDCA6B5489</code> <code>37014AAD610AC78B0603ACFE1F8C1453</code> <code>504FA019F57ABA05B55FDB6EFE46D71A</code><br> <code>EAEC98C7</code></td>
<td><code>FE000100410090887964CEE17E9C053A</code> <code>404F9F241CCF1605B68150C675CB248E</code> <code>4E35D41F82C6ED283660A7482F1DFF41</code> <code>853FB6E570A30666B6350393641A9C87</code> <code>B2EE65D1A13118C083282D631CECC728</code> <code>1D29E94E426BA1AC357CC7732D6AB9DC</code> <code>A77CC93BB6020407F2C78B4B1FE7BB12</code> <code>F45DE24B530F500803B860AC5DA0791C</code> <code>E8F30C60E7F0A15CC5CC48C51FA02AF8</code> <code>7E6D240FD70C3A8CD490CE0A4FB2C5F7</code> <code>0A99851CFBB1764A9DD1F458A3407B70</code> <code>E457BAD41D21D763F321258D3669479C</code> <code>63638C789C3816D731155C209E87D10A</code> <code>573FE3D061BAA4D7CA7CFFDADC109764</code> <code>98347C7A0230E1708F9777A3F64D6687</code> <code>1975BA3C0C1A06E171FF3B4D4BF15653</code><br> <code>607E0258</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>54607066</code> (1718640724 in decimal)</td>
<td><code>0C647066</code> (1718641676 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B52B9BB457488F49544148B3ED2C05346667AFD3E0E0694C75FEF5FFDCA1EEF5B
<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 = 0690B776AF776546FE44775CF3AD1DA0C8C4B98314316F7E5DD6EFAF381154FC720EE12FF2C3E1988176FB141030CF08B9584F3414EAA30FC0D9C27BDF50344B05B30DB8F0E36A0E5D78F80190DC21A3E6AB420B461F7642AD37C1B01C56A480D6168EF2023CB5549BA93D72ACFEC0054E9E2E0BAF844A59FBA955234616AC167181557F75EDADCFCCFD711180F80BE8AC6C4D10CA879A554655B21DC0E6A7216D0CE888FEECD00319971351BA00CFB49CB67189A1EFD2657ACEB568112BB299A728A57358F0AC7AE85F88EEA680D32A069CA74B801959F15E371FB42C164F3F0E5BC1CF44DF655A2A5FB741C0FF1636E506996B648081A20CA274FD1BD2C4AC</code></pre>
<pre><code>b = 4798CB6F6A65840C28E623B5CEF94D35A74CB5CBE9EDCDC07F6E8630DE340B31C5A766CD377880FF163D403F74263EECEDFCFB9287D9CE2AED99834DE1B748879AADCB4F9DDDDB1F2E9B14952C3607C787D47E8396817E30C9BD7E1AB67B82343BC9F3C38F0D805ECCAC31002A305594398F7DE51A66AC3AFF1B547F7E7098EB26D17D8F9E9AABD77B98663372A5B5CC182F5754E942BE126A43EE7F6E5F71CD077E40DBA1332869EAC345DC1F368B9BF5A570C936F469580287FB3E82CC81338200BC94BAB88DA41BC565B9B0BA170BC2E99CAE401877D8B8C2E2C68C606AAC4D29DA845F6C3C3E6CB85D299DB4D9BCE26136CE15EEFBB1172064FB84D28AAE</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 = 787AB5C5BE51BF02428BD5E00C26829DFB4F206711CBB25190AEC1C1A0D5C6D9A94FF350B8DC9C8ADEA5AE35400AD0D6744D722CE74FF5B8E8C9D1F4BF9C8F039753FC6836D8A3A310D9443C623DC241CDFC189522EAF1B4E665C27AE82F43208F45AEB7BEF6F508333A304BC098DFB6B3376116081B8B028F7D254F3369B63034A68CA27DDA5805D03569B2C0EF99A3C86950BF4F470D5E10653AF57B916BB739D7BFFF275934D74CA1A9EE188335C7943B065B6FB6C03F2EB4FC456636621EF7894595264239492CE03E3D77AC23AA1941B29586566EB57F50502333F7B4B0979AC34F51116067A6D28EE8EF38A51670F39D578F979933137185B5E176C49C</code></pre>
<pre><code>g_b = 4DAC03C2027F002773D10312FEB1215DF466B228B1E35F9D714A36CCA17376D03E983B0CBD1A7F7BE5C6643CEBA0933A1BD927143ED737406B0876CEEDC7E3C6E746021EC64DB9BECFBC48022B562437FAF5B4F89252FEB7C5FD9AF05A92FC745CAF17123613352E21D369BB1C39B4177C6E75898E86756E1638096917E7CB33945A6B53A13E6B009BFFD3925791EC4B20EAD489EDDB530F511DC35FB9C3638817728DF7C234F14AFCE39C5912FC6303483CA5344E944AE52336884DE9243A27F6E292304E3E96F98DD7C14DA89C89A7B247CC2E95754FA3B60D87BD6CA8A3B25812CC018C85EAEBBE44E134C4EED6FFC1E7E536D005FF9A68482ECEC853058A</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 2B 9B B4 57 48 8F 49 54 41 48 B3 ED
0010 | 2C 05 34 66 67 AF D3 E0 E0 69 4C 75 FE F5 FF DC
0020 | A1 EE F5 BE 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 78 7A B5 C5 BE 51 BF 02 42 8B D5 E0 0C 26 82 9D
0040 | FB 4F 20 67 11 CB B2 51 90 AE C1 C1 A0 D5 C6 D9
0050 | A9 4F F3 50 B8 DC 9C 8A DE A5 AE 35 40 0A D0 D6
0060 | 74 4D 72 2C E7 4F F5 B8 E8 C9 D1 F4 BF 9C 8F 03
0070 | 97 53 FC 68 36 D8 A3 A3 10 D9 44 3C 62 3D C2 41
0080 | CD FC 18 95 22 EA F1 B4 E6 65 C2 7A E8 2F 43 20
0090 | 8F 45 AE B7 BE F6 F5 08 33 3A 30 4B C0 98 DF B6
00A0 | B3 37 61 16 08 1B 8B 02 8F 7D 25 4F 33 69 B6 30
00B0 | 34 A6 8C A2 7D DA 58 05 D0 35 69 B2 C0 EF 99 A3
00C0 | C8 69 50 BF 4F 47 0D 5E 10 65 3A F5 7B 91 6B B7
00D0 | 39 D7 BF FF 27 59 34 D7 4C A1 A9 EE 18 83 35 C7
00E0 | 94 3B 06 5B 6F B6 C0 3F 2E B4 FC 45 66 36 62 1E
00F0 | F7 89 45 95 26 42 39 49 2C E0 3E 3D 77 AC 23 AA
0100 | 19 41 B2 95 86 56 6E B5 7F 50 50 23 33 F7 B4 B0
0110 | 97 9A C3 4F 51 11 60 67 A6 D2 8E E8 EF 38 A5 16
0120 | 70 F3 9D 57 8F 97 99 33 13 71 85 B5 E1 76 C4 9C</code></pre>
<pre><code>0000 | 54 B6 43 66 17 62 E3 D8 C2 13 A8 FA C5 F4 12 25
0010 | E3 60 13 1E B2 70 60 7F 52 AD 68 D1 56 29 8C 9D
0020 | DC 64 5F 70 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 4D AC 03 C2 02 7F 00 27 73 D1 03 12 FE B1 21 5D
0040 | F4 66 B2 28 B1 E3 5F 9D 71 4A 36 CC A1 73 76 D0
0050 | 3E 98 3B 0C BD 1A 7F 7B E5 C6 64 3C EB A0 93 3A
0060 | 1B D9 27 14 3E D7 37 40 6B 08 76 CE ED C7 E3 C6
0070 | E7 46 02 1E C6 4D B9 BE CF BC 48 02 2B 56 24 37
0080 | FA F5 B4 F8 92 52 FE B7 C5 FD 9A F0 5A 92 FC 74
0090 | 5C AF 17 12 36 13 35 2E 21 D3 69 BB 1C 39 B4 17
00A0 | 7C 6E 75 89 8E 86 75 6E 16 38 09 69 17 E7 CB 33
00B0 | 94 5A 6B 53 A1 3E 6B 00 9B FF D3 92 57 91 EC 4B
00C0 | 20 EA D4 89 ED DB 53 0F 51 1D C3 5F B9 C3 63 88
00D0 | 17 72 8D F7 C2 34 F1 4A FC E3 9C 59 12 FC 63 03
00E0 | 48 3C A5 34 4E 94 4A E5 23 36 88 4D E9 24 3A 27
00F0 | F6 E2 92 30 4E 3E 96 F9 8D D7 C1 4D A8 9C 89 A7
0100 | B2 47 CC 2E 95 75 4F A3 B6 0D 87 BD 6C A8 A3 B2
0110 | 58 12 CC 01 8C 85 EA EB BE 44 E1 34 C4 EE D6 FF
0120 | C1 E7 E5 36 D0 05 FF 9A 68 48 2E CE C8 53 05 8A</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 = BA0D89B52B9BB457488F49544148B3ED2C05346667AFD3E0E0694C75FEF5FFDCA1EEF5B
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>2B9BB457488F49544148B3ED2C053466</code></td>
<td><code>1762E3D8C213A8FAC5F41225E360131E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>67AFD3E0E0694C75FEF5FFDCA1EEF5BE</code></td>
<td><code>B270607F52AD68D156298C9DDC645F70</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE000100787AB5C5BE51BF02428BD5E0</code> <code>0C26829DFB4F206711CBB25190AEC1C1</code> <code>A0D5C6D9A94FF350B8DC9C8ADEA5AE35</code> <code>400AD0D6744D722CE74FF5B8E8C9D1F4</code> <code>BF9C8F039753FC6836D8A3A310D9443C</code> <code>623DC241CDFC189522EAF1B4E665C27A</code> <code>E82F43208F45AEB7BEF6F508333A304B</code> <code>C098DFB6B3376116081B8B028F7D254F</code> <code>3369B63034A68CA27DDA5805D03569B2</code> <code>C0EF99A3C86950BF4F470D5E10653AF5</code> <code>7B916BB739D7BFFF275934D74CA1A9EE</code> <code>188335C7943B065B6FB6C03F2EB4FC45</code> <code>6636621EF7894595264239492CE03E3D</code> <code>77AC23AA1941B29586566EB57F505023</code> <code>33F7B4B0979AC34F51116067A6D28EE8</code> <code>EF38A51670F39D578F979933137185B5</code><br> <code>E176C49C</code></td>
<td><code>FE0001004DAC03C2027F002773D10312</code> <code>FEB1215DF466B228B1E35F9D714A36CC</code> <code>A17376D03E983B0CBD1A7F7BE5C6643C</code> <code>EBA0933A1BD927143ED737406B0876CE</code> <code>EDC7E3C6E746021EC64DB9BECFBC4802</code> <code>2B562437FAF5B4F89252FEB7C5FD9AF0</code> <code>5A92FC745CAF17123613352E21D369BB</code> <code>1C39B4177C6E75898E86756E16380969</code> <code>17E7CB33945A6B53A13E6B009BFFD392</code> <code>5791EC4B20EAD489EDDB530F511DC35F</code> <code>B9C3638817728DF7C234F14AFCE39C59</code> <code>12FC6303483CA5344E944AE52336884D</code> <code>E9243A27F6E292304E3E96F98DD7C14D</code> <code>A89C89A7B247CC2E95754FA3B60D87BD</code> <code>6CA8A3B25812CC018C85EAEBBE44E134</code> <code>C4EED6FFC1E7E536D005FF9A68482ECE</code><br> <code>C853058A</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 = BA0D89B52B9BB457488F49544148B3ED2C05346667AFD3E0E0694C75FEF5FFDCA1EEF5B
<!-- 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 = 54B643662B9BB457488F49544148B3ED2C05346667AFD3E0E0694C75FEF5FFDCA1EEF5BE0000000000000000FE000100787AB5C5BE51BF02428BD5E00C26829DFB4F206711CBB25190AEC1C1A0D5C6D9A94FF350B8DC9C8ADEA5AE35400AD0D6744D722CE74FF5B8E8C9D1F4BF9C8F039753FC6836D8A3A310D9443C623DC241CDFC189522EAF1B4E665C27AE82F43208F45AEB7BEF6F508333A304BC098DFB6B3376116081B8B028F7D254F3369B63034A68CA27DDA5805D03569B2C0EF99A3C86950BF4F470D5E10653AF57B916BB739D7BFFF275934D74CA1A9EE188335C7943B065B6FB6C03F2EB4FC456636621EF7894595264239492CE03E3D77AC23AA1941B29586566EB57F50502333F7B4B0979AC34F51116067A6D28EE8EF38A51670F39D578F979933137185B5E176C49C
padding = A35B3C5C16B11A1E708EE5C6
tmp_aes_key = 41ED86D5625B49E5AD48B6334FCAF9206338B1310F40B11218CE95FE0D8BD3D7
tmp_aes_iv = 62CC8A87DF311B326FD17693D711769B78AA2670C42F7B76F3448D39FDAD1344</code></pre>
<pre><code>data = 54B643661762E3D8C213A8FAC5F41225E360131EB270607F52AD68D156298C9DDC645F700000000000000000FE0001004DAC03C2027F002773D10312FEB1215DF466B228B1E35F9D714A36CCA17376D03E983B0CBD1A7F7BE5C6643CEBA0933A1BD927143ED737406B0876CEEDC7E3C6E746021EC64DB9BECFBC48022B562437FAF5B4F89252FEB7C5FD9AF05A92FC745CAF17123613352E21D369BB1C39B4177C6E75898E86756E1638096917E7CB33945A6B53A13E6B009BFFD3925791EC4B20EAD489EDDB530F511DC35FB9C3638817728DF7C234F14AFCE39C5912FC6303483CA5344E944AE52336884DE9243A27F6E292304E3E96F98DD7C14DA89C89A7B247CC2E95754FA3B60D87BD6CA8A3B25812CC018C85EAEBBE44E134C4EED6FFC1E7E536D005FF9A68482ECEC853058A
padding = B428DCF3654A51121F6AD091
tmp_aes_key = B0B3A3AAB2040BDFDACC0ED2FDF2D766E3FAA894B9E3DBE96430E6C2794C9B1D
tmp_aes_iv = 0C4B1363835D9408D10AA3D134F1E30010658955718C19A6FDEA3EC7C250D366</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 = 9723F7E803156545617954741617E778DEC0AC8097598A2A56CE84AA2DCEADCFED185A2E026E81C87DD98828E17A2C77E6AB162996D0D80962290C1C4162E734CBBC9EBF798FEC4B898D86B6219EB74FFA586EEC9F74219DF198A818C6CD3B6EFACAC69D38760163153884F296430B289110DD45FEC82C598E82D0A7E32E1CAEDD56BFBCDCCDE02C6193A2D70248EAB55B9362C8450C6E30B73CC6C85FAC723E0122044BE7D28E167649060A95DC7DA1D1AF28B971F46C72E031D719FE052497A9C8992CB8A79DACF9DEF2493A579229127C81E0B764172D58A83D3D52051686A93ABBF02709C0D8BFFFEE4AE0F5C4795BF3EEA4480116EFEA1CEA699E839DA70842537208E1F4F2374B3D6E1D00DE80506013B6F12C291F5EC095956C770B6A4C9C74C3ED0685C64167028298BBDC6CC34444D8D2C27528DB4B1AB38AF47FBC69081CD205E55327BE63D22F3DE92304</code></pre>
<pre><code>encrypted_data = 85EF8FF898129E4AE01F89B80922CC1EF0C8C0813AFC2DE57F003D98C87AC318FE5825B613A967BA99026BF4AC55C3FCC93E007A451FFFB535C382F5D3A0D0FDBC193ADEABD061194A6C8B498E7AEC3FE3EDAF036E665DD3BFC11FA43FDD45A79C4FDCC11EF5AF9FFA9A149E846DA415195B856B08F0B7CC4EC337D32220C6DA9EBC3B05F5EEBA8685E5AB389079D377AE7F6AFB9E6F82CEB02856065B301EC0E93D4AFA400BB65E66815BCEC15486B5C62DAC9222D4DC60859FF765AF1EAA3397841F3443C41081FA106B5345F5881104ADBC9A87CFCB9DD63E671B8DF63F49B216A5BB1B017BB950555BE235F48080AF90D75C4961D8758752D0FDCBB189649A8BC729DB8D9F76E8B119D84644EFFD034BDD772C7FA7A68617475B8A762358628E9BDDD18D73A4DDA6351559AC91FD375483A06A7E12641ECF5B3A43050E5F05FD1F50E876B7A34008568F7DEF5BD1</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 50 99 0B 00 54 60 70 66
0010 | 78 01 00 00 1F 5F 04 F5 2B 9B B4 57 48 8F 49 54
0020 | 41 48 B3 ED 2C 05 34 66 67 AF D3 E0 E0 69 4C 75
0030 | FE F5 FF DC A1 EE F5 BE FE 50 01 00 97 23 F7 E8
0040 | 03 15 65 45 61 79 54 74 16 17 E7 78 DE C0 AC 80
0050 | 97 59 8A 2A 56 CE 84 AA 2D CE AD CF ED 18 5A 2E
0060 | 02 6E 81 C8 7D D9 88 28 E1 7A 2C 77 E6 AB 16 29
0070 | 96 D0 D8 09 62 29 0C 1C 41 62 E7 34 CB BC 9E BF
0080 | 79 8F EC 4B 89 8D 86 B6 21 9E B7 4F FA 58 6E EC
0090 | 9F 74 21 9D F1 98 A8 18 C6 CD 3B 6E FA CA C6 9D
00A0 | 38 76 01 63 15 38 84 F2 96 43 0B 28 91 10 DD 45
00B0 | FE C8 2C 59 8E 82 D0 A7 E3 2E 1C AE DD 56 BF BC
00C0 | DC CD E0 2C 61 93 A2 D7 02 48 EA B5 5B 93 62 C8
00D0 | 45 0C 6E 30 B7 3C C6 C8 5F AC 72 3E 01 22 04 4B
00E0 | E7 D2 8E 16 76 49 06 0A 95 DC 7D A1 D1 AF 28 B9
00F0 | 71 F4 6C 72 E0 31 D7 19 FE 05 24 97 A9 C8 99 2C
0100 | B8 A7 9D AC F9 DE F2 49 3A 57 92 29 12 7C 81 E0
0110 | B7 64 17 2D 58 A8 3D 3D 52 05 16 86 A9 3A BB F0
0120 | 27 09 C0 D8 BF FF EE 4A E0 F5 C4 79 5B F3 EE A4
0130 | 48 01 16 EF EA 1C EA 69 9E 83 9D A7 08 42 53 72
0140 | 08 E1 F4 F2 37 4B 3D 6E 1D 00 DE 80 50 60 13 B6
0150 | F1 2C 29 1F 5E C0 95 95 6C 77 0B 6A 4C 9C 74 C3
0160 | ED 06 85 C6 41 67 02 82 98 BB DC 6C C3 44 44 D8
0170 | D2 C2 75 28 DB 4B 1A B3 8A F4 7F BC 69 08 1C D2
0180 | 05 E5 53 27 BE 63 D2 2F 3D E9 23 04</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 78 17 0F 00 0C 64 70 66
0010 | 78 01 00 00 1F 5F 04 F5 17 62 E3 D8 C2 13 A8 FA
0020 | C5 F4 12 25 E3 60 13 1E B2 70 60 7F 52 AD 68 D1
0030 | 56 29 8C 9D DC 64 5F 70 FE 50 01 00 85 EF 8F F8
0040 | 98 12 9E 4A E0 1F 89 B8 09 22 CC 1E F0 C8 C0 81
0050 | 3A FC 2D E5 7F 00 3D 98 C8 7A C3 18 FE 58 25 B6
0060 | 13 A9 67 BA 99 02 6B F4 AC 55 C3 FC C9 3E 00 7A
0070 | 45 1F FF B5 35 C3 82 F5 D3 A0 D0 FD BC 19 3A DE
0080 | AB D0 61 19 4A 6C 8B 49 8E 7A EC 3F E3 ED AF 03
0090 | 6E 66 5D D3 BF C1 1F A4 3F DD 45 A7 9C 4F DC C1
00A0 | 1E F5 AF 9F FA 9A 14 9E 84 6D A4 15 19 5B 85 6B
00B0 | 08 F0 B7 CC 4E C3 37 D3 22 20 C6 DA 9E BC 3B 05
00C0 | F5 EE BA 86 85 E5 AB 38 90 79 D3 77 AE 7F 6A FB
00D0 | 9E 6F 82 CE B0 28 56 06 5B 30 1E C0 E9 3D 4A FA
00E0 | 40 0B B6 5E 66 81 5B CE C1 54 86 B5 C6 2D AC 92
00F0 | 22 D4 DC 60 85 9F F7 65 AF 1E AA 33 97 84 1F 34
0100 | 43 C4 10 81 FA 10 6B 53 45 F5 88 11 04 AD BC 9A
0110 | 87 CF CB 9D D6 3E 67 1B 8D F6 3F 49 B2 16 A5 BB
0120 | 1B 01 7B B9 50 55 5B E2 35 F4 80 80 AF 90 D7 5C
0130 | 49 61 D8 75 87 52 D0 FD CB B1 89 64 9A 8B C7 29
0140 | DB 8D 9F 76 E8 B1 19 D8 46 44 EF FD 03 4B DD 77
0150 | 2C 7F A7 A6 86 17 47 5B 8A 76 23 58 62 8E 9B DD
0160 | D1 8D 73 A4 DD A6 35 15 59 AC 91 FD 37 54 83 A0
0170 | 6A 7E 12 64 1E CF 5B 3A 43 05 0E 5F 05 FD 1F 50
0180 | E8 76 B7 A3 40 08 56 8F 7D EF 5B D1</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>50990B0054607066</code></td>
<td><code>78170F000C647066</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>2B9BB457488F49544148B3ED2C053466</code></td>
<td><code>1762E3D8C213A8FAC5F41225E360131E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>67AFD3E0E0694C75FEF5FFDCA1EEF5BE</code></td>
<td><code>B270607F52AD68D156298C9DDC645F70</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE5001009723F7E80315654561795474</code> <code>1617E778DEC0AC8097598A2A56CE84AA</code> <code>2DCEADCFED185A2E026E81C87DD98828</code> <code>E17A2C77E6AB162996D0D80962290C1C</code> <code>4162E734CBBC9EBF798FEC4B898D86B6</code> <code>219EB74FFA586EEC9F74219DF198A818</code> <code>C6CD3B6EFACAC69D38760163153884F2</code> <code>96430B289110DD45FEC82C598E82D0A7</code> <code>E32E1CAEDD56BFBCDCCDE02C6193A2D7</code> <code>0248EAB55B9362C8450C6E30B73CC6C8</code> <code>5FAC723E0122044BE7D28E167649060A</code> <code>95DC7DA1D1AF28B971F46C72E031D719</code> <code>FE052497A9C8992CB8A79DACF9DEF249</code> <code>3A579229127C81E0B764172D58A83D3D</code> <code>52051686A93ABBF02709C0D8BFFFEE4A</code> <code>E0F5C4795BF3EEA4480116EFEA1CEA69</code> <code>9E839DA70842537208E1F4F2374B3D6E</code> <code>1D00DE80506013B6F12C291F5EC09595</code> <code>6C770B6A4C9C74C3ED0685C641670282</code> <code>98BBDC6CC34444D8D2C27528DB4B1AB3</code> <code>8AF47FBC69081CD205E55327BE63D22F</code><br> <code>3DE92304</code></td>
<td><code>FE50010085EF8FF898129E4AE01F89B8</code> <code>0922CC1EF0C8C0813AFC2DE57F003D98</code> <code>C87AC318FE5825B613A967BA99026BF4</code> <code>AC55C3FCC93E007A451FFFB535C382F5</code> <code>D3A0D0FDBC193ADEABD061194A6C8B49</code> <code>8E7AEC3FE3EDAF036E665DD3BFC11FA4</code> <code>3FDD45A79C4FDCC11EF5AF9FFA9A149E</code> <code>846DA415195B856B08F0B7CC4EC337D3</code> <code>2220C6DA9EBC3B05F5EEBA8685E5AB38</code> <code>9079D377AE7F6AFB9E6F82CEB0285606</code> <code>5B301EC0E93D4AFA400BB65E66815BCE</code> <code>C15486B5C62DAC9222D4DC60859FF765</code> <code>AF1EAA3397841F3443C41081FA106B53</code> <code>45F5881104ADBC9A87CFCB9DD63E671B</code> <code>8DF63F49B216A5BB1B017BB950555BE2</code> <code>35F48080AF90D75C4961D8758752D0FD</code> <code>CBB189649A8BC729DB8D9F76E8B119D8</code> <code>4644EFFD034BDD772C7FA7A68617475B</code> <code>8A762358628E9BDDD18D73A4DDA63515</code> <code>59AC91FD375483A06A7E12641ECF5B3A</code> <code>43050E5F05FD1F50E876B7A34008568F</code><br> <code>7DEF5BD1</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 = 9FD2A5228D4C4A4BA6B752ECE71D28A48FE10E898F3087C69FA44289C008714BA420C9521B43848C31811D1E4AA3B611FBCE1119072FF073FAB0DC471805F5FEFF308AA86C89886DB415BF90C8EE222F65E824EDB627D12C6AEF80899344D228FF80A34C7555F65E932009CDA600D7A7F42985668952055B247BF7F5C9442D1EA3477829D831B8A33850563F1D6EF899EDD5AE0EE95073D3C08E40167B6A2E38E4AE66F621719E8F44AC4A142B4645E4B64A91292710326AD4330337AAFBF31B9B68709077E4250F1C71B71DEB626171255851BDAFA2B34A5FC5BC4AEEDD7F4F91E13F6CCC093F3B32C78388AD886B4FBA4BFBAD283C49B23BAAFB381C2ECB92</code></pre>
<pre><code>auth_key = 8427AB3AF255694313082C5B064784AB927738A5187BC8FC4C5FED395BF3B0B6CAF69630F2338F8CAB3C5D1421054D29FACAE91E3618F9A80026D91B7F4AD916D2D477284CAC9D543572FA534DAA24BC59E4CF0A1361BA1A696E2DAF3FD7974E6000A803B9D70BE51089C1179D6743E23657F05CE361378834C12CD8ED362AE7F77F91932D8FFF15FA8C9170B3BFB664F2BF5D1D95E214DA518B11D4F17A78602143BF3352F33CB66D9E83EC1C1F1EB970F9AF92D7FC37BF5D126216C8B47F5C13D8F69957B850AB6FBD4B3E33E291FC1EBFF00FE8E422A054F7FF6CACBC7CE8605DEC4CACD9143B166CB9904D11AD1EC9246BADECA8D6CF0AEF0A2B809BA7B4</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 1C B8 4D 55 60 70 66
0010 | 74 00 00 00 34 F7 CB 3B 2B 9B B4 57 48 8F 49 54
0020 | 41 48 B3 ED 2C 05 34 66 67 AF D3 E0 E0 69 4C 75
0030 | FE F5 FF DC A1 EE F5 BE BD 8D 2E F0 B7 AD 09 D9
0040 | 52 2B B8 7D F8 F0 2C FB</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 38 CA A5 0C 64 70 66
0010 | 74 00 00 00 34 F7 CB 3B 17 62 E3 D8 C2 13 A8 FA
0020 | C5 F4 12 25 E3 60 13 1E B2 70 60 7F 52 AD 68 D1
0030 | 56 29 8C 9D DC 64 5F 70 28 31 CF ED AB 09 96 CF
0040 | 21 F7 63 44 B0 93 B2 AB</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,7 +817,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>011CB84D55607066</code></td>
<td><code>0138CAA50C647066</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>
@ -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>2B9BB457488F49544148B3ED2C053466</code></td>
<td><code>1762E3D8C213A8FAC5F41225E360131E</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>67AFD3E0E0694C75FEF5FFDCA1EEF5BE</code></td>
<td><code>B270607F52AD68D156298C9DDC645F70</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>BD8D2EF0B7AD09D9522BB87DF8F02CFB</code></td>
<td><code>2831CFEDAB0996CF21F76344B093B2AB</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>