mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-01 12:42:07 +01:00
Update content of files
This commit is contained in:
parent
125fed4bf6
commit
66868b14ae
7 changed files with 224 additions and 214 deletions
|
@ -62,15 +62,17 @@ sponsoredWebPage#3db8ec63 flags:# url:string site_name:string photo:flags.0?Phot
|
||||||
<p><a href="https://t.me/durov/172">More about sponsored messages on Telegram</a></p>
|
<p><a href="https://t.me/durov/172">More about sponsored messages on Telegram</a></p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h4><a class="anchor" href="#displaying-sponsored-messages" id="displaying-sponsored-messages" name="displaying-sponsored-messages"><i class="anchor-icon"></i></a>Displaying sponsored messages</h4>
|
<h4><a class="anchor" href="#displaying-sponsored-messages" id="displaying-sponsored-messages" name="displaying-sponsored-messages"><i class="anchor-icon"></i></a>Displaying sponsored messages</h4>
|
||||||
<p>Sponsored messages must be displayed below all other posts in the channel, after the user scrolls further down, past the last message. The promoted channel or bot specified in the <code>from_id</code> or <code>chat_invite</code> mutually exclusive fields must be displayed as the author of the message. The message should also contain one of the following buttons at the bottom:</p>
|
<p>Sponsored messages must be displayed below all other posts in the channel, after the user scrolls further down, past the last message. The promoted channel or bot specified in the <code>from_id</code> or <code>chat_invite</code> mutually exclusive fields must be displayed as the author of the message. The message should also contain a button at the bottom with one of the following labels:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><mark><strong>View Bot</strong></mark> — if a bot is being promoted. Tapping the button must open the chat with the bot. If <code>start_param</code> is specified, the app must use the <a href="/api/links#bot-links">deep linking mechanism</a> to open the bot.</li>
|
<li><mark><strong>View Bot</strong></mark> — if a bot is being promoted. Tapping the button must open the chat with the bot. If <code>start_param</code> is specified, the app must use the <a href="/api/links#bot-links">deep linking mechanism</a> to open the bot.</li>
|
||||||
<li><mark><strong>View Channel</strong></mark> — if a channel is being promoted. Tapping the button must open the channel using the <code>from_id</code> or by <a href="/api/invites#invite-links">importing</a> the <code>chat_invite_hash</code> <a href="/api/invites#invite-links">invitation link hash »</a>.</li>
|
<li><mark><strong>View Channel</strong></mark> — if a channel is being promoted. Tapping the button must open the channel using the <code>from_id</code> or by <a href="/api/invites#invite-links">importing</a> the <code>chat_invite_hash</code> <a href="/api/invites#invite-links">invitation link hash »</a>.</li>
|
||||||
<li><mark><strong>View Post</strong></mark> — if a channel is being promoted and <code>channel_post</code> is specified. Tapping the button must open the particular channel post.</li>
|
<li><mark><strong>View Post</strong></mark> — if a channel is being promoted and <code>channel_post</code> is specified. Tapping the button must open the particular channel post.</li>
|
||||||
|
<li>The contents of the <code>button_text</code> field — if the <code>button_text</code> field is set.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>The message should be marked as "Recommended" instead of "Sponsored" if the <code>recommended</code> flag is set. </p>
|
<p>The message should be marked as "Recommended" instead of "Sponsored" if the <code>recommended</code> flag is set. </p>
|
||||||
<p>If the <code>show_peer_photo</code> flag is set, a profile photo bubble should be displayed for this message, like for messages sent in groups. The photo shown in the bubble is obtained either from the peer contained in <code>from_id</code>, or from <code>chat_invite</code>. </p>
|
<p>If the <code>show_peer_photo</code> flag is set, a profile photo bubble should be displayed for this message, like for messages sent in groups. The photo shown in the bubble is obtained either from the peer contained in <code>from_id</code>, or from <code>chat_invite</code>. </p>
|
||||||
<p>If the <code>webpage</code> flag is set, an instant view webpage preview must also be shown for the specified website.</p>
|
<p>If the <code>webpage</code> flag is set, an instant view webpage preview must also be shown for the specified website.</p>
|
||||||
|
<p>If the <code>app</code> flag is set, the specified <a href="/api/bots/webapps">Mini App</a> should be opened when clicking on the button. </p>
|
||||||
<p>If the <code>sponsor_info</code> or <code>additional_info</code> flags are set, an additional "Sponsor info" menu item must be present in the message context menu (the menu that pops up when clicking on a button), that when clicked, displays the contents of the flags. </p>
|
<p>If the <code>sponsor_info</code> or <code>additional_info</code> flags are set, an additional "Sponsor info" menu item must be present in the message context menu (the menu that pops up when clicking on a button), that when clicked, displays the contents of the flags. </p>
|
||||||
<h4><a class="anchor" href="#counting-sponsored-message-views" id="counting-sponsored-message-views" name="counting-sponsored-message-views"><i class="anchor-icon"></i></a>Counting sponsored message views</h4>
|
<h4><a class="anchor" href="#counting-sponsored-message-views" id="counting-sponsored-message-views" name="counting-sponsored-message-views"><i class="anchor-icon"></i></a>Counting sponsored message views</h4>
|
||||||
<p>Once the entire text is shown on the screen (excluding the button), <a href="/method/channels.viewSponsoredMessage">channels.viewSponsoredMessage</a> must be called with the <code>random_id</code> of the sponsored message.</p>
|
<p>Once the entire text is shown on the screen (excluding the button), <a href="/method/channels.viewSponsoredMessage">channels.viewSponsoredMessage</a> must be called with the <code>random_id</code> of the sponsored message.</p>
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>manual</strong></td>
|
<td><strong>manual</strong></td>
|
||||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/constructor/true">true</a></td>
|
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/constructor/true">true</a></td>
|
||||||
<td> </td>
|
<td>If set, indicates that the URL used for the webpage preview was specified manually using <a href="/constructor/inputMediaWebPage">inputMediaWebPage</a>, and may not be related to any of the URLs specified in the message.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>safe</strong></td>
|
<td><strong>safe</strong></td>
|
||||||
|
@ -121,6 +121,8 @@
|
||||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||||
<p><a href="/type/BotInlineMessage">BotInlineMessage</a></p>
|
<p><a href="/type/BotInlineMessage">BotInlineMessage</a></p>
|
||||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||||
|
<h4><a class="anchor" href="#inputmediawebpage" id="inputmediawebpage" name="inputmediawebpage"><i class="anchor-icon"></i></a><a href="/constructor/inputMediaWebPage">inputMediaWebPage</a></h4>
|
||||||
|
<p>Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message.</p>
|
||||||
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
|
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
|
||||||
<p>How to create styled text with message entities</p></div>
|
<p>How to create styled text with message entities</p></div>
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>app</strong></td>
|
<td><strong>app</strong></td>
|
||||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/type/BotApp">BotApp</a></td>
|
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/type/BotApp">BotApp</a></td>
|
||||||
<td> </td>
|
<td><a href="/api/bots/webapps">Mini App »</a> to open when the sponsored message is clicked.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>message</strong></td>
|
<td><strong>message</strong></td>
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>button_text</strong></td>
|
<td><strong>button_text</strong></td>
|
||||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.11?<a href="/type/string">string</a></td>
|
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.11?<a href="/type/string">string</a></td>
|
||||||
<td> </td>
|
<td>Text of the sponsored message button.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>sponsor_info</strong></td>
|
<td><strong>sponsor_info</strong></td>
|
||||||
|
@ -151,6 +151,8 @@
|
||||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||||
<p><a href="/type/SponsoredMessage">SponsoredMessage</a></p>
|
<p><a href="/type/SponsoredMessage">SponsoredMessage</a></p>
|
||||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||||
|
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||||
|
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||||
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
|
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
|
||||||
<p>How to create styled text with message entities</p></div>
|
<p>How to create styled text with message entities</p></div>
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>url</strong></td>
|
<td><strong>url</strong></td>
|
||||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
|
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
|
||||||
<td> </td>
|
<td>URL of the webpage.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>url</strong></td>
|
<td><strong>url</strong></td>
|
||||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
|
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
|
||||||
<td> </td>
|
<td>URL of the webpage</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>date</strong></td>
|
<td><strong>date</strong></td>
|
||||||
|
|
|
@ -53,9 +53,9 @@
|
||||||
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
|
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
|
||||||
<!-- start req_pq_multi -->
|
<!-- start req_pq_multi -->
|
||||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 94 E2 02 00 32 10 87 65
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 60 20 0B 00 69 28 87 65
|
||||||
0010 | 14 00 00 00 F1 8E 7E BE 47 69 58 17 B5 42 7B 73
|
0010 | 14 00 00 00 F1 8E 7E BE AE E3 68 33 0D 08 E5 0D
|
||||||
0020 | 4C DA 54 C6 41 2E 76 7F</code></pre>
|
0020 | 8A DF C5 39 8A FB C2 A3</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<p>Payload (de)serialization:</p>
|
||||||
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
|
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>94E2020032108765</code></td>
|
<td><code>60200B0069288765</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>47695817B5427B734CDA54C6412E767F</code></td>
|
<td><code>AEE368330D08E50D8ADFC5398AFBC2A3</code></td>
|
||||||
<td>Random number</td>
|
<td>Random number</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -104,11 +104,11 @@
|
||||||
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
|
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
|
||||||
<!-- start resPQ -->
|
<!-- start resPQ -->
|
||||||
<p>Received payload (excluding transport headers/trailers):</p>
|
<p>Received payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C0 F2 BC 32 10 87 65
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 18 77 ED 69 28 87 65
|
||||||
0010 | 74 00 00 00 63 24 16 05 47 69 58 17 B5 42 7B 73
|
0010 | 64 00 00 00 63 24 16 05 AE E3 68 33 0D 08 E5 0D
|
||||||
0020 | 4C DA 54 C6 41 2E 76 7F 68 85 6B A7 DF A3 4B C3
|
0020 | 8A DF C5 39 8A FB C2 A3 B8 AB F0 5D E7 C6 35 F6
|
||||||
0030 | 95 DB A8 31 49 3B E0 83 08 18 B3 8C 11 24 E9 94
|
0030 | D8 4D 0B BE 3A A0 17 2D 08 1A 5F FA 29 ED E0 ED
|
||||||
0040 | 25 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
|
0040 | 4F 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
|
||||||
0050 | 35 5F C3 0B 21 6B E8 6C 02 2B B4 C3 85 FD 64 DE
|
0050 | 35 5F C3 0B 21 6B E8 6C 02 2B B4 C3 85 FD 64 DE
|
||||||
0060 | 85 1D 9D D0</code></pre>
|
0060 | 85 1D 9D D0</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<p>Payload (de)serialization:</p>
|
||||||
|
@ -132,13 +132,13 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>01C0F2BC32108765</code></td>
|
<td><code>011877ED69288765</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_length</td>
|
<td>message_length</td>
|
||||||
<td>16, 4</td>
|
<td>16, 4</td>
|
||||||
<td><code>74000000</code> (116 in decimal)</td>
|
<td><code>64000000</code> (100 in decimal)</td>
|
||||||
<td>Message body length</td>
|
<td>Message body length</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -150,19 +150,19 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>47695817B5427B734CDA54C6412E767F</code></td>
|
<td><code>AEE368330D08E50D8ADFC5398AFBC2A3</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>40, 16</td>
|
<td>40, 16</td>
|
||||||
<td><code>68856BA7DFA34BC395DBA831493BE083</code></td>
|
<td><code>B8ABF05DE7C635F6D84D0BBE3AA0172D</code></td>
|
||||||
<td>Server-generated random number</td>
|
<td>Server-generated random number</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>pq</td>
|
<td>pq</td>
|
||||||
<td>56, 12</td>
|
<td>56, 12</td>
|
||||||
<td><code>0818B38C1124E99425000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1779920283003098149</td>
|
<td><code>081A5FFA29EDE0ED4F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1900512625765182799</td>
|
||||||
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
|
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -208,22 +208,22 @@
|
||||||
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
|
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
|
||||||
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p < q.</h5>
|
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p < q.</h5>
|
||||||
<!-- start pq -->
|
<!-- start pq -->
|
||||||
<pre><code>pq = 1779920283003098149</code></pre>
|
<pre><code>pq = 1900512625765182799</code></pre>
|
||||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1779920283003098149 = 1241013161 * 1434247709</code></p>
|
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1900512625765182799 = 1286953519 * 1476753121</code></p>
|
||||||
<pre><code>p = 1241013161
|
<pre><code>p = 1286953519
|
||||||
q = 1434247709</code></pre>
|
q = 1476753121</code></pre>
|
||||||
<!-- end pq -->
|
<!-- end pq -->
|
||||||
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
|
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
|
||||||
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
|
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
|
||||||
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
|
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
|
||||||
<!-- start p_q_inner_data_dc -->
|
<!-- start p_q_inner_data_dc -->
|
||||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 95 5F F5 A9 08 18 B3 8C 11 24 E9 94 25 00 00 00
|
<pre><code>0000 | 95 5F F5 A9 08 1A 5F FA 29 ED E0 ED 4F 00 00 00
|
||||||
0010 | 04 49 F8 5B A9 00 00 00 04 55 7C E2 1D 00 00 00
|
0010 | 04 4C B5 5A 2F 00 00 00 04 58 05 76 E1 00 00 00
|
||||||
0020 | 47 69 58 17 B5 42 7B 73 4C DA 54 C6 41 2E 76 7F
|
0020 | AE E3 68 33 0D 08 E5 0D 8A DF C5 39 8A FB C2 A3
|
||||||
0030 | 68 85 6B A7 DF A3 4B C3 95 DB A8 31 49 3B E0 83
|
0030 | B8 AB F0 5D E7 C6 35 F6 D8 4D 0B BE 3A A0 17 2D
|
||||||
0040 | 02 F0 8F 13 0D B2 81 B8 8C 6E B1 DC 6D EB 25 96
|
0040 | 47 43 75 83 F4 0F AB AB 65 89 C5 FF 27 AF 57 9B
|
||||||
0050 | EF 1C F1 1F AF A5 0D 46 4B CC 2B FC 29 2E 07 56
|
0050 | DA 75 10 97 A2 93 BC F8 9F CC 35 AB D5 F1 A9 BD
|
||||||
0060 | 02 00 00 00</code></pre>
|
0060 | 02 00 00 00</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<p>Payload (de)serialization:</p>
|
||||||
<pre><code>p_q_inner_data_dc#a9f55f95 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data;</code></pre>
|
<pre><code>p_q_inner_data_dc#a9f55f95 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data;</code></pre>
|
||||||
|
@ -246,37 +246,37 @@ q = 1434247709</code></pre>
|
||||||
<tr>
|
<tr>
|
||||||
<td>pq</td>
|
<td>pq</td>
|
||||||
<td>4, 12</td>
|
<td>4, 12</td>
|
||||||
<td><code>0818B38C1124E99425000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1779920283003098149</td>
|
<td><code>081A5FFA29EDE0ED4F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1900512625765182799</td>
|
||||||
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
|
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>p</td>
|
<td>p</td>
|
||||||
<td>16, 8</td>
|
<td>16, 8</td>
|
||||||
<td><code>0449F85BA9000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1241013161</td>
|
<td><code>044CB55A2F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1286953519</td>
|
||||||
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>q</td>
|
<td>q</td>
|
||||||
<td>24, 8</td>
|
<td>24, 8</td>
|
||||||
<td><code>04557CE21D000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1434247709</td>
|
<td><code>04580576E1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1476753121</td>
|
||||||
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>32, 16</td>
|
<td>32, 16</td>
|
||||||
<td><code>47695817B5427B734CDA54C6412E767F</code></td>
|
<td><code>AEE368330D08E50D8ADFC5398AFBC2A3</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>48, 16</td>
|
<td>48, 16</td>
|
||||||
<td><code>68856BA7DFA34BC395DBA831493BE083</code></td>
|
<td><code>B8ABF05DE7C635F6D84D0BBE3AA0172D</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>new_nonce</td>
|
<td>new_nonce</td>
|
||||||
<td>64, 32</td>
|
<td>64, 32</td>
|
||||||
<td><code>02F08F130DB281B88C6EB1DC6DEB2596</code> <code>EF1CF11FAFA50D464BCC2BFC292E0756</code></td>
|
<td><code>47437583F40FABAB6589C5FF27AF579B</code> <code>DA751097A293BCF89FCC35ABD5F1A9BD</code></td>
|
||||||
<td>Client-generated random number</td>
|
<td>Client-generated random number</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -291,39 +291,39 @@ q = 1434247709</code></pre>
|
||||||
<p>The serialization of <em>P_Q_inner_data</em> produces <strong>data</strong>, which is used to generate <strong>encrypted_data</strong> as specified in <a href="/mtproto/auth_key">step 4.1</a>.<br>
|
<p>The serialization of <em>P_Q_inner_data</em> produces <strong>data</strong>, which is used to generate <strong>encrypted_data</strong> as specified in <a href="/mtproto/auth_key">step 4.1</a>.<br>
|
||||||
These are the inputs to the algorithm specified in <a href="/mtproto/auth_key">step 4.1</a>:</p>
|
These are the inputs to the algorithm specified in <a href="/mtproto/auth_key">step 4.1</a>:</p>
|
||||||
<!-- start p_q_inner_data_input -->
|
<!-- start p_q_inner_data_input -->
|
||||||
<pre><code>data = 955FF5A90818B38C1124E994250000000449F85BA900000004557CE21D00000047695817B5427B734CDA54C6412E767F68856BA7DFA34BC395DBA831493BE08302F08F130DB281B88C6EB1DC6DEB2596EF1CF11FAFA50D464BCC2BFC292E075602000000
|
<pre><code>data = 955FF5A9081A5FFA29EDE0ED4F000000044CB55A2F00000004580576E1000000AEE368330D08E50D8ADFC5398AFBC2A3B8ABF05DE7C635F6D84D0BBE3AA0172D47437583F40FABAB6589C5FF27AF579BDA751097A293BCF89FCC35ABD5F1A9BD02000000
|
||||||
random_padding_bytes = 4401F002BF6653C04A3399A454A8CFCF18DAB0EEC057420AC1642141C62422C66AFC954711532C545C49D522B470AE0838F155FA11E10E033AE5BB1ED0614AB081888902F855794EFBF9E799A2350AD289C8BD093F6869CE82CFA97D</code></pre>
|
random_padding_bytes = 2908A6605A3DB526D5984C4221B6B5675DCEA7B249B29CA437471CB5E3EAA11DC61C4AE6E8A8EE2F7035B41B7BA44C1735A2A7408364138CE44ED5827BEEF0D55BB44CDC01A8FA8B8BE476A6F50D9F4412DF71655F2190D768267C4B</code></pre>
|
||||||
<!-- end p_q_inner_data_input -->
|
<!-- end p_q_inner_data_input -->
|
||||||
<p>And this is the output:</p>
|
<p>And this is the output:</p>
|
||||||
<!-- start p_q_inner_data_output -->
|
<!-- start p_q_inner_data_output -->
|
||||||
<pre><code>encrypted_data = 991ABF8F3E61EAE77965DA04E48EA28523FFB2E94091DA3A4A78A3287F5ADB82CE3F39E92EC6EC45B556B0BE08F467D7E49E444A770661E8F3720805D9D06377C777CAE0B725FDB3E2FAB9A203B44B5E2AD34135208728CE3839876159D3C89BF82200E7089165F1B44A408474650E98C70F5F06C2F4FAF1BF1FECF576F514B8CCC84F807FD198DD3EEF20DEED0CB65D7FA61CBFDBC450FB1F21AF8F0CD266D3D5426AD0A12E21A6EA19D27818E5EDC169363551810C6D3987FA66E79E63A7912E46B4AE1F3924CF973223B18AF545F9BFB5B3A75A4E27BB02360C66803EC3C48FD39B080C3776C891E2564DC90FE7664D0C5F85CDB8A0302B5C0DEC7D0E34ED</code></pre>
|
<pre><code>encrypted_data = 14CE18567E07E7B0A2221FC69B4CA3ABEA9FD4C64D3C112B52422F02A04372C4BE10BF2734BFFA5E1D8AE2712B9C2D07085AEF79F5E878CFDFD6187DE7276D375C501A738982DA2778880AAAF6D32912D6AFF1AA160EBDF37DF3E8D3BF244C51CF9464B3A2EEFEA79C41622DA8E044633D5617BC5B0AE18398E427F8BC24E31356D8F4CC839C4BA2FA09D098A8A8D605602F68181BD1F2666B32D4239AAD17A6340FF236C400BB378814F4FC1E3B92CD24C353B911D0B2ECAE55A91CB4C9ACF5DEE2A14D0255B9A0C0DDAE82C3005E803FE9905253F881ACD830A0D2926E9D970793657F9B5CE0344F596D14967557488CA3CDF8B4EFF6C817513B9BAFB73A72</code></pre>
|
||||||
<!-- end p_q_inner_data_output -->
|
<!-- end p_q_inner_data_output -->
|
||||||
<p>The length of the final string is 256 bytes.</p>
|
<p>The length of the final string is 256 bytes.</p>
|
||||||
<h5><a class="anchor" href="#5-send-req-dh-params-query-with-generated-encrypted-data" id="5-send-req-dh-params-query-with-generated-encrypted-data" name="5-send-req-dh-params-query-with-generated-encrypted-data"><i class="anchor-icon"></i></a>5) Send req_DH_params query with generated <code>encrypted_data</code></h5>
|
<h5><a class="anchor" href="#5-send-req-dh-params-query-with-generated-encrypted-data" id="5-send-req-dh-params-query-with-generated-encrypted-data" name="5-send-req-dh-params-query-with-generated-encrypted-data"><i class="anchor-icon"></i></a>5) Send req_DH_params query with generated <code>encrypted_data</code></h5>
|
||||||
<!-- start req_DH_params -->
|
<!-- start req_DH_params -->
|
||||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 48 51 0A 00 32 10 87 65
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 78 5B 09 00 6A 28 87 65
|
||||||
0010 | 40 01 00 00 BE E4 12 D7 47 69 58 17 B5 42 7B 73
|
0010 | 40 01 00 00 BE E4 12 D7 AE E3 68 33 0D 08 E5 0D
|
||||||
0020 | 4C DA 54 C6 41 2E 76 7F 68 85 6B A7 DF A3 4B C3
|
0020 | 8A DF C5 39 8A FB C2 A3 B8 AB F0 5D E7 C6 35 F6
|
||||||
0030 | 95 DB A8 31 49 3B E0 83 04 49 F8 5B A9 00 00 00
|
0030 | D8 4D 0B BE 3A A0 17 2D 04 4C B5 5A 2F 00 00 00
|
||||||
0040 | 04 55 7C E2 1D 00 00 00 85 FD 64 DE 85 1D 9D D0
|
0040 | 04 58 05 76 E1 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||||
0050 | FE 00 01 00 99 1A BF 8F 3E 61 EA E7 79 65 DA 04
|
0050 | FE 00 01 00 14 CE 18 56 7E 07 E7 B0 A2 22 1F C6
|
||||||
0060 | E4 8E A2 85 23 FF B2 E9 40 91 DA 3A 4A 78 A3 28
|
0060 | 9B 4C A3 AB EA 9F D4 C6 4D 3C 11 2B 52 42 2F 02
|
||||||
0070 | 7F 5A DB 82 CE 3F 39 E9 2E C6 EC 45 B5 56 B0 BE
|
0070 | A0 43 72 C4 BE 10 BF 27 34 BF FA 5E 1D 8A E2 71
|
||||||
0080 | 08 F4 67 D7 E4 9E 44 4A 77 06 61 E8 F3 72 08 05
|
0080 | 2B 9C 2D 07 08 5A EF 79 F5 E8 78 CF DF D6 18 7D
|
||||||
0090 | D9 D0 63 77 C7 77 CA E0 B7 25 FD B3 E2 FA B9 A2
|
0090 | E7 27 6D 37 5C 50 1A 73 89 82 DA 27 78 88 0A AA
|
||||||
00A0 | 03 B4 4B 5E 2A D3 41 35 20 87 28 CE 38 39 87 61
|
00A0 | F6 D3 29 12 D6 AF F1 AA 16 0E BD F3 7D F3 E8 D3
|
||||||
00B0 | 59 D3 C8 9B F8 22 00 E7 08 91 65 F1 B4 4A 40 84
|
00B0 | BF 24 4C 51 CF 94 64 B3 A2 EE FE A7 9C 41 62 2D
|
||||||
00C0 | 74 65 0E 98 C7 0F 5F 06 C2 F4 FA F1 BF 1F EC F5
|
00C0 | A8 E0 44 63 3D 56 17 BC 5B 0A E1 83 98 E4 27 F8
|
||||||
00D0 | 76 F5 14 B8 CC C8 4F 80 7F D1 98 DD 3E EF 20 DE
|
00D0 | BC 24 E3 13 56 D8 F4 CC 83 9C 4B A2 FA 09 D0 98
|
||||||
00E0 | ED 0C B6 5D 7F A6 1C BF DB C4 50 FB 1F 21 AF 8F
|
00E0 | A8 A8 D6 05 60 2F 68 18 1B D1 F2 66 6B 32 D4 23
|
||||||
00F0 | 0C D2 66 D3 D5 42 6A D0 A1 2E 21 A6 EA 19 D2 78
|
00F0 | 9A AD 17 A6 34 0F F2 36 C4 00 BB 37 88 14 F4 FC
|
||||||
0100 | 18 E5 ED C1 69 36 35 51 81 0C 6D 39 87 FA 66 E7
|
0100 | 1E 3B 92 CD 24 C3 53 B9 11 D0 B2 EC AE 55 A9 1C
|
||||||
0110 | 9E 63 A7 91 2E 46 B4 AE 1F 39 24 CF 97 32 23 B1
|
0110 | B4 C9 AC F5 DE E2 A1 4D 02 55 B9 A0 C0 DD AE 82
|
||||||
0120 | 8A F5 45 F9 BF B5 B3 A7 5A 4E 27 BB 02 36 0C 66
|
0120 | C3 00 5E 80 3F E9 90 52 53 F8 81 AC D8 30 A0 D2
|
||||||
0130 | 80 3E C3 C4 8F D3 9B 08 0C 37 76 C8 91 E2 56 4D
|
0130 | 92 6E 9D 97 07 93 65 7F 9B 5C E0 34 4F 59 6D 14
|
||||||
0140 | C9 0F E7 66 4D 0C 5F 85 CD B8 A0 30 2B 5C 0D EC
|
0140 | 96 75 57 48 8C A3 CD F8 B4 EF F6 C8 17 51 3B 9B
|
||||||
0150 | 7D 0E 34 ED</code></pre>
|
0150 | AF B7 3A 72</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<p>Payload (de)serialization:</p>
|
||||||
<pre><code>req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;</code></pre>
|
<pre><code>req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;</code></pre>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -345,7 +345,7 @@ random_padding_bytes = 4401F002BF6653C04A3399A454A8CFCF18DAB0EEC057420AC1642141C
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>48510A0032108765</code></td>
|
<td><code>785B09006A288765</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -363,25 +363,25 @@ random_padding_bytes = 4401F002BF6653C04A3399A454A8CFCF18DAB0EEC057420AC1642141C
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>47695817B5427B734CDA54C6412E767F</code></td>
|
<td><code>AEE368330D08E50D8ADFC5398AFBC2A3</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>40, 16</td>
|
<td>40, 16</td>
|
||||||
<td><code>68856BA7DFA34BC395DBA831493BE083</code></td>
|
<td><code>B8ABF05DE7C635F6D84D0BBE3AA0172D</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>p</td>
|
<td>p</td>
|
||||||
<td>56, 8</td>
|
<td>56, 8</td>
|
||||||
<td><code>0449F85BA9000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1241013161</td>
|
<td><code>044CB55A2F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1286953519</td>
|
||||||
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>q</td>
|
<td>q</td>
|
||||||
<td>64, 8</td>
|
<td>64, 8</td>
|
||||||
<td><code>04557CE21D000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1434247709</td>
|
<td><code>04580576E1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1476753121</td>
|
||||||
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -393,7 +393,7 @@ random_padding_bytes = 4401F002BF6653C04A3399A454A8CFCF18DAB0EEC057420AC1642141C
|
||||||
<tr>
|
<tr>
|
||||||
<td>encrypted_data</td>
|
<td>encrypted_data</td>
|
||||||
<td>80, 260</td>
|
<td>80, 260</td>
|
||||||
<td><code>FE000100991ABF8F3E61EAE77965DA04</code> <code>E48EA28523FFB2E94091DA3A4A78A328</code> <code>7F5ADB82CE3F39E92EC6EC45B556B0BE</code> <code>08F467D7E49E444A770661E8F3720805</code> <code>D9D06377C777CAE0B725FDB3E2FAB9A2</code> <code>03B44B5E2AD34135208728CE38398761</code> <code>59D3C89BF82200E7089165F1B44A4084</code> <code>74650E98C70F5F06C2F4FAF1BF1FECF5</code> <code>76F514B8CCC84F807FD198DD3EEF20DE</code> <code>ED0CB65D7FA61CBFDBC450FB1F21AF8F</code> <code>0CD266D3D5426AD0A12E21A6EA19D278</code> <code>18E5EDC169363551810C6D3987FA66E7</code> <code>9E63A7912E46B4AE1F3924CF973223B1</code> <code>8AF545F9BFB5B3A75A4E27BB02360C66</code> <code>803EC3C48FD39B080C3776C891E2564D</code> <code>C90FE7664D0C5F85CDB8A0302B5C0DEC</code><br> <code>7D0E34ED</code></td>
|
<td><code>FE00010014CE18567E07E7B0A2221FC6</code> <code>9B4CA3ABEA9FD4C64D3C112B52422F02</code> <code>A04372C4BE10BF2734BFFA5E1D8AE271</code> <code>2B9C2D07085AEF79F5E878CFDFD6187D</code> <code>E7276D375C501A738982DA2778880AAA</code> <code>F6D32912D6AFF1AA160EBDF37DF3E8D3</code> <code>BF244C51CF9464B3A2EEFEA79C41622D</code> <code>A8E044633D5617BC5B0AE18398E427F8</code> <code>BC24E31356D8F4CC839C4BA2FA09D098</code> <code>A8A8D605602F68181BD1F2666B32D423</code> <code>9AAD17A6340FF236C400BB378814F4FC</code> <code>1E3B92CD24C353B911D0B2ECAE55A91C</code> <code>B4C9ACF5DEE2A14D0255B9A0C0DDAE82</code> <code>C3005E803FE9905253F881ACD830A0D2</code> <code>926E9D970793657F9B5CE0344F596D14</code> <code>967557488CA3CDF8B4EFF6C817513B9B</code><br> <code>AFB73A72</code></td>
|
||||||
<td>Value generated above</td>
|
<td>Value generated above</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -402,47 +402,47 @@ random_padding_bytes = 4401F002BF6653C04A3399A454A8CFCF18DAB0EEC057420AC1642141C
|
||||||
<h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5>
|
<h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5>
|
||||||
<!-- start server_DH_params_ok -->
|
<!-- start server_DH_params_ok -->
|
||||||
<p>Received payload (excluding transport headers/trailers):</p>
|
<p>Received payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 58 40 6C 33 10 87 65
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 44 FB A7 6A 28 87 65
|
||||||
0010 | E4 02 00 00 5C 07 E8 D0 47 69 58 17 B5 42 7B 73
|
0010 | A8 02 00 00 5C 07 E8 D0 AE E3 68 33 0D 08 E5 0D
|
||||||
0020 | 4C DA 54 C6 41 2E 76 7F 68 85 6B A7 DF A3 4B C3
|
0020 | 8A DF C5 39 8A FB C2 A3 B8 AB F0 5D E7 C6 35 F6
|
||||||
0030 | 95 DB A8 31 49 3B E0 83 FE 50 02 00 57 01 89 B9
|
0030 | D8 4D 0B BE 3A A0 17 2D FE 50 02 00 DC 6E 86 DB
|
||||||
0040 | EB 35 8B DF C4 B5 A3 3C 00 72 96 40 55 DF 69 12
|
0040 | 59 1C C0 85 6A 72 3D 94 7E EF 1F 71 5B 12 26 6B
|
||||||
0050 | FB 84 1B 3F 85 97 A7 49 0E 47 44 A1 72 62 5A B3
|
0050 | 01 9D 50 17 0A 0C F0 57 2C 15 C5 FE 74 55 E4 1E
|
||||||
0060 | 10 1B 84 BF 22 4D 3B 65 24 65 2A 70 78 05 D4 A4
|
0060 | 84 C8 AE A3 13 24 6E 77 8D 72 0E 35 A4 B0 22 54
|
||||||
0070 | D7 6A 70 FD 31 B9 28 23 E0 CC DB 1F B3 B4 CB 00
|
0070 | E3 E0 4A 28 9D D7 5A 07 E4 B4 61 41 B1 F0 19 0A
|
||||||
0080 | A5 3F 12 BC 32 9A F8 EF 58 AF 68 EA EA 61 FB 84
|
0080 | C1 BC 85 FC 92 32 60 52 65 F1 E3 4E EE 1B D8 6E
|
||||||
0090 | 2B 2F A7 08 A8 1C 8F 53 F8 79 D5 98 C0 C9 D2 55
|
0090 | 5D 43 40 B0 36 1F B4 09 0E 40 1A 63 46 46 3A 25
|
||||||
00A0 | EE 72 06 22 50 2A 1E E5 54 69 67 77 01 D8 7D 28
|
00A0 | 52 58 8E 68 5C C1 26 55 B6 A6 5F 79 77 8A 07 43
|
||||||
00B0 | 5E 00 39 16 3D 0A AF 28 2F 85 91 89 0A 23 6F 77
|
00B0 | 2A 5A 90 46 7E 8C EF E6 25 EA A5 02 B1 59 23 A7
|
||||||
00C0 | A0 99 85 2B C4 2A 68 D5 E7 E2 8D F1 4D 61 0A FC
|
00C0 | 09 26 06 C8 04 11 9B C2 34 F7 07 32 57 A5 B5 61
|
||||||
00D0 | 40 CE DC 56 5C BF 61 62 1A 62 08 22 0E A5 83 B4
|
00D0 | F4 C6 98 BD E5 5A 43 6E 39 ED B2 9B 6C B8 2B 2A
|
||||||
00E0 | A2 CF 2A 33 38 C5 33 62 E5 B1 BC F2 1C B3 FB 7A
|
00E0 | 7C 60 CE 41 6B C1 59 D5 BF C2 C7 85 4A D3 16 48
|
||||||
00F0 | AB F7 23 BF BA ED 9B 6D FF A2 0B CB 12 79 24 56
|
00F0 | A5 44 99 88 3B 4C 3E 9A D2 BE 56 96 B6 A7 F0 BD
|
||||||
0100 | 8A 26 AE 25 57 D6 34 C3 9A CB E7 19 48 96 C4 3E
|
0100 | D8 EC 6F 66 40 B4 42 B0 C6 2A C1 B3 96 8E 47 43
|
||||||
0110 | 2A 3A 59 E6 95 66 C0 8F 75 D5 BE 9F F3 32 28 3D
|
0110 | 6A 21 63 77 C5 64 9D E0 C7 2C 78 AE 3B 84 54 80
|
||||||
0120 | BE 85 44 C3 0B 22 55 E9 31 71 5C 6D B4 A4 CB 72
|
0120 | 32 9A 78 68 F6 D0 26 0B 90 67 04 DB 42 54 74 E0
|
||||||
0130 | 5C 57 43 E1 A9 EC 09 8F 90 C9 75 E5 6B B9 B3 AC
|
0130 | B8 B1 E7 32 74 DE F5 36 15 C7 49 55 10 F2 DB 4A
|
||||||
0140 | AC 0B FB AC EB 3C 7E 0C AB 59 C9 70 D2 93 A6 97
|
0140 | 60 61 24 D0 B1 92 A8 28 2F 85 03 65 92 58 6A DC
|
||||||
0150 | F7 5F 53 2B BE 8E 32 F2 76 E5 F3 79 E8 95 72 CC
|
0150 | BF CD CF B1 D8 DE D9 7C 5D 4A A1 B6 8F C2 D7 8B
|
||||||
0160 | 68 32 B9 6D B5 72 D3 9A F7 14 EE F4 FB 92 6D 5D
|
0160 | 32 EE 70 77 9C 96 A0 4C 68 BF 70 BD 83 76 03 00
|
||||||
0170 | 2B E1 34 4D 9E 4F 50 6F C5 74 6C C3 A1 F8 7B E7
|
0170 | 92 C3 48 17 B3 37 37 D7 59 76 5E 05 82 7C A2 D4
|
||||||
0180 | 21 3F EE 0E 9E 32 A4 94 06 BC 48 DB 24 6D 41 0E
|
0180 | F4 77 44 6B 5A E9 5A FF CE 02 FA 77 17 B9 5F CD
|
||||||
0190 | 14 72 49 4F 76 31 94 B9 27 C9 2F 8A CF AC 21 08
|
0190 | 50 6D F8 EE 8A 31 72 25 6B 5D 21 2F 88 79 9C C6
|
||||||
01A0 | FF 84 82 AC CB 9D A4 BE 4F EF 3C B3 5A D1 EB B2
|
01A0 | 77 3F A9 B7 08 4D FD DB B6 3D 3D 94 73 41 61 D8
|
||||||
01B0 | B7 80 6A CE 20 54 60 4D 82 D0 61 54 F7 CD 97 D8
|
01B0 | 6D 0A AB 75 DE 83 8E 68 C5 DB 31 B0 E5 4D D9 6D
|
||||||
01C0 | 20 A9 7E E5 0A D3 75 58 BC 36 9E 75 24 F2 C0 B5
|
01C0 | 98 D5 4B 3B CF FE 32 37 AD 8C 1C E9 A0 06 9A 26
|
||||||
01D0 | D9 70 9B D7 D4 42 65 3B 02 60 EB F4 1C 68 2A BD
|
01D0 | C6 60 88 64 CA ED 67 6F CD 92 27 8A F7 53 F3 C5
|
||||||
01E0 | 51 99 46 8A E7 0A 32 B1 4B 53 03 F1 52 FB 2F 64
|
01E0 | F1 21 EA 87 37 6C 63 F6 0C CE D5 42 95 DA 28 A1
|
||||||
01F0 | 1A 39 4F 2D 82 11 B4 95 FE 4B 6F 81 B9 36 B3 56
|
01F0 | 36 FC AC C5 3C 32 91 1C A8 61 5B 93 1A 7C 97 3C
|
||||||
0200 | 5C 73 18 B8 A9 E5 1E 9F 6C 8E 0A 39 15 6A A6 57
|
0200 | 97 6E 39 93 81 15 7F 12 03 C2 77 F7 01 03 58 E5
|
||||||
0210 | 95 B5 1C 4C 2E 12 92 04 86 E4 BE A4 6C E0 A1 74
|
0210 | 4E EA 91 78 E0 A7 1A AC F9 9D 74 89 51 85 C7 F8
|
||||||
0220 | 4C 47 00 3F BA DE 95 A3 85 7A 06 CE 10 4E 83 03
|
0220 | B6 06 B3 15 20 F1 9E 27 AD D1 CA 2C 33 63 4D 9B
|
||||||
0230 | 7F 2B 78 88 0E B2 BA BF 74 A0 9B D6 89 70 D8 78
|
0230 | 5A FA 02 F3 11 60 0A 0D F4 A7 5D C9 87 84 B9 0C
|
||||||
0240 | 8A F6 FB 67 FD EE 8D 5D 8F 7B CE D7 93 72 8F 89
|
0240 | 73 FC 93 EE 54 F5 34 8B EA 2D 06 27 CB 7A FA 15
|
||||||
0250 | A6 26 3E 30 13 B3 28 8A 0E DE 57 1F 61 CD 3C 2B
|
0250 | D7 22 08 EB 89 3C 60 49 02 A4 81 5C 10 22 C5 F6
|
||||||
0260 | BA 27 98 E3 DC 93 F3 F4 0B 26 21 29 29 60 4A FC
|
0260 | 3C 5F 0B C9 41 9A 58 11 41 41 A2 69 87 7D F0 0E
|
||||||
0270 | C1 A9 CD 84 DB 5E 2B 68 A1 84 C9 28 46 58 1F 30
|
0270 | 03 90 37 BB 18 06 16 5E 19 67 56 F7 F4 12 A8 40
|
||||||
0280 | BD 27 37 D5 7B 79 AE 40 BC 98 8A 30</code></pre>
|
0280 | 85 23 7A AA 8D 90 A7 D5 D2 5A 6A 14</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<p>Payload (de)serialization:</p>
|
||||||
<pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
|
<pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -464,13 +464,13 @@ random_padding_bytes = 4401F002BF6653C04A3399A454A8CFCF18DAB0EEC057420AC1642141C
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>0158406C33108765</code></td>
|
<td><code>0144FBA76A288765</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_length</td>
|
<td>message_length</td>
|
||||||
<td>16, 4</td>
|
<td>16, 4</td>
|
||||||
<td><code>E4020000</code> (740 in decimal)</td>
|
<td><code>A8020000</code> (680 in decimal)</td>
|
||||||
<td>Message body length</td>
|
<td>Message body length</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -482,19 +482,19 @@ random_padding_bytes = 4401F002BF6653C04A3399A454A8CFCF18DAB0EEC057420AC1642141C
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>47695817B5427B734CDA54C6412E767F</code></td>
|
<td><code>AEE368330D08E50D8ADFC5398AFBC2A3</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>40, 16</td>
|
<td>40, 16</td>
|
||||||
<td><code>68856BA7DFA34BC395DBA831493BE083</code></td>
|
<td><code>B8ABF05DE7C635F6D84D0BBE3AA0172D</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>encrypted_answer</td>
|
<td>encrypted_answer</td>
|
||||||
<td>56, 596</td>
|
<td>56, 596</td>
|
||||||
<td><code>FE500200570189B9EB358BDFC4B5A33C</code> <code>0072964055DF6912FB841B3F8597A749</code> <code>0E4744A172625AB3101B84BF224D3B65</code> <code>24652A707805D4A4D76A70FD31B92823</code> <code>E0CCDB1FB3B4CB00A53F12BC329AF8EF</code> <code>58AF68EAEA61FB842B2FA708A81C8F53</code> <code>F879D598C0C9D255EE720622502A1EE5</code> <code>5469677701D87D285E0039163D0AAF28</code> <code>2F8591890A236F77A099852BC42A68D5</code> <code>E7E28DF14D610AFC40CEDC565CBF6162</code> <code>1A6208220EA583B4A2CF2A3338C53362</code> <code>E5B1BCF21CB3FB7AABF723BFBAED9B6D</code> <code>FFA20BCB127924568A26AE2557D634C3</code> <code>9ACBE7194896C43E2A3A59E69566C08F</code> <code>75D5BE9FF332283DBE8544C30B2255E9</code> <code>31715C6DB4A4CB725C5743E1A9EC098F</code> <code>90C975E56BB9B3ACAC0BFBACEB3C7E0C</code> <code>AB59C970D293A697F75F532BBE8E32F2</code> <code>76E5F379E89572CC6832B96DB572D39A</code> <code>F714EEF4FB926D5D2BE1344D9E4F506F</code> <code>C5746CC3A1F87BE7213FEE0E9E32A494</code> <code>06BC48DB246D410E1472494F763194B9</code> <code>27C92F8ACFAC2108FF8482ACCB9DA4BE</code> <code>4FEF3CB35AD1EBB2B7806ACE2054604D</code> <code>82D06154F7CD97D820A97EE50AD37558</code> <code>BC369E7524F2C0B5D9709BD7D442653B</code> <code>0260EBF41C682ABD5199468AE70A32B1</code> <code>4B5303F152FB2F641A394F2D8211B495</code> <code>FE4B6F81B936B3565C7318B8A9E51E9F</code> <code>6C8E0A39156AA65795B51C4C2E129204</code> <code>86E4BEA46CE0A1744C47003FBADE95A3</code> <code>857A06CE104E83037F2B78880EB2BABF</code> <code>74A09BD68970D8788AF6FB67FDEE8D5D</code> <code>8F7BCED793728F89A6263E3013B3288A</code> <code>0EDE571F61CD3C2BBA2798E3DC93F3F4</code> <code>0B26212929604AFCC1A9CD84DB5E2B68</code> <code>A184C92846581F30BD2737D57B79AE40</code><br> <code>BC988A30</code></td>
|
<td><code>FE500200DC6E86DB591CC0856A723D94</code> <code>7EEF1F715B12266B019D50170A0CF057</code> <code>2C15C5FE7455E41E84C8AEA313246E77</code> <code>8D720E35A4B02254E3E04A289DD75A07</code> <code>E4B46141B1F0190AC1BC85FC92326052</code> <code>65F1E34EEE1BD86E5D4340B0361FB409</code> <code>0E401A6346463A2552588E685CC12655</code> <code>B6A65F79778A07432A5A90467E8CEFE6</code> <code>25EAA502B15923A7092606C804119BC2</code> <code>34F7073257A5B561F4C698BDE55A436E</code> <code>39EDB29B6CB82B2A7C60CE416BC159D5</code> <code>BFC2C7854AD31648A54499883B4C3E9A</code> <code>D2BE5696B6A7F0BDD8EC6F6640B442B0</code> <code>C62AC1B3968E47436A216377C5649DE0</code> <code>C72C78AE3B845480329A7868F6D0260B</code> <code>906704DB425474E0B8B1E73274DEF536</code> <code>15C7495510F2DB4A606124D0B192A828</code> <code>2F85036592586ADCBFCDCFB1D8DED97C</code> <code>5D4AA1B68FC2D78B32EE70779C96A04C</code> <code>68BF70BD8376030092C34817B33737D7</code> <code>59765E05827CA2D4F477446B5AE95AFF</code> <code>CE02FA7717B95FCD506DF8EE8A317225</code> <code>6B5D212F88799CC6773FA9B7084DFDDB</code> <code>B63D3D94734161D86D0AAB75DE838E68</code> <code>C5DB31B0E54DD96D98D54B3BCFFE3237</code> <code>AD8C1CE9A0069A26C6608864CAED676F</code> <code>CD92278AF753F3C5F121EA87376C63F6</code> <code>0CCED54295DA28A136FCACC53C32911C</code> <code>A8615B931A7C973C976E399381157F12</code> <code>03C277F7010358E54EEA9178E0A71AAC</code> <code>F99D74895185C7F8B606B31520F19E27</code> <code>ADD1CA2C33634D9B5AFA02F311600A0D</code> <code>F4A75DC98784B90C73FC93EE54F5348B</code> <code>EA2D0627CB7AFA15D72208EB893C6049</code> <code>02A4815C1022C5F63C5F0BC9419A5811</code> <code>4141A269877DF00E039037BB1806165E</code> <code>196756F7F412A84085237AAA8D90A7D5</code><br> <code>D25A6A14</code></td>
|
||||||
<td>See below</td>
|
<td>See below</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -502,20 +502,20 @@ random_padding_bytes = 4401F002BF6653C04A3399A454A8CFCF18DAB0EEC057420AC1642141C
|
||||||
<!-- end server_DH_params_ok -->
|
<!-- end server_DH_params_ok -->
|
||||||
<p>Decrypt <code>encrypted_answer</code> using the reverse of the process specified in <a href="/mtproto/auth_key#6-server-responds-with">step 6</a>:</p>
|
<p>Decrypt <code>encrypted_answer</code> using the reverse of the process specified in <a href="/mtproto/auth_key#6-server-responds-with">step 6</a>:</p>
|
||||||
<!-- start server_DH_inner_data_input -->
|
<!-- start server_DH_inner_data_input -->
|
||||||
<pre><code>encrypted_answer = 570189B9EB358BDFC4B5A33C0072964055DF6912FB841B3F8597A7490E4744A172625AB3101B84BF224D3B6524652A707805D4A4D76A70FD31B92823E0CCDB1FB3B4CB00A53F12BC329AF8EF58AF68EAEA61FB842B2FA708A81C8F53F879D598C0C9D255EE720622502A1EE55469677701D87D285E0039163D0AAF282F8591890A236F77A099852BC42A68D5E7E28DF14D610AFC40CEDC565CBF61621A6208220EA583B4A2CF2A3338C53362E5B1BCF21CB3FB7AABF723BFBAED9B6DFFA20BCB127924568A26AE2557D634C39ACBE7194896C43E2A3A59E69566C08F75D5BE9FF332283DBE8544C30B2255E931715C6DB4A4CB725C5743E1A9EC098F90C975E56BB9B3ACAC0BFBACEB3C7E0CAB59C970D293A697F75F532BBE8E32F276E5F379E89572CC6832B96DB572D39AF714EEF4FB926D5D2BE1344D9E4F506FC5746CC3A1F87BE7213FEE0E9E32A49406BC48DB246D410E1472494F763194B927C92F8ACFAC2108FF8482ACCB9DA4BE4FEF3CB35AD1EBB2B7806ACE2054604D82D06154F7CD97D820A97EE50AD37558BC369E7524F2C0B5D9709BD7D442653B0260EBF41C682ABD5199468AE70A32B14B5303F152FB2F641A394F2D8211B495FE4B6F81B936B3565C7318B8A9E51E9F6C8E0A39156AA65795B51C4C2E12920486E4BEA46CE0A1744C47003FBADE95A3857A06CE104E83037F2B78880EB2BABF74A09BD68970D8788AF6FB67FDEE8D5D8F7BCED793728F89A6263E3013B3288A0EDE571F61CD3C2BBA2798E3DC93F3F40B26212929604AFCC1A9CD84DB5E2B68A184C92846581F30BD2737D57B79AE40BC988A30
|
<pre><code>encrypted_answer = DC6E86DB591CC0856A723D947EEF1F715B12266B019D50170A0CF0572C15C5FE7455E41E84C8AEA313246E778D720E35A4B02254E3E04A289DD75A07E4B46141B1F0190AC1BC85FC9232605265F1E34EEE1BD86E5D4340B0361FB4090E401A6346463A2552588E685CC12655B6A65F79778A07432A5A90467E8CEFE625EAA502B15923A7092606C804119BC234F7073257A5B561F4C698BDE55A436E39EDB29B6CB82B2A7C60CE416BC159D5BFC2C7854AD31648A54499883B4C3E9AD2BE5696B6A7F0BDD8EC6F6640B442B0C62AC1B3968E47436A216377C5649DE0C72C78AE3B845480329A7868F6D0260B906704DB425474E0B8B1E73274DEF53615C7495510F2DB4A606124D0B192A8282F85036592586ADCBFCDCFB1D8DED97C5D4AA1B68FC2D78B32EE70779C96A04C68BF70BD8376030092C34817B33737D759765E05827CA2D4F477446B5AE95AFFCE02FA7717B95FCD506DF8EE8A3172256B5D212F88799CC6773FA9B7084DFDDBB63D3D94734161D86D0AAB75DE838E68C5DB31B0E54DD96D98D54B3BCFFE3237AD8C1CE9A0069A26C6608864CAED676FCD92278AF753F3C5F121EA87376C63F60CCED54295DA28A136FCACC53C32911CA8615B931A7C973C976E399381157F1203C277F7010358E54EEA9178E0A71AACF99D74895185C7F8B606B31520F19E27ADD1CA2C33634D9B5AFA02F311600A0DF4A75DC98784B90C73FC93EE54F5348BEA2D0627CB7AFA15D72208EB893C604902A4815C1022C5F63C5F0BC9419A58114141A269877DF00E039037BB1806165E196756F7F412A84085237AAA8D90A7D5D25A6A14
|
||||||
tmp_aes_key = 05EE1D4D6ADC2782A7ACECACA3A6559E1784F016F92904133459FC8A893EB7AE
|
tmp_aes_key = E22B38C451C5CAAD463303B485C7E600941F2C9CC4707A08024C1CEF4A830DCA
|
||||||
tmp_aes_iv = 048BD652499FBF9CDA0F2C1FA72119F1E64C3B9B4A764020165077B702F08F13</code></pre>
|
tmp_aes_iv = 527793E83B9AB7FB8C8F70BD977F382287996678B1CA4491600094AF47437583</code></pre>
|
||||||
<!-- end server_DH_inner_data_input -->
|
<!-- end server_DH_inner_data_input -->
|
||||||
<p>Yielding:</p>
|
<p>Yielding:</p>
|
||||||
<!-- start server_DH_inner_data_output -->
|
<!-- start server_DH_inner_data_output -->
|
||||||
<pre><code>answer_with_hash = 9103528EB5C8775E57049EFE748C5200F6145C2DBA0D89B547695817B5427B734CDA54C6412E767F68856BA7DFA34BC395DBA831493BE08303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010042EDEADD1E44E75004AF29E10CD8130FAF926023DC51CE79B3FD523715CBEE6218002D5F6F42E7C38F241326A49C89B2ABEE867A69459FC3520D68B5A6A313E967B6765C221B120FEE2891654DC43E03945AF26F0EC5A367C93A9837C551C2B4F219605E938708E3C2365E8F8517FDDA1D80B22EBA9905B84332593E8E0F4FA7D3E9F03FDAA1EE7271B87EA34CAB0AFF2B60788853A41907704B4328ABF5CF11BEC74DF0B29B1EE2C123430A36DE56B9261CD777B5951763A56136620CBE37988FA0C4E059844C787AD4BA1F0D2478FF1E5BBE8DC570B74742EC53AF06FA210BEC9B2B1A3FDC9B1FE765BA54C1F56CB7A8F7D86F040E51837E96F21DB91F5981331087655149ACCDB088F8EF
|
<pre><code>answer_with_hash = 58B93B7E6389D04EB04F9A364F84B1827A7D91E7BA0D89B5AEE368330D08E50D8ADFC5398AFBC2A3B8ABF05DE7C635F6D84D0BBE3AA0172D03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010097B45C13074C36BD49796FFDE5830CBA658EBB755A31FEDB1FCC8E57B2EADF64A41EA6B9FA9769D12AFEC403CF043FA1BA747164B609802E9429F81A76C89B1CCD77E753298A41AF787D71111865636F1168285A7321678DBFA99F775C760F215F0917F11975271232BB201DD6FAB340D199E71F56EDF5943FED916B73A87EB7AE77AA062E07D10A270D2EF808494546CE863765E311BEA5D7F8E45D163910963E051B501D5D73496A373D08B9528D0461E28CF753326683F898BAC91AF8D78042BBD01D0D49BF98468CF3BCA895B87885C6FBF852ADD8069D93C6ACB74B192EAEAC689059074B5201B1E42AC505DDD765C5DB8FBD7B6D918EBCE67A17BE23016A288765F0C5EEB395B10347
|
||||||
answer = BA0D89B547695817B5427B734CDA54C6412E767F68856BA7DFA34BC395DBA831493BE08303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010042EDEADD1E44E75004AF29E10CD8130FAF926023DC51CE79B3FD523715CBEE6218002D5F6F42E7C38F241326A49C89B2ABEE867A69459FC3520D68B5A6A313E967B6765C221B120FEE2891654DC43E03945AF26F0EC5A367C93A9837C551C2B4F219605E938708E3C2365E8F8517FDDA1D80B22EBA9905B84332593E8E0F4FA7D3E9F03FDAA1EE7271B87EA34CAB0AFF2B60788853A41907704B4328ABF5CF11BEC74DF0B29B1EE2C123430A36DE56B9261CD777B5951763A56136620CBE37988FA0C4E059844C787AD4BA1F0D2478FF1E5BBE8DC570B74742EC53AF06FA210BEC9B2B1A3FDC9B1FE765BA54C1F56CB7A8F7D86F040E51837E96F21DB91F5981331087655149ACCDB088F8EF</code></pre>
|
answer = BA0D89B5AEE368330D08E50D8ADFC5398AFBC2A3B8ABF05DE7C635F6D84D0BBE3AA0172D03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010097B45C13074C36BD49796FFDE5830CBA658EBB755A31FEDB1FCC8E57B2EADF64A41EA6B9FA9769D12AFEC403CF043FA1BA747164B609802E9429F81A76C89B1CCD77E753298A41AF787D71111865636F1168285A7321678DBFA99F775C760F215F0917F11975271232BB201DD6FAB340D199E71F56EDF5943FED916B73A87EB7AE77AA062E07D10A270D2EF808494546CE863765E311BEA5D7F8E45D163910963E051B501D5D73496A373D08B9528D0461E28CF753326683F898BAC91AF8D78042BBD01D0D49BF98468CF3BCA895B87885C6FBF852ADD8069D93C6ACB74B192EAEAC689059074B5201B1E42AC505DDD765C5DB8FBD7B6D918EBCE67A17BE23016A288765F0C5EEB395B10347</code></pre>
|
||||||
<!-- end server_DH_inner_data_output -->
|
<!-- end server_DH_inner_data_output -->
|
||||||
<!-- start server_DH_inner_data -->
|
<!-- start server_DH_inner_data -->
|
||||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | BA 0D 89 B5 47 69 58 17 B5 42 7B 73 4C DA 54 C6
|
<pre><code>0000 | BA 0D 89 B5 AE E3 68 33 0D 08 E5 0D 8A DF C5 39
|
||||||
0010 | 41 2E 76 7F 68 85 6B A7 DF A3 4B C3 95 DB A8 31
|
0010 | 8A FB C2 A3 B8 AB F0 5D E7 C6 35 F6 D8 4D 0B BE
|
||||||
0020 | 49 3B E0 83 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
0020 | 3A A0 17 2D 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||||
0030 | C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23
|
0030 | C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23
|
||||||
0040 | 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A
|
0040 | 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A
|
||||||
0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E
|
0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E
|
||||||
|
@ -532,23 +532,23 @@ answer = BA0D89B547695817B5427B734CDA54C6412E767F68856BA7DFA34BC395DBA831493BE08
|
||||||
0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6
|
0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6
|
||||||
0110 | 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0
|
0110 | 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0
|
||||||
0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
|
0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
|
||||||
0130 | 42 ED EA DD 1E 44 E7 50 04 AF 29 E1 0C D8 13 0F
|
0130 | 97 B4 5C 13 07 4C 36 BD 49 79 6F FD E5 83 0C BA
|
||||||
0140 | AF 92 60 23 DC 51 CE 79 B3 FD 52 37 15 CB EE 62
|
0140 | 65 8E BB 75 5A 31 FE DB 1F CC 8E 57 B2 EA DF 64
|
||||||
0150 | 18 00 2D 5F 6F 42 E7 C3 8F 24 13 26 A4 9C 89 B2
|
0150 | A4 1E A6 B9 FA 97 69 D1 2A FE C4 03 CF 04 3F A1
|
||||||
0160 | AB EE 86 7A 69 45 9F C3 52 0D 68 B5 A6 A3 13 E9
|
0160 | BA 74 71 64 B6 09 80 2E 94 29 F8 1A 76 C8 9B 1C
|
||||||
0170 | 67 B6 76 5C 22 1B 12 0F EE 28 91 65 4D C4 3E 03
|
0170 | CD 77 E7 53 29 8A 41 AF 78 7D 71 11 18 65 63 6F
|
||||||
0180 | 94 5A F2 6F 0E C5 A3 67 C9 3A 98 37 C5 51 C2 B4
|
0180 | 11 68 28 5A 73 21 67 8D BF A9 9F 77 5C 76 0F 21
|
||||||
0190 | F2 19 60 5E 93 87 08 E3 C2 36 5E 8F 85 17 FD DA
|
0190 | 5F 09 17 F1 19 75 27 12 32 BB 20 1D D6 FA B3 40
|
||||||
01A0 | 1D 80 B2 2E BA 99 05 B8 43 32 59 3E 8E 0F 4F A7
|
01A0 | D1 99 E7 1F 56 ED F5 94 3F ED 91 6B 73 A8 7E B7
|
||||||
01B0 | D3 E9 F0 3F DA A1 EE 72 71 B8 7E A3 4C AB 0A FF
|
01B0 | AE 77 AA 06 2E 07 D1 0A 27 0D 2E F8 08 49 45 46
|
||||||
01C0 | 2B 60 78 88 53 A4 19 07 70 4B 43 28 AB F5 CF 11
|
01C0 | CE 86 37 65 E3 11 BE A5 D7 F8 E4 5D 16 39 10 96
|
||||||
01D0 | BE C7 4D F0 B2 9B 1E E2 C1 23 43 0A 36 DE 56 B9
|
01D0 | 3E 05 1B 50 1D 5D 73 49 6A 37 3D 08 B9 52 8D 04
|
||||||
01E0 | 26 1C D7 77 B5 95 17 63 A5 61 36 62 0C BE 37 98
|
01E0 | 61 E2 8C F7 53 32 66 83 F8 98 BA C9 1A F8 D7 80
|
||||||
01F0 | 8F A0 C4 E0 59 84 4C 78 7A D4 BA 1F 0D 24 78 FF
|
01F0 | 42 BB D0 1D 0D 49 BF 98 46 8C F3 BC A8 95 B8 78
|
||||||
0200 | 1E 5B BE 8D C5 70 B7 47 42 EC 53 AF 06 FA 21 0B
|
0200 | 85 C6 FB F8 52 AD D8 06 9D 93 C6 AC B7 4B 19 2E
|
||||||
0210 | EC 9B 2B 1A 3F DC 9B 1F E7 65 BA 54 C1 F5 6C B7
|
0210 | AE AC 68 90 59 07 4B 52 01 B1 E4 2A C5 05 DD D7
|
||||||
0220 | A8 F7 D8 6F 04 0E 51 83 7E 96 F2 1D B9 1F 59 81
|
0220 | 65 C5 DB 8F BD 7B 6D 91 8E BC E6 7A 17 BE 23 01
|
||||||
0230 | 33 10 87 65</code></pre>
|
0230 | 6A 28 87 65</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<p>Payload (de)serialization:</p>
|
||||||
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
|
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -570,13 +570,13 @@ answer = BA0D89B547695817B5427B734CDA54C6412E767F68856BA7DFA34BC395DBA831493BE08
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>4, 16</td>
|
<td>4, 16</td>
|
||||||
<td><code>47695817B5427B734CDA54C6412E767F</code></td>
|
<td><code>AEE368330D08E50D8ADFC5398AFBC2A3</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>20, 16</td>
|
<td>20, 16</td>
|
||||||
<td><code>68856BA7DFA34BC395DBA831493BE083</code></td>
|
<td><code>B8ABF05DE7C635F6D84D0BBE3AA0172D</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -594,13 +594,13 @@ answer = BA0D89B547695817B5427B734CDA54C6412E767F68856BA7DFA34BC395DBA831493BE08
|
||||||
<tr>
|
<tr>
|
||||||
<td>g_a</td>
|
<td>g_a</td>
|
||||||
<td>300, 260</td>
|
<td>300, 260</td>
|
||||||
<td><code>FE00010042EDEADD1E44E75004AF29E1</code> <code>0CD8130FAF926023DC51CE79B3FD5237</code> <code>15CBEE6218002D5F6F42E7C38F241326</code> <code>A49C89B2ABEE867A69459FC3520D68B5</code> <code>A6A313E967B6765C221B120FEE289165</code> <code>4DC43E03945AF26F0EC5A367C93A9837</code> <code>C551C2B4F219605E938708E3C2365E8F</code> <code>8517FDDA1D80B22EBA9905B84332593E</code> <code>8E0F4FA7D3E9F03FDAA1EE7271B87EA3</code> <code>4CAB0AFF2B60788853A41907704B4328</code> <code>ABF5CF11BEC74DF0B29B1EE2C123430A</code> <code>36DE56B9261CD777B5951763A5613662</code> <code>0CBE37988FA0C4E059844C787AD4BA1F</code> <code>0D2478FF1E5BBE8DC570B74742EC53AF</code> <code>06FA210BEC9B2B1A3FDC9B1FE765BA54</code> <code>C1F56CB7A8F7D86F040E51837E96F21D</code><br> <code>B91F5981</code></td>
|
<td><code>FE00010097B45C13074C36BD49796FFD</code> <code>E5830CBA658EBB755A31FEDB1FCC8E57</code> <code>B2EADF64A41EA6B9FA9769D12AFEC403</code> <code>CF043FA1BA747164B609802E9429F81A</code> <code>76C89B1CCD77E753298A41AF787D7111</code> <code>1865636F1168285A7321678DBFA99F77</code> <code>5C760F215F0917F11975271232BB201D</code> <code>D6FAB340D199E71F56EDF5943FED916B</code> <code>73A87EB7AE77AA062E07D10A270D2EF8</code> <code>08494546CE863765E311BEA5D7F8E45D</code> <code>163910963E051B501D5D73496A373D08</code> <code>B9528D0461E28CF753326683F898BAC9</code> <code>1AF8D78042BBD01D0D49BF98468CF3BC</code> <code>A895B87885C6FBF852ADD8069D93C6AC</code> <code>B74B192EAEAC689059074B5201B1E42A</code> <code>C505DDD765C5DB8FBD7B6D918EBCE67A</code><br> <code>17BE2301</code></td>
|
||||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_time</td>
|
<td>server_time</td>
|
||||||
<td>560, 4</td>
|
<td>560, 4</td>
|
||||||
<td><code>33108765</code> (1703350323 in decimal)</td>
|
<td><code>6A288765</code> (1703356522 in decimal)</td>
|
||||||
<td>Server time</td>
|
<td>Server time</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -609,34 +609,34 @@ answer = BA0D89B547695817B5427B734CDA54C6412E767F68856BA7DFA34BC395DBA831493BE08
|
||||||
<h5><a class="anchor" href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" id="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" name="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message"><i class="anchor-icon"></i></a>7) Client computes random 2048-bit number <em>b</em> (using a sufficient amount of entropy) and sends the server a message</h5>
|
<h5><a class="anchor" href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" id="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" name="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message"><i class="anchor-icon"></i></a>7) Client computes random 2048-bit number <em>b</em> (using a sufficient amount of entropy) and sends the server a message</h5>
|
||||||
<p>First, generate a secure random 2048-bit number b:</p>
|
<p>First, generate a secure random 2048-bit number b:</p>
|
||||||
<!-- start b -->
|
<!-- start b -->
|
||||||
<pre><code>b = 67D188F56A5AA505D237103E8999DCAFDE21A01A445E754AA3062300356F1F3045C4F01FA1A25888D4B161B7B49E3B64852F05FE62B44597DA775380EB5A9D5824632273AE824B62AEFF39E8F1E35BD57B6345689F784F701F05AFBF3D2DDF2C0E5B220D1C61A2AD57E0EE28DEB43C5BDAFBEF5A344A92F67FFEFBFA54AD061E9A6D9CD551F97D6D50037CCEEF39FC7922A0E88D303724E5399130874CD4B70AE22A542D76710A4039D4024500D23F4655F471FC253BECA197B7D591BC80EB9480DA265F87FD069C7369D59049FF50B85920F372CC652BE7F6684BE85AF944FE1C4349E129229299573F4D40CD2EDCEF48196E0AC839AEF92DC21DD71A43E148</code></pre>
|
<pre><code>b = CD1D19B18C3F7C89246A9086F56C4321CF136B5D4ABE202952EE25BFEB0B718CEEB87C94BE2E4FB392ED6857BCCEAB4DFAB49E099BEDC809AE21E541E75700DD1225D0BD1E50792AF42D48752E8EB673FFC35DF8B55FA51E87ED8ACDBDF72B9EB0F624D484BE4585EA5AEB8C01DC49453029861B738D8D52383478C5A24D9E3CC1E8CD93AFC86C4C2D08624B9EFC8D1DCB9619032D489FC6F98A0AC75428C96ED3C3177BCD5002FEA409F81DDE313A43868A9D41E0E81779C40100957DA88EC7BE73ABF8FFA8EA85FDF15E2A3C58E088A0D279CACC8590FC596DAA3933F7AC63B5557387998B42C41EF34522A394DE886D7D7D1F8AD3A3A03C1C7827D5A66D9E</code></pre>
|
||||||
<!-- end b -->
|
<!-- end b -->
|
||||||
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
|
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
|
||||||
<!-- start g_b -->
|
<!-- start g_b -->
|
||||||
<pre><code>g_b = 5D4648B25436A0796DC974DBFBB042EA052B73223250909975CCA768D5F0AC614ECF05EFBD50DB9106251F056E81776D485D622C745CDB3DEE307FAFE8AC3B2FE7B9696FD8166C0846738191918D488D35B630BB6DE978D72F71ABFA1CF02F25F1B19A56FE646F0D10EC0FBA95F4B1746C67FCD642806012DC67911D64DAC64F06E0F947F257B67B4DB7E1C58BB408607EEAEC38B2597F36D2580A257336EB5808863DE448F826A02CDFCCA84A2731B29C03E9D6D4C3AF23C9D722A98FD35CB3D654CC5F1DDA90B91653B9B47E509F7CCBB3AFC93A9295C8FCA91CF6B96B2AC234FA4EA80F70309D0E6F42A1DA2C04A7D7ECC2613B99C399B489A29EDB8A5CF2</code></pre>
|
<pre><code>g_b = 9B04F50FDBA9644330F26411B11045029F7DA63F7B06163F841745BD88170643C8444F81E7E3B35B2B31E5F78D4ABC4FAEBB9942F2D785BD98D5EF8F806D92A949E7C2E533192059CEEBE23AEC3334CB517580CA026B5245704D15139E2CF96F83BFFB40A6FE1934BE0B74438D9326B317ACCAF520B4B2F695650A12E5C56FDE4F1CFFA9172E7991E6F6E100D90AB29004E9AB4CC00399A922AFFA842373EA54D2C8888737C3EF8CA5F123A9291BAE01999DA91BC98E6656C11EA5DA88C3B01222C1CA8EF114613F44966A73214102F9D0880CC3466101D6E0EC6AA27E3BD081BE0690A39F1D0407E77F1AE6C4C9342D65D6A3AAA6D7274D01D8CA455C8A4B15</code></pre>
|
||||||
<!-- end g_b -->
|
<!-- end g_b -->
|
||||||
<h6>7.1) generation of encrypted_data</h6>
|
<h6>7.1) generation of encrypted_data</h6>
|
||||||
<!-- start client_DH_inner_data -->
|
<!-- start client_DH_inner_data -->
|
||||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 54 B6 43 66 47 69 58 17 B5 42 7B 73 4C DA 54 C6
|
<pre><code>0000 | 54 B6 43 66 AE E3 68 33 0D 08 E5 0D 8A DF C5 39
|
||||||
0010 | 41 2E 76 7F 68 85 6B A7 DF A3 4B C3 95 DB A8 31
|
0010 | 8A FB C2 A3 B8 AB F0 5D E7 C6 35 F6 D8 4D 0B BE
|
||||||
0020 | 49 3B E0 83 00 00 00 00 00 00 00 00 FE 00 01 00
|
0020 | 3A A0 17 2D 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||||
0030 | 5D 46 48 B2 54 36 A0 79 6D C9 74 DB FB B0 42 EA
|
0030 | 9B 04 F5 0F DB A9 64 43 30 F2 64 11 B1 10 45 02
|
||||||
0040 | 05 2B 73 22 32 50 90 99 75 CC A7 68 D5 F0 AC 61
|
0040 | 9F 7D A6 3F 7B 06 16 3F 84 17 45 BD 88 17 06 43
|
||||||
0050 | 4E CF 05 EF BD 50 DB 91 06 25 1F 05 6E 81 77 6D
|
0050 | C8 44 4F 81 E7 E3 B3 5B 2B 31 E5 F7 8D 4A BC 4F
|
||||||
0060 | 48 5D 62 2C 74 5C DB 3D EE 30 7F AF E8 AC 3B 2F
|
0060 | AE BB 99 42 F2 D7 85 BD 98 D5 EF 8F 80 6D 92 A9
|
||||||
0070 | E7 B9 69 6F D8 16 6C 08 46 73 81 91 91 8D 48 8D
|
0070 | 49 E7 C2 E5 33 19 20 59 CE EB E2 3A EC 33 34 CB
|
||||||
0080 | 35 B6 30 BB 6D E9 78 D7 2F 71 AB FA 1C F0 2F 25
|
0080 | 51 75 80 CA 02 6B 52 45 70 4D 15 13 9E 2C F9 6F
|
||||||
0090 | F1 B1 9A 56 FE 64 6F 0D 10 EC 0F BA 95 F4 B1 74
|
0090 | 83 BF FB 40 A6 FE 19 34 BE 0B 74 43 8D 93 26 B3
|
||||||
00A0 | 6C 67 FC D6 42 80 60 12 DC 67 91 1D 64 DA C6 4F
|
00A0 | 17 AC CA F5 20 B4 B2 F6 95 65 0A 12 E5 C5 6F DE
|
||||||
00B0 | 06 E0 F9 47 F2 57 B6 7B 4D B7 E1 C5 8B B4 08 60
|
00B0 | 4F 1C FF A9 17 2E 79 91 E6 F6 E1 00 D9 0A B2 90
|
||||||
00C0 | 7E EA EC 38 B2 59 7F 36 D2 58 0A 25 73 36 EB 58
|
00C0 | 04 E9 AB 4C C0 03 99 A9 22 AF FA 84 23 73 EA 54
|
||||||
00D0 | 08 86 3D E4 48 F8 26 A0 2C DF CC A8 4A 27 31 B2
|
00D0 | D2 C8 88 87 37 C3 EF 8C A5 F1 23 A9 29 1B AE 01
|
||||||
00E0 | 9C 03 E9 D6 D4 C3 AF 23 C9 D7 22 A9 8F D3 5C B3
|
00E0 | 99 9D A9 1B C9 8E 66 56 C1 1E A5 DA 88 C3 B0 12
|
||||||
00F0 | D6 54 CC 5F 1D DA 90 B9 16 53 B9 B4 7E 50 9F 7C
|
00F0 | 22 C1 CA 8E F1 14 61 3F 44 96 6A 73 21 41 02 F9
|
||||||
0100 | CB B3 AF C9 3A 92 95 C8 FC A9 1C F6 B9 6B 2A C2
|
0100 | D0 88 0C C3 46 61 01 D6 E0 EC 6A A2 7E 3B D0 81
|
||||||
0110 | 34 FA 4E A8 0F 70 30 9D 0E 6F 42 A1 DA 2C 04 A7
|
0110 | BE 06 90 A3 9F 1D 04 07 E7 7F 1A E6 C4 C9 34 2D
|
||||||
0120 | D7 EC C2 61 3B 99 C3 99 B4 89 A2 9E DB 8A 5C F2</code></pre>
|
0120 | 65 D6 A3 AA A6 D7 27 4D 01 D8 CA 45 5C 8A 4B 15</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<p>Payload (de)serialization:</p>
|
||||||
<pre><code>client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;</code></pre>
|
<pre><code>client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;</code></pre>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -658,19 +658,19 @@ answer = BA0D89B547695817B5427B734CDA54C6412E767F68856BA7DFA34BC395DBA831493BE08
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>4, 16</td>
|
<td>4, 16</td>
|
||||||
<td><code>47695817B5427B734CDA54C6412E767F</code></td>
|
<td><code>AEE368330D08E50D8ADFC5398AFBC2A3</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>20, 16</td>
|
<td>20, 16</td>
|
||||||
<td><code>68856BA7DFA34BC395DBA831493BE083</code></td>
|
<td><code>B8ABF05DE7C635F6D84D0BBE3AA0172D</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>g_b</td>
|
<td>g_b</td>
|
||||||
<td>36, 260</td>
|
<td>36, 260</td>
|
||||||
<td><code>FE0001005D4648B25436A0796DC974DB</code> <code>FBB042EA052B73223250909975CCA768</code> <code>D5F0AC614ECF05EFBD50DB9106251F05</code> <code>6E81776D485D622C745CDB3DEE307FAF</code> <code>E8AC3B2FE7B9696FD8166C0846738191</code> <code>918D488D35B630BB6DE978D72F71ABFA</code> <code>1CF02F25F1B19A56FE646F0D10EC0FBA</code> <code>95F4B1746C67FCD642806012DC67911D</code> <code>64DAC64F06E0F947F257B67B4DB7E1C5</code> <code>8BB408607EEAEC38B2597F36D2580A25</code> <code>7336EB5808863DE448F826A02CDFCCA8</code> <code>4A2731B29C03E9D6D4C3AF23C9D722A9</code> <code>8FD35CB3D654CC5F1DDA90B91653B9B4</code> <code>7E509F7CCBB3AFC93A9295C8FCA91CF6</code> <code>B96B2AC234FA4EA80F70309D0E6F42A1</code> <code>DA2C04A7D7ECC2613B99C399B489A29E</code><br> <code>DB8A5CF2</code></td>
|
<td><code>FE0001009B04F50FDBA9644330F26411</code> <code>B11045029F7DA63F7B06163F841745BD</code> <code>88170643C8444F81E7E3B35B2B31E5F7</code> <code>8D4ABC4FAEBB9942F2D785BD98D5EF8F</code> <code>806D92A949E7C2E533192059CEEBE23A</code> <code>EC3334CB517580CA026B5245704D1513</code> <code>9E2CF96F83BFFB40A6FE1934BE0B7443</code> <code>8D9326B317ACCAF520B4B2F695650A12</code> <code>E5C56FDE4F1CFFA9172E7991E6F6E100</code> <code>D90AB29004E9AB4CC00399A922AFFA84</code> <code>2373EA54D2C8888737C3EF8CA5F123A9</code> <code>291BAE01999DA91BC98E6656C11EA5DA</code> <code>88C3B01222C1CA8EF114613F44966A73</code> <code>214102F9D0880CC3466101D6E0EC6AA2</code> <code>7E3BD081BE0690A39F1D0407E77F1AE6</code> <code>C4C9342D65D6A3AAA6D7274D01D8CA45</code><br> <code>5C8A4B15</code></td>
|
||||||
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
|
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -684,47 +684,47 @@ answer = BA0D89B547695817B5427B734CDA54C6412E767F68856BA7DFA34BC395DBA831493BE08
|
||||||
<!-- end client_DH_inner_data -->
|
<!-- end client_DH_inner_data -->
|
||||||
<p>The serialization of <em>Client_DH_Inner_Data</em> produces a string <strong>data</strong>. This is used to generate <strong>encrypted_data</strong> as specified in <a href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message">step 6</a>, using the following inputs:</p>
|
<p>The serialization of <em>Client_DH_Inner_Data</em> produces a string <strong>data</strong>. This is used to generate <strong>encrypted_data</strong> as specified in <a href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message">step 6</a>, using the following inputs:</p>
|
||||||
<!-- start client_DH_inner_data_input -->
|
<!-- start client_DH_inner_data_input -->
|
||||||
<pre><code>data = 54B6436647695817B5427B734CDA54C6412E767F68856BA7DFA34BC395DBA831493BE0830000000000000000FE0001005D4648B25436A0796DC974DBFBB042EA052B73223250909975CCA768D5F0AC614ECF05EFBD50DB9106251F056E81776D485D622C745CDB3DEE307FAFE8AC3B2FE7B9696FD8166C0846738191918D488D35B630BB6DE978D72F71ABFA1CF02F25F1B19A56FE646F0D10EC0FBA95F4B1746C67FCD642806012DC67911D64DAC64F06E0F947F257B67B4DB7E1C58BB408607EEAEC38B2597F36D2580A257336EB5808863DE448F826A02CDFCCA84A2731B29C03E9D6D4C3AF23C9D722A98FD35CB3D654CC5F1DDA90B91653B9B47E509F7CCBB3AFC93A9295C8FCA91CF6B96B2AC234FA4EA80F70309D0E6F42A1DA2C04A7D7ECC2613B99C399B489A29EDB8A5CF2
|
<pre><code>data = 54B64366AEE368330D08E50D8ADFC5398AFBC2A3B8ABF05DE7C635F6D84D0BBE3AA0172D0000000000000000FE0001009B04F50FDBA9644330F26411B11045029F7DA63F7B06163F841745BD88170643C8444F81E7E3B35B2B31E5F78D4ABC4FAEBB9942F2D785BD98D5EF8F806D92A949E7C2E533192059CEEBE23AEC3334CB517580CA026B5245704D15139E2CF96F83BFFB40A6FE1934BE0B74438D9326B317ACCAF520B4B2F695650A12E5C56FDE4F1CFFA9172E7991E6F6E100D90AB29004E9AB4CC00399A922AFFA842373EA54D2C8888737C3EF8CA5F123A9291BAE01999DA91BC98E6656C11EA5DA88C3B01222C1CA8EF114613F44966A73214102F9D0880CC3466101D6E0EC6AA27E3BD081BE0690A39F1D0407E77F1AE6C4C9342D65D6A3AAA6D7274D01D8CA455C8A4B15
|
||||||
padding = CBEB846A78C2813A879469B3
|
padding = A86DBE9E5537F60097E490DF
|
||||||
tmp_aes_key = 05EE1D4D6ADC2782A7ACECACA3A6559E1784F016F92904133459FC8A893EB7AE
|
tmp_aes_key = E22B38C451C5CAAD463303B485C7E600941F2C9CC4707A08024C1CEF4A830DCA
|
||||||
tmp_aes_iv = 048BD652499FBF9CDA0F2C1FA72119F1E64C3B9B4A764020165077B702F08F13</code></pre>
|
tmp_aes_iv = 527793E83B9AB7FB8C8F70BD977F382287996678B1CA4491600094AF47437583</code></pre>
|
||||||
<!-- end client_DH_inner_data_input -->
|
<!-- end client_DH_inner_data_input -->
|
||||||
<p>Process:</p>
|
<p>Process:</p>
|
||||||
<pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16)
|
<pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16)
|
||||||
encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre>
|
encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre>
|
||||||
<p>Output:</p>
|
<p>Output:</p>
|
||||||
<!-- start client_DH_inner_data_output -->
|
<!-- start client_DH_inner_data_output -->
|
||||||
<pre><code>encrypted_data = 7C64F61A54D411891A8858216376D4AF6FF14AF29D44AD55F78464DE293838217B711789DA714A3F6B0C6BDFD319E0A513E04C02BB3ECB53E1F438C61007EF28CD4BE8C2CD308B368FD25CC25D9F58F9DA8CDF72D4855D179647F5A15AA3805FA6E241F0CD2437ED86632ABFE2B72E66B57624AABE0B8FC5458B7CFA0852EFFC1B130753B476CF48EE540F8FE6ECC4681A692FDBAC73EBA2B80A80A69ABBD6F893F7CC2B83F358E7ED87E2DD4907A80732888636AE1B5382FAE05E548498628E61D50C5765282B27F5A9ADC9101BF8C53152F6FB67D69B88C958ACC09DB3800F6FF5604882EF0328E0D785BDFBCFD13D58A8A8864007BD585AF7C7C10A84E6ABF28019C8F1489627225BCF39C188539FB9AC779BE9A299B496A7F5387ABE616C2237F050994694439DCDAF246F6508F516F1667B6AB74FB7EF24CF775B4C4B2F643F595E55B49D8F57FF32E10DB07AF3</code></pre>
|
<pre><code>encrypted_data = 2F876FE34BFA63A85077F6A6385EDC8F6A329B7154F86593B466F41EBF6571E4F3BE1564651BB0B9F2755A8C44D8E682730F0AED528BA703F0800B788E656AD901DDD5D587C325B601320E6878A158D4877699D3A41F50F3A237FE5AA3551B1B28A5002C37D5E3AF0BDAE3EADD93A8167E2C98F2228A32233E47639CFFCD64C50653C8B3FF59F5E0736E4E5BE407DF6C716D672E0DB3487EA8CFA2A835013587B39CF7979DD07823841D19EBC43FEF8A994952D710DFA5EE5129BE13FE451A55E487661AF90D396CF38A574FDDC3A4BEA38D13054147ADD7119DBCD5A6B6048EBEB57ADE7E2D70EEBE1758BCF11F62440469B7BE80594BBB95AFA90496587577A2FE26B891A2D231B4D9D3A945E4DBE01CC6024B0F5FCED00304355515A9F3567C723A2164F31E4EDCB0DBE52F76F4A93D649543DFAE9349A1F65108E8DB09AF5BE8EE042771816B9A148694BCD6997D</code></pre>
|
||||||
<!-- end client_DH_inner_data_output -->
|
<!-- end client_DH_inner_data_output -->
|
||||||
<p>The length of the final string is 336 bytes.</p>
|
<p>The length of the final string is 336 bytes.</p>
|
||||||
<h6>7.2) set_client_DH_params query</h6>
|
<h6>7.2) set_client_DH_params query</h6>
|
||||||
<!-- start set_client_DH_params -->
|
<!-- start set_client_DH_params -->
|
||||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 C8 A1 0E 00 33 10 87 65
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 7C 5B 09 00 6A 28 87 65
|
||||||
0010 | 78 01 00 00 1F 5F 04 F5 47 69 58 17 B5 42 7B 73
|
0010 | 78 01 00 00 1F 5F 04 F5 AE E3 68 33 0D 08 E5 0D
|
||||||
0020 | 4C DA 54 C6 41 2E 76 7F 68 85 6B A7 DF A3 4B C3
|
0020 | 8A DF C5 39 8A FB C2 A3 B8 AB F0 5D E7 C6 35 F6
|
||||||
0030 | 95 DB A8 31 49 3B E0 83 FE 50 01 00 7C 64 F6 1A
|
0030 | D8 4D 0B BE 3A A0 17 2D FE 50 01 00 2F 87 6F E3
|
||||||
0040 | 54 D4 11 89 1A 88 58 21 63 76 D4 AF 6F F1 4A F2
|
0040 | 4B FA 63 A8 50 77 F6 A6 38 5E DC 8F 6A 32 9B 71
|
||||||
0050 | 9D 44 AD 55 F7 84 64 DE 29 38 38 21 7B 71 17 89
|
0050 | 54 F8 65 93 B4 66 F4 1E BF 65 71 E4 F3 BE 15 64
|
||||||
0060 | DA 71 4A 3F 6B 0C 6B DF D3 19 E0 A5 13 E0 4C 02
|
0060 | 65 1B B0 B9 F2 75 5A 8C 44 D8 E6 82 73 0F 0A ED
|
||||||
0070 | BB 3E CB 53 E1 F4 38 C6 10 07 EF 28 CD 4B E8 C2
|
0070 | 52 8B A7 03 F0 80 0B 78 8E 65 6A D9 01 DD D5 D5
|
||||||
0080 | CD 30 8B 36 8F D2 5C C2 5D 9F 58 F9 DA 8C DF 72
|
0080 | 87 C3 25 B6 01 32 0E 68 78 A1 58 D4 87 76 99 D3
|
||||||
0090 | D4 85 5D 17 96 47 F5 A1 5A A3 80 5F A6 E2 41 F0
|
0090 | A4 1F 50 F3 A2 37 FE 5A A3 55 1B 1B 28 A5 00 2C
|
||||||
00A0 | CD 24 37 ED 86 63 2A BF E2 B7 2E 66 B5 76 24 AA
|
00A0 | 37 D5 E3 AF 0B DA E3 EA DD 93 A8 16 7E 2C 98 F2
|
||||||
00B0 | BE 0B 8F C5 45 8B 7C FA 08 52 EF FC 1B 13 07 53
|
00B0 | 22 8A 32 23 3E 47 63 9C FF CD 64 C5 06 53 C8 B3
|
||||||
00C0 | B4 76 CF 48 EE 54 0F 8F E6 EC C4 68 1A 69 2F DB
|
00C0 | FF 59 F5 E0 73 6E 4E 5B E4 07 DF 6C 71 6D 67 2E
|
||||||
00D0 | AC 73 EB A2 B8 0A 80 A6 9A BB D6 F8 93 F7 CC 2B
|
00D0 | 0D B3 48 7E A8 CF A2 A8 35 01 35 87 B3 9C F7 97
|
||||||
00E0 | 83 F3 58 E7 ED 87 E2 DD 49 07 A8 07 32 88 86 36
|
00E0 | 9D D0 78 23 84 1D 19 EB C4 3F EF 8A 99 49 52 D7
|
||||||
00F0 | AE 1B 53 82 FA E0 5E 54 84 98 62 8E 61 D5 0C 57
|
00F0 | 10 DF A5 EE 51 29 BE 13 FE 45 1A 55 E4 87 66 1A
|
||||||
0100 | 65 28 2B 27 F5 A9 AD C9 10 1B F8 C5 31 52 F6 FB
|
0100 | F9 0D 39 6C F3 8A 57 4F DD C3 A4 BE A3 8D 13 05
|
||||||
0110 | 67 D6 9B 88 C9 58 AC C0 9D B3 80 0F 6F F5 60 48
|
0110 | 41 47 AD D7 11 9D BC D5 A6 B6 04 8E BE B5 7A DE
|
||||||
0120 | 82 EF 03 28 E0 D7 85 BD FB CF D1 3D 58 A8 A8 86
|
0120 | 7E 2D 70 EE BE 17 58 BC F1 1F 62 44 04 69 B7 BE
|
||||||
0130 | 40 07 BD 58 5A F7 C7 C1 0A 84 E6 AB F2 80 19 C8
|
0130 | 80 59 4B BB 95 AF A9 04 96 58 75 77 A2 FE 26 B8
|
||||||
0140 | F1 48 96 27 22 5B CF 39 C1 88 53 9F B9 AC 77 9B
|
0140 | 91 A2 D2 31 B4 D9 D3 A9 45 E4 DB E0 1C C6 02 4B
|
||||||
0150 | E9 A2 99 B4 96 A7 F5 38 7A BE 61 6C 22 37 F0 50
|
0150 | 0F 5F CE D0 03 04 35 55 15 A9 F3 56 7C 72 3A 21
|
||||||
0160 | 99 46 94 43 9D CD AF 24 6F 65 08 F5 16 F1 66 7B
|
0160 | 64 F3 1E 4E DC B0 DB E5 2F 76 F4 A9 3D 64 95 43
|
||||||
0170 | 6A B7 4F B7 EF 24 CF 77 5B 4C 4B 2F 64 3F 59 5E
|
0170 | DF AE 93 49 A1 F6 51 08 E8 DB 09 AF 5B E8 EE 04
|
||||||
0180 | 55 B4 9D 8F 57 FF 32 E1 0D B0 7A F3</code></pre>
|
0180 | 27 71 81 6B 9A 14 86 94 BC D6 99 7D</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<p>Payload (de)serialization:</p>
|
||||||
<pre><code>set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;</code></pre>
|
<pre><code>set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;</code></pre>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>C8A10E0033108765</code></td>
|
<td><code>7C5B09006A288765</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>47695817B5427B734CDA54C6412E767F</code></td>
|
<td><code>AEE368330D08E50D8ADFC5398AFBC2A3</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>40, 16</td>
|
<td>40, 16</td>
|
||||||
<td><code>68856BA7DFA34BC395DBA831493BE083</code></td>
|
<td><code>B8ABF05DE7C635F6D84D0BBE3AA0172D</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>encrypted_data</td>
|
<td>encrypted_data</td>
|
||||||
<td>56, 340</td>
|
<td>56, 340</td>
|
||||||
<td><code>FE5001007C64F61A54D411891A885821</code> <code>6376D4AF6FF14AF29D44AD55F78464DE</code> <code>293838217B711789DA714A3F6B0C6BDF</code> <code>D319E0A513E04C02BB3ECB53E1F438C6</code> <code>1007EF28CD4BE8C2CD308B368FD25CC2</code> <code>5D9F58F9DA8CDF72D4855D179647F5A1</code> <code>5AA3805FA6E241F0CD2437ED86632ABF</code> <code>E2B72E66B57624AABE0B8FC5458B7CFA</code> <code>0852EFFC1B130753B476CF48EE540F8F</code> <code>E6ECC4681A692FDBAC73EBA2B80A80A6</code> <code>9ABBD6F893F7CC2B83F358E7ED87E2DD</code> <code>4907A80732888636AE1B5382FAE05E54</code> <code>8498628E61D50C5765282B27F5A9ADC9</code> <code>101BF8C53152F6FB67D69B88C958ACC0</code> <code>9DB3800F6FF5604882EF0328E0D785BD</code> <code>FBCFD13D58A8A8864007BD585AF7C7C1</code> <code>0A84E6ABF28019C8F1489627225BCF39</code> <code>C188539FB9AC779BE9A299B496A7F538</code> <code>7ABE616C2237F050994694439DCDAF24</code> <code>6F6508F516F1667B6AB74FB7EF24CF77</code> <code>5B4C4B2F643F595E55B49D8F57FF32E1</code><br> <code>0DB07AF3</code></td>
|
<td><code>FE5001002F876FE34BFA63A85077F6A6</code> <code>385EDC8F6A329B7154F86593B466F41E</code> <code>BF6571E4F3BE1564651BB0B9F2755A8C</code> <code>44D8E682730F0AED528BA703F0800B78</code> <code>8E656AD901DDD5D587C325B601320E68</code> <code>78A158D4877699D3A41F50F3A237FE5A</code> <code>A3551B1B28A5002C37D5E3AF0BDAE3EA</code> <code>DD93A8167E2C98F2228A32233E47639C</code> <code>FFCD64C50653C8B3FF59F5E0736E4E5B</code> <code>E407DF6C716D672E0DB3487EA8CFA2A8</code> <code>35013587B39CF7979DD07823841D19EB</code> <code>C43FEF8A994952D710DFA5EE5129BE13</code> <code>FE451A55E487661AF90D396CF38A574F</code> <code>DDC3A4BEA38D13054147ADD7119DBCD5</code> <code>A6B6048EBEB57ADE7E2D70EEBE1758BC</code> <code>F11F62440469B7BE80594BBB95AFA904</code> <code>96587577A2FE26B891A2D231B4D9D3A9</code> <code>45E4DBE01CC6024B0F5FCED003043555</code> <code>15A9F3567C723A2164F31E4EDCB0DBE5</code> <code>2F76F4A93D649543DFAE9349A1F65108</code> <code>E8DB09AF5BE8EE042771816B9A148694</code><br> <code>BCD6997D</code></td>
|
||||||
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
|
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -785,17 +785,17 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
||||||
<h5><a class="anchor" href="#8-auth-key-generation" id="8-auth-key-generation" name="8-auth-key-generation"><i class="anchor-icon"></i></a>8) Auth key generation</h5>
|
<h5><a class="anchor" href="#8-auth-key-generation" id="8-auth-key-generation" name="8-auth-key-generation"><i class="anchor-icon"></i></a>8) Auth key generation</h5>
|
||||||
<p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p>
|
<p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p>
|
||||||
<!-- start auth_key -->
|
<!-- start auth_key -->
|
||||||
<pre><code>auth_key = 0950F3070E87DCC97997B269F3FD55D5A0F6EC3F0438BC49DD69451AC34662A031D35289521095FDC7DD4E5A93ADD24DBA551A3E7D4BEE6CF26B6544BE38B0F2FAF6351E8E0313FC1E2588B694783409B069D5E5D65B59A7FFBBF0B634B0CF66831A40B5FF50E63A3EBE26CAE622C9E20461163440CE87891FF44A972215A4CA3673C3998742EC689DD4AFE5657E27509F5740F765C37FCCD4D431404A12A2A78DE5C13698CED8C3D1AEDACB938771A3292EFA4F1971ADB1C5A3FC1B9524399A9621A9BC4BD044DC0328F006CD843802FA8C6B249418EF931E5FCEA1249E659C2B8437F78D6E60F715CB91329F219103551FDFE72555ADCD6C5E02E2677DBC69</code></pre>
|
<pre><code>auth_key = A48179538AE9C4E366097F7632DCD3F62A295013E858BCAA18846662A67C2F9551B0E45E226ACE6CE7FBE2998B5C53CFA57F498E0609844F120EABD838FA3D468836F77C59AE10DEFEC9CA7105A80E574FDB14255659782B4A29654DC76FFBB29939FDC68F22402A2A98464E6F36909514B58F024964AFBE19235CCF10EC30D2DD387F82786DE4BAF48A055DF934A60AF3CB406FCCE6E2933B8BBC2E7C212716B8A86D05FCC136110FB5C95199505B248235D534A8D65EA6017CB7399A7C2A138D3571FBB31C05D5C911E2F851342FC763E2D22F375EB716EFA7BFC8AE4DD257B90E08F19376BC598E5C9CF5DA60A368234621E307F5C543811F2988FD8CAB54</code></pre>
|
||||||
<!-- end auth_key -->
|
<!-- end auth_key -->
|
||||||
<h5><a class="anchor" href="#9-final-server-reply" id="9-final-server-reply" name="9-final-server-reply"><i class="anchor-icon"></i></a>9) Final server reply</h5>
|
<h5><a class="anchor" href="#9-final-server-reply" id="9-final-server-reply" name="9-final-server-reply"><i class="anchor-icon"></i></a>9) Final server reply</h5>
|
||||||
<p>The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:</p>
|
<p>The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:</p>
|
||||||
<!-- start dh_gen_ok -->
|
<!-- start dh_gen_ok -->
|
||||||
<p>Received payload (excluding transport headers/trailers):</p>
|
<p>Received payload (excluding transport headers/trailers):</p>
|
||||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 68 69 C1 33 10 87 65
|
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 D4 31 F9 6A 28 87 65
|
||||||
0010 | 44 00 00 00 34 F7 CB 3B 47 69 58 17 B5 42 7B 73
|
0010 | A8 00 00 00 34 F7 CB 3B AE E3 68 33 0D 08 E5 0D
|
||||||
0020 | 4C DA 54 C6 41 2E 76 7F 68 85 6B A7 DF A3 4B C3
|
0020 | 8A DF C5 39 8A FB C2 A3 B8 AB F0 5D E7 C6 35 F6
|
||||||
0030 | 95 DB A8 31 49 3B E0 83 33 BE 43 29 14 D9 10 F2
|
0030 | D8 4D 0B BE 3A A0 17 2D 19 EB 72 6C 93 38 C8 0C
|
||||||
0040 | DC 8B D8 7A D1 3D F5 DF</code></pre>
|
0040 | BB 45 F8 31 03 2A F8 E5</code></pre>
|
||||||
<p>Payload (de)serialization:</p>
|
<p>Payload (de)serialization:</p>
|
||||||
<pre><code>dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;</code></pre>
|
<pre><code>dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;</code></pre>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_id</td>
|
<td>message_id</td>
|
||||||
<td>8, 8</td>
|
<td>8, 8</td>
|
||||||
<td><code>016869C133108765</code></td>
|
<td><code>01D431F96A288765</code></td>
|
||||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>message_length</td>
|
<td>message_length</td>
|
||||||
<td>16, 4</td>
|
<td>16, 4</td>
|
||||||
<td><code>44000000</code> (68 in decimal)</td>
|
<td><code>A8000000</code> (168 in decimal)</td>
|
||||||
<td>Message body length</td>
|
<td>Message body length</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td>24, 16</td>
|
<td>24, 16</td>
|
||||||
<td><code>47695817B5427B734CDA54C6412E767F</code></td>
|
<td><code>AEE368330D08E50D8ADFC5398AFBC2A3</code></td>
|
||||||
<td>Value generated by client in Step 1</td>
|
<td>Value generated by client in Step 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>server_nonce</td>
|
<td>server_nonce</td>
|
||||||
<td>40, 16</td>
|
<td>40, 16</td>
|
||||||
<td><code>68856BA7DFA34BC395DBA831493BE083</code></td>
|
<td><code>B8ABF05DE7C635F6D84D0BBE3AA0172D</code></td>
|
||||||
<td>Value received from server in Step 2</td>
|
<td>Value received from server in Step 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>new_nonce_hash1</td>
|
<td>new_nonce_hash1</td>
|
||||||
<td>56, 16</td>
|
<td>56, 16</td>
|
||||||
<td><code>33BE432914D910F2DC8BD87AD13DF5DF</code></td>
|
<td><code>19EB726C9338C80CBB45F831032AF8E5</code></td>
|
||||||
<td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td>
|
<td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -1048,7 +1048,9 @@ var Assets = {
|
||||||
username: username,
|
username: username,
|
||||||
auction: true
|
auction: true
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
if (result.confirm_message) {
|
if (result.error) {
|
||||||
|
return showAlert(result.error);
|
||||||
|
} else if (result.confirm_message) {
|
||||||
showConfirm(result.confirm_message, function() {
|
showConfirm(result.confirm_message, function() {
|
||||||
doPutToAuction();
|
doPutToAuction();
|
||||||
}, result.confirm_button);
|
}, result.confirm_button);
|
||||||
|
@ -1148,7 +1150,9 @@ var Assets = {
|
||||||
username: username,
|
username: username,
|
||||||
auction: false
|
auction: false
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
if (result.confirm_message) {
|
if (result.error) {
|
||||||
|
return showAlert(result.error);
|
||||||
|
} else if (result.confirm_message) {
|
||||||
showConfirm(result.confirm_message, function() {
|
showConfirm(result.confirm_message, function() {
|
||||||
doSellUsername();
|
doSellUsername();
|
||||||
}, result.confirm_button);
|
}, result.confirm_button);
|
||||||
|
|
Loading…
Reference in a new issue