mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-20 16:15:08 +01:00
Update content of files
This commit is contained in:
parent
338e1c0841
commit
67fb5d9863
4 changed files with 222 additions and 212 deletions
|
@ -54,7 +54,7 @@
|
|||
---functions---
|
||||
|
||||
<a href='/method/messages.requestMainWebView'>messages.requestMainWebView</a>#c9e01e7b flags:<a href='/type/%23'>#</a> compact:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> bot:<a href='/type/InputUser'>InputUser</a> start_param:flags.1?<a href='/type/string'>string</a> theme_params:flags.0?<a href='/type/DataJSON'>DataJSON</a> platform:<a href='/type/string'>string</a> = <a href='/type/WebViewResult'>WebViewResult</a>;</code></pre>
|
||||
<p>Main Mini Apps should be opened when the user clicks a <a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a> contained in a reply keyboard identified by a <a href="/constructor/replyKeyboardMarkup">replyKeyboardMarkup</a> constructor, by invoking <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> passing the button's <code>url</code> to the <code>url</code> parameter. </p>
|
||||
<p>Main Mini Apps should be opened when the user clicks a <a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a> contained in a reply keyboard identified by a <a href="/constructor/replyKeyboardMarkup">replyKeyboardMarkup</a> constructor, by invoking <a href="/method/messages.requestMainWebView">messages.requestMainWebView</a> passing the button's <code>url</code> to the <code>url</code> parameter. </p>
|
||||
<h4><a class="anchor" href="#main-mini-app-previews" id="main-mini-app-previews" name="main-mini-app-previews"><i class="anchor-icon"></i></a>Main Mini App previews</h4>
|
||||
<pre><code><a href='/constructor/botInfo'>botInfo</a>#8f300b57 flags:<a href='/type/%23'>#</a> has_preview_medias:flags.6?<a href='/constructor/true'>true</a> user_id:flags.0?<a href='/type/long'>long</a> description:flags.1?<a href='/type/string'>string</a> description_photo:flags.4?<a href='/type/Photo'>Photo</a> description_document:flags.5?<a href='/type/Document'>Document</a> commands:flags.2?<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotCommand'>BotCommand</a>> menu_button:flags.3?<a href='/type/BotMenuButton'>BotMenuButton</a> = <a href='/type/BotInfo'>BotInfo</a>;
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<li><a href="/api/search#apps-tab">Mini App Store »</a></li>
|
||||
<li><a href="/api/bots/webapps#main-mini-apps">Main Mini Apps »</a></li>
|
||||
<li><a href="/api/bots/webapps#main-mini-app-previews">Main Mini App previews »</a></li>
|
||||
<li>Allow specifying the exact frame to use for video thumbnails/static previews through the new <a href="/constructor/documentAttributeVideo">documentAttributeVideo</a>.<code>video_start_ts</code> parameter (especially useful for stories). </li>
|
||||
<li>Allow specifying the exact frame to use for video thumbnails/static previews through the new <a href="/constructor/documentAttributeVideo">documentAttributeVideo</a>.<code>video_start_ts</code> parameter (especially useful for stories).</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
|
||||
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
|
||||
|
|
|
@ -93,9 +93,9 @@
|
|||
<h3><a class="anchor" href="#public-username-links" id="public-username-links" name="public-username-links"><i class="anchor-icon"></i></a>Public username links</h3>
|
||||
<p>Used to link to public users, groups and channels, see <a href="/api/invites#public-usernames">here for more info on how to handle them »</a>. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/<username>&text=<draft_text></code></pre>
|
||||
<pre><code>t.me/<username>?text=<draft_text>&profile</code></pre>
|
||||
<p><code>tg:</code> syntax:</p>
|
||||
<pre><code>tg://resolve?domain=<username>&text=<draft_text></code></pre>
|
||||
<pre><code>tg://resolve?domain=<username>&text=<draft_text>&profile</code></pre>
|
||||
<p>Parameters:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -116,6 +116,11 @@
|
|||
<td style="text-align: center;">Optional</td>
|
||||
<td>UTF-8 text to pre-enter into the text input bar, if the user can write in the chat. <br>Before insertion: <br>- Validate that the text is valid UTF-8. <br>- If the text starts with a <code>@</code>, prepend a whitespace to it (to avoid triggering an <a href="/api/bots/inline">inline query</a>). <br>- Trim the text to <a href="/constructor/config">message_length_max</a> UTF-8 codepoints.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>profile</code></td>
|
||||
<td style="text-align: center;">Optional</td>
|
||||
<td>If set, clicking on this link should open the destination peer's profile page, not the chat view.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Note that <a href="#message-links">message links</a> have the same syntax, with extra parameters. </p>
|
||||
|
@ -146,9 +151,9 @@ These links can be generated even for profiles that don't have a username, and t
|
|||
<h3><a class="anchor" href="#phone-number-links" id="phone-number-links" name="phone-number-links"><i class="anchor-icon"></i></a>Phone number links</h3>
|
||||
<p>Used to link to public and private users by their phone number. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/+<phone_number>&text=<draft_text></code></pre>
|
||||
<pre><code>t.me/+<phone_number>?text=<draft_text>&profile</code></pre>
|
||||
<p><code>tg:</code> syntax:</p>
|
||||
<pre><code>tg://resolve?phone=<phone_number>&text=<draft_text></code></pre>
|
||||
<pre><code>tg://resolve?phone=<phone_number>&text=<draft_text>&profile</code></pre>
|
||||
<p>Parameters:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -169,6 +174,11 @@ These links can be generated even for profiles that don't have a username, and t
|
|||
<td style="text-align: center;">Optional</td>
|
||||
<td>UTF-8 text to pre-enter into the text input bar, if the user can write in the chat. <br>Before insertion: <br>- Validate that the text is valid UTF-8. <br>- If the text starts with a <code>@</code>, prepend a whitespace to it (to avoid triggering an <a href="/api/bots/inline">inline query</a>). <br>- Trim the text to <a href="/constructor/config">message_length_max</a> UTF-8 codepoints.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>profile</code></td>
|
||||
<td style="text-align: center;">Optional</td>
|
||||
<td>If set, clicking on this link should open the user's profile page, not the chat with them.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Note that <a href="#message-links">chat invite links</a> have the same syntax, but <code><phone_number></code> won't be a valid phone number. </p>
|
||||
|
|
|
@ -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 D0 D9 07 00 A0 9D AF 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 79 A0 39 7C 8E 1D 59 F9
|
||||
0020 | 0D 1F 7A 59 0D F3 A1 73</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 DC 17 09 00 50 A1 AF 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 45 D4 BC 8C 8E 28 35 6E
|
||||
0020 | C7 EC 04 78 3D 44 C5 CB</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>D0D90700A09DAF66</code></td>
|
||||
<td><code>DC17090050A1AF66</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>79A0397C8E1D59F90D1F7A590DF3A173</code></td>
|
||||
<td><code>45D4BC8C8E28356EC7EC04783D44C5CB</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 28 52 D0 A0 9D AF 66
|
||||
0010 | 6C 00 00 00 63 24 16 05 79 A0 39 7C 8E 1D 59 F9
|
||||
0020 | 0D 1F 7A 59 0D F3 A1 73 EB BD 76 FD 56 BE 14 75
|
||||
0030 | ED 45 3B DC 80 7F EC 41 08 1E A5 6F 9F 8E AA 10
|
||||
0040 | F9 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 A0 9A 59 50 A1 AF 66
|
||||
0010 | A0 00 00 00 63 24 16 05 45 D4 BC 8C 8E 28 35 6E
|
||||
0020 | C7 EC 04 78 3D 44 C5 CB B5 92 48 6A F0 11 4C 1D
|
||||
0030 | 2B FA 08 37 7E 80 2A 2C 08 25 CD 20 34 C0 7D D9
|
||||
0040 | DB 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>012852D0A09DAF66</code></td>
|
||||
<td><code>01A09A5950A1AF66</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>6C000000</code> (108 in decimal)</td>
|
||||
<td><code>A0000000</code> (160 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>79A0397C8E1D59F90D1F7A590DF3A173</code></td>
|
||||
<td><code>45D4BC8C8E28356EC7EC04783D44C5CB</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>EBBD76FD56BE1475ED453BDC807FEC41</code></td>
|
||||
<td><code>B592486AF0114C1D2BFA08377E802A2C</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>081EA56F9F8EAA10F9000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2208293923379089657</td>
|
||||
<td><code>0825CD2034C07DD9DB000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2723868760568879579</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 = 2208293923379089657</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2208293923379089657 = 1333529537 * 1655976761</code></p>
|
||||
<pre><code>p = 1333529537
|
||||
q = 1655976761</code></pre>
|
||||
<pre><code>pq = 2723868760568879579</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2723868760568879579 = 1551730417 * 1755374987</code></p>
|
||||
<pre><code>p = 1551730417
|
||||
q = 1755374987</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 1E A5 6F 9F 8E AA 10 F9 00 00 00
|
||||
0010 | 04 4F 7C 0B C1 00 00 00 04 62 B4 33 39 00 00 00
|
||||
0020 | 79 A0 39 7C 8E 1D 59 F9 0D 1F 7A 59 0D F3 A1 73
|
||||
0030 | EB BD 76 FD 56 BE 14 75 ED 45 3B DC 80 7F EC 41
|
||||
0040 | 9A BE 50 83 8C A7 B1 EE 40 67 DC D7 1A 4B DC 9B
|
||||
0050 | C7 9B C3 7B 38 29 98 36 CD 1F 79 F1 8E 90 CB 67
|
||||
<pre><code>0000 | 95 5F F5 A9 08 25 CD 20 34 C0 7D D9 DB 00 00 00
|
||||
0010 | 04 5C 7D 86 F1 00 00 00 04 68 A0 E5 8B 00 00 00
|
||||
0020 | 45 D4 BC 8C 8E 28 35 6E C7 EC 04 78 3D 44 C5 CB
|
||||
0030 | B5 92 48 6A F0 11 4C 1D 2B FA 08 37 7E 80 2A 2C
|
||||
0040 | 52 34 03 08 A5 79 F4 31 42 A4 A4 F2 92 4D 4A 0D
|
||||
0050 | 86 3F A2 B7 70 D1 9F 6C 11 E2 4F 7A 2A F9 76 92
|
||||
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 = 1655976761</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>081EA56F9F8EAA10F9000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2208293923379089657</td>
|
||||
<td><code>0825CD2034C07DD9DB000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2723868760568879579</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>044F7C0BC1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1333529537</td>
|
||||
<td><code>045C7D86F1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1551730417</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>0462B43339000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1655976761</td>
|
||||
<td><code>0468A0E58B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1755374987</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>79A0397C8E1D59F90D1F7A590DF3A173</code></td>
|
||||
<td><code>45D4BC8C8E28356EC7EC04783D44C5CB</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>EBBD76FD56BE1475ED453BDC807FEC41</code></td>
|
||||
<td><code>B592486AF0114C1D2BFA08377E802A2C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>9ABE50838CA7B1EE4067DCD71A4BDC9B</code> <code>C79BC37B38299836CD1F79F18E90CB67</code></td>
|
||||
<td><code>52340308A579F43142A4A4F2924D4A0D</code> <code>863FA2B770D19F6C11E24F7A2AF97692</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1655976761</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 = 955FF5A9081EA56F9F8EAA10F9000000044F7C0BC10000000462B4333900000079A0397C8E1D59F90D1F7A590DF3A173EBBD76FD56BE1475ED453BDC807FEC419ABE50838CA7B1EE4067DCD71A4BDC9BC79BC37B38299836CD1F79F18E90CB6702000000
|
||||
random_padding_bytes = 03491C867D06C0A7D75427AC771259D25EE60A76EC5CE37EFD4845EF792B872855ECBEA7D2F55B89F6DBBDE9811F56D89CC168DA1645A8934D4E309BF1489548FC78EACAE8F0431CC60E9B409350C8E933E2B72854BFBA64C7003057</code></pre>
|
||||
<pre><code>data = 955FF5A90825CD2034C07DD9DB000000045C7D86F10000000468A0E58B00000045D4BC8C8E28356EC7EC04783D44C5CBB592486AF0114C1D2BFA08377E802A2C52340308A579F43142A4A4F2924D4A0D863FA2B770D19F6C11E24F7A2AF9769202000000
|
||||
random_padding_bytes = D26B1DACC17FB3C17D68FBE31916D9D38569388A1103976C5DF0E90A7E9B0075F7FA0F8309FFF4B85848E96A7D1BB889B7F7C4113EC19F5BEF0BCC2094FEEB3CF084354274EF18A6BE902746C4DABB7161457DD1788CCD30690BFFC2</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 = 560CE306807D0BBFDEF606118CD79E3E3F60C4FE075537AD699E38FF9F12D404E16FF45BBA5B39ED4564462819521BA095C0F1D926BCA6FD739807BC50F74AF3ED7EB8B6A3859CC6AB85661CBC1C9FBC115706663C035D4EE383CA6ADC9000E0A62BCFE88990B0BEAE0D14EE9FC313D31EC57BF7AECA63130B080C51D18959573D6A86195931EE4FE5B1070B4CA7EA035F7B75D0D8866C24E7E00C8ABBFA82D152A3E407E7B8AB29B3BE80DBA5918E8097E890326E479395779EBA2FEA9DAF40A9C7960D34CE84D66CDE84295D166191C4E63E30C071EA7F0102308E7C75AD04178026A4387A1A9ED85B0C52CD28ED30B1151E8580089E8849FC4515DABDAA09</code></pre>
|
||||
<pre><code>encrypted_data = BCE10C66383E9DA61A8DD240C32A0A8DD746DD7CF11A0EB255363B8A7E26C463AA5D32D99BECB129EF05C70670049128DBEF7F25FFA42F272DAED022C2C6AD0A1CEEB2D376D366F1188B882D0AE8887009DB3FA1CF705697632A88A38A72C13D892CE5571FE4F75C2D5FADEE7B6AEE40E697272D4A90F239CB776C4580A082FF667E8940580C42AA92FB3F958274038432171E07B31D470397A0318726F0011B54A25C96209D1605C2B54E2AE04316338A784445EE71263536C6381426E5CACB55A265ADCBD5B8485B8815027EC352F50C018F51E84AD0B2C20964775970E26D5A34183A0150E572923F509AE4FB7CB77FD80274F8EA2B55F21B2155D78430C4</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 30 68 04 00 A1 9D AF 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 79 A0 39 7C 8E 1D 59 F9
|
||||
0020 | 0D 1F 7A 59 0D F3 A1 73 EB BD 76 FD 56 BE 14 75
|
||||
0030 | ED 45 3B DC 80 7F EC 41 04 4F 7C 0B C1 00 00 00
|
||||
0040 | 04 62 B4 33 39 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 56 0C E3 06 80 7D 0B BF DE F6 06 11
|
||||
0060 | 8C D7 9E 3E 3F 60 C4 FE 07 55 37 AD 69 9E 38 FF
|
||||
0070 | 9F 12 D4 04 E1 6F F4 5B BA 5B 39 ED 45 64 46 28
|
||||
0080 | 19 52 1B A0 95 C0 F1 D9 26 BC A6 FD 73 98 07 BC
|
||||
0090 | 50 F7 4A F3 ED 7E B8 B6 A3 85 9C C6 AB 85 66 1C
|
||||
00A0 | BC 1C 9F BC 11 57 06 66 3C 03 5D 4E E3 83 CA 6A
|
||||
00B0 | DC 90 00 E0 A6 2B CF E8 89 90 B0 BE AE 0D 14 EE
|
||||
00C0 | 9F C3 13 D3 1E C5 7B F7 AE CA 63 13 0B 08 0C 51
|
||||
00D0 | D1 89 59 57 3D 6A 86 19 59 31 EE 4F E5 B1 07 0B
|
||||
00E0 | 4C A7 EA 03 5F 7B 75 D0 D8 86 6C 24 E7 E0 0C 8A
|
||||
00F0 | BB FA 82 D1 52 A3 E4 07 E7 B8 AB 29 B3 BE 80 DB
|
||||
0100 | A5 91 8E 80 97 E8 90 32 6E 47 93 95 77 9E BA 2F
|
||||
0110 | EA 9D AF 40 A9 C7 96 0D 34 CE 84 D6 6C DE 84 29
|
||||
0120 | 5D 16 61 91 C4 E6 3E 30 C0 71 EA 7F 01 02 30 8E
|
||||
0130 | 7C 75 AD 04 17 80 26 A4 38 7A 1A 9E D8 5B 0C 52
|
||||
0140 | CD 28 ED 30 B1 15 1E 85 80 08 9E 88 49 FC 45 15
|
||||
0150 | DA BD AA 09</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 D0 61 0C 00 50 A1 AF 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 45 D4 BC 8C 8E 28 35 6E
|
||||
0020 | C7 EC 04 78 3D 44 C5 CB B5 92 48 6A F0 11 4C 1D
|
||||
0030 | 2B FA 08 37 7E 80 2A 2C 04 5C 7D 86 F1 00 00 00
|
||||
0040 | 04 68 A0 E5 8B 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 BC E1 0C 66 38 3E 9D A6 1A 8D D2 40
|
||||
0060 | C3 2A 0A 8D D7 46 DD 7C F1 1A 0E B2 55 36 3B 8A
|
||||
0070 | 7E 26 C4 63 AA 5D 32 D9 9B EC B1 29 EF 05 C7 06
|
||||
0080 | 70 04 91 28 DB EF 7F 25 FF A4 2F 27 2D AE D0 22
|
||||
0090 | C2 C6 AD 0A 1C EE B2 D3 76 D3 66 F1 18 8B 88 2D
|
||||
00A0 | 0A E8 88 70 09 DB 3F A1 CF 70 56 97 63 2A 88 A3
|
||||
00B0 | 8A 72 C1 3D 89 2C E5 57 1F E4 F7 5C 2D 5F AD EE
|
||||
00C0 | 7B 6A EE 40 E6 97 27 2D 4A 90 F2 39 CB 77 6C 45
|
||||
00D0 | 80 A0 82 FF 66 7E 89 40 58 0C 42 AA 92 FB 3F 95
|
||||
00E0 | 82 74 03 84 32 17 1E 07 B3 1D 47 03 97 A0 31 87
|
||||
00F0 | 26 F0 01 1B 54 A2 5C 96 20 9D 16 05 C2 B5 4E 2A
|
||||
0100 | E0 43 16 33 8A 78 44 45 EE 71 26 35 36 C6 38 14
|
||||
0110 | 26 E5 CA CB 55 A2 65 AD CB D5 B8 48 5B 88 15 02
|
||||
0120 | 7E C3 52 F5 0C 01 8F 51 E8 4A D0 B2 C2 09 64 77
|
||||
0130 | 59 70 E2 6D 5A 34 18 3A 01 50 E5 72 92 3F 50 9A
|
||||
0140 | E4 FB 7C B7 7F D8 02 74 F8 EA 2B 55 F2 1B 21 55
|
||||
0150 | D7 84 30 C4</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 = 03491C867D06C0A7D75427AC771259D25EE60A76EC5CE37EFD4845EF7
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>30680400A19DAF66</code></td>
|
||||
<td><code>D0610C0050A1AF66</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 = 03491C867D06C0A7D75427AC771259D25EE60A76EC5CE37EFD4845EF7
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>79A0397C8E1D59F90D1F7A590DF3A173</code></td>
|
||||
<td><code>45D4BC8C8E28356EC7EC04783D44C5CB</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>EBBD76FD56BE1475ED453BDC807FEC41</code></td>
|
||||
<td><code>B592486AF0114C1D2BFA08377E802A2C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>044F7C0BC1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1333529537</td>
|
||||
<td><code>045C7D86F1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1551730417</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>0462B43339000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1655976761</td>
|
||||
<td><code>0468A0E58B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1755374987</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 = 03491C867D06C0A7D75427AC771259D25EE60A76EC5CE37EFD4845EF7
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE000100560CE306807D0BBFDEF60611</code> <code>8CD79E3E3F60C4FE075537AD699E38FF</code> <code>9F12D404E16FF45BBA5B39ED45644628</code> <code>19521BA095C0F1D926BCA6FD739807BC</code> <code>50F74AF3ED7EB8B6A3859CC6AB85661C</code> <code>BC1C9FBC115706663C035D4EE383CA6A</code> <code>DC9000E0A62BCFE88990B0BEAE0D14EE</code> <code>9FC313D31EC57BF7AECA63130B080C51</code> <code>D18959573D6A86195931EE4FE5B1070B</code> <code>4CA7EA035F7B75D0D8866C24E7E00C8A</code> <code>BBFA82D152A3E407E7B8AB29B3BE80DB</code> <code>A5918E8097E890326E479395779EBA2F</code> <code>EA9DAF40A9C7960D34CE84D66CDE8429</code> <code>5D166191C4E63E30C071EA7F0102308E</code> <code>7C75AD04178026A4387A1A9ED85B0C52</code> <code>CD28ED30B1151E8580089E8849FC4515</code><br> <code>DABDAA09</code></td>
|
||||
<td><code>FE000100BCE10C66383E9DA61A8DD240</code> <code>C32A0A8DD746DD7CF11A0EB255363B8A</code> <code>7E26C463AA5D32D99BECB129EF05C706</code> <code>70049128DBEF7F25FFA42F272DAED022</code> <code>C2C6AD0A1CEEB2D376D366F1188B882D</code> <code>0AE8887009DB3FA1CF705697632A88A3</code> <code>8A72C13D892CE5571FE4F75C2D5FADEE</code> <code>7B6AEE40E697272D4A90F239CB776C45</code> <code>80A082FF667E8940580C42AA92FB3F95</code> <code>8274038432171E07B31D470397A03187</code> <code>26F0011B54A25C96209D1605C2B54E2A</code> <code>E04316338A784445EE71263536C63814</code> <code>26E5CACB55A265ADCBD5B8485B881502</code> <code>7EC352F50C018F51E84AD0B2C2096477</code> <code>5970E26D5A34183A0150E572923F509A</code> <code>E4FB7CB77FD80274F8EA2B55F21B2155</code><br> <code>D78430C4</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = 03491C867D06C0A7D75427AC771259D25EE60A76EC5CE37EFD4845EF7
|
|||
<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 FC 77 B4 A1 9D AF 66
|
||||
0010 | D8 02 00 00 5C 07 E8 D0 79 A0 39 7C 8E 1D 59 F9
|
||||
0020 | 0D 1F 7A 59 0D F3 A1 73 EB BD 76 FD 56 BE 14 75
|
||||
0030 | ED 45 3B DC 80 7F EC 41 FE 50 02 00 27 A1 04 08
|
||||
0040 | 79 7E 19 72 F6 5C CC 16 97 F7 87 B0 89 CC B9 96
|
||||
0050 | BE A9 2A 02 9F C0 C0 3B A6 E9 45 90 4A F0 5B A0
|
||||
0060 | 1E 86 DA 3D 5A 51 D1 BE 1D 17 39 E1 1B FA 6D F5
|
||||
0070 | F7 39 E9 E4 A8 BA 18 7F 5C F8 65 8D 7B 78 35 E3
|
||||
0080 | 55 B3 26 80 F3 2D 50 86 57 52 03 47 25 D6 D6 46
|
||||
0090 | 7C 7C 2A 12 B6 79 DE AF A2 74 A8 8A 59 3D A0 8A
|
||||
00A0 | 07 29 D8 D8 CA 70 70 57 1A B3 CC 5D DE 64 36 1D
|
||||
00B0 | 47 9E A4 68 C1 3E 5E 60 47 36 1E BA D3 7C 63 D0
|
||||
00C0 | 9D 6E 44 70 70 E0 39 CF 5E 69 AD 68 AE 64 90 D3
|
||||
00D0 | 3B 16 C1 A6 6B 7E A9 13 CE 34 9A 2B D9 52 FB 5B
|
||||
00E0 | F0 EC D4 28 52 5E 9A EC 0C CF 8A F9 05 6A 3E AF
|
||||
00F0 | C2 DB D7 10 71 45 92 BE 9F 0C 83 FB 3D C0 CD DB
|
||||
0100 | BE 37 A9 D7 45 31 33 63 34 62 0A 6E 48 5B 40 39
|
||||
0110 | 49 13 BB 68 E7 3E 96 63 C1 69 B6 DE 04 69 A3 D8
|
||||
0120 | 6A 18 9A 58 D6 19 58 FA F1 24 63 C9 B0 D4 87 F4
|
||||
0130 | 01 42 D6 48 3F 7D 51 C9 15 F3 1C EB DC 47 93 56
|
||||
0140 | 07 2D 48 3E C7 16 90 3F 79 B0 51 B5 49 BB 1C 30
|
||||
0150 | CC A6 DB 15 A7 0B 7A 8D F8 F8 B5 B6 F0 28 FB C6
|
||||
0160 | 19 BC 74 05 52 05 AC 71 C0 31 D6 E4 EA 30 AA 3F
|
||||
0170 | 87 0B 18 7C 97 64 BB C4 55 17 C3 A1 CA 1C 6F C1
|
||||
0180 | D5 29 D3 44 CD 5B 59 96 A8 11 55 DE B6 80 D1 1F
|
||||
0190 | D3 5B 42 31 B0 DC 25 2E CE BC 69 93 A6 29 07 27
|
||||
01A0 | 28 E0 39 A2 C6 C2 AB B7 11 AD 0B 9D 5C 8A D5 EA
|
||||
01B0 | 95 25 94 8D B7 9D 88 EF 8E CD 51 62 A8 8F 5C A9
|
||||
01C0 | 41 1C 8F 5C 80 39 08 02 79 A3 91 A4 A4 E6 42 8A
|
||||
01D0 | 9D 5D A9 69 26 E2 94 EF 1D EF AD A4 3D C1 2B 35
|
||||
01E0 | 45 13 2C D9 32 90 98 3A 55 3D 0C 90 D7 46 D8 F2
|
||||
01F0 | B6 E8 42 24 E3 38 95 C2 51 86 78 64 71 A0 1E 05
|
||||
0200 | FC A7 81 20 5C C1 1C 25 E2 0E E7 C4 64 F0 6C 77
|
||||
0210 | 00 06 B6 E9 5A A2 2E 1A 52 74 CC 4F E2 36 38 3D
|
||||
0220 | E3 85 52 AE CF C7 FD AC 25 87 41 30 8F 08 76 00
|
||||
0230 | AD 86 4A 24 3B E7 86 CA 47 F2 4B 04 45 88 0A 7B
|
||||
0240 | 20 6E 54 09 DF 98 B8 55 0C 68 AF AC 85 C9 F1 7C
|
||||
0250 | A6 7E 03 04 8F 9A A0 92 C2 C8 78 F1 5F 42 77 53
|
||||
0260 | 78 82 51 BF 2A AD 1E 17 6B 22 CA 83 3E 17 27 75
|
||||
0270 | B9 3C 4C 85 44 14 43 E2 B0 F1 AB 84 DB E4 3D 81
|
||||
0280 | 7D 39 02 F7 35 50 72 F7 3C B5 3F FC</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 B0 19 0C 51 A1 AF 66
|
||||
0010 | B8 02 00 00 5C 07 E8 D0 45 D4 BC 8C 8E 28 35 6E
|
||||
0020 | C7 EC 04 78 3D 44 C5 CB B5 92 48 6A F0 11 4C 1D
|
||||
0030 | 2B FA 08 37 7E 80 2A 2C FE 50 02 00 1E 22 EB 75
|
||||
0040 | CF 89 A5 3F 9E AF 1E A5 CA 98 0C B4 0C E1 2D EB
|
||||
0050 | 85 75 9F 5A 71 16 9D 92 CE 75 96 0A E0 19 94 D6
|
||||
0060 | BD C4 5E D1 28 59 9F BF 1D D0 89 FE 16 39 F4 C7
|
||||
0070 | EA C8 0B DC 1D F8 BB AE 2B 67 F6 6B 32 B6 60 B0
|
||||
0080 | BE C1 53 CA DF 45 DE 21 EF C8 D3 80 DF 56 28 F7
|
||||
0090 | E4 CB 23 34 7A CF 91 96 69 59 3D 59 70 DF F2 6A
|
||||
00A0 | 54 AF 6F C2 2D 0E 2E DA 58 19 B7 36 BD 4A AF C9
|
||||
00B0 | 1A 92 19 A2 65 A9 A4 4E 1C C1 46 D7 26 B3 78 2E
|
||||
00C0 | 5A 01 FD 39 82 0E 0D 76 6D 52 49 F4 1D 1F D0 B9
|
||||
00D0 | E2 09 A9 5C 1A 82 F6 C0 02 9F FB 3F 0A 0C 84 E4
|
||||
00E0 | 1A B4 08 C5 10 70 97 1C 1B 25 41 44 EF 67 9C 55
|
||||
00F0 | 7A E5 0A A6 92 7B 99 32 43 9A AA 56 78 0B 21 7B
|
||||
0100 | FB 80 C9 C0 7A ED A1 06 2B C1 7F 33 CB 88 E1 58
|
||||
0110 | 4E E6 AD E5 22 4E 77 13 CB B3 28 60 2A 7C D6 ED
|
||||
0120 | 3F 58 86 78 0A F7 0B DE F5 15 8E EF B3 E0 73 48
|
||||
0130 | DE C9 4B 46 90 5E 0F 90 95 1A C8 08 1E CC 29 28
|
||||
0140 | 17 21 15 D7 C9 5F CE 20 62 F2 AF 4F DD 47 B7 FD
|
||||
0150 | E9 37 CD D1 23 3E 36 72 AE BC 41 36 A2 48 16 81
|
||||
0160 | 82 B3 F9 1A A3 B6 25 08 EB E8 A2 10 38 F1 C6 71
|
||||
0170 | 8E 43 A5 B5 C8 7C 3D E6 FF 72 64 1E 29 A2 53 25
|
||||
0180 | E8 C2 F6 A2 41 5F 08 C0 7C D0 27 CB 6C 9B F4 80
|
||||
0190 | 3B 2F 7A E4 27 E2 38 E7 BD EA 6A 25 52 9E F3 54
|
||||
01A0 | EB E4 F5 27 D8 45 BA C6 C5 7C F8 14 26 34 FB 25
|
||||
01B0 | 56 B6 71 19 C7 69 F8 FC 90 D6 BF 80 15 3F 45 4F
|
||||
01C0 | 91 86 04 EA 7E 97 85 71 C9 A4 1B 99 FC 54 35 DA
|
||||
01D0 | B1 E7 68 A2 54 73 86 DD 54 BD 02 61 A2 17 D5 78
|
||||
01E0 | 77 96 15 FC A4 6C 22 67 1A AE 01 14 8C 7C 5E A6
|
||||
01F0 | 27 81 05 8F 1E 12 B0 1C 7D 03 C0 57 2B F5 7B B4
|
||||
0200 | 59 80 57 55 34 75 59 2D E1 E4 7F 05 3E DA BE 4B
|
||||
0210 | 00 0B 9C 6F FC E3 F0 95 C2 72 70 45 9A 90 8C 22
|
||||
0220 | 5B 3D 86 C2 CB CE F4 66 83 2F 8C FD CA E0 43 BF
|
||||
0230 | D7 FF 32 5A 0B 34 EA 5B B2 7E 9B 30 75 5E 36 D7
|
||||
0240 | 7F 1B 30 6C 6D 12 0C 33 E1 8B F6 E7 88 3B 29 32
|
||||
0250 | 10 12 F9 83 EF 2E E4 D3 A4 D7 8F 65 3B F6 35 B9
|
||||
0260 | 81 CC 9B 8A B1 26 94 6D 5A C8 29 C1 97 81 FD BA
|
||||
0270 | AD B6 84 1B F9 F0 31 1F AC 93 BA 6F 2D 3F C3 73
|
||||
0280 | 29 36 F7 9C 1D C9 0D BA AF 12 31 F5</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 = 03491C867D06C0A7D75427AC771259D25EE60A76EC5CE37EFD4845EF7
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01FC77B4A19DAF66</code></td>
|
||||
<td><code>01B0190C51A1AF66</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>D8020000</code> (728 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 = 03491C867D06C0A7D75427AC771259D25EE60A76EC5CE37EFD4845EF7
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>79A0397C8E1D59F90D1F7A590DF3A173</code></td>
|
||||
<td><code>45D4BC8C8E28356EC7EC04783D44C5CB</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>EBBD76FD56BE1475ED453BDC807FEC41</code></td>
|
||||
<td><code>B592486AF0114C1D2BFA08377E802A2C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE50020027A10408797E1972F65CCC16</code> <code>97F787B089CCB996BEA92A029FC0C03B</code> <code>A6E945904AF05BA01E86DA3D5A51D1BE</code> <code>1D1739E11BFA6DF5F739E9E4A8BA187F</code> <code>5CF8658D7B7835E355B32680F32D5086</code> <code>5752034725D6D6467C7C2A12B679DEAF</code> <code>A274A88A593DA08A0729D8D8CA707057</code> <code>1AB3CC5DDE64361D479EA468C13E5E60</code> <code>47361EBAD37C63D09D6E447070E039CF</code> <code>5E69AD68AE6490D33B16C1A66B7EA913</code> <code>CE349A2BD952FB5BF0ECD428525E9AEC</code> <code>0CCF8AF9056A3EAFC2DBD710714592BE</code> <code>9F0C83FB3DC0CDDBBE37A9D745313363</code> <code>34620A6E485B40394913BB68E73E9663</code> <code>C169B6DE0469A3D86A189A58D61958FA</code> <code>F12463C9B0D487F40142D6483F7D51C9</code> <code>15F31CEBDC479356072D483EC716903F</code> <code>79B051B549BB1C30CCA6DB15A70B7A8D</code> <code>F8F8B5B6F028FBC619BC74055205AC71</code> <code>C031D6E4EA30AA3F870B187C9764BBC4</code> <code>5517C3A1CA1C6FC1D529D344CD5B5996</code> <code>A81155DEB680D11FD35B4231B0DC252E</code> <code>CEBC6993A629072728E039A2C6C2ABB7</code> <code>11AD0B9D5C8AD5EA9525948DB79D88EF</code> <code>8ECD5162A88F5CA9411C8F5C80390802</code> <code>79A391A4A4E6428A9D5DA96926E294EF</code> <code>1DEFADA43DC12B3545132CD93290983A</code> <code>553D0C90D746D8F2B6E84224E33895C2</code> <code>5186786471A01E05FCA781205CC11C25</code> <code>E20EE7C464F06C770006B6E95AA22E1A</code> <code>5274CC4FE236383DE38552AECFC7FDAC</code> <code>258741308F087600AD864A243BE786CA</code> <code>47F24B0445880A7B206E5409DF98B855</code> <code>0C68AFAC85C9F17CA67E03048F9AA092</code> <code>C2C878F15F427753788251BF2AAD1E17</code> <code>6B22CA833E172775B93C4C85441443E2</code> <code>B0F1AB84DBE43D817D3902F7355072F7</code><br> <code>3CB53FFC</code></td>
|
||||
<td><code>FE5002001E22EB75CF89A53F9EAF1EA5</code> <code>CA980CB40CE12DEB85759F5A71169D92</code> <code>CE75960AE01994D6BDC45ED128599FBF</code> <code>1DD089FE1639F4C7EAC80BDC1DF8BBAE</code> <code>2B67F66B32B660B0BEC153CADF45DE21</code> <code>EFC8D380DF5628F7E4CB23347ACF9196</code> <code>69593D5970DFF26A54AF6FC22D0E2EDA</code> <code>5819B736BD4AAFC91A9219A265A9A44E</code> <code>1CC146D726B3782E5A01FD39820E0D76</code> <code>6D5249F41D1FD0B9E209A95C1A82F6C0</code> <code>029FFB3F0A0C84E41AB408C51070971C</code> <code>1B254144EF679C557AE50AA6927B9932</code> <code>439AAA56780B217BFB80C9C07AEDA106</code> <code>2BC17F33CB88E1584EE6ADE5224E7713</code> <code>CBB328602A7CD6ED3F5886780AF70BDE</code> <code>F5158EEFB3E07348DEC94B46905E0F90</code> <code>951AC8081ECC2928172115D7C95FCE20</code> <code>62F2AF4FDD47B7FDE937CDD1233E3672</code> <code>AEBC4136A248168182B3F91AA3B62508</code> <code>EBE8A21038F1C6718E43A5B5C87C3DE6</code> <code>FF72641E29A25325E8C2F6A2415F08C0</code> <code>7CD027CB6C9BF4803B2F7AE427E238E7</code> <code>BDEA6A25529EF354EBE4F527D845BAC6</code> <code>C57CF8142634FB2556B67119C769F8FC</code> <code>90D6BF80153F454F918604EA7E978571</code> <code>C9A41B99FC5435DAB1E768A2547386DD</code> <code>54BD0261A217D578779615FCA46C2267</code> <code>1AAE01148C7C5EA62781058F1E12B01C</code> <code>7D03C0572BF57BB4598057553475592D</code> <code>E1E47F053EDABE4B000B9C6FFCE3F095</code> <code>C27270459A908C225B3D86C2CBCEF466</code> <code>832F8CFDCAE043BFD7FF325A0B34EA5B</code> <code>B27E9B30755E36D77F1B306C6D120C33</code> <code>E18BF6E7883B29321012F983EF2EE4D3</code> <code>A4D78F653BF635B981CC9B8AB126946D</code> <code>5AC829C19781FDBAADB6841BF9F0311F</code> <code>AC93BA6F2D3FC3732936F79C1DC90DBA</code><br> <code>AF1231F5</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = 03491C867D06C0A7D75427AC771259D25EE60A76EC5CE37EFD4845EF7
|
|||
<!-- 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 = 27A10408797E1972F65CCC1697F787B089CCB996BEA92A029FC0C03BA6E945904AF05BA01E86DA3D5A51D1BE1D1739E11BFA6DF5F739E9E4A8BA187F5CF8658D7B7835E355B32680F32D50865752034725D6D6467C7C2A12B679DEAFA274A88A593DA08A0729D8D8CA7070571AB3CC5DDE64361D479EA468C13E5E6047361EBAD37C63D09D6E447070E039CF5E69AD68AE6490D33B16C1A66B7EA913CE349A2BD952FB5BF0ECD428525E9AEC0CCF8AF9056A3EAFC2DBD710714592BE9F0C83FB3DC0CDDBBE37A9D74531336334620A6E485B40394913BB68E73E9663C169B6DE0469A3D86A189A58D61958FAF12463C9B0D487F40142D6483F7D51C915F31CEBDC479356072D483EC716903F79B051B549BB1C30CCA6DB15A70B7A8DF8F8B5B6F028FBC619BC74055205AC71C031D6E4EA30AA3F870B187C9764BBC45517C3A1CA1C6FC1D529D344CD5B5996A81155DEB680D11FD35B4231B0DC252ECEBC6993A629072728E039A2C6C2ABB711AD0B9D5C8AD5EA9525948DB79D88EF8ECD5162A88F5CA9411C8F5C8039080279A391A4A4E6428A9D5DA96926E294EF1DEFADA43DC12B3545132CD93290983A553D0C90D746D8F2B6E84224E33895C25186786471A01E05FCA781205CC11C25E20EE7C464F06C770006B6E95AA22E1A5274CC4FE236383DE38552AECFC7FDAC258741308F087600AD864A243BE786CA47F24B0445880A7B206E5409DF98B8550C68AFAC85C9F17CA67E03048F9AA092C2C878F15F427753788251BF2AAD1E176B22CA833E172775B93C4C85441443E2B0F1AB84DBE43D817D3902F7355072F73CB53FFC
|
||||
tmp_aes_key = 1DE16F12FE433D4AEC8A6AC13C5FDCF4D9F9F59550F1B01F80FA552B647A5CD6
|
||||
tmp_aes_iv = FBC5D6E18337466B169164C8064BA0E4B4E9E30B0084E07E523289A19ABE5083</code></pre>
|
||||
<pre><code>encrypted_answer = 1E22EB75CF89A53F9EAF1EA5CA980CB40CE12DEB85759F5A71169D92CE75960AE01994D6BDC45ED128599FBF1DD089FE1639F4C7EAC80BDC1DF8BBAE2B67F66B32B660B0BEC153CADF45DE21EFC8D380DF5628F7E4CB23347ACF919669593D5970DFF26A54AF6FC22D0E2EDA5819B736BD4AAFC91A9219A265A9A44E1CC146D726B3782E5A01FD39820E0D766D5249F41D1FD0B9E209A95C1A82F6C0029FFB3F0A0C84E41AB408C51070971C1B254144EF679C557AE50AA6927B9932439AAA56780B217BFB80C9C07AEDA1062BC17F33CB88E1584EE6ADE5224E7713CBB328602A7CD6ED3F5886780AF70BDEF5158EEFB3E07348DEC94B46905E0F90951AC8081ECC2928172115D7C95FCE2062F2AF4FDD47B7FDE937CDD1233E3672AEBC4136A248168182B3F91AA3B62508EBE8A21038F1C6718E43A5B5C87C3DE6FF72641E29A25325E8C2F6A2415F08C07CD027CB6C9BF4803B2F7AE427E238E7BDEA6A25529EF354EBE4F527D845BAC6C57CF8142634FB2556B67119C769F8FC90D6BF80153F454F918604EA7E978571C9A41B99FC5435DAB1E768A2547386DD54BD0261A217D578779615FCA46C22671AAE01148C7C5EA62781058F1E12B01C7D03C0572BF57BB4598057553475592DE1E47F053EDABE4B000B9C6FFCE3F095C27270459A908C225B3D86C2CBCEF466832F8CFDCAE043BFD7FF325A0B34EA5BB27E9B30755E36D77F1B306C6D120C33E18BF6E7883B29321012F983EF2EE4D3A4D78F653BF635B981CC9B8AB126946D5AC829C19781FDBAADB6841BF9F0311FAC93BA6F2D3FC3732936F79C1DC90DBAAF1231F5
|
||||
tmp_aes_key = 125C884BD889776878C0861A7B0AEA66CA6D618956A3120CDA26FD732E1D1E61
|
||||
tmp_aes_iv = ECA7E6752A58FAB551DAD4F8C65314F97C8A662A372AB5B617719D9252340308</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = C22C29B7975A0B06B8888B11067AFA919CA9DB33BA0D89B579A0397C8E1D59F90D1F7A590DF3A173EBBD76FD56BE1475ED453BDC807FEC4103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001006B7C391F0281E98FFB36DF7D9407E46C89EF284AD537F024FF1B12E9B937ED46CC0BE8DB5D375E4DABA433628D37A593AAD783C528391022E65886CAC62B4BAE5B6BCC508A64E853242DE35AEC2EE8E044191F54F9F8856E37B0BD04470DFAF52BCC6A67F32AAA8C9472C00C836B9800621017F32A885FB0830B92B866D1E9CB1C706469625F070299D09C35EA5DF24ABF47F9723D90F384898BA10659FA1F728B6F1778C2364DDB4F41E0E7E166D522987A24454430DF6070A1EA5026EB1CB1A492FDFFBE0AB88B9C23D536809595BDFBEE452ACB05641BC3029EF23BC46DF2C5119A42C191316C6C575986325116078AA8301DA3261D805664795B7C7E47AAA19DAF66E10924F758D0208B
|
||||
answer = BA0D89B579A0397C8E1D59F90D1F7A590DF3A173EBBD76FD56BE1475ED453BDC807FEC4103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001006B7C391F0281E98FFB36DF7D9407E46C89EF284AD537F024FF1B12E9B937ED46CC0BE8DB5D375E4DABA433628D37A593AAD783C528391022E65886CAC62B4BAE5B6BCC508A64E853242DE35AEC2EE8E044191F54F9F8856E37B0BD04470DFAF52BCC6A67F32AAA8C9472C00C836B9800621017F32A885FB0830B92B866D1E9CB1C706469625F070299D09C35EA5DF24ABF47F9723D90F384898BA10659FA1F728B6F1778C2364DDB4F41E0E7E166D522987A24454430DF6070A1EA5026EB1CB1A492FDFFBE0AB88B9C23D536809595BDFBEE452ACB05641BC3029EF23BC46DF2C5119A42C191316C6C575986325116078AA8301DA3261D805664795B7C7E47AAA19DAF66E10924F758D0208B</code></pre>
|
||||
<pre><code>answer_with_hash = 728E114B50C9A9566EBD84992D5C070BB50A5F72BA0D89B545D4BC8C8E28356EC7EC04783D44C5CBB592486AF0114C1D2BFA08377E802A2C03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007B372ED75B2027C92499D288D6E5CC541E4B8CEF5CD6B6ABB0E12657791D92B80803DC1EB742D0A6D50FBA7DD8EA1EF47FE3FBEB53CFF2CD99666EE6154C342C63717A9AE1252C6E96258425631F4DB5A9E09B117164AB46F20F9B0327C7018FE908BFB094A73FE53D471ADE41EF59AEB99E1D333E10529977CEF5BAEFE709A78AAB9B3F31B914D895A26D3EC6B17F9F6726B0C5FBE271D8C267DF08A0FE0F7821F36C5945A0D705BC7B57E8E6559ABD3A8A4888A7EB3EF93AD7097080CA157F491C1D166DC525BC2BC744318B03FD04A7F41E189ED647B7E78C80731C9463DF25E2A0C3055E6A0BAA8FAB6762B928C015812CC0F027D284C07D7345C4756FC351A1AF66DFEE4EE1D8E42B25
|
||||
answer = BA0D89B545D4BC8C8E28356EC7EC04783D44C5CBB592486AF0114C1D2BFA08377E802A2C03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007B372ED75B2027C92499D288D6E5CC541E4B8CEF5CD6B6ABB0E12657791D92B80803DC1EB742D0A6D50FBA7DD8EA1EF47FE3FBEB53CFF2CD99666EE6154C342C63717A9AE1252C6E96258425631F4DB5A9E09B117164AB46F20F9B0327C7018FE908BFB094A73FE53D471ADE41EF59AEB99E1D333E10529977CEF5BAEFE709A78AAB9B3F31B914D895A26D3EC6B17F9F6726B0C5FBE271D8C267DF08A0FE0F7821F36C5945A0D705BC7B57E8E6559ABD3A8A4888A7EB3EF93AD7097080CA157F491C1D166DC525BC2BC744318B03FD04A7F41E189ED647B7E78C80731C9463DF25E2A0C3055E6A0BAA8FAB6762B928C015812CC0F027D284C07D7345C4756FC351A1AF66DFEE4EE1D8E42B25</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 79 A0 39 7C 8E 1D 59 F9 0D 1F 7A 59
|
||||
0010 | 0D F3 A1 73 EB BD 76 FD 56 BE 14 75 ED 45 3B DC
|
||||
0020 | 80 7F EC 41 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 45 D4 BC 8C 8E 28 35 6E C7 EC 04 78
|
||||
0010 | 3D 44 C5 CB B5 92 48 6A F0 11 4C 1D 2B FA 08 37
|
||||
0020 | 7E 80 2A 2C 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 = BA0D89B579A0397C8E1D59F90D1F7A590DF3A173EBBD76FD56BE1475ED453BDC807FEC4
|
|||
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 | 6B 7C 39 1F 02 81 E9 8F FB 36 DF 7D 94 07 E4 6C
|
||||
0140 | 89 EF 28 4A D5 37 F0 24 FF 1B 12 E9 B9 37 ED 46
|
||||
0150 | CC 0B E8 DB 5D 37 5E 4D AB A4 33 62 8D 37 A5 93
|
||||
0160 | AA D7 83 C5 28 39 10 22 E6 58 86 CA C6 2B 4B AE
|
||||
0170 | 5B 6B CC 50 8A 64 E8 53 24 2D E3 5A EC 2E E8 E0
|
||||
0180 | 44 19 1F 54 F9 F8 85 6E 37 B0 BD 04 47 0D FA F5
|
||||
0190 | 2B CC 6A 67 F3 2A AA 8C 94 72 C0 0C 83 6B 98 00
|
||||
01A0 | 62 10 17 F3 2A 88 5F B0 83 0B 92 B8 66 D1 E9 CB
|
||||
01B0 | 1C 70 64 69 62 5F 07 02 99 D0 9C 35 EA 5D F2 4A
|
||||
01C0 | BF 47 F9 72 3D 90 F3 84 89 8B A1 06 59 FA 1F 72
|
||||
01D0 | 8B 6F 17 78 C2 36 4D DB 4F 41 E0 E7 E1 66 D5 22
|
||||
01E0 | 98 7A 24 45 44 30 DF 60 70 A1 EA 50 26 EB 1C B1
|
||||
01F0 | A4 92 FD FF BE 0A B8 8B 9C 23 D5 36 80 95 95 BD
|
||||
0200 | FB EE 45 2A CB 05 64 1B C3 02 9E F2 3B C4 6D F2
|
||||
0210 | C5 11 9A 42 C1 91 31 6C 6C 57 59 86 32 51 16 07
|
||||
0220 | 8A A8 30 1D A3 26 1D 80 56 64 79 5B 7C 7E 47 AA
|
||||
0230 | A1 9D AF 66</code></pre>
|
||||
0130 | 7B 37 2E D7 5B 20 27 C9 24 99 D2 88 D6 E5 CC 54
|
||||
0140 | 1E 4B 8C EF 5C D6 B6 AB B0 E1 26 57 79 1D 92 B8
|
||||
0150 | 08 03 DC 1E B7 42 D0 A6 D5 0F BA 7D D8 EA 1E F4
|
||||
0160 | 7F E3 FB EB 53 CF F2 CD 99 66 6E E6 15 4C 34 2C
|
||||
0170 | 63 71 7A 9A E1 25 2C 6E 96 25 84 25 63 1F 4D B5
|
||||
0180 | A9 E0 9B 11 71 64 AB 46 F2 0F 9B 03 27 C7 01 8F
|
||||
0190 | E9 08 BF B0 94 A7 3F E5 3D 47 1A DE 41 EF 59 AE
|
||||
01A0 | B9 9E 1D 33 3E 10 52 99 77 CE F5 BA EF E7 09 A7
|
||||
01B0 | 8A AB 9B 3F 31 B9 14 D8 95 A2 6D 3E C6 B1 7F 9F
|
||||
01C0 | 67 26 B0 C5 FB E2 71 D8 C2 67 DF 08 A0 FE 0F 78
|
||||
01D0 | 21 F3 6C 59 45 A0 D7 05 BC 7B 57 E8 E6 55 9A BD
|
||||
01E0 | 3A 8A 48 88 A7 EB 3E F9 3A D7 09 70 80 CA 15 7F
|
||||
01F0 | 49 1C 1D 16 6D C5 25 BC 2B C7 44 31 8B 03 FD 04
|
||||
0200 | A7 F4 1E 18 9E D6 47 B7 E7 8C 80 73 1C 94 63 DF
|
||||
0210 | 25 E2 A0 C3 05 5E 6A 0B AA 8F AB 67 62 B9 28 C0
|
||||
0220 | 15 81 2C C0 F0 27 D2 84 C0 7D 73 45 C4 75 6F C3
|
||||
0230 | 51 A1 AF 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 = BA0D89B579A0397C8E1D59F90D1F7A590DF3A173EBBD76FD56BE1475ED453BDC807FEC4
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>79A0397C8E1D59F90D1F7A590DF3A173</code></td>
|
||||
<td><code>45D4BC8C8E28356EC7EC04783D44C5CB</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>EBBD76FD56BE1475ED453BDC807FEC41</code></td>
|
||||
<td><code>B592486AF0114C1D2BFA08377E802A2C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B579A0397C8E1D59F90D1F7A590DF3A173EBBD76FD56BE1475ED453BDC807FEC4
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE0001006B7C391F0281E98FFB36DF7D</code> <code>9407E46C89EF284AD537F024FF1B12E9</code> <code>B937ED46CC0BE8DB5D375E4DABA43362</code> <code>8D37A593AAD783C528391022E65886CA</code> <code>C62B4BAE5B6BCC508A64E853242DE35A</code> <code>EC2EE8E044191F54F9F8856E37B0BD04</code> <code>470DFAF52BCC6A67F32AAA8C9472C00C</code> <code>836B9800621017F32A885FB0830B92B8</code> <code>66D1E9CB1C706469625F070299D09C35</code> <code>EA5DF24ABF47F9723D90F384898BA106</code> <code>59FA1F728B6F1778C2364DDB4F41E0E7</code> <code>E166D522987A24454430DF6070A1EA50</code> <code>26EB1CB1A492FDFFBE0AB88B9C23D536</code> <code>809595BDFBEE452ACB05641BC3029EF2</code> <code>3BC46DF2C5119A42C191316C6C575986</code> <code>325116078AA8301DA3261D805664795B</code><br> <code>7C7E47AA</code></td>
|
||||
<td><code>FE0001007B372ED75B2027C92499D288</code> <code>D6E5CC541E4B8CEF5CD6B6ABB0E12657</code> <code>791D92B80803DC1EB742D0A6D50FBA7D</code> <code>D8EA1EF47FE3FBEB53CFF2CD99666EE6</code> <code>154C342C63717A9AE1252C6E96258425</code> <code>631F4DB5A9E09B117164AB46F20F9B03</code> <code>27C7018FE908BFB094A73FE53D471ADE</code> <code>41EF59AEB99E1D333E10529977CEF5BA</code> <code>EFE709A78AAB9B3F31B914D895A26D3E</code> <code>C6B17F9F6726B0C5FBE271D8C267DF08</code> <code>A0FE0F7821F36C5945A0D705BC7B57E8</code> <code>E6559ABD3A8A4888A7EB3EF93AD70970</code> <code>80CA157F491C1D166DC525BC2BC74431</code> <code>8B03FD04A7F41E189ED647B7E78C8073</code> <code>1C9463DF25E2A0C3055E6A0BAA8FAB67</code> <code>62B928C015812CC0F027D284C07D7345</code><br> <code>C4756FC3</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>A19DAF66</code> (1722785185 in decimal)</td>
|
||||
<td><code>51A1AF66</code> (1722786129 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B579A0397C8E1D59F90D1F7A590DF3A173EBBD76FD56BE1475ED453BDC807FEC4
|
|||
<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 = 8E94E46A158661E823B69E8953B54710FD306EBE0939E85B3533CEA20F6FA3B6F02FBEC94BFA547B8230F62847C3333171128B6B0E0E245F4C9795089299E89F11E33E927C4D833D2BA68E89D54A1F7DC31AA902EAEF49281548731899D9644ACE8572076141AEAA92D368A7D2F775461934969C9D932CBF456A2D34B788A80C8B4591D3E81945567B138375DF80410C65E5E7F7C28314F9CE6F1769FAD3108E070C83D74AA21B5E40B0E10CF315EA083D2AC4AE8E62E415AAA644D0D905E3867678D3ACEF0F84FA08A7CF020EF16255029954B4AAA81F0D1ABBA2DB8B236F6572ED187BF054E7CA3B88C853006BB5BBB928FC00CF461DBAE44F8996A605A460</code></pre>
|
||||
<pre><code>b = 8E9AF46062C669AEED966E43BFDA9CF50452A89D68FC7B46054D4094948274956201BF0ECDE8949501A792DD83DE5E0553373A36297261EF04F10186ADEED1899FE0216F7F31CC2C2F7C2B8DA72AD8200D8176AAA8AF09FFAABE8D337D353BE7A0558E958F6A0A23AE8C52880639F888795988957EC5DA7E99ED5FC97A8EF76003B85D320B6810BE885555FD48A9330A4FA3EBF8D78EEA1536AE0EB8A6183D95D464E726F3C1AAE68ED6FEE4AE84CFE0C76BBA02591C9B86F4F6DC68D12A1477AB589CDFB78543FA3614F52E1FCF3BDB707B56C5FA0E88408767465EE264F5D8FFA36CADF9E4764C535ABFDE4821C80E7C201E2C354A02B644FF299D3835CE18</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 = 719F00FFF6608793E899017FEABAEC320035F8A079D24B6090E54DD96569775E4BCBC74C53C2B6863B44C2C310E1933F4D2730E10704DCD19A5F1EEF882589CA6C253FA7C4E37A23C052D0DFFE6E5AE9F5CB2BA7ADAAA06BC4CA4CA8E612A4115FB462895DB654033FA46E9000981A0762BB6EFB1A5357F8CF6197A7BFB5D0076F5EC0E3215CC4EF9181B38D1ACC14167A5E0651962B6CB6A0A59CF2F66835E8E8907DB2DC268FFC93167D30833DBC66A7256EBE899795EF8C2788890CC8E26238AACBFB4DAC9E62AFF3269727B916D202F6C33D916F0DB016D09C1D304A407B1D87C49824D83273164767CF710FD256A2A556559C0F9E97285F707FE17BE9FD</code></pre>
|
||||
<pre><code>g_b = 26A58F6AA734DFBB1F43D7C7639BD3DA6562EA090EEA0CEB45166B45A5CDC0E8E66D0D76FDFF6D9DB01CD6DA09C0FCBB9033AB9CF5AE325B3DED0B57B09E672AC83D820CFF460C4F941E4BA4DEA3498987E3AB6872792F637CECE554FD1B8D218B2DAC9CEC32B88594B8DA80DD9D05C5FF98EBF658D5622642D5892A7E0D16B1DE2C04C00B981B3589C1525F14BB4DCCC728F1E2B568734B7B90017B308EC1CB887BEFE8544A891685AF8699DA8EB77EC428511E0D522D64A0A94794B98D493C8B6137CFC99D63B5E451FD33FCCE8D698F8388DEEC2E25ED531E27AA5769E510CC21F681CB930B3E7D4CDFC99BFF118A1119AAE368C755862301A18D627D538A</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 79 A0 39 7C 8E 1D 59 F9 0D 1F 7A 59
|
||||
0010 | 0D F3 A1 73 EB BD 76 FD 56 BE 14 75 ED 45 3B DC
|
||||
0020 | 80 7F EC 41 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 71 9F 00 FF F6 60 87 93 E8 99 01 7F EA BA EC 32
|
||||
0040 | 00 35 F8 A0 79 D2 4B 60 90 E5 4D D9 65 69 77 5E
|
||||
0050 | 4B CB C7 4C 53 C2 B6 86 3B 44 C2 C3 10 E1 93 3F
|
||||
0060 | 4D 27 30 E1 07 04 DC D1 9A 5F 1E EF 88 25 89 CA
|
||||
0070 | 6C 25 3F A7 C4 E3 7A 23 C0 52 D0 DF FE 6E 5A E9
|
||||
0080 | F5 CB 2B A7 AD AA A0 6B C4 CA 4C A8 E6 12 A4 11
|
||||
0090 | 5F B4 62 89 5D B6 54 03 3F A4 6E 90 00 98 1A 07
|
||||
00A0 | 62 BB 6E FB 1A 53 57 F8 CF 61 97 A7 BF B5 D0 07
|
||||
00B0 | 6F 5E C0 E3 21 5C C4 EF 91 81 B3 8D 1A CC 14 16
|
||||
00C0 | 7A 5E 06 51 96 2B 6C B6 A0 A5 9C F2 F6 68 35 E8
|
||||
00D0 | E8 90 7D B2 DC 26 8F FC 93 16 7D 30 83 3D BC 66
|
||||
00E0 | A7 25 6E BE 89 97 95 EF 8C 27 88 89 0C C8 E2 62
|
||||
00F0 | 38 AA CB FB 4D AC 9E 62 AF F3 26 97 27 B9 16 D2
|
||||
0100 | 02 F6 C3 3D 91 6F 0D B0 16 D0 9C 1D 30 4A 40 7B
|
||||
0110 | 1D 87 C4 98 24 D8 32 73 16 47 67 CF 71 0F D2 56
|
||||
0120 | A2 A5 56 55 9C 0F 9E 97 28 5F 70 7F E1 7B E9 FD</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 45 D4 BC 8C 8E 28 35 6E C7 EC 04 78
|
||||
0010 | 3D 44 C5 CB B5 92 48 6A F0 11 4C 1D 2B FA 08 37
|
||||
0020 | 7E 80 2A 2C 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 26 A5 8F 6A A7 34 DF BB 1F 43 D7 C7 63 9B D3 DA
|
||||
0040 | 65 62 EA 09 0E EA 0C EB 45 16 6B 45 A5 CD C0 E8
|
||||
0050 | E6 6D 0D 76 FD FF 6D 9D B0 1C D6 DA 09 C0 FC BB
|
||||
0060 | 90 33 AB 9C F5 AE 32 5B 3D ED 0B 57 B0 9E 67 2A
|
||||
0070 | C8 3D 82 0C FF 46 0C 4F 94 1E 4B A4 DE A3 49 89
|
||||
0080 | 87 E3 AB 68 72 79 2F 63 7C EC E5 54 FD 1B 8D 21
|
||||
0090 | 8B 2D AC 9C EC 32 B8 85 94 B8 DA 80 DD 9D 05 C5
|
||||
00A0 | FF 98 EB F6 58 D5 62 26 42 D5 89 2A 7E 0D 16 B1
|
||||
00B0 | DE 2C 04 C0 0B 98 1B 35 89 C1 52 5F 14 BB 4D CC
|
||||
00C0 | C7 28 F1 E2 B5 68 73 4B 7B 90 01 7B 30 8E C1 CB
|
||||
00D0 | 88 7B EF E8 54 4A 89 16 85 AF 86 99 DA 8E B7 7E
|
||||
00E0 | C4 28 51 1E 0D 52 2D 64 A0 A9 47 94 B9 8D 49 3C
|
||||
00F0 | 8B 61 37 CF C9 9D 63 B5 E4 51 FD 33 FC CE 8D 69
|
||||
0100 | 8F 83 88 DE EC 2E 25 ED 53 1E 27 AA 57 69 E5 10
|
||||
0110 | CC 21 F6 81 CB 93 0B 3E 7D 4C DF C9 9B FF 11 8A
|
||||
0120 | 11 19 AA E3 68 C7 55 86 23 01 A1 8D 62 7D 53 8A</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -658,19 +658,19 @@ answer = BA0D89B579A0397C8E1D59F90D1F7A590DF3A173EBBD76FD56BE1475ED453BDC807FEC4
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>79A0397C8E1D59F90D1F7A590DF3A173</code></td>
|
||||
<td><code>45D4BC8C8E28356EC7EC04783D44C5CB</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>EBBD76FD56BE1475ED453BDC807FEC41</code></td>
|
||||
<td><code>B592486AF0114C1D2BFA08377E802A2C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE000100719F00FFF6608793E899017F</code> <code>EABAEC320035F8A079D24B6090E54DD9</code> <code>6569775E4BCBC74C53C2B6863B44C2C3</code> <code>10E1933F4D2730E10704DCD19A5F1EEF</code> <code>882589CA6C253FA7C4E37A23C052D0DF</code> <code>FE6E5AE9F5CB2BA7ADAAA06BC4CA4CA8</code> <code>E612A4115FB462895DB654033FA46E90</code> <code>00981A0762BB6EFB1A5357F8CF6197A7</code> <code>BFB5D0076F5EC0E3215CC4EF9181B38D</code> <code>1ACC14167A5E0651962B6CB6A0A59CF2</code> <code>F66835E8E8907DB2DC268FFC93167D30</code> <code>833DBC66A7256EBE899795EF8C278889</code> <code>0CC8E26238AACBFB4DAC9E62AFF32697</code> <code>27B916D202F6C33D916F0DB016D09C1D</code> <code>304A407B1D87C49824D83273164767CF</code> <code>710FD256A2A556559C0F9E97285F707F</code><br> <code>E17BE9FD</code></td>
|
||||
<td><code>FE00010026A58F6AA734DFBB1F43D7C7</code> <code>639BD3DA6562EA090EEA0CEB45166B45</code> <code>A5CDC0E8E66D0D76FDFF6D9DB01CD6DA</code> <code>09C0FCBB9033AB9CF5AE325B3DED0B57</code> <code>B09E672AC83D820CFF460C4F941E4BA4</code> <code>DEA3498987E3AB6872792F637CECE554</code> <code>FD1B8D218B2DAC9CEC32B88594B8DA80</code> <code>DD9D05C5FF98EBF658D5622642D5892A</code> <code>7E0D16B1DE2C04C00B981B3589C1525F</code> <code>14BB4DCCC728F1E2B568734B7B90017B</code> <code>308EC1CB887BEFE8544A891685AF8699</code> <code>DA8EB77EC428511E0D522D64A0A94794</code> <code>B98D493C8B6137CFC99D63B5E451FD33</code> <code>FCCE8D698F8388DEEC2E25ED531E27AA</code> <code>5769E510CC21F681CB930B3E7D4CDFC9</code> <code>9BFF118A1119AAE368C755862301A18D</code><br> <code>627D538A</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 = BA0D89B579A0397C8E1D59F90D1F7A590DF3A173EBBD76FD56BE1475ED453BDC807FEC4
|
|||
<!-- 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 = 54B6436679A0397C8E1D59F90D1F7A590DF3A173EBBD76FD56BE1475ED453BDC807FEC410000000000000000FE000100719F00FFF6608793E899017FEABAEC320035F8A079D24B6090E54DD96569775E4BCBC74C53C2B6863B44C2C310E1933F4D2730E10704DCD19A5F1EEF882589CA6C253FA7C4E37A23C052D0DFFE6E5AE9F5CB2BA7ADAAA06BC4CA4CA8E612A4115FB462895DB654033FA46E9000981A0762BB6EFB1A5357F8CF6197A7BFB5D0076F5EC0E3215CC4EF9181B38D1ACC14167A5E0651962B6CB6A0A59CF2F66835E8E8907DB2DC268FFC93167D30833DBC66A7256EBE899795EF8C2788890CC8E26238AACBFB4DAC9E62AFF3269727B916D202F6C33D916F0DB016D09C1D304A407B1D87C49824D83273164767CF710FD256A2A556559C0F9E97285F707FE17BE9FD
|
||||
padding = 6C38CE10F66C699C51775B8E
|
||||
tmp_aes_key = 1DE16F12FE433D4AEC8A6AC13C5FDCF4D9F9F59550F1B01F80FA552B647A5CD6
|
||||
tmp_aes_iv = FBC5D6E18337466B169164C8064BA0E4B4E9E30B0084E07E523289A19ABE5083</code></pre>
|
||||
<pre><code>data = 54B6436645D4BC8C8E28356EC7EC04783D44C5CBB592486AF0114C1D2BFA08377E802A2C0000000000000000FE00010026A58F6AA734DFBB1F43D7C7639BD3DA6562EA090EEA0CEB45166B45A5CDC0E8E66D0D76FDFF6D9DB01CD6DA09C0FCBB9033AB9CF5AE325B3DED0B57B09E672AC83D820CFF460C4F941E4BA4DEA3498987E3AB6872792F637CECE554FD1B8D218B2DAC9CEC32B88594B8DA80DD9D05C5FF98EBF658D5622642D5892A7E0D16B1DE2C04C00B981B3589C1525F14BB4DCCC728F1E2B568734B7B90017B308EC1CB887BEFE8544A891685AF8699DA8EB77EC428511E0D522D64A0A94794B98D493C8B6137CFC99D63B5E451FD33FCCE8D698F8388DEEC2E25ED531E27AA5769E510CC21F681CB930B3E7D4CDFC99BFF118A1119AAE368C755862301A18D627D538A
|
||||
padding = 33FD8C74EC39032F8C203D81
|
||||
tmp_aes_key = 125C884BD889776878C0861A7B0AEA66CA6D618956A3120CDA26FD732E1D1E61
|
||||
tmp_aes_iv = ECA7E6752A58FAB551DAD4F8C65314F97C8A662A372AB5B617719D9252340308</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 = 9EE8F72F997DCA49EC486111DC6A5A1B9004685626C456EF9A5A4592699CCA49C71BA6BE02BBE5AF39E7497D96029EBA38D19AB35569FBF5681D6AB3F2AE0077329538A1375CAFBD6BD0EB41D3436AA5CB63E7400F028B20D80B674A9415EF920F3257A5B1930914DB8B24A663EC148E2B0BD131712E01A7D882058B997C4B4559AD7E29464C32B32F8E467992960BA0A5AFB4660EF288F78A5DACE79A245A9C42695E41A60656145E5DB6E1FBEA5C8C64E1AC29B9F92A8604388E13D898DD0B43B96B8274BCA010B9245DF79432F67C8A91A94A8BF0CA92E115C927E95FCBA812F40998154D7CC93E09031B3F70EC85A9FB896E80E4E0787CAD5F1EA596B146C38F80C648D546B7A332DCC0A5DCDB45BCDDB850C73B500E2B37FBCE5315B3716F1858DC4E1CCA52911C734B2F6E76B0937A1940BB6997429B689A9229E75D54D5F3B7A759C73EAF75DBD53687B30AF6</code></pre>
|
||||
<pre><code>encrypted_data = 042800409985A18D32C96410D05FBAEB575EA6FDF0E9E25D88A2F24AFF652A5FB4F6CAB14DF385A052E54EF5AAD9DE4BBE0B56DFF05AD3AA8176343A86153520C6C583382C5943DA7312E2979BDB95A594AD7DBACCD6C48A92FB5919D20BF0990D3DE987D21C18BB4CC6815C94142D9D078EEFBA05702F10D8D684F74D2A1D733D282D821E440C166E0F14A4605885CE13A589BFF5A8374E82F88DFA6037679A170B2D2939848AB38BFC8EE043F46889D72068E4C632B289F67A4B650B7D03F51C2CA5926F5CB66E80DE96972C07A0CFE8274F1C1F321808159F9A43D0B653D4D6C8328A969A8448D077E6D7BC07BC36C5E6BA34BB4BB6831231D894BC129CE3BDBA3109FE88B857FE54FCE9C3EA16DF8DB6FA6562CF6D41C672B6BA5ECDDA465D7D8340A16249B08750CAC0849E0A70DCFC2CA609AD344C795838CDC7CFF70A1B0EBF4EB3CAC82FE9096A93DC2832E5</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 64 36 0D 00 A1 9D AF 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 79 A0 39 7C 8E 1D 59 F9
|
||||
0020 | 0D 1F 7A 59 0D F3 A1 73 EB BD 76 FD 56 BE 14 75
|
||||
0030 | ED 45 3B DC 80 7F EC 41 FE 50 01 00 9E E8 F7 2F
|
||||
0040 | 99 7D CA 49 EC 48 61 11 DC 6A 5A 1B 90 04 68 56
|
||||
0050 | 26 C4 56 EF 9A 5A 45 92 69 9C CA 49 C7 1B A6 BE
|
||||
0060 | 02 BB E5 AF 39 E7 49 7D 96 02 9E BA 38 D1 9A B3
|
||||
0070 | 55 69 FB F5 68 1D 6A B3 F2 AE 00 77 32 95 38 A1
|
||||
0080 | 37 5C AF BD 6B D0 EB 41 D3 43 6A A5 CB 63 E7 40
|
||||
0090 | 0F 02 8B 20 D8 0B 67 4A 94 15 EF 92 0F 32 57 A5
|
||||
00A0 | B1 93 09 14 DB 8B 24 A6 63 EC 14 8E 2B 0B D1 31
|
||||
00B0 | 71 2E 01 A7 D8 82 05 8B 99 7C 4B 45 59 AD 7E 29
|
||||
00C0 | 46 4C 32 B3 2F 8E 46 79 92 96 0B A0 A5 AF B4 66
|
||||
00D0 | 0E F2 88 F7 8A 5D AC E7 9A 24 5A 9C 42 69 5E 41
|
||||
00E0 | A6 06 56 14 5E 5D B6 E1 FB EA 5C 8C 64 E1 AC 29
|
||||
00F0 | B9 F9 2A 86 04 38 8E 13 D8 98 DD 0B 43 B9 6B 82
|
||||
0100 | 74 BC A0 10 B9 24 5D F7 94 32 F6 7C 8A 91 A9 4A
|
||||
0110 | 8B F0 CA 92 E1 15 C9 27 E9 5F CB A8 12 F4 09 98
|
||||
0120 | 15 4D 7C C9 3E 09 03 1B 3F 70 EC 85 A9 FB 89 6E
|
||||
0130 | 80 E4 E0 78 7C AD 5F 1E A5 96 B1 46 C3 8F 80 C6
|
||||
0140 | 48 D5 46 B7 A3 32 DC C0 A5 DC DB 45 BC DD B8 50
|
||||
0150 | C7 3B 50 0E 2B 37 FB CE 53 15 B3 71 6F 18 58 DC
|
||||
0160 | 4E 1C CA 52 91 1C 73 4B 2F 6E 76 B0 93 7A 19 40
|
||||
0170 | BB 69 97 42 9B 68 9A 92 29 E7 5D 54 D5 F3 B7 A7
|
||||
0180 | 59 C7 3E AF 75 DB D5 36 87 B3 0A F6</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 E4 90 09 00 51 A1 AF 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 45 D4 BC 8C 8E 28 35 6E
|
||||
0020 | C7 EC 04 78 3D 44 C5 CB B5 92 48 6A F0 11 4C 1D
|
||||
0030 | 2B FA 08 37 7E 80 2A 2C FE 50 01 00 04 28 00 40
|
||||
0040 | 99 85 A1 8D 32 C9 64 10 D0 5F BA EB 57 5E A6 FD
|
||||
0050 | F0 E9 E2 5D 88 A2 F2 4A FF 65 2A 5F B4 F6 CA B1
|
||||
0060 | 4D F3 85 A0 52 E5 4E F5 AA D9 DE 4B BE 0B 56 DF
|
||||
0070 | F0 5A D3 AA 81 76 34 3A 86 15 35 20 C6 C5 83 38
|
||||
0080 | 2C 59 43 DA 73 12 E2 97 9B DB 95 A5 94 AD 7D BA
|
||||
0090 | CC D6 C4 8A 92 FB 59 19 D2 0B F0 99 0D 3D E9 87
|
||||
00A0 | D2 1C 18 BB 4C C6 81 5C 94 14 2D 9D 07 8E EF BA
|
||||
00B0 | 05 70 2F 10 D8 D6 84 F7 4D 2A 1D 73 3D 28 2D 82
|
||||
00C0 | 1E 44 0C 16 6E 0F 14 A4 60 58 85 CE 13 A5 89 BF
|
||||
00D0 | F5 A8 37 4E 82 F8 8D FA 60 37 67 9A 17 0B 2D 29
|
||||
00E0 | 39 84 8A B3 8B FC 8E E0 43 F4 68 89 D7 20 68 E4
|
||||
00F0 | C6 32 B2 89 F6 7A 4B 65 0B 7D 03 F5 1C 2C A5 92
|
||||
0100 | 6F 5C B6 6E 80 DE 96 97 2C 07 A0 CF E8 27 4F 1C
|
||||
0110 | 1F 32 18 08 15 9F 9A 43 D0 B6 53 D4 D6 C8 32 8A
|
||||
0120 | 96 9A 84 48 D0 77 E6 D7 BC 07 BC 36 C5 E6 BA 34
|
||||
0130 | BB 4B B6 83 12 31 D8 94 BC 12 9C E3 BD BA 31 09
|
||||
0140 | FE 88 B8 57 FE 54 FC E9 C3 EA 16 DF 8D B6 FA 65
|
||||
0150 | 62 CF 6D 41 C6 72 B6 BA 5E CD DA 46 5D 7D 83 40
|
||||
0160 | A1 62 49 B0 87 50 CA C0 84 9E 0A 70 DC FC 2C A6
|
||||
0170 | 09 AD 34 4C 79 58 38 CD C7 CF F7 0A 1B 0E BF 4E
|
||||
0180 | B3 CA C8 2F E9 09 6A 93 DC 28 32 E5</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>64360D00A19DAF66</code></td>
|
||||
<td><code>E490090051A1AF66</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>79A0397C8E1D59F90D1F7A590DF3A173</code></td>
|
||||
<td><code>45D4BC8C8E28356EC7EC04783D44C5CB</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>EBBD76FD56BE1475ED453BDC807FEC41</code></td>
|
||||
<td><code>B592486AF0114C1D2BFA08377E802A2C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE5001009EE8F72F997DCA49EC486111</code> <code>DC6A5A1B9004685626C456EF9A5A4592</code> <code>699CCA49C71BA6BE02BBE5AF39E7497D</code> <code>96029EBA38D19AB35569FBF5681D6AB3</code> <code>F2AE0077329538A1375CAFBD6BD0EB41</code> <code>D3436AA5CB63E7400F028B20D80B674A</code> <code>9415EF920F3257A5B1930914DB8B24A6</code> <code>63EC148E2B0BD131712E01A7D882058B</code> <code>997C4B4559AD7E29464C32B32F8E4679</code> <code>92960BA0A5AFB4660EF288F78A5DACE7</code> <code>9A245A9C42695E41A60656145E5DB6E1</code> <code>FBEA5C8C64E1AC29B9F92A8604388E13</code> <code>D898DD0B43B96B8274BCA010B9245DF7</code> <code>9432F67C8A91A94A8BF0CA92E115C927</code> <code>E95FCBA812F40998154D7CC93E09031B</code> <code>3F70EC85A9FB896E80E4E0787CAD5F1E</code> <code>A596B146C38F80C648D546B7A332DCC0</code> <code>A5DCDB45BCDDB850C73B500E2B37FBCE</code> <code>5315B3716F1858DC4E1CCA52911C734B</code> <code>2F6E76B0937A1940BB6997429B689A92</code> <code>29E75D54D5F3B7A759C73EAF75DBD536</code><br> <code>87B30AF6</code></td>
|
||||
<td><code>FE500100042800409985A18D32C96410</code> <code>D05FBAEB575EA6FDF0E9E25D88A2F24A</code> <code>FF652A5FB4F6CAB14DF385A052E54EF5</code> <code>AAD9DE4BBE0B56DFF05AD3AA8176343A</code> <code>86153520C6C583382C5943DA7312E297</code> <code>9BDB95A594AD7DBACCD6C48A92FB5919</code> <code>D20BF0990D3DE987D21C18BB4CC6815C</code> <code>94142D9D078EEFBA05702F10D8D684F7</code> <code>4D2A1D733D282D821E440C166E0F14A4</code> <code>605885CE13A589BFF5A8374E82F88DFA</code> <code>6037679A170B2D2939848AB38BFC8EE0</code> <code>43F46889D72068E4C632B289F67A4B65</code> <code>0B7D03F51C2CA5926F5CB66E80DE9697</code> <code>2C07A0CFE8274F1C1F321808159F9A43</code> <code>D0B653D4D6C8328A969A8448D077E6D7</code> <code>BC07BC36C5E6BA34BB4BB6831231D894</code> <code>BC129CE3BDBA3109FE88B857FE54FCE9</code> <code>C3EA16DF8DB6FA6562CF6D41C672B6BA</code> <code>5ECDDA465D7D8340A16249B08750CAC0</code> <code>849E0A70DCFC2CA609AD344C795838CD</code> <code>C7CFF70A1B0EBF4EB3CAC82FE9096A93</code><br> <code>DC2832E5</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 = 8C3545F9D0677B4535D0D38E0A56C4F25376934147F16D79EB339413223EE71B853B54CDC5968289895A4BBAD412E790C389DD044EA185C4CD0733D25FB6846FD9C4CD3A24FAFE904224C2ECADD5B9B909579EAEADF7AC81EFCBA870B40E818CDC3E0310CA9F259F5C6FF5C26319D35CDD6143620F4C94A695D927B4DDF73C746BC5D003B3AA3F2FED5B7D453E9D6285BBE597627D80CEA74FBCE774CA6905299A5094315BA910BD598BF4D7954A11C352333DB9CA98F7D4EEAD049BFCE4F3426BFC1CFF819CD75CAE6943C65DCB038E01499754458A3A8D753F86356E49830F913DBB3FFCCC85EBF2740DA1B51EBDE23E3BE8C70F8222B1F13F4730621B87A9</code></pre>
|
||||
<pre><code>auth_key = 5B940806DD5317F3C839721DF97448ABD6CABBB765F34E4AE6E0E7D6B7B201E7D77176D8E014F9445B5CDE0E86E5B6BFE1C5F0CA435FEF977B50F153BA6E214A6B42368E9DAC4C93478383574416FC7B7510432C68E1DB5CE010717322B1CD59762B12D837C26C7D070275DA3D5BD38020DE34C7DD926BF389650B056125808D8ED7966D019E350AEAD519DA2C368CB3D05CD139C35F8E4824B75411B6C6496492630BA8EE590B50F8233959E543A1337E39EDC6D80B3728E93CFCB3C35C3BAA52109E5CC42CDCF7D15176D06915AED93F677C82B7B5B6AF2772E869D7FA59F0B1F60CF6D766CCDAB754978E5B5992FC5AF0282594FE8E99A7F586ECC0F2D579</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 4C BD B6 A2 9D AF 66
|
||||
0010 | 7C 00 00 00 34 F7 CB 3B 79 A0 39 7C 8E 1D 59 F9
|
||||
0020 | 0D 1F 7A 59 0D F3 A1 73 EB BD 76 FD 56 BE 14 75
|
||||
0030 | ED 45 3B DC 80 7F EC 41 7B 18 4D 52 62 E5 09 9F
|
||||
0040 | 2F AD D5 30 4E 7F 95 28</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 40 B3 40 52 A1 AF 66
|
||||
0010 | A8 00 00 00 34 F7 CB 3B 45 D4 BC 8C 8E 28 35 6E
|
||||
0020 | C7 EC 04 78 3D 44 C5 CB B5 92 48 6A F0 11 4C 1D
|
||||
0030 | 2B FA 08 37 7E 80 2A 2C 9D 50 0B 0E 37 5F D3 AD
|
||||
0040 | D1 F4 E6 BE 16 39 67 8A</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>014CBDB6A29DAF66</code></td>
|
||||
<td><code>0140B34052A1AF66</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>7C000000</code> (124 in decimal)</td>
|
||||
<td><code>A8000000</code> (168 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>79A0397C8E1D59F90D1F7A590DF3A173</code></td>
|
||||
<td><code>45D4BC8C8E28356EC7EC04783D44C5CB</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>EBBD76FD56BE1475ED453BDC807FEC41</code></td>
|
||||
<td><code>B592486AF0114C1D2BFA08377E802A2C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>7B184D5262E5099F2FADD5304E7F9528</code></td>
|
||||
<td><code>9D500B0E375FD3ADD1F4E6BE1639678A</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