mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-11-29 11:43:05 +01:00
Update content of files
This commit is contained in:
parent
8578456071
commit
f080c6135d
2 changed files with 207 additions and 207 deletions
|
@ -99,7 +99,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>saved_reaction</strong></td>
|
<td><strong>saved_reaction</strong></td>
|
||||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/Vector%20t">Vector</a><<a href="/type/Reaction">Reaction</a>></td>
|
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/Vector%20t">Vector</a><<a href="/type/Reaction">Reaction</a>></td>
|
||||||
<td> </td>
|
<td>You may search for <a href="/api/saved-messages#tags">saved messages tagged »</a> with one or more reactions using this flag.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>top_msg_id</strong></td>
|
<td><strong>top_msg_id</strong></td>
|
||||||
|
|
|
@ -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>
|
<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 -->
|
<!-- start req_pq_multi -->
|
||||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 30 9A 01 00 21 16 8C 66
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 40 03 0F 00 74 18 8C 66
|
||||||
0010 | 14 00 00 00 F1 8E 7E BE D8 F3 E2 33 6A 52 CF A2
|
0010 | 14 00 00 00 F1 8E 7E BE 4F 8A D4 A8 82 56 52 39
|
||||||
0020 | A8 32 1A FE E3 DD EB 54</code></pre>
|
0020 | 5A D4 8A D5 B9 90 EE 00</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<p>Payload (de)serialization:</p>
|
||||||
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
|
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>309A010021168C66</code></td>
|
<td><code>40030F0074188C66</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>D8F3E2336A52CFA2A8321AFEE3DDEB54</code></td>
|
<td><code>4F8AD4A8825652395AD48AD5B990EE00</code></td>
|
||||||
<td>Random number</td>
|
<td>Random number</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</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>
|
<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 -->
|
<!-- start resPQ -->
|
||||||
<p>Received payload (excluding transport headers/trailers):</p>
|
<p>Received payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 0C 46 7B 21 16 8C 66
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 24 04 E8 74 18 8C 66
|
||||||
0010 | 68 00 00 00 63 24 16 05 D8 F3 E2 33 6A 52 CF A2
|
0010 | B8 00 00 00 63 24 16 05 4F 8A D4 A8 82 56 52 39
|
||||||
0020 | A8 32 1A FE E3 DD EB 54 96 AC AE 31 5A 55 4E C1
|
0020 | 5A D4 8A D5 B9 90 EE 00 19 6D E3 CC D5 20 C5 64
|
||||||
0030 | 36 A5 CE 5E 09 18 9E 4C 08 23 80 E5 92 94 20 8C
|
0030 | C5 A9 40 A3 A8 D6 12 85 08 11 55 2B A3 1C 2D C5
|
||||||
0040 | 17 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
|
0040 | C9 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
|
0050 | 35 5F C3 0B 21 6B E8 6C 02 2B B4 C3 85 FD 64 DE
|
||||||
0060 | 85 1D 9D D0</code></pre>
|
0060 | 85 1D 9D D0</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<p>Payload (de)serialization:</p>
|
||||||
|
@ -132,13 +132,13 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>010C467B21168C66</code></td>
|
<td><code>012404E874188C66</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_length</td>
|
<td>message_length</td>
|
||||||
<td>16, 4</td>
|
<td>16, 4</td>
|
||||||
<td><code>68000000</code> (104 in decimal)</td>
|
<td><code>B8000000</code> (184 in decimal)</td>
|
||||||
<td>Message body length</td>
|
<td>Message body length</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -150,19 +150,19 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>D8F3E2336A52CFA2A8321AFEE3DDEB54</code></td>
|
<td><code>4F8AD4A8825652395AD48AD5B990EE00</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>40, 16</td>
|
<td>40, 16</td>
|
||||||
<td><code>96ACAE315A554EC136A5CE5E09189E4C</code></td>
|
<td><code>196DE3CCD520C564C5A940A3A8D61285</code></td>
|
||||||
<td>Server-generated random number</td>
|
<td>Server-generated random number</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>pq</td>
|
<td>pq</td>
|
||||||
<td>56, 12</td>
|
<td>56, 12</td>
|
||||||
<td><code>082380E59294208C17000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2558297006059588631</td>
|
<td><code>0811552BA31C2DC5C9000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1248952451217606089</td>
|
||||||
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
|
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<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 < q.</h5>
|
<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 < q.</h5>
|
||||||
<!-- start pq -->
|
<!-- start pq -->
|
||||||
<pre><code>pq = 2558297006059588631</code></pre>
|
<pre><code>pq = 1248952451217606089</code></pre>
|
||||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2558297006059588631 = 1450226423 * 1764067297</code></p>
|
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1248952451217606089 = 1007807777 * 1239276457</code></p>
|
||||||
<pre><code>p = 1450226423
|
<pre><code>p = 1007807777
|
||||||
q = 1764067297</code></pre>
|
q = 1239276457</code></pre>
|
||||||
<!-- end pq -->
|
<!-- 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>
|
<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>
|
<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>
|
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
|
||||||
<!-- start p_q_inner_data_dc -->
|
<!-- start p_q_inner_data_dc -->
|
||||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 95 5F F5 A9 08 23 80 E5 92 94 20 8C 17 00 00 00
|
<pre><code>0000 | 95 5F F5 A9 08 11 55 2B A3 1C 2D C5 C9 00 00 00
|
||||||
0010 | 04 56 70 B2 F7 00 00 00 04 69 25 87 E1 00 00 00
|
0010 | 04 3C 11 ED 21 00 00 00 04 49 DD DB A9 00 00 00
|
||||||
0020 | D8 F3 E2 33 6A 52 CF A2 A8 32 1A FE E3 DD EB 54
|
0020 | 4F 8A D4 A8 82 56 52 39 5A D4 8A D5 B9 90 EE 00
|
||||||
0030 | 96 AC AE 31 5A 55 4E C1 36 A5 CE 5E 09 18 9E 4C
|
0030 | 19 6D E3 CC D5 20 C5 64 C5 A9 40 A3 A8 D6 12 85
|
||||||
0040 | B4 96 E9 02 42 5F FB 7C 82 8F 33 DB 4A C5 A6 CA
|
0040 | 4F DA F3 25 7B 01 DD 75 69 4A 73 03 22 47 1D F2
|
||||||
0050 | D8 A3 BD 8A 09 CE 09 77 CA F0 C8 8D AF 24 1B 43
|
0050 | 85 93 7A 3E 72 AE AB E3 16 F7 3F B2 7C CC 62 A1
|
||||||
0060 | 02 00 00 00</code></pre>
|
0060 | 02 00 00 00</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<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>
|
<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 = 1764067297</code></pre>
|
||||||
<tr>
|
<tr>
|
||||||
<td>pq</td>
|
<td>pq</td>
|
||||||
<td>4, 12</td>
|
<td>4, 12</td>
|
||||||
<td><code>082380E59294208C17000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2558297006059588631</td>
|
<td><code>0811552BA31C2DC5C9000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1248952451217606089</td>
|
||||||
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
|
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>p</td>
|
<td>p</td>
|
||||||
<td>16, 8</td>
|
<td>16, 8</td>
|
||||||
<td><code>045670B2F7000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1450226423</td>
|
<td><code>043C11ED21000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1007807777</td>
|
||||||
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>q</td>
|
<td>q</td>
|
||||||
<td>24, 8</td>
|
<td>24, 8</td>
|
||||||
<td><code>04692587E1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1764067297</td>
|
<td><code>0449DDDBA9000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1239276457</td>
|
||||||
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>32, 16</td>
|
<td>32, 16</td>
|
||||||
<td><code>D8F3E2336A52CFA2A8321AFEE3DDEB54</code></td>
|
<td><code>4F8AD4A8825652395AD48AD5B990EE00</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>48, 16</td>
|
<td>48, 16</td>
|
||||||
<td><code>96ACAE315A554EC136A5CE5E09189E4C</code></td>
|
<td><code>196DE3CCD520C564C5A940A3A8D61285</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>new_nonce</td>
|
<td>new_nonce</td>
|
||||||
<td>64, 32</td>
|
<td>64, 32</td>
|
||||||
<td><code>B496E902425FFB7C828F33DB4AC5A6CA</code> <code>D8A3BD8A09CE0977CAF0C88DAF241B43</code></td>
|
<td><code>4FDAF3257B01DD75694A730322471DF2</code> <code>85937A3E72AEABE316F73FB27CCC62A1</code></td>
|
||||||
<td>Client-generated random number</td>
|
<td>Client-generated random number</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -291,39 +291,39 @@ q = 1764067297</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>
|
<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>
|
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 -->
|
<!-- start p_q_inner_data_input -->
|
||||||
<pre><code>data = 955FF5A9082380E59294208C17000000045670B2F700000004692587E1000000D8F3E2336A52CFA2A8321AFEE3DDEB5496ACAE315A554EC136A5CE5E09189E4CB496E902425FFB7C828F33DB4AC5A6CAD8A3BD8A09CE0977CAF0C88DAF241B4302000000
|
<pre><code>data = 955FF5A90811552BA31C2DC5C9000000043C11ED210000000449DDDBA90000004F8AD4A8825652395AD48AD5B990EE00196DE3CCD520C564C5A940A3A8D612854FDAF3257B01DD75694A730322471DF285937A3E72AEABE316F73FB27CCC62A102000000
|
||||||
random_padding_bytes = 92C15230DFD9DFF77DEA9BD7084AE529436D7828DBF6B33B46807E8969B0F49B6FDEB33185AF89A9E11E31326B8A15E6624299EB7BD8A9DC4369DF65488C29CE6472FED0F9733B7FEA649E4DBDC8913B19EA4F06CF226AC3A05ED273</code></pre>
|
random_padding_bytes = C64114D13B119049B5378A300000A630F1C3F85A66C96423B283C3830F7DC892EED18F7F6AB1B58A3AB507580CA79D01CFFE2F5A62EBF9922209E3BEE9BB75714DEEF2EE9512BC8D78BC0ED4CDCDEA083CBD6FA3268F0FC438F174C0</code></pre>
|
||||||
<!-- end p_q_inner_data_input -->
|
<!-- end p_q_inner_data_input -->
|
||||||
<p>And this is the output:</p>
|
<p>And this is the output:</p>
|
||||||
<!-- start p_q_inner_data_output -->
|
<!-- start p_q_inner_data_output -->
|
||||||
<pre><code>encrypted_data = 4CDD4961438B90DC95EE906EF50CE809AD7539F1CC33BE480578599A30504A35F246860679F0347B66A543CB3F65BC0B274F945DB8C24379C99DBE856CB9400A558E8EF54FC01F55681EC5FDD43D669616CEFC70C5FE71FF594C19D10031DAC24359DB89C1E845C1583C37C48C7945D93543FAE5FF2C197FEAF9CDE9D719123B2BDAB5EEF445E8C2EE8AE6FF1E03923F7DC510159B1795EE2D3BA0CDF280D63EAF78CB4923B18A32C05A76C88CD1E6CF317C38A492EAFC079AE0940DC6A67551CA61AA1F2DCC7A31A1E8E5ECD8E597CB3C1E64C59F0CC807F089FDB170675A77FB5806DEC426662E679AE7068A28DCF629AD733AFED2B09D1D7A5F20805325D9</code></pre>
|
<pre><code>encrypted_data = 31C212CD28D2D5F5E47373F92BD577FB165C71AE8279A8422B900603D4B79D778F2A3A4BB8B97AE933761CF6F62827FE23E414366CFBA50FE14CCC090319D4C6BE434494E052872CE8BA4A25F193D42F2FE9C7F8977B250E587FCABAC92C4B8E65C154A5DB3EFE32878E7DCC852D3E95A824B7AB97F41CF12AE8B5DBED6643369A16AF9BBB3959BC82E35C3D87749ECC45C68CB4502F646A3E3AEF7270633B20C13840CBEA13A58091B9F0BF1B5881D8426B08E966A524BCE51EB28FC8AD7E8943E2D858BDD42AB62864AA6ECB1091CB5B0FA279BE5DE694602C9E974C41B7C9D7EC75AE3BC7C2E0696D335E5261795D2C4AE0A4E8708418678A8AE57F1903F4</code></pre>
|
||||||
<!-- end p_q_inner_data_output -->
|
<!-- end p_q_inner_data_output -->
|
||||||
<p>The length of the final string is 256 bytes.</p>
|
<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>
|
<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 -->
|
<!-- start req_DH_params -->
|
||||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 8C 1A 06 00 21 16 8C 66
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 24 A6 01 00 75 18 8C 66
|
||||||
0010 | 40 01 00 00 BE E4 12 D7 D8 F3 E2 33 6A 52 CF A2
|
0010 | 40 01 00 00 BE E4 12 D7 4F 8A D4 A8 82 56 52 39
|
||||||
0020 | A8 32 1A FE E3 DD EB 54 96 AC AE 31 5A 55 4E C1
|
0020 | 5A D4 8A D5 B9 90 EE 00 19 6D E3 CC D5 20 C5 64
|
||||||
0030 | 36 A5 CE 5E 09 18 9E 4C 04 56 70 B2 F7 00 00 00
|
0030 | C5 A9 40 A3 A8 D6 12 85 04 3C 11 ED 21 00 00 00
|
||||||
0040 | 04 69 25 87 E1 00 00 00 85 FD 64 DE 85 1D 9D D0
|
0040 | 04 49 DD DB A9 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||||
0050 | FE 00 01 00 4C DD 49 61 43 8B 90 DC 95 EE 90 6E
|
0050 | FE 00 01 00 31 C2 12 CD 28 D2 D5 F5 E4 73 73 F9
|
||||||
0060 | F5 0C E8 09 AD 75 39 F1 CC 33 BE 48 05 78 59 9A
|
0060 | 2B D5 77 FB 16 5C 71 AE 82 79 A8 42 2B 90 06 03
|
||||||
0070 | 30 50 4A 35 F2 46 86 06 79 F0 34 7B 66 A5 43 CB
|
0070 | D4 B7 9D 77 8F 2A 3A 4B B8 B9 7A E9 33 76 1C F6
|
||||||
0080 | 3F 65 BC 0B 27 4F 94 5D B8 C2 43 79 C9 9D BE 85
|
0080 | F6 28 27 FE 23 E4 14 36 6C FB A5 0F E1 4C CC 09
|
||||||
0090 | 6C B9 40 0A 55 8E 8E F5 4F C0 1F 55 68 1E C5 FD
|
0090 | 03 19 D4 C6 BE 43 44 94 E0 52 87 2C E8 BA 4A 25
|
||||||
00A0 | D4 3D 66 96 16 CE FC 70 C5 FE 71 FF 59 4C 19 D1
|
00A0 | F1 93 D4 2F 2F E9 C7 F8 97 7B 25 0E 58 7F CA BA
|
||||||
00B0 | 00 31 DA C2 43 59 DB 89 C1 E8 45 C1 58 3C 37 C4
|
00B0 | C9 2C 4B 8E 65 C1 54 A5 DB 3E FE 32 87 8E 7D CC
|
||||||
00C0 | 8C 79 45 D9 35 43 FA E5 FF 2C 19 7F EA F9 CD E9
|
00C0 | 85 2D 3E 95 A8 24 B7 AB 97 F4 1C F1 2A E8 B5 DB
|
||||||
00D0 | D7 19 12 3B 2B DA B5 EE F4 45 E8 C2 EE 8A E6 FF
|
00D0 | ED 66 43 36 9A 16 AF 9B BB 39 59 BC 82 E3 5C 3D
|
||||||
00E0 | 1E 03 92 3F 7D C5 10 15 9B 17 95 EE 2D 3B A0 CD
|
00E0 | 87 74 9E CC 45 C6 8C B4 50 2F 64 6A 3E 3A EF 72
|
||||||
00F0 | F2 80 D6 3E AF 78 CB 49 23 B1 8A 32 C0 5A 76 C8
|
00F0 | 70 63 3B 20 C1 38 40 CB EA 13 A5 80 91 B9 F0 BF
|
||||||
0100 | 8C D1 E6 CF 31 7C 38 A4 92 EA FC 07 9A E0 94 0D
|
0100 | 1B 58 81 D8 42 6B 08 E9 66 A5 24 BC E5 1E B2 8F
|
||||||
0110 | C6 A6 75 51 CA 61 AA 1F 2D CC 7A 31 A1 E8 E5 EC
|
0110 | C8 AD 7E 89 43 E2 D8 58 BD D4 2A B6 28 64 AA 6E
|
||||||
0120 | D8 E5 97 CB 3C 1E 64 C5 9F 0C C8 07 F0 89 FD B1
|
0120 | CB 10 91 CB 5B 0F A2 79 BE 5D E6 94 60 2C 9E 97
|
||||||
0130 | 70 67 5A 77 FB 58 06 DE C4 26 66 2E 67 9A E7 06
|
0130 | 4C 41 B7 C9 D7 EC 75 AE 3B C7 C2 E0 69 6D 33 5E
|
||||||
0140 | 8A 28 DC F6 29 AD 73 3A FE D2 B0 9D 1D 7A 5F 20
|
0140 | 52 61 79 5D 2C 4A E0 A4 E8 70 84 18 67 8A 8A E5
|
||||||
0150 | 80 53 25 D9</code></pre>
|
0150 | 7F 19 03 F4</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<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>
|
<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">
|
<table class="table">
|
||||||
|
@ -345,7 +345,7 @@ random_padding_bytes = 92C15230DFD9DFF77DEA9BD7084AE529436D7828DBF6B33B46807E896
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>8C1A060021168C66</code></td>
|
<td><code>24A6010075188C66</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -363,25 +363,25 @@ random_padding_bytes = 92C15230DFD9DFF77DEA9BD7084AE529436D7828DBF6B33B46807E896
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>D8F3E2336A52CFA2A8321AFEE3DDEB54</code></td>
|
<td><code>4F8AD4A8825652395AD48AD5B990EE00</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>40, 16</td>
|
<td>40, 16</td>
|
||||||
<td><code>96ACAE315A554EC136A5CE5E09189E4C</code></td>
|
<td><code>196DE3CCD520C564C5A940A3A8D61285</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>p</td>
|
<td>p</td>
|
||||||
<td>56, 8</td>
|
<td>56, 8</td>
|
||||||
<td><code>045670B2F7000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1450226423</td>
|
<td><code>043C11ED21000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1007807777</td>
|
||||||
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>q</td>
|
<td>q</td>
|
||||||
<td>64, 8</td>
|
<td>64, 8</td>
|
||||||
<td><code>04692587E1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1764067297</td>
|
<td><code>0449DDDBA9000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1239276457</td>
|
||||||
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -393,7 +393,7 @@ random_padding_bytes = 92C15230DFD9DFF77DEA9BD7084AE529436D7828DBF6B33B46807E896
|
||||||
<tr>
|
<tr>
|
||||||
<td>encrypted_data</td>
|
<td>encrypted_data</td>
|
||||||
<td>80, 260</td>
|
<td>80, 260</td>
|
||||||
<td><code>FE0001004CDD4961438B90DC95EE906E</code> <code>F50CE809AD7539F1CC33BE480578599A</code> <code>30504A35F246860679F0347B66A543CB</code> <code>3F65BC0B274F945DB8C24379C99DBE85</code> <code>6CB9400A558E8EF54FC01F55681EC5FD</code> <code>D43D669616CEFC70C5FE71FF594C19D1</code> <code>0031DAC24359DB89C1E845C1583C37C4</code> <code>8C7945D93543FAE5FF2C197FEAF9CDE9</code> <code>D719123B2BDAB5EEF445E8C2EE8AE6FF</code> <code>1E03923F7DC510159B1795EE2D3BA0CD</code> <code>F280D63EAF78CB4923B18A32C05A76C8</code> <code>8CD1E6CF317C38A492EAFC079AE0940D</code> <code>C6A67551CA61AA1F2DCC7A31A1E8E5EC</code> <code>D8E597CB3C1E64C59F0CC807F089FDB1</code> <code>70675A77FB5806DEC426662E679AE706</code> <code>8A28DCF629AD733AFED2B09D1D7A5F20</code><br> <code>805325D9</code></td>
|
<td><code>FE00010031C212CD28D2D5F5E47373F9</code> <code>2BD577FB165C71AE8279A8422B900603</code> <code>D4B79D778F2A3A4BB8B97AE933761CF6</code> <code>F62827FE23E414366CFBA50FE14CCC09</code> <code>0319D4C6BE434494E052872CE8BA4A25</code> <code>F193D42F2FE9C7F8977B250E587FCABA</code> <code>C92C4B8E65C154A5DB3EFE32878E7DCC</code> <code>852D3E95A824B7AB97F41CF12AE8B5DB</code> <code>ED6643369A16AF9BBB3959BC82E35C3D</code> <code>87749ECC45C68CB4502F646A3E3AEF72</code> <code>70633B20C13840CBEA13A58091B9F0BF</code> <code>1B5881D8426B08E966A524BCE51EB28F</code> <code>C8AD7E8943E2D858BDD42AB62864AA6E</code> <code>CB1091CB5B0FA279BE5DE694602C9E97</code> <code>4C41B7C9D7EC75AE3BC7C2E0696D335E</code> <code>5261795D2C4AE0A4E8708418678A8AE5</code><br> <code>7F1903F4</code></td>
|
||||||
<td>Value generated above</td>
|
<td>Value generated above</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -402,47 +402,47 @@ random_padding_bytes = 92C15230DFD9DFF77DEA9BD7084AE529436D7828DBF6B33B46807E896
|
||||||
<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>
|
<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 -->
|
<!-- start server_DH_params_ok -->
|
||||||
<p>Received payload (excluding transport headers/trailers):</p>
|
<p>Received payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C4 8A 24 22 16 8C 66
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 F0 D2 9D 75 18 8C 66
|
||||||
0010 | C4 02 00 00 5C 07 E8 D0 D8 F3 E2 33 6A 52 CF A2
|
0010 | F0 02 00 00 5C 07 E8 D0 4F 8A D4 A8 82 56 52 39
|
||||||
0020 | A8 32 1A FE E3 DD EB 54 96 AC AE 31 5A 55 4E C1
|
0020 | 5A D4 8A D5 B9 90 EE 00 19 6D E3 CC D5 20 C5 64
|
||||||
0030 | 36 A5 CE 5E 09 18 9E 4C FE 50 02 00 E7 77 87 B2
|
0030 | C5 A9 40 A3 A8 D6 12 85 FE 50 02 00 C1 93 93 87
|
||||||
0040 | F2 CE 56 BC C5 CE 9A 9E 72 08 7A 57 6E 6C 75 2F
|
0040 | 38 BF 29 26 51 AE 24 A3 4E 4D 01 1C DF 99 CD DF
|
||||||
0050 | 4E BD 90 CF 80 AB F3 59 38 5F 72 7D FE CD 08 6D
|
0050 | 88 26 52 14 56 96 1C 66 88 C4 61 C7 CA C7 A5 8D
|
||||||
0060 | 2E 69 98 12 43 6B 10 82 36 A8 ED 20 19 39 CA AC
|
0060 | 04 18 96 1F FB D9 01 52 BE 9A 68 E6 AD 15 35 26
|
||||||
0070 | 6A E1 B9 47 A6 8E 3C 0B 6A 99 C0 19 A7 21 EE 23
|
0070 | 89 99 43 38 F5 8E 31 FF EB EA 8C F1 91 D1 BC 8B
|
||||||
0080 | 7C 67 85 BC 34 E5 BD 2C E4 0C DA 7D FD E1 90 3F
|
0080 | 2C 8A B1 AF 0A 46 B7 37 9F 34 A2 48 84 7E 06 03
|
||||||
0090 | DF 96 30 53 7C 7D A3 7E 09 43 DB B0 4B 63 B3 F3
|
0090 | 0A 61 2E 69 86 07 4C 26 C8 A2 43 C1 27 56 33 84
|
||||||
00A0 | D7 02 FA 38 BF C8 26 35 C3 41 FA 59 A2 AE 04 9A
|
00A0 | 89 A1 A8 40 E0 55 23 F7 85 65 01 DB 6E BA 59 4D
|
||||||
00B0 | 92 83 F9 F3 39 23 C3 25 43 CF 55 1F D3 F9 33 8B
|
00B0 | 2D 66 D4 CE AD 43 64 55 60 AD 54 F9 FA 6F 65 6D
|
||||||
00C0 | CD F1 8F 3F 4D F8 6C 72 FF 9D 77 78 71 F8 C6 1D
|
00C0 | 30 74 8C F4 38 12 12 32 2F B4 1E 26 95 73 69 39
|
||||||
00D0 | 93 0A 40 BF D9 E3 74 70 67 DE A6 8E 30 84 31 7C
|
00D0 | F9 2D B7 41 CA 10 E8 90 78 39 D9 3C 14 9F 71 4F
|
||||||
00E0 | D0 28 E8 6F B5 0B BD BC 55 76 36 7C E0 A0 D5 D7
|
00E0 | A1 0B EC E7 C1 0D 0F 7A 66 03 21 26 F1 FD C5 FD
|
||||||
00F0 | 56 7C A8 84 9B ED 14 08 DF 88 02 17 8E E4 70 A2
|
00F0 | 15 BD D0 03 88 7B 18 01 05 C9 E7 65 C6 F3 F9 8A
|
||||||
0100 | B2 1D 80 D2 C4 DE 79 E6 98 F5 64 CF 0D 13 30 25
|
0100 | 24 0B 12 CD E1 B0 34 61 71 08 98 8E 82 2B 3B 62
|
||||||
0110 | 11 36 51 B0 EE 93 25 AE 5E 7C 5E 0B B8 E7 04 21
|
0110 | 3D EB 3C 4F E0 AD 72 6A 54 26 B0 35 B8 6E E1 90
|
||||||
0120 | 52 C3 5F C9 C2 9C 25 35 48 78 C9 1D 0C EB A6 18
|
0120 | 19 2B FD 43 0A 53 41 D1 E2 9F CF D1 0B 8F CD 61
|
||||||
0130 | D6 F3 41 9E B9 5C F3 A4 70 EE 93 FC EF E6 C4 C9
|
0130 | 06 25 05 E5 05 B6 2D C9 34 D2 88 94 AF 06 76 DE
|
||||||
0140 | C9 8D EC 0E 29 58 A6 E1 2C 5D ED FC 4E 9A AA A1
|
0140 | D4 2C 7D 13 81 6E 7E 74 88 E8 A1 9F C9 B2 5C F9
|
||||||
0150 | A5 E7 E5 93 15 CE C8 D4 A5 D8 1B 7C 75 C1 FB 2C
|
0150 | FF 03 F0 9E 10 22 8B 19 83 95 3D EE DE 6A EB 33
|
||||||
0160 | 4F C4 0D 9B A1 15 97 1C 9E D0 1E 2C BA F8 C0 6E
|
0160 | F0 E3 02 DB 0F C0 E6 0B C9 E5 C5 23 FF DA 04 F1
|
||||||
0170 | 5B B9 E1 39 04 E8 F1 4E 96 C6 D0 0C 28 CB 71 EE
|
0170 | DC 2A 13 3B 91 61 80 FC 2F 94 56 92 5A CB E6 10
|
||||||
0180 | 72 BF 00 CF D3 1C 94 62 E8 34 4F 60 AA B9 44 EA
|
0180 | CA 0D 49 9C 36 9B EB BA 4F D4 A6 75 FC 36 D0 D7
|
||||||
0190 | E3 B2 78 30 EF BC 42 3D D7 DA EC BD 09 1D 91 59
|
0190 | 3B EC F8 85 57 76 3F 7B 88 EE 9C D9 90 1A E2 E8
|
||||||
01A0 | 2D D8 6B 1F FA 8A 7A A1 B1 C1 51 C0 35 94 CD A9
|
01A0 | 67 47 AE 7B 27 2A 03 72 83 C1 B4 FF 15 D8 77 88
|
||||||
01B0 | D1 E6 72 54 53 46 AD 3E AA B5 B6 7C 79 78 54 DB
|
01B0 | 5C 81 8F C3 2A D5 90 C6 50 A7 34 94 6E DB 90 21
|
||||||
01C0 | 09 A2 D2 C5 9A E7 AD AD CF 78 58 3F 15 02 B4 26
|
01C0 | CE 1E 0B A5 DA 9A F1 1D 3F 67 52 37 02 6C BE 1B
|
||||||
01D0 | E9 F1 24 75 98 8C 83 F9 B9 07 35 F7 8B 05 2F 3B
|
01D0 | 52 F6 8F E3 5A FF 84 34 1B 61 67 DE CC 7E 8B F8
|
||||||
01E0 | 5F B2 A6 82 34 96 6B F5 32 0A D2 61 4E AB 10 38
|
01E0 | D5 72 3F E5 6E AF ED 07 DC 99 18 8B 67 81 AE 81
|
||||||
01F0 | 3A 02 89 63 6D 41 3A 91 D5 C5 50 E4 D8 4C FE ED
|
01F0 | 91 4F 8D A1 75 AB C6 82 72 6F 95 5A CB 4E 93 D8
|
||||||
0200 | 6E E0 1C FD A6 F4 5B 7E 38 59 72 A6 69 75 BE F8
|
0200 | EC B7 37 6A 1F 19 F0 5D 9A 05 F9 B9 59 46 A5 9F
|
||||||
0210 | D5 67 69 FC A2 3F 9F 98 79 29 93 72 34 5A BD AB
|
0210 | E0 3E 01 F8 32 85 84 65 F9 49 F8 50 6E 3C 53 8B
|
||||||
0220 | F6 A7 D9 AA 9F 40 A2 65 2F EE D2 09 DB CF 99 91
|
0220 | 63 EB 50 75 60 6F 21 19 52 EB 25 C5 CD A7 3D 57
|
||||||
0230 | D8 A5 DF 4A 76 CA 4D 8C 61 31 A9 43 59 45 EC C2
|
0230 | 36 08 28 90 21 99 80 48 B0 EF C7 2F FA D2 54 E7
|
||||||
0240 | 65 E8 39 6A 3C A3 17 67 67 86 13 DB A2 A2 76 ED
|
0240 | F3 13 4F F7 CD 8B 2A 8D 49 9D C9 A8 2F A1 87 C3
|
||||||
0250 | 02 88 D6 A7 17 3A 2D D0 8B A5 8B 44 AC 35 48 3E
|
0250 | 21 47 A6 A7 42 8C DC 81 BA AF 1D FC 86 09 3D A3
|
||||||
0260 | 25 32 D4 4E 81 3F 70 94 FF F7 1D 96 B3 6A 44 DE
|
0260 | 6C 73 C2 17 B7 BC F3 BC 5C C6 AD 73 1F F9 9F 14
|
||||||
0270 | 50 76 2B 6F 0D CA A7 D6 A1 85 2F 5F 93 7C 28 6B
|
0270 | 84 01 05 C1 23 E5 A0 A2 3C 8F 33 99 93 5A 47 71
|
||||||
0280 | 26 0A 2E 41 74 B3 60 EB 01 49 10 50</code></pre>
|
0280 | F6 5C EF DC 6A AA 76 81 1C D1 BB 1D</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<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>
|
<pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -464,13 +464,13 @@ random_padding_bytes = 92C15230DFD9DFF77DEA9BD7084AE529436D7828DBF6B33B46807E896
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>01C48A2422168C66</code></td>
|
<td><code>01F0D29D75188C66</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_length</td>
|
<td>message_length</td>
|
||||||
<td>16, 4</td>
|
<td>16, 4</td>
|
||||||
<td><code>C4020000</code> (708 in decimal)</td>
|
<td><code>F0020000</code> (752 in decimal)</td>
|
||||||
<td>Message body length</td>
|
<td>Message body length</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -482,19 +482,19 @@ random_padding_bytes = 92C15230DFD9DFF77DEA9BD7084AE529436D7828DBF6B33B46807E896
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>D8F3E2336A52CFA2A8321AFEE3DDEB54</code></td>
|
<td><code>4F8AD4A8825652395AD48AD5B990EE00</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>40, 16</td>
|
<td>40, 16</td>
|
||||||
<td><code>96ACAE315A554EC136A5CE5E09189E4C</code></td>
|
<td><code>196DE3CCD520C564C5A940A3A8D61285</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>encrypted_answer</td>
|
<td>encrypted_answer</td>
|
||||||
<td>56, 596</td>
|
<td>56, 596</td>
|
||||||
<td><code>FE500200E77787B2F2CE56BCC5CE9A9E</code> <code>72087A576E6C752F4EBD90CF80ABF359</code> <code>385F727DFECD086D2E699812436B1082</code> <code>36A8ED201939CAAC6AE1B947A68E3C0B</code> <code>6A99C019A721EE237C6785BC34E5BD2C</code> <code>E40CDA7DFDE1903FDF9630537C7DA37E</code> <code>0943DBB04B63B3F3D702FA38BFC82635</code> <code>C341FA59A2AE049A9283F9F33923C325</code> <code>43CF551FD3F9338BCDF18F3F4DF86C72</code> <code>FF9D777871F8C61D930A40BFD9E37470</code> <code>67DEA68E3084317CD028E86FB50BBDBC</code> <code>5576367CE0A0D5D7567CA8849BED1408</code> <code>DF8802178EE470A2B21D80D2C4DE79E6</code> <code>98F564CF0D133025113651B0EE9325AE</code> <code>5E7C5E0BB8E7042152C35FC9C29C2535</code> <code>4878C91D0CEBA618D6F3419EB95CF3A4</code> <code>70EE93FCEFE6C4C9C98DEC0E2958A6E1</code> <code>2C5DEDFC4E9AAAA1A5E7E59315CEC8D4</code> <code>A5D81B7C75C1FB2C4FC40D9BA115971C</code> <code>9ED01E2CBAF8C06E5BB9E13904E8F14E</code> <code>96C6D00C28CB71EE72BF00CFD31C9462</code> <code>E8344F60AAB944EAE3B27830EFBC423D</code> <code>D7DAECBD091D91592DD86B1FFA8A7AA1</code> <code>B1C151C03594CDA9D1E672545346AD3E</code> <code>AAB5B67C797854DB09A2D2C59AE7ADAD</code> <code>CF78583F1502B426E9F12475988C83F9</code> <code>B90735F78B052F3B5FB2A68234966BF5</code> <code>320AD2614EAB10383A0289636D413A91</code> <code>D5C550E4D84CFEED6EE01CFDA6F45B7E</code> <code>385972A66975BEF8D56769FCA23F9F98</code> <code>79299372345ABDABF6A7D9AA9F40A265</code> <code>2FEED209DBCF9991D8A5DF4A76CA4D8C</code> <code>6131A9435945ECC265E8396A3CA31767</code> <code>678613DBA2A276ED0288D6A7173A2DD0</code> <code>8BA58B44AC35483E2532D44E813F7094</code> <code>FFF71D96B36A44DE50762B6F0DCAA7D6</code> <code>A1852F5F937C286B260A2E4174B360EB</code><br> <code>01491050</code></td>
|
<td><code>FE500200C193938738BF292651AE24A3</code> <code>4E4D011CDF99CDDF8826521456961C66</code> <code>88C461C7CAC7A58D0418961FFBD90152</code> <code>BE9A68E6AD15352689994338F58E31FF</code> <code>EBEA8CF191D1BC8B2C8AB1AF0A46B737</code> <code>9F34A248847E06030A612E6986074C26</code> <code>C8A243C12756338489A1A840E05523F7</code> <code>856501DB6EBA594D2D66D4CEAD436455</code> <code>60AD54F9FA6F656D30748CF438121232</code> <code>2FB41E2695736939F92DB741CA10E890</code> <code>7839D93C149F714FA10BECE7C10D0F7A</code> <code>66032126F1FDC5FD15BDD003887B1801</code> <code>05C9E765C6F3F98A240B12CDE1B03461</code> <code>7108988E822B3B623DEB3C4FE0AD726A</code> <code>5426B035B86EE190192BFD430A5341D1</code> <code>E29FCFD10B8FCD61062505E505B62DC9</code> <code>34D28894AF0676DED42C7D13816E7E74</code> <code>88E8A19FC9B25CF9FF03F09E10228B19</code> <code>83953DEEDE6AEB33F0E302DB0FC0E60B</code> <code>C9E5C523FFDA04F1DC2A133B916180FC</code> <code>2F9456925ACBE610CA0D499C369BEBBA</code> <code>4FD4A675FC36D0D73BECF88557763F7B</code> <code>88EE9CD9901AE2E86747AE7B272A0372</code> <code>83C1B4FF15D877885C818FC32AD590C6</code> <code>50A734946EDB9021CE1E0BA5DA9AF11D</code> <code>3F675237026CBE1B52F68FE35AFF8434</code> <code>1B6167DECC7E8BF8D5723FE56EAFED07</code> <code>DC99188B6781AE81914F8DA175ABC682</code> <code>726F955ACB4E93D8ECB7376A1F19F05D</code> <code>9A05F9B95946A59FE03E01F832858465</code> <code>F949F8506E3C538B63EB5075606F2119</code> <code>52EB25C5CDA73D573608289021998048</code> <code>B0EFC72FFAD254E7F3134FF7CD8B2A8D</code> <code>499DC9A82FA187C32147A6A7428CDC81</code> <code>BAAF1DFC86093DA36C73C217B7BCF3BC</code> <code>5CC6AD731FF99F14840105C123E5A0A2</code> <code>3C8F3399935A4771F65CEFDC6AAA7681</code><br> <code>1CD1BB1D</code></td>
|
||||||
<td>See below</td>
|
<td>See below</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -502,20 +502,20 @@ random_padding_bytes = 92C15230DFD9DFF77DEA9BD7084AE529436D7828DBF6B33B46807E896
|
||||||
<!-- end server_DH_params_ok -->
|
<!-- 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>
|
<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 -->
|
<!-- start server_DH_inner_data_input -->
|
||||||
<pre><code>encrypted_answer = E77787B2F2CE56BCC5CE9A9E72087A576E6C752F4EBD90CF80ABF359385F727DFECD086D2E699812436B108236A8ED201939CAAC6AE1B947A68E3C0B6A99C019A721EE237C6785BC34E5BD2CE40CDA7DFDE1903FDF9630537C7DA37E0943DBB04B63B3F3D702FA38BFC82635C341FA59A2AE049A9283F9F33923C32543CF551FD3F9338BCDF18F3F4DF86C72FF9D777871F8C61D930A40BFD9E3747067DEA68E3084317CD028E86FB50BBDBC5576367CE0A0D5D7567CA8849BED1408DF8802178EE470A2B21D80D2C4DE79E698F564CF0D133025113651B0EE9325AE5E7C5E0BB8E7042152C35FC9C29C25354878C91D0CEBA618D6F3419EB95CF3A470EE93FCEFE6C4C9C98DEC0E2958A6E12C5DEDFC4E9AAAA1A5E7E59315CEC8D4A5D81B7C75C1FB2C4FC40D9BA115971C9ED01E2CBAF8C06E5BB9E13904E8F14E96C6D00C28CB71EE72BF00CFD31C9462E8344F60AAB944EAE3B27830EFBC423DD7DAECBD091D91592DD86B1FFA8A7AA1B1C151C03594CDA9D1E672545346AD3EAAB5B67C797854DB09A2D2C59AE7ADADCF78583F1502B426E9F12475988C83F9B90735F78B052F3B5FB2A68234966BF5320AD2614EAB10383A0289636D413A91D5C550E4D84CFEED6EE01CFDA6F45B7E385972A66975BEF8D56769FCA23F9F9879299372345ABDABF6A7D9AA9F40A2652FEED209DBCF9991D8A5DF4A76CA4D8C6131A9435945ECC265E8396A3CA31767678613DBA2A276ED0288D6A7173A2DD08BA58B44AC35483E2532D44E813F7094FFF71D96B36A44DE50762B6F0DCAA7D6A1852F5F937C286B260A2E4174B360EB01491050
|
<pre><code>encrypted_answer = C193938738BF292651AE24A34E4D011CDF99CDDF8826521456961C6688C461C7CAC7A58D0418961FFBD90152BE9A68E6AD15352689994338F58E31FFEBEA8CF191D1BC8B2C8AB1AF0A46B7379F34A248847E06030A612E6986074C26C8A243C12756338489A1A840E05523F7856501DB6EBA594D2D66D4CEAD43645560AD54F9FA6F656D30748CF4381212322FB41E2695736939F92DB741CA10E8907839D93C149F714FA10BECE7C10D0F7A66032126F1FDC5FD15BDD003887B180105C9E765C6F3F98A240B12CDE1B034617108988E822B3B623DEB3C4FE0AD726A5426B035B86EE190192BFD430A5341D1E29FCFD10B8FCD61062505E505B62DC934D28894AF0676DED42C7D13816E7E7488E8A19FC9B25CF9FF03F09E10228B1983953DEEDE6AEB33F0E302DB0FC0E60BC9E5C523FFDA04F1DC2A133B916180FC2F9456925ACBE610CA0D499C369BEBBA4FD4A675FC36D0D73BECF88557763F7B88EE9CD9901AE2E86747AE7B272A037283C1B4FF15D877885C818FC32AD590C650A734946EDB9021CE1E0BA5DA9AF11D3F675237026CBE1B52F68FE35AFF84341B6167DECC7E8BF8D5723FE56EAFED07DC99188B6781AE81914F8DA175ABC682726F955ACB4E93D8ECB7376A1F19F05D9A05F9B95946A59FE03E01F832858465F949F8506E3C538B63EB5075606F211952EB25C5CDA73D573608289021998048B0EFC72FFAD254E7F3134FF7CD8B2A8D499DC9A82FA187C32147A6A7428CDC81BAAF1DFC86093DA36C73C217B7BCF3BC5CC6AD731FF99F14840105C123E5A0A23C8F3399935A4771F65CEFDC6AAA76811CD1BB1D
|
||||||
tmp_aes_key = 966C419FB48CFB2CB3B4AB61A519A9AFE243B280C258CEB9089B78D374D6BC2C
|
tmp_aes_key = 3D83FFF9F0BCD34B90BB9754CD384E385E7921A9AC2884859E181C83C4BB494A
|
||||||
tmp_aes_iv = 9F36806ABB858119A8FC4CFA189118F2A6BF82EC8C21B9B7A13ED5E2B496E902</code></pre>
|
tmp_aes_iv = 27D6578FB50EB70C2F0AEC5431F745B73A285D0571718F37960274024FDAF325</code></pre>
|
||||||
<!-- end server_DH_inner_data_input -->
|
<!-- end server_DH_inner_data_input -->
|
||||||
<p>Yielding:</p>
|
<p>Yielding:</p>
|
||||||
<!-- start server_DH_inner_data_output -->
|
<!-- start server_DH_inner_data_output -->
|
||||||
<pre><code>answer_with_hash = A51E6E81B6D5C3A97AD8444848F185A3885667E1BA0D89B5D8F3E2336A52CFA2A8321AFEE3DDEB5496ACAE315A554EC136A5CE5E09189E4C03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001001138081AE3FCC398AB6E9A89C6A3496A11D5506E5AAFCFF471DD91D90ACA01C205E1674E34140B798174579F22D44ECFDB4DDD1138E9DDC0CF2083F63BB86114884DDE3DC4C8DDD4C0FF895727E0FE53F2FD190867D60736BCA691DF2631C761522833ED9AD67359226819A6E9AEEA36679558B54B41414B06AD0D31F80B88D5B836499CAF97C2E4DCAC9E4AA3F4D01F0451B2CD9A862E7694ED3ED9618A77B1076734E785778A443A22C6119F2D995B0588CDDA9809595206DA9BCA6A3E44ABF1BE9D0ADC485A7C2DF773A7827F3D2D25FC3F892F79CB034891663F63DDC1ED4342360D8E3ECBA57125B3EDB46D33C2538EDA54033CB367C5A4285D5882D00322168C660F85ED59FE075F64
|
<pre><code>answer_with_hash = E86319DEA4BB761F58753DD6E82F3222CCD12F44BA0D89B54F8AD4A8825652395AD48AD5B990EE00196DE3CCD520C564C5A940A3A8D6128503000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100184862CB5A3BEA698D2308C70A1B41D284FA2BE2A85A537DD0495FEAD990247D6780194096531C6D18206AFC84B22E776E18096326BE18CCC1F6B13F2FA766A89CBDD15C4FB8D1FCD8D19A5FD1232294DA2938C578798B30FEA7661E5EA7B66C1B7E06A6BAD66FBC4B90916B0363223B4DAD9600D630E002E88C0853CE8F6D18E80362CDB9138532DF16A99B1F98F0CA8839B427FF8EC5091867567160509470D4A2126AFEA77486849B19E940812590EE1AE32EA02E74EDD51C204287A1E49E5BDF5D15AFB2E55E650FFE5A7F829467BA335C2B2EB29B96C6B5A67BC0D91233A5E9DD931D6C007723CEAF4516472A124959BADD1E9E25A28CA6602B0231623975188C661D36F14E4074B23C
|
||||||
answer = BA0D89B5D8F3E2336A52CFA2A8321AFEE3DDEB5496ACAE315A554EC136A5CE5E09189E4C03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001001138081AE3FCC398AB6E9A89C6A3496A11D5506E5AAFCFF471DD91D90ACA01C205E1674E34140B798174579F22D44ECFDB4DDD1138E9DDC0CF2083F63BB86114884DDE3DC4C8DDD4C0FF895727E0FE53F2FD190867D60736BCA691DF2631C761522833ED9AD67359226819A6E9AEEA36679558B54B41414B06AD0D31F80B88D5B836499CAF97C2E4DCAC9E4AA3F4D01F0451B2CD9A862E7694ED3ED9618A77B1076734E785778A443A22C6119F2D995B0588CDDA9809595206DA9BCA6A3E44ABF1BE9D0ADC485A7C2DF773A7827F3D2D25FC3F892F79CB034891663F63DDC1ED4342360D8E3ECBA57125B3EDB46D33C2538EDA54033CB367C5A4285D5882D00322168C660F85ED59FE075F64</code></pre>
|
answer = BA0D89B54F8AD4A8825652395AD48AD5B990EE00196DE3CCD520C564C5A940A3A8D6128503000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100184862CB5A3BEA698D2308C70A1B41D284FA2BE2A85A537DD0495FEAD990247D6780194096531C6D18206AFC84B22E776E18096326BE18CCC1F6B13F2FA766A89CBDD15C4FB8D1FCD8D19A5FD1232294DA2938C578798B30FEA7661E5EA7B66C1B7E06A6BAD66FBC4B90916B0363223B4DAD9600D630E002E88C0853CE8F6D18E80362CDB9138532DF16A99B1F98F0CA8839B427FF8EC5091867567160509470D4A2126AFEA77486849B19E940812590EE1AE32EA02E74EDD51C204287A1E49E5BDF5D15AFB2E55E650FFE5A7F829467BA335C2B2EB29B96C6B5A67BC0D91233A5E9DD931D6C007723CEAF4516472A124959BADD1E9E25A28CA6602B0231623975188C661D36F14E4074B23C</code></pre>
|
||||||
<!-- end server_DH_inner_data_output -->
|
<!-- end server_DH_inner_data_output -->
|
||||||
<!-- start server_DH_inner_data -->
|
<!-- start server_DH_inner_data -->
|
||||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | BA 0D 89 B5 D8 F3 E2 33 6A 52 CF A2 A8 32 1A FE
|
<pre><code>0000 | BA 0D 89 B5 4F 8A D4 A8 82 56 52 39 5A D4 8A D5
|
||||||
0010 | E3 DD EB 54 96 AC AE 31 5A 55 4E C1 36 A5 CE 5E
|
0010 | B9 90 EE 00 19 6D E3 CC D5 20 C5 64 C5 A9 40 A3
|
||||||
0020 | 09 18 9E 4C 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
0020 | A8 D6 12 85 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
|
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
|
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
|
0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E
|
||||||
|
@ -532,23 +532,23 @@ answer = BA0D89B5D8F3E2336A52CFA2A8321AFEE3DDEB5496ACAE315A554EC136A5CE5E09189E4
|
||||||
0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6
|
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
|
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
|
0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
|
||||||
0130 | 11 38 08 1A E3 FC C3 98 AB 6E 9A 89 C6 A3 49 6A
|
0130 | 18 48 62 CB 5A 3B EA 69 8D 23 08 C7 0A 1B 41 D2
|
||||||
0140 | 11 D5 50 6E 5A AF CF F4 71 DD 91 D9 0A CA 01 C2
|
0140 | 84 FA 2B E2 A8 5A 53 7D D0 49 5F EA D9 90 24 7D
|
||||||
0150 | 05 E1 67 4E 34 14 0B 79 81 74 57 9F 22 D4 4E CF
|
0150 | 67 80 19 40 96 53 1C 6D 18 20 6A FC 84 B2 2E 77
|
||||||
0160 | DB 4D DD 11 38 E9 DD C0 CF 20 83 F6 3B B8 61 14
|
0160 | 6E 18 09 63 26 BE 18 CC C1 F6 B1 3F 2F A7 66 A8
|
||||||
0170 | 88 4D DE 3D C4 C8 DD D4 C0 FF 89 57 27 E0 FE 53
|
0170 | 9C BD D1 5C 4F B8 D1 FC D8 D1 9A 5F D1 23 22 94
|
||||||
0180 | F2 FD 19 08 67 D6 07 36 BC A6 91 DF 26 31 C7 61
|
0180 | DA 29 38 C5 78 79 8B 30 FE A7 66 1E 5E A7 B6 6C
|
||||||
0190 | 52 28 33 ED 9A D6 73 59 22 68 19 A6 E9 AE EA 36
|
0190 | 1B 7E 06 A6 BA D6 6F BC 4B 90 91 6B 03 63 22 3B
|
||||||
01A0 | 67 95 58 B5 4B 41 41 4B 06 AD 0D 31 F8 0B 88 D5
|
01A0 | 4D AD 96 00 D6 30 E0 02 E8 8C 08 53 CE 8F 6D 18
|
||||||
01B0 | B8 36 49 9C AF 97 C2 E4 DC AC 9E 4A A3 F4 D0 1F
|
01B0 | E8 03 62 CD B9 13 85 32 DF 16 A9 9B 1F 98 F0 CA
|
||||||
01C0 | 04 51 B2 CD 9A 86 2E 76 94 ED 3E D9 61 8A 77 B1
|
01C0 | 88 39 B4 27 FF 8E C5 09 18 67 56 71 60 50 94 70
|
||||||
01D0 | 07 67 34 E7 85 77 8A 44 3A 22 C6 11 9F 2D 99 5B
|
01D0 | D4 A2 12 6A FE A7 74 86 84 9B 19 E9 40 81 25 90
|
||||||
01E0 | 05 88 CD DA 98 09 59 52 06 DA 9B CA 6A 3E 44 AB
|
01E0 | EE 1A E3 2E A0 2E 74 ED D5 1C 20 42 87 A1 E4 9E
|
||||||
01F0 | F1 BE 9D 0A DC 48 5A 7C 2D F7 73 A7 82 7F 3D 2D
|
01F0 | 5B DF 5D 15 AF B2 E5 5E 65 0F FE 5A 7F 82 94 67
|
||||||
0200 | 25 FC 3F 89 2F 79 CB 03 48 91 66 3F 63 DD C1 ED
|
0200 | BA 33 5C 2B 2E B2 9B 96 C6 B5 A6 7B C0 D9 12 33
|
||||||
0210 | 43 42 36 0D 8E 3E CB A5 71 25 B3 ED B4 6D 33 C2
|
0210 | A5 E9 DD 93 1D 6C 00 77 23 CE AF 45 16 47 2A 12
|
||||||
0220 | 53 8E DA 54 03 3C B3 67 C5 A4 28 5D 58 82 D0 03
|
0220 | 49 59 BA DD 1E 9E 25 A2 8C A6 60 2B 02 31 62 39
|
||||||
0230 | 22 16 8C 66</code></pre>
|
0230 | 75 18 8C 66</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<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>
|
<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">
|
<table class="table">
|
||||||
|
@ -570,13 +570,13 @@ answer = BA0D89B5D8F3E2336A52CFA2A8321AFEE3DDEB5496ACAE315A554EC136A5CE5E09189E4
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>4, 16</td>
|
<td>4, 16</td>
|
||||||
<td><code>D8F3E2336A52CFA2A8321AFEE3DDEB54</code></td>
|
<td><code>4F8AD4A8825652395AD48AD5B990EE00</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>20, 16</td>
|
<td>20, 16</td>
|
||||||
<td><code>96ACAE315A554EC136A5CE5E09189E4C</code></td>
|
<td><code>196DE3CCD520C564C5A940A3A8D61285</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -594,13 +594,13 @@ answer = BA0D89B5D8F3E2336A52CFA2A8321AFEE3DDEB5496ACAE315A554EC136A5CE5E09189E4
|
||||||
<tr>
|
<tr>
|
||||||
<td>g_a</td>
|
<td>g_a</td>
|
||||||
<td>300, 260</td>
|
<td>300, 260</td>
|
||||||
<td><code>FE0001001138081AE3FCC398AB6E9A89</code> <code>C6A3496A11D5506E5AAFCFF471DD91D9</code> <code>0ACA01C205E1674E34140B798174579F</code> <code>22D44ECFDB4DDD1138E9DDC0CF2083F6</code> <code>3BB86114884DDE3DC4C8DDD4C0FF8957</code> <code>27E0FE53F2FD190867D60736BCA691DF</code> <code>2631C761522833ED9AD67359226819A6</code> <code>E9AEEA36679558B54B41414B06AD0D31</code> <code>F80B88D5B836499CAF97C2E4DCAC9E4A</code> <code>A3F4D01F0451B2CD9A862E7694ED3ED9</code> <code>618A77B1076734E785778A443A22C611</code> <code>9F2D995B0588CDDA9809595206DA9BCA</code> <code>6A3E44ABF1BE9D0ADC485A7C2DF773A7</code> <code>827F3D2D25FC3F892F79CB034891663F</code> <code>63DDC1ED4342360D8E3ECBA57125B3ED</code> <code>B46D33C2538EDA54033CB367C5A4285D</code><br> <code>5882D003</code></td>
|
<td><code>FE000100184862CB5A3BEA698D2308C7</code> <code>0A1B41D284FA2BE2A85A537DD0495FEA</code> <code>D990247D6780194096531C6D18206AFC</code> <code>84B22E776E18096326BE18CCC1F6B13F</code> <code>2FA766A89CBDD15C4FB8D1FCD8D19A5F</code> <code>D1232294DA2938C578798B30FEA7661E</code> <code>5EA7B66C1B7E06A6BAD66FBC4B90916B</code> <code>0363223B4DAD9600D630E002E88C0853</code> <code>CE8F6D18E80362CDB9138532DF16A99B</code> <code>1F98F0CA8839B427FF8EC50918675671</code> <code>60509470D4A2126AFEA77486849B19E9</code> <code>40812590EE1AE32EA02E74EDD51C2042</code> <code>87A1E49E5BDF5D15AFB2E55E650FFE5A</code> <code>7F829467BA335C2B2EB29B96C6B5A67B</code> <code>C0D91233A5E9DD931D6C007723CEAF45</code> <code>16472A124959BADD1E9E25A28CA6602B</code><br> <code>02316239</code></td>
|
||||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_time</td>
|
<td>server_time</td>
|
||||||
<td>560, 4</td>
|
<td>560, 4</td>
|
||||||
<td><code>22168C66</code> (1720456738 in decimal)</td>
|
<td><code>75188C66</code> (1720457333 in decimal)</td>
|
||||||
<td>Server time</td>
|
<td>Server time</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -609,34 +609,34 @@ answer = BA0D89B5D8F3E2336A52CFA2A8321AFEE3DDEB5496ACAE315A554EC136A5CE5E09189E4
|
||||||
<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>
|
<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>
|
<p>First, generate a secure random 2048-bit number b:</p>
|
||||||
<!-- start b -->
|
<!-- start b -->
|
||||||
<pre><code>b = C56DD7721179CF4695969A22A80E3BB8763B45E57506063253498C107AF711736035740CF2C548CF009476206D5E62ECC17EFD6D92CD24B9BC869DC6CAFE87351F6F7954310272621FFC74AC96D3F07FC919FB818E6A558E6C7F09827A0F31DEE0C67A8DE1AD1A1C3DEE5675BCA0E677722E522D17368055469295836B007A1CD71679D93F7F006684E084E497ECE9D17A1E101529B599AC5FCA2C95F480F4552419C9F8041E2A74698D0F4D57A86ABADF2FA51BB2F0177AF59B491C647D25977AE40E5D996402BF4829E635E31237A2D3AF2FCFC1BB0611739C4FB377F9211FADB11699AC4FEDD46567FFD3A814910646267DA15CA28489473FC70B8974D16F</code></pre>
|
<pre><code>b = E29170F92884AA01E100E1F76799C3718393246ACA4BEB33612CF5C621EE9B306B16526A1D0DEA8D6B1C9C129C4291AA29AFA65E65B60207BF3E0C7AF5A99557B71CFC8356C1E15D6714D6817055867E3D78BA477846AE05B4E1801EB2023E67AF9F285E21306AB61A3E1EBA9E4136D5AB868F18FA48472A5F94EDF20528CBF2311E53AC4B4C781CF887995E0EB0644F6DA565FCAB15137D0821F3119315195E3E0C385DAD41CB0C1A58089CD17B11AB0D300E0FF97DCDF54D92FE9739C05CAD64F83CD79EB8C35C562C77807F536C786BB8778ACB7761F2B1DAA00C047559D26502756DBBFB0548F9318E92A6C5B0341006C254F8E3C9DEF7574125A095B53F</code></pre>
|
||||||
<!-- end b -->
|
<!-- end b -->
|
||||||
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
|
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
|
||||||
<!-- start g_b -->
|
<!-- start g_b -->
|
||||||
<pre><code>g_b = 1C88AEAF2A3ECD06CB022864781916499458ACA118C5669FA5BE620E9CC3DD17730849E7837B320321ECD76E0AB0B0D2135D0710AE1C5DC2A4E5141E67E9864D96A8268F2E7D29BB18B32F9997F0CBD82B0A4BF3C39173ED5E20C3D4A529C181E4E8FFA80104533FF127E973E646F76FC803CD22C267692A03D69349AC56961A06F565FFECC4C779D3BB1EA5215411ED0EA824A64AAC9F4ABF06C2DB2B6954B7A26332AD0F731AD7E10BAA1B0523396F0F1EDA3B874A6C7285B57A104628E9916B896E581C0FCDE5BBF24CB745FED1C5CB38E90BE85A36B6A2957097C3A5B1FA7C74AA976AD0B85710524070496ABB9C29B4139EC8F2E622DEC3FA9FB9BC6FF6</code></pre>
|
<pre><code>g_b = C08DDC10F2D9BCC50D07E590290B08A0D2DD729366B979C174DDF388D818C1A8B9C6B313B59B851047FDE57BCD079239DBD112D7FBF2C17595896969058E25C6911F242D6CBDB85F1979FCE36808144FEB95091F54C03EE24F9639A9790C1EF434043B289C3691201BECAC8F42E2D30148FD9692C3D6CADA8C8E97D3CF2CA4A51A9182BBD780199DCCA9545A74B5B55C48EC40243A8B0AF42DD77ED3663A7C6D30A72F55D8D4B87D0E5572FAE0CEB9D051118B4BD6F06436FC1C9639889591B91D29E2221171D00C295C2CD505E6E523A08FAD11F452148E135D5936368DF2F64A81576E29990ED59BD295939DF7D64374836573FC62EB767415A2F07CE22713</code></pre>
|
||||||
<!-- end g_b -->
|
<!-- end g_b -->
|
||||||
<h6>7.1) generation of encrypted_data</h6>
|
<h6>7.1) generation of encrypted_data</h6>
|
||||||
<!-- start client_DH_inner_data -->
|
<!-- start client_DH_inner_data -->
|
||||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 54 B6 43 66 D8 F3 E2 33 6A 52 CF A2 A8 32 1A FE
|
<pre><code>0000 | 54 B6 43 66 4F 8A D4 A8 82 56 52 39 5A D4 8A D5
|
||||||
0010 | E3 DD EB 54 96 AC AE 31 5A 55 4E C1 36 A5 CE 5E
|
0010 | B9 90 EE 00 19 6D E3 CC D5 20 C5 64 C5 A9 40 A3
|
||||||
0020 | 09 18 9E 4C 00 00 00 00 00 00 00 00 FE 00 01 00
|
0020 | A8 D6 12 85 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||||
0030 | 1C 88 AE AF 2A 3E CD 06 CB 02 28 64 78 19 16 49
|
0030 | C0 8D DC 10 F2 D9 BC C5 0D 07 E5 90 29 0B 08 A0
|
||||||
0040 | 94 58 AC A1 18 C5 66 9F A5 BE 62 0E 9C C3 DD 17
|
0040 | D2 DD 72 93 66 B9 79 C1 74 DD F3 88 D8 18 C1 A8
|
||||||
0050 | 73 08 49 E7 83 7B 32 03 21 EC D7 6E 0A B0 B0 D2
|
0050 | B9 C6 B3 13 B5 9B 85 10 47 FD E5 7B CD 07 92 39
|
||||||
0060 | 13 5D 07 10 AE 1C 5D C2 A4 E5 14 1E 67 E9 86 4D
|
0060 | DB D1 12 D7 FB F2 C1 75 95 89 69 69 05 8E 25 C6
|
||||||
0070 | 96 A8 26 8F 2E 7D 29 BB 18 B3 2F 99 97 F0 CB D8
|
0070 | 91 1F 24 2D 6C BD B8 5F 19 79 FC E3 68 08 14 4F
|
||||||
0080 | 2B 0A 4B F3 C3 91 73 ED 5E 20 C3 D4 A5 29 C1 81
|
0080 | EB 95 09 1F 54 C0 3E E2 4F 96 39 A9 79 0C 1E F4
|
||||||
0090 | E4 E8 FF A8 01 04 53 3F F1 27 E9 73 E6 46 F7 6F
|
0090 | 34 04 3B 28 9C 36 91 20 1B EC AC 8F 42 E2 D3 01
|
||||||
00A0 | C8 03 CD 22 C2 67 69 2A 03 D6 93 49 AC 56 96 1A
|
00A0 | 48 FD 96 92 C3 D6 CA DA 8C 8E 97 D3 CF 2C A4 A5
|
||||||
00B0 | 06 F5 65 FF EC C4 C7 79 D3 BB 1E A5 21 54 11 ED
|
00B0 | 1A 91 82 BB D7 80 19 9D CC A9 54 5A 74 B5 B5 5C
|
||||||
00C0 | 0E A8 24 A6 4A AC 9F 4A BF 06 C2 DB 2B 69 54 B7
|
00C0 | 48 EC 40 24 3A 8B 0A F4 2D D7 7E D3 66 3A 7C 6D
|
||||||
00D0 | A2 63 32 AD 0F 73 1A D7 E1 0B AA 1B 05 23 39 6F
|
00D0 | 30 A7 2F 55 D8 D4 B8 7D 0E 55 72 FA E0 CE B9 D0
|
||||||
00E0 | 0F 1E DA 3B 87 4A 6C 72 85 B5 7A 10 46 28 E9 91
|
00E0 | 51 11 8B 4B D6 F0 64 36 FC 1C 96 39 88 95 91 B9
|
||||||
00F0 | 6B 89 6E 58 1C 0F CD E5 BB F2 4C B7 45 FE D1 C5
|
00F0 | 1D 29 E2 22 11 71 D0 0C 29 5C 2C D5 05 E6 E5 23
|
||||||
0100 | CB 38 E9 0B E8 5A 36 B6 A2 95 70 97 C3 A5 B1 FA
|
0100 | A0 8F AD 11 F4 52 14 8E 13 5D 59 36 36 8D F2 F6
|
||||||
0110 | 7C 74 AA 97 6A D0 B8 57 10 52 40 70 49 6A BB 9C
|
0110 | 4A 81 57 6E 29 99 0E D5 9B D2 95 93 9D F7 D6 43
|
||||||
0120 | 29 B4 13 9E C8 F2 E6 22 DE C3 FA 9F B9 BC 6F F6</code></pre>
|
0120 | 74 83 65 73 FC 62 EB 76 74 15 A2 F0 7C E2 27 13</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<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>
|
<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">
|
<table class="table">
|
||||||
|
@ -658,19 +658,19 @@ answer = BA0D89B5D8F3E2336A52CFA2A8321AFEE3DDEB5496ACAE315A554EC136A5CE5E09189E4
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>4, 16</td>
|
<td>4, 16</td>
|
||||||
<td><code>D8F3E2336A52CFA2A8321AFEE3DDEB54</code></td>
|
<td><code>4F8AD4A8825652395AD48AD5B990EE00</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>20, 16</td>
|
<td>20, 16</td>
|
||||||
<td><code>96ACAE315A554EC136A5CE5E09189E4C</code></td>
|
<td><code>196DE3CCD520C564C5A940A3A8D61285</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>g_b</td>
|
<td>g_b</td>
|
||||||
<td>36, 260</td>
|
<td>36, 260</td>
|
||||||
<td><code>FE0001001C88AEAF2A3ECD06CB022864</code> <code>781916499458ACA118C5669FA5BE620E</code> <code>9CC3DD17730849E7837B320321ECD76E</code> <code>0AB0B0D2135D0710AE1C5DC2A4E5141E</code> <code>67E9864D96A8268F2E7D29BB18B32F99</code> <code>97F0CBD82B0A4BF3C39173ED5E20C3D4</code> <code>A529C181E4E8FFA80104533FF127E973</code> <code>E646F76FC803CD22C267692A03D69349</code> <code>AC56961A06F565FFECC4C779D3BB1EA5</code> <code>215411ED0EA824A64AAC9F4ABF06C2DB</code> <code>2B6954B7A26332AD0F731AD7E10BAA1B</code> <code>0523396F0F1EDA3B874A6C7285B57A10</code> <code>4628E9916B896E581C0FCDE5BBF24CB7</code> <code>45FED1C5CB38E90BE85A36B6A2957097</code> <code>C3A5B1FA7C74AA976AD0B85710524070</code> <code>496ABB9C29B4139EC8F2E622DEC3FA9F</code><br> <code>B9BC6FF6</code></td>
|
<td><code>FE000100C08DDC10F2D9BCC50D07E590</code> <code>290B08A0D2DD729366B979C174DDF388</code> <code>D818C1A8B9C6B313B59B851047FDE57B</code> <code>CD079239DBD112D7FBF2C17595896969</code> <code>058E25C6911F242D6CBDB85F1979FCE3</code> <code>6808144FEB95091F54C03EE24F9639A9</code> <code>790C1EF434043B289C3691201BECAC8F</code> <code>42E2D30148FD9692C3D6CADA8C8E97D3</code> <code>CF2CA4A51A9182BBD780199DCCA9545A</code> <code>74B5B55C48EC40243A8B0AF42DD77ED3</code> <code>663A7C6D30A72F55D8D4B87D0E5572FA</code> <code>E0CEB9D051118B4BD6F06436FC1C9639</code> <code>889591B91D29E2221171D00C295C2CD5</code> <code>05E6E523A08FAD11F452148E135D5936</code> <code>368DF2F64A81576E29990ED59BD29593</code> <code>9DF7D64374836573FC62EB767415A2F0</code><br> <code>7CE22713</code></td>
|
||||||
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
|
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -684,47 +684,47 @@ answer = BA0D89B5D8F3E2336A52CFA2A8321AFEE3DDEB5496ACAE315A554EC136A5CE5E09189E4
|
||||||
<!-- end client_DH_inner_data -->
|
<!-- 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>
|
<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 -->
|
<!-- start client_DH_inner_data_input -->
|
||||||
<pre><code>data = 54B64366D8F3E2336A52CFA2A8321AFEE3DDEB5496ACAE315A554EC136A5CE5E09189E4C0000000000000000FE0001001C88AEAF2A3ECD06CB022864781916499458ACA118C5669FA5BE620E9CC3DD17730849E7837B320321ECD76E0AB0B0D2135D0710AE1C5DC2A4E5141E67E9864D96A8268F2E7D29BB18B32F9997F0CBD82B0A4BF3C39173ED5E20C3D4A529C181E4E8FFA80104533FF127E973E646F76FC803CD22C267692A03D69349AC56961A06F565FFECC4C779D3BB1EA5215411ED0EA824A64AAC9F4ABF06C2DB2B6954B7A26332AD0F731AD7E10BAA1B0523396F0F1EDA3B874A6C7285B57A104628E9916B896E581C0FCDE5BBF24CB745FED1C5CB38E90BE85A36B6A2957097C3A5B1FA7C74AA976AD0B85710524070496ABB9C29B4139EC8F2E622DEC3FA9FB9BC6FF6
|
<pre><code>data = 54B643664F8AD4A8825652395AD48AD5B990EE00196DE3CCD520C564C5A940A3A8D612850000000000000000FE000100C08DDC10F2D9BCC50D07E590290B08A0D2DD729366B979C174DDF388D818C1A8B9C6B313B59B851047FDE57BCD079239DBD112D7FBF2C17595896969058E25C6911F242D6CBDB85F1979FCE36808144FEB95091F54C03EE24F9639A9790C1EF434043B289C3691201BECAC8F42E2D30148FD9692C3D6CADA8C8E97D3CF2CA4A51A9182BBD780199DCCA9545A74B5B55C48EC40243A8B0AF42DD77ED3663A7C6D30A72F55D8D4B87D0E5572FAE0CEB9D051118B4BD6F06436FC1C9639889591B91D29E2221171D00C295C2CD505E6E523A08FAD11F452148E135D5936368DF2F64A81576E29990ED59BD295939DF7D64374836573FC62EB767415A2F07CE22713
|
||||||
padding = E70A90A74B61606283C6BC8E
|
padding = 9F5998EA9BA7E9589CD23E03
|
||||||
tmp_aes_key = 966C419FB48CFB2CB3B4AB61A519A9AFE243B280C258CEB9089B78D374D6BC2C
|
tmp_aes_key = 3D83FFF9F0BCD34B90BB9754CD384E385E7921A9AC2884859E181C83C4BB494A
|
||||||
tmp_aes_iv = 9F36806ABB858119A8FC4CFA189118F2A6BF82EC8C21B9B7A13ED5E2B496E902</code></pre>
|
tmp_aes_iv = 27D6578FB50EB70C2F0AEC5431F745B73A285D0571718F37960274024FDAF325</code></pre>
|
||||||
<!-- end client_DH_inner_data_input -->
|
<!-- end client_DH_inner_data_input -->
|
||||||
<p>Process:</p>
|
<p>Process:</p>
|
||||||
<pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16)
|
<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>
|
encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre>
|
||||||
<p>Output:</p>
|
<p>Output:</p>
|
||||||
<!-- start client_DH_inner_data_output -->
|
<!-- start client_DH_inner_data_output -->
|
||||||
<pre><code>encrypted_data = 72CB150088AF156F0AE4CF0357CEE8D26D41559177F8303A92C1200CD1349A68CCF03ED1E61D9D796BC7CAE668EB3282E0DC03846392E392C6E90DB1F747BCFBA2A503E196EB9876629913E16013AAC044F70DD05E561A8126E836EFFCFE1B70235E5233234DC5F602CFDD420295D87229D3D44E46F80441D84790A5FCF171B6D195D9E11A344303F995664DA33A3D83A823449C60694C5B687E16F79177DD97A437EAAD74E4F2B0F8CDB766A3EFC3F0C56B8CD675C1FFC076BE8F9BE74B2925AD5D4ABB26196EE9625E2E8C2F6DBC9E0D1D98A3CBBF7EC32FCC9C292C5208D377C83E94F430A0E94E5B7488227CADC975CC513B57859DC76E43FD8AF0EB245EED209B822C1342E3DE64FB9F459FD761C727572D7D7514C26AD889F76FE37AD5B6E235B2D53E68007F5F7CFC2993F93EB2961711FDB4C2D9CEF414F7EBCAAD739A02E2E272FDA1583119D715A3300B96</code></pre>
|
<pre><code>encrypted_data = 072495A6F6512A74087D658640BB26101EC1B183F4783F228EA39FFAEDE3CA9EB875740B30A8FA617BA84001892E10FB51596B3FC09C782A94B420E25CFD801EC5D0D432474E8F25EE9E3514BC63EB8AD9ACFCA88F4E000CCFC4514CAAF8159C95B7D09E903D0E73ACEE9F310509DA32119AC0570ACA5921FFC4C7875F7B0B2D935FBF16F37805397330F6B798DB4F5E70B3D26FAF36543A18FBED6BC0588C1FD16C23DD3F1EF71D44AD9D475069F6D24186D17979CED8E1D10D2D72B7E5FC3A8D2B137A045FC51FE34E9963F759E2E3D001BE964AF437427D8E2FE5CCD3DC3901CB665558A74518E23CD1292645428DD42F93D1C572E3333C95C8B13D99C5DE62CA38D54038D8322FB5D4F4E9FE97987E64944E9BCE7A24785A5D2485B973921129CA6F186E00908510D896F4331079B6366D2A8C163DC020567121F1F8EE65297EC7D60DBA60B83960031C50752F5A</code></pre>
|
||||||
<!-- end client_DH_inner_data_output -->
|
<!-- end client_DH_inner_data_output -->
|
||||||
<p>The length of the final string is 336 bytes.</p>
|
<p>The length of the final string is 336 bytes.</p>
|
||||||
<h6>7.2) set_client_DH_params query</h6>
|
<h6>7.2) set_client_DH_params query</h6>
|
||||||
<!-- start set_client_DH_params -->
|
<!-- start set_client_DH_params -->
|
||||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 98 AC 0D 00 22 16 8C 66
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 3C FD 07 00 76 18 8C 66
|
||||||
0010 | 78 01 00 00 1F 5F 04 F5 D8 F3 E2 33 6A 52 CF A2
|
0010 | 78 01 00 00 1F 5F 04 F5 4F 8A D4 A8 82 56 52 39
|
||||||
0020 | A8 32 1A FE E3 DD EB 54 96 AC AE 31 5A 55 4E C1
|
0020 | 5A D4 8A D5 B9 90 EE 00 19 6D E3 CC D5 20 C5 64
|
||||||
0030 | 36 A5 CE 5E 09 18 9E 4C FE 50 01 00 72 CB 15 00
|
0030 | C5 A9 40 A3 A8 D6 12 85 FE 50 01 00 07 24 95 A6
|
||||||
0040 | 88 AF 15 6F 0A E4 CF 03 57 CE E8 D2 6D 41 55 91
|
0040 | F6 51 2A 74 08 7D 65 86 40 BB 26 10 1E C1 B1 83
|
||||||
0050 | 77 F8 30 3A 92 C1 20 0C D1 34 9A 68 CC F0 3E D1
|
0050 | F4 78 3F 22 8E A3 9F FA ED E3 CA 9E B8 75 74 0B
|
||||||
0060 | E6 1D 9D 79 6B C7 CA E6 68 EB 32 82 E0 DC 03 84
|
0060 | 30 A8 FA 61 7B A8 40 01 89 2E 10 FB 51 59 6B 3F
|
||||||
0070 | 63 92 E3 92 C6 E9 0D B1 F7 47 BC FB A2 A5 03 E1
|
0070 | C0 9C 78 2A 94 B4 20 E2 5C FD 80 1E C5 D0 D4 32
|
||||||
0080 | 96 EB 98 76 62 99 13 E1 60 13 AA C0 44 F7 0D D0
|
0080 | 47 4E 8F 25 EE 9E 35 14 BC 63 EB 8A D9 AC FC A8
|
||||||
0090 | 5E 56 1A 81 26 E8 36 EF FC FE 1B 70 23 5E 52 33
|
0090 | 8F 4E 00 0C CF C4 51 4C AA F8 15 9C 95 B7 D0 9E
|
||||||
00A0 | 23 4D C5 F6 02 CF DD 42 02 95 D8 72 29 D3 D4 4E
|
00A0 | 90 3D 0E 73 AC EE 9F 31 05 09 DA 32 11 9A C0 57
|
||||||
00B0 | 46 F8 04 41 D8 47 90 A5 FC F1 71 B6 D1 95 D9 E1
|
00B0 | 0A CA 59 21 FF C4 C7 87 5F 7B 0B 2D 93 5F BF 16
|
||||||
00C0 | 1A 34 43 03 F9 95 66 4D A3 3A 3D 83 A8 23 44 9C
|
00C0 | F3 78 05 39 73 30 F6 B7 98 DB 4F 5E 70 B3 D2 6F
|
||||||
00D0 | 60 69 4C 5B 68 7E 16 F7 91 77 DD 97 A4 37 EA AD
|
00D0 | AF 36 54 3A 18 FB ED 6B C0 58 8C 1F D1 6C 23 DD
|
||||||
00E0 | 74 E4 F2 B0 F8 CD B7 66 A3 EF C3 F0 C5 6B 8C D6
|
00E0 | 3F 1E F7 1D 44 AD 9D 47 50 69 F6 D2 41 86 D1 79
|
||||||
00F0 | 75 C1 FF C0 76 BE 8F 9B E7 4B 29 25 AD 5D 4A BB
|
00F0 | 79 CE D8 E1 D1 0D 2D 72 B7 E5 FC 3A 8D 2B 13 7A
|
||||||
0100 | 26 19 6E E9 62 5E 2E 8C 2F 6D BC 9E 0D 1D 98 A3
|
0100 | 04 5F C5 1F E3 4E 99 63 F7 59 E2 E3 D0 01 BE 96
|
||||||
0110 | CB BF 7E C3 2F CC 9C 29 2C 52 08 D3 77 C8 3E 94
|
0110 | 4A F4 37 42 7D 8E 2F E5 CC D3 DC 39 01 CB 66 55
|
||||||
0120 | F4 30 A0 E9 4E 5B 74 88 22 7C AD C9 75 CC 51 3B
|
0120 | 58 A7 45 18 E2 3C D1 29 26 45 42 8D D4 2F 93 D1
|
||||||
0130 | 57 85 9D C7 6E 43 FD 8A F0 EB 24 5E ED 20 9B 82
|
0130 | C5 72 E3 33 3C 95 C8 B1 3D 99 C5 DE 62 CA 38 D5
|
||||||
0140 | 2C 13 42 E3 DE 64 FB 9F 45 9F D7 61 C7 27 57 2D
|
0140 | 40 38 D8 32 2F B5 D4 F4 E9 FE 97 98 7E 64 94 4E
|
||||||
0150 | 7D 75 14 C2 6A D8 89 F7 6F E3 7A D5 B6 E2 35 B2
|
0150 | 9B CE 7A 24 78 5A 5D 24 85 B9 73 92 11 29 CA 6F
|
||||||
0160 | D5 3E 68 00 7F 5F 7C FC 29 93 F9 3E B2 96 17 11
|
0160 | 18 6E 00 90 85 10 D8 96 F4 33 10 79 B6 36 6D 2A
|
||||||
0170 | FD B4 C2 D9 CE F4 14 F7 EB CA AD 73 9A 02 E2 E2
|
0170 | 8C 16 3D C0 20 56 71 21 F1 F8 EE 65 29 7E C7 D6
|
||||||
0180 | 72 FD A1 58 31 19 D7 15 A3 30 0B 96</code></pre>
|
0180 | 0D BA 60 B8 39 60 03 1C 50 75 2F 5A</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<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>
|
<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">
|
<table class="table">
|
||||||
|
@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>98AC0D0022168C66</code></td>
|
<td><code>3CFD070076188C66</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>D8F3E2336A52CFA2A8321AFEE3DDEB54</code></td>
|
<td><code>4F8AD4A8825652395AD48AD5B990EE00</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>40, 16</td>
|
<td>40, 16</td>
|
||||||
<td><code>96ACAE315A554EC136A5CE5E09189E4C</code></td>
|
<td><code>196DE3CCD520C564C5A940A3A8D61285</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>encrypted_data</td>
|
<td>encrypted_data</td>
|
||||||
<td>56, 340</td>
|
<td>56, 340</td>
|
||||||
<td><code>FE50010072CB150088AF156F0AE4CF03</code> <code>57CEE8D26D41559177F8303A92C1200C</code> <code>D1349A68CCF03ED1E61D9D796BC7CAE6</code> <code>68EB3282E0DC03846392E392C6E90DB1</code> <code>F747BCFBA2A503E196EB9876629913E1</code> <code>6013AAC044F70DD05E561A8126E836EF</code> <code>FCFE1B70235E5233234DC5F602CFDD42</code> <code>0295D87229D3D44E46F80441D84790A5</code> <code>FCF171B6D195D9E11A344303F995664D</code> <code>A33A3D83A823449C60694C5B687E16F7</code> <code>9177DD97A437EAAD74E4F2B0F8CDB766</code> <code>A3EFC3F0C56B8CD675C1FFC076BE8F9B</code> <code>E74B2925AD5D4ABB26196EE9625E2E8C</code> <code>2F6DBC9E0D1D98A3CBBF7EC32FCC9C29</code> <code>2C5208D377C83E94F430A0E94E5B7488</code> <code>227CADC975CC513B57859DC76E43FD8A</code> <code>F0EB245EED209B822C1342E3DE64FB9F</code> <code>459FD761C727572D7D7514C26AD889F7</code> <code>6FE37AD5B6E235B2D53E68007F5F7CFC</code> <code>2993F93EB2961711FDB4C2D9CEF414F7</code> <code>EBCAAD739A02E2E272FDA1583119D715</code><br> <code>A3300B96</code></td>
|
<td><code>FE500100072495A6F6512A74087D6586</code> <code>40BB26101EC1B183F4783F228EA39FFA</code> <code>EDE3CA9EB875740B30A8FA617BA84001</code> <code>892E10FB51596B3FC09C782A94B420E2</code> <code>5CFD801EC5D0D432474E8F25EE9E3514</code> <code>BC63EB8AD9ACFCA88F4E000CCFC4514C</code> <code>AAF8159C95B7D09E903D0E73ACEE9F31</code> <code>0509DA32119AC0570ACA5921FFC4C787</code> <code>5F7B0B2D935FBF16F37805397330F6B7</code> <code>98DB4F5E70B3D26FAF36543A18FBED6B</code> <code>C0588C1FD16C23DD3F1EF71D44AD9D47</code> <code>5069F6D24186D17979CED8E1D10D2D72</code> <code>B7E5FC3A8D2B137A045FC51FE34E9963</code> <code>F759E2E3D001BE964AF437427D8E2FE5</code> <code>CCD3DC3901CB665558A74518E23CD129</code> <code>2645428DD42F93D1C572E3333C95C8B1</code> <code>3D99C5DE62CA38D54038D8322FB5D4F4</code> <code>E9FE97987E64944E9BCE7A24785A5D24</code> <code>85B973921129CA6F186E00908510D896</code> <code>F4331079B6366D2A8C163DC020567121</code> <code>F1F8EE65297EC7D60DBA60B83960031C</code><br> <code>50752F5A</code></td>
|
||||||
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
|
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</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>
|
<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>
|
<p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p>
|
||||||
<!-- start auth_key -->
|
<!-- start auth_key -->
|
||||||
<pre><code>auth_key = 1C5D7078A25E8171B228AB85227D6229A84EB388235A3C66CC828A0944B70100BBD0485DC96ABFA8C6153324D5E6EEB0F7FB1D231537EED161F391A7632B200FC5C90EE316AD3430E44406BEE715D83C097C3E7964AAF20D45A238A6F3D7E2F705EC740D64505ECAF3EA779C3020B77BB0EFC75DF7A3B76797365B4BD6DA555C108DE1385A40AD4134143CFEFC1C283AA66F1428C053C1CDFDDE73263665408ECA2ABA902A3785C11F2BEFACD270A4FC04255708094BFEA9AF22DC2E00310A4010EEFF02208C05A92C8511CBBFD6F37BAC01D9D6F4C779FD0FBBED63E452405FA8BB1C9C4F977E86F132C14EED50F1F5C7DBF4192F06E56C69AB2D0FCBDA947F</code></pre>
|
<pre><code>auth_key = 2B3660162AFB880FBCBC7078BFB47635B3DEE8E15226413F52D559BAFCB5F406CA45067D095564258B901EDF965F32DAB3B30A7BC8D2216E6482D2D98AA49F6034231D81B7A853650C077BA0EB869071AB3412F2E901FC1809A9E70813E31572C6797D5543C9DE7FEDB6FE37EDD5DA89206D6886E81806AA2BC65CDE9FB83DD17A98C60CBAE3A6C3E63D1E68F22F3538A9F9E22351CC4635C3BD0C04BB6D3EE350A54D87384BE142ABFC0CBD7A50A70C53A10A2055CFF2268D130BCF18AF94393BF17EBBF9744F71E50CFDC68A8AAC0CB7AFCE11FA022ECEB91DB7CB136F6865D9CD9C9B5A29B6E260721CE521F56909F1E2D85DDF087C78D49ACBD1D7733838</code></pre>
|
||||||
<!-- end auth_key -->
|
<!-- 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>
|
<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>
|
<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 -->
|
<!-- start dh_gen_ok -->
|
||||||
<p>Received payload (excluding transport headers/trailers):</p>
|
<p>Received payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 DC 54 90 22 16 8C 66
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 5C E4 98 76 18 8C 66
|
||||||
0010 | 90 00 00 00 34 F7 CB 3B D8 F3 E2 33 6A 52 CF A2
|
0010 | 48 00 00 00 34 F7 CB 3B 4F 8A D4 A8 82 56 52 39
|
||||||
0020 | A8 32 1A FE E3 DD EB 54 96 AC AE 31 5A 55 4E C1
|
0020 | 5A D4 8A D5 B9 90 EE 00 19 6D E3 CC D5 20 C5 64
|
||||||
0030 | 36 A5 CE 5E 09 18 9E 4C BC F5 0E 88 8B F9 6E 3D
|
0030 | C5 A9 40 A3 A8 D6 12 85 DE EA 0E 7A A0 E3 69 FE
|
||||||
0040 | 64 EA 6E 75 02 F7 3A FA</code></pre>
|
0040 | C2 E1 85 AC F7 73 0E F8</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<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>
|
<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">
|
<table class="table">
|
||||||
|
@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>01DC549022168C66</code></td>
|
<td><code>015CE49876188C66</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_length</td>
|
<td>message_length</td>
|
||||||
<td>16, 4</td>
|
<td>16, 4</td>
|
||||||
<td><code>90000000</code> (144 in decimal)</td>
|
<td><code>48000000</code> (72 in decimal)</td>
|
||||||
<td>Message body length</td>
|
<td>Message body length</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>D8F3E2336A52CFA2A8321AFEE3DDEB54</code></td>
|
<td><code>4F8AD4A8825652395AD48AD5B990EE00</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>40, 16</td>
|
<td>40, 16</td>
|
||||||
<td><code>96ACAE315A554EC136A5CE5E09189E4C</code></td>
|
<td><code>196DE3CCD520C564C5A940A3A8D61285</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>new_nonce_hash1</td>
|
<td>new_nonce_hash1</td>
|
||||||
<td>56, 16</td>
|
<td>56, 16</td>
|
||||||
<td><code>BCF50E888BF96E3D64EA6E7502F73AFA</code></td>
|
<td><code>DEEA0E7AA0E369FEC2E185ACF7730EF8</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>
|
<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>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in a new issue