mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-06 02:45:30 +01:00
Update content of files
This commit is contained in:
parent
5f364d679b
commit
f60bb4dc27
3 changed files with 209 additions and 209 deletions
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.getOutboxReadDate</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Get the exact read date of one of our messages, sent to a private chat with another user. Can be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ». If the peer's userFull.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted. The exact read date of messages might still be unavailable for other reasons, see here » for more info. To set userFull.read_dates_private for ourselves invoke account.setGlobalPrivacySettings, setting the settings.hide_read_marks flag.">
|
||||
<meta property="description" content="Get the exact read date of one of our messages, sent to a private chat with another user. Can be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ». If the peer's userFull.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted. The exact read date of messages might still be unavailable for other reasons, see here » for more info. To set userFull.read_dates_private for ourselves invoke account.setGlobalPrivacySettings, setting the settings.hide_read_marks flag.">
|
||||
<meta property="og:title" content="messages.getOutboxReadDate">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Get the exact read date of one of our messages, sent to a private chat with another user. Can be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ». If the peer's userFull.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted. The exact read date of messages might still be unavailable for other reasons, see here » for more info. To set userFull.read_dates_private for ourselves invoke account.setGlobalPrivacySettings, setting the settings.hide_read_marks flag.">
|
||||
<meta property="og:description" content="Get the exact read date of one of our messages, sent to a private chat with another user. Can be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ». If the peer's userFull.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted. The exact read date of messages might still be unavailable for other reasons, see here » for more info. To set userFull.read_dates_private for ourselves invoke account.setGlobalPrivacySettings, setting the settings.hide_read_marks flag.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
|
|
@ -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 54 FF 09 00 79 5A 99 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 66 1D B0 4F 07 59 BA 01
|
||||
0020 | 12 AF 0F 39 23 A2 49 6C</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 A8 CF 05 00 9C 5A 99 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 50 78 49 F0 BB 9C 45 7D
|
||||
0020 | BC E9 A3 22 DE EC 98 B7</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>54FF0900795A9966</code></td>
|
||||
<td><code>A8CF05009C5A9966</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>661DB04F0759BA0112AF0F3923A2496C</code></td>
|
||||
<td><code>507849F0BB9C457DBCE9A322DEEC98B7</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 D8 D9 E7 79 5A 99 66
|
||||
0010 | 9C 00 00 00 63 24 16 05 66 1D B0 4F 07 59 BA 01
|
||||
0020 | 12 AF 0F 39 23 A2 49 6C 48 E1 4C F6 49 34 95 00
|
||||
0030 | BF 9F 7D B9 A9 72 79 46 08 19 21 50 1D 5D 3E A3
|
||||
0040 | CF 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 C4 B9 5E 9C 5A 99 66
|
||||
0010 | 58 00 00 00 63 24 16 05 50 78 49 F0 BB 9C 45 7D
|
||||
0020 | BC E9 A3 22 DE EC 98 B7 4C A9 67 F1 E6 C7 3D 67
|
||||
0030 | 7B 05 7D BF 78 DF F1 D3 08 15 80 49 4E 74 1B AD
|
||||
0040 | 5D 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>01D8D9E7795A9966</code></td>
|
||||
<td><code>01C4B95E9C5A9966</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>9C000000</code> (156 in decimal)</td>
|
||||
<td><code>58000000</code> (88 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>661DB04F0759BA0112AF0F3923A2496C</code></td>
|
||||
<td><code>507849F0BB9C457DBCE9A322DEEC98B7</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>48E14CF649349500BF9F7DB9A9727946</code></td>
|
||||
<td><code>4CA967F1E6C73D677B057DBF78DFF1D3</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>081921501D5D3EA3CF000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1810816612228309967</td>
|
||||
<td><code>081580494E741BAD5D000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1549318873119698269</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 = 1810816612228309967</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1810816612228309967 = 1033917223 * 1751413529</code></p>
|
||||
<pre><code>p = 1033917223
|
||||
q = 1751413529</code></pre>
|
||||
<pre><code>pq = 1549318873119698269</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1549318873119698269 = 1070932559 * 1446700691</code></p>
|
||||
<pre><code>p = 1070932559
|
||||
q = 1446700691</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 19 21 50 1D 5D 3E A3 CF 00 00 00
|
||||
0010 | 04 3D A0 53 27 00 00 00 04 68 64 73 19 00 00 00
|
||||
0020 | 66 1D B0 4F 07 59 BA 01 12 AF 0F 39 23 A2 49 6C
|
||||
0030 | 48 E1 4C F6 49 34 95 00 BF 9F 7D B9 A9 72 79 46
|
||||
0040 | 3E 94 B4 C7 15 50 62 E6 79 67 69 11 C8 FC BD BC
|
||||
0050 | 95 A7 51 29 76 08 24 0F 37 85 4B D2 EE 49 FA 54
|
||||
<pre><code>0000 | 95 5F F5 A9 08 15 80 49 4E 74 1B AD 5D 00 00 00
|
||||
0010 | 04 3F D5 22 4F 00 00 00 04 56 3A E6 93 00 00 00
|
||||
0020 | 50 78 49 F0 BB 9C 45 7D BC E9 A3 22 DE EC 98 B7
|
||||
0030 | 4C A9 67 F1 E6 C7 3D 67 7B 05 7D BF 78 DF F1 D3
|
||||
0040 | 4C E5 4E 26 62 A1 A6 0A BC 08 A2 9E 87 60 12 43
|
||||
0050 | 40 51 A0 F7 BE 6B 2A CB A0 2B E1 71 F0 97 5A 9C
|
||||
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 = 1751413529</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>081921501D5D3EA3CF000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1810816612228309967</td>
|
||||
<td><code>081580494E741BAD5D000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1549318873119698269</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>043DA05327000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1033917223</td>
|
||||
<td><code>043FD5224F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1070932559</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>0468647319000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1751413529</td>
|
||||
<td><code>04563AE693000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1446700691</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>661DB04F0759BA0112AF0F3923A2496C</code></td>
|
||||
<td><code>507849F0BB9C457DBCE9A322DEEC98B7</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>48E14CF649349500BF9F7DB9A9727946</code></td>
|
||||
<td><code>4CA967F1E6C73D677B057DBF78DFF1D3</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>3E94B4C7155062E679676911C8FCBDBC</code> <code>95A751297608240F37854BD2EE49FA54</code></td>
|
||||
<td><code>4CE54E2662A1A60ABC08A29E87601243</code> <code>4051A0F7BE6B2ACBA02BE171F0975A9C</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1751413529</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 = 955FF5A9081921501D5D3EA3CF000000043DA053270000000468647319000000661DB04F0759BA0112AF0F3923A2496C48E14CF649349500BF9F7DB9A97279463E94B4C7155062E679676911C8FCBDBC95A751297608240F37854BD2EE49FA5402000000
|
||||
random_padding_bytes = 31BFA2AA3B357FDD3EF1EA929237378B200028E8B0FDC23E2EF673A3094EC21A83792D7FF69B33BFBEAB21F45027437CF1F0E78FF5497A14237020FD926EA26A242F5EF3F0C9040D56D188093366EFB6EDDB66D14B649F6F37C98BD2</code></pre>
|
||||
<pre><code>data = 955FF5A9081580494E741BAD5D000000043FD5224F00000004563AE693000000507849F0BB9C457DBCE9A322DEEC98B74CA967F1E6C73D677B057DBF78DFF1D34CE54E2662A1A60ABC08A29E876012434051A0F7BE6B2ACBA02BE171F0975A9C02000000
|
||||
random_padding_bytes = E0E6960D4222BCEF97D292D36F8622288608D30E7A1D4B06D957A886C04FE74F2759D57CA75B699AB792ABE14574536B3ECEABC3688443716844D56933365C11811B9D7B374BB75C17A4682198EA2DA4E15C108CA12EE0BC312F7631</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 = 9410F5D93A9A4109250C5365EDA96FB3D5D5300941DE02D63C5C2F17FF90A38A8A77B9E0A39AFBDA45112C814007A8F5B4EB950F6745CC9797542C7B619DC6CE2E81CB19A2C63ED565C54BDAABE1E22584AFA3E1FFB50B625A756A64AD00F11511C41C70A1F27E9E3CFCE86581FBCBE32DAB4A756383234BAA3DD2C5B76D68E58E2997D60D9099722D866784AFD2788F1362B7A77B60929F6AF7264121C688EFC2045E1AAA158A29C376236B6F1CB97812BAA14C354DC03C567E566A221E598FC1FADA42AE3239E6E572EDACCD2EADD99B39C573DD015BF5872B1EC41E4C9DB12230AD5CF0B5B1EB9D92AD832B1CD58A43B46CB9A0B88475A86276C7E5FFD1B3</code></pre>
|
||||
<pre><code>encrypted_data = CBD04170B7D52A56D5A87939331B3C87B14EBF66602DB5D6F418B453BD58A2426D9FAF245BE3AE9B66292A7ED4574370994BE43BEBC2792A7C00D02D5A9DF226C6A1493A0CA4C994A80937E5D0B8E641FAB53DF19F79F1E3752F47A3CC6A4092FF924A5A402523C8B9C38273450CF0E52AD19BFA8B9F78697B1A34FAB84816E7191845C032A2600C41B456072CDEEC639BB3126F77FF6D5C99739D8EF36FC9A809D1776A22889BBF06467E818E5276914957EF367EC86422ADC37077D7C756C29F527F672550ACD9836C27202763EFF095645FB7EED4380F9B8CAC50D966D790064876C545FC0BFDC54BDF9044B6DB01A305BA19005D3306FBBEB2646E8D4864</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 04 E6 03 00 7A 5A 99 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 66 1D B0 4F 07 59 BA 01
|
||||
0020 | 12 AF 0F 39 23 A2 49 6C 48 E1 4C F6 49 34 95 00
|
||||
0030 | BF 9F 7D B9 A9 72 79 46 04 3D A0 53 27 00 00 00
|
||||
0040 | 04 68 64 73 19 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 94 10 F5 D9 3A 9A 41 09 25 0C 53 65
|
||||
0060 | ED A9 6F B3 D5 D5 30 09 41 DE 02 D6 3C 5C 2F 17
|
||||
0070 | FF 90 A3 8A 8A 77 B9 E0 A3 9A FB DA 45 11 2C 81
|
||||
0080 | 40 07 A8 F5 B4 EB 95 0F 67 45 CC 97 97 54 2C 7B
|
||||
0090 | 61 9D C6 CE 2E 81 CB 19 A2 C6 3E D5 65 C5 4B DA
|
||||
00A0 | AB E1 E2 25 84 AF A3 E1 FF B5 0B 62 5A 75 6A 64
|
||||
00B0 | AD 00 F1 15 11 C4 1C 70 A1 F2 7E 9E 3C FC E8 65
|
||||
00C0 | 81 FB CB E3 2D AB 4A 75 63 83 23 4B AA 3D D2 C5
|
||||
00D0 | B7 6D 68 E5 8E 29 97 D6 0D 90 99 72 2D 86 67 84
|
||||
00E0 | AF D2 78 8F 13 62 B7 A7 7B 60 92 9F 6A F7 26 41
|
||||
00F0 | 21 C6 88 EF C2 04 5E 1A AA 15 8A 29 C3 76 23 6B
|
||||
0100 | 6F 1C B9 78 12 BA A1 4C 35 4D C0 3C 56 7E 56 6A
|
||||
0110 | 22 1E 59 8F C1 FA DA 42 AE 32 39 E6 E5 72 ED AC
|
||||
0120 | CD 2E AD D9 9B 39 C5 73 DD 01 5B F5 87 2B 1E C4
|
||||
0130 | 1E 4C 9D B1 22 30 AD 5C F0 B5 B1 EB 9D 92 AD 83
|
||||
0140 | 2B 1C D5 8A 43 B4 6C B9 A0 B8 84 75 A8 62 76 C7
|
||||
0150 | E5 FF D1 B3</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 38 7A 0D 00 9C 5A 99 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 50 78 49 F0 BB 9C 45 7D
|
||||
0020 | BC E9 A3 22 DE EC 98 B7 4C A9 67 F1 E6 C7 3D 67
|
||||
0030 | 7B 05 7D BF 78 DF F1 D3 04 3F D5 22 4F 00 00 00
|
||||
0040 | 04 56 3A E6 93 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 CB D0 41 70 B7 D5 2A 56 D5 A8 79 39
|
||||
0060 | 33 1B 3C 87 B1 4E BF 66 60 2D B5 D6 F4 18 B4 53
|
||||
0070 | BD 58 A2 42 6D 9F AF 24 5B E3 AE 9B 66 29 2A 7E
|
||||
0080 | D4 57 43 70 99 4B E4 3B EB C2 79 2A 7C 00 D0 2D
|
||||
0090 | 5A 9D F2 26 C6 A1 49 3A 0C A4 C9 94 A8 09 37 E5
|
||||
00A0 | D0 B8 E6 41 FA B5 3D F1 9F 79 F1 E3 75 2F 47 A3
|
||||
00B0 | CC 6A 40 92 FF 92 4A 5A 40 25 23 C8 B9 C3 82 73
|
||||
00C0 | 45 0C F0 E5 2A D1 9B FA 8B 9F 78 69 7B 1A 34 FA
|
||||
00D0 | B8 48 16 E7 19 18 45 C0 32 A2 60 0C 41 B4 56 07
|
||||
00E0 | 2C DE EC 63 9B B3 12 6F 77 FF 6D 5C 99 73 9D 8E
|
||||
00F0 | F3 6F C9 A8 09 D1 77 6A 22 88 9B BF 06 46 7E 81
|
||||
0100 | 8E 52 76 91 49 57 EF 36 7E C8 64 22 AD C3 70 77
|
||||
0110 | D7 C7 56 C2 9F 52 7F 67 25 50 AC D9 83 6C 27 20
|
||||
0120 | 27 63 EF F0 95 64 5F B7 EE D4 38 0F 9B 8C AC 50
|
||||
0130 | D9 66 D7 90 06 48 76 C5 45 FC 0B FD C5 4B DF 90
|
||||
0140 | 44 B6 DB 01 A3 05 BA 19 00 5D 33 06 FB BE B2 64
|
||||
0150 | 6E 8D 48 64</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 = 31BFA2AA3B357FDD3EF1EA929237378B200028E8B0FDC23E2EF673A30
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>04E603007A5A9966</code></td>
|
||||
<td><code>387A0D009C5A9966</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 = 31BFA2AA3B357FDD3EF1EA929237378B200028E8B0FDC23E2EF673A30
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>661DB04F0759BA0112AF0F3923A2496C</code></td>
|
||||
<td><code>507849F0BB9C457DBCE9A322DEEC98B7</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>48E14CF649349500BF9F7DB9A9727946</code></td>
|
||||
<td><code>4CA967F1E6C73D677B057DBF78DFF1D3</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>043DA05327000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1033917223</td>
|
||||
<td><code>043FD5224F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1070932559</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>0468647319000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1751413529</td>
|
||||
<td><code>04563AE693000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1446700691</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 = 31BFA2AA3B357FDD3EF1EA929237378B200028E8B0FDC23E2EF673A30
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE0001009410F5D93A9A4109250C5365</code> <code>EDA96FB3D5D5300941DE02D63C5C2F17</code> <code>FF90A38A8A77B9E0A39AFBDA45112C81</code> <code>4007A8F5B4EB950F6745CC9797542C7B</code> <code>619DC6CE2E81CB19A2C63ED565C54BDA</code> <code>ABE1E22584AFA3E1FFB50B625A756A64</code> <code>AD00F11511C41C70A1F27E9E3CFCE865</code> <code>81FBCBE32DAB4A756383234BAA3DD2C5</code> <code>B76D68E58E2997D60D9099722D866784</code> <code>AFD2788F1362B7A77B60929F6AF72641</code> <code>21C688EFC2045E1AAA158A29C376236B</code> <code>6F1CB97812BAA14C354DC03C567E566A</code> <code>221E598FC1FADA42AE3239E6E572EDAC</code> <code>CD2EADD99B39C573DD015BF5872B1EC4</code> <code>1E4C9DB12230AD5CF0B5B1EB9D92AD83</code> <code>2B1CD58A43B46CB9A0B88475A86276C7</code><br> <code>E5FFD1B3</code></td>
|
||||
<td><code>FE000100CBD04170B7D52A56D5A87939</code> <code>331B3C87B14EBF66602DB5D6F418B453</code> <code>BD58A2426D9FAF245BE3AE9B66292A7E</code> <code>D4574370994BE43BEBC2792A7C00D02D</code> <code>5A9DF226C6A1493A0CA4C994A80937E5</code> <code>D0B8E641FAB53DF19F79F1E3752F47A3</code> <code>CC6A4092FF924A5A402523C8B9C38273</code> <code>450CF0E52AD19BFA8B9F78697B1A34FA</code> <code>B84816E7191845C032A2600C41B45607</code> <code>2CDEEC639BB3126F77FF6D5C99739D8E</code> <code>F36FC9A809D1776A22889BBF06467E81</code> <code>8E5276914957EF367EC86422ADC37077</code> <code>D7C756C29F527F672550ACD9836C2720</code> <code>2763EFF095645FB7EED4380F9B8CAC50</code> <code>D966D790064876C545FC0BFDC54BDF90</code> <code>44B6DB01A305BA19005D3306FBBEB264</code><br> <code>6E8D4864</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = 31BFA2AA3B357FDD3EF1EA929237378B200028E8B0FDC23E2EF673A30
|
|||
<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 B4 4B B0 7A 5A 99 66
|
||||
0010 | A0 02 00 00 5C 07 E8 D0 66 1D B0 4F 07 59 BA 01
|
||||
0020 | 12 AF 0F 39 23 A2 49 6C 48 E1 4C F6 49 34 95 00
|
||||
0030 | BF 9F 7D B9 A9 72 79 46 FE 50 02 00 69 69 7F CB
|
||||
0040 | CC F9 EB 24 42 5B 5B 30 76 04 D9 6A A6 49 F1 92
|
||||
0050 | C6 1A B1 DB 31 31 3D 71 E4 A4 C5 BC 86 A4 FC 06
|
||||
0060 | 84 5E A4 BF 7D F4 58 B5 B5 2B BF 5F 1B 3D 4F 21
|
||||
0070 | 25 41 01 F6 62 20 D3 4B 40 15 36 EF 73 E9 10 FB
|
||||
0080 | 2A D4 50 EE 2A B1 93 98 24 60 8E C6 3E 4F 28 A1
|
||||
0090 | 7C BD CD CA AE F3 56 7B DF 42 AB 18 5E 99 9D 04
|
||||
00A0 | 85 FC 58 5E 9F CA BB 5E B0 B5 BB CB F0 2F E2 D1
|
||||
00B0 | D2 E3 9E 7B 81 9A E0 C6 3E B2 2A 96 67 B7 4E B5
|
||||
00C0 | 5E BB 53 A6 9D 62 AB 13 C6 53 39 CA 0D 97 38 92
|
||||
00D0 | 8D D6 73 31 2B E3 63 2B 54 2D 81 DB 45 6D BB 2C
|
||||
00E0 | 3D 9C 51 6B E0 27 0C A0 00 52 42 C2 67 2D 71 FC
|
||||
00F0 | 6F C0 00 67 9C 3E 9D 4B 00 C7 12 23 F5 FA 27 97
|
||||
0100 | E2 D4 2A FE 73 95 EB 21 2B AA 8B 4F 2F 72 B1 74
|
||||
0110 | 73 94 0B 06 69 AF 93 26 4B 5D 84 D5 C6 FD 92 82
|
||||
0120 | 5B 7C 2D A6 5B 13 D8 91 1C E3 4A 2D BD 0B 97 74
|
||||
0130 | 50 A9 35 A5 5A D6 A9 40 11 8A EF 5B A2 87 2C 0C
|
||||
0140 | 70 33 FA CC 9B 53 AC 27 D7 F5 4B 8C 2F FD 43 F9
|
||||
0150 | DF 45 D2 4C A7 10 70 77 3E A0 91 EB 8A A6 99 01
|
||||
0160 | 19 94 C7 29 69 F1 10 0F 3C 49 5E 91 B6 67 5C 2B
|
||||
0170 | 08 0D 6F 05 1C 3E 11 60 77 A1 00 57 53 47 5D 8C
|
||||
0180 | EC B7 E8 3B 9C 7B BD 23 2F 14 7D 55 A1 33 6B 65
|
||||
0190 | 45 CF 9A 0D FF 6C F7 00 B7 65 67 6B 75 D9 EF 53
|
||||
01A0 | 5B 98 39 49 52 1F 76 3E 8D DD FC 29 EC ED D0 A9
|
||||
01B0 | 65 DC B3 A7 11 A4 95 CA 88 22 9F 51 3B 70 F2 DF
|
||||
01C0 | 36 55 D6 6F 39 1F F6 95 09 B1 D7 78 7B 21 36 BB
|
||||
01D0 | C8 84 46 50 09 DA 7D B2 62 EB E4 9F C3 8E 16 75
|
||||
01E0 | CF EF 0E A6 15 18 ED 42 9A 99 D7 7A B0 00 F7 42
|
||||
01F0 | AA 53 E3 78 2F 03 DC FF 15 19 02 B1 A8 75 05 1C
|
||||
0200 | 2C 90 12 7D 57 78 8D 96 35 53 1C A3 11 54 C9 8D
|
||||
0210 | 84 02 E0 26 05 5C 68 14 6B F7 E1 61 E0 A8 47 EB
|
||||
0220 | 87 5C 3E 90 43 90 0C 1B 50 44 9E 57 07 2F 31 B9
|
||||
0230 | 63 69 22 6A BA 5C 04 B7 E2 19 EC 2B D5 7D E7 4C
|
||||
0240 | B5 49 41 E8 D7 B4 3F 28 49 03 FF 8A 79 35 71 08
|
||||
0250 | D6 BF B4 99 71 CF 77 B7 DF CF D8 4D E7 6E DF 37
|
||||
0260 | 11 AF C2 7E CB EF ED E2 E6 22 A9 C6 64 57 4F 80
|
||||
0270 | 37 BD A9 D1 C4 8A 26 76 D8 FD 3B 64 A7 0D 99 EE
|
||||
0280 | 2F 42 17 54 B3 B1 56 44 6B F3 E5 5B</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 30 DF 16 9D 5A 99 66
|
||||
0010 | 78 02 00 00 5C 07 E8 D0 50 78 49 F0 BB 9C 45 7D
|
||||
0020 | BC E9 A3 22 DE EC 98 B7 4C A9 67 F1 E6 C7 3D 67
|
||||
0030 | 7B 05 7D BF 78 DF F1 D3 FE 50 02 00 7B 41 FC 63
|
||||
0040 | C4 53 22 E6 F7 9E 95 DD F1 5D 5A 51 8D 10 C5 9E
|
||||
0050 | 4A E3 9C EE 98 19 D8 A6 FC E6 12 6B 3C 85 0D 21
|
||||
0060 | 3F F2 49 1E 21 3E EC D9 FC C2 2A 29 A8 13 C4 83
|
||||
0070 | 61 E2 68 CE 88 7B E4 D9 71 81 12 B9 F2 E9 40 39
|
||||
0080 | 6E 24 4D 55 9A 47 71 13 14 8B 81 A4 26 D4 48 AF
|
||||
0090 | 0C 83 7A 56 F4 40 7F 37 57 3F 69 25 B5 3D 30 F2
|
||||
00A0 | BE 53 C6 59 F0 05 74 B1 5C E0 76 36 B9 9E 2F 39
|
||||
00B0 | 9F B6 52 6A 87 37 50 D6 E3 B7 10 EB F0 F5 EA F5
|
||||
00C0 | 37 E9 40 21 EB E2 04 A0 F7 D3 CD F6 B3 3C 0D C5
|
||||
00D0 | 62 5D 61 81 94 5B 42 9A B4 DD 45 F7 6D 98 30 38
|
||||
00E0 | 2D 45 97 C0 4A 18 77 07 66 32 52 DC F9 08 5A 28
|
||||
00F0 | 73 9E C3 67 79 35 AD 98 A3 07 3E A3 C6 60 CE FF
|
||||
0100 | 86 79 B8 09 10 64 71 0C 8D 7D AF 74 3B 3D BD FF
|
||||
0110 | 76 F4 A8 CE E2 AE 11 7C FF 8F 55 CA D2 2C E9 AD
|
||||
0120 | 53 71 05 B0 5A CA 45 49 36 CD 42 F9 40 05 6C AA
|
||||
0130 | 21 37 E0 21 3F A5 4C 5C B6 E4 17 1F 43 8D 0C CF
|
||||
0140 | 00 F8 3E 43 F4 01 BC 9A 14 E2 CE 33 9E E9 40 4F
|
||||
0150 | BA 31 B6 D9 AA A9 48 65 25 B3 DE ED 66 FA 39 D1
|
||||
0160 | EE 0B 20 9C 75 5A E6 84 5C 70 F0 E3 62 DE BA CC
|
||||
0170 | 28 3E F3 30 50 AA D3 EA 9C 07 3B 68 7E 99 7B 56
|
||||
0180 | 51 D5 78 51 43 51 67 5C B4 BE 5B DC 00 42 72 F0
|
||||
0190 | A9 3C 79 C0 71 4C 1D DE 08 96 F4 C7 3E A1 C0 6E
|
||||
01A0 | 3E B3 60 56 87 68 B5 71 5A E0 CB B0 01 14 E3 15
|
||||
01B0 | 22 98 37 C9 7B 4E 4C 05 E5 18 8F D1 60 D6 68 60
|
||||
01C0 | 8B F8 E8 0F B2 E4 28 5B ED 78 3C 2C C7 B9 B0 6F
|
||||
01D0 | 97 FF 5F CA F8 35 C1 9E A7 DE 22 70 B8 50 7A E8
|
||||
01E0 | B6 7C 08 82 F8 D7 F2 25 AE D8 FB 26 BD 8A 2F 84
|
||||
01F0 | 87 CC 30 94 48 44 A2 33 A8 62 BF AD 75 69 D7 06
|
||||
0200 | 2E 10 6A 2C 16 E4 6D D1 AE 00 A4 AD B9 F9 5D 08
|
||||
0210 | 05 9D 4A 36 FF 72 E0 0B 9F 14 35 66 67 02 34 19
|
||||
0220 | CC 94 EF 62 FE F6 7A 62 DB 63 28 70 A2 F7 DB DB
|
||||
0230 | 94 DA 7E DB 7B 50 49 73 09 B6 4F 8C 45 C8 29 BE
|
||||
0240 | D3 89 DC 15 75 1C 5B 74 F5 74 4A F4 03 7E 2C 86
|
||||
0250 | 45 74 92 7A C2 E8 26 C2 20 10 5F A5 4B B5 3B 8E
|
||||
0260 | 09 8D 27 00 65 7F 87 E4 AE AD 2D 28 E1 02 7E 2C
|
||||
0270 | 55 BA 96 D5 8C 99 08 E4 7E F8 C6 CF 88 07 AF B9
|
||||
0280 | 48 A4 A9 3E EC 83 D6 2B D5 A6 4C E5</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 = 31BFA2AA3B357FDD3EF1EA929237378B200028E8B0FDC23E2EF673A30
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01B44BB07A5A9966</code></td>
|
||||
<td><code>0130DF169D5A9966</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>A0020000</code> (672 in decimal)</td>
|
||||
<td><code>78020000</code> (632 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = 31BFA2AA3B357FDD3EF1EA929237378B200028E8B0FDC23E2EF673A30
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>661DB04F0759BA0112AF0F3923A2496C</code></td>
|
||||
<td><code>507849F0BB9C457DBCE9A322DEEC98B7</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>48E14CF649349500BF9F7DB9A9727946</code></td>
|
||||
<td><code>4CA967F1E6C73D677B057DBF78DFF1D3</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE50020069697FCBCCF9EB24425B5B30</code> <code>7604D96AA649F192C61AB1DB31313D71</code> <code>E4A4C5BC86A4FC06845EA4BF7DF458B5</code> <code>B52BBF5F1B3D4F21254101F66220D34B</code> <code>401536EF73E910FB2AD450EE2AB19398</code> <code>24608EC63E4F28A17CBDCDCAAEF3567B</code> <code>DF42AB185E999D0485FC585E9FCABB5E</code> <code>B0B5BBCBF02FE2D1D2E39E7B819AE0C6</code> <code>3EB22A9667B74EB55EBB53A69D62AB13</code> <code>C65339CA0D9738928DD673312BE3632B</code> <code>542D81DB456DBB2C3D9C516BE0270CA0</code> <code>005242C2672D71FC6FC000679C3E9D4B</code> <code>00C71223F5FA2797E2D42AFE7395EB21</code> <code>2BAA8B4F2F72B17473940B0669AF9326</code> <code>4B5D84D5C6FD92825B7C2DA65B13D891</code> <code>1CE34A2DBD0B977450A935A55AD6A940</code> <code>118AEF5BA2872C0C7033FACC9B53AC27</code> <code>D7F54B8C2FFD43F9DF45D24CA7107077</code> <code>3EA091EB8AA699011994C72969F1100F</code> <code>3C495E91B6675C2B080D6F051C3E1160</code> <code>77A1005753475D8CECB7E83B9C7BBD23</code> <code>2F147D55A1336B6545CF9A0DFF6CF700</code> <code>B765676B75D9EF535B983949521F763E</code> <code>8DDDFC29ECEDD0A965DCB3A711A495CA</code> <code>88229F513B70F2DF3655D66F391FF695</code> <code>09B1D7787B2136BBC884465009DA7DB2</code> <code>62EBE49FC38E1675CFEF0EA61518ED42</code> <code>9A99D77AB000F742AA53E3782F03DCFF</code> <code>151902B1A875051C2C90127D57788D96</code> <code>35531CA31154C98D8402E026055C6814</code> <code>6BF7E161E0A847EB875C3E9043900C1B</code> <code>50449E57072F31B96369226ABA5C04B7</code> <code>E219EC2BD57DE74CB54941E8D7B43F28</code> <code>4903FF8A79357108D6BFB49971CF77B7</code> <code>DFCFD84DE76EDF3711AFC27ECBEFEDE2</code> <code>E622A9C664574F8037BDA9D1C48A2676</code> <code>D8FD3B64A70D99EE2F421754B3B15644</code><br> <code>6BF3E55B</code></td>
|
||||
<td><code>FE5002007B41FC63C45322E6F79E95DD</code> <code>F15D5A518D10C59E4AE39CEE9819D8A6</code> <code>FCE6126B3C850D213FF2491E213EECD9</code> <code>FCC22A29A813C48361E268CE887BE4D9</code> <code>718112B9F2E940396E244D559A477113</code> <code>148B81A426D448AF0C837A56F4407F37</code> <code>573F6925B53D30F2BE53C659F00574B1</code> <code>5CE07636B99E2F399FB6526A873750D6</code> <code>E3B710EBF0F5EAF537E94021EBE204A0</code> <code>F7D3CDF6B33C0DC5625D6181945B429A</code> <code>B4DD45F76D9830382D4597C04A187707</code> <code>663252DCF9085A28739EC3677935AD98</code> <code>A3073EA3C660CEFF8679B8091064710C</code> <code>8D7DAF743B3DBDFF76F4A8CEE2AE117C</code> <code>FF8F55CAD22CE9AD537105B05ACA4549</code> <code>36CD42F940056CAA2137E0213FA54C5C</code> <code>B6E4171F438D0CCF00F83E43F401BC9A</code> <code>14E2CE339EE9404FBA31B6D9AAA94865</code> <code>25B3DEED66FA39D1EE0B209C755AE684</code> <code>5C70F0E362DEBACC283EF33050AAD3EA</code> <code>9C073B687E997B5651D578514351675C</code> <code>B4BE5BDC004272F0A93C79C0714C1DDE</code> <code>0896F4C73EA1C06E3EB360568768B571</code> <code>5AE0CBB00114E315229837C97B4E4C05</code> <code>E5188FD160D668608BF8E80FB2E4285B</code> <code>ED783C2CC7B9B06F97FF5FCAF835C19E</code> <code>A7DE2270B8507AE8B67C0882F8D7F225</code> <code>AED8FB26BD8A2F8487CC30944844A233</code> <code>A862BFAD7569D7062E106A2C16E46DD1</code> <code>AE00A4ADB9F95D08059D4A36FF72E00B</code> <code>9F14356667023419CC94EF62FEF67A62</code> <code>DB632870A2F7DBDB94DA7EDB7B504973</code> <code>09B64F8C45C829BED389DC15751C5B74</code> <code>F5744AF4037E2C864574927AC2E826C2</code> <code>20105FA54BB53B8E098D2700657F87E4</code> <code>AEAD2D28E1027E2C55BA96D58C9908E4</code> <code>7EF8C6CF8807AFB948A4A93EEC83D62B</code><br> <code>D5A64CE5</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = 31BFA2AA3B357FDD3EF1EA929237378B200028E8B0FDC23E2EF673A30
|
|||
<!-- 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 = 69697FCBCCF9EB24425B5B307604D96AA649F192C61AB1DB31313D71E4A4C5BC86A4FC06845EA4BF7DF458B5B52BBF5F1B3D4F21254101F66220D34B401536EF73E910FB2AD450EE2AB1939824608EC63E4F28A17CBDCDCAAEF3567BDF42AB185E999D0485FC585E9FCABB5EB0B5BBCBF02FE2D1D2E39E7B819AE0C63EB22A9667B74EB55EBB53A69D62AB13C65339CA0D9738928DD673312BE3632B542D81DB456DBB2C3D9C516BE0270CA0005242C2672D71FC6FC000679C3E9D4B00C71223F5FA2797E2D42AFE7395EB212BAA8B4F2F72B17473940B0669AF93264B5D84D5C6FD92825B7C2DA65B13D8911CE34A2DBD0B977450A935A55AD6A940118AEF5BA2872C0C7033FACC9B53AC27D7F54B8C2FFD43F9DF45D24CA71070773EA091EB8AA699011994C72969F1100F3C495E91B6675C2B080D6F051C3E116077A1005753475D8CECB7E83B9C7BBD232F147D55A1336B6545CF9A0DFF6CF700B765676B75D9EF535B983949521F763E8DDDFC29ECEDD0A965DCB3A711A495CA88229F513B70F2DF3655D66F391FF69509B1D7787B2136BBC884465009DA7DB262EBE49FC38E1675CFEF0EA61518ED429A99D77AB000F742AA53E3782F03DCFF151902B1A875051C2C90127D57788D9635531CA31154C98D8402E026055C68146BF7E161E0A847EB875C3E9043900C1B50449E57072F31B96369226ABA5C04B7E219EC2BD57DE74CB54941E8D7B43F284903FF8A79357108D6BFB49971CF77B7DFCFD84DE76EDF3711AFC27ECBEFEDE2E622A9C664574F8037BDA9D1C48A2676D8FD3B64A70D99EE2F421754B3B156446BF3E55B
|
||||
tmp_aes_key = C0AE07F359E603AE019348325A3FE140E375F720C5C6D2C10AEB06CA0E4D9D57
|
||||
tmp_aes_iv = 451C92CCB113C91BD2488002975E2504B0186EE1450111840D5906603E94B4C7</code></pre>
|
||||
<pre><code>encrypted_answer = 7B41FC63C45322E6F79E95DDF15D5A518D10C59E4AE39CEE9819D8A6FCE6126B3C850D213FF2491E213EECD9FCC22A29A813C48361E268CE887BE4D9718112B9F2E940396E244D559A477113148B81A426D448AF0C837A56F4407F37573F6925B53D30F2BE53C659F00574B15CE07636B99E2F399FB6526A873750D6E3B710EBF0F5EAF537E94021EBE204A0F7D3CDF6B33C0DC5625D6181945B429AB4DD45F76D9830382D4597C04A187707663252DCF9085A28739EC3677935AD98A3073EA3C660CEFF8679B8091064710C8D7DAF743B3DBDFF76F4A8CEE2AE117CFF8F55CAD22CE9AD537105B05ACA454936CD42F940056CAA2137E0213FA54C5CB6E4171F438D0CCF00F83E43F401BC9A14E2CE339EE9404FBA31B6D9AAA9486525B3DEED66FA39D1EE0B209C755AE6845C70F0E362DEBACC283EF33050AAD3EA9C073B687E997B5651D578514351675CB4BE5BDC004272F0A93C79C0714C1DDE0896F4C73EA1C06E3EB360568768B5715AE0CBB00114E315229837C97B4E4C05E5188FD160D668608BF8E80FB2E4285BED783C2CC7B9B06F97FF5FCAF835C19EA7DE2270B8507AE8B67C0882F8D7F225AED8FB26BD8A2F8487CC30944844A233A862BFAD7569D7062E106A2C16E46DD1AE00A4ADB9F95D08059D4A36FF72E00B9F14356667023419CC94EF62FEF67A62DB632870A2F7DBDB94DA7EDB7B50497309B64F8C45C829BED389DC15751C5B74F5744AF4037E2C864574927AC2E826C220105FA54BB53B8E098D2700657F87E4AEAD2D28E1027E2C55BA96D58C9908E47EF8C6CF8807AFB948A4A93EEC83D62BD5A64CE5
|
||||
tmp_aes_key = 34C318401DAA7296D030099E9F57F7F8B03B16925E13FB160FCDC365745A8D19
|
||||
tmp_aes_iv = 1501B913132C168D87A718F7BF4CF8BE1316F8A7D29B327F2A677C8B4CE54E26</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = 288147F1BCF11685D3569711433F906477CA224EBA0D89B5661DB04F0759BA0112AF0F3923A2496C48E14CF649349500BF9F7DB9A972794603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001000E1D6A0D29F32896B87BE1029282AD002A22DE92A01C8DDF79911C5B2463F322B23905813FAED87A96162ABA0D7A7D8CE5F46BB5B99FB16932F2558AEE499B8B66C0C8176583139D279BEBBFF40238DC124D4380E060EDEB449D5C7C04A975EA334B26B0E5871A89F0FEC564F42CFD6159AEE5FAE5FFC9147495F69E0EBE6E70E290E73B1FEDFBA9AA91BA354A97454C999D2F43ADF058DDC87756C9CD2CE06D225AF0D362295B40126358A6BBD8B83BA7F4A8D312B81FAF0D035E93E0CEA19BCD82AEBD527EBD993D964DEE9295039968E7C22CC922B89803AB79E8F2672C3AA1F35817CB301A270E783359317F244641901CF9AEA5854D10DC5E74146D2C9C7A5A99668465683E46BBA9BA
|
||||
answer = BA0D89B5661DB04F0759BA0112AF0F3923A2496C48E14CF649349500BF9F7DB9A972794603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001000E1D6A0D29F32896B87BE1029282AD002A22DE92A01C8DDF79911C5B2463F322B23905813FAED87A96162ABA0D7A7D8CE5F46BB5B99FB16932F2558AEE499B8B66C0C8176583139D279BEBBFF40238DC124D4380E060EDEB449D5C7C04A975EA334B26B0E5871A89F0FEC564F42CFD6159AEE5FAE5FFC9147495F69E0EBE6E70E290E73B1FEDFBA9AA91BA354A97454C999D2F43ADF058DDC87756C9CD2CE06D225AF0D362295B40126358A6BBD8B83BA7F4A8D312B81FAF0D035E93E0CEA19BCD82AEBD527EBD993D964DEE9295039968E7C22CC922B89803AB79E8F2672C3AA1F35817CB301A270E783359317F244641901CF9AEA5854D10DC5E74146D2C9C7A5A99668465683E46BBA9BA</code></pre>
|
||||
<pre><code>answer_with_hash = 5988D46C5741CE243FDF9797FCC92D0812929AD6BA0D89B5507849F0BB9C457DBCE9A322DEEC98B74CA967F1E6C73D677B057DBF78DFF1D303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100740EB2D446DB0C8B918F656DFA9088CD79537C4805011180956C8E56046939A3343169511F5D96DEF10124A2C60AD1841B1A967702F0EF82CC9F03182E473F7E0FEE85441F9E9EEDA84FAF189F70ADDBF543E56FDFB8A42ED6662570B47EECB35E68BD88FAF0AFF1EC8A882B67CA7EE2C2DCE5D6E1AD3AEC2C6D6A7E48C05F93920675C8D155F73F0DC938BDA535B83B67284862991F8F383E797D15C3E69FBA83A25400994C44B28057E93745B4A6E333553D34C3D2268EDBD5F767D13F7E9830292213B7CD83AF7184476E7571CD4C48B1CF81C7114EE4604AA031941F72D6D428280FBC8C235D0E548C82110ADB6E605461809E94ACA098A42ED1F4E9E6079D5A99667510C2D577FE81E7
|
||||
answer = BA0D89B5507849F0BB9C457DBCE9A322DEEC98B74CA967F1E6C73D677B057DBF78DFF1D303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100740EB2D446DB0C8B918F656DFA9088CD79537C4805011180956C8E56046939A3343169511F5D96DEF10124A2C60AD1841B1A967702F0EF82CC9F03182E473F7E0FEE85441F9E9EEDA84FAF189F70ADDBF543E56FDFB8A42ED6662570B47EECB35E68BD88FAF0AFF1EC8A882B67CA7EE2C2DCE5D6E1AD3AEC2C6D6A7E48C05F93920675C8D155F73F0DC938BDA535B83B67284862991F8F383E797D15C3E69FBA83A25400994C44B28057E93745B4A6E333553D34C3D2268EDBD5F767D13F7E9830292213B7CD83AF7184476E7571CD4C48B1CF81C7114EE4604AA031941F72D6D428280FBC8C235D0E548C82110ADB6E605461809E94ACA098A42ED1F4E9E6079D5A99667510C2D577FE81E7</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 66 1D B0 4F 07 59 BA 01 12 AF 0F 39
|
||||
0010 | 23 A2 49 6C 48 E1 4C F6 49 34 95 00 BF 9F 7D B9
|
||||
0020 | A9 72 79 46 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 50 78 49 F0 BB 9C 45 7D BC E9 A3 22
|
||||
0010 | DE EC 98 B7 4C A9 67 F1 E6 C7 3D 67 7B 05 7D BF
|
||||
0020 | 78 DF F1 D3 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 = BA0D89B5661DB04F0759BA0112AF0F3923A2496C48E14CF649349500BF9F7DB9A972794
|
|||
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 | 0E 1D 6A 0D 29 F3 28 96 B8 7B E1 02 92 82 AD 00
|
||||
0140 | 2A 22 DE 92 A0 1C 8D DF 79 91 1C 5B 24 63 F3 22
|
||||
0150 | B2 39 05 81 3F AE D8 7A 96 16 2A BA 0D 7A 7D 8C
|
||||
0160 | E5 F4 6B B5 B9 9F B1 69 32 F2 55 8A EE 49 9B 8B
|
||||
0170 | 66 C0 C8 17 65 83 13 9D 27 9B EB BF F4 02 38 DC
|
||||
0180 | 12 4D 43 80 E0 60 ED EB 44 9D 5C 7C 04 A9 75 EA
|
||||
0190 | 33 4B 26 B0 E5 87 1A 89 F0 FE C5 64 F4 2C FD 61
|
||||
01A0 | 59 AE E5 FA E5 FF C9 14 74 95 F6 9E 0E BE 6E 70
|
||||
01B0 | E2 90 E7 3B 1F ED FB A9 AA 91 BA 35 4A 97 45 4C
|
||||
01C0 | 99 9D 2F 43 AD F0 58 DD C8 77 56 C9 CD 2C E0 6D
|
||||
01D0 | 22 5A F0 D3 62 29 5B 40 12 63 58 A6 BB D8 B8 3B
|
||||
01E0 | A7 F4 A8 D3 12 B8 1F AF 0D 03 5E 93 E0 CE A1 9B
|
||||
01F0 | CD 82 AE BD 52 7E BD 99 3D 96 4D EE 92 95 03 99
|
||||
0200 | 68 E7 C2 2C C9 22 B8 98 03 AB 79 E8 F2 67 2C 3A
|
||||
0210 | A1 F3 58 17 CB 30 1A 27 0E 78 33 59 31 7F 24 46
|
||||
0220 | 41 90 1C F9 AE A5 85 4D 10 DC 5E 74 14 6D 2C 9C
|
||||
0230 | 7A 5A 99 66</code></pre>
|
||||
0130 | 74 0E B2 D4 46 DB 0C 8B 91 8F 65 6D FA 90 88 CD
|
||||
0140 | 79 53 7C 48 05 01 11 80 95 6C 8E 56 04 69 39 A3
|
||||
0150 | 34 31 69 51 1F 5D 96 DE F1 01 24 A2 C6 0A D1 84
|
||||
0160 | 1B 1A 96 77 02 F0 EF 82 CC 9F 03 18 2E 47 3F 7E
|
||||
0170 | 0F EE 85 44 1F 9E 9E ED A8 4F AF 18 9F 70 AD DB
|
||||
0180 | F5 43 E5 6F DF B8 A4 2E D6 66 25 70 B4 7E EC B3
|
||||
0190 | 5E 68 BD 88 FA F0 AF F1 EC 8A 88 2B 67 CA 7E E2
|
||||
01A0 | C2 DC E5 D6 E1 AD 3A EC 2C 6D 6A 7E 48 C0 5F 93
|
||||
01B0 | 92 06 75 C8 D1 55 F7 3F 0D C9 38 BD A5 35 B8 3B
|
||||
01C0 | 67 28 48 62 99 1F 8F 38 3E 79 7D 15 C3 E6 9F BA
|
||||
01D0 | 83 A2 54 00 99 4C 44 B2 80 57 E9 37 45 B4 A6 E3
|
||||
01E0 | 33 55 3D 34 C3 D2 26 8E DB D5 F7 67 D1 3F 7E 98
|
||||
01F0 | 30 29 22 13 B7 CD 83 AF 71 84 47 6E 75 71 CD 4C
|
||||
0200 | 48 B1 CF 81 C7 11 4E E4 60 4A A0 31 94 1F 72 D6
|
||||
0210 | D4 28 28 0F BC 8C 23 5D 0E 54 8C 82 11 0A DB 6E
|
||||
0220 | 60 54 61 80 9E 94 AC A0 98 A4 2E D1 F4 E9 E6 07
|
||||
0230 | 9D 5A 99 66</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -570,13 +570,13 @@ answer = BA0D89B5661DB04F0759BA0112AF0F3923A2496C48E14CF649349500BF9F7DB9A972794
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>661DB04F0759BA0112AF0F3923A2496C</code></td>
|
||||
<td><code>507849F0BB9C457DBCE9A322DEEC98B7</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>48E14CF649349500BF9F7DB9A9727946</code></td>
|
||||
<td><code>4CA967F1E6C73D677B057DBF78DFF1D3</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B5661DB04F0759BA0112AF0F3923A2496C48E14CF649349500BF9F7DB9A972794
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE0001000E1D6A0D29F32896B87BE102</code> <code>9282AD002A22DE92A01C8DDF79911C5B</code> <code>2463F322B23905813FAED87A96162ABA</code> <code>0D7A7D8CE5F46BB5B99FB16932F2558A</code> <code>EE499B8B66C0C8176583139D279BEBBF</code> <code>F40238DC124D4380E060EDEB449D5C7C</code> <code>04A975EA334B26B0E5871A89F0FEC564</code> <code>F42CFD6159AEE5FAE5FFC9147495F69E</code> <code>0EBE6E70E290E73B1FEDFBA9AA91BA35</code> <code>4A97454C999D2F43ADF058DDC87756C9</code> <code>CD2CE06D225AF0D362295B40126358A6</code> <code>BBD8B83BA7F4A8D312B81FAF0D035E93</code> <code>E0CEA19BCD82AEBD527EBD993D964DEE</code> <code>9295039968E7C22CC922B89803AB79E8</code> <code>F2672C3AA1F35817CB301A270E783359</code> <code>317F244641901CF9AEA5854D10DC5E74</code><br> <code>146D2C9C</code></td>
|
||||
<td><code>FE000100740EB2D446DB0C8B918F656D</code> <code>FA9088CD79537C4805011180956C8E56</code> <code>046939A3343169511F5D96DEF10124A2</code> <code>C60AD1841B1A967702F0EF82CC9F0318</code> <code>2E473F7E0FEE85441F9E9EEDA84FAF18</code> <code>9F70ADDBF543E56FDFB8A42ED6662570</code> <code>B47EECB35E68BD88FAF0AFF1EC8A882B</code> <code>67CA7EE2C2DCE5D6E1AD3AEC2C6D6A7E</code> <code>48C05F93920675C8D155F73F0DC938BD</code> <code>A535B83B67284862991F8F383E797D15</code> <code>C3E69FBA83A25400994C44B28057E937</code> <code>45B4A6E333553D34C3D2268EDBD5F767</code> <code>D13F7E9830292213B7CD83AF7184476E</code> <code>7571CD4C48B1CF81C7114EE4604AA031</code> <code>941F72D6D428280FBC8C235D0E548C82</code> <code>110ADB6E605461809E94ACA098A42ED1</code><br> <code>F4E9E607</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>7A5A9966</code> (1721326202 in decimal)</td>
|
||||
<td><code>9D5A9966</code> (1721326237 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B5661DB04F0759BA0112AF0F3923A2496C48E14CF649349500BF9F7DB9A972794
|
|||
<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 = 7F05A4B15B741C1834C735E6B52AB5443DED56A3D19D706672BA26E7F73A50FC735AF8E1DA3DD8274C2C690B667C38B5E202DBE5DF792E81D2D2931C41ADECECA65DE1621485E91FA42E57D3E97D421488EACEC1EE30B23F00EB65F6A582DA051CC9CD9A842171E471BD8528147D03251E24664667CCEE3B8041DDBA989F301CAAB532654263175053D75BF90551B82F3D8FDADE12628F54B79B171E50417B5F334F66394C8A252961C69004851E49933DF6D46D82CC1DD0F9A3E0F7CEEC8219729EEB7A4BC5F333989D1C60D4498E2C73C98B640555C09A376BC94B70FFAE8EC00E131E1D598A6999386E4EAFB22A5EC1D0B9349D8C365C559669A4C559AC0E</code></pre>
|
||||
<pre><code>b = 85A6515BC71C9F21D4D92EFACBF3187555F69890CFFB924A8EC9FE9EB43A6BAE52A5F0D44ADA55935222DEE1B69FFA07806EF6789A6200211E2BF147FDB4FED89F1C6DDADD9ED9388E9881445EFEE7739C7B5577BB058AB556179AAF9795B06995BB25AC8A82D14A7752B82D33F609878CDFB85677C449E5809EB2F494C9157E941AC4CE165DBCC64E89EBC24F8D4CDB28A7E0A901F0448682CC067E54C0273AC5643005C99FCCD1BC9F32777150C3E749373A7C7832DF3E5C767C8B147AF7C46AC99C2F1667443C7F4327E00A0C94925F1BB6626878DD8BBFA4DE613FD8A16D910DFA2F99A3A6A086F238CFB862B22843BFE8AB973602F66728CC554BB631A0</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 = 830BF0AF2872BCAC62E7F6841937C7A2135D5988388BE5009309EA76974A290AFE797EC420AC562B972A1ECB110C8A475352C8EC1ADD022BE5612E9405541E2EED8FDF1296BB9EB31E8ADCBB81413D61D6CD8308D97D73718289BBFFBEE77305D3B8675FEF2676F003A71A0B112EB5776521DF16AC27025C73DBA12F1E91E713C650C9F905181E549BB1551BDAA84F2051D079FED5D81CEAA1DCA4A34DAF6E5D1477C4A88B727C1780C918AA5172A92EE417500D568DF1F00CF16223713C5F72FE7A9C534AD83AD331B6468A97030CAA344310C955128F950055FB7A10434F1ED310BD9422236595467B50A6B3E5DA33A1F2E859C2273657739CA8CCE70C3C1C</code></pre>
|
||||
<pre><code>g_b = A218EDB5E0B4A672DA510DB70D51543BFB4336937F7F3A93E4A33DF7D9F83CAF1AA60FB951B4CD007D6A1AF83E29373EE6BE98A783624047847B22E59EBC320E9EBFDEF2348EE6EE2819231381AA1E2A3E6C513CFB26629AE5B6E36ED9865CC4F1D5210F2D84E1958DFD16CF08778C503BBA7D4429F092C2F56DAFDF6F49D5A3DEE7E0B1112E793E0BD24EB9CFFD50238000161F56765C24A4D3CB9ECD3A1D1094949020EC96043F42E1053B94796F2DD09C6A228D626433E5CC8771A04328D10B43A4BA6FB8EFE0C5736440A31E2ED56DB8FEF7237F444E04D4DDA8BD50392B9E7F42E57C01D9923AB57E10BE2BBB85F43597AC41D6D6C235DC1F92193EAD62</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 66 1D B0 4F 07 59 BA 01 12 AF 0F 39
|
||||
0010 | 23 A2 49 6C 48 E1 4C F6 49 34 95 00 BF 9F 7D B9
|
||||
0020 | A9 72 79 46 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 83 0B F0 AF 28 72 BC AC 62 E7 F6 84 19 37 C7 A2
|
||||
0040 | 13 5D 59 88 38 8B E5 00 93 09 EA 76 97 4A 29 0A
|
||||
0050 | FE 79 7E C4 20 AC 56 2B 97 2A 1E CB 11 0C 8A 47
|
||||
0060 | 53 52 C8 EC 1A DD 02 2B E5 61 2E 94 05 54 1E 2E
|
||||
0070 | ED 8F DF 12 96 BB 9E B3 1E 8A DC BB 81 41 3D 61
|
||||
0080 | D6 CD 83 08 D9 7D 73 71 82 89 BB FF BE E7 73 05
|
||||
0090 | D3 B8 67 5F EF 26 76 F0 03 A7 1A 0B 11 2E B5 77
|
||||
00A0 | 65 21 DF 16 AC 27 02 5C 73 DB A1 2F 1E 91 E7 13
|
||||
00B0 | C6 50 C9 F9 05 18 1E 54 9B B1 55 1B DA A8 4F 20
|
||||
00C0 | 51 D0 79 FE D5 D8 1C EA A1 DC A4 A3 4D AF 6E 5D
|
||||
00D0 | 14 77 C4 A8 8B 72 7C 17 80 C9 18 AA 51 72 A9 2E
|
||||
00E0 | E4 17 50 0D 56 8D F1 F0 0C F1 62 23 71 3C 5F 72
|
||||
00F0 | FE 7A 9C 53 4A D8 3A D3 31 B6 46 8A 97 03 0C AA
|
||||
0100 | 34 43 10 C9 55 12 8F 95 00 55 FB 7A 10 43 4F 1E
|
||||
0110 | D3 10 BD 94 22 23 65 95 46 7B 50 A6 B3 E5 DA 33
|
||||
0120 | A1 F2 E8 59 C2 27 36 57 73 9C A8 CC E7 0C 3C 1C</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 50 78 49 F0 BB 9C 45 7D BC E9 A3 22
|
||||
0010 | DE EC 98 B7 4C A9 67 F1 E6 C7 3D 67 7B 05 7D BF
|
||||
0020 | 78 DF F1 D3 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | A2 18 ED B5 E0 B4 A6 72 DA 51 0D B7 0D 51 54 3B
|
||||
0040 | FB 43 36 93 7F 7F 3A 93 E4 A3 3D F7 D9 F8 3C AF
|
||||
0050 | 1A A6 0F B9 51 B4 CD 00 7D 6A 1A F8 3E 29 37 3E
|
||||
0060 | E6 BE 98 A7 83 62 40 47 84 7B 22 E5 9E BC 32 0E
|
||||
0070 | 9E BF DE F2 34 8E E6 EE 28 19 23 13 81 AA 1E 2A
|
||||
0080 | 3E 6C 51 3C FB 26 62 9A E5 B6 E3 6E D9 86 5C C4
|
||||
0090 | F1 D5 21 0F 2D 84 E1 95 8D FD 16 CF 08 77 8C 50
|
||||
00A0 | 3B BA 7D 44 29 F0 92 C2 F5 6D AF DF 6F 49 D5 A3
|
||||
00B0 | DE E7 E0 B1 11 2E 79 3E 0B D2 4E B9 CF FD 50 23
|
||||
00C0 | 80 00 16 1F 56 76 5C 24 A4 D3 CB 9E CD 3A 1D 10
|
||||
00D0 | 94 94 90 20 EC 96 04 3F 42 E1 05 3B 94 79 6F 2D
|
||||
00E0 | D0 9C 6A 22 8D 62 64 33 E5 CC 87 71 A0 43 28 D1
|
||||
00F0 | 0B 43 A4 BA 6F B8 EF E0 C5 73 64 40 A3 1E 2E D5
|
||||
0100 | 6D B8 FE F7 23 7F 44 4E 04 D4 DD A8 BD 50 39 2B
|
||||
0110 | 9E 7F 42 E5 7C 01 D9 92 3A B5 7E 10 BE 2B BB 85
|
||||
0120 | F4 35 97 AC 41 D6 D6 C2 35 DC 1F 92 19 3E AD 62</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 = BA0D89B5661DB04F0759BA0112AF0F3923A2496C48E14CF649349500BF9F7DB9A972794
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>661DB04F0759BA0112AF0F3923A2496C</code></td>
|
||||
<td><code>507849F0BB9C457DBCE9A322DEEC98B7</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>48E14CF649349500BF9F7DB9A9727946</code></td>
|
||||
<td><code>4CA967F1E6C73D677B057DBF78DFF1D3</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE000100830BF0AF2872BCAC62E7F684</code> <code>1937C7A2135D5988388BE5009309EA76</code> <code>974A290AFE797EC420AC562B972A1ECB</code> <code>110C8A475352C8EC1ADD022BE5612E94</code> <code>05541E2EED8FDF1296BB9EB31E8ADCBB</code> <code>81413D61D6CD8308D97D73718289BBFF</code> <code>BEE77305D3B8675FEF2676F003A71A0B</code> <code>112EB5776521DF16AC27025C73DBA12F</code> <code>1E91E713C650C9F905181E549BB1551B</code> <code>DAA84F2051D079FED5D81CEAA1DCA4A3</code> <code>4DAF6E5D1477C4A88B727C1780C918AA</code> <code>5172A92EE417500D568DF1F00CF16223</code> <code>713C5F72FE7A9C534AD83AD331B6468A</code> <code>97030CAA344310C955128F950055FB7A</code> <code>10434F1ED310BD9422236595467B50A6</code> <code>B3E5DA33A1F2E859C2273657739CA8CC</code><br> <code>E70C3C1C</code></td>
|
||||
<td><code>FE000100A218EDB5E0B4A672DA510DB7</code> <code>0D51543BFB4336937F7F3A93E4A33DF7</code> <code>D9F83CAF1AA60FB951B4CD007D6A1AF8</code> <code>3E29373EE6BE98A783624047847B22E5</code> <code>9EBC320E9EBFDEF2348EE6EE28192313</code> <code>81AA1E2A3E6C513CFB26629AE5B6E36E</code> <code>D9865CC4F1D5210F2D84E1958DFD16CF</code> <code>08778C503BBA7D4429F092C2F56DAFDF</code> <code>6F49D5A3DEE7E0B1112E793E0BD24EB9</code> <code>CFFD50238000161F56765C24A4D3CB9E</code> <code>CD3A1D1094949020EC96043F42E1053B</code> <code>94796F2DD09C6A228D626433E5CC8771</code> <code>A04328D10B43A4BA6FB8EFE0C5736440</code> <code>A31E2ED56DB8FEF7237F444E04D4DDA8</code> <code>BD50392B9E7F42E57C01D9923AB57E10</code> <code>BE2BBB85F43597AC41D6D6C235DC1F92</code><br> <code>193EAD62</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 = BA0D89B5661DB04F0759BA0112AF0F3923A2496C48E14CF649349500BF9F7DB9A972794
|
|||
<!-- 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 = 54B64366661DB04F0759BA0112AF0F3923A2496C48E14CF649349500BF9F7DB9A97279460000000000000000FE000100830BF0AF2872BCAC62E7F6841937C7A2135D5988388BE5009309EA76974A290AFE797EC420AC562B972A1ECB110C8A475352C8EC1ADD022BE5612E9405541E2EED8FDF1296BB9EB31E8ADCBB81413D61D6CD8308D97D73718289BBFFBEE77305D3B8675FEF2676F003A71A0B112EB5776521DF16AC27025C73DBA12F1E91E713C650C9F905181E549BB1551BDAA84F2051D079FED5D81CEAA1DCA4A34DAF6E5D1477C4A88B727C1780C918AA5172A92EE417500D568DF1F00CF16223713C5F72FE7A9C534AD83AD331B6468A97030CAA344310C955128F950055FB7A10434F1ED310BD9422236595467B50A6B3E5DA33A1F2E859C2273657739CA8CCE70C3C1C
|
||||
padding = 0495A2AED26D20B4D93D7617
|
||||
tmp_aes_key = C0AE07F359E603AE019348325A3FE140E375F720C5C6D2C10AEB06CA0E4D9D57
|
||||
tmp_aes_iv = 451C92CCB113C91BD2488002975E2504B0186EE1450111840D5906603E94B4C7</code></pre>
|
||||
<pre><code>data = 54B64366507849F0BB9C457DBCE9A322DEEC98B74CA967F1E6C73D677B057DBF78DFF1D30000000000000000FE000100A218EDB5E0B4A672DA510DB70D51543BFB4336937F7F3A93E4A33DF7D9F83CAF1AA60FB951B4CD007D6A1AF83E29373EE6BE98A783624047847B22E59EBC320E9EBFDEF2348EE6EE2819231381AA1E2A3E6C513CFB26629AE5B6E36ED9865CC4F1D5210F2D84E1958DFD16CF08778C503BBA7D4429F092C2F56DAFDF6F49D5A3DEE7E0B1112E793E0BD24EB9CFFD50238000161F56765C24A4D3CB9ECD3A1D1094949020EC96043F42E1053B94796F2DD09C6A228D626433E5CC8771A04328D10B43A4BA6FB8EFE0C5736440A31E2ED56DB8FEF7237F444E04D4DDA8BD50392B9E7F42E57C01D9923AB57E10BE2BBB85F43597AC41D6D6C235DC1F92193EAD62
|
||||
padding = 1F29A22D47380EE8EC009236
|
||||
tmp_aes_key = 34C318401DAA7296D030099E9F57F7F8B03B16925E13FB160FCDC365745A8D19
|
||||
tmp_aes_iv = 1501B913132C168D87A718F7BF4CF8BE1316F8A7D29B327F2A677C8B4CE54E26</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 = 43C6120427A24C91E43219FA479DBAB2625C8596B1C755CF095E0F6A48D18802E9192F0BB52788450D683F4336F6D6017C75A25EB43AE02F3DE269AB40E31CDFE1C3C026DE3F84B2B27DA4F5DE644E63BF98F6301522090F5F3514F767AFD0445AA94C46479C63466BEAD9E3B11F61A0A288C76F62332A64FB5774C3D0BD5859D23E7CD26F698500FEF7BDCC8C98FC95C4F4184EC603801F2B80C4D43B8701DCF9ECA5ABA1781F8210E6A0D4709E1185C02139620AFA985C416A31EE30D3A7119B3195FB45141920943D04339F624FD05E9240AF4247D8322D90A64F5A4331D735F83521A4A0FCB526D5294AFAF1F5517C278DB6EEACCE0D5CE510324F3F6E6943E17D45C35738E27955B7CAD246326B6E4AFB459FB843459CACEFFEBCA7F9F81E59BB5F06B4EE9FAA96B3588A7BE029DE0C750668DDCAA53D95A23F12A09A376F52F7F7216A4D811728A68DE2E3DB23</code></pre>
|
||||
<pre><code>encrypted_data = 1A2DA766289FE5F8AAA5FC92F3363EB80499B19D5A3F6908C780B6E066484BCC1E822A4C43E0E73A2EE134E10BE74F3217B5C9AA2A52BCA1D4C4629CE88298BCC274575D3C1F4A79D020509BEE26AC3C26CDB95AA96F863C4DF65C5C50C20676CE1AB6294220AEB2B267F824B3CE7B1092BCB21047B2C4DF6ACB47CAE363362E25707FF5D1755ACEE08FE4035414BA8B82948AB7FB34CDB9AEABD7C229A004B9B3ACB624C5F1224B7B357127E9C982554B3408558A30D207BA91A7C80230EF9BE4272935B264F9BC72877CA3A06EDD46807AE0D72B4D129AF13352EC925D7ACAF9126AA12C8AD65A1BAE16AE6D79A899E8E5D6E3FB9A09A8E3AEEE2D180531EDB7082CC3451333F00012611C1330418E1B41EC83822E766886F3CE667E51B697BD15FFF64338F33B9738FB58C0CE553E4BE0FA87505B380D3FBBC1337EECAD6F3C89065E86F659DE8560A6F1436A765C</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 08 E9 06 00 7A 5A 99 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 66 1D B0 4F 07 59 BA 01
|
||||
0020 | 12 AF 0F 39 23 A2 49 6C 48 E1 4C F6 49 34 95 00
|
||||
0030 | BF 9F 7D B9 A9 72 79 46 FE 50 01 00 43 C6 12 04
|
||||
0040 | 27 A2 4C 91 E4 32 19 FA 47 9D BA B2 62 5C 85 96
|
||||
0050 | B1 C7 55 CF 09 5E 0F 6A 48 D1 88 02 E9 19 2F 0B
|
||||
0060 | B5 27 88 45 0D 68 3F 43 36 F6 D6 01 7C 75 A2 5E
|
||||
0070 | B4 3A E0 2F 3D E2 69 AB 40 E3 1C DF E1 C3 C0 26
|
||||
0080 | DE 3F 84 B2 B2 7D A4 F5 DE 64 4E 63 BF 98 F6 30
|
||||
0090 | 15 22 09 0F 5F 35 14 F7 67 AF D0 44 5A A9 4C 46
|
||||
00A0 | 47 9C 63 46 6B EA D9 E3 B1 1F 61 A0 A2 88 C7 6F
|
||||
00B0 | 62 33 2A 64 FB 57 74 C3 D0 BD 58 59 D2 3E 7C D2
|
||||
00C0 | 6F 69 85 00 FE F7 BD CC 8C 98 FC 95 C4 F4 18 4E
|
||||
00D0 | C6 03 80 1F 2B 80 C4 D4 3B 87 01 DC F9 EC A5 AB
|
||||
00E0 | A1 78 1F 82 10 E6 A0 D4 70 9E 11 85 C0 21 39 62
|
||||
00F0 | 0A FA 98 5C 41 6A 31 EE 30 D3 A7 11 9B 31 95 FB
|
||||
0100 | 45 14 19 20 94 3D 04 33 9F 62 4F D0 5E 92 40 AF
|
||||
0110 | 42 47 D8 32 2D 90 A6 4F 5A 43 31 D7 35 F8 35 21
|
||||
0120 | A4 A0 FC B5 26 D5 29 4A FA F1 F5 51 7C 27 8D B6
|
||||
0130 | EE AC CE 0D 5C E5 10 32 4F 3F 6E 69 43 E1 7D 45
|
||||
0140 | C3 57 38 E2 79 55 B7 CA D2 46 32 6B 6E 4A FB 45
|
||||
0150 | 9F B8 43 45 9C AC EF FE BC A7 F9 F8 1E 59 BB 5F
|
||||
0160 | 06 B4 EE 9F AA 96 B3 58 8A 7B E0 29 DE 0C 75 06
|
||||
0170 | 68 DD CA A5 3D 95 A2 3F 12 A0 9A 37 6F 52 F7 F7
|
||||
0180 | 21 6A 4D 81 17 28 A6 8D E2 E3 DB 23</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 D4 99 0A 00 9D 5A 99 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 50 78 49 F0 BB 9C 45 7D
|
||||
0020 | BC E9 A3 22 DE EC 98 B7 4C A9 67 F1 E6 C7 3D 67
|
||||
0030 | 7B 05 7D BF 78 DF F1 D3 FE 50 01 00 1A 2D A7 66
|
||||
0040 | 28 9F E5 F8 AA A5 FC 92 F3 36 3E B8 04 99 B1 9D
|
||||
0050 | 5A 3F 69 08 C7 80 B6 E0 66 48 4B CC 1E 82 2A 4C
|
||||
0060 | 43 E0 E7 3A 2E E1 34 E1 0B E7 4F 32 17 B5 C9 AA
|
||||
0070 | 2A 52 BC A1 D4 C4 62 9C E8 82 98 BC C2 74 57 5D
|
||||
0080 | 3C 1F 4A 79 D0 20 50 9B EE 26 AC 3C 26 CD B9 5A
|
||||
0090 | A9 6F 86 3C 4D F6 5C 5C 50 C2 06 76 CE 1A B6 29
|
||||
00A0 | 42 20 AE B2 B2 67 F8 24 B3 CE 7B 10 92 BC B2 10
|
||||
00B0 | 47 B2 C4 DF 6A CB 47 CA E3 63 36 2E 25 70 7F F5
|
||||
00C0 | D1 75 5A CE E0 8F E4 03 54 14 BA 8B 82 94 8A B7
|
||||
00D0 | FB 34 CD B9 AE AB D7 C2 29 A0 04 B9 B3 AC B6 24
|
||||
00E0 | C5 F1 22 4B 7B 35 71 27 E9 C9 82 55 4B 34 08 55
|
||||
00F0 | 8A 30 D2 07 BA 91 A7 C8 02 30 EF 9B E4 27 29 35
|
||||
0100 | B2 64 F9 BC 72 87 7C A3 A0 6E DD 46 80 7A E0 D7
|
||||
0110 | 2B 4D 12 9A F1 33 52 EC 92 5D 7A CA F9 12 6A A1
|
||||
0120 | 2C 8A D6 5A 1B AE 16 AE 6D 79 A8 99 E8 E5 D6 E3
|
||||
0130 | FB 9A 09 A8 E3 AE EE 2D 18 05 31 ED B7 08 2C C3
|
||||
0140 | 45 13 33 F0 00 12 61 1C 13 30 41 8E 1B 41 EC 83
|
||||
0150 | 82 2E 76 68 86 F3 CE 66 7E 51 B6 97 BD 15 FF F6
|
||||
0160 | 43 38 F3 3B 97 38 FB 58 C0 CE 55 3E 4B E0 FA 87
|
||||
0170 | 50 5B 38 0D 3F BB C1 33 7E EC AD 6F 3C 89 06 5E
|
||||
0180 | 86 F6 59 DE 85 60 A6 F1 43 6A 76 5C</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>08E906007A5A9966</code></td>
|
||||
<td><code>D4990A009D5A9966</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>661DB04F0759BA0112AF0F3923A2496C</code></td>
|
||||
<td><code>507849F0BB9C457DBCE9A322DEEC98B7</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>48E14CF649349500BF9F7DB9A9727946</code></td>
|
||||
<td><code>4CA967F1E6C73D677B057DBF78DFF1D3</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE50010043C6120427A24C91E43219FA</code> <code>479DBAB2625C8596B1C755CF095E0F6A</code> <code>48D18802E9192F0BB52788450D683F43</code> <code>36F6D6017C75A25EB43AE02F3DE269AB</code> <code>40E31CDFE1C3C026DE3F84B2B27DA4F5</code> <code>DE644E63BF98F6301522090F5F3514F7</code> <code>67AFD0445AA94C46479C63466BEAD9E3</code> <code>B11F61A0A288C76F62332A64FB5774C3</code> <code>D0BD5859D23E7CD26F698500FEF7BDCC</code> <code>8C98FC95C4F4184EC603801F2B80C4D4</code> <code>3B8701DCF9ECA5ABA1781F8210E6A0D4</code> <code>709E1185C02139620AFA985C416A31EE</code> <code>30D3A7119B3195FB45141920943D0433</code> <code>9F624FD05E9240AF4247D8322D90A64F</code> <code>5A4331D735F83521A4A0FCB526D5294A</code> <code>FAF1F5517C278DB6EEACCE0D5CE51032</code> <code>4F3F6E6943E17D45C35738E27955B7CA</code> <code>D246326B6E4AFB459FB843459CACEFFE</code> <code>BCA7F9F81E59BB5F06B4EE9FAA96B358</code> <code>8A7BE029DE0C750668DDCAA53D95A23F</code> <code>12A09A376F52F7F7216A4D811728A68D</code><br> <code>E2E3DB23</code></td>
|
||||
<td><code>FE5001001A2DA766289FE5F8AAA5FC92</code> <code>F3363EB80499B19D5A3F6908C780B6E0</code> <code>66484BCC1E822A4C43E0E73A2EE134E1</code> <code>0BE74F3217B5C9AA2A52BCA1D4C4629C</code> <code>E88298BCC274575D3C1F4A79D020509B</code> <code>EE26AC3C26CDB95AA96F863C4DF65C5C</code> <code>50C20676CE1AB6294220AEB2B267F824</code> <code>B3CE7B1092BCB21047B2C4DF6ACB47CA</code> <code>E363362E25707FF5D1755ACEE08FE403</code> <code>5414BA8B82948AB7FB34CDB9AEABD7C2</code> <code>29A004B9B3ACB624C5F1224B7B357127</code> <code>E9C982554B3408558A30D207BA91A7C8</code> <code>0230EF9BE4272935B264F9BC72877CA3</code> <code>A06EDD46807AE0D72B4D129AF13352EC</code> <code>925D7ACAF9126AA12C8AD65A1BAE16AE</code> <code>6D79A899E8E5D6E3FB9A09A8E3AEEE2D</code> <code>180531EDB7082CC3451333F00012611C</code> <code>1330418E1B41EC83822E766886F3CE66</code> <code>7E51B697BD15FFF64338F33B9738FB58</code> <code>C0CE553E4BE0FA87505B380D3FBBC133</code> <code>7EECAD6F3C89065E86F659DE8560A6F1</code><br> <code>436A765C</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 = B9837DDE70F14154F5365D8F1BA15272D77A62EC2249D1A87CD6C98FCC6464D4912437D4F93FD0170C291BD9ECF7DDB6028C1BDBECA0A8D817980D7FC868346FB88F5062B89DD6CF2B05D78A3CFE77C56F81D6F056C3ECFC6047042A0583F39200D51D9662105A744B12C7E7A1ABD2C40353C9E12527B14B4184175E6CA014264F46932B7637A8B1AF03C1368BA5685114F574D74A1C5FF97631E8087F3DF3A995AFAFB86DBE5D9DE8EA1F2A1FDBF4EF36EEB23A8F436FB4F4A72B942EECD1B648AA311CD2B0840C2EFB06B8B2024E148FF501ED61BD04774EA4E59EC1B458A4CA59520A806EAA7FE49ACE8058C174BDCD6D064E2F55D79BD64891A38AFCB594</code></pre>
|
||||
<pre><code>auth_key = 1FDBFD18F386874AE516F8452FF188E0578C2CCDF0133E7975ABD36590BEFD075CB8BA5D0BA3EEEC16A7A5AE2D15D6132C3C02BD44A40CCF37987CC3C0354F732928308CD72DE80F0ED083ED20E52407B9F5E9FC12A264596F7B2F2B7129CED1430693D378D8E565ADA42B76E69ECEF6AF07573AE1F752871F8D27FF4AEFB45040C3CDF4BFCCF1EAF79265947B8EE3C51881E009BCA3BC36F5F998E0F6E47D5023157A1AA60E007273AF61E985CE3AA3BD069B4EE7128FA2858245A0053035F4B61AC3B8E1F3D8181013D741A6968017EF713300B6AD37591D975F26439593467782D79AC82ACA565549BF721FCB023FACF3EDB651E3BC53434C069EF865CD29</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 14 C7 29 7B 5A 99 66
|
||||
0010 | 64 00 00 00 34 F7 CB 3B 66 1D B0 4F 07 59 BA 01
|
||||
0020 | 12 AF 0F 39 23 A2 49 6C 48 E1 4C F6 49 34 95 00
|
||||
0030 | BF 9F 7D B9 A9 72 79 46 95 AB 21 37 B1 76 91 42
|
||||
0040 | 7D A0 66 B8 06 E6 BD EF</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 88 89 9A 9D 5A 99 66
|
||||
0010 | 40 00 00 00 34 F7 CB 3B 50 78 49 F0 BB 9C 45 7D
|
||||
0020 | BC E9 A3 22 DE EC 98 B7 4C A9 67 F1 E6 C7 3D 67
|
||||
0030 | 7B 05 7D BF 78 DF F1 D3 A2 A7 ED 4E 1F 95 13 1C
|
||||
0040 | 14 B8 EF 83 85 D6 3D EE</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>0114C7297B5A9966</code></td>
|
||||
<td><code>0188899A9D5A9966</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>64000000</code> (100 in decimal)</td>
|
||||
<td><code>40000000</code> (64 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>661DB04F0759BA0112AF0F3923A2496C</code></td>
|
||||
<td><code>507849F0BB9C457DBCE9A322DEEC98B7</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>48E14CF649349500BF9F7DB9A9727946</code></td>
|
||||
<td><code>4CA967F1E6C73D677B057DBF78DFF1D3</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>95AB2137B17691427DA066B806E6BDEF</code></td>
|
||||
<td><code>A2A7ED4E1F95131C14B8EF8385D63DEE</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>
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getOutboxReadDate">messages.getOutboxReadDate</a></td>
|
||||
<td>Get the exact read date of one of our messages, sent to a private chat with another user.<br><br>Can be only done for private outgoing messages not older than <a href="/api/config#pm-read-date-expire-period">appConfig.pm_read_date_expire_period »</a>.<br><br>If the <code>peer</code>'s <a href="/constructor/userFull">userFull</a>.<code>read_dates_private</code> flag is set, we will not be able to fetch the exact read date of messages we send to them, and a <code>USER_PRIVACY_RESTRICTED</code> RPC error will be emitted. <br>The exact read date of messages might still be unavailable for other reasons, see <a href="/constructor/globalPrivacySettings">here »</a> for more info. <br>To set <a href="/constructor/userFull">userFull</a>.<code>read_dates_private</code> for ourselves invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a>, setting the <code>settings.hide_read_marks</code> flag.</td>
|
||||
<td>Get the exact read date of one of our messages, sent to a private chat with another user.<br><br>Can be only done for private outgoing messages not older than <a href="/api/config#pm-read-date-expire-period">appConfig.pm_read_date_expire_period »</a>.<br><br>If the <code>peer</code>'s <a href="/constructor/userFull">userFull</a>.<code>read_dates_private</code> flag is set, we will not be able to fetch the exact read date of messages we send to them, and a <code>USER_PRIVACY_RESTRICTED</code> RPC error will be emitted. <br>The exact read date of messages might still be unavailable for other reasons, see <a href="/constructor/globalPrivacySettings">here »</a> for more info. <br>To set <a href="/constructor/userFull">userFull</a>.<code>read_dates_private</code> for ourselves invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a>, setting the <code>settings.hide_read_marks</code> flag.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
|
Loading…
Reference in a new issue