mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-05 02:32:23 +01:00
Update content of files
This commit is contained in:
parent
ac29ed0aca
commit
32d3f11a38
7 changed files with 225 additions and 232 deletions
|
@ -133,12 +133,14 @@ See <a href="#email-verification">here »</a> for more info on the verification
|
|||
<li><a href="/constructor/auth.sentCodeTypeFirebaseSms">auth.sentCodeTypeFirebaseSms</a>: firebase login flow, only for official apps. <ul>
|
||||
<li>On Android, can only be received if the <a href="/constructor/codeSettings">codeSettings</a>.<code>allow_firebase</code> flag is set.<br>
|
||||
The client must pass the received <a href="/constructor/auth.sentCodeTypeFirebaseSms">auth.sentCodeTypeFirebaseSms</a>.<code>nonce</code>/<code>play_integrity_nonce</code> to the <a href="https://developer.android.com/training/safetynet/attestation">SafetyNet Attestation API</a>/<a href="https://developer.android.com/google/play/integrity/overview">Google Play Integrity API</a>, and then pass the obtained JWS object to <a href="/method/auth.requestFirebaseSms">auth.requestFirebaseSms</a>.<code>safety_net_token</code>/<code>play_integrity_token</code>, along with the <code>phone_number</code> and the <code>phone_code_hash</code>.<br>
|
||||
If the method returns <a href="/constructor/boolTrue">boolTrue</a>, the code will be sent via SMS; otherwise, the <code>next_type</code> authentication method must be used, with <a href="/method/auth.resendCode">auth.resendCode</a>.</li>
|
||||
If the method returns <a href="/constructor/boolTrue">boolTrue</a>, the code will be sent via SMS; otherwise, the <code>next_type</code> authentication method must be used, with <a href="/method/auth.resendCode">auth.resendCode</a>.<br>
|
||||
The <code>next_type</code> authentication method must also be used if the device integrity verification failed, and no token could be obtained to invoke <a href="/method/auth.requestFirebaseSms">auth.requestFirebaseSms</a>: in this case, the device integrity verification failure reason must be passed to <a href="/method/auth.resendCode">auth.resendCode</a> in <code>reason</code>. </li>
|
||||
<li>On iOS, can only be received if the device token for Apple Push was passed to <a href="/constructor/codeSettings">codeSettings</a>.<code>token</code>.<br>
|
||||
The client then waits for a new push notification for <a href="/constructor/auth.sentCodeTypeFirebaseSms">auth.sentCodeTypeFirebaseSms</a>.<code>push_timeout</code> seconds.<br>
|
||||
If a push notification isn't received within <code>push_timeout</code> seconds, the <code>next_type</code> authentication method must be used, with <a href="/method/auth.resendCode">auth.resendCode</a>.<br>
|
||||
If a push notification is received with <code>receipt</code> and <code>ios_push_secret</code> fields, and the value of the <code>receipt</code> field matches <a href="/constructor/codeSettings">codeSettings</a>.<code>receipt</code>, the value of <code>ios_push_secret</code> is passed to <a href="/method/auth.requestFirebaseSms">auth.requestFirebaseSms</a>.<code>ios_push_secret</code>, along with the <code>phone_number</code> and the <code>phone_code_hash</code>.<br>
|
||||
If the method returns <a href="/constructor/boolTrue">boolTrue</a>, the code will be sent via SMS; otherwise, the <code>next_type</code> authentication method must be used, with <a href="/method/auth.resendCode">auth.resendCode</a>.</li>
|
||||
If the method returns <a href="/constructor/boolTrue">boolTrue</a>, the code will be sent via SMS; otherwise, the <code>next_type</code> authentication method must be used, with <a href="/method/auth.resendCode">auth.resendCode</a>.<br>
|
||||
The <code>next_type</code> authentication method must also be used if the device integrity verification failed, and no secret could be obtained to invoke <a href="/method/auth.requestFirebaseSms">auth.requestFirebaseSms</a>: in this case, the device integrity verification failure reason must be passed to <a href="/method/auth.resendCode">auth.resendCode</a> in <code>reason</code>. </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/constructor/auth.sentCodeTypeSms">auth.sentCodeTypeSms</a>: the code was sent via SMS.</li>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<ul>
|
||||
<li>Added <a href="/method/messages.editFactCheck">messages.editFactCheck</a> - Edit/create a <a href="/api/factcheck">fact-check</a> on a message.</li>
|
||||
<li>Added <a href="/method/messages.deleteFactCheck">messages.deleteFactCheck</a> - Delete a <a href="/api/factcheck">fact-check</a> from a message.</li>
|
||||
<li>Added <a href="/method/messages.getFactCheck">messages.getFactCheck</a> - </li>
|
||||
<li>Added <a href="/method/messages.getFactCheck">messages.getFactCheck</a> - Fetch one or more <a href="/api/factcheck">factchecks, see here »</a> for the full flow.</li>
|
||||
<li>Added <a href="/method/payments.getStarsTopupOptions">payments.getStarsTopupOptions</a> - Obtain a list of <a href="/api/stars#buying-stars">Telegram Stars topup options »</a> as <a href="/constructor/starsTopupOption">starsTopupOption</a> constructors.</li>
|
||||
<li>Added <a href="/method/payments.getStarsStatus">payments.getStarsStatus</a> - Get the current <a href="/api/stars">Telegram Stars balance</a> of the current account (with peer=<a href="/constructor/inputPeerSelf">inputPeerSelf</a>), or the stars balance of the bot specified in <code>peer</code>.</li>
|
||||
<li>Added <a href="/method/payments.getStarsTransactions">payments.getStarsTransactions</a> - Fetch <a href="/api/stars#balance-and-transaction-history">Telegram Stars transactions</a>.</li>
|
||||
|
@ -112,7 +112,7 @@
|
|||
<a href="/method/payments.sendStarsForm">payments.sendStarsForm</a>#02bb731d flags:<a href="/type/%23">#</a> form_id:<a href="/type/long">long</a> invoice:<a href="/type/InputInvoice">InputInvoice</a> = <a href="/type/payments.PaymentResult">payments.PaymentResult</a>;
|
||||
<a href="/method/payments.refundStarsCharge">payments.refundStarsCharge</a>#25ae8f4a user_id:<a href="/type/InputUser">InputUser</a> charge_id:<a href="/type/string">string</a> = <a href="/type/Updates">Updates</a>;<br></code></pre></div>
|
||||
<h3><a class="anchor" href="#layer-180" id="layer-180" name="layer-180"><i class="anchor-icon"></i></a><a href="/schema?layer=180">Layer 180</a></h3>
|
||||
<p>This layer introduces <a href="/api/effects">animated message effects »</a>, <a href="/method/channels.searchPosts">global hashtag search in all public channels (including those we aren't a member of) »</a>, <a href="/constructor/updateBroadcastRevenueTransactions">channel ad revenue transaction updates »</a>.</p>
|
||||
<p>This layer introduces <a href="/api/effects">animated message effects »</a>, <a href="/method/channels.searchPosts">global hashtag search in all public channels (including those we aren't a member of) »</a>, <a href="/constructor/updateBroadcastRevenueTransactions">channel ad revenue transaction updates »</a> and improvements to device integrity verification for official apps.</p>
|
||||
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
|
||||
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
|
||||
<ul>
|
||||
|
|
|
@ -96,6 +96,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/FactCheck">FactCheck</a></p>
|
||||
<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="#messagesgetfactcheck" id="messagesgetfactcheck" name="messagesgetfactcheck"><i class="anchor-icon"></i></a><a href="/method/messages.getFactCheck">messages.getFactCheck</a></h4>
|
||||
<p>Fetch one or more <a href="/api/factcheck">factchecks, see here »</a> for the full flow.</p>
|
||||
<h4><a class="anchor" href="#pagination-in-the-api" id="pagination-in-the-api" name="pagination-in-the-api"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination in the API</a></h4>
|
||||
<p>How to fetch results from large lists of objects.</p>
|
||||
<h4><a class="anchor" href="#fact-checks" id="fact-checks" name="fact-checks"><i class="anchor-icon"></i></a><a href="/api/factcheck">Fact-checks</a></h4>
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<tr>
|
||||
<td><strong>reason</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> </td>
|
||||
<td>Official clients only, used if the device integrity verification failed, and no secret could be obtained to invoke <a href="/method/auth.requestFirebaseSms">auth.requestFirebaseSms</a>: in this case, the device integrity verification failure reason must be passed here.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,26 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.getFactCheck</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Fetch one or more factchecks ».
|
||||
Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
peer
|
||||
InputPeer
|
||||
Peer where the messages were sent.
|
||||
msg_id…">
|
||||
<meta property="description" content="Fetch one or more factchecks, see here » for the full flow.">
|
||||
<meta property="og:title" content="messages.getFactCheck">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Fetch one or more factchecks ».
|
||||
Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
peer
|
||||
InputPeer
|
||||
Peer where the messages were sent.
|
||||
msg_id…">
|
||||
<meta property="og:description" content="Fetch one or more factchecks, see here » for the full flow.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -58,7 +42,7 @@ msg_id…">
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.getFactCheck" >messages.getFactCheck</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.getFactCheck</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Fetch one or more <a href="/api/factcheck">factchecks »</a>. </p>
|
||||
<div id="dev_page_content"><p>Fetch one or more <a href="/api/factcheck">factchecks, see here »</a> for the full flow.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -113,7 +97,12 @@ msg_id…">
|
|||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</table>
|
||||
<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="#factcheck" id="factcheck" name="factcheck"><i class="anchor-icon"></i></a><a href="/constructor/factCheck">factCheck</a></h4>
|
||||
<p>Represents a <a href="/api/factcheck">fact-check »</a> created by an independent fact-checker.</p>
|
||||
<h4><a class="anchor" href="#fact-checks" id="fact-checks" name="fact-checks"><i class="anchor-icon"></i></a><a href="/api/factcheck">Fact-checks</a></h4>
|
||||
<p>Telegram clients support displaying fact-checks added to messages by independent fact-checkers.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1348,7 +1348,7 @@ Look for updates of telegram's terms of service…">
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getFactCheck">messages.getFactCheck</a></td>
|
||||
<td> </td>
|
||||
<td>Fetch one or more <a href="/api/factcheck">factchecks, see here »</a> for the full flow.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -53,9 +53,9 @@
|
|||
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
|
||||
<!-- start req_pq_multi -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 14 A0 0C 00 30 83 A2 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 36 0B 8A A0 07 4A 79 27
|
||||
0020 | 37 AB 0C 91 14 60 FE 24</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 84 1C 00 00 26 88 A2 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE D5 49 52 34 D2 F9 4E 3F
|
||||
0020 | 02 4B DF 6D EF 52 10 8B</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -77,7 +77,7 @@
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>14A00C003083A266</code></td>
|
||||
<td><code>841C00002688A266</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
|
||||
<td><code>D5495234D2F94E3F024BDF6DEF52108B</code></td>
|
||||
<td>Random number</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -104,11 +104,11 @@
|
|||
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
|
||||
<!-- start resPQ -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 50 FD 0D 31 83 A2 66
|
||||
0010 | B4 00 00 00 63 24 16 05 36 0B 8A A0 07 4A 79 27
|
||||
0020 | 37 AB 0C 91 14 60 FE 24 DF 49 12 EC 8A 55 7D 05
|
||||
0030 | 16 A5 31 B6 83 E3 2E 71 08 11 7F 8E 7E 39 B3 96
|
||||
0040 | D7 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 E0 99 F1 26 88 A2 66
|
||||
0010 | 74 00 00 00 63 24 16 05 D5 49 52 34 D2 F9 4E 3F
|
||||
0020 | 02 4B DF 6D EF 52 10 8B 91 CE 65 C0 BC 19 5D 9A
|
||||
0030 | 0A 3F 41 56 AA 51 1B AA 08 1B 71 02 1F 03 9C 33
|
||||
0040 | F3 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
|
||||
0050 | 35 5F C3 0B 21 6B E8 6C 02 2B B4 C3 85 FD 64 DE
|
||||
0060 | 85 1D 9D D0</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
|
@ -132,13 +132,13 @@
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>0150FD0D3183A266</code></td>
|
||||
<td><code>01E099F12688A266</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>B4000000</code> (180 in decimal)</td>
|
||||
<td><code>74000000</code> (116 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
|
||||
<td><code>D5495234D2F94E3F024BDF6DEF52108B</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
|
||||
<td><code>91CE65C0BC195D9A0A3F4156AA511BAA</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>08117F8E7E39B396D7000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1260883093472122583</td>
|
||||
<td><code>081B71021F039C33F3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1977364043620168691</td>
|
||||
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -208,22 +208,22 @@
|
|||
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
|
||||
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p < q.</h5>
|
||||
<!-- start pq -->
|
||||
<pre><code>pq = 1260883093472122583</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1260883093472122583 = 1072752257 * 1175372119</code></p>
|
||||
<pre><code>p = 1072752257
|
||||
q = 1175372119</code></pre>
|
||||
<pre><code>pq = 1977364043620168691</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1977364043620168691 = 1338204457 * 1477624763</code></p>
|
||||
<pre><code>p = 1338204457
|
||||
q = 1477624763</code></pre>
|
||||
<!-- end pq -->
|
||||
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
|
||||
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
|
||||
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
|
||||
<!-- start p_q_inner_data_dc -->
|
||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 95 5F F5 A9 08 11 7F 8E 7E 39 B3 96 D7 00 00 00
|
||||
0010 | 04 3F F0 E6 81 00 00 00 04 46 0E C1 57 00 00 00
|
||||
0020 | 36 0B 8A A0 07 4A 79 27 37 AB 0C 91 14 60 FE 24
|
||||
0030 | DF 49 12 EC 8A 55 7D 05 16 A5 31 B6 83 E3 2E 71
|
||||
0040 | 42 31 B6 F3 F3 4A 57 AC 62 68 8A 89 AF 95 39 CE
|
||||
0050 | 89 F5 85 54 C5 EE EC 02 02 0D 76 0C 5F D6 C0 8D
|
||||
<pre><code>0000 | 95 5F F5 A9 08 1B 71 02 1F 03 9C 33 F3 00 00 00
|
||||
0010 | 04 4F C3 61 29 00 00 00 04 58 12 C3 BB 00 00 00
|
||||
0020 | D5 49 52 34 D2 F9 4E 3F 02 4B DF 6D EF 52 10 8B
|
||||
0030 | 91 CE 65 C0 BC 19 5D 9A 0A 3F 41 56 AA 51 1B AA
|
||||
0040 | 86 09 1F 3A 8D 38 47 DB DB 88 DF 4E 68 8A 57 06
|
||||
0050 | 9C 1B 45 4B C6 A3 D7 BC 43 7E F7 8C 9C A1 B2 5B
|
||||
0060 | 02 00 00 00</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>p_q_inner_data_dc#a9f55f95 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data;</code></pre>
|
||||
|
@ -246,37 +246,37 @@ q = 1175372119</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>08117F8E7E39B396D7000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1260883093472122583</td>
|
||||
<td><code>081B71021F039C33F3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1977364043620168691</td>
|
||||
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>16, 8</td>
|
||||
<td><code>043FF0E681000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1072752257</td>
|
||||
<td><code>044FC36129000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1338204457</td>
|
||||
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>q</td>
|
||||
<td>24, 8</td>
|
||||
<td><code>04460EC157000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1175372119</td>
|
||||
<td><code>045812C3BB000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1477624763</td>
|
||||
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>32, 16</td>
|
||||
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
|
||||
<td><code>D5495234D2F94E3F024BDF6DEF52108B</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
|
||||
<td><code>91CE65C0BC195D9A0A3F4156AA511BAA</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>4231B6F3F34A57AC62688A89AF9539CE</code> <code>89F58554C5EEEC02020D760C5FD6C08D</code></td>
|
||||
<td><code>86091F3A8D3847DBDB88DF4E688A5706</code> <code>9C1B454BC6A3D7BC437EF78C9CA1B25B</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1175372119</code></pre>
|
|||
<p>The serialization of <em>P_Q_inner_data</em> produces <strong>data</strong>, which is used to generate <strong>encrypted_data</strong> as specified in <a href="/mtproto/auth_key">step 4.1</a>.<br>
|
||||
These are the inputs to the algorithm specified in <a href="/mtproto/auth_key">step 4.1</a>:</p>
|
||||
<!-- start p_q_inner_data_input -->
|
||||
<pre><code>data = 955FF5A908117F8E7E39B396D7000000043FF0E68100000004460EC157000000360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E714231B6F3F34A57AC62688A89AF9539CE89F58554C5EEEC02020D760C5FD6C08D02000000
|
||||
random_padding_bytes = 10694FFD7C36A351BDF613AD4D2256CBD9F97DC96834A8CC3638FCECF113AB5C3686D7CF7D76DE5C25B87DBBA3583241652BB725FCC6451CE339974A0C9A0375F35DE6DFD24DC11712CCE942D77B54FF59D679791474DE8FB94DEF90</code></pre>
|
||||
<pre><code>data = 955FF5A9081B71021F039C33F3000000044FC36129000000045812C3BB000000D5495234D2F94E3F024BDF6DEF52108B91CE65C0BC195D9A0A3F4156AA511BAA86091F3A8D3847DBDB88DF4E688A57069C1B454BC6A3D7BC437EF78C9CA1B25B02000000
|
||||
random_padding_bytes = 75C88EFAEDE3F11885EF451A697D383137C41695B2B77E8D03109FC3607BF3AC49009C087970240A4B436675CCEB8941EEFA4C187A269A96F088718A0AB909D9B63103C513CB51894B67E5A1E36B0FDEAB53F1187833FF2E5B73126A</code></pre>
|
||||
<!-- end p_q_inner_data_input -->
|
||||
<p>And this is the output:</p>
|
||||
<!-- start p_q_inner_data_output -->
|
||||
<pre><code>encrypted_data = A8FB6FD79ECB4EA77F8DBEECC43417259046FC6491DA890F1AEDF55648C3529012B1B3E04D3FC1614E369A3E61FC64BF6D4D12C6B50E1BCE62EF9A88978900278CAB8486CA105BD8D88123D5639E37BF6CBFEDC469FFE888E420A07059F6CE998C759FDE513557F35C119A5996C43E1044128AAF5EACFA0DBE911FCE75F03BA251097C22C9D5F0239E1174EECA68E5FE3237DBE6FC48A2C3302418401A73734FFB220B6187D61F52C57E1D15C6D2D93F76D6B99EF46E01C180C92F92F0BA530CD0FEB60A28FB855E138901C2DA27C41EBAA09453A45C2F2AFDD41EB545A792F16CD1879951AAA2FAF259F54383069483001B466715BBB3E37615A5618C2B87D5</code></pre>
|
||||
<pre><code>encrypted_data = 81D68F713065B63EACA49E0BBC3E7283B247D50BC53A08D8B020CAE60C5141EB9A103F354288EA611E758F20614D3588CA43F2376711C34A339C7597002E13AA81CDEE14A65761258EE967096CB77249915C4B45DEC98C607EDB65659E22A672DDBE4BB7F03CCEDA6DC5E56A28C93AD4380B24ECDD0D117982D447DE54F48B28F4F1A7B3A792060A4CE543B8A526653BBD140BB533F50462D912749BC7638CB27ED4652CDD03CC63D40D2DBC451B1E3389431BE046D5D765E694D8A36B5D6D56318EAF229A24567AD08CE7B77B333C6563012580E4E95AC0A574BA9D10D3A4EE94177BD0DFFA842823692B8E9ED43C4977D32EEB1653516EB28C2F2A195F1614</code></pre>
|
||||
<!-- end p_q_inner_data_output -->
|
||||
<p>The length of the final string is 256 bytes.</p>
|
||||
<h5><a class="anchor" href="#5-send-req-dh-params-query-with-generated-encrypted-data" id="5-send-req-dh-params-query-with-generated-encrypted-data" name="5-send-req-dh-params-query-with-generated-encrypted-data"><i class="anchor-icon"></i></a>5) Send req_DH_params query with generated <code>encrypted_data</code></h5>
|
||||
<!-- start req_DH_params -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 98 DD 0E 00 31 83 A2 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 36 0B 8A A0 07 4A 79 27
|
||||
0020 | 37 AB 0C 91 14 60 FE 24 DF 49 12 EC 8A 55 7D 05
|
||||
0030 | 16 A5 31 B6 83 E3 2E 71 04 3F F0 E6 81 00 00 00
|
||||
0040 | 04 46 0E C1 57 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 A8 FB 6F D7 9E CB 4E A7 7F 8D BE EC
|
||||
0060 | C4 34 17 25 90 46 FC 64 91 DA 89 0F 1A ED F5 56
|
||||
0070 | 48 C3 52 90 12 B1 B3 E0 4D 3F C1 61 4E 36 9A 3E
|
||||
0080 | 61 FC 64 BF 6D 4D 12 C6 B5 0E 1B CE 62 EF 9A 88
|
||||
0090 | 97 89 00 27 8C AB 84 86 CA 10 5B D8 D8 81 23 D5
|
||||
00A0 | 63 9E 37 BF 6C BF ED C4 69 FF E8 88 E4 20 A0 70
|
||||
00B0 | 59 F6 CE 99 8C 75 9F DE 51 35 57 F3 5C 11 9A 59
|
||||
00C0 | 96 C4 3E 10 44 12 8A AF 5E AC FA 0D BE 91 1F CE
|
||||
00D0 | 75 F0 3B A2 51 09 7C 22 C9 D5 F0 23 9E 11 74 EE
|
||||
00E0 | CA 68 E5 FE 32 37 DB E6 FC 48 A2 C3 30 24 18 40
|
||||
00F0 | 1A 73 73 4F FB 22 0B 61 87 D6 1F 52 C5 7E 1D 15
|
||||
0100 | C6 D2 D9 3F 76 D6 B9 9E F4 6E 01 C1 80 C9 2F 92
|
||||
0110 | F0 BA 53 0C D0 FE B6 0A 28 FB 85 5E 13 89 01 C2
|
||||
0120 | DA 27 C4 1E BA A0 94 53 A4 5C 2F 2A FD D4 1E B5
|
||||
0130 | 45 A7 92 F1 6C D1 87 99 51 AA A2 FA F2 59 F5 43
|
||||
0140 | 83 06 94 83 00 1B 46 67 15 BB B3 E3 76 15 A5 61
|
||||
0150 | 8C 2B 87 D5</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 7C A4 01 00 27 88 A2 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 D5 49 52 34 D2 F9 4E 3F
|
||||
0020 | 02 4B DF 6D EF 52 10 8B 91 CE 65 C0 BC 19 5D 9A
|
||||
0030 | 0A 3F 41 56 AA 51 1B AA 04 4F C3 61 29 00 00 00
|
||||
0040 | 04 58 12 C3 BB 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 81 D6 8F 71 30 65 B6 3E AC A4 9E 0B
|
||||
0060 | BC 3E 72 83 B2 47 D5 0B C5 3A 08 D8 B0 20 CA E6
|
||||
0070 | 0C 51 41 EB 9A 10 3F 35 42 88 EA 61 1E 75 8F 20
|
||||
0080 | 61 4D 35 88 CA 43 F2 37 67 11 C3 4A 33 9C 75 97
|
||||
0090 | 00 2E 13 AA 81 CD EE 14 A6 57 61 25 8E E9 67 09
|
||||
00A0 | 6C B7 72 49 91 5C 4B 45 DE C9 8C 60 7E DB 65 65
|
||||
00B0 | 9E 22 A6 72 DD BE 4B B7 F0 3C CE DA 6D C5 E5 6A
|
||||
00C0 | 28 C9 3A D4 38 0B 24 EC DD 0D 11 79 82 D4 47 DE
|
||||
00D0 | 54 F4 8B 28 F4 F1 A7 B3 A7 92 06 0A 4C E5 43 B8
|
||||
00E0 | A5 26 65 3B BD 14 0B B5 33 F5 04 62 D9 12 74 9B
|
||||
00F0 | C7 63 8C B2 7E D4 65 2C DD 03 CC 63 D4 0D 2D BC
|
||||
0100 | 45 1B 1E 33 89 43 1B E0 46 D5 D7 65 E6 94 D8 A3
|
||||
0110 | 6B 5D 6D 56 31 8E AF 22 9A 24 56 7A D0 8C E7 B7
|
||||
0120 | 7B 33 3C 65 63 01 25 80 E4 E9 5A C0 A5 74 BA 9D
|
||||
0130 | 10 D3 A4 EE 94 17 7B D0 DF FA 84 28 23 69 2B 8E
|
||||
0140 | 9E D4 3C 49 77 D3 2E EB 16 53 51 6E B2 8C 2F 2A
|
||||
0150 | 19 5F 16 14</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -345,7 +345,7 @@ random_padding_bytes = 10694FFD7C36A351BDF613AD4D2256CBD9F97DC96834A8CC3638FCECF
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>98DD0E003183A266</code></td>
|
||||
<td><code>7CA401002788A266</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -363,25 +363,25 @@ random_padding_bytes = 10694FFD7C36A351BDF613AD4D2256CBD9F97DC96834A8CC3638FCECF
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
|
||||
<td><code>D5495234D2F94E3F024BDF6DEF52108B</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
|
||||
<td><code>91CE65C0BC195D9A0A3F4156AA511BAA</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>043FF0E681000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1072752257</td>
|
||||
<td><code>044FC36129000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1338204457</td>
|
||||
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>q</td>
|
||||
<td>64, 8</td>
|
||||
<td><code>04460EC157000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1175372119</td>
|
||||
<td><code>045812C3BB000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1477624763</td>
|
||||
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -393,7 +393,7 @@ random_padding_bytes = 10694FFD7C36A351BDF613AD4D2256CBD9F97DC96834A8CC3638FCECF
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE000100A8FB6FD79ECB4EA77F8DBEEC</code> <code>C43417259046FC6491DA890F1AEDF556</code> <code>48C3529012B1B3E04D3FC1614E369A3E</code> <code>61FC64BF6D4D12C6B50E1BCE62EF9A88</code> <code>978900278CAB8486CA105BD8D88123D5</code> <code>639E37BF6CBFEDC469FFE888E420A070</code> <code>59F6CE998C759FDE513557F35C119A59</code> <code>96C43E1044128AAF5EACFA0DBE911FCE</code> <code>75F03BA251097C22C9D5F0239E1174EE</code> <code>CA68E5FE3237DBE6FC48A2C330241840</code> <code>1A73734FFB220B6187D61F52C57E1D15</code> <code>C6D2D93F76D6B99EF46E01C180C92F92</code> <code>F0BA530CD0FEB60A28FB855E138901C2</code> <code>DA27C41EBAA09453A45C2F2AFDD41EB5</code> <code>45A792F16CD1879951AAA2FAF259F543</code> <code>83069483001B466715BBB3E37615A561</code><br> <code>8C2B87D5</code></td>
|
||||
<td><code>FE00010081D68F713065B63EACA49E0B</code> <code>BC3E7283B247D50BC53A08D8B020CAE6</code> <code>0C5141EB9A103F354288EA611E758F20</code> <code>614D3588CA43F2376711C34A339C7597</code> <code>002E13AA81CDEE14A65761258EE96709</code> <code>6CB77249915C4B45DEC98C607EDB6565</code> <code>9E22A672DDBE4BB7F03CCEDA6DC5E56A</code> <code>28C93AD4380B24ECDD0D117982D447DE</code> <code>54F48B28F4F1A7B3A792060A4CE543B8</code> <code>A526653BBD140BB533F50462D912749B</code> <code>C7638CB27ED4652CDD03CC63D40D2DBC</code> <code>451B1E3389431BE046D5D765E694D8A3</code> <code>6B5D6D56318EAF229A24567AD08CE7B7</code> <code>7B333C6563012580E4E95AC0A574BA9D</code> <code>10D3A4EE94177BD0DFFA842823692B8E</code> <code>9ED43C4977D32EEB1653516EB28C2F2A</code><br> <code>195F1614</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = 10694FFD7C36A351BDF613AD4D2256CBD9F97DC96834A8CC3638FCECF
|
|||
<h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5>
|
||||
<!-- start server_DH_params_ok -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 F4 E2 CF 31 83 A2 66
|
||||
0010 | F4 02 00 00 5C 07 E8 D0 36 0B 8A A0 07 4A 79 27
|
||||
0020 | 37 AB 0C 91 14 60 FE 24 DF 49 12 EC 8A 55 7D 05
|
||||
0030 | 16 A5 31 B6 83 E3 2E 71 FE 50 02 00 6E 2D B7 C1
|
||||
0040 | F0 23 DB 2F D9 05 E4 FF BC D8 E8 64 1B 0E 9E 0D
|
||||
0050 | EB 08 FC 63 07 8E 3D FC 2E F4 71 B7 DD AC 9B 12
|
||||
0060 | 89 A1 55 37 40 AB D4 48 45 B4 77 F2 48 20 14 6D
|
||||
0070 | 08 19 2C 89 3C E0 EF 46 F4 4F CF 26 A5 F1 09 3D
|
||||
0080 | 1E 80 FB D6 5E 94 3D FF B2 62 4C E2 61 0C A9 A5
|
||||
0090 | 50 CD 32 EC A0 FF 2F AD 43 CE C6 FF BC C0 03 CD
|
||||
00A0 | AE 6C 98 1F FD C3 32 5F 90 86 86 EC 0D 21 11 73
|
||||
00B0 | D9 13 EA 8D DA C7 BC 49 F7 C1 EC D8 1A 4B 41 B4
|
||||
00C0 | EE 83 EF 2B 56 D4 A8 4D C1 4A 8A 54 46 DB 02 08
|
||||
00D0 | 1B 97 A4 76 E3 E4 2F 60 75 82 92 EA 1E 08 C9 D7
|
||||
00E0 | BB 50 41 C6 C2 28 14 5B 3E E2 3E B9 1C 19 F0 CF
|
||||
00F0 | 0E D1 94 8C B2 04 0D 04 4C 87 69 BE 18 18 11 B7
|
||||
0100 | 8C 22 79 15 B1 ED BA 41 09 F8 07 8C 55 7F 8E 45
|
||||
0110 | 45 12 A3 F8 72 A4 4D AB 39 19 7C D6 7F B9 F4 62
|
||||
0120 | 04 DD C6 C2 FB 35 9B 16 BC EB 56 37 3D 17 5C BF
|
||||
0130 | DC 94 92 24 D3 2D 0F 7C C2 38 9F 12 BB 9C 44 23
|
||||
0140 | 06 9F 99 05 CF 42 1F ED 8D D7 2A E1 3D 0D 46 98
|
||||
0150 | 8F 30 2E 09 44 5B E9 E6 2D F1 A8 A5 01 97 83 97
|
||||
0160 | FE 55 30 B0 F1 8C BB 73 62 DC FC 2B FD 13 78 6E
|
||||
0170 | A4 2A E9 BF 6C A8 1A 6E 2C CF 7E E2 A6 88 18 F0
|
||||
0180 | 00 B7 81 C2 87 E8 2A 87 CA FA A3 4C 69 44 B6 7A
|
||||
0190 | 72 F8 28 24 D0 80 AD B8 97 E0 AC 9A 68 31 3B 61
|
||||
01A0 | 88 16 72 61 22 C2 33 76 CD CF DA F0 EE 82 13 75
|
||||
01B0 | CC 04 BC 12 91 9D A8 8B 34 9D E1 7E 5F B4 C1 09
|
||||
01C0 | 7A 12 51 67 60 74 D5 B5 6E EE 9D 11 21 FB D7 B5
|
||||
01D0 | 9E D7 0E 53 5D BE 21 C3 5F 75 BD 73 07 17 4F DF
|
||||
01E0 | 59 78 DA 6B 78 0F 9E 0A 3D BE 68 BB 32 80 88 7C
|
||||
01F0 | EF 25 B8 0C 32 C9 19 91 D6 3A 7C E9 E8 35 50 D9
|
||||
0200 | 5F D1 E2 EA A5 65 3B DD 39 78 07 28 53 0E 64 AB
|
||||
0210 | FC 25 F3 06 D7 81 91 40 24 D1 24 00 EA 85 C7 B5
|
||||
0220 | F9 A2 D2 71 3C 52 A1 26 BA 21 14 72 1B 23 CE A9
|
||||
0230 | 28 68 B8 8C 49 36 FE 76 D1 84 28 E3 A5 59 BD 68
|
||||
0240 | 9D 77 96 26 4C C2 6C 7E 08 F1 65 74 A3 CA 44 5B
|
||||
0250 | 5F 43 B1 13 5E D9 94 54 72 16 77 D8 6C C9 0A DF
|
||||
0260 | 89 DE 0C EB A4 28 A7 70 4F 20 6C 1E F0 14 A3 10
|
||||
0270 | C3 EF 1C E0 79 94 11 BA FB 99 41 0A D2 3E F4 04
|
||||
0280 | 53 26 15 28 34 AA 2A 4F 4F 34 C7 32</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 B4 4D C9 27 88 A2 66
|
||||
0010 | 78 02 00 00 5C 07 E8 D0 D5 49 52 34 D2 F9 4E 3F
|
||||
0020 | 02 4B DF 6D EF 52 10 8B 91 CE 65 C0 BC 19 5D 9A
|
||||
0030 | 0A 3F 41 56 AA 51 1B AA FE 50 02 00 26 43 49 06
|
||||
0040 | CC A6 F9 0D 1A 09 DE 80 57 5A 51 EE F2 5D B1 D9
|
||||
0050 | 04 C5 77 B7 5E CA 4A B1 23 EE 99 BD 87 3D 1B C5
|
||||
0060 | 09 39 02 2C 69 BD D9 21 4E 78 D0 DE 5B B5 9F DB
|
||||
0070 | 62 1F 47 ED B1 F2 7E 66 08 CA 7D EB 59 17 27 97
|
||||
0080 | AE 7A 6C 3F 9B 18 D2 CA 10 96 29 51 86 09 E5 74
|
||||
0090 | E1 2A 8A 7A 9E BB 22 E0 71 61 01 D7 E7 CB 61 C1
|
||||
00A0 | 4E C5 65 81 C8 96 13 C2 F8 68 CE BC 36 45 11 BB
|
||||
00B0 | 86 AB AB 29 12 D5 61 F9 D9 39 4C EA D7 28 EE 33
|
||||
00C0 | 13 85 89 5C EF 5D B4 93 A2 72 E8 20 67 53 AF 7F
|
||||
00D0 | 8E EF CB 04 C5 B8 DA 52 98 E5 21 02 D8 8F 94 08
|
||||
00E0 | 9F 9A F2 8E 0A A1 36 83 8F 95 00 DD FC 28 3A FB
|
||||
00F0 | 34 45 E3 60 40 53 33 08 F7 63 A1 71 1C 0B E9 C0
|
||||
0100 | DE 87 A1 E3 32 99 7E D9 FC 8D 4F DC 11 41 CB C4
|
||||
0110 | 28 CC 91 9A 6A B9 CE FD 53 8A AA 0C 62 99 EC 3D
|
||||
0120 | F7 67 C9 7E 6E 5F 06 30 18 08 DE C8 60 BA F0 53
|
||||
0130 | 24 D8 2D D8 8F 00 A9 3C BC 65 67 FD B8 67 23 99
|
||||
0140 | ED F5 EE B2 6E 5B CF 24 A5 1C DE 67 F6 3D 43 4F
|
||||
0150 | 68 52 65 FA 4D BB D7 BB 93 9D DF 66 31 10 B3 A9
|
||||
0160 | CB 29 BA CD 39 33 04 C7 BE 6D A0 53 7F 9E ED 7F
|
||||
0170 | F8 54 82 0C 8B A2 48 6E 32 97 30 F5 F1 F5 03 F0
|
||||
0180 | EB 5F FD 8E AC 39 86 8D 08 F8 9A 74 A6 44 21 7F
|
||||
0190 | C5 B3 98 54 3D 35 14 B2 F3 01 FA B1 BC 7C B6 0A
|
||||
01A0 | 60 A3 EA F7 99 2D D1 69 AA CC BE 34 B1 0A 62 AB
|
||||
01B0 | A0 9C 67 17 DA A9 AF 8D 91 21 10 31 12 09 F4 8F
|
||||
01C0 | A6 1B 74 BC D5 23 F0 9C C7 85 1A 02 4C 8E A8 41
|
||||
01D0 | E3 EB 37 DB 14 3D 5E C8 2C 82 67 26 CA 1B AD 0A
|
||||
01E0 | 8A B4 C8 E9 C4 CB 63 4B 24 9D E8 B6 C1 E9 90 9C
|
||||
01F0 | B4 8B C6 1A 65 6D 5A 5A 08 52 4D 3C 95 BB FE 86
|
||||
0200 | 31 2C 50 3A 53 FA 7D 75 5D 67 52 1C 45 FB 81 69
|
||||
0210 | B6 B5 F2 AE 57 F2 04 26 F5 75 B2 7C E1 82 00 3E
|
||||
0220 | FA 8F EE AF 88 D2 8B 3D 80 2D 17 F4 9A C5 85 16
|
||||
0230 | 5F 89 99 7D 04 86 F9 68 85 DA AE FE A1 3A CF 9F
|
||||
0240 | 25 5F 15 1D 9F FA C3 6A 0D D2 85 4A 36 3F 43 20
|
||||
0250 | 35 4F 12 E3 CE 11 66 51 F0 41 3E 85 14 27 87 FA
|
||||
0260 | C5 32 3F 9C 83 5A CF 98 94 0D 9E E0 A0 2B F4 2F
|
||||
0270 | 88 26 77 26 A9 33 52 42 15 23 C6 F4 A8 0F BA 96
|
||||
0280 | BE 84 7F 84 11 FE 44 62 7C A4 62 49</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -464,13 +464,13 @@ random_padding_bytes = 10694FFD7C36A351BDF613AD4D2256CBD9F97DC96834A8CC3638FCECF
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01F4E2CF3183A266</code></td>
|
||||
<td><code>01B44DC92788A266</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>F4020000</code> (756 in decimal)</td>
|
||||
<td><code>78020000</code> (632 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = 10694FFD7C36A351BDF613AD4D2256CBD9F97DC96834A8CC3638FCECF
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
|
||||
<td><code>D5495234D2F94E3F024BDF6DEF52108B</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
|
||||
<td><code>91CE65C0BC195D9A0A3F4156AA511BAA</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE5002006E2DB7C1F023DB2FD905E4FF</code> <code>BCD8E8641B0E9E0DEB08FC63078E3DFC</code> <code>2EF471B7DDAC9B1289A1553740ABD448</code> <code>45B477F24820146D08192C893CE0EF46</code> <code>F44FCF26A5F1093D1E80FBD65E943DFF</code> <code>B2624CE2610CA9A550CD32ECA0FF2FAD</code> <code>43CEC6FFBCC003CDAE6C981FFDC3325F</code> <code>908686EC0D211173D913EA8DDAC7BC49</code> <code>F7C1ECD81A4B41B4EE83EF2B56D4A84D</code> <code>C14A8A5446DB02081B97A476E3E42F60</code> <code>758292EA1E08C9D7BB5041C6C228145B</code> <code>3EE23EB91C19F0CF0ED1948CB2040D04</code> <code>4C8769BE181811B78C227915B1EDBA41</code> <code>09F8078C557F8E454512A3F872A44DAB</code> <code>39197CD67FB9F46204DDC6C2FB359B16</code> <code>BCEB56373D175CBFDC949224D32D0F7C</code> <code>C2389F12BB9C4423069F9905CF421FED</code> <code>8DD72AE13D0D46988F302E09445BE9E6</code> <code>2DF1A8A501978397FE5530B0F18CBB73</code> <code>62DCFC2BFD13786EA42AE9BF6CA81A6E</code> <code>2CCF7EE2A68818F000B781C287E82A87</code> <code>CAFAA34C6944B67A72F82824D080ADB8</code> <code>97E0AC9A68313B618816726122C23376</code> <code>CDCFDAF0EE821375CC04BC12919DA88B</code> <code>349DE17E5FB4C1097A1251676074D5B5</code> <code>6EEE9D1121FBD7B59ED70E535DBE21C3</code> <code>5F75BD7307174FDF5978DA6B780F9E0A</code> <code>3DBE68BB3280887CEF25B80C32C91991</code> <code>D63A7CE9E83550D95FD1E2EAA5653BDD</code> <code>39780728530E64ABFC25F306D7819140</code> <code>24D12400EA85C7B5F9A2D2713C52A126</code> <code>BA2114721B23CEA92868B88C4936FE76</code> <code>D18428E3A559BD689D7796264CC26C7E</code> <code>08F16574A3CA445B5F43B1135ED99454</code> <code>721677D86CC90ADF89DE0CEBA428A770</code> <code>4F206C1EF014A310C3EF1CE0799411BA</code> <code>FB99410AD23EF4045326152834AA2A4F</code><br> <code>4F34C732</code></td>
|
||||
<td><code>FE50020026434906CCA6F90D1A09DE80</code> <code>575A51EEF25DB1D904C577B75ECA4AB1</code> <code>23EE99BD873D1BC50939022C69BDD921</code> <code>4E78D0DE5BB59FDB621F47EDB1F27E66</code> <code>08CA7DEB59172797AE7A6C3F9B18D2CA</code> <code>109629518609E574E12A8A7A9EBB22E0</code> <code>716101D7E7CB61C14EC56581C89613C2</code> <code>F868CEBC364511BB86ABAB2912D561F9</code> <code>D9394CEAD728EE331385895CEF5DB493</code> <code>A272E8206753AF7F8EEFCB04C5B8DA52</code> <code>98E52102D88F94089F9AF28E0AA13683</code> <code>8F9500DDFC283AFB3445E36040533308</code> <code>F763A1711C0BE9C0DE87A1E332997ED9</code> <code>FC8D4FDC1141CBC428CC919A6AB9CEFD</code> <code>538AAA0C6299EC3DF767C97E6E5F0630</code> <code>1808DEC860BAF05324D82DD88F00A93C</code> <code>BC6567FDB8672399EDF5EEB26E5BCF24</code> <code>A51CDE67F63D434F685265FA4DBBD7BB</code> <code>939DDF663110B3A9CB29BACD393304C7</code> <code>BE6DA0537F9EED7FF854820C8BA2486E</code> <code>329730F5F1F503F0EB5FFD8EAC39868D</code> <code>08F89A74A644217FC5B398543D3514B2</code> <code>F301FAB1BC7CB60A60A3EAF7992DD169</code> <code>AACCBE34B10A62ABA09C6717DAA9AF8D</code> <code>912110311209F48FA61B74BCD523F09C</code> <code>C7851A024C8EA841E3EB37DB143D5EC8</code> <code>2C826726CA1BAD0A8AB4C8E9C4CB634B</code> <code>249DE8B6C1E9909CB48BC61A656D5A5A</code> <code>08524D3C95BBFE86312C503A53FA7D75</code> <code>5D67521C45FB8169B6B5F2AE57F20426</code> <code>F575B27CE182003EFA8FEEAF88D28B3D</code> <code>802D17F49AC585165F89997D0486F968</code> <code>85DAAEFEA13ACF9F255F151D9FFAC36A</code> <code>0DD2854A363F4320354F12E3CE116651</code> <code>F0413E85142787FAC5323F9C835ACF98</code> <code>940D9EE0A02BF42F88267726A9335242</code> <code>1523C6F4A80FBA96BE847F8411FE4462</code><br> <code>7CA46249</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = 10694FFD7C36A351BDF613AD4D2256CBD9F97DC96834A8CC3638FCECF
|
|||
<!-- end server_DH_params_ok -->
|
||||
<p>Decrypt <code>encrypted_answer</code> using the reverse of the process specified in <a href="/mtproto/auth_key#6-server-responds-with">step 6</a>:</p>
|
||||
<!-- start server_DH_inner_data_input -->
|
||||
<pre><code>encrypted_answer = 6E2DB7C1F023DB2FD905E4FFBCD8E8641B0E9E0DEB08FC63078E3DFC2EF471B7DDAC9B1289A1553740ABD44845B477F24820146D08192C893CE0EF46F44FCF26A5F1093D1E80FBD65E943DFFB2624CE2610CA9A550CD32ECA0FF2FAD43CEC6FFBCC003CDAE6C981FFDC3325F908686EC0D211173D913EA8DDAC7BC49F7C1ECD81A4B41B4EE83EF2B56D4A84DC14A8A5446DB02081B97A476E3E42F60758292EA1E08C9D7BB5041C6C228145B3EE23EB91C19F0CF0ED1948CB2040D044C8769BE181811B78C227915B1EDBA4109F8078C557F8E454512A3F872A44DAB39197CD67FB9F46204DDC6C2FB359B16BCEB56373D175CBFDC949224D32D0F7CC2389F12BB9C4423069F9905CF421FED8DD72AE13D0D46988F302E09445BE9E62DF1A8A501978397FE5530B0F18CBB7362DCFC2BFD13786EA42AE9BF6CA81A6E2CCF7EE2A68818F000B781C287E82A87CAFAA34C6944B67A72F82824D080ADB897E0AC9A68313B618816726122C23376CDCFDAF0EE821375CC04BC12919DA88B349DE17E5FB4C1097A1251676074D5B56EEE9D1121FBD7B59ED70E535DBE21C35F75BD7307174FDF5978DA6B780F9E0A3DBE68BB3280887CEF25B80C32C91991D63A7CE9E83550D95FD1E2EAA5653BDD39780728530E64ABFC25F306D781914024D12400EA85C7B5F9A2D2713C52A126BA2114721B23CEA92868B88C4936FE76D18428E3A559BD689D7796264CC26C7E08F16574A3CA445B5F43B1135ED99454721677D86CC90ADF89DE0CEBA428A7704F206C1EF014A310C3EF1CE0799411BAFB99410AD23EF4045326152834AA2A4F4F34C732
|
||||
tmp_aes_key = 4131366BCDC37DE0F9F2C322156B2273B99716D08D9617072D5B59E91C39A3BB
|
||||
tmp_aes_iv = 8DDFDB48BDE5C9337FBEA0E6631450F49F5AF34FCB2DD6E9D6F12E854231B6F3</code></pre>
|
||||
<pre><code>encrypted_answer = 26434906CCA6F90D1A09DE80575A51EEF25DB1D904C577B75ECA4AB123EE99BD873D1BC50939022C69BDD9214E78D0DE5BB59FDB621F47EDB1F27E6608CA7DEB59172797AE7A6C3F9B18D2CA109629518609E574E12A8A7A9EBB22E0716101D7E7CB61C14EC56581C89613C2F868CEBC364511BB86ABAB2912D561F9D9394CEAD728EE331385895CEF5DB493A272E8206753AF7F8EEFCB04C5B8DA5298E52102D88F94089F9AF28E0AA136838F9500DDFC283AFB3445E36040533308F763A1711C0BE9C0DE87A1E332997ED9FC8D4FDC1141CBC428CC919A6AB9CEFD538AAA0C6299EC3DF767C97E6E5F06301808DEC860BAF05324D82DD88F00A93CBC6567FDB8672399EDF5EEB26E5BCF24A51CDE67F63D434F685265FA4DBBD7BB939DDF663110B3A9CB29BACD393304C7BE6DA0537F9EED7FF854820C8BA2486E329730F5F1F503F0EB5FFD8EAC39868D08F89A74A644217FC5B398543D3514B2F301FAB1BC7CB60A60A3EAF7992DD169AACCBE34B10A62ABA09C6717DAA9AF8D912110311209F48FA61B74BCD523F09CC7851A024C8EA841E3EB37DB143D5EC82C826726CA1BAD0A8AB4C8E9C4CB634B249DE8B6C1E9909CB48BC61A656D5A5A08524D3C95BBFE86312C503A53FA7D755D67521C45FB8169B6B5F2AE57F20426F575B27CE182003EFA8FEEAF88D28B3D802D17F49AC585165F89997D0486F96885DAAEFEA13ACF9F255F151D9FFAC36A0DD2854A363F4320354F12E3CE116651F0413E85142787FAC5323F9C835ACF98940D9EE0A02BF42F88267726A93352421523C6F4A80FBA96BE847F8411FE44627CA46249
|
||||
tmp_aes_key = D3922C50D6EF99ADFD87C8BDDFFD4CDA1C3D6316A316CF3C8DBD1F46DF79D162
|
||||
tmp_aes_iv = F80B1F841E55718E97B0730CBC1A88C5686A4CA91926680348AD74FB86091F3A</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = 176DA7897229161C3A853684D9320E2C1F24BEA5BA0D89B5360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E7103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010048FA333952503724BEB83C8B3556866188CBF3A7BBD784AF2ABBE1B6F6B359527EFAB872C88C17DF5A38D741AFFF54F04229D2013D9CEE1DA647D34BD1813BC9D7C3F2446BD0DF3594B236096F24AB0E7D174C3EBD2DC9E2483E27CE56676FD1C530C533213651EFBB98CAFB574F783248BB3D2DE6FBA2ACE6B2E5D16A8C2B8515FCD247D7466E54F90BC587284E27E3C95ED2E20E8FEF65CE181FA5883978C221CA8E6D6E462AC43BF4A338840224224F7927070D33AD6D763DCF74C0DF1B7A67DD471E2194F7025839522F7F9E05001BD2753193D847491DE3C83B8F4DD68ACA578F9F5D3DDF24A5C5AC1F2241FB54B79BA337770E3D82E4FC07DA8B43BFEB3183A26678742767C1C0E2FF
|
||||
answer = BA0D89B5360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E7103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010048FA333952503724BEB83C8B3556866188CBF3A7BBD784AF2ABBE1B6F6B359527EFAB872C88C17DF5A38D741AFFF54F04229D2013D9CEE1DA647D34BD1813BC9D7C3F2446BD0DF3594B236096F24AB0E7D174C3EBD2DC9E2483E27CE56676FD1C530C533213651EFBB98CAFB574F783248BB3D2DE6FBA2ACE6B2E5D16A8C2B8515FCD247D7466E54F90BC587284E27E3C95ED2E20E8FEF65CE181FA5883978C221CA8E6D6E462AC43BF4A338840224224F7927070D33AD6D763DCF74C0DF1B7A67DD471E2194F7025839522F7F9E05001BD2753193D847491DE3C83B8F4DD68ACA578F9F5D3DDF24A5C5AC1F2241FB54B79BA337770E3D82E4FC07DA8B43BFEB3183A26678742767C1C0E2FF</code></pre>
|
||||
<pre><code>answer_with_hash = 748D7299A8A39DD2AEE663D6151A94EC7C49892BBA0D89B5D5495234D2F94E3F024BDF6DEF52108B91CE65C0BC195D9A0A3F4156AA511BAA03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010067409202B2D24664CA1A3CFF2EA1C56C8B428EA8AFE9552870366AE99142CEA27F6E013DA6CE86221FFA5B56716A8DD955058F30CC63A3C225987203EF629DF95B69DD7E363E9B8E7431930CAAFC15BE11880E8DFA81CD4074532E0E634D7D2D127ECDABF432DE36640767A6AFD010B092632EA434A4A05ABAA388E7BA52BC5BFC85A8500216671EE3CA7398A3EC208176CDA3D8A17C2F4A8E7352CFDD4DC6C5025EC6A9453DEF5715322AA589E506154074994C724E922ECE1B7907BF3DD95FE5DC069BFE72E791A1E8E4D4F5CB38F79C5E619ACA32F49D49B26FDF656085037803BED1DAF2EC623AEF9867BB78DEB94ACC676D402EA0141915AE293E50ED3B2788A266314D36040518DBAC
|
||||
answer = BA0D89B5D5495234D2F94E3F024BDF6DEF52108B91CE65C0BC195D9A0A3F4156AA511BAA03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010067409202B2D24664CA1A3CFF2EA1C56C8B428EA8AFE9552870366AE99142CEA27F6E013DA6CE86221FFA5B56716A8DD955058F30CC63A3C225987203EF629DF95B69DD7E363E9B8E7431930CAAFC15BE11880E8DFA81CD4074532E0E634D7D2D127ECDABF432DE36640767A6AFD010B092632EA434A4A05ABAA388E7BA52BC5BFC85A8500216671EE3CA7398A3EC208176CDA3D8A17C2F4A8E7352CFDD4DC6C5025EC6A9453DEF5715322AA589E506154074994C724E922ECE1B7907BF3DD95FE5DC069BFE72E791A1E8E4D4F5CB38F79C5E619ACA32F49D49B26FDF656085037803BED1DAF2EC623AEF9867BB78DEB94ACC676D402EA0141915AE293E50ED3B2788A266314D36040518DBAC</code></pre>
|
||||
<!-- end server_DH_inner_data_output -->
|
||||
<!-- start server_DH_inner_data -->
|
||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | BA 0D 89 B5 36 0B 8A A0 07 4A 79 27 37 AB 0C 91
|
||||
0010 | 14 60 FE 24 DF 49 12 EC 8A 55 7D 05 16 A5 31 B6
|
||||
0020 | 83 E3 2E 71 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 D5 49 52 34 D2 F9 4E 3F 02 4B DF 6D
|
||||
0010 | EF 52 10 8B 91 CE 65 C0 BC 19 5D 9A 0A 3F 41 56
|
||||
0020 | AA 51 1B AA 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
0030 | C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23
|
||||
0040 | 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A
|
||||
0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E
|
||||
|
@ -532,23 +532,23 @@ answer = BA0D89B5360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E7
|
|||
0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6
|
||||
0110 | 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0
|
||||
0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
|
||||
0130 | 48 FA 33 39 52 50 37 24 BE B8 3C 8B 35 56 86 61
|
||||
0140 | 88 CB F3 A7 BB D7 84 AF 2A BB E1 B6 F6 B3 59 52
|
||||
0150 | 7E FA B8 72 C8 8C 17 DF 5A 38 D7 41 AF FF 54 F0
|
||||
0160 | 42 29 D2 01 3D 9C EE 1D A6 47 D3 4B D1 81 3B C9
|
||||
0170 | D7 C3 F2 44 6B D0 DF 35 94 B2 36 09 6F 24 AB 0E
|
||||
0180 | 7D 17 4C 3E BD 2D C9 E2 48 3E 27 CE 56 67 6F D1
|
||||
0190 | C5 30 C5 33 21 36 51 EF BB 98 CA FB 57 4F 78 32
|
||||
01A0 | 48 BB 3D 2D E6 FB A2 AC E6 B2 E5 D1 6A 8C 2B 85
|
||||
01B0 | 15 FC D2 47 D7 46 6E 54 F9 0B C5 87 28 4E 27 E3
|
||||
01C0 | C9 5E D2 E2 0E 8F EF 65 CE 18 1F A5 88 39 78 C2
|
||||
01D0 | 21 CA 8E 6D 6E 46 2A C4 3B F4 A3 38 84 02 24 22
|
||||
01E0 | 4F 79 27 07 0D 33 AD 6D 76 3D CF 74 C0 DF 1B 7A
|
||||
01F0 | 67 DD 47 1E 21 94 F7 02 58 39 52 2F 7F 9E 05 00
|
||||
0200 | 1B D2 75 31 93 D8 47 49 1D E3 C8 3B 8F 4D D6 8A
|
||||
0210 | CA 57 8F 9F 5D 3D DF 24 A5 C5 AC 1F 22 41 FB 54
|
||||
0220 | B7 9B A3 37 77 0E 3D 82 E4 FC 07 DA 8B 43 BF EB
|
||||
0230 | 31 83 A2 66</code></pre>
|
||||
0130 | 67 40 92 02 B2 D2 46 64 CA 1A 3C FF 2E A1 C5 6C
|
||||
0140 | 8B 42 8E A8 AF E9 55 28 70 36 6A E9 91 42 CE A2
|
||||
0150 | 7F 6E 01 3D A6 CE 86 22 1F FA 5B 56 71 6A 8D D9
|
||||
0160 | 55 05 8F 30 CC 63 A3 C2 25 98 72 03 EF 62 9D F9
|
||||
0170 | 5B 69 DD 7E 36 3E 9B 8E 74 31 93 0C AA FC 15 BE
|
||||
0180 | 11 88 0E 8D FA 81 CD 40 74 53 2E 0E 63 4D 7D 2D
|
||||
0190 | 12 7E CD AB F4 32 DE 36 64 07 67 A6 AF D0 10 B0
|
||||
01A0 | 92 63 2E A4 34 A4 A0 5A BA A3 88 E7 BA 52 BC 5B
|
||||
01B0 | FC 85 A8 50 02 16 67 1E E3 CA 73 98 A3 EC 20 81
|
||||
01C0 | 76 CD A3 D8 A1 7C 2F 4A 8E 73 52 CF DD 4D C6 C5
|
||||
01D0 | 02 5E C6 A9 45 3D EF 57 15 32 2A A5 89 E5 06 15
|
||||
01E0 | 40 74 99 4C 72 4E 92 2E CE 1B 79 07 BF 3D D9 5F
|
||||
01F0 | E5 DC 06 9B FE 72 E7 91 A1 E8 E4 D4 F5 CB 38 F7
|
||||
0200 | 9C 5E 61 9A CA 32 F4 9D 49 B2 6F DF 65 60 85 03
|
||||
0210 | 78 03 BE D1 DA F2 EC 62 3A EF 98 67 BB 78 DE B9
|
||||
0220 | 4A CC 67 6D 40 2E A0 14 19 15 AE 29 3E 50 ED 3B
|
||||
0230 | 27 88 A2 66</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -570,13 +570,13 @@ answer = BA0D89B5360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E7
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
|
||||
<td><code>D5495234D2F94E3F024BDF6DEF52108B</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
|
||||
<td><code>91CE65C0BC195D9A0A3F4156AA511BAA</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B5360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E7
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE00010048FA333952503724BEB83C8B</code> <code>3556866188CBF3A7BBD784AF2ABBE1B6</code> <code>F6B359527EFAB872C88C17DF5A38D741</code> <code>AFFF54F04229D2013D9CEE1DA647D34B</code> <code>D1813BC9D7C3F2446BD0DF3594B23609</code> <code>6F24AB0E7D174C3EBD2DC9E2483E27CE</code> <code>56676FD1C530C533213651EFBB98CAFB</code> <code>574F783248BB3D2DE6FBA2ACE6B2E5D1</code> <code>6A8C2B8515FCD247D7466E54F90BC587</code> <code>284E27E3C95ED2E20E8FEF65CE181FA5</code> <code>883978C221CA8E6D6E462AC43BF4A338</code> <code>840224224F7927070D33AD6D763DCF74</code> <code>C0DF1B7A67DD471E2194F7025839522F</code> <code>7F9E05001BD2753193D847491DE3C83B</code> <code>8F4DD68ACA578F9F5D3DDF24A5C5AC1F</code> <code>2241FB54B79BA337770E3D82E4FC07DA</code><br> <code>8B43BFEB</code></td>
|
||||
<td><code>FE00010067409202B2D24664CA1A3CFF</code> <code>2EA1C56C8B428EA8AFE9552870366AE9</code> <code>9142CEA27F6E013DA6CE86221FFA5B56</code> <code>716A8DD955058F30CC63A3C225987203</code> <code>EF629DF95B69DD7E363E9B8E7431930C</code> <code>AAFC15BE11880E8DFA81CD4074532E0E</code> <code>634D7D2D127ECDABF432DE36640767A6</code> <code>AFD010B092632EA434A4A05ABAA388E7</code> <code>BA52BC5BFC85A8500216671EE3CA7398</code> <code>A3EC208176CDA3D8A17C2F4A8E7352CF</code> <code>DD4DC6C5025EC6A9453DEF5715322AA5</code> <code>89E506154074994C724E922ECE1B7907</code> <code>BF3DD95FE5DC069BFE72E791A1E8E4D4</code> <code>F5CB38F79C5E619ACA32F49D49B26FDF</code> <code>656085037803BED1DAF2EC623AEF9867</code> <code>BB78DEB94ACC676D402EA0141915AE29</code><br> <code>3E50ED3B</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>3183A266</code> (1721926449 in decimal)</td>
|
||||
<td><code>2788A266</code> (1721927719 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B5360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E7
|
|||
<h5><a class="anchor" href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" id="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" name="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message"><i class="anchor-icon"></i></a>7) Client computes random 2048-bit number <em>b</em> (using a sufficient amount of entropy) and sends the server a message</h5>
|
||||
<p>First, generate a secure random 2048-bit number b:</p>
|
||||
<!-- start b -->
|
||||
<pre><code>b = 28E28FCB1EF9C40F65D3185DB34037CA6822764BFB21073BBC160278B050933F4F469F3751E7A5E89E8E5A0F8F36CABA015C5D3F0049566E49193082FA127E86D83F2C1E09FB81E8130A34DB1AACCF39FD4DF8233049BF3AE10862E4F884D49C7AC937F604DC37CB05F33310F79BDD7A1FCBACE4019BBB0ABC2CBC1CF005AE12A39E16D2F3248409616E22F1E49A21653317AE7847F917235B901C8F5015E8EA4E85F5E093401E6B0B219B4155926890D11158895D00711FFC1ED67B6034A644710A900A7E12B7BF9CEC3C500552D3A667DD3330DAD28B5EDEF5FC5BF58D12400A76DAFD23D081676A89EC7D8EECC239358C16D8C1DEA780EB0A3E6C2560BF2B</code></pre>
|
||||
<pre><code>b = 4FC6E364722AF1B09F0E67F99417FB9D01696C9964E96D5E005AFCA193FEE6AF3244493557F7398FF0603F8A9F0B5085038D0CB19137C1A818E37B6F24D581B35D28A7E87111849E65A304603596E01D0146C675CB6F27C2A593DF773DCACF13EB0CAB93BE44EBBB539B2F761057E36747D452AB9AFF3ECCEB848B9F6733A9E6FDCB8058208FC0FCB60375705B92659E49D3ECBE42B0E6CD4A2F94740B0186DEE9AF5D3A66F51FB606D423D7F75C7596657006EB0A6670F64EA7AA38310F0F59B49C88064356DF9D9D9D4A914BEABCB7CDDCA9BAE4919F8C5AED04AC552C8B5D6D56F66B80BD9F0E5ECE70F2AEF7C72007BBD0812908D2760E1DDEEA11742B3F</code></pre>
|
||||
<!-- end b -->
|
||||
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
|
||||
<!-- start g_b -->
|
||||
<pre><code>g_b = A47532855E5420FF3338DD301512ECE2906FEEB0D702E917E020882692C36C1F59530D5CC91D2900D934D76125C89DE963E0E3C1BB21FF168FBF2823A89C7EC0DE83EA81D9A9FC8D822BB98FA3F5682AFB1828DA3232EB6D10E9C4ED456DB6D563A0B2B019880A2AC954B1DB9064715E7476D4DC127C6AA0B02B77F90AF3F9CE46771D41395B61EF5A077C21B7F45878A42C2C736B0795D78856A5B78A4353CDDB04EC1F838E89FC4284403C043B606642B6CF76FB5021353F850D076AF7D50F91F4CEB2A3464FC5743C2610C4F0B103CB27209E5F03EA70E319A8F40740A3E08BD7925042A91AAC07FFD31035DD666C7E94527CDCF87FCBF5AB693043F38002</code></pre>
|
||||
<pre><code>g_b = 35FE84F9813D7991C97A1C570369C1F36D02218D03A985DED79734FCB3FD8C28642D964DDA0BAB0933F0862F4E26B5608DF1534866A5D0D7B8846E4EAC4187E4147DD750FE6837DE38F8C20F5BC68BDD6F33D992C738BF10A07799F8E56133633B23B2623632872D3880587AD5F56237F4A9A6BF6F572A766DDF64082B3A154B4FA3E28EB5BE5551B43481C200FE2C7C0E725659637613D29059B279DFB2BCA34B51598FA8D5D1AD8A7B19F466A187D237D18AE476300D8AF5274BDFAC17EDC89A62C0E76D7D96E3B7AE6311221371E701E8D1F775985BD58D8F93B06112DE2F77136FC35C299594F1E0226E1464CC4C9F2E598E6E617C6A69BBD14B9DC1F9C6</code></pre>
|
||||
<!-- end g_b -->
|
||||
<h6>7.1) generation of encrypted_data</h6>
|
||||
<!-- start client_DH_inner_data -->
|
||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 54 B6 43 66 36 0B 8A A0 07 4A 79 27 37 AB 0C 91
|
||||
0010 | 14 60 FE 24 DF 49 12 EC 8A 55 7D 05 16 A5 31 B6
|
||||
0020 | 83 E3 2E 71 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | A4 75 32 85 5E 54 20 FF 33 38 DD 30 15 12 EC E2
|
||||
0040 | 90 6F EE B0 D7 02 E9 17 E0 20 88 26 92 C3 6C 1F
|
||||
0050 | 59 53 0D 5C C9 1D 29 00 D9 34 D7 61 25 C8 9D E9
|
||||
0060 | 63 E0 E3 C1 BB 21 FF 16 8F BF 28 23 A8 9C 7E C0
|
||||
0070 | DE 83 EA 81 D9 A9 FC 8D 82 2B B9 8F A3 F5 68 2A
|
||||
0080 | FB 18 28 DA 32 32 EB 6D 10 E9 C4 ED 45 6D B6 D5
|
||||
0090 | 63 A0 B2 B0 19 88 0A 2A C9 54 B1 DB 90 64 71 5E
|
||||
00A0 | 74 76 D4 DC 12 7C 6A A0 B0 2B 77 F9 0A F3 F9 CE
|
||||
00B0 | 46 77 1D 41 39 5B 61 EF 5A 07 7C 21 B7 F4 58 78
|
||||
00C0 | A4 2C 2C 73 6B 07 95 D7 88 56 A5 B7 8A 43 53 CD
|
||||
00D0 | DB 04 EC 1F 83 8E 89 FC 42 84 40 3C 04 3B 60 66
|
||||
00E0 | 42 B6 CF 76 FB 50 21 35 3F 85 0D 07 6A F7 D5 0F
|
||||
00F0 | 91 F4 CE B2 A3 46 4F C5 74 3C 26 10 C4 F0 B1 03
|
||||
0100 | CB 27 20 9E 5F 03 EA 70 E3 19 A8 F4 07 40 A3 E0
|
||||
0110 | 8B D7 92 50 42 A9 1A AC 07 FF D3 10 35 DD 66 6C
|
||||
0120 | 7E 94 52 7C DC F8 7F CB F5 AB 69 30 43 F3 80 02</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 D5 49 52 34 D2 F9 4E 3F 02 4B DF 6D
|
||||
0010 | EF 52 10 8B 91 CE 65 C0 BC 19 5D 9A 0A 3F 41 56
|
||||
0020 | AA 51 1B AA 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 35 FE 84 F9 81 3D 79 91 C9 7A 1C 57 03 69 C1 F3
|
||||
0040 | 6D 02 21 8D 03 A9 85 DE D7 97 34 FC B3 FD 8C 28
|
||||
0050 | 64 2D 96 4D DA 0B AB 09 33 F0 86 2F 4E 26 B5 60
|
||||
0060 | 8D F1 53 48 66 A5 D0 D7 B8 84 6E 4E AC 41 87 E4
|
||||
0070 | 14 7D D7 50 FE 68 37 DE 38 F8 C2 0F 5B C6 8B DD
|
||||
0080 | 6F 33 D9 92 C7 38 BF 10 A0 77 99 F8 E5 61 33 63
|
||||
0090 | 3B 23 B2 62 36 32 87 2D 38 80 58 7A D5 F5 62 37
|
||||
00A0 | F4 A9 A6 BF 6F 57 2A 76 6D DF 64 08 2B 3A 15 4B
|
||||
00B0 | 4F A3 E2 8E B5 BE 55 51 B4 34 81 C2 00 FE 2C 7C
|
||||
00C0 | 0E 72 56 59 63 76 13 D2 90 59 B2 79 DF B2 BC A3
|
||||
00D0 | 4B 51 59 8F A8 D5 D1 AD 8A 7B 19 F4 66 A1 87 D2
|
||||
00E0 | 37 D1 8A E4 76 30 0D 8A F5 27 4B DF AC 17 ED C8
|
||||
00F0 | 9A 62 C0 E7 6D 7D 96 E3 B7 AE 63 11 22 13 71 E7
|
||||
0100 | 01 E8 D1 F7 75 98 5B D5 8D 8F 93 B0 61 12 DE 2F
|
||||
0110 | 77 13 6F C3 5C 29 95 94 F1 E0 22 6E 14 64 CC 4C
|
||||
0120 | 9F 2E 59 8E 6E 61 7C 6A 69 BB D1 4B 9D C1 F9 C6</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -658,19 +658,19 @@ answer = BA0D89B5360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E7
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
|
||||
<td><code>D5495234D2F94E3F024BDF6DEF52108B</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
|
||||
<td><code>91CE65C0BC195D9A0A3F4156AA511BAA</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE000100A47532855E5420FF3338DD30</code> <code>1512ECE2906FEEB0D702E917E0208826</code> <code>92C36C1F59530D5CC91D2900D934D761</code> <code>25C89DE963E0E3C1BB21FF168FBF2823</code> <code>A89C7EC0DE83EA81D9A9FC8D822BB98F</code> <code>A3F5682AFB1828DA3232EB6D10E9C4ED</code> <code>456DB6D563A0B2B019880A2AC954B1DB</code> <code>9064715E7476D4DC127C6AA0B02B77F9</code> <code>0AF3F9CE46771D41395B61EF5A077C21</code> <code>B7F45878A42C2C736B0795D78856A5B7</code> <code>8A4353CDDB04EC1F838E89FC4284403C</code> <code>043B606642B6CF76FB5021353F850D07</code> <code>6AF7D50F91F4CEB2A3464FC5743C2610</code> <code>C4F0B103CB27209E5F03EA70E319A8F4</code> <code>0740A3E08BD7925042A91AAC07FFD310</code> <code>35DD666C7E94527CDCF87FCBF5AB6930</code><br> <code>43F38002</code></td>
|
||||
<td><code>FE00010035FE84F9813D7991C97A1C57</code> <code>0369C1F36D02218D03A985DED79734FC</code> <code>B3FD8C28642D964DDA0BAB0933F0862F</code> <code>4E26B5608DF1534866A5D0D7B8846E4E</code> <code>AC4187E4147DD750FE6837DE38F8C20F</code> <code>5BC68BDD6F33D992C738BF10A07799F8</code> <code>E56133633B23B2623632872D3880587A</code> <code>D5F56237F4A9A6BF6F572A766DDF6408</code> <code>2B3A154B4FA3E28EB5BE5551B43481C2</code> <code>00FE2C7C0E725659637613D29059B279</code> <code>DFB2BCA34B51598FA8D5D1AD8A7B19F4</code> <code>66A187D237D18AE476300D8AF5274BDF</code> <code>AC17EDC89A62C0E76D7D96E3B7AE6311</code> <code>221371E701E8D1F775985BD58D8F93B0</code> <code>6112DE2F77136FC35C299594F1E0226E</code> <code>1464CC4C9F2E598E6E617C6A69BBD14B</code><br> <code>9DC1F9C6</code></td>
|
||||
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -684,47 +684,47 @@ answer = BA0D89B5360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E7
|
|||
<!-- end client_DH_inner_data -->
|
||||
<p>The serialization of <em>Client_DH_Inner_Data</em> produces a string <strong>data</strong>. This is used to generate <strong>encrypted_data</strong> as specified in <a href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message">step 6</a>, using the following inputs:</p>
|
||||
<!-- start client_DH_inner_data_input -->
|
||||
<pre><code>data = 54B64366360B8AA0074A792737AB0C911460FE24DF4912EC8A557D0516A531B683E32E710000000000000000FE000100A47532855E5420FF3338DD301512ECE2906FEEB0D702E917E020882692C36C1F59530D5CC91D2900D934D76125C89DE963E0E3C1BB21FF168FBF2823A89C7EC0DE83EA81D9A9FC8D822BB98FA3F5682AFB1828DA3232EB6D10E9C4ED456DB6D563A0B2B019880A2AC954B1DB9064715E7476D4DC127C6AA0B02B77F90AF3F9CE46771D41395B61EF5A077C21B7F45878A42C2C736B0795D78856A5B78A4353CDDB04EC1F838E89FC4284403C043B606642B6CF76FB5021353F850D076AF7D50F91F4CEB2A3464FC5743C2610C4F0B103CB27209E5F03EA70E319A8F40740A3E08BD7925042A91AAC07FFD31035DD666C7E94527CDCF87FCBF5AB693043F38002
|
||||
padding = E7A24CA0EB8E4B9CB42B8B69
|
||||
tmp_aes_key = 4131366BCDC37DE0F9F2C322156B2273B99716D08D9617072D5B59E91C39A3BB
|
||||
tmp_aes_iv = 8DDFDB48BDE5C9337FBEA0E6631450F49F5AF34FCB2DD6E9D6F12E854231B6F3</code></pre>
|
||||
<pre><code>data = 54B64366D5495234D2F94E3F024BDF6DEF52108B91CE65C0BC195D9A0A3F4156AA511BAA0000000000000000FE00010035FE84F9813D7991C97A1C570369C1F36D02218D03A985DED79734FCB3FD8C28642D964DDA0BAB0933F0862F4E26B5608DF1534866A5D0D7B8846E4EAC4187E4147DD750FE6837DE38F8C20F5BC68BDD6F33D992C738BF10A07799F8E56133633B23B2623632872D3880587AD5F56237F4A9A6BF6F572A766DDF64082B3A154B4FA3E28EB5BE5551B43481C200FE2C7C0E725659637613D29059B279DFB2BCA34B51598FA8D5D1AD8A7B19F466A187D237D18AE476300D8AF5274BDFAC17EDC89A62C0E76D7D96E3B7AE6311221371E701E8D1F775985BD58D8F93B06112DE2F77136FC35C299594F1E0226E1464CC4C9F2E598E6E617C6A69BBD14B9DC1F9C6
|
||||
padding = E0DE2B81437D0447A05DFE05
|
||||
tmp_aes_key = D3922C50D6EF99ADFD87C8BDDFFD4CDA1C3D6316A316CF3C8DBD1F46DF79D162
|
||||
tmp_aes_iv = F80B1F841E55718E97B0730CBC1A88C5686A4CA91926680348AD74FB86091F3A</code></pre>
|
||||
<!-- end client_DH_inner_data_input -->
|
||||
<p>Process:</p>
|
||||
<pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16)
|
||||
encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre>
|
||||
<p>Output:</p>
|
||||
<!-- start client_DH_inner_data_output -->
|
||||
<pre><code>encrypted_data = 5D446BE5F151CE5B82324598A4C13A875293FD63FA2659F66A11632424BAC35E38509DE9F3EA180FEE39C9DE879E67299E3B843EDB15A9EB236E2005F0C055877DD752D63444EB7246B15FED5364DC7B2F9FF3016349BD1AF2ACF8C251C8AAC28D4851458047B925A815E2E4F99FDE495139380A85E52E3EB9BDEAEF9F30EDCE11CF28868A09D23543A5FC71D6CCD2E7F09829BB0BFB538CE840FF2B18D1AB5F2680817FBFBF6B44559B27692DFAA65252F30F7BCA8BADE43C7D7522DF82DC42252376044F505530618D70383240D8047ED93A2A0DA2682AAE804056E624F7FF820128707FDF6F3C1F678D6896474516B8B30F774F0631AF5A8D082F0D99E90EBDB4FEDB4EC6415F28EED8BC2614ED75FDCA353508E4C35ACBC755B8AAF3724E968B7610904AAB2BA86FB2865B683D78CB84751BADD49814C2DC3B6EB0DE78848F418AB8FC89FCC684D120B77FEF478A</code></pre>
|
||||
<pre><code>encrypted_data = EE128F62F0C4E93570510E0F0D896213D3CC0FA48AC4E4250C145F2B5F4E79EE574E3105DAFA646DEA4E7DCEAA2CB4CB29CD09A606E3E61E1C07D13EF6415331F0681A10307B2022A751BD2A0EAF278B7E65707F7B6525A0ED7F7C9982763CB580D3EC10967017ABC2FEEE438E85E1F39AD4EC26E7CCD5D0BC3A8F541C8F58D399507E810C6605EAD3F19F6BD7F4D058EC85796EC4F3EC4B1A859983A3CD3ABC8D8BFFE78439F4176B6F6BF611696ED41378235A6BCF5BDED89A145A3AB54C6D6BCA7CC20DBF11D12D0AA36992E36C281B5D45B70C36E0CB672DB63631B948AA58DFC0CDDF27BBFF33836319044266B10A73678B1BC5660BD2D913A60B4FF50EFADD220F934EA70E7A64BF115D7F955D4DE8FE668291E57751FE5EA9942D7611A9800D55D0743000337D32EBD658F20F1141DA206FD8018003F1A344F5B7EA8C6B108A993D9613BADC4B97B9B49FE4FD</code></pre>
|
||||
<!-- end client_DH_inner_data_output -->
|
||||
<p>The length of the final string is 336 bytes.</p>
|
||||
<h6>7.2) set_client_DH_params query</h6>
|
||||
<!-- start set_client_DH_params -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 9C DD 0E 00 31 83 A2 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 36 0B 8A A0 07 4A 79 27
|
||||
0020 | 37 AB 0C 91 14 60 FE 24 DF 49 12 EC 8A 55 7D 05
|
||||
0030 | 16 A5 31 B6 83 E3 2E 71 FE 50 01 00 5D 44 6B E5
|
||||
0040 | F1 51 CE 5B 82 32 45 98 A4 C1 3A 87 52 93 FD 63
|
||||
0050 | FA 26 59 F6 6A 11 63 24 24 BA C3 5E 38 50 9D E9
|
||||
0060 | F3 EA 18 0F EE 39 C9 DE 87 9E 67 29 9E 3B 84 3E
|
||||
0070 | DB 15 A9 EB 23 6E 20 05 F0 C0 55 87 7D D7 52 D6
|
||||
0080 | 34 44 EB 72 46 B1 5F ED 53 64 DC 7B 2F 9F F3 01
|
||||
0090 | 63 49 BD 1A F2 AC F8 C2 51 C8 AA C2 8D 48 51 45
|
||||
00A0 | 80 47 B9 25 A8 15 E2 E4 F9 9F DE 49 51 39 38 0A
|
||||
00B0 | 85 E5 2E 3E B9 BD EA EF 9F 30 ED CE 11 CF 28 86
|
||||
00C0 | 8A 09 D2 35 43 A5 FC 71 D6 CC D2 E7 F0 98 29 BB
|
||||
00D0 | 0B FB 53 8C E8 40 FF 2B 18 D1 AB 5F 26 80 81 7F
|
||||
00E0 | BF BF 6B 44 55 9B 27 69 2D FA A6 52 52 F3 0F 7B
|
||||
00F0 | CA 8B AD E4 3C 7D 75 22 DF 82 DC 42 25 23 76 04
|
||||
0100 | 4F 50 55 30 61 8D 70 38 32 40 D8 04 7E D9 3A 2A
|
||||
0110 | 0D A2 68 2A AE 80 40 56 E6 24 F7 FF 82 01 28 70
|
||||
0120 | 7F DF 6F 3C 1F 67 8D 68 96 47 45 16 B8 B3 0F 77
|
||||
0130 | 4F 06 31 AF 5A 8D 08 2F 0D 99 E9 0E BD B4 FE DB
|
||||
0140 | 4E C6 41 5F 28 EE D8 BC 26 14 ED 75 FD CA 35 35
|
||||
0150 | 08 E4 C3 5A CB C7 55 B8 AA F3 72 4E 96 8B 76 10
|
||||
0160 | 90 4A AB 2B A8 6F B2 86 5B 68 3D 78 CB 84 75 1B
|
||||
0170 | AD D4 98 14 C2 DC 3B 6E B0 DE 78 84 8F 41 8A B8
|
||||
0180 | FC 89 FC C6 84 D1 20 B7 7F EF 47 8A</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 44 79 09 00 27 88 A2 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 D5 49 52 34 D2 F9 4E 3F
|
||||
0020 | 02 4B DF 6D EF 52 10 8B 91 CE 65 C0 BC 19 5D 9A
|
||||
0030 | 0A 3F 41 56 AA 51 1B AA FE 50 01 00 EE 12 8F 62
|
||||
0040 | F0 C4 E9 35 70 51 0E 0F 0D 89 62 13 D3 CC 0F A4
|
||||
0050 | 8A C4 E4 25 0C 14 5F 2B 5F 4E 79 EE 57 4E 31 05
|
||||
0060 | DA FA 64 6D EA 4E 7D CE AA 2C B4 CB 29 CD 09 A6
|
||||
0070 | 06 E3 E6 1E 1C 07 D1 3E F6 41 53 31 F0 68 1A 10
|
||||
0080 | 30 7B 20 22 A7 51 BD 2A 0E AF 27 8B 7E 65 70 7F
|
||||
0090 | 7B 65 25 A0 ED 7F 7C 99 82 76 3C B5 80 D3 EC 10
|
||||
00A0 | 96 70 17 AB C2 FE EE 43 8E 85 E1 F3 9A D4 EC 26
|
||||
00B0 | E7 CC D5 D0 BC 3A 8F 54 1C 8F 58 D3 99 50 7E 81
|
||||
00C0 | 0C 66 05 EA D3 F1 9F 6B D7 F4 D0 58 EC 85 79 6E
|
||||
00D0 | C4 F3 EC 4B 1A 85 99 83 A3 CD 3A BC 8D 8B FF E7
|
||||
00E0 | 84 39 F4 17 6B 6F 6B F6 11 69 6E D4 13 78 23 5A
|
||||
00F0 | 6B CF 5B DE D8 9A 14 5A 3A B5 4C 6D 6B CA 7C C2
|
||||
0100 | 0D BF 11 D1 2D 0A A3 69 92 E3 6C 28 1B 5D 45 B7
|
||||
0110 | 0C 36 E0 CB 67 2D B6 36 31 B9 48 AA 58 DF C0 CD
|
||||
0120 | DF 27 BB FF 33 83 63 19 04 42 66 B1 0A 73 67 8B
|
||||
0130 | 1B C5 66 0B D2 D9 13 A6 0B 4F F5 0E FA DD 22 0F
|
||||
0140 | 93 4E A7 0E 7A 64 BF 11 5D 7F 95 5D 4D E8 FE 66
|
||||
0150 | 82 91 E5 77 51 FE 5E A9 94 2D 76 11 A9 80 0D 55
|
||||
0160 | D0 74 30 00 33 7D 32 EB D6 58 F2 0F 11 41 DA 20
|
||||
0170 | 6F D8 01 80 03 F1 A3 44 F5 B7 EA 8C 6B 10 8A 99
|
||||
0180 | 3D 96 13 BA DC 4B 97 B9 B4 9F E4 FD</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>9CDD0E003183A266</code></td>
|
||||
<td><code>447909002788A266</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
|
||||
<td><code>D5495234D2F94E3F024BDF6DEF52108B</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
|
||||
<td><code>91CE65C0BC195D9A0A3F4156AA511BAA</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE5001005D446BE5F151CE5B82324598</code> <code>A4C13A875293FD63FA2659F66A116324</code> <code>24BAC35E38509DE9F3EA180FEE39C9DE</code> <code>879E67299E3B843EDB15A9EB236E2005</code> <code>F0C055877DD752D63444EB7246B15FED</code> <code>5364DC7B2F9FF3016349BD1AF2ACF8C2</code> <code>51C8AAC28D4851458047B925A815E2E4</code> <code>F99FDE495139380A85E52E3EB9BDEAEF</code> <code>9F30EDCE11CF28868A09D23543A5FC71</code> <code>D6CCD2E7F09829BB0BFB538CE840FF2B</code> <code>18D1AB5F2680817FBFBF6B44559B2769</code> <code>2DFAA65252F30F7BCA8BADE43C7D7522</code> <code>DF82DC42252376044F505530618D7038</code> <code>3240D8047ED93A2A0DA2682AAE804056</code> <code>E624F7FF820128707FDF6F3C1F678D68</code> <code>96474516B8B30F774F0631AF5A8D082F</code> <code>0D99E90EBDB4FEDB4EC6415F28EED8BC</code> <code>2614ED75FDCA353508E4C35ACBC755B8</code> <code>AAF3724E968B7610904AAB2BA86FB286</code> <code>5B683D78CB84751BADD49814C2DC3B6E</code> <code>B0DE78848F418AB8FC89FCC684D120B7</code><br> <code>7FEF478A</code></td>
|
||||
<td><code>FE500100EE128F62F0C4E93570510E0F</code> <code>0D896213D3CC0FA48AC4E4250C145F2B</code> <code>5F4E79EE574E3105DAFA646DEA4E7DCE</code> <code>AA2CB4CB29CD09A606E3E61E1C07D13E</code> <code>F6415331F0681A10307B2022A751BD2A</code> <code>0EAF278B7E65707F7B6525A0ED7F7C99</code> <code>82763CB580D3EC10967017ABC2FEEE43</code> <code>8E85E1F39AD4EC26E7CCD5D0BC3A8F54</code> <code>1C8F58D399507E810C6605EAD3F19F6B</code> <code>D7F4D058EC85796EC4F3EC4B1A859983</code> <code>A3CD3ABC8D8BFFE78439F4176B6F6BF6</code> <code>11696ED41378235A6BCF5BDED89A145A</code> <code>3AB54C6D6BCA7CC20DBF11D12D0AA369</code> <code>92E36C281B5D45B70C36E0CB672DB636</code> <code>31B948AA58DFC0CDDF27BBFF33836319</code> <code>044266B10A73678B1BC5660BD2D913A6</code> <code>0B4FF50EFADD220F934EA70E7A64BF11</code> <code>5D7F955D4DE8FE668291E57751FE5EA9</code> <code>942D7611A9800D55D0743000337D32EB</code> <code>D658F20F1141DA206FD8018003F1A344</code> <code>F5B7EA8C6B108A993D9613BADC4B97B9</code><br> <code>B49FE4FD</code></td>
|
||||
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -785,17 +785,17 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<h5><a class="anchor" href="#8-auth-key-generation" id="8-auth-key-generation" name="8-auth-key-generation"><i class="anchor-icon"></i></a>8) Auth key generation</h5>
|
||||
<p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p>
|
||||
<!-- start auth_key -->
|
||||
<pre><code>auth_key = 9E2DF222F60F1870365DF0C7C1F7C2206A3197A6EBBE94316536FEA167D303FBDB20989FEB6931A2C1C5F8AB3DDE971C0A8E55BE1E5259A90A23A94A2283B91B335E8F44FC2C143FFD18E1C813002C7C448C5D455DD253DF1BE8E788EF83BFF29FFBB5DBA46E10646F1D2ACA4B52AE63BD6D167882803E8098C1617988451448A1362A56D0B567ED08D6C5BD6FA95B1C10EA031AF95E857BE4044245CDDF7DC1321D9D2BA5334C14F7C36C14CE7CC05E6984E3525F5E2A31865FA81F01AA5EC4E53B4FD478534B45591A345D6106555D4684619B3C915877CE17D734213E368A6253CE1C951E728D794CCFD92792074F7F6B92FD6CF0DC8BFC4FE4EFA66FD5F6</code></pre>
|
||||
<pre><code>auth_key = 4E9D7310E7DD44DC1811D9843D91C8D73B77CC8E3670787FFFFC330929B0F94033B71364C7DAC87250FCF63429DBA44334639B457CA99F84CBEB3F3E8D9E0EFA458009B0510540C9AA18BC71CEAF7726912F7C334C246BFD5CF63EFCC282F286E532A866CA08CBBCBF484B260769627187A5524B3843F9B2E14009565AFC8282F507822121349062019E3804C3DE38AA6507CA4E6AA3CC2B7739B76215B9805C7F70DB4F9C8B558B15AEB1168280F17B03823DDB0B9357D172C3D896EE46080CF38DC75636B5033A479315DA2F9DB1F968EB82CE646A6A39BF8AA880595E879C0BD447B3BB368241033C7FD443F57C7046ABDD68683D7CDDC0667DFE06D247E8</code></pre>
|
||||
<!-- end auth_key -->
|
||||
<h5><a class="anchor" href="#9-final-server-reply" id="9-final-server-reply" name="9-final-server-reply"><i class="anchor-icon"></i></a>9) Final server reply</h5>
|
||||
<p>The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:</p>
|
||||
<!-- start dh_gen_ok -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 0C 22 33 32 83 A2 66
|
||||
0010 | 54 00 00 00 34 F7 CB 3B 36 0B 8A A0 07 4A 79 27
|
||||
0020 | 37 AB 0C 91 14 60 FE 24 DF 49 12 EC 8A 55 7D 05
|
||||
0030 | 16 A5 31 B6 83 E3 2E 71 57 68 6B 1E 83 D6 2D 7B
|
||||
0040 | 7A C8 55 EF 4C 73 64 FE</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 40 4B A0 28 88 A2 66
|
||||
0010 | 64 00 00 00 34 F7 CB 3B D5 49 52 34 D2 F9 4E 3F
|
||||
0020 | 02 4B DF 6D EF 52 10 8B 91 CE 65 C0 BC 19 5D 9A
|
||||
0030 | 0A 3F 41 56 AA 51 1B AA 9B 13 77 69 10 28 36 EE
|
||||
0040 | D5 85 94 3C 56 A3 F3 AB</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>010C22333283A266</code></td>
|
||||
<td><code>01404BA02888A266</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>54000000</code> (84 in decimal)</td>
|
||||
<td><code>64000000</code> (100 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>360B8AA0074A792737AB0C911460FE24</code></td>
|
||||
<td><code>D5495234D2F94E3F024BDF6DEF52108B</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>DF4912EC8A557D0516A531B683E32E71</code></td>
|
||||
<td><code>91CE65C0BC195D9A0A3F4156AA511BAA</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>57686B1E83D62D7B7AC855EF4C7364FE</code></td>
|
||||
<td><code>9B137769102836EED585943C56A3F3AB</code></td>
|
||||
<td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in a new issue