mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-05 18:38:19 +01:00
Update content of files
This commit is contained in:
parent
311be74dfc
commit
4a41daa73a
2 changed files with 209 additions and 209 deletions
|
@ -119,17 +119,17 @@
|
|||
<tr>
|
||||
<td><strong>saved_from_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/type/Peer">Peer</a></td>
|
||||
<td>Only for messages forwarded to <a href="/api/saved-messages">saved messages »</a>, contains the sender of the original message.</td>
|
||||
<td>Only for forwarded messages reforwarded to <a href="/api/saved-messages">saved messages »</a>, contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user A and <code>from_id</code> will contain the ID of user B).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_from_name</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/string">string</a></td>
|
||||
<td> </td>
|
||||
<td>Only for forwarded messages from users with forward privacy enabled reforwarded to <a href="/api/saved-messages">saved messages »</a>, contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user A and <code>from_id</code> will contain the ID of user B).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_date</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/type/int">int</a></td>
|
||||
<td> </td>
|
||||
<td>Only for forwarded messages reforwarded to <a href="/api/saved-messages">saved messages »</a>, indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 1, <code>date</code> will contain 2 and the <code>date</code> of the containing <a href="/constructor/message">message</a> will contain 3).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>psa_type</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>
|
||||
<!-- start req_pq_multi -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 B8 92 06 00 E0 C8 AB 65
|
||||
0010 | 14 00 00 00 F1 8E 7E BE FB 6C 67 30 A2 09 CF B4
|
||||
0020 | D9 9B 31 0D 48 CA 7F EC</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 0C 73 0A 00 95 F4 AB 65
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 3C 7C AF 02 B0 8D 8E AE
|
||||
0020 | C6 D4 4F DB D8 41 66 85</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>B8920600E0C8AB65</code></td>
|
||||
<td><code>0C730A0095F4AB65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FB6C6730A209CFB4D99B310D48CA7FEC</code></td>
|
||||
<td><code>3C7CAF02B08D8EAEC6D44FDBD8416685</code></td>
|
||||
<td>Random number</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -104,11 +104,11 @@
|
|||
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
|
||||
<!-- start resPQ -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 E4 56 EC E0 C8 AB 65
|
||||
0010 | B0 00 00 00 63 24 16 05 FB 6C 67 30 A2 09 CF B4
|
||||
0020 | D9 9B 31 0D 48 CA 7F EC 48 08 2D 3E 05 DF D9 54
|
||||
0030 | B9 8C E6 56 43 8A 88 00 08 23 36 C6 E0 E2 33 26
|
||||
0040 | F3 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 68 CD 2E 95 F4 AB 65
|
||||
0010 | 98 00 00 00 63 24 16 05 3C 7C AF 02 B0 8D 8E AE
|
||||
0020 | C6 D4 4F DB D8 41 66 85 8F 63 99 8E 6C 71 46 86
|
||||
0030 | 13 4A C1 51 57 B0 2F 00 08 24 1C DB E0 68 F4 2A
|
||||
0040 | F5 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>01E456ECE0C8AB65</code></td>
|
||||
<td><code>0168CD2E95F4AB65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>B0000000</code> (176 in decimal)</td>
|
||||
<td><code>98000000</code> (152 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FB6C6730A209CFB4D99B310D48CA7FEC</code></td>
|
||||
<td><code>3C7CAF02B08D8EAEC6D44FDBD8416685</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>48082D3E05DFD954B98CE656438A8800</code></td>
|
||||
<td><code>8F63998E6C714686134AC15157B02F00</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>082336C6E0E23326F3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2537434109239830259</td>
|
||||
<td><code>08241CDBE068F42AF5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2602196441593293557</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 < q.</h5>
|
||||
<!-- start pq -->
|
||||
<pre><code>pq = 2537434109239830259</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2537434109239830259 = 1348056659 * 1882290401</code></p>
|
||||
<pre><code>p = 1348056659
|
||||
q = 1882290401</code></pre>
|
||||
<pre><code>pq = 2602196441593293557</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2602196441593293557 = 1343787589 * 1936464113</code></p>
|
||||
<pre><code>p = 1343787589
|
||||
q = 1936464113</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 23 36 C6 E0 E2 33 26 F3 00 00 00
|
||||
0010 | 04 50 59 B6 53 00 00 00 04 70 31 78 E1 00 00 00
|
||||
0020 | FB 6C 67 30 A2 09 CF B4 D9 9B 31 0D 48 CA 7F EC
|
||||
0030 | 48 08 2D 3E 05 DF D9 54 B9 8C E6 56 43 8A 88 00
|
||||
0040 | 2A 9D 4F F9 67 66 46 22 11 35 F9 26 8D A4 CA FA
|
||||
0050 | A1 81 C5 87 8C 47 34 60 9D 85 8E CF FB 29 B9 6A
|
||||
<pre><code>0000 | 95 5F F5 A9 08 24 1C DB E0 68 F4 2A F5 00 00 00
|
||||
0010 | 04 50 18 92 45 00 00 00 04 73 6C 18 F1 00 00 00
|
||||
0020 | 3C 7C AF 02 B0 8D 8E AE C6 D4 4F DB D8 41 66 85
|
||||
0030 | 8F 63 99 8E 6C 71 46 86 13 4A C1 51 57 B0 2F 00
|
||||
0040 | 2A C2 0E B0 94 E3 79 8F FD 19 B4 CE 69 44 F9 30
|
||||
0050 | FE 5D 43 9E 73 D4 77 95 A3 2E 9B 05 05 C5 EA 58
|
||||
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 = 1882290401</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>082336C6E0E23326F3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2537434109239830259</td>
|
||||
<td><code>08241CDBE068F42AF5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2602196441593293557</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>045059B653000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1348056659</td>
|
||||
<td><code>0450189245000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1343787589</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>04703178E1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1882290401</td>
|
||||
<td><code>04736C18F1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1936464113</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>FB6C6730A209CFB4D99B310D48CA7FEC</code></td>
|
||||
<td><code>3C7CAF02B08D8EAEC6D44FDBD8416685</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>48082D3E05DFD954B98CE656438A8800</code></td>
|
||||
<td><code>8F63998E6C714686134AC15157B02F00</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>2A9D4FF9676646221135F9268DA4CAFA</code> <code>A181C5878C4734609D858ECFFB29B96A</code></td>
|
||||
<td><code>2AC20EB094E3798FFD19B4CE6944F930</code> <code>FE5D439E73D47795A32E9B0505C5EA58</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1882290401</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 = 955FF5A9082336C6E0E23326F3000000045059B65300000004703178E1000000FB6C6730A209CFB4D99B310D48CA7FEC48082D3E05DFD954B98CE656438A88002A9D4FF9676646221135F9268DA4CAFAA181C5878C4734609D858ECFFB29B96A02000000
|
||||
random_padding_bytes = CD346AD4AD38B8C438E8A868A0F1D5F306FB360A76DF2579C80256F6E4758D0A2DC3C846AA6F3B47533291C046553EB42DE83E50D1AB68368CB8C45C7FD2C307FAADBC4A7A29898625E558FB4EA52D139D11FECEF23C8EE826FD8451</code></pre>
|
||||
<pre><code>data = 955FF5A908241CDBE068F42AF5000000045018924500000004736C18F10000003C7CAF02B08D8EAEC6D44FDBD84166858F63998E6C714686134AC15157B02F002AC20EB094E3798FFD19B4CE6944F930FE5D439E73D47795A32E9B0505C5EA5802000000
|
||||
random_padding_bytes = B9DCC41054C5DA6BDE4B8837F5E323DC4097ED5817E097DAB5C82C62D35202C9530D84CF14847DE3CB2E684367CB238D943235C010053437BBA85CDBBBD6C26463341E98E7E5562516D0549579CFBEB2F2DB13F28CA4F7776CD2B746</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 = 252C4634765441727FA848CB542B01A8E894E1F6E00D57825C41AB0671803F15DB27934EEC7BAAF81BD231EA5F46824E963CB43DAEE3751FAB065A89B46FC39639A2CF5083B91457D1266F0E7B8205FC0498B2CE92B119A335362C1D993EC848D1ECDCB3E9B1DABB6306134E32128BF60B6DE34D5B48E1FFCEE1F3E10E6646FE40F05ADF3E7C357ABB1C958B110F3346DB06BD05682BA6AD73121496EC64C2B98DEF4A7195E009BB8D8DCBC14853A4EF512E14CBC9CF6173156884F30993622F3FF7D909B44CA7B54937FDD5E2DCB7945E8D6FCB87A082D7E212D122A7FC14FAA16F42FE25C2B52F0E9D0E9D73285A55001110C40E1844E2800881850653D87E</code></pre>
|
||||
<pre><code>encrypted_data = 60C976533F9767CCBFAC3CCAF7A39B10C877E9F3E13BE558AC1979E14486575423A6BC59CB65FD880B76CAA1AC72B124F24F2EEE92246CE7881B0D3DD66700B4CED8037E4A042B5588A78D6D9BA03EDB1BBA65B86EE7EB54C6BBD041620A2A5AC08FEE0EA2888D8C1D3F4A414AE8D62B97CC3165AE85A893F5F74A0DB6E46BF668D79960E715E2A4F331D39F86328D9011ACE0DE74F615137D27EFD79B6BF91C22F3A4FE3C917F5DABA2C222C707022BE8CD974DEAA8252C87703153727BCCA9625E074CF3FC4E9C5C3415C0119ED05C1CBA203F9D1BB513D875A4AC97E273A0F8ECB42DA3A8020E2A65CFF3C4204FC3FB02FC0ACA5E42CB9C73EA83718F80F6</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 E8 5F 07 00 E0 C8 AB 65
|
||||
0010 | 40 01 00 00 BE E4 12 D7 FB 6C 67 30 A2 09 CF B4
|
||||
0020 | D9 9B 31 0D 48 CA 7F EC 48 08 2D 3E 05 DF D9 54
|
||||
0030 | B9 8C E6 56 43 8A 88 00 04 50 59 B6 53 00 00 00
|
||||
0040 | 04 70 31 78 E1 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 25 2C 46 34 76 54 41 72 7F A8 48 CB
|
||||
0060 | 54 2B 01 A8 E8 94 E1 F6 E0 0D 57 82 5C 41 AB 06
|
||||
0070 | 71 80 3F 15 DB 27 93 4E EC 7B AA F8 1B D2 31 EA
|
||||
0080 | 5F 46 82 4E 96 3C B4 3D AE E3 75 1F AB 06 5A 89
|
||||
0090 | B4 6F C3 96 39 A2 CF 50 83 B9 14 57 D1 26 6F 0E
|
||||
00A0 | 7B 82 05 FC 04 98 B2 CE 92 B1 19 A3 35 36 2C 1D
|
||||
00B0 | 99 3E C8 48 D1 EC DC B3 E9 B1 DA BB 63 06 13 4E
|
||||
00C0 | 32 12 8B F6 0B 6D E3 4D 5B 48 E1 FF CE E1 F3 E1
|
||||
00D0 | 0E 66 46 FE 40 F0 5A DF 3E 7C 35 7A BB 1C 95 8B
|
||||
00E0 | 11 0F 33 46 DB 06 BD 05 68 2B A6 AD 73 12 14 96
|
||||
00F0 | EC 64 C2 B9 8D EF 4A 71 95 E0 09 BB 8D 8D CB C1
|
||||
0100 | 48 53 A4 EF 51 2E 14 CB C9 CF 61 73 15 68 84 F3
|
||||
0110 | 09 93 62 2F 3F F7 D9 09 B4 4C A7 B5 49 37 FD D5
|
||||
0120 | E2 DC B7 94 5E 8D 6F CB 87 A0 82 D7 E2 12 D1 22
|
||||
0130 | A7 FC 14 FA A1 6F 42 FE 25 C2 B5 2F 0E 9D 0E 9D
|
||||
0140 | 73 28 5A 55 00 11 10 C4 0E 18 44 E2 80 08 81 85
|
||||
0150 | 06 53 D8 7E</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 90 E9 0D 00 95 F4 AB 65
|
||||
0010 | 40 01 00 00 BE E4 12 D7 3C 7C AF 02 B0 8D 8E AE
|
||||
0020 | C6 D4 4F DB D8 41 66 85 8F 63 99 8E 6C 71 46 86
|
||||
0030 | 13 4A C1 51 57 B0 2F 00 04 50 18 92 45 00 00 00
|
||||
0040 | 04 73 6C 18 F1 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 60 C9 76 53 3F 97 67 CC BF AC 3C CA
|
||||
0060 | F7 A3 9B 10 C8 77 E9 F3 E1 3B E5 58 AC 19 79 E1
|
||||
0070 | 44 86 57 54 23 A6 BC 59 CB 65 FD 88 0B 76 CA A1
|
||||
0080 | AC 72 B1 24 F2 4F 2E EE 92 24 6C E7 88 1B 0D 3D
|
||||
0090 | D6 67 00 B4 CE D8 03 7E 4A 04 2B 55 88 A7 8D 6D
|
||||
00A0 | 9B A0 3E DB 1B BA 65 B8 6E E7 EB 54 C6 BB D0 41
|
||||
00B0 | 62 0A 2A 5A C0 8F EE 0E A2 88 8D 8C 1D 3F 4A 41
|
||||
00C0 | 4A E8 D6 2B 97 CC 31 65 AE 85 A8 93 F5 F7 4A 0D
|
||||
00D0 | B6 E4 6B F6 68 D7 99 60 E7 15 E2 A4 F3 31 D3 9F
|
||||
00E0 | 86 32 8D 90 11 AC E0 DE 74 F6 15 13 7D 27 EF D7
|
||||
00F0 | 9B 6B F9 1C 22 F3 A4 FE 3C 91 7F 5D AB A2 C2 22
|
||||
0100 | C7 07 02 2B E8 CD 97 4D EA A8 25 2C 87 70 31 53
|
||||
0110 | 72 7B CC A9 62 5E 07 4C F3 FC 4E 9C 5C 34 15 C0
|
||||
0120 | 11 9E D0 5C 1C BA 20 3F 9D 1B B5 13 D8 75 A4 AC
|
||||
0130 | 97 E2 73 A0 F8 EC B4 2D A3 A8 02 0E 2A 65 CF F3
|
||||
0140 | C4 20 4F C3 FB 02 FC 0A CA 5E 42 CB 9C 73 EA 83
|
||||
0150 | 71 8F 80 F6</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 = CD346AD4AD38B8C438E8A868A0F1D5F306FB360A76DF2579C80256F6E
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>E85F0700E0C8AB65</code></td>
|
||||
<td><code>90E90D0095F4AB65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -363,25 +363,25 @@ random_padding_bytes = CD346AD4AD38B8C438E8A868A0F1D5F306FB360A76DF2579C80256F6E
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FB6C6730A209CFB4D99B310D48CA7FEC</code></td>
|
||||
<td><code>3C7CAF02B08D8EAEC6D44FDBD8416685</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>48082D3E05DFD954B98CE656438A8800</code></td>
|
||||
<td><code>8F63998E6C714686134AC15157B02F00</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>045059B653000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1348056659</td>
|
||||
<td><code>0450189245000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1343787589</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>04703178E1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1882290401</td>
|
||||
<td><code>04736C18F1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1936464113</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 = CD346AD4AD38B8C438E8A868A0F1D5F306FB360A76DF2579C80256F6E
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE000100252C4634765441727FA848CB</code> <code>542B01A8E894E1F6E00D57825C41AB06</code> <code>71803F15DB27934EEC7BAAF81BD231EA</code> <code>5F46824E963CB43DAEE3751FAB065A89</code> <code>B46FC39639A2CF5083B91457D1266F0E</code> <code>7B8205FC0498B2CE92B119A335362C1D</code> <code>993EC848D1ECDCB3E9B1DABB6306134E</code> <code>32128BF60B6DE34D5B48E1FFCEE1F3E1</code> <code>0E6646FE40F05ADF3E7C357ABB1C958B</code> <code>110F3346DB06BD05682BA6AD73121496</code> <code>EC64C2B98DEF4A7195E009BB8D8DCBC1</code> <code>4853A4EF512E14CBC9CF6173156884F3</code> <code>0993622F3FF7D909B44CA7B54937FDD5</code> <code>E2DCB7945E8D6FCB87A082D7E212D122</code> <code>A7FC14FAA16F42FE25C2B52F0E9D0E9D</code> <code>73285A55001110C40E1844E280088185</code><br> <code>0653D87E</code></td>
|
||||
<td><code>FE00010060C976533F9767CCBFAC3CCA</code> <code>F7A39B10C877E9F3E13BE558AC1979E1</code> <code>4486575423A6BC59CB65FD880B76CAA1</code> <code>AC72B124F24F2EEE92246CE7881B0D3D</code> <code>D66700B4CED8037E4A042B5588A78D6D</code> <code>9BA03EDB1BBA65B86EE7EB54C6BBD041</code> <code>620A2A5AC08FEE0EA2888D8C1D3F4A41</code> <code>4AE8D62B97CC3165AE85A893F5F74A0D</code> <code>B6E46BF668D79960E715E2A4F331D39F</code> <code>86328D9011ACE0DE74F615137D27EFD7</code> <code>9B6BF91C22F3A4FE3C917F5DABA2C222</code> <code>C707022BE8CD974DEAA8252C87703153</code> <code>727BCCA9625E074CF3FC4E9C5C3415C0</code> <code>119ED05C1CBA203F9D1BB513D875A4AC</code> <code>97E273A0F8ECB42DA3A8020E2A65CFF3</code> <code>C4204FC3FB02FC0ACA5E42CB9C73EA83</code><br> <code>718F80F6</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = CD346AD4AD38B8C438E8A868A0F1D5F306FB360A76DF2579C80256F6E
|
|||
<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 08 1A 7F E1 C8 AB 65
|
||||
0010 | 78 02 00 00 5C 07 E8 D0 FB 6C 67 30 A2 09 CF B4
|
||||
0020 | D9 9B 31 0D 48 CA 7F EC 48 08 2D 3E 05 DF D9 54
|
||||
0030 | B9 8C E6 56 43 8A 88 00 FE 50 02 00 14 35 00 42
|
||||
0040 | D3 61 5E 00 17 76 EB 73 01 70 96 30 2C 4E 83 7C
|
||||
0050 | 75 05 77 67 15 2D 99 A3 A0 74 A9 7D DC AE AF E1
|
||||
0060 | A4 33 D6 C4 CC 28 96 39 70 B6 AA 2F A0 A5 7D F9
|
||||
0070 | 6D 13 09 96 F1 F8 A5 89 03 6E 72 68 BF 01 D8 03
|
||||
0080 | 8F 2C E2 AF 16 3A D7 C9 6F A5 B8 9A 10 67 E4 7B
|
||||
0090 | D0 ED 3B EC F6 89 37 1C 63 2D E7 4C E6 B4 5D 53
|
||||
00A0 | 00 FA 72 59 DC BF 22 A0 3B 52 FE 42 A7 77 DA A8
|
||||
00B0 | DF B2 7E B7 E8 E3 CB 12 55 E7 BF A1 19 B8 FD E3
|
||||
00C0 | 6A D0 A0 61 B3 1B 12 CA B7 6E A4 27 2E F3 B5 B6
|
||||
00D0 | 68 07 C3 E1 37 68 D0 50 BD 8F 1E 0B F0 23 5D CC
|
||||
00E0 | 9D 05 3E BD 31 E7 FA 58 E1 52 2D 94 49 6D E2 17
|
||||
00F0 | B9 71 61 81 24 34 DE 4D 20 20 8D 05 DE E4 AF A5
|
||||
0100 | A7 36 11 D4 5C 08 02 D7 00 52 34 96 A4 84 F7 8C
|
||||
0110 | 01 C8 DE F1 A7 13 C8 62 22 11 A4 EB A7 FB 9D 03
|
||||
0120 | 86 82 AD 80 67 8A D0 C8 31 C3 29 2E 00 8E 5D F9
|
||||
0130 | 5C 30 DF 9B 68 0F 85 99 1A 92 B3 C4 0F 52 B1 9E
|
||||
0140 | A4 08 E4 5D 2F DE 9D B6 A3 0A 67 EE A4 B5 76 E8
|
||||
0150 | 69 98 4C 8C 82 EB 84 A1 94 25 4D 66 FD 2F 25 C1
|
||||
0160 | 9A 27 88 A4 C8 07 A8 A9 C6 85 9B CD 3F E0 19 1D
|
||||
0170 | 44 24 35 F2 D2 64 F6 7E A4 4A CE 2C D9 73 8E B1
|
||||
0180 | C4 7E AE FE 0C 49 7B 98 2D 1E 3F 4E DE C3 10 F9
|
||||
0190 | D4 E6 A8 FD 90 D9 5D B3 D6 FA 9F CA DF B3 AB 88
|
||||
01A0 | C4 47 24 92 A9 2D 84 65 A3 D1 A5 3A 67 21 6F E0
|
||||
01B0 | CE F6 23 54 50 E5 D9 6F 7B 8D 62 CB 62 FE 6B 31
|
||||
01C0 | A3 19 52 08 0B 38 C4 C6 80 71 D2 4E 26 D4 11 42
|
||||
01D0 | 20 3E F0 10 97 A0 3A BC B9 70 79 D4 88 41 29 E5
|
||||
01E0 | C9 65 FD 9C F9 BB 54 CB E2 BF E7 4F 5B 5A D5 CD
|
||||
01F0 | E5 2C ED 8C 64 8E EB 87 B3 7C 20 2A 8D 7F 4C 90
|
||||
0200 | 08 F5 6F 58 9E D1 CA 14 FC AA 45 AF A2 78 C6 F6
|
||||
0210 | E0 5A 09 D8 C5 FD 17 D9 C7 1B B5 0E F2 8A 28 37
|
||||
0220 | C4 32 C0 D4 B4 65 32 57 63 FA EC 7B 08 82 5D 8A
|
||||
0230 | 38 11 01 71 F4 E9 0C E4 98 6C AE FC 9A 8E 6D 06
|
||||
0240 | 01 50 22 0F AD BF 5F 98 23 4F 39 4C C2 54 C4 A8
|
||||
0250 | BB 77 23 80 57 F2 AB D3 6D 9C 0A 9C E8 44 0D 9E
|
||||
0260 | 34 FE 83 E2 86 96 F0 EB 13 DB 81 BB B4 57 10 0C
|
||||
0270 | A8 39 60 DC A8 3D 3E FB 03 74 47 C2 6A 80 24 EB
|
||||
0280 | 26 21 68 05 27 35 EA 06 7A CC B6 0B</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 F4 56 BC 95 F4 AB 65
|
||||
0010 | B8 02 00 00 5C 07 E8 D0 3C 7C AF 02 B0 8D 8E AE
|
||||
0020 | C6 D4 4F DB D8 41 66 85 8F 63 99 8E 6C 71 46 86
|
||||
0030 | 13 4A C1 51 57 B0 2F 00 FE 50 02 00 DE C1 51 B7
|
||||
0040 | 88 15 4C 83 49 EF 67 5A BE 72 72 02 D8 9C 56 BD
|
||||
0050 | 8C C5 48 25 2A 23 0D 3B 32 0D CC 07 EF 91 C3 86
|
||||
0060 | 84 5A AF A0 1D F6 E4 85 D3 4D A0 4C F4 7A 93 B5
|
||||
0070 | 31 2A 04 73 56 5C DB 4E 32 3D 3D A7 B6 3E 86 D0
|
||||
0080 | 31 24 99 20 51 0F ED 6B 88 38 FC 23 20 53 7B 9A
|
||||
0090 | 9C AF 24 8D 07 C7 95 9D 85 24 BA D5 41 24 F6 E8
|
||||
00A0 | 99 D2 36 00 82 84 0D 8E 53 D3 C9 74 44 CB 6B 1D
|
||||
00B0 | 1E B0 B2 D8 E5 C5 0F E9 E4 7E A9 EF 1B 9A 50 BC
|
||||
00C0 | 4C 46 EB 6F 66 B5 EA 4B 3A 27 0A A5 D5 4E 73 47
|
||||
00D0 | 89 1E C3 84 FB 5E 06 AD BB 7B 02 B2 A4 DC 84 84
|
||||
00E0 | 79 00 4E A3 73 47 28 F5 A1 96 3A 18 BA AE D6 5A
|
||||
00F0 | 6C 6B 5A 05 41 1F 32 40 C3 F9 B0 6E CC 13 2D F2
|
||||
0100 | E1 9B 86 B0 2A 99 33 1A 9E 7B FB 42 C8 DB E4 65
|
||||
0110 | 63 1A 7B 18 EF CD 34 0A 8A 7C 66 58 C8 60 FB A9
|
||||
0120 | DB 9A 78 F2 62 14 A6 67 BE 08 5E 61 8F F9 AE F6
|
||||
0130 | 23 BA 7D 62 A9 BA C8 B0 53 5C B3 FF AC FC A2 FD
|
||||
0140 | DD FF 46 C9 C2 F3 B0 81 95 B1 1A AF 48 46 0A 60
|
||||
0150 | 32 CF A2 B2 5E F1 1E 38 7D 99 69 8E 38 C2 A9 A9
|
||||
0160 | 1F 6F 4D 5A 6A ED B0 DE 77 35 DD 96 90 FE 18 45
|
||||
0170 | FA EF 5F 22 7F 5C 6F E4 D2 21 B6 00 FB 2E FA 9E
|
||||
0180 | 26 2D 5E 40 C5 9C 62 5F 3C CF A6 F8 87 85 3C F9
|
||||
0190 | D3 C0 53 94 9D 96 9A 58 7E 65 F0 89 64 97 3F 2A
|
||||
01A0 | D4 6B A5 81 1C 17 62 E5 BC 04 D4 BB CB 64 FD DC
|
||||
01B0 | 64 90 DF FF D4 E1 27 C0 75 6E A8 90 00 61 C0 FC
|
||||
01C0 | 80 E7 1D 79 39 E9 F2 2D B8 0D 3F 1E C7 CD F5 8A
|
||||
01D0 | AC F9 C7 C3 95 56 55 D6 A5 B7 D3 5F BC F5 C3 B5
|
||||
01E0 | BE CC 79 88 AA 6B BD D6 55 2D D0 84 2E 83 62 58
|
||||
01F0 | 09 92 F1 8E 0B F0 77 1E 99 74 52 C8 85 08 D7 E3
|
||||
0200 | B7 76 9F 7A 7D 1C C1 CC 71 4B 57 0B 57 8E 97 BD
|
||||
0210 | 9B F2 05 29 6B 3E 45 19 94 10 74 7A 5A DA 36 46
|
||||
0220 | 75 76 13 62 7A 42 02 93 54 17 B5 E9 A2 91 09 BD
|
||||
0230 | B0 D5 62 6A 6F 78 60 25 EF DA 11 2F 37 01 0E CB
|
||||
0240 | A4 0C 20 84 EA AC D6 24 97 D2 EC EB 5D F7 58 C8
|
||||
0250 | 7E A9 99 78 6F 39 E8 A5 1D 17 84 3A B0 B3 3E 1E
|
||||
0260 | 2F 3D B1 53 C6 70 E4 4B C1 56 15 21 5B 1F 23 74
|
||||
0270 | 61 EC 94 AB 48 93 30 F6 44 3F 93 A0 81 15 11 A2
|
||||
0280 | C9 88 9F 1D 00 CC 7B 0C 91 5A D7 B2</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 = CD346AD4AD38B8C438E8A868A0F1D5F306FB360A76DF2579C80256F6E
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01081A7FE1C8AB65</code></td>
|
||||
<td><code>01F456BC95F4AB65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>78020000</code> (632 in decimal)</td>
|
||||
<td><code>B8020000</code> (696 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = CD346AD4AD38B8C438E8A868A0F1D5F306FB360A76DF2579C80256F6E
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FB6C6730A209CFB4D99B310D48CA7FEC</code></td>
|
||||
<td><code>3C7CAF02B08D8EAEC6D44FDBD8416685</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>48082D3E05DFD954B98CE656438A8800</code></td>
|
||||
<td><code>8F63998E6C714686134AC15157B02F00</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE50020014350042D3615E001776EB73</code> <code>017096302C4E837C75057767152D99A3</code> <code>A074A97DDCAEAFE1A433D6C4CC289639</code> <code>70B6AA2FA0A57DF96D130996F1F8A589</code> <code>036E7268BF01D8038F2CE2AF163AD7C9</code> <code>6FA5B89A1067E47BD0ED3BECF689371C</code> <code>632DE74CE6B45D5300FA7259DCBF22A0</code> <code>3B52FE42A777DAA8DFB27EB7E8E3CB12</code> <code>55E7BFA119B8FDE36AD0A061B31B12CA</code> <code>B76EA4272EF3B5B66807C3E13768D050</code> <code>BD8F1E0BF0235DCC9D053EBD31E7FA58</code> <code>E1522D94496DE217B97161812434DE4D</code> <code>20208D05DEE4AFA5A73611D45C0802D7</code> <code>00523496A484F78C01C8DEF1A713C862</code> <code>2211A4EBA7FB9D038682AD80678AD0C8</code> <code>31C3292E008E5DF95C30DF9B680F8599</code> <code>1A92B3C40F52B19EA408E45D2FDE9DB6</code> <code>A30A67EEA4B576E869984C8C82EB84A1</code> <code>94254D66FD2F25C19A2788A4C807A8A9</code> <code>C6859BCD3FE0191D442435F2D264F67E</code> <code>A44ACE2CD9738EB1C47EAEFE0C497B98</code> <code>2D1E3F4EDEC310F9D4E6A8FD90D95DB3</code> <code>D6FA9FCADFB3AB88C4472492A92D8465</code> <code>A3D1A53A67216FE0CEF6235450E5D96F</code> <code>7B8D62CB62FE6B31A31952080B38C4C6</code> <code>8071D24E26D41142203EF01097A03ABC</code> <code>B97079D4884129E5C965FD9CF9BB54CB</code> <code>E2BFE74F5B5AD5CDE52CED8C648EEB87</code> <code>B37C202A8D7F4C9008F56F589ED1CA14</code> <code>FCAA45AFA278C6F6E05A09D8C5FD17D9</code> <code>C71BB50EF28A2837C432C0D4B4653257</code> <code>63FAEC7B08825D8A38110171F4E90CE4</code> <code>986CAEFC9A8E6D060150220FADBF5F98</code> <code>234F394CC254C4A8BB77238057F2ABD3</code> <code>6D9C0A9CE8440D9E34FE83E28696F0EB</code> <code>13DB81BBB457100CA83960DCA83D3EFB</code> <code>037447C26A8024EB262168052735EA06</code><br> <code>7ACCB60B</code></td>
|
||||
<td><code>FE500200DEC151B788154C8349EF675A</code> <code>BE727202D89C56BD8CC548252A230D3B</code> <code>320DCC07EF91C386845AAFA01DF6E485</code> <code>D34DA04CF47A93B5312A0473565CDB4E</code> <code>323D3DA7B63E86D031249920510FED6B</code> <code>8838FC2320537B9A9CAF248D07C7959D</code> <code>8524BAD54124F6E899D2360082840D8E</code> <code>53D3C97444CB6B1D1EB0B2D8E5C50FE9</code> <code>E47EA9EF1B9A50BC4C46EB6F66B5EA4B</code> <code>3A270AA5D54E7347891EC384FB5E06AD</code> <code>BB7B02B2A4DC848479004EA3734728F5</code> <code>A1963A18BAAED65A6C6B5A05411F3240</code> <code>C3F9B06ECC132DF2E19B86B02A99331A</code> <code>9E7BFB42C8DBE465631A7B18EFCD340A</code> <code>8A7C6658C860FBA9DB9A78F26214A667</code> <code>BE085E618FF9AEF623BA7D62A9BAC8B0</code> <code>535CB3FFACFCA2FDDDFF46C9C2F3B081</code> <code>95B11AAF48460A6032CFA2B25EF11E38</code> <code>7D99698E38C2A9A91F6F4D5A6AEDB0DE</code> <code>7735DD9690FE1845FAEF5F227F5C6FE4</code> <code>D221B600FB2EFA9E262D5E40C59C625F</code> <code>3CCFA6F887853CF9D3C053949D969A58</code> <code>7E65F08964973F2AD46BA5811C1762E5</code> <code>BC04D4BBCB64FDDC6490DFFFD4E127C0</code> <code>756EA8900061C0FC80E71D7939E9F22D</code> <code>B80D3F1EC7CDF58AACF9C7C3955655D6</code> <code>A5B7D35FBCF5C3B5BECC7988AA6BBDD6</code> <code>552DD0842E8362580992F18E0BF0771E</code> <code>997452C88508D7E3B7769F7A7D1CC1CC</code> <code>714B570B578E97BD9BF205296B3E4519</code> <code>9410747A5ADA3646757613627A420293</code> <code>5417B5E9A29109BDB0D5626A6F786025</code> <code>EFDA112F37010ECBA40C2084EAACD624</code> <code>97D2ECEB5DF758C87EA999786F39E8A5</code> <code>1D17843AB0B33E1E2F3DB153C670E44B</code> <code>C15615215B1F237461EC94AB489330F6</code> <code>443F93A0811511A2C9889F1D00CC7B0C</code><br> <code>915AD7B2</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = CD346AD4AD38B8C438E8A868A0F1D5F306FB360A76DF2579C80256F6E
|
|||
<!-- 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 = 14350042D3615E001776EB73017096302C4E837C75057767152D99A3A074A97DDCAEAFE1A433D6C4CC28963970B6AA2FA0A57DF96D130996F1F8A589036E7268BF01D8038F2CE2AF163AD7C96FA5B89A1067E47BD0ED3BECF689371C632DE74CE6B45D5300FA7259DCBF22A03B52FE42A777DAA8DFB27EB7E8E3CB1255E7BFA119B8FDE36AD0A061B31B12CAB76EA4272EF3B5B66807C3E13768D050BD8F1E0BF0235DCC9D053EBD31E7FA58E1522D94496DE217B97161812434DE4D20208D05DEE4AFA5A73611D45C0802D700523496A484F78C01C8DEF1A713C8622211A4EBA7FB9D038682AD80678AD0C831C3292E008E5DF95C30DF9B680F85991A92B3C40F52B19EA408E45D2FDE9DB6A30A67EEA4B576E869984C8C82EB84A194254D66FD2F25C19A2788A4C807A8A9C6859BCD3FE0191D442435F2D264F67EA44ACE2CD9738EB1C47EAEFE0C497B982D1E3F4EDEC310F9D4E6A8FD90D95DB3D6FA9FCADFB3AB88C4472492A92D8465A3D1A53A67216FE0CEF6235450E5D96F7B8D62CB62FE6B31A31952080B38C4C68071D24E26D41142203EF01097A03ABCB97079D4884129E5C965FD9CF9BB54CBE2BFE74F5B5AD5CDE52CED8C648EEB87B37C202A8D7F4C9008F56F589ED1CA14FCAA45AFA278C6F6E05A09D8C5FD17D9C71BB50EF28A2837C432C0D4B465325763FAEC7B08825D8A38110171F4E90CE4986CAEFC9A8E6D060150220FADBF5F98234F394CC254C4A8BB77238057F2ABD36D9C0A9CE8440D9E34FE83E28696F0EB13DB81BBB457100CA83960DCA83D3EFB037447C26A8024EB262168052735EA067ACCB60B
|
||||
tmp_aes_key = 939A48A4F8097727F06DDF7AAC298444991F6804620AC0E12890D2F8750F0BF1
|
||||
tmp_aes_iv = 2CCC8FF240E00E900DDD34DC87C89B2F9383AEEEF45322E44F4119962A9D4FF9</code></pre>
|
||||
<pre><code>encrypted_answer = DEC151B788154C8349EF675ABE727202D89C56BD8CC548252A230D3B320DCC07EF91C386845AAFA01DF6E485D34DA04CF47A93B5312A0473565CDB4E323D3DA7B63E86D031249920510FED6B8838FC2320537B9A9CAF248D07C7959D8524BAD54124F6E899D2360082840D8E53D3C97444CB6B1D1EB0B2D8E5C50FE9E47EA9EF1B9A50BC4C46EB6F66B5EA4B3A270AA5D54E7347891EC384FB5E06ADBB7B02B2A4DC848479004EA3734728F5A1963A18BAAED65A6C6B5A05411F3240C3F9B06ECC132DF2E19B86B02A99331A9E7BFB42C8DBE465631A7B18EFCD340A8A7C6658C860FBA9DB9A78F26214A667BE085E618FF9AEF623BA7D62A9BAC8B0535CB3FFACFCA2FDDDFF46C9C2F3B08195B11AAF48460A6032CFA2B25EF11E387D99698E38C2A9A91F6F4D5A6AEDB0DE7735DD9690FE1845FAEF5F227F5C6FE4D221B600FB2EFA9E262D5E40C59C625F3CCFA6F887853CF9D3C053949D969A587E65F08964973F2AD46BA5811C1762E5BC04D4BBCB64FDDC6490DFFFD4E127C0756EA8900061C0FC80E71D7939E9F22DB80D3F1EC7CDF58AACF9C7C3955655D6A5B7D35FBCF5C3B5BECC7988AA6BBDD6552DD0842E8362580992F18E0BF0771E997452C88508D7E3B7769F7A7D1CC1CC714B570B578E97BD9BF205296B3E45199410747A5ADA3646757613627A4202935417B5E9A29109BDB0D5626A6F786025EFDA112F37010ECBA40C2084EAACD62497D2ECEB5DF758C87EA999786F39E8A51D17843AB0B33E1E2F3DB153C670E44BC15615215B1F237461EC94AB489330F6443F93A0811511A2C9889F1D00CC7B0C915AD7B2
|
||||
tmp_aes_key = 0A7E80F0AD7CF0445C6C627DD6FE5F83030ECAECD2C31CB65EFE28A434F45714
|
||||
tmp_aes_iv = 4F1897AF4531CD9257239CF77B1A78A6035DE20EA41CAFCCC59EF8F02AC20EB0</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = AF6DBFB2611362E8C2947C7F6A311346D4786AE8BA0D89B5FB6C6730A209CFB4D99B310D48CA7FEC48082D3E05DFD954B98CE656438A880003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010049743B49768F04B6845C3DB77A4E8319CA4DDDBA4A97EA63AFB0DD54AFF8D5552B5BC9534F28EEBD7FC2566E7C05ACE4F1ED5276E5E46EC842B3B6ABA708D50A31D423C3A1E48D1D290D13A7069D73414966418A0B5FFA05F7D2D3478EA313C292664A21C30E417DCE4B1B0E0D325BFB6FF685D1DFC36DBA550A41BC8FAAF81B376BEB41651B7EBAE3E49D004553D3D5252E4539A87FA449F33D211F2FEF3390CDC86FF3C8F0FD89BB963854324EC93D8997E867D8AFF4C445380A9DD5544C07F7850E552B350245D03FB4AAA015DFE1C2261695BD2A999226D102094BEF244C38200A05D1BDF586D40E00381C4069DBFCFB80F1BD10C2F710FDD53D614E79B4E1C8AB65081762C7B45FA64D
|
||||
answer = BA0D89B5FB6C6730A209CFB4D99B310D48CA7FEC48082D3E05DFD954B98CE656438A880003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010049743B49768F04B6845C3DB77A4E8319CA4DDDBA4A97EA63AFB0DD54AFF8D5552B5BC9534F28EEBD7FC2566E7C05ACE4F1ED5276E5E46EC842B3B6ABA708D50A31D423C3A1E48D1D290D13A7069D73414966418A0B5FFA05F7D2D3478EA313C292664A21C30E417DCE4B1B0E0D325BFB6FF685D1DFC36DBA550A41BC8FAAF81B376BEB41651B7EBAE3E49D004553D3D5252E4539A87FA449F33D211F2FEF3390CDC86FF3C8F0FD89BB963854324EC93D8997E867D8AFF4C445380A9DD5544C07F7850E552B350245D03FB4AAA015DFE1C2261695BD2A999226D102094BEF244C38200A05D1BDF586D40E00381C4069DBFCFB80F1BD10C2F710FDD53D614E79B4E1C8AB65081762C7B45FA64D</code></pre>
|
||||
<pre><code>answer_with_hash = 053F417EC8F14644B5DC6577466D189843B2FCEBBA0D89B53C7CAF02B08D8EAEC6D44FDBD84166858F63998E6C714686134AC15157B02F0003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100471F7DE634C283284C9FF31ADCB995AF46D25E966CF69C088C2F3EFB212D366C0699136898D36BFEF7E49BFFBA5F9BC7AA852A9B74573FA2A851E7EC87672390F7DCDE802389080185119821698841942599F846FCE417DEF992045FB540FD74A8D3241D89BA4C842948143452949277944F238BBC917D7E421962343801CD6111C09B32A7692492AC2A9CCFD41476F032F0B701B400C3FFD601EC5637DB56B6FE6585DF5ADC895E65668F50D062F6CD65EACBB5AE33D3057F11AA223FD63B484BA95A24B463CC5D2DD63AC1AC667AEFA5F0AF241D086A823BA34B0C2ABCF24104AB142F37DA197098A1007DF24EDDF4CF1DC341AB51B304B1732A390BECE4EA95F4AB6585F6D8E71077A732
|
||||
answer = BA0D89B53C7CAF02B08D8EAEC6D44FDBD84166858F63998E6C714686134AC15157B02F0003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100471F7DE634C283284C9FF31ADCB995AF46D25E966CF69C088C2F3EFB212D366C0699136898D36BFEF7E49BFFBA5F9BC7AA852A9B74573FA2A851E7EC87672390F7DCDE802389080185119821698841942599F846FCE417DEF992045FB540FD74A8D3241D89BA4C842948143452949277944F238BBC917D7E421962343801CD6111C09B32A7692492AC2A9CCFD41476F032F0B701B400C3FFD601EC5637DB56B6FE6585DF5ADC895E65668F50D062F6CD65EACBB5AE33D3057F11AA223FD63B484BA95A24B463CC5D2DD63AC1AC667AEFA5F0AF241D086A823BA34B0C2ABCF24104AB142F37DA197098A1007DF24EDDF4CF1DC341AB51B304B1732A390BECE4EA95F4AB6585F6D8E71077A732</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 FB 6C 67 30 A2 09 CF B4 D9 9B 31 0D
|
||||
0010 | 48 CA 7F EC 48 08 2D 3E 05 DF D9 54 B9 8C E6 56
|
||||
0020 | 43 8A 88 00 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 3C 7C AF 02 B0 8D 8E AE C6 D4 4F DB
|
||||
0010 | D8 41 66 85 8F 63 99 8E 6C 71 46 86 13 4A C1 51
|
||||
0020 | 57 B0 2F 00 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 = BA0D89B5FB6C6730A209CFB4D99B310D48CA7FEC48082D3E05DFD954B98CE656438A880
|
|||
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 | 49 74 3B 49 76 8F 04 B6 84 5C 3D B7 7A 4E 83 19
|
||||
0140 | CA 4D DD BA 4A 97 EA 63 AF B0 DD 54 AF F8 D5 55
|
||||
0150 | 2B 5B C9 53 4F 28 EE BD 7F C2 56 6E 7C 05 AC E4
|
||||
0160 | F1 ED 52 76 E5 E4 6E C8 42 B3 B6 AB A7 08 D5 0A
|
||||
0170 | 31 D4 23 C3 A1 E4 8D 1D 29 0D 13 A7 06 9D 73 41
|
||||
0180 | 49 66 41 8A 0B 5F FA 05 F7 D2 D3 47 8E A3 13 C2
|
||||
0190 | 92 66 4A 21 C3 0E 41 7D CE 4B 1B 0E 0D 32 5B FB
|
||||
01A0 | 6F F6 85 D1 DF C3 6D BA 55 0A 41 BC 8F AA F8 1B
|
||||
01B0 | 37 6B EB 41 65 1B 7E BA E3 E4 9D 00 45 53 D3 D5
|
||||
01C0 | 25 2E 45 39 A8 7F A4 49 F3 3D 21 1F 2F EF 33 90
|
||||
01D0 | CD C8 6F F3 C8 F0 FD 89 BB 96 38 54 32 4E C9 3D
|
||||
01E0 | 89 97 E8 67 D8 AF F4 C4 45 38 0A 9D D5 54 4C 07
|
||||
01F0 | F7 85 0E 55 2B 35 02 45 D0 3F B4 AA A0 15 DF E1
|
||||
0200 | C2 26 16 95 BD 2A 99 92 26 D1 02 09 4B EF 24 4C
|
||||
0210 | 38 20 0A 05 D1 BD F5 86 D4 0E 00 38 1C 40 69 DB
|
||||
0220 | FC FB 80 F1 BD 10 C2 F7 10 FD D5 3D 61 4E 79 B4
|
||||
0230 | E1 C8 AB 65</code></pre>
|
||||
0130 | 47 1F 7D E6 34 C2 83 28 4C 9F F3 1A DC B9 95 AF
|
||||
0140 | 46 D2 5E 96 6C F6 9C 08 8C 2F 3E FB 21 2D 36 6C
|
||||
0150 | 06 99 13 68 98 D3 6B FE F7 E4 9B FF BA 5F 9B C7
|
||||
0160 | AA 85 2A 9B 74 57 3F A2 A8 51 E7 EC 87 67 23 90
|
||||
0170 | F7 DC DE 80 23 89 08 01 85 11 98 21 69 88 41 94
|
||||
0180 | 25 99 F8 46 FC E4 17 DE F9 92 04 5F B5 40 FD 74
|
||||
0190 | A8 D3 24 1D 89 BA 4C 84 29 48 14 34 52 94 92 77
|
||||
01A0 | 94 4F 23 8B BC 91 7D 7E 42 19 62 34 38 01 CD 61
|
||||
01B0 | 11 C0 9B 32 A7 69 24 92 AC 2A 9C CF D4 14 76 F0
|
||||
01C0 | 32 F0 B7 01 B4 00 C3 FF D6 01 EC 56 37 DB 56 B6
|
||||
01D0 | FE 65 85 DF 5A DC 89 5E 65 66 8F 50 D0 62 F6 CD
|
||||
01E0 | 65 EA CB B5 AE 33 D3 05 7F 11 AA 22 3F D6 3B 48
|
||||
01F0 | 4B A9 5A 24 B4 63 CC 5D 2D D6 3A C1 AC 66 7A EF
|
||||
0200 | A5 F0 AF 24 1D 08 6A 82 3B A3 4B 0C 2A BC F2 41
|
||||
0210 | 04 AB 14 2F 37 DA 19 70 98 A1 00 7D F2 4E DD F4
|
||||
0220 | CF 1D C3 41 AB 51 B3 04 B1 73 2A 39 0B EC E4 EA
|
||||
0230 | 95 F4 AB 65</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -570,13 +570,13 @@ answer = BA0D89B5FB6C6730A209CFB4D99B310D48CA7FEC48082D3E05DFD954B98CE656438A880
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>FB6C6730A209CFB4D99B310D48CA7FEC</code></td>
|
||||
<td><code>3C7CAF02B08D8EAEC6D44FDBD8416685</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>48082D3E05DFD954B98CE656438A8800</code></td>
|
||||
<td><code>8F63998E6C714686134AC15157B02F00</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B5FB6C6730A209CFB4D99B310D48CA7FEC48082D3E05DFD954B98CE656438A880
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE00010049743B49768F04B6845C3DB7</code> <code>7A4E8319CA4DDDBA4A97EA63AFB0DD54</code> <code>AFF8D5552B5BC9534F28EEBD7FC2566E</code> <code>7C05ACE4F1ED5276E5E46EC842B3B6AB</code> <code>A708D50A31D423C3A1E48D1D290D13A7</code> <code>069D73414966418A0B5FFA05F7D2D347</code> <code>8EA313C292664A21C30E417DCE4B1B0E</code> <code>0D325BFB6FF685D1DFC36DBA550A41BC</code> <code>8FAAF81B376BEB41651B7EBAE3E49D00</code> <code>4553D3D5252E4539A87FA449F33D211F</code> <code>2FEF3390CDC86FF3C8F0FD89BB963854</code> <code>324EC93D8997E867D8AFF4C445380A9D</code> <code>D5544C07F7850E552B350245D03FB4AA</code> <code>A015DFE1C2261695BD2A999226D10209</code> <code>4BEF244C38200A05D1BDF586D40E0038</code> <code>1C4069DBFCFB80F1BD10C2F710FDD53D</code><br> <code>614E79B4</code></td>
|
||||
<td><code>FE000100471F7DE634C283284C9FF31A</code> <code>DCB995AF46D25E966CF69C088C2F3EFB</code> <code>212D366C0699136898D36BFEF7E49BFF</code> <code>BA5F9BC7AA852A9B74573FA2A851E7EC</code> <code>87672390F7DCDE802389080185119821</code> <code>698841942599F846FCE417DEF992045F</code> <code>B540FD74A8D3241D89BA4C8429481434</code> <code>52949277944F238BBC917D7E42196234</code> <code>3801CD6111C09B32A7692492AC2A9CCF</code> <code>D41476F032F0B701B400C3FFD601EC56</code> <code>37DB56B6FE6585DF5ADC895E65668F50</code> <code>D062F6CD65EACBB5AE33D3057F11AA22</code> <code>3FD63B484BA95A24B463CC5D2DD63AC1</code> <code>AC667AEFA5F0AF241D086A823BA34B0C</code> <code>2ABCF24104AB142F37DA197098A1007D</code> <code>F24EDDF4CF1DC341AB51B304B1732A39</code><br> <code>0BECE4EA</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>E1C8AB65</code> (1705756897 in decimal)</td>
|
||||
<td><code>95F4AB65</code> (1705768085 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B5FB6C6730A209CFB4D99B310D48CA7FEC48082D3E05DFD954B98CE656438A880
|
|||
<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 = AAD47B1DA97968D0050F9F7757700FABA551B3BFCD4628A1BDBA2EE5CE811C84C46667CB570FDA558FC050D33D150B88E44C1E3416CF3D44E95FAB68B2C61DADBD74862A3E1304CAE0F02F7995D8C4BBEA9F4527681F172FD724A04B97FF7EA84B47C2A0121B09F16391EB3906D8988E3F1BEA7534DD29540688303AA81D5F722C7CF9021703943F3E47CAEACABED8795935AAD8999701F0662C9CC3F046BBD030AC6FE5972B6A4BFC40E707A526D0A426462C5CE3E1D3295AC6924DE4E72CA00997FFCB89AB931D0C7EE9BCC52F1EA67F322F01E3DBA4E66F7DDE3844FF15CCB310300BAA837F1632E0F81B0ADFB57F08755215782D467C4CD4BEE97228D9DF</code></pre>
|
||||
<pre><code>b = E63A7A12B8C57BDF4E8FE8C66B889E88B0FDBC4522A17E58EA9127067101F404C43D3BCC3617FD08E84B2793B325B1C63C527848303A64F146E1E84BD65BCA8D4706A6EF47D75B71B598943E99BB27CCF08BCBB1ACB08D8FAE8552B0C3DDACAD7BA67F2F1EAC4082F1E26FB403D357C1EE8FAA1336BA500F1C67D0A8F377ECB47685AD67B49DD2F040BE266966A06D7A0477973515D0591B05C0504BC345F5EA985284F22E0980EEB4AFE3599CD1EC0461B7254147CC60489F9278AE07D13C39860D1A74E69729F3E6003007B3CA077B7A960B3AB67F180AD924FAE4C9157E69B904C3A267BBE79AB76FE381D10E02AD0F1C5A25ED5876DC059BD980AC41814B</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 = 4895872FF27C396A60C98CDBCB5469C0948242EEBE99A0ED4573CC10C668AE4A1B660538498D554434308DF026482083ECA6D67201663EB55F2C076C43CCE5079AF08E574D566F294DEA2421D1BF1513624572E0EFDBF8A10B981C6515FB9D6D4EEF01AB489380DEBAAC59E4BD35BA74AA59E752A5FC4670C9715A9EA6846D0E3D7B0208F7BE18DC5CA600873F455BB080F23F45AFA715750A0F76730A0DD2A6DDC94A15FF51E0A3E7F28C32D784931F2ECDBAE8CD27EA54AC2C99AF8ADACDC377F219139893B27AB6C25653E17F34950C60B419F20D8C768FD9A1777198BF3E1B9C7806CB207FE33C090BB286FE67BD80A57496B0BA02959A6E57AE329C9A39</code></pre>
|
||||
<pre><code>g_b = 7C511DC64CB4F1AF327A1E22C183F87101C90D0B58214044F5967EF645D1735E431E86F6ED7CC832D6674D9CF38ADF3C0C84D293C470FACBBBC7A1F792DEFCBEB0BA7EE7B6E118D4617427E3D0689B1325B30362C4C69743DAAC413197AD49B08C46A957D19BC4EAD1F97AA493EBD7A531301A60A70C27ECF38031CA81E20C994DAF4359554966CF6295A03F06669E2FAFC3BF935A64B2641CF86E753BEEA3E529D8ADA8C3E18008459D1BAC33287C9E5D7D14999456284EF0D7F1C1E77BA9B083A7B8C872FD6CDFD48F4A6FE334E2DC3E3D716A9ED68B71EFA69FB0E33379DCDE25A56473C0E208F064AE71DC0E6EC671FB9577F573D56AEC3B4C4D6FD59E42</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 FB 6C 67 30 A2 09 CF B4 D9 9B 31 0D
|
||||
0010 | 48 CA 7F EC 48 08 2D 3E 05 DF D9 54 B9 8C E6 56
|
||||
0020 | 43 8A 88 00 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 48 95 87 2F F2 7C 39 6A 60 C9 8C DB CB 54 69 C0
|
||||
0040 | 94 82 42 EE BE 99 A0 ED 45 73 CC 10 C6 68 AE 4A
|
||||
0050 | 1B 66 05 38 49 8D 55 44 34 30 8D F0 26 48 20 83
|
||||
0060 | EC A6 D6 72 01 66 3E B5 5F 2C 07 6C 43 CC E5 07
|
||||
0070 | 9A F0 8E 57 4D 56 6F 29 4D EA 24 21 D1 BF 15 13
|
||||
0080 | 62 45 72 E0 EF DB F8 A1 0B 98 1C 65 15 FB 9D 6D
|
||||
0090 | 4E EF 01 AB 48 93 80 DE BA AC 59 E4 BD 35 BA 74
|
||||
00A0 | AA 59 E7 52 A5 FC 46 70 C9 71 5A 9E A6 84 6D 0E
|
||||
00B0 | 3D 7B 02 08 F7 BE 18 DC 5C A6 00 87 3F 45 5B B0
|
||||
00C0 | 80 F2 3F 45 AF A7 15 75 0A 0F 76 73 0A 0D D2 A6
|
||||
00D0 | DD C9 4A 15 FF 51 E0 A3 E7 F2 8C 32 D7 84 93 1F
|
||||
00E0 | 2E CD BA E8 CD 27 EA 54 AC 2C 99 AF 8A DA CD C3
|
||||
00F0 | 77 F2 19 13 98 93 B2 7A B6 C2 56 53 E1 7F 34 95
|
||||
0100 | 0C 60 B4 19 F2 0D 8C 76 8F D9 A1 77 71 98 BF 3E
|
||||
0110 | 1B 9C 78 06 CB 20 7F E3 3C 09 0B B2 86 FE 67 BD
|
||||
0120 | 80 A5 74 96 B0 BA 02 95 9A 6E 57 AE 32 9C 9A 39</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 3C 7C AF 02 B0 8D 8E AE C6 D4 4F DB
|
||||
0010 | D8 41 66 85 8F 63 99 8E 6C 71 46 86 13 4A C1 51
|
||||
0020 | 57 B0 2F 00 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 7C 51 1D C6 4C B4 F1 AF 32 7A 1E 22 C1 83 F8 71
|
||||
0040 | 01 C9 0D 0B 58 21 40 44 F5 96 7E F6 45 D1 73 5E
|
||||
0050 | 43 1E 86 F6 ED 7C C8 32 D6 67 4D 9C F3 8A DF 3C
|
||||
0060 | 0C 84 D2 93 C4 70 FA CB BB C7 A1 F7 92 DE FC BE
|
||||
0070 | B0 BA 7E E7 B6 E1 18 D4 61 74 27 E3 D0 68 9B 13
|
||||
0080 | 25 B3 03 62 C4 C6 97 43 DA AC 41 31 97 AD 49 B0
|
||||
0090 | 8C 46 A9 57 D1 9B C4 EA D1 F9 7A A4 93 EB D7 A5
|
||||
00A0 | 31 30 1A 60 A7 0C 27 EC F3 80 31 CA 81 E2 0C 99
|
||||
00B0 | 4D AF 43 59 55 49 66 CF 62 95 A0 3F 06 66 9E 2F
|
||||
00C0 | AF C3 BF 93 5A 64 B2 64 1C F8 6E 75 3B EE A3 E5
|
||||
00D0 | 29 D8 AD A8 C3 E1 80 08 45 9D 1B AC 33 28 7C 9E
|
||||
00E0 | 5D 7D 14 99 94 56 28 4E F0 D7 F1 C1 E7 7B A9 B0
|
||||
00F0 | 83 A7 B8 C8 72 FD 6C DF D4 8F 4A 6F E3 34 E2 DC
|
||||
0100 | 3E 3D 71 6A 9E D6 8B 71 EF A6 9F B0 E3 33 79 DC
|
||||
0110 | DE 25 A5 64 73 C0 E2 08 F0 64 AE 71 DC 0E 6E C6
|
||||
0120 | 71 FB 95 77 F5 73 D5 6A EC 3B 4C 4D 6F D5 9E 42</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 = BA0D89B5FB6C6730A209CFB4D99B310D48CA7FEC48082D3E05DFD954B98CE656438A880
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>FB6C6730A209CFB4D99B310D48CA7FEC</code></td>
|
||||
<td><code>3C7CAF02B08D8EAEC6D44FDBD8416685</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>48082D3E05DFD954B98CE656438A8800</code></td>
|
||||
<td><code>8F63998E6C714686134AC15157B02F00</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE0001004895872FF27C396A60C98CDB</code> <code>CB5469C0948242EEBE99A0ED4573CC10</code> <code>C668AE4A1B660538498D554434308DF0</code> <code>26482083ECA6D67201663EB55F2C076C</code> <code>43CCE5079AF08E574D566F294DEA2421</code> <code>D1BF1513624572E0EFDBF8A10B981C65</code> <code>15FB9D6D4EEF01AB489380DEBAAC59E4</code> <code>BD35BA74AA59E752A5FC4670C9715A9E</code> <code>A6846D0E3D7B0208F7BE18DC5CA60087</code> <code>3F455BB080F23F45AFA715750A0F7673</code> <code>0A0DD2A6DDC94A15FF51E0A3E7F28C32</code> <code>D784931F2ECDBAE8CD27EA54AC2C99AF</code> <code>8ADACDC377F219139893B27AB6C25653</code> <code>E17F34950C60B419F20D8C768FD9A177</code> <code>7198BF3E1B9C7806CB207FE33C090BB2</code> <code>86FE67BD80A57496B0BA02959A6E57AE</code><br> <code>329C9A39</code></td>
|
||||
<td><code>FE0001007C511DC64CB4F1AF327A1E22</code> <code>C183F87101C90D0B58214044F5967EF6</code> <code>45D1735E431E86F6ED7CC832D6674D9C</code> <code>F38ADF3C0C84D293C470FACBBBC7A1F7</code> <code>92DEFCBEB0BA7EE7B6E118D4617427E3</code> <code>D0689B1325B30362C4C69743DAAC4131</code> <code>97AD49B08C46A957D19BC4EAD1F97AA4</code> <code>93EBD7A531301A60A70C27ECF38031CA</code> <code>81E20C994DAF4359554966CF6295A03F</code> <code>06669E2FAFC3BF935A64B2641CF86E75</code> <code>3BEEA3E529D8ADA8C3E18008459D1BAC</code> <code>33287C9E5D7D14999456284EF0D7F1C1</code> <code>E77BA9B083A7B8C872FD6CDFD48F4A6F</code> <code>E334E2DC3E3D716A9ED68B71EFA69FB0</code> <code>E33379DCDE25A56473C0E208F064AE71</code> <code>DC0E6EC671FB9577F573D56AEC3B4C4D</code><br> <code>6FD59E42</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 = BA0D89B5FB6C6730A209CFB4D99B310D48CA7FEC48082D3E05DFD954B98CE656438A880
|
|||
<!-- 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 = 54B64366FB6C6730A209CFB4D99B310D48CA7FEC48082D3E05DFD954B98CE656438A88000000000000000000FE0001004895872FF27C396A60C98CDBCB5469C0948242EEBE99A0ED4573CC10C668AE4A1B660538498D554434308DF026482083ECA6D67201663EB55F2C076C43CCE5079AF08E574D566F294DEA2421D1BF1513624572E0EFDBF8A10B981C6515FB9D6D4EEF01AB489380DEBAAC59E4BD35BA74AA59E752A5FC4670C9715A9EA6846D0E3D7B0208F7BE18DC5CA600873F455BB080F23F45AFA715750A0F76730A0DD2A6DDC94A15FF51E0A3E7F28C32D784931F2ECDBAE8CD27EA54AC2C99AF8ADACDC377F219139893B27AB6C25653E17F34950C60B419F20D8C768FD9A1777198BF3E1B9C7806CB207FE33C090BB286FE67BD80A57496B0BA02959A6E57AE329C9A39
|
||||
padding = 135F6FBA425997B3BB0A66C0
|
||||
tmp_aes_key = 939A48A4F8097727F06DDF7AAC298444991F6804620AC0E12890D2F8750F0BF1
|
||||
tmp_aes_iv = 2CCC8FF240E00E900DDD34DC87C89B2F9383AEEEF45322E44F4119962A9D4FF9</code></pre>
|
||||
<pre><code>data = 54B643663C7CAF02B08D8EAEC6D44FDBD84166858F63998E6C714686134AC15157B02F000000000000000000FE0001007C511DC64CB4F1AF327A1E22C183F87101C90D0B58214044F5967EF645D1735E431E86F6ED7CC832D6674D9CF38ADF3C0C84D293C470FACBBBC7A1F792DEFCBEB0BA7EE7B6E118D4617427E3D0689B1325B30362C4C69743DAAC413197AD49B08C46A957D19BC4EAD1F97AA493EBD7A531301A60A70C27ECF38031CA81E20C994DAF4359554966CF6295A03F06669E2FAFC3BF935A64B2641CF86E753BEEA3E529D8ADA8C3E18008459D1BAC33287C9E5D7D14999456284EF0D7F1C1E77BA9B083A7B8C872FD6CDFD48F4A6FE334E2DC3E3D716A9ED68B71EFA69FB0E33379DCDE25A56473C0E208F064AE71DC0E6EC671FB9577F573D56AEC3B4C4D6FD59E42
|
||||
padding = 83544D79DD0F2CC5AE99CC8E
|
||||
tmp_aes_key = 0A7E80F0AD7CF0445C6C627DD6FE5F83030ECAECD2C31CB65EFE28A434F45714
|
||||
tmp_aes_iv = 4F1897AF4531CD9257239CF77B1A78A6035DE20EA41CAFCCC59EF8F02AC20EB0</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 = 93AB2AF96F1A51915CD4B1F89EED07819E10DDDE3F936D67F2D0E559120DDD56F674775964F5F13243BCF3923BC790E25711DA6EAD8A1BEFC56161532A5EE70D64C00E37D7E5785772A3B7E1AC93EE2D556D48179627B63A2E0C3EF3FEF70DF5FE4351883628E67C6147F276B532A1F3A198FAD209A7472E244EFCB6FBC0CB42C836FA5C12C4499355A3099202AC4FCBAE417B99BF00C6FF3A51FEE64C571A37555F2AAEE90A09C16D77A9E68D728D596CEB84F52C8861AE54EB623B1E91103E0E92495F2C0422E21039E3AFCCB7FDD6425620E51A67206EC9249679019E90579E1DEEDC791AA6FB6FD07D8E6043C34A0DDF7C31192355A97B4119103F2C8B7FDB8BE7AE1277C183DA28C48DCE3E55E6772A7B20585D3D6BDDC81B03A8D5E070CBB568C958A56626CD21A03947CCDDCF1FBCD522C6A60DBB9DD3AE138F2DC112DED74DEE63BE214435753B58100E534E</code></pre>
|
||||
<pre><code>encrypted_data = A985CE8EA94BB5DC217B820836C81C6FF697801B17354AB58FCD7C60DABB93B40136983EB29183D254DFC5D4149E3EB0C78B6F2AD3E79F652E78B6EDF9FE32C59DDDB1D608C5741C02C8F16EC1D942DB2DD45651C6B8C11D6AF2C939006E6F844342E67E54EDDCA25A0A0666C39D7BE4EF9BEC2CE1144864DEFDC756D70B62496381226E6615E2C2A77F86C87A2CF78B1BED3269ABFB429E00B7A97F114A2D1090BD4A3B9B64F04E42A859CCDC4F224F5500E35BB8C5DDE649F9007A90A1AD23A6D36EEB4F39E0D1297C19D6E586EF5F527A7047BE1B53480D6101BB87A6ACA96F870A827D3AE032F2DA3F08D4F0CC9EFAEF5B2D49E8995691D8D329A198695711A83AF93F068C02DA7952691ECFBA842541E4079304EBA56F33968980884F649FCAFDC157514F83BA69CE01FED322048903BD6FC34CBF9D09956BFD634965DB7359C9AC30861BDBEC135FA06E242335</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 B0 FE 05 00 E1 C8 AB 65
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 FB 6C 67 30 A2 09 CF B4
|
||||
0020 | D9 9B 31 0D 48 CA 7F EC 48 08 2D 3E 05 DF D9 54
|
||||
0030 | B9 8C E6 56 43 8A 88 00 FE 50 01 00 93 AB 2A F9
|
||||
0040 | 6F 1A 51 91 5C D4 B1 F8 9E ED 07 81 9E 10 DD DE
|
||||
0050 | 3F 93 6D 67 F2 D0 E5 59 12 0D DD 56 F6 74 77 59
|
||||
0060 | 64 F5 F1 32 43 BC F3 92 3B C7 90 E2 57 11 DA 6E
|
||||
0070 | AD 8A 1B EF C5 61 61 53 2A 5E E7 0D 64 C0 0E 37
|
||||
0080 | D7 E5 78 57 72 A3 B7 E1 AC 93 EE 2D 55 6D 48 17
|
||||
0090 | 96 27 B6 3A 2E 0C 3E F3 FE F7 0D F5 FE 43 51 88
|
||||
00A0 | 36 28 E6 7C 61 47 F2 76 B5 32 A1 F3 A1 98 FA D2
|
||||
00B0 | 09 A7 47 2E 24 4E FC B6 FB C0 CB 42 C8 36 FA 5C
|
||||
00C0 | 12 C4 49 93 55 A3 09 92 02 AC 4F CB AE 41 7B 99
|
||||
00D0 | BF 00 C6 FF 3A 51 FE E6 4C 57 1A 37 55 5F 2A AE
|
||||
00E0 | E9 0A 09 C1 6D 77 A9 E6 8D 72 8D 59 6C EB 84 F5
|
||||
00F0 | 2C 88 61 AE 54 EB 62 3B 1E 91 10 3E 0E 92 49 5F
|
||||
0100 | 2C 04 22 E2 10 39 E3 AF CC B7 FD D6 42 56 20 E5
|
||||
0110 | 1A 67 20 6E C9 24 96 79 01 9E 90 57 9E 1D EE DC
|
||||
0120 | 79 1A A6 FB 6F D0 7D 8E 60 43 C3 4A 0D DF 7C 31
|
||||
0130 | 19 23 55 A9 7B 41 19 10 3F 2C 8B 7F DB 8B E7 AE
|
||||
0140 | 12 77 C1 83 DA 28 C4 8D CE 3E 55 E6 77 2A 7B 20
|
||||
0150 | 58 5D 3D 6B DD C8 1B 03 A8 D5 E0 70 CB B5 68 C9
|
||||
0160 | 58 A5 66 26 CD 21 A0 39 47 CC DD CF 1F BC D5 22
|
||||
0170 | C6 A6 0D BB 9D D3 AE 13 8F 2D C1 12 DE D7 4D EE
|
||||
0180 | 63 BE 21 44 35 75 3B 58 10 0E 53 4E</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 D0 A9 03 00 96 F4 AB 65
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 3C 7C AF 02 B0 8D 8E AE
|
||||
0020 | C6 D4 4F DB D8 41 66 85 8F 63 99 8E 6C 71 46 86
|
||||
0030 | 13 4A C1 51 57 B0 2F 00 FE 50 01 00 A9 85 CE 8E
|
||||
0040 | A9 4B B5 DC 21 7B 82 08 36 C8 1C 6F F6 97 80 1B
|
||||
0050 | 17 35 4A B5 8F CD 7C 60 DA BB 93 B4 01 36 98 3E
|
||||
0060 | B2 91 83 D2 54 DF C5 D4 14 9E 3E B0 C7 8B 6F 2A
|
||||
0070 | D3 E7 9F 65 2E 78 B6 ED F9 FE 32 C5 9D DD B1 D6
|
||||
0080 | 08 C5 74 1C 02 C8 F1 6E C1 D9 42 DB 2D D4 56 51
|
||||
0090 | C6 B8 C1 1D 6A F2 C9 39 00 6E 6F 84 43 42 E6 7E
|
||||
00A0 | 54 ED DC A2 5A 0A 06 66 C3 9D 7B E4 EF 9B EC 2C
|
||||
00B0 | E1 14 48 64 DE FD C7 56 D7 0B 62 49 63 81 22 6E
|
||||
00C0 | 66 15 E2 C2 A7 7F 86 C8 7A 2C F7 8B 1B ED 32 69
|
||||
00D0 | AB FB 42 9E 00 B7 A9 7F 11 4A 2D 10 90 BD 4A 3B
|
||||
00E0 | 9B 64 F0 4E 42 A8 59 CC DC 4F 22 4F 55 00 E3 5B
|
||||
00F0 | B8 C5 DD E6 49 F9 00 7A 90 A1 AD 23 A6 D3 6E EB
|
||||
0100 | 4F 39 E0 D1 29 7C 19 D6 E5 86 EF 5F 52 7A 70 47
|
||||
0110 | BE 1B 53 48 0D 61 01 BB 87 A6 AC A9 6F 87 0A 82
|
||||
0120 | 7D 3A E0 32 F2 DA 3F 08 D4 F0 CC 9E FA EF 5B 2D
|
||||
0130 | 49 E8 99 56 91 D8 D3 29 A1 98 69 57 11 A8 3A F9
|
||||
0140 | 3F 06 8C 02 DA 79 52 69 1E CF BA 84 25 41 E4 07
|
||||
0150 | 93 04 EB A5 6F 33 96 89 80 88 4F 64 9F CA FD C1
|
||||
0160 | 57 51 4F 83 BA 69 CE 01 FE D3 22 04 89 03 BD 6F
|
||||
0170 | C3 4C BF 9D 09 95 6B FD 63 49 65 DB 73 59 C9 AC
|
||||
0180 | 30 86 1B DB EC 13 5F A0 6E 24 23 35</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>B0FE0500E1C8AB65</code></td>
|
||||
<td><code>D0A9030096F4AB65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 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>FB6C6730A209CFB4D99B310D48CA7FEC</code></td>
|
||||
<td><code>3C7CAF02B08D8EAEC6D44FDBD8416685</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>48082D3E05DFD954B98CE656438A8800</code></td>
|
||||
<td><code>8F63998E6C714686134AC15157B02F00</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE50010093AB2AF96F1A51915CD4B1F8</code> <code>9EED07819E10DDDE3F936D67F2D0E559</code> <code>120DDD56F674775964F5F13243BCF392</code> <code>3BC790E25711DA6EAD8A1BEFC5616153</code> <code>2A5EE70D64C00E37D7E5785772A3B7E1</code> <code>AC93EE2D556D48179627B63A2E0C3EF3</code> <code>FEF70DF5FE4351883628E67C6147F276</code> <code>B532A1F3A198FAD209A7472E244EFCB6</code> <code>FBC0CB42C836FA5C12C4499355A30992</code> <code>02AC4FCBAE417B99BF00C6FF3A51FEE6</code> <code>4C571A37555F2AAEE90A09C16D77A9E6</code> <code>8D728D596CEB84F52C8861AE54EB623B</code> <code>1E91103E0E92495F2C0422E21039E3AF</code> <code>CCB7FDD6425620E51A67206EC9249679</code> <code>019E90579E1DEEDC791AA6FB6FD07D8E</code> <code>6043C34A0DDF7C31192355A97B411910</code> <code>3F2C8B7FDB8BE7AE1277C183DA28C48D</code> <code>CE3E55E6772A7B20585D3D6BDDC81B03</code> <code>A8D5E070CBB568C958A56626CD21A039</code> <code>47CCDDCF1FBCD522C6A60DBB9DD3AE13</code> <code>8F2DC112DED74DEE63BE214435753B58</code><br> <code>100E534E</code></td>
|
||||
<td><code>FE500100A985CE8EA94BB5DC217B8208</code> <code>36C81C6FF697801B17354AB58FCD7C60</code> <code>DABB93B40136983EB29183D254DFC5D4</code> <code>149E3EB0C78B6F2AD3E79F652E78B6ED</code> <code>F9FE32C59DDDB1D608C5741C02C8F16E</code> <code>C1D942DB2DD45651C6B8C11D6AF2C939</code> <code>006E6F844342E67E54EDDCA25A0A0666</code> <code>C39D7BE4EF9BEC2CE1144864DEFDC756</code> <code>D70B62496381226E6615E2C2A77F86C8</code> <code>7A2CF78B1BED3269ABFB429E00B7A97F</code> <code>114A2D1090BD4A3B9B64F04E42A859CC</code> <code>DC4F224F5500E35BB8C5DDE649F9007A</code> <code>90A1AD23A6D36EEB4F39E0D1297C19D6</code> <code>E586EF5F527A7047BE1B53480D6101BB</code> <code>87A6ACA96F870A827D3AE032F2DA3F08</code> <code>D4F0CC9EFAEF5B2D49E8995691D8D329</code> <code>A198695711A83AF93F068C02DA795269</code> <code>1ECFBA842541E4079304EBA56F339689</code> <code>80884F649FCAFDC157514F83BA69CE01</code> <code>FED322048903BD6FC34CBF9D09956BFD</code> <code>634965DB7359C9AC30861BDBEC135FA0</code><br> <code>6E242335</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 = 72CC5EB1A5E336C6ECA831CF9B76A2FA522B83C9AD9BA596CAF69848F17A50A70222D281CACBAB6B489E41A9837B54D081892A4A0018E865D6AEC0255B4C75B2119966D6D390099DE3098FFA7B65A0745A069E1DC5128DEFBD592AF2D36576229C9921809F38BBAC62DF4A43FD0F1C5944CB63ECC87D704DEC1F5E04204D7D02A7C3A2087836FB830B19F5A4CFFCAA5405F702C3D0189136085180DD87253FBA4292E83BA79A70EFA97A05963384A69F7A578D60B04102B38DD80F9AE56D7239072341AAEA0B54858E3C630A8B6FDA4F427B2CDEADD5F275F77AAE62E5029285470B77A882D08C58F3D54FE3C97996F391BC1EDAB6EED8424360A3592DDFA78C</code></pre>
|
||||
<pre><code>auth_key = 550B5ADCC3AF473C4B6238F500A3CED8941FE5F7C69F3AAA8823A6B8FED6217C8689B311CAA69FB30A6A6C6C4AE498C78656832FAAADE842C57F84B0ADF613359309D11918469792EB304DF182B3EC3A1905DBF7477C70A460FD5522C5A807A0CA89B45DFE027A3701EB31D08C38637F702186AF5526FA7709C906D607C7EED052576EBB26F4BFD723541BF77291E5CDD2493EADD59938E1668F610FB2B3908048B16E3A86898726FE5C7B7564DEE5E15E276E8603778CC45B7645C3C4B90AEFD1638B35296EDD231115C361EC7BA8528253170ACD7B244C3B53F5D10230004DE6443438198EDC7EA025F317D8B4EDAC30B6E50C174473A3B4E19058FAC4A433</code></pre>
|
||||
<!-- end auth_key -->
|
||||
<h5><a class="anchor" href="#9-final-server-reply" id="9-final-server-reply" name="9-final-server-reply"><i class="anchor-icon"></i></a>9) Final server reply</h5>
|
||||
<p>The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:</p>
|
||||
<!-- start dh_gen_ok -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 94 29 17 E2 C8 AB 65
|
||||
0010 | B0 00 00 00 34 F7 CB 3B FB 6C 67 30 A2 09 CF B4
|
||||
0020 | D9 9B 31 0D 48 CA 7F EC 48 08 2D 3E 05 DF D9 54
|
||||
0030 | B9 8C E6 56 43 8A 88 00 9B 1A 8F 9A 8D 23 BD C1
|
||||
0040 | FE 2E 7C 9F 01 DA 7C 8B</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 9C AC CC 96 F4 AB 65
|
||||
0010 | 5C 00 00 00 34 F7 CB 3B 3C 7C AF 02 B0 8D 8E AE
|
||||
0020 | C6 D4 4F DB D8 41 66 85 8F 63 99 8E 6C 71 46 86
|
||||
0030 | 13 4A C1 51 57 B0 2F 00 D6 D0 71 E8 A4 CC 1A DF
|
||||
0040 | 12 36 57 FD 08 0C D0 48</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01942917E2C8AB65</code></td>
|
||||
<td><code>019CACCC96F4AB65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>B0000000</code> (176 in decimal)</td>
|
||||
<td><code>5C000000</code> (92 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FB6C6730A209CFB4D99B310D48CA7FEC</code></td>
|
||||
<td><code>3C7CAF02B08D8EAEC6D44FDBD8416685</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>48082D3E05DFD954B98CE656438A8800</code></td>
|
||||
<td><code>8F63998E6C714686134AC15157B02F00</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>9B1A8F9A8D23BDC1FE2E7C9F01DA7C8B</code></td>
|
||||
<td><code>D6D071E8A4CC1ADF123657FD080CD048</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>
|
||||
|
|
Loading…
Reference in a new issue