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
41d77adb17
commit
9903ee91ab
5 changed files with 212 additions and 212 deletions
|
@ -79,9 +79,9 @@
|
|||
---functions---
|
||||
|
||||
<a href='/method/account.getChannelRestrictedStatusEmojis'>account.getChannelRestrictedStatusEmojis</a>#35a9e0d5 hash:<a href='/type/long'>long</a> = <a href='/type/EmojiList'>EmojiList</a>;</code></pre>
|
||||
<p>Channel custom emoji <a href="/constructor/stickerSet">stickersets</a>, i.e. <a href="/constructor/stickerSet">stickersets</a> with the <code>channel_emoji_status</code> flag set, can be used in channel custom emoji statuses. </p>
|
||||
<p><strong>Only</strong> channel custom emoji <a href="/constructor/stickerSet">stickersets</a>, i.e. <a href="/constructor/stickerSet">stickersets</a> with the <code>channel_emoji_status</code> flag set, can be used in channel custom emoji statuses. </p>
|
||||
<p>Note, however, that some specific <a href="/api/custom-emoji">custom emojis</a> from channel custom emoji stickersets cannot be used as channel statuses: use <a href="/method/account.getChannelRestrictedStatusEmojis">account.getChannelRestrictedStatusEmojis</a> to fetch the full list of IDs of custom emojis that cannot be used in channel statuses.</p>
|
||||
<p>Note that channels gain the ability to change their status emoji only after reaching at least the <a href="/api/boost">boost level</a> specified in the <a href="/api/config#channel-emoji-status-level-min"><code>channel_emoji_status_level_min</code> config parameter</a>. </p>
|
||||
<p>Channels gain the ability to change their status emoji only after reaching at least the <a href="/api/boost">boost level</a> specified in the <a href="/api/config#channel-emoji-status-level-min"><code>channel_emoji_status_level_min</code> config parameter</a>. </p>
|
||||
<h3><a class="anchor" href="#featured-emoji-status-stickersets" id="featured-emoji-status-stickersets" name="featured-emoji-status-stickersets"><i class="anchor-icon"></i></a>Featured emoji status stickersets</h3>
|
||||
<pre><code><a href='/constructor/emojiStatus'>emojiStatus</a>#929b619d document_id:<a href='/type/long'>long</a> = <a href='/type/EmojiStatus'>EmojiStatus</a>;
|
||||
|
||||
|
|
|
@ -629,7 +629,7 @@
|
|||
<li>Added <a href="/api/push-updates#possible-notifications">CHAT_MESSAGE_STORY</a> - <code>{1} shared a story to the group</code></li>
|
||||
<li>Added <a href="/api/push-updates#possible-notifications">MESSAGE_STORY</a> - <code>{1} shared a story with you</code></li>
|
||||
<li>Added <a href="/api/push-updates#possible-notifications">MESSAGE_STORY_MENTION</a> - <code>{1} mentioned you in a story</code></li>
|
||||
<li>Added <a href="/api/push-updates#possible-notifications">STORY_HIDDEN_AUTHOR</a> - <code>A new story was posted (emitted when previews are hidden for this peer)</code></li>
|
||||
<li>Added <a href="/api/push-updates#possible-notifications">STORY_HIDDEN_AUTHOR</a> - <code>A new story was posted (comment: emitted when previews are hidden for this peer)</code></li>
|
||||
<li>Added <a href="/api/push-updates#possible-notifications">STORY_NOTEXT</a> - <code>{1} posted a story</code></li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#schema" id="schema" name="schema"><i class="anchor-icon"></i></a>Schema</h4>
|
||||
|
|
|
@ -124,8 +124,8 @@
|
|||
<p>Some global privacy settings can also be fetched and modified using <a href="/method/account.getGlobalPrivacySettings">account.getGlobalPrivacySettings</a> and <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a>. </p>
|
||||
<p>Global privacy settings are represented by the <a href="/constructor/globalPrivacySettings">globalPrivacySettings</a> constructor, that contains the following parameters:</p>
|
||||
<ul>
|
||||
<li><strong>archive_and_mute_new_noncontact_peers</strong> - Whether to archive and mute new chats from non-contacts |</li>
|
||||
<li><strong>keep_archived_unmuted</strong> - Whether unmuted chats will be kept in the Archive chat list when they get a new message. |</li>
|
||||
<li><strong>archive_and_mute_new_noncontact_peers</strong> - Whether to archive and mute new chats from non-contacts.</li>
|
||||
<li><strong>keep_archived_unmuted</strong> - Whether unmuted chats will be kept in the Archive chat list when they get a new message.</li>
|
||||
<li><strong>keep_archived_folders</strong> - Whether unmuted chats that are always included or pinned in a <a href="/api/folders">folder</a>, will be kept in the Archive chat list when they get a new message. Ignored if <code>keep_archived_unmuted</code> is set.</li>
|
||||
</ul></div>
|
||||
|
||||
|
|
|
@ -1066,7 +1066,7 @@ Simple push works by sending a simple PUT request with a <code>version=number</c
|
|||
</tr>
|
||||
<tr>
|
||||
<td>STORY_HIDDEN_AUTHOR</td>
|
||||
<td>A new story was posted (emitted when previews are hidden for this peer)</td>
|
||||
<td>A new story was posted (comment: emitted when previews are hidden for this peer)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -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 2C DF 0C 00 F2 37 C5 65
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 D4 72 06 00 50 3D C5 65
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 40 67 09 F6 12 FA DF BE
|
||||
0020 | C3 F0 28 9D 0A A6 7E EF</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>2CDF0C00F237C565</code></td>
|
||||
<td><code>D4720600503DC565</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>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td><code>406709F612FADFBEC3F0289D0AA67EEF</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 AC D6 D1 F2 37 C5 65
|
||||
0010 | 58 00 00 00 63 24 16 05 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61
|
||||
0030 | 17 19 3C 56 D9 EA 86 02 08 17 CC 7C E1 44 9E E9
|
||||
0040 | 65 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 D8 31 75 50 3D C5 65
|
||||
0010 | A8 00 00 00 63 24 16 05 40 67 09 F6 12 FA DF BE
|
||||
0020 | C3 F0 28 9D 0A A6 7E EF E1 1D BC 3B C9 7D 91 A2
|
||||
0030 | 61 54 F9 32 AF 01 99 43 08 25 65 95 ED B7 76 67
|
||||
0040 | 97 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>01ACD6D1F237C565</code></td>
|
||||
<td><code>01D83175503DC565</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>58000000</code> (88 in decimal)</td>
|
||||
<td><code>A8000000</code> (168 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td><code>406709F612FADFBEC3F0289D0AA67EEF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td><code>E11DBC3BC97D91A26154F932AF019943</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>0817CC7CE1449EE965000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1714882865082067301</td>
|
||||
<td><code>08256595EDB7766797000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2694724800268887959</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 = 1714882865082067301</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1714882865082067301 = 1177411013 * 1456486177</code></p>
|
||||
<pre><code>p = 1177411013
|
||||
q = 1456486177</code></pre>
|
||||
<pre><code>pq = 2694724800268887959</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2694724800268887959 = 1513098571 * 1780931429</code></p>
|
||||
<pre><code>p = 1513098571
|
||||
q = 1780931429</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 17 CC 7C E1 44 9E E9 65 00 00 00
|
||||
0010 | 04 46 2D DD C5 00 00 00 04 56 D0 37 21 00 00 00
|
||||
0020 | 8F 69 6E B0 53 F5 60 41 2B 22 A9 8B 83 41 B6 C1
|
||||
0030 | B6 25 9A 84 BD 0F 6D 61 17 19 3C 56 D9 EA 86 02
|
||||
0040 | 45 22 1E 84 CF 01 B3 31 5C D0 58 7E F5 A8 7B 03
|
||||
0050 | 28 1B 1B C0 66 ED 7E FA 5A B0 54 8B 35 E4 5F F8
|
||||
<pre><code>0000 | 95 5F F5 A9 08 25 65 95 ED B7 76 67 97 00 00 00
|
||||
0010 | 04 5A 30 0D 4B 00 00 00 04 6A 26 DB 65 00 00 00
|
||||
0020 | 40 67 09 F6 12 FA DF BE C3 F0 28 9D 0A A6 7E EF
|
||||
0030 | E1 1D BC 3B C9 7D 91 A2 61 54 F9 32 AF 01 99 43
|
||||
0040 | A8 BB C8 49 51 2D AC 6C 67 B6 EF D9 15 7D 6C A7
|
||||
0050 | 37 7A 17 76 30 7D 84 26 5C 6B E9 BD CF 80 2A C1
|
||||
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 = 1456486177</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>0817CC7CE1449EE965000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1714882865082067301</td>
|
||||
<td><code>08256595EDB7766797000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2694724800268887959</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>04462DDDC5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1177411013</td>
|
||||
<td><code>045A300D4B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1513098571</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>0456D03721000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1456486177</td>
|
||||
<td><code>046A26DB65000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1780931429</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>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td><code>406709F612FADFBEC3F0289D0AA67EEF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td><code>E11DBC3BC97D91A26154F932AF019943</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>45221E84CF01B3315CD0587EF5A87B03</code> <code>281B1BC066ED7EFA5AB0548B35E45FF8</code></td>
|
||||
<td><code>A8BBC849512DAC6C67B6EFD9157D6CA7</code> <code>377A1776307D84265C6BE9BDCF802AC1</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1456486177</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 = 955FF5A90817CC7CE1449EE96500000004462DDDC50000000456D037210000008F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860245221E84CF01B3315CD0587EF5A87B03281B1BC066ED7EFA5AB0548B35E45FF802000000
|
||||
random_padding_bytes = F6B9607966060ABF07770B6DAF766314D3CCBC96928C4A9D5442778EC4DE7FDD92E526B90AD9CF4A33A70DD66941324C3A047C6742ADC34B233A214DC7DD24DFD9C9A95D80E6488EB19C59C56FEE4629D4B93AB9A0F0926DA801FEE8</code></pre>
|
||||
<pre><code>data = 955FF5A908256595EDB7766797000000045A300D4B000000046A26DB65000000406709F612FADFBEC3F0289D0AA67EEFE11DBC3BC97D91A26154F932AF019943A8BBC849512DAC6C67B6EFD9157D6CA7377A1776307D84265C6BE9BDCF802AC102000000
|
||||
random_padding_bytes = D944BB8347C876177FE03C2562BF4E87258EF147A7815D8853AA4B1065A5A385D0DA7E0B6100FAF55728D04DFC84E7E0D20006E07E1CB036730F5B3209CF85B2365B39DE2CBC56F40B725AD347835E5D1973567ECE8A02CF343D54F7</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 = A5FD41F136810954512FDBA85D5FA73CACDCD121A2AA3D5DA13F644C0694AEC396F8A8D828AE04D37315DF10DB4232D823AD1F6E34E0BB80B390B787E99A794559033DDC9051CFE51176A0589482F65875B56466EC07E23BCD6BF55AA750BFCF02BA96E9926E8F8137DEBC73FE8D11C74EC11D4D0804A44C07CF9EE704A800862C1268582E67E4E4885D32981873B2F7265000ACF1B345139DA8FAEBAAB3435E9B3B470B4F77CBE677AEE05AE47080CB0AE5F13BD00EA454A23E2D9C78D180D9A9A150E4445C69598927C5357D86B6FCE9C6F078C243912670DBC37D9692C77F149F8FC319CBD38B119D958A1909608F8B1700536842E1FE94AD1F3C82E9B477</code></pre>
|
||||
<pre><code>encrypted_data = B80632B3F0D1AB28EFAE2CF974C4A2D51A77FCB6DEFD415E1EC284CAB2B5F88D5C4C5B19AFF5E940CE14CCB6A7F340EC88DF7C1F091FB6F7323B047C02DC63212D0DEBE4B3B7A0310E26DB1289CBA24112DF37506C90DEAB797623E4AFF4643D2A921891346BC176C4E1CCE14F64FA59526DD021EFFA428E8F8ACEEB96DBD4729E99BBB26DDDC744D584B732415DFFE20418953F4EAFC81DADE5C6606A1E7FAA3EDB90F36ECF405422C97C360CC31A444B1EEB6C33D62C5802165C72BBC85D1ADBCCD17988DE7F43DA0F340502744B52B196A78EF1ED1372C6EA1232603FDB9C28F7F8783F29098FFD0FE9B066C460ECBA0A2962B82398C1B32D3DCB3BC3A59E</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 DF 0C 00 F2 37 C5 65
|
||||
0010 | 40 01 00 00 BE E4 12 D7 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61
|
||||
0030 | 17 19 3C 56 D9 EA 86 02 04 46 2D DD C5 00 00 00
|
||||
0040 | 04 56 D0 37 21 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 A5 FD 41 F1 36 81 09 54 51 2F DB A8
|
||||
0060 | 5D 5F A7 3C AC DC D1 21 A2 AA 3D 5D A1 3F 64 4C
|
||||
0070 | 06 94 AE C3 96 F8 A8 D8 28 AE 04 D3 73 15 DF 10
|
||||
0080 | DB 42 32 D8 23 AD 1F 6E 34 E0 BB 80 B3 90 B7 87
|
||||
0090 | E9 9A 79 45 59 03 3D DC 90 51 CF E5 11 76 A0 58
|
||||
00A0 | 94 82 F6 58 75 B5 64 66 EC 07 E2 3B CD 6B F5 5A
|
||||
00B0 | A7 50 BF CF 02 BA 96 E9 92 6E 8F 81 37 DE BC 73
|
||||
00C0 | FE 8D 11 C7 4E C1 1D 4D 08 04 A4 4C 07 CF 9E E7
|
||||
00D0 | 04 A8 00 86 2C 12 68 58 2E 67 E4 E4 88 5D 32 98
|
||||
00E0 | 18 73 B2 F7 26 50 00 AC F1 B3 45 13 9D A8 FA EB
|
||||
00F0 | AA B3 43 5E 9B 3B 47 0B 4F 77 CB E6 77 AE E0 5A
|
||||
0100 | E4 70 80 CB 0A E5 F1 3B D0 0E A4 54 A2 3E 2D 9C
|
||||
0110 | 78 D1 80 D9 A9 A1 50 E4 44 5C 69 59 89 27 C5 35
|
||||
0120 | 7D 86 B6 FC E9 C6 F0 78 C2 43 91 26 70 DB C3 7D
|
||||
0130 | 96 92 C7 7F 14 9F 8F C3 19 CB D3 8B 11 9D 95 8A
|
||||
0140 | 19 09 60 8F 8B 17 00 53 68 42 E1 FE 94 AD 1F 3C
|
||||
0150 | 82 E9 B4 77</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 D8 72 06 00 50 3D C5 65
|
||||
0010 | 40 01 00 00 BE E4 12 D7 40 67 09 F6 12 FA DF BE
|
||||
0020 | C3 F0 28 9D 0A A6 7E EF E1 1D BC 3B C9 7D 91 A2
|
||||
0030 | 61 54 F9 32 AF 01 99 43 04 5A 30 0D 4B 00 00 00
|
||||
0040 | 04 6A 26 DB 65 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 B8 06 32 B3 F0 D1 AB 28 EF AE 2C F9
|
||||
0060 | 74 C4 A2 D5 1A 77 FC B6 DE FD 41 5E 1E C2 84 CA
|
||||
0070 | B2 B5 F8 8D 5C 4C 5B 19 AF F5 E9 40 CE 14 CC B6
|
||||
0080 | A7 F3 40 EC 88 DF 7C 1F 09 1F B6 F7 32 3B 04 7C
|
||||
0090 | 02 DC 63 21 2D 0D EB E4 B3 B7 A0 31 0E 26 DB 12
|
||||
00A0 | 89 CB A2 41 12 DF 37 50 6C 90 DE AB 79 76 23 E4
|
||||
00B0 | AF F4 64 3D 2A 92 18 91 34 6B C1 76 C4 E1 CC E1
|
||||
00C0 | 4F 64 FA 59 52 6D D0 21 EF FA 42 8E 8F 8A CE EB
|
||||
00D0 | 96 DB D4 72 9E 99 BB B2 6D DD C7 44 D5 84 B7 32
|
||||
00E0 | 41 5D FF E2 04 18 95 3F 4E AF C8 1D AD E5 C6 60
|
||||
00F0 | 6A 1E 7F AA 3E DB 90 F3 6E CF 40 54 22 C9 7C 36
|
||||
0100 | 0C C3 1A 44 4B 1E EB 6C 33 D6 2C 58 02 16 5C 72
|
||||
0110 | BB C8 5D 1A DB CC D1 79 88 DE 7F 43 DA 0F 34 05
|
||||
0120 | 02 74 4B 52 B1 96 A7 8E F1 ED 13 72 C6 EA 12 32
|
||||
0130 | 60 3F DB 9C 28 F7 F8 78 3F 29 09 8F FD 0F E9 B0
|
||||
0140 | 66 C4 60 EC BA 0A 29 62 B8 23 98 C1 B3 2D 3D CB
|
||||
0150 | 3B C3 A5 9E</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 = F6B9607966060ABF07770B6DAF766314D3CCBC96928C4A9D5442778EC
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>30DF0C00F237C565</code></td>
|
||||
<td><code>D8720600503DC565</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 = F6B9607966060ABF07770B6DAF766314D3CCBC96928C4A9D5442778EC
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td><code>406709F612FADFBEC3F0289D0AA67EEF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td><code>E11DBC3BC97D91A26154F932AF019943</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>04462DDDC5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1177411013</td>
|
||||
<td><code>045A300D4B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1513098571</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>0456D03721000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1456486177</td>
|
||||
<td><code>046A26DB65000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1780931429</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 = F6B9607966060ABF07770B6DAF766314D3CCBC96928C4A9D5442778EC
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE000100A5FD41F136810954512FDBA8</code> <code>5D5FA73CACDCD121A2AA3D5DA13F644C</code> <code>0694AEC396F8A8D828AE04D37315DF10</code> <code>DB4232D823AD1F6E34E0BB80B390B787</code> <code>E99A794559033DDC9051CFE51176A058</code> <code>9482F65875B56466EC07E23BCD6BF55A</code> <code>A750BFCF02BA96E9926E8F8137DEBC73</code> <code>FE8D11C74EC11D4D0804A44C07CF9EE7</code> <code>04A800862C1268582E67E4E4885D3298</code> <code>1873B2F7265000ACF1B345139DA8FAEB</code> <code>AAB3435E9B3B470B4F77CBE677AEE05A</code> <code>E47080CB0AE5F13BD00EA454A23E2D9C</code> <code>78D180D9A9A150E4445C69598927C535</code> <code>7D86B6FCE9C6F078C243912670DBC37D</code> <code>9692C77F149F8FC319CBD38B119D958A</code> <code>1909608F8B1700536842E1FE94AD1F3C</code><br> <code>82E9B477</code></td>
|
||||
<td><code>FE000100B80632B3F0D1AB28EFAE2CF9</code> <code>74C4A2D51A77FCB6DEFD415E1EC284CA</code> <code>B2B5F88D5C4C5B19AFF5E940CE14CCB6</code> <code>A7F340EC88DF7C1F091FB6F7323B047C</code> <code>02DC63212D0DEBE4B3B7A0310E26DB12</code> <code>89CBA24112DF37506C90DEAB797623E4</code> <code>AFF4643D2A921891346BC176C4E1CCE1</code> <code>4F64FA59526DD021EFFA428E8F8ACEEB</code> <code>96DBD4729E99BBB26DDDC744D584B732</code> <code>415DFFE20418953F4EAFC81DADE5C660</code> <code>6A1E7FAA3EDB90F36ECF405422C97C36</code> <code>0CC31A444B1EEB6C33D62C5802165C72</code> <code>BBC85D1ADBCCD17988DE7F43DA0F3405</code> <code>02744B52B196A78EF1ED1372C6EA1232</code> <code>603FDB9C28F7F8783F29098FFD0FE9B0</code> <code>66C460ECBA0A2962B82398C1B32D3DCB</code><br> <code>3BC3A59E</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = F6B9607966060ABF07770B6DAF766314D3CCBC96928C4A9D5442778EC
|
|||
<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 6C E0 87 F3 37 C5 65
|
||||
0010 | E0 02 00 00 5C 07 E8 D0 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61
|
||||
0030 | 17 19 3C 56 D9 EA 86 02 FE 50 02 00 52 BE 74 05
|
||||
0040 | BE 2E AC 65 29 2B EC 6C 10 D4 D1 FB B7 9E 9B 4A
|
||||
0050 | EA 77 05 5F A5 44 1C 7C 47 95 A8 6E 91 20 A4 C0
|
||||
0060 | 7E 49 0D 9C 05 BF 08 01 97 25 32 FA FE 16 33 52
|
||||
0070 | 36 95 03 3A 32 6D 9A 15 FD 11 FA E3 1C 7A 40 07
|
||||
0080 | 56 56 F6 AC 1C 8B A0 EB 9F C1 CC BE F1 CF 34 E0
|
||||
0090 | 12 31 4A 2C 3C BF 13 65 8A C2 3E 80 13 36 5A F3
|
||||
00A0 | DC 46 DE E6 7B 93 7E A3 60 E7 91 FC 6D E3 58 94
|
||||
00B0 | AC 8E 4E 1F 25 AB CE 7B 26 F7 99 EB B9 A9 02 59
|
||||
00C0 | 77 39 C2 3B 64 5E D4 8D E2 70 53 AD C4 65 92 F7
|
||||
00D0 | EB 3A E3 80 29 31 10 1F A7 40 25 E2 74 D7 4E 12
|
||||
00E0 | B2 6D B4 A7 6D EC A4 79 43 24 67 55 12 C6 61 76
|
||||
00F0 | E1 9C E0 E8 CE 8D C7 6B DE EC 0D 36 BF 55 BF DC
|
||||
0100 | 11 9B A2 73 3D 84 8F 26 25 F5 99 43 7B 11 00 DC
|
||||
0110 | 16 B1 9A 60 FD FA E5 95 90 01 A5 E8 E1 85 3B 1A
|
||||
0120 | BD 53 51 BB 94 6C FC 30 7F 9A E7 18 0D BB 2B F0
|
||||
0130 | ED DB A3 2B DF 3A F8 B4 D4 61 C9 C2 39 E8 19 CB
|
||||
0140 | B2 95 28 D0 CD 67 24 93 87 69 04 C7 36 DB 79 18
|
||||
0150 | C8 3D 3F E4 6F DE 36 31 EF E8 FC 1D 87 4E B1 19
|
||||
0160 | 91 FB A8 AD 72 B1 B6 93 43 CE 91 EB F9 DB 91 03
|
||||
0170 | 30 89 91 5D EE C6 4A 7B C1 94 5D 35 41 02 58 7E
|
||||
0180 | 53 C1 70 4B 46 29 37 D8 20 6B 22 82 E3 A5 66 42
|
||||
0190 | AC 89 90 B1 62 4B A5 26 92 CD FE DD 9C 17 5A 5D
|
||||
01A0 | C1 5B DB 7E 5E A7 A0 BC 94 B9 1A 24 45 D0 FC AC
|
||||
01B0 | 32 BB 9E 71 5E FC 27 4E CA 0C 4C 7E E8 D3 2E A1
|
||||
01C0 | 12 6E 5C 7C 9C 61 FB E7 97 A1 DA 73 3F 69 59 93
|
||||
01D0 | 3C 5C 8B 28 51 80 F4 3C 2F 34 C5 8A 93 9D 92 01
|
||||
01E0 | 0D BE 41 D3 6B 58 0F D3 3D 81 78 AF 51 CC 2F 9C
|
||||
01F0 | E8 7E C6 A5 08 31 9F AA B3 60 4B 15 68 B4 6D 1D
|
||||
0200 | A3 D0 82 69 33 6A 7E 55 4A 7C 51 30 AB D4 D2 93
|
||||
0210 | EF 9E 1C B5 D9 C8 2E 6E C4 C3 BB BF 52 11 48 F0
|
||||
0220 | 60 E9 CF 2E 7E 27 CB 02 3A 21 26 2C 3F 70 A3 2E
|
||||
0230 | F7 CB EB 3A 79 51 0F FD F6 C6 A0 F2 66 6D 75 6C
|
||||
0240 | 6E E5 6F 1E FA C0 3D 8B D4 78 E1 2C 1B A4 FF D1
|
||||
0250 | DC DD 90 46 E6 02 14 AA 89 72 3A 60 25 64 71 58
|
||||
0260 | 4A F4 40 6D 21 C1 5E BA 97 01 8C 4F C0 A6 DC 83
|
||||
0270 | 22 A4 58 3B BF 74 AF 6E FF 04 BA 7F AC 5F 84 3D
|
||||
0280 | 08 5B 16 FD 2A 94 FD E9 00 D7 18 7E</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 4C 6E 1E 51 3D C5 65
|
||||
0010 | C4 02 00 00 5C 07 E8 D0 40 67 09 F6 12 FA DF BE
|
||||
0020 | C3 F0 28 9D 0A A6 7E EF E1 1D BC 3B C9 7D 91 A2
|
||||
0030 | 61 54 F9 32 AF 01 99 43 FE 50 02 00 6A D7 DD 5D
|
||||
0040 | 8B 25 26 C7 61 AB E5 0E 93 C8 2A 6F 33 1B 1E AE
|
||||
0050 | 0A D0 11 89 3D A9 76 E3 77 1D 4A A4 52 09 D2 34
|
||||
0060 | FE A6 56 42 98 53 86 B8 17 BF 89 80 F5 17 F6 D3
|
||||
0070 | 2D BE B4 7E 34 53 45 56 F9 50 DD F9 60 DB 72 1A
|
||||
0080 | 48 48 02 31 61 91 61 11 26 82 C6 04 6D 56 29 C7
|
||||
0090 | 1C D1 EC 80 61 DF CD D7 04 70 3E C7 A8 AE BD CB
|
||||
00A0 | D1 59 57 9F C8 88 6D 9F A5 1E 00 9A F4 9B 5A B9
|
||||
00B0 | 0C 76 28 EB 81 C9 78 8A 2E B6 AC 0E 75 7A 7D EB
|
||||
00C0 | E3 D9 49 F8 0A 99 0B ED B4 D2 DB AE 43 F0 03 28
|
||||
00D0 | B8 2F 4D 8F C8 3A 9B 9C FE EF 46 7E 15 93 BB 45
|
||||
00E0 | 79 EE 32 41 2F 16 7A 78 0C FA 51 76 50 BD 0E B5
|
||||
00F0 | 1C BF B5 0E 3A FE 97 88 39 46 61 31 FC D9 56 71
|
||||
0100 | 1E 63 61 4F 00 6A 55 ED 35 ED 2B 1F 83 3C 29 F4
|
||||
0110 | FD 7A 84 F0 C8 F1 C1 0D FC 1A 1A AF 9A 8A 57 10
|
||||
0120 | 8D EC F2 06 E3 96 84 06 F0 FB 25 E9 22 DF 15 4F
|
||||
0130 | 49 7B 51 52 7E 48 34 20 2F AB 47 7A 13 7D 0A 99
|
||||
0140 | D1 C3 47 19 6F BA 10 69 9F 52 EA 56 F0 1E F9 38
|
||||
0150 | 29 B3 10 A5 C9 7D B9 5F D5 7E 64 41 7E 52 6E B9
|
||||
0160 | 20 D2 61 15 7C 6E 38 79 1B DD 53 89 EE B7 44 E0
|
||||
0170 | 75 D9 52 DB 33 A8 15 12 07 D0 AB 3C 62 9E 30 A7
|
||||
0180 | 23 A5 20 5F 8F A1 83 98 93 7E D2 71 4A 4E 76 A5
|
||||
0190 | F4 51 25 08 A4 BE 1B 4D 6A E4 6F D1 56 C6 F0 63
|
||||
01A0 | 47 AF 5E 07 CE 49 27 91 95 13 3B 07 CC E4 BC 67
|
||||
01B0 | 75 D8 8F 36 11 18 0D 23 C4 C7 09 46 61 9A D7 59
|
||||
01C0 | AB 9F 18 3A 38 5C CF 9B F1 93 15 FA DB E8 A4 FD
|
||||
01D0 | C7 48 AF 52 DF 93 03 45 90 9C 87 0D E4 B4 89 01
|
||||
01E0 | E9 F9 0E 56 D7 4C A5 34 D8 E1 FE 3A 35 A9 2A 18
|
||||
01F0 | D6 76 95 8E B8 FC 3D 82 F9 CE E3 08 DF 2A 9E 4C
|
||||
0200 | CD 23 FF 89 EA 25 5B 9E ED BC 33 78 14 88 79 66
|
||||
0210 | 6F FC 2E 19 A4 31 CB B5 7A E1 A0 10 FF E5 CB 39
|
||||
0220 | AB F1 31 AD D9 E9 0B F9 69 A1 12 C4 35 50 9B 78
|
||||
0230 | 96 0E 0B 20 03 1C 82 21 90 84 15 61 E8 39 04 46
|
||||
0240 | 22 76 60 BB AC CF 3D 53 57 4B FB A3 3B F4 76 E3
|
||||
0250 | BD C9 EB 68 0A A2 A1 7F D6 75 6F 65 27 25 ED 03
|
||||
0260 | 13 E5 EB 0F D6 A9 C8 C9 49 EE FB E8 09 A8 93 11
|
||||
0270 | BF 20 F4 00 55 CA 25 FD 16 9D C1 3E E1 4B 31 50
|
||||
0280 | 92 FD E4 18 46 38 D8 49 68 2F D8 62</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 = F6B9607966060ABF07770B6DAF766314D3CCBC96928C4A9D5442778EC
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>016CE087F337C565</code></td>
|
||||
<td><code>014C6E1E513DC565</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>E0020000</code> (736 in decimal)</td>
|
||||
<td><code>C4020000</code> (708 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = F6B9607966060ABF07770B6DAF766314D3CCBC96928C4A9D5442778EC
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td><code>406709F612FADFBEC3F0289D0AA67EEF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td><code>E11DBC3BC97D91A26154F932AF019943</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE50020052BE7405BE2EAC65292BEC6C</code> <code>10D4D1FBB79E9B4AEA77055FA5441C7C</code> <code>4795A86E9120A4C07E490D9C05BF0801</code> <code>972532FAFE1633523695033A326D9A15</code> <code>FD11FAE31C7A40075656F6AC1C8BA0EB</code> <code>9FC1CCBEF1CF34E012314A2C3CBF1365</code> <code>8AC23E8013365AF3DC46DEE67B937EA3</code> <code>60E791FC6DE35894AC8E4E1F25ABCE7B</code> <code>26F799EBB9A902597739C23B645ED48D</code> <code>E27053ADC46592F7EB3AE3802931101F</code> <code>A74025E274D74E12B26DB4A76DECA479</code> <code>4324675512C66176E19CE0E8CE8DC76B</code> <code>DEEC0D36BF55BFDC119BA2733D848F26</code> <code>25F599437B1100DC16B19A60FDFAE595</code> <code>9001A5E8E1853B1ABD5351BB946CFC30</code> <code>7F9AE7180DBB2BF0EDDBA32BDF3AF8B4</code> <code>D461C9C239E819CBB29528D0CD672493</code> <code>876904C736DB7918C83D3FE46FDE3631</code> <code>EFE8FC1D874EB11991FBA8AD72B1B693</code> <code>43CE91EBF9DB91033089915DEEC64A7B</code> <code>C1945D354102587E53C1704B462937D8</code> <code>206B2282E3A56642AC8990B1624BA526</code> <code>92CDFEDD9C175A5DC15BDB7E5EA7A0BC</code> <code>94B91A2445D0FCAC32BB9E715EFC274E</code> <code>CA0C4C7EE8D32EA1126E5C7C9C61FBE7</code> <code>97A1DA733F6959933C5C8B285180F43C</code> <code>2F34C58A939D92010DBE41D36B580FD3</code> <code>3D8178AF51CC2F9CE87EC6A508319FAA</code> <code>B3604B1568B46D1DA3D08269336A7E55</code> <code>4A7C5130ABD4D293EF9E1CB5D9C82E6E</code> <code>C4C3BBBF521148F060E9CF2E7E27CB02</code> <code>3A21262C3F70A32EF7CBEB3A79510FFD</code> <code>F6C6A0F2666D756C6EE56F1EFAC03D8B</code> <code>D478E12C1BA4FFD1DCDD9046E60214AA</code> <code>89723A60256471584AF4406D21C15EBA</code> <code>97018C4FC0A6DC8322A4583BBF74AF6E</code> <code>FF04BA7FAC5F843D085B16FD2A94FDE9</code><br> <code>00D7187E</code></td>
|
||||
<td><code>FE5002006AD7DD5D8B2526C761ABE50E</code> <code>93C82A6F331B1EAE0AD011893DA976E3</code> <code>771D4AA45209D234FEA65642985386B8</code> <code>17BF8980F517F6D32DBEB47E34534556</code> <code>F950DDF960DB721A4848023161916111</code> <code>2682C6046D5629C71CD1EC8061DFCDD7</code> <code>04703EC7A8AEBDCBD159579FC8886D9F</code> <code>A51E009AF49B5AB90C7628EB81C9788A</code> <code>2EB6AC0E757A7DEBE3D949F80A990BED</code> <code>B4D2DBAE43F00328B82F4D8FC83A9B9C</code> <code>FEEF467E1593BB4579EE32412F167A78</code> <code>0CFA517650BD0EB51CBFB50E3AFE9788</code> <code>39466131FCD956711E63614F006A55ED</code> <code>35ED2B1F833C29F4FD7A84F0C8F1C10D</code> <code>FC1A1AAF9A8A57108DECF206E3968406</code> <code>F0FB25E922DF154F497B51527E483420</code> <code>2FAB477A137D0A99D1C347196FBA1069</code> <code>9F52EA56F01EF93829B310A5C97DB95F</code> <code>D57E64417E526EB920D261157C6E3879</code> <code>1BDD5389EEB744E075D952DB33A81512</code> <code>07D0AB3C629E30A723A5205F8FA18398</code> <code>937ED2714A4E76A5F4512508A4BE1B4D</code> <code>6AE46FD156C6F06347AF5E07CE492791</code> <code>95133B07CCE4BC6775D88F3611180D23</code> <code>C4C70946619AD759AB9F183A385CCF9B</code> <code>F19315FADBE8A4FDC748AF52DF930345</code> <code>909C870DE4B48901E9F90E56D74CA534</code> <code>D8E1FE3A35A92A18D676958EB8FC3D82</code> <code>F9CEE308DF2A9E4CCD23FF89EA255B9E</code> <code>EDBC3378148879666FFC2E19A431CBB5</code> <code>7AE1A010FFE5CB39ABF131ADD9E90BF9</code> <code>69A112C435509B78960E0B20031C8221</code> <code>90841561E8390446227660BBACCF3D53</code> <code>574BFBA33BF476E3BDC9EB680AA2A17F</code> <code>D6756F652725ED0313E5EB0FD6A9C8C9</code> <code>49EEFBE809A89311BF20F40055CA25FD</code> <code>169DC13EE14B315092FDE4184638D849</code><br> <code>682FD862</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = F6B9607966060ABF07770B6DAF766314D3CCBC96928C4A9D5442778EC
|
|||
<!-- 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 = 52BE7405BE2EAC65292BEC6C10D4D1FBB79E9B4AEA77055FA5441C7C4795A86E9120A4C07E490D9C05BF0801972532FAFE1633523695033A326D9A15FD11FAE31C7A40075656F6AC1C8BA0EB9FC1CCBEF1CF34E012314A2C3CBF13658AC23E8013365AF3DC46DEE67B937EA360E791FC6DE35894AC8E4E1F25ABCE7B26F799EBB9A902597739C23B645ED48DE27053ADC46592F7EB3AE3802931101FA74025E274D74E12B26DB4A76DECA4794324675512C66176E19CE0E8CE8DC76BDEEC0D36BF55BFDC119BA2733D848F2625F599437B1100DC16B19A60FDFAE5959001A5E8E1853B1ABD5351BB946CFC307F9AE7180DBB2BF0EDDBA32BDF3AF8B4D461C9C239E819CBB29528D0CD672493876904C736DB7918C83D3FE46FDE3631EFE8FC1D874EB11991FBA8AD72B1B69343CE91EBF9DB91033089915DEEC64A7BC1945D354102587E53C1704B462937D8206B2282E3A56642AC8990B1624BA52692CDFEDD9C175A5DC15BDB7E5EA7A0BC94B91A2445D0FCAC32BB9E715EFC274ECA0C4C7EE8D32EA1126E5C7C9C61FBE797A1DA733F6959933C5C8B285180F43C2F34C58A939D92010DBE41D36B580FD33D8178AF51CC2F9CE87EC6A508319FAAB3604B1568B46D1DA3D08269336A7E554A7C5130ABD4D293EF9E1CB5D9C82E6EC4C3BBBF521148F060E9CF2E7E27CB023A21262C3F70A32EF7CBEB3A79510FFDF6C6A0F2666D756C6EE56F1EFAC03D8BD478E12C1BA4FFD1DCDD9046E60214AA89723A60256471584AF4406D21C15EBA97018C4FC0A6DC8322A4583BBF74AF6EFF04BA7FAC5F843D085B16FD2A94FDE900D7187E
|
||||
tmp_aes_key = B6DC3ABB4846E04549FA9E8BC439BE5946327ECE7BBD6A2C4C7A14623BD9F361
|
||||
tmp_aes_iv = 7E28D97049A23CBEA0233B5493865156A266BC2FA6EEE59087CE0BED45221E84</code></pre>
|
||||
<pre><code>encrypted_answer = 6AD7DD5D8B2526C761ABE50E93C82A6F331B1EAE0AD011893DA976E3771D4AA45209D234FEA65642985386B817BF8980F517F6D32DBEB47E34534556F950DDF960DB721A48480231619161112682C6046D5629C71CD1EC8061DFCDD704703EC7A8AEBDCBD159579FC8886D9FA51E009AF49B5AB90C7628EB81C9788A2EB6AC0E757A7DEBE3D949F80A990BEDB4D2DBAE43F00328B82F4D8FC83A9B9CFEEF467E1593BB4579EE32412F167A780CFA517650BD0EB51CBFB50E3AFE978839466131FCD956711E63614F006A55ED35ED2B1F833C29F4FD7A84F0C8F1C10DFC1A1AAF9A8A57108DECF206E3968406F0FB25E922DF154F497B51527E4834202FAB477A137D0A99D1C347196FBA10699F52EA56F01EF93829B310A5C97DB95FD57E64417E526EB920D261157C6E38791BDD5389EEB744E075D952DB33A8151207D0AB3C629E30A723A5205F8FA18398937ED2714A4E76A5F4512508A4BE1B4D6AE46FD156C6F06347AF5E07CE49279195133B07CCE4BC6775D88F3611180D23C4C70946619AD759AB9F183A385CCF9BF19315FADBE8A4FDC748AF52DF930345909C870DE4B48901E9F90E56D74CA534D8E1FE3A35A92A18D676958EB8FC3D82F9CEE308DF2A9E4CCD23FF89EA255B9EEDBC3378148879666FFC2E19A431CBB57AE1A010FFE5CB39ABF131ADD9E90BF969A112C435509B78960E0B20031C822190841561E8390446227660BBACCF3D53574BFBA33BF476E3BDC9EB680AA2A17FD6756F652725ED0313E5EB0FD6A9C8C949EEFBE809A89311BF20F40055CA25FD169DC13EE14B315092FDE4184638D849682FD862
|
||||
tmp_aes_key = 5EA702F743E850F5546E857F08B7D5337BBAEDF9B61248751594851BE2E8C297
|
||||
tmp_aes_iv = 1CEF8E372A63D97EBFA805C0DBB018BC7C1E0931693FBCB1A1AFC0C0A8BBC849</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = 09115666EBE84000F4856D81DE414B23F4425976BA0D89B58F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100672D1D50C2F9F62B302A9D18D1DC3CCB0B96DEAD17FF998A5487C870C71BDC7BCFA11EFCAF2921D904C5882B11228CB6F36E07BFC3F784C647F2A9EA90A3227E4D368C5C07AA0D23204E6E18E694AAF259CCBB810B1741FFCAD0C1B2792CBF0D0FF4C51514435359DB2F5A6CF6D0277AB16EE4C183CA98306DAF502DCFD26E43AD629D58994E7BC127DDAB08F57C918E026431403151715CFA651F867879476695BE6F5E7A005AFDEA9FB823578A0F07A4F23A2E2DCED38C3C3F999B106A1DAC67332490AFF52140703CB5BF31D465C8DABCACD25EA99F72E69446BC053DBE5D53CDA6F677506A43CAAAB29B9D4E76BB78CF454BF6C391232EA210D83E9F6228F337C5652926F83C1A66E135
|
||||
answer = BA0D89B58F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100672D1D50C2F9F62B302A9D18D1DC3CCB0B96DEAD17FF998A5487C870C71BDC7BCFA11EFCAF2921D904C5882B11228CB6F36E07BFC3F784C647F2A9EA90A3227E4D368C5C07AA0D23204E6E18E694AAF259CCBB810B1741FFCAD0C1B2792CBF0D0FF4C51514435359DB2F5A6CF6D0277AB16EE4C183CA98306DAF502DCFD26E43AD629D58994E7BC127DDAB08F57C918E026431403151715CFA651F867879476695BE6F5E7A005AFDEA9FB823578A0F07A4F23A2E2DCED38C3C3F999B106A1DAC67332490AFF52140703CB5BF31D465C8DABCACD25EA99F72E69446BC053DBE5D53CDA6F677506A43CAAAB29B9D4E76BB78CF454BF6C391232EA210D83E9F6228F337C5652926F83C1A66E135</code></pre>
|
||||
<pre><code>answer_with_hash = 60026275CC91DDEC5371C67B10331C4C1D362585BA0D89B5406709F612FADFBEC3F0289D0AA67EEFE11DBC3BC97D91A26154F932AF01994303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001000A77200BDFF6E6C4C126A2C41DF310AB3A3BDBD698CD480749E1F3C64FB1CFC9DFC70AC6F1AA671019620A640055B2CF7D7D99CC86533645C0FA000954DE2987BAD68D7450CF134C9F0305F34C1BB285DA8233F65970A01C4BD3AFD5EA3CD5864B8F1DCB35D5E9737DF15063C54CF53048EF519A280498DDDAF23764F29FFB0C5813CAAD90C319BE8592B78C4BE815E65ADA7C62EA23754B5A2C5A86C4721872D0CC48E0F895C3EBE186E81E5F0E88A6B3F09101C409AF3410B64238FBF2A2095E3F3B7FFC7EB3A02A319B99A155647BC59958BCDFED8A1CC6EB7F13F8600E521D9D0247B0F639F2FA3B09F72987781F71C0E8AA950167DE5092380B4853E7F1513DC565C26F8049523E89D2
|
||||
answer = BA0D89B5406709F612FADFBEC3F0289D0AA67EEFE11DBC3BC97D91A26154F932AF01994303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001000A77200BDFF6E6C4C126A2C41DF310AB3A3BDBD698CD480749E1F3C64FB1CFC9DFC70AC6F1AA671019620A640055B2CF7D7D99CC86533645C0FA000954DE2987BAD68D7450CF134C9F0305F34C1BB285DA8233F65970A01C4BD3AFD5EA3CD5864B8F1DCB35D5E9737DF15063C54CF53048EF519A280498DDDAF23764F29FFB0C5813CAAD90C319BE8592B78C4BE815E65ADA7C62EA23754B5A2C5A86C4721872D0CC48E0F895C3EBE186E81E5F0E88A6B3F09101C409AF3410B64238FBF2A2095E3F3B7FFC7EB3A02A319B99A155647BC59958BCDFED8A1CC6EB7F13F8600E521D9D0247B0F639F2FA3B09F72987781F71C0E8AA950167DE5092380B4853E7F1513DC565C26F8049523E89D2</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 8F 69 6E B0 53 F5 60 41 2B 22 A9 8B
|
||||
0010 | 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61 17 19 3C 56
|
||||
0020 | D9 EA 86 02 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 40 67 09 F6 12 FA DF BE C3 F0 28 9D
|
||||
0010 | 0A A6 7E EF E1 1D BC 3B C9 7D 91 A2 61 54 F9 32
|
||||
0020 | AF 01 99 43 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 = BA0D89B58F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860
|
|||
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 | 67 2D 1D 50 C2 F9 F6 2B 30 2A 9D 18 D1 DC 3C CB
|
||||
0140 | 0B 96 DE AD 17 FF 99 8A 54 87 C8 70 C7 1B DC 7B
|
||||
0150 | CF A1 1E FC AF 29 21 D9 04 C5 88 2B 11 22 8C B6
|
||||
0160 | F3 6E 07 BF C3 F7 84 C6 47 F2 A9 EA 90 A3 22 7E
|
||||
0170 | 4D 36 8C 5C 07 AA 0D 23 20 4E 6E 18 E6 94 AA F2
|
||||
0180 | 59 CC BB 81 0B 17 41 FF CA D0 C1 B2 79 2C BF 0D
|
||||
0190 | 0F F4 C5 15 14 43 53 59 DB 2F 5A 6C F6 D0 27 7A
|
||||
01A0 | B1 6E E4 C1 83 CA 98 30 6D AF 50 2D CF D2 6E 43
|
||||
01B0 | AD 62 9D 58 99 4E 7B C1 27 DD AB 08 F5 7C 91 8E
|
||||
01C0 | 02 64 31 40 31 51 71 5C FA 65 1F 86 78 79 47 66
|
||||
01D0 | 95 BE 6F 5E 7A 00 5A FD EA 9F B8 23 57 8A 0F 07
|
||||
01E0 | A4 F2 3A 2E 2D CE D3 8C 3C 3F 99 9B 10 6A 1D AC
|
||||
01F0 | 67 33 24 90 AF F5 21 40 70 3C B5 BF 31 D4 65 C8
|
||||
0200 | DA BC AC D2 5E A9 9F 72 E6 94 46 BC 05 3D BE 5D
|
||||
0210 | 53 CD A6 F6 77 50 6A 43 CA AA B2 9B 9D 4E 76 BB
|
||||
0220 | 78 CF 45 4B F6 C3 91 23 2E A2 10 D8 3E 9F 62 28
|
||||
0230 | F3 37 C5 65</code></pre>
|
||||
0130 | 0A 77 20 0B DF F6 E6 C4 C1 26 A2 C4 1D F3 10 AB
|
||||
0140 | 3A 3B DB D6 98 CD 48 07 49 E1 F3 C6 4F B1 CF C9
|
||||
0150 | DF C7 0A C6 F1 AA 67 10 19 62 0A 64 00 55 B2 CF
|
||||
0160 | 7D 7D 99 CC 86 53 36 45 C0 FA 00 09 54 DE 29 87
|
||||
0170 | BA D6 8D 74 50 CF 13 4C 9F 03 05 F3 4C 1B B2 85
|
||||
0180 | DA 82 33 F6 59 70 A0 1C 4B D3 AF D5 EA 3C D5 86
|
||||
0190 | 4B 8F 1D CB 35 D5 E9 73 7D F1 50 63 C5 4C F5 30
|
||||
01A0 | 48 EF 51 9A 28 04 98 DD DA F2 37 64 F2 9F FB 0C
|
||||
01B0 | 58 13 CA AD 90 C3 19 BE 85 92 B7 8C 4B E8 15 E6
|
||||
01C0 | 5A DA 7C 62 EA 23 75 4B 5A 2C 5A 86 C4 72 18 72
|
||||
01D0 | D0 CC 48 E0 F8 95 C3 EB E1 86 E8 1E 5F 0E 88 A6
|
||||
01E0 | B3 F0 91 01 C4 09 AF 34 10 B6 42 38 FB F2 A2 09
|
||||
01F0 | 5E 3F 3B 7F FC 7E B3 A0 2A 31 9B 99 A1 55 64 7B
|
||||
0200 | C5 99 58 BC DF ED 8A 1C C6 EB 7F 13 F8 60 0E 52
|
||||
0210 | 1D 9D 02 47 B0 F6 39 F2 FA 3B 09 F7 29 87 78 1F
|
||||
0220 | 71 C0 E8 AA 95 01 67 DE 50 92 38 0B 48 53 E7 F1
|
||||
0230 | 51 3D C5 65</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -570,13 +570,13 @@ answer = BA0D89B58F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td><code>406709F612FADFBEC3F0289D0AA67EEF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td><code>E11DBC3BC97D91A26154F932AF019943</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B58F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE000100672D1D50C2F9F62B302A9D18</code> <code>D1DC3CCB0B96DEAD17FF998A5487C870</code> <code>C71BDC7BCFA11EFCAF2921D904C5882B</code> <code>11228CB6F36E07BFC3F784C647F2A9EA</code> <code>90A3227E4D368C5C07AA0D23204E6E18</code> <code>E694AAF259CCBB810B1741FFCAD0C1B2</code> <code>792CBF0D0FF4C51514435359DB2F5A6C</code> <code>F6D0277AB16EE4C183CA98306DAF502D</code> <code>CFD26E43AD629D58994E7BC127DDAB08</code> <code>F57C918E026431403151715CFA651F86</code> <code>7879476695BE6F5E7A005AFDEA9FB823</code> <code>578A0F07A4F23A2E2DCED38C3C3F999B</code> <code>106A1DAC67332490AFF52140703CB5BF</code> <code>31D465C8DABCACD25EA99F72E69446BC</code> <code>053DBE5D53CDA6F677506A43CAAAB29B</code> <code>9D4E76BB78CF454BF6C391232EA210D8</code><br> <code>3E9F6228</code></td>
|
||||
<td><code>FE0001000A77200BDFF6E6C4C126A2C4</code> <code>1DF310AB3A3BDBD698CD480749E1F3C6</code> <code>4FB1CFC9DFC70AC6F1AA671019620A64</code> <code>0055B2CF7D7D99CC86533645C0FA0009</code> <code>54DE2987BAD68D7450CF134C9F0305F3</code> <code>4C1BB285DA8233F65970A01C4BD3AFD5</code> <code>EA3CD5864B8F1DCB35D5E9737DF15063</code> <code>C54CF53048EF519A280498DDDAF23764</code> <code>F29FFB0C5813CAAD90C319BE8592B78C</code> <code>4BE815E65ADA7C62EA23754B5A2C5A86</code> <code>C4721872D0CC48E0F895C3EBE186E81E</code> <code>5F0E88A6B3F09101C409AF3410B64238</code> <code>FBF2A2095E3F3B7FFC7EB3A02A319B99</code> <code>A155647BC59958BCDFED8A1CC6EB7F13</code> <code>F8600E521D9D0247B0F639F2FA3B09F7</code> <code>2987781F71C0E8AA950167DE5092380B</code><br> <code>4853E7F1</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>F337C565</code> (1707423731 in decimal)</td>
|
||||
<td><code>513DC565</code> (1707425105 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B58F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860
|
|||
<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 = FDB4FDE13A60F49A10304533622ABE32A0396ECE5AD89C308033BEDA82120AFDEE0C48FEC36DF5CCD75E4B3F6AC54A3D9387E682C72A9EABA0FBCC605050ED48C1179EAECB97FB350DF425BD830CE75CB8BE5C2F780EB6CB7CC5B3DC9C5386B75109A4D9B09B13F812CAFD2A8123F81026DBF383652AB4CF13BACB5DE60CD5CD552005A5BE728AF4A5B43A901B9A9DDC047C7DCE8580694DE4DE86C6508B004D5C3573EBA79481D51B7841970907E002A94D66869320A2B511166BEC320C296A186083C32B62860C045CEE991DE91FACFE6AC3E73E9DB9F520DFEADD1BDE8D7F25C7A74A79BC23E72805285E55E79D6BEB818829E4A8808BAF386062E3A803A4</code></pre>
|
||||
<pre><code>b = 1376A5A6BF7A9F874B47028F3D5CFF0689FD52F58949BB0EE9BACDBE81DD1CED07101844EB6F2AE19E61120B84799431F445785E33A18141399821479AE96786E0F4E9C5C6C9E46BF562C21C96B0F8F7438C8CABA3DFCB3DD3B886C2A37B95ED804315335C0DDFFEB3A278243D89F964278BC734D1087D6D4B554C1F78397A414F440E38BA9A4F1211B20AE835437762F81A45FDB035BB2220D939693084B39A3C7BE2481309AB9AE378EAB8BB3A15A69EBA80BEF683582E2218FA604E823EABD111553D31DBB46B9383A0D8EEF615FFF9CF266C970800AA28AC5E962D20351311A815FFA7562989CA6D6323BF2B5AF40EF3F45021B7445664852D07B80172CE</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 = 91BF40DC89956A1BAB9AD81375E9D7687F8AE76EC791525D1C3E79F7FC6C734C6B005B0D8E1AAC7FCEFC4B0C1347F6E44DF94057E0AA07CD283986FDEA742256638DD00C806B743049EBEB980FE373B871271DEAF508669370E362A83B16BD1565F1B81DF0C1C10887EEA4895499741F2A3051C130FEFC56EF9340A26707F190FE1426E39646A805FE59A58548CDED66A1E8611D94F4C69647F1FD8586886DA784371D0DE0215D7B67C440F879C9003894F131997EA80E3419BC54C9E4BBD1F34B0C79A71F2E9205D7B95E16EC1B469FAFAA59A09B3503D7197E6E0B7BD60D92A0DCE720192E91D5B77C8F6610FD7E3D95FDEFF40C172BF4439B2E24A05C57D5</code></pre>
|
||||
<pre><code>g_b = A215D057BC6648453D68C2F418A38D9D4F4FA47E5D520AC7EBC2ADC3B00075090C10A1E9D96A5DDA127317F2DDC165C5F6C8C2854648C106D0D9DF684DAE70B0E6021658806245B494B762B1979E8BD597B5CC8E43A80F96CA47FB0765C98D40529F3D94C82113AE32C603AA24411EF8B330565A1D66EA6B89C9D4F8AFFEEA397C4B247564215D147B6AD0DF7F3FB4499E89E34304531D87448B91967B5BD53093F09386C0F78940C1DD6AA7C8667E15857453E6AAD275F94CD386468CF49108FB7C54282596A4D0314DCE9EFED4066A6E072471439AEAAA74157DB7DD53F01982982534DEE8740610BA433BF459B3DFE38674561F31991CE007BA112DDA6718</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 8F 69 6E B0 53 F5 60 41 2B 22 A9 8B
|
||||
0010 | 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61 17 19 3C 56
|
||||
0020 | D9 EA 86 02 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 91 BF 40 DC 89 95 6A 1B AB 9A D8 13 75 E9 D7 68
|
||||
0040 | 7F 8A E7 6E C7 91 52 5D 1C 3E 79 F7 FC 6C 73 4C
|
||||
0050 | 6B 00 5B 0D 8E 1A AC 7F CE FC 4B 0C 13 47 F6 E4
|
||||
0060 | 4D F9 40 57 E0 AA 07 CD 28 39 86 FD EA 74 22 56
|
||||
0070 | 63 8D D0 0C 80 6B 74 30 49 EB EB 98 0F E3 73 B8
|
||||
0080 | 71 27 1D EA F5 08 66 93 70 E3 62 A8 3B 16 BD 15
|
||||
0090 | 65 F1 B8 1D F0 C1 C1 08 87 EE A4 89 54 99 74 1F
|
||||
00A0 | 2A 30 51 C1 30 FE FC 56 EF 93 40 A2 67 07 F1 90
|
||||
00B0 | FE 14 26 E3 96 46 A8 05 FE 59 A5 85 48 CD ED 66
|
||||
00C0 | A1 E8 61 1D 94 F4 C6 96 47 F1 FD 85 86 88 6D A7
|
||||
00D0 | 84 37 1D 0D E0 21 5D 7B 67 C4 40 F8 79 C9 00 38
|
||||
00E0 | 94 F1 31 99 7E A8 0E 34 19 BC 54 C9 E4 BB D1 F3
|
||||
00F0 | 4B 0C 79 A7 1F 2E 92 05 D7 B9 5E 16 EC 1B 46 9F
|
||||
0100 | AF AA 59 A0 9B 35 03 D7 19 7E 6E 0B 7B D6 0D 92
|
||||
0110 | A0 DC E7 20 19 2E 91 D5 B7 7C 8F 66 10 FD 7E 3D
|
||||
0120 | 95 FD EF F4 0C 17 2B F4 43 9B 2E 24 A0 5C 57 D5</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 40 67 09 F6 12 FA DF BE C3 F0 28 9D
|
||||
0010 | 0A A6 7E EF E1 1D BC 3B C9 7D 91 A2 61 54 F9 32
|
||||
0020 | AF 01 99 43 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | A2 15 D0 57 BC 66 48 45 3D 68 C2 F4 18 A3 8D 9D
|
||||
0040 | 4F 4F A4 7E 5D 52 0A C7 EB C2 AD C3 B0 00 75 09
|
||||
0050 | 0C 10 A1 E9 D9 6A 5D DA 12 73 17 F2 DD C1 65 C5
|
||||
0060 | F6 C8 C2 85 46 48 C1 06 D0 D9 DF 68 4D AE 70 B0
|
||||
0070 | E6 02 16 58 80 62 45 B4 94 B7 62 B1 97 9E 8B D5
|
||||
0080 | 97 B5 CC 8E 43 A8 0F 96 CA 47 FB 07 65 C9 8D 40
|
||||
0090 | 52 9F 3D 94 C8 21 13 AE 32 C6 03 AA 24 41 1E F8
|
||||
00A0 | B3 30 56 5A 1D 66 EA 6B 89 C9 D4 F8 AF FE EA 39
|
||||
00B0 | 7C 4B 24 75 64 21 5D 14 7B 6A D0 DF 7F 3F B4 49
|
||||
00C0 | 9E 89 E3 43 04 53 1D 87 44 8B 91 96 7B 5B D5 30
|
||||
00D0 | 93 F0 93 86 C0 F7 89 40 C1 DD 6A A7 C8 66 7E 15
|
||||
00E0 | 85 74 53 E6 AA D2 75 F9 4C D3 86 46 8C F4 91 08
|
||||
00F0 | FB 7C 54 28 25 96 A4 D0 31 4D CE 9E FE D4 06 6A
|
||||
0100 | 6E 07 24 71 43 9A EA AA 74 15 7D B7 DD 53 F0 19
|
||||
0110 | 82 98 25 34 DE E8 74 06 10 BA 43 3B F4 59 B3 DF
|
||||
0120 | E3 86 74 56 1F 31 99 1C E0 07 BA 11 2D DA 67 18</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 = BA0D89B58F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td><code>406709F612FADFBEC3F0289D0AA67EEF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td><code>E11DBC3BC97D91A26154F932AF019943</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE00010091BF40DC89956A1BAB9AD813</code> <code>75E9D7687F8AE76EC791525D1C3E79F7</code> <code>FC6C734C6B005B0D8E1AAC7FCEFC4B0C</code> <code>1347F6E44DF94057E0AA07CD283986FD</code> <code>EA742256638DD00C806B743049EBEB98</code> <code>0FE373B871271DEAF508669370E362A8</code> <code>3B16BD1565F1B81DF0C1C10887EEA489</code> <code>5499741F2A3051C130FEFC56EF9340A2</code> <code>6707F190FE1426E39646A805FE59A585</code> <code>48CDED66A1E8611D94F4C69647F1FD85</code> <code>86886DA784371D0DE0215D7B67C440F8</code> <code>79C9003894F131997EA80E3419BC54C9</code> <code>E4BBD1F34B0C79A71F2E9205D7B95E16</code> <code>EC1B469FAFAA59A09B3503D7197E6E0B</code> <code>7BD60D92A0DCE720192E91D5B77C8F66</code> <code>10FD7E3D95FDEFF40C172BF4439B2E24</code><br> <code>A05C57D5</code></td>
|
||||
<td><code>FE000100A215D057BC6648453D68C2F4</code> <code>18A38D9D4F4FA47E5D520AC7EBC2ADC3</code> <code>B00075090C10A1E9D96A5DDA127317F2</code> <code>DDC165C5F6C8C2854648C106D0D9DF68</code> <code>4DAE70B0E6021658806245B494B762B1</code> <code>979E8BD597B5CC8E43A80F96CA47FB07</code> <code>65C98D40529F3D94C82113AE32C603AA</code> <code>24411EF8B330565A1D66EA6B89C9D4F8</code> <code>AFFEEA397C4B247564215D147B6AD0DF</code> <code>7F3FB4499E89E34304531D87448B9196</code> <code>7B5BD53093F09386C0F78940C1DD6AA7</code> <code>C8667E15857453E6AAD275F94CD38646</code> <code>8CF49108FB7C54282596A4D0314DCE9E</code> <code>FED4066A6E072471439AEAAA74157DB7</code> <code>DD53F01982982534DEE8740610BA433B</code> <code>F459B3DFE38674561F31991CE007BA11</code><br> <code>2DDA6718</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 = BA0D89B58F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA860
|
|||
<!-- 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 = 54B643668F696EB053F560412B22A98B8341B6C1B6259A84BD0F6D6117193C56D9EA86020000000000000000FE00010091BF40DC89956A1BAB9AD81375E9D7687F8AE76EC791525D1C3E79F7FC6C734C6B005B0D8E1AAC7FCEFC4B0C1347F6E44DF94057E0AA07CD283986FDEA742256638DD00C806B743049EBEB980FE373B871271DEAF508669370E362A83B16BD1565F1B81DF0C1C10887EEA4895499741F2A3051C130FEFC56EF9340A26707F190FE1426E39646A805FE59A58548CDED66A1E8611D94F4C69647F1FD8586886DA784371D0DE0215D7B67C440F879C9003894F131997EA80E3419BC54C9E4BBD1F34B0C79A71F2E9205D7B95E16EC1B469FAFAA59A09B3503D7197E6E0B7BD60D92A0DCE720192E91D5B77C8F6610FD7E3D95FDEFF40C172BF4439B2E24A05C57D5
|
||||
padding = D8F4B7CC1FB902EE46015016
|
||||
tmp_aes_key = B6DC3ABB4846E04549FA9E8BC439BE5946327ECE7BBD6A2C4C7A14623BD9F361
|
||||
tmp_aes_iv = 7E28D97049A23CBEA0233B5493865156A266BC2FA6EEE59087CE0BED45221E84</code></pre>
|
||||
<pre><code>data = 54B64366406709F612FADFBEC3F0289D0AA67EEFE11DBC3BC97D91A26154F932AF0199430000000000000000FE000100A215D057BC6648453D68C2F418A38D9D4F4FA47E5D520AC7EBC2ADC3B00075090C10A1E9D96A5DDA127317F2DDC165C5F6C8C2854648C106D0D9DF684DAE70B0E6021658806245B494B762B1979E8BD597B5CC8E43A80F96CA47FB0765C98D40529F3D94C82113AE32C603AA24411EF8B330565A1D66EA6B89C9D4F8AFFEEA397C4B247564215D147B6AD0DF7F3FB4499E89E34304531D87448B91967B5BD53093F09386C0F78940C1DD6AA7C8667E15857453E6AAD275F94CD386468CF49108FB7C54282596A4D0314DCE9EFED4066A6E072471439AEAAA74157DB7DD53F01982982534DEE8740610BA433BF459B3DFE38674561F31991CE007BA112DDA6718
|
||||
padding = 74876952857BA6AAA495A20D
|
||||
tmp_aes_key = 5EA702F743E850F5546E857F08B7D5337BBAEDF9B61248751594851BE2E8C297
|
||||
tmp_aes_iv = 1CEF8E372A63D97EBFA805C0DBB018BC7C1E0931693FBCB1A1AFC0C0A8BBC849</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 = F0171BAA4EF91D1AEEAD8C6569B6CA796499A3D83AB9FC81741C22E9960BA09ABFD7ACBF400E95ED60A5749A416881D527284008F29FF4E596447D88E239E82EDF6A9FE315A9FB3EA09B8E3ED2D4755FACEC01336057F9A8A590D6F0F97565DA0694308E1C634ECD09A24B7FADC8F04884AEBC378C8703A2A716B382F84B813FB1BCFFDB4EF9473BCDE11E7CC3C9DB3A6B399FC1FAAC2EF48B1CABB4608849501B75A9B99673F56623C6356385D708532B95B1C980C99DAFA58EC9D7CC6BBC620C14E4A8649749D73E91D7D8DFBC4E95E54AEDBDDEAA800E6967A4C54894F42919E9C50725D003DCAB52637492F4200D63D5395EE80D171CD04161032CBC90836C8789D7F37365F832A003464A0F0DF7D27C382962064AC4812C7BA5BB8861A011575374AAABE05FB2D30DEA1ED1735A0D84D07B910FD8BF2099325B29E1B5A8799EF87922B459BFC796412312969A69</code></pre>
|
||||
<pre><code>encrypted_data = 14D185E575255986C29BE3A0437D525BA22430CBA0CD755225945AD3A1ACEFB536518514F5086892E6E3FA84D1CBB644BC8F7BEBCDE74E31BA8A073F47623EBB6E7D94B3A676A4C1AFD4689C52D05F73D21C33F64FE6AEABD04273D9117CD064E467E1F8E6C887BCAE4679E0399AD35DB1302A80629618F8C8485248D89A4E3568B464FF7B608CBE24B51EEB81B65D76224B62A1669EAA48A99C122E5E8A778E13DD441DC52175160088A498F186A2B99C736FE8C5C3E274D804C629564A0F15DDABC5B449356A7990900652A7432AFB1499C7CE09246F6B29006425DF2926465B04F17C0077B6A336A50E46B675AD5607F05818F84EADEC1F4847BF311027E742F8B1E183C01810C4CE964F2A0F36E257849C144C9B0B93B4A7A9E57391DB0CCB0D757A2B7A77257C8FF55553D66B6E1D45E9D8CA88E5A47B16322FF2ED5F5ABE099E7006B2D29C829D746B704130B1</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 3C D8 06 00 F4 37 C5 65
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61
|
||||
0030 | 17 19 3C 56 D9 EA 86 02 FE 50 01 00 F0 17 1B AA
|
||||
0040 | 4E F9 1D 1A EE AD 8C 65 69 B6 CA 79 64 99 A3 D8
|
||||
0050 | 3A B9 FC 81 74 1C 22 E9 96 0B A0 9A BF D7 AC BF
|
||||
0060 | 40 0E 95 ED 60 A5 74 9A 41 68 81 D5 27 28 40 08
|
||||
0070 | F2 9F F4 E5 96 44 7D 88 E2 39 E8 2E DF 6A 9F E3
|
||||
0080 | 15 A9 FB 3E A0 9B 8E 3E D2 D4 75 5F AC EC 01 33
|
||||
0090 | 60 57 F9 A8 A5 90 D6 F0 F9 75 65 DA 06 94 30 8E
|
||||
00A0 | 1C 63 4E CD 09 A2 4B 7F AD C8 F0 48 84 AE BC 37
|
||||
00B0 | 8C 87 03 A2 A7 16 B3 82 F8 4B 81 3F B1 BC FF DB
|
||||
00C0 | 4E F9 47 3B CD E1 1E 7C C3 C9 DB 3A 6B 39 9F C1
|
||||
00D0 | FA AC 2E F4 8B 1C AB B4 60 88 49 50 1B 75 A9 B9
|
||||
00E0 | 96 73 F5 66 23 C6 35 63 85 D7 08 53 2B 95 B1 C9
|
||||
00F0 | 80 C9 9D AF A5 8E C9 D7 CC 6B BC 62 0C 14 E4 A8
|
||||
0100 | 64 97 49 D7 3E 91 D7 D8 DF BC 4E 95 E5 4A ED BD
|
||||
0110 | DE AA 80 0E 69 67 A4 C5 48 94 F4 29 19 E9 C5 07
|
||||
0120 | 25 D0 03 DC AB 52 63 74 92 F4 20 0D 63 D5 39 5E
|
||||
0130 | E8 0D 17 1C D0 41 61 03 2C BC 90 83 6C 87 89 D7
|
||||
0140 | F3 73 65 F8 32 A0 03 46 4A 0F 0D F7 D2 7C 38 29
|
||||
0150 | 62 06 4A C4 81 2C 7B A5 BB 88 61 A0 11 57 53 74
|
||||
0160 | AA AB E0 5F B2 D3 0D EA 1E D1 73 5A 0D 84 D0 7B
|
||||
0170 | 91 0F D8 BF 20 99 32 5B 29 E1 B5 A8 79 9E F8 79
|
||||
0180 | 22 B4 59 BF C7 96 41 23 12 96 9A 69</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 18 5C 07 00 51 3D C5 65
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 40 67 09 F6 12 FA DF BE
|
||||
0020 | C3 F0 28 9D 0A A6 7E EF E1 1D BC 3B C9 7D 91 A2
|
||||
0030 | 61 54 F9 32 AF 01 99 43 FE 50 01 00 14 D1 85 E5
|
||||
0040 | 75 25 59 86 C2 9B E3 A0 43 7D 52 5B A2 24 30 CB
|
||||
0050 | A0 CD 75 52 25 94 5A D3 A1 AC EF B5 36 51 85 14
|
||||
0060 | F5 08 68 92 E6 E3 FA 84 D1 CB B6 44 BC 8F 7B EB
|
||||
0070 | CD E7 4E 31 BA 8A 07 3F 47 62 3E BB 6E 7D 94 B3
|
||||
0080 | A6 76 A4 C1 AF D4 68 9C 52 D0 5F 73 D2 1C 33 F6
|
||||
0090 | 4F E6 AE AB D0 42 73 D9 11 7C D0 64 E4 67 E1 F8
|
||||
00A0 | E6 C8 87 BC AE 46 79 E0 39 9A D3 5D B1 30 2A 80
|
||||
00B0 | 62 96 18 F8 C8 48 52 48 D8 9A 4E 35 68 B4 64 FF
|
||||
00C0 | 7B 60 8C BE 24 B5 1E EB 81 B6 5D 76 22 4B 62 A1
|
||||
00D0 | 66 9E AA 48 A9 9C 12 2E 5E 8A 77 8E 13 DD 44 1D
|
||||
00E0 | C5 21 75 16 00 88 A4 98 F1 86 A2 B9 9C 73 6F E8
|
||||
00F0 | C5 C3 E2 74 D8 04 C6 29 56 4A 0F 15 DD AB C5 B4
|
||||
0100 | 49 35 6A 79 90 90 06 52 A7 43 2A FB 14 99 C7 CE
|
||||
0110 | 09 24 6F 6B 29 00 64 25 DF 29 26 46 5B 04 F1 7C
|
||||
0120 | 00 77 B6 A3 36 A5 0E 46 B6 75 AD 56 07 F0 58 18
|
||||
0130 | F8 4E AD EC 1F 48 47 BF 31 10 27 E7 42 F8 B1 E1
|
||||
0140 | 83 C0 18 10 C4 CE 96 4F 2A 0F 36 E2 57 84 9C 14
|
||||
0150 | 4C 9B 0B 93 B4 A7 A9 E5 73 91 DB 0C CB 0D 75 7A
|
||||
0160 | 2B 7A 77 25 7C 8F F5 55 53 D6 6B 6E 1D 45 E9 D8
|
||||
0170 | CA 88 E5 A4 7B 16 32 2F F2 ED 5F 5A BE 09 9E 70
|
||||
0180 | 06 B2 D2 9C 82 9D 74 6B 70 41 30 B1</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>3CD80600F437C565</code></td>
|
||||
<td><code>185C0700513DC565</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>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td><code>406709F612FADFBEC3F0289D0AA67EEF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td><code>E11DBC3BC97D91A26154F932AF019943</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE500100F0171BAA4EF91D1AEEAD8C65</code> <code>69B6CA796499A3D83AB9FC81741C22E9</code> <code>960BA09ABFD7ACBF400E95ED60A5749A</code> <code>416881D527284008F29FF4E596447D88</code> <code>E239E82EDF6A9FE315A9FB3EA09B8E3E</code> <code>D2D4755FACEC01336057F9A8A590D6F0</code> <code>F97565DA0694308E1C634ECD09A24B7F</code> <code>ADC8F04884AEBC378C8703A2A716B382</code> <code>F84B813FB1BCFFDB4EF9473BCDE11E7C</code> <code>C3C9DB3A6B399FC1FAAC2EF48B1CABB4</code> <code>608849501B75A9B99673F56623C63563</code> <code>85D708532B95B1C980C99DAFA58EC9D7</code> <code>CC6BBC620C14E4A8649749D73E91D7D8</code> <code>DFBC4E95E54AEDBDDEAA800E6967A4C5</code> <code>4894F42919E9C50725D003DCAB526374</code> <code>92F4200D63D5395EE80D171CD0416103</code> <code>2CBC90836C8789D7F37365F832A00346</code> <code>4A0F0DF7D27C382962064AC4812C7BA5</code> <code>BB8861A011575374AAABE05FB2D30DEA</code> <code>1ED1735A0D84D07B910FD8BF2099325B</code> <code>29E1B5A8799EF87922B459BFC7964123</code><br> <code>12969A69</code></td>
|
||||
<td><code>FE50010014D185E575255986C29BE3A0</code> <code>437D525BA22430CBA0CD755225945AD3</code> <code>A1ACEFB536518514F5086892E6E3FA84</code> <code>D1CBB644BC8F7BEBCDE74E31BA8A073F</code> <code>47623EBB6E7D94B3A676A4C1AFD4689C</code> <code>52D05F73D21C33F64FE6AEABD04273D9</code> <code>117CD064E467E1F8E6C887BCAE4679E0</code> <code>399AD35DB1302A80629618F8C8485248</code> <code>D89A4E3568B464FF7B608CBE24B51EEB</code> <code>81B65D76224B62A1669EAA48A99C122E</code> <code>5E8A778E13DD441DC52175160088A498</code> <code>F186A2B99C736FE8C5C3E274D804C629</code> <code>564A0F15DDABC5B449356A7990900652</code> <code>A7432AFB1499C7CE09246F6B29006425</code> <code>DF2926465B04F17C0077B6A336A50E46</code> <code>B675AD5607F05818F84EADEC1F4847BF</code> <code>311027E742F8B1E183C01810C4CE964F</code> <code>2A0F36E257849C144C9B0B93B4A7A9E5</code> <code>7391DB0CCB0D757A2B7A77257C8FF555</code> <code>53D66B6E1D45E9D8CA88E5A47B16322F</code> <code>F2ED5F5ABE099E7006B2D29C829D746B</code><br> <code>704130B1</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 = A280484BE6F25A806DBD0A4248A8184A00620EAB23E97E5AC0649106A6A681DEC894D940002D4DD237BE987CE7412EB956076693D2ED74CC82083E0F5BE7AF19EC498B9CD8D371B6FE103C780AD4B671A957AEA771973255FC1BC044F8288C4A1E33D63A6B0E6C50C25ED67A18C60D6BB02E265B114B464C03EA8ADB92C03BAC6361B3759D47EFABD77C1F72FC0FFBCDB687571E45C5ED950BDFED277716F2E8142B8AEB10BED0F3BB7713FFAE73C0C8EEFA52244EF436319E397D04A632B8230696AED62F296E58FF60AA4B0BC78929396D422B339338F7D5655EF088788F08F22A6765CF653FBFA358AE4D249D597F82EE51B018779293DA2468F57444A71A</code></pre>
|
||||
<pre><code>auth_key = ACA2547BAA3B4B3E6AD9129ADEE796042FC4ACAAABA40DCE7A1196640595829E2BA85C5E68E5D2B7B713B28720CCD0E65DA3B80CD8A9282BDE895755B924F4CBBCED119DEE057D3066D7095C25771A53D9AD6EC3464EE0E7FE1A4D9851F17B6CC7D6E636E0BDEA7D66153CF37005835A528E65673C1F5ADAA27465964BA89AA6FD045108B25B1DC9AB2D979864858C9EACBFA4A399CDBF2154D2CC6743C5CAA40683343D80A36C7F1289DC5AC5EE585DEA1E1CD296444EA6CD8F6C3564B2D355B310A3C02608EEA5EC36D38E941BF811489AB7A24C069E44FF54714CB4A45EEE2F310FDDC0A1B08BD3DFF8801E27C8508EFD7AD51EF3C13EF1D9A02EE4601741</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 A4 AB B5 F4 37 C5 65
|
||||
0010 | AC 00 00 00 34 F7 CB 3B 8F 69 6E B0 53 F5 60 41
|
||||
0020 | 2B 22 A9 8B 83 41 B6 C1 B6 25 9A 84 BD 0F 6D 61
|
||||
0030 | 17 19 3C 56 D9 EA 86 02 1A 44 B0 BC B0 79 40 AD
|
||||
0040 | 51 6D 1F 57 E1 72 48 9F</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 00 BE 91 51 3D C5 65
|
||||
0010 | 74 00 00 00 34 F7 CB 3B 40 67 09 F6 12 FA DF BE
|
||||
0020 | C3 F0 28 9D 0A A6 7E EF E1 1D BC 3B C9 7D 91 A2
|
||||
0030 | 61 54 F9 32 AF 01 99 43 11 42 87 13 52 16 5E 59
|
||||
0040 | E1 12 40 36 B4 8B 97 D3</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>01A4ABB5F437C565</code></td>
|
||||
<td><code>0100BE91513DC565</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>AC000000</code> (172 in decimal)</td>
|
||||
<td><code>74000000</code> (116 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>8F696EB053F560412B22A98B8341B6C1</code></td>
|
||||
<td><code>406709F612FADFBEC3F0289D0AA67EEF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>B6259A84BD0F6D6117193C56D9EA8602</code></td>
|
||||
<td><code>E11DBC3BC97D91A26154F932AF019943</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>1A44B0BCB07940AD516D1F57E172489F</code></td>
|
||||
<td><code>1142871352165E59E1124036B48B97D3</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