mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-06 02:45:30 +01:00
Update content of files
This commit is contained in:
parent
f0d31af6cf
commit
105d0195c3
6 changed files with 245 additions and 290 deletions
|
@ -97,8 +97,8 @@
|
|||
</ul>
|
||||
<h5><a class="anchor" href="#new-constructors" id="new-constructors" name="new-constructors"><i class="anchor-icon"></i></a>New Constructors</h5>
|
||||
<ul>
|
||||
<li>Added <a href="/constructor/inputStorePaymentStarsTopup">inputStorePaymentStarsTopup</a> - </li>
|
||||
<li>Added <a href="/constructor/inputStorePaymentStarsGift">inputStorePaymentStarsGift</a> - </li>
|
||||
<li>Added <a href="/constructor/inputStorePaymentStarsTopup">inputStorePaymentStarsTopup</a> - Used to top up the <a href="/api/stars">Telegram Stars balance</a> using the Play Store/App Store flow (official apps only).</li>
|
||||
<li>Added <a href="/constructor/inputStorePaymentStarsGift">inputStorePaymentStarsGift</a> - Used to top up the <a href="/api/stars">Telegram Stars</a> balance of a friend using the Play Store/App Store flow (official apps only).</li>
|
||||
<li>Added <a href="/constructor/starsGiftOption">starsGiftOption</a> - </li>
|
||||
<li>Added <a href="/constructor/messageActionGiftStars">messageActionGiftStars</a> - </li>
|
||||
<li>Added <a href="/constructor/topPeerCategoryBotsApp">topPeerCategoryBotsApp</a> - </li>
|
||||
|
@ -165,6 +165,7 @@
|
|||
<li><a href="/api/bots/webapps">Mini Apps</a> may now be opened directly in compact mode by passing the <code>compact</code> flag to <a href="/method/messages.requestWebView">messages.requestWebView</a>, <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, <a href="/method/messages.requestAppWebView">messages.requestAppWebView</a>.<br>
|
||||
This <code>compact</code> flag should always be set if the new <code>mode</code> parameter of <a href="/api/links#mini-app-links">mini app links</a>, <a href="/api/links#mini-app-links">mini app links</a> and <a href="/api/links#direct-mini-app-links">direct mini app links</a> is equal to <code>compact</code>.<br>
|
||||
If the returned <a href="/constructor/webViewResultUrl">webViewResultUrl</a> does <em>not</em> have the <code>fullsize</code> flag set, the app should be opened in compact mode (even if compact mode wasn't explictly requested, since the default fullsize/compact mode can also be changed through <a href="https://t.me/botfather">@botfather</a>).</li>
|
||||
<li>Return the <code>payload</code> passed to <a href="/constructor/inputMediaInvoice">inputMediaInvoice</a> in <a href="/constructor/starTransaction">starTransaction</a>.<code>bot_payload</code>.</li>
|
||||
<li>Device integrity verification improvements for official apps.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
|
||||
|
|
|
@ -4,44 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>inputStorePaymentStarsGift</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
user_id
|
||||
InputUser
|
||||
|
||||
stars
|
||||
long
|
||||
|
||||
currency
|
||||
string
|
||||
|
||||
amount
|
||||
long
|
||||
|
||||
Type
|
||||
InputStorePaymentPurpose">
|
||||
<meta property="description" content="Used to top up the Telegram Stars balance of a friend using the Play Store/App Store flow (official apps only).">
|
||||
<meta property="og:title" content="inputStorePaymentStarsGift">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
user_id
|
||||
InputUser
|
||||
|
||||
stars
|
||||
long
|
||||
|
||||
currency
|
||||
string
|
||||
|
||||
amount
|
||||
long
|
||||
|
||||
Type
|
||||
InputStorePaymentPurpose">
|
||||
<meta property="og:description" content="Used to top up the Telegram Stars balance of a friend using the Play Store/App Store flow (official apps only).">
|
||||
<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">
|
||||
|
@ -76,7 +42,8 @@ InputStorePaymentPurpose">
|
|||
<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="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputStorePaymentStarsGift" >inputStorePaymentStarsGift</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputStorePaymentStarsGift</h1>
|
||||
|
||||
<div id="dev_page_content"><p><div class="clearfix">
|
||||
<div id="dev_page_content"><p>Used to top up the <a href="/api/stars">Telegram Stars</a> balance of a friend using the Play Store/App Store flow (official apps only).</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 185 <b class="caret"></b></a>
|
||||
|
@ -102,27 +69,31 @@ InputStorePaymentPurpose">
|
|||
<tr>
|
||||
<td><strong>user_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputUser">InputUser</a></td>
|
||||
<td> </td>
|
||||
<td>The user to which the stars should be gifted.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>stars</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td> </td>
|
||||
<td>Amount of stars to gift</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>currency</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td> </td>
|
||||
<td>Three-letter ISO 4217 <a href="/bots/payments#supported-currencies">currency</a> code</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>amount</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td> </td>
|
||||
<td>Total price in the smallest units of the currency (integer, not float/double). For example, for a price of <code>US$ 1.45</code> pass <code>amount = 145</code>. See the exp parameter in <a href="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/InputStorePaymentPurpose">InputStorePaymentPurpose</a></p></div>
|
||||
<p><a href="/type/InputStorePaymentPurpose">InputStorePaymentPurpose</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="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</a></h4>
|
||||
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
|
||||
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,38 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>inputStorePaymentStarsTopup</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
stars
|
||||
long
|
||||
|
||||
currency
|
||||
string
|
||||
|
||||
amount
|
||||
long
|
||||
|
||||
Type
|
||||
InputStorePaymentPurpose">
|
||||
<meta property="description" content="Used to top up the Telegram Stars balance using the Play Store/App Store flow (official apps only).">
|
||||
<meta property="og:title" content="inputStorePaymentStarsTopup">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
stars
|
||||
long
|
||||
|
||||
currency
|
||||
string
|
||||
|
||||
amount
|
||||
long
|
||||
|
||||
Type
|
||||
InputStorePaymentPurpose">
|
||||
<meta property="og:description" content="Used to top up the Telegram Stars balance using the Play Store/App Store flow (official apps only).">
|
||||
<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">
|
||||
|
@ -70,7 +42,8 @@ InputStorePaymentPurpose">
|
|||
<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="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputStorePaymentStarsTopup" >inputStorePaymentStarsTopup</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputStorePaymentStarsTopup</h1>
|
||||
|
||||
<div id="dev_page_content"><p><div class="clearfix">
|
||||
<div id="dev_page_content"><p>Used to top up the <a href="/api/stars">Telegram Stars balance</a> using the Play Store/App Store flow (official apps only).</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 185 <b class="caret"></b></a>
|
||||
|
@ -96,22 +69,26 @@ InputStorePaymentPurpose">
|
|||
<tr>
|
||||
<td><strong>stars</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td> </td>
|
||||
<td>Amount of stars to topup</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>currency</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td> </td>
|
||||
<td>Three-letter ISO 4217 <a href="/bots/payments#supported-currencies">currency</a> code</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>amount</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td> </td>
|
||||
<td>Total price in the smallest units of the currency (integer, not float/double). For example, for a price of <code>US$ 1.45</code> pass <code>amount = 145</code>. See the exp parameter in <a href="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/InputStorePaymentPurpose">InputStorePaymentPurpose</a></p></div>
|
||||
<p><a href="/type/InputStorePaymentPurpose">InputStorePaymentPurpose</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="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</a></h4>
|
||||
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
|
||||
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -139,23 +139,29 @@
|
|||
<tr>
|
||||
<td><strong>bot_payload</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/type/bytes">bytes</a></td>
|
||||
<td> </td>
|
||||
<td>Bot specified invoice payload (i.e. the <code>payload</code> passed to <a href="/constructor/inputMediaInvoice">inputMediaInvoice</a> when <a href="/api/payments">creating the invoice</a>).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>msg_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/type/int">int</a></td>
|
||||
<td> </td>
|
||||
<td>For <a href="/api/paid-media">paid media transactions »</a>, message ID of the paid media posted to <code>peer.peer</code> (can point to a deleted message; either way, <code>extended_media</code> will always contain the bought media).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>extended_media</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/Vector%20t">Vector</a><<a href="/type/MessageMedia">MessageMedia</a>></td>
|
||||
<td> </td>
|
||||
<td>The purchased <a href="/api/paid-media">paid media »</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/StarsTransaction">StarsTransaction</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="#inputmediainvoice" id="inputmediainvoice" name="inputmediainvoice"><i class="anchor-icon"></i></a><a href="/constructor/inputMediaInvoice">inputMediaInvoice</a></h4>
|
||||
<p>Generated invoice of a <a href="/bots/payments">bot payment</a></p>
|
||||
<h4><a class="anchor" href="#payments-api" id="payments-api" name="payments-api"><i class="anchor-icon"></i></a><a href="/api/payments">Payments API</a></h4>
|
||||
<p>You can accept payments from Telegram users via Telegram Bots.</p>
|
||||
<h4><a class="anchor" href="#paid-media" id="paid-media" name="paid-media"><i class="anchor-icon"></i></a><a href="/api/paid-media">Paid media</a></h4>
|
||||
<p>Content creators can accept <a href="/api/stars">Stars</a> by publishing <strong>paid photos or videos</strong> on their channels. Subscribers will be allowed to view such posts only after paying the author to unlock them.</p>
|
||||
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
|
||||
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
|
||||
|
||||
|
|
|
@ -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 88 48 04 00 BE 5F AE 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE FF BF 89 C2 AF 61 6F 9E
|
||||
0020 | 59 46 CF 8B 1D C6 7A 60</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 2C E5 07 00 7F 62 AE 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 9B 01 C4 BE E4 4F B3 88
|
||||
0020 | B6 C0 29 C7 44 D2 86 0E</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>88480400BE5FAE66</code></td>
|
||||
<td><code>2CE507007F62AE66</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>FFBF89C2AF616F9E5946CF8B1DC67A60</code></td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</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 04 2E E3 BE 5F AE 66
|
||||
0010 | B0 00 00 00 63 24 16 05 FF BF 89 C2 AF 61 6F 9E
|
||||
0020 | 59 46 CF 8B 1D C6 7A 60 F3 43 1A F7 D8 96 00 09
|
||||
0030 | E9 F2 AB 7A AA 49 96 19 08 1E 19 19 46 D2 C9 07
|
||||
0040 | 49 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 EC A4 5E 7F 62 AE 66
|
||||
0010 | 54 00 00 00 63 24 16 05 9B 01 C4 BE E4 4F B3 88
|
||||
0020 | B6 C0 29 C7 44 D2 86 0E 47 EE 45 59 FE 7A 60 1D
|
||||
0030 | 03 FA 6C A2 51 0F 2F 36 08 16 44 F7 E5 6E 72 C8
|
||||
0040 | BF 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>01042EE3BE5FAE66</code></td>
|
||||
<td><code>01ECA45E7F62AE66</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>B0000000</code> (176 in decimal)</td>
|
||||
<td><code>54000000</code> (84 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FFBF89C2AF616F9E5946CF8B1DC67A60</code></td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>F3431AF7D8960009E9F2AB7AAA499619</code></td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>081E191946D2C90749000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2168792487530399561</td>
|
||||
<td><code>081644F7E56E72C8BF000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1604679932023326911</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 = 2168792487530399561</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2168792487530399561 = 1088326117 * 1992778133</code></p>
|
||||
<pre><code>p = 1088326117
|
||||
q = 1992778133</code></pre>
|
||||
<pre><code>pq = 1604679932023326911</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1604679932023326911 = 1254145391 * 1279500721</code></p>
|
||||
<pre><code>p = 1254145391
|
||||
q = 1279500721</code></pre>
|
||||
<!-- end pq -->
|
||||
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
|
||||
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
|
||||
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
|
||||
<!-- start p_q_inner_data_dc -->
|
||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 95 5F F5 A9 08 1E 19 19 46 D2 C9 07 49 00 00 00
|
||||
0010 | 04 40 DE 89 E5 00 00 00 04 76 C7 61 95 00 00 00
|
||||
0020 | FF BF 89 C2 AF 61 6F 9E 59 46 CF 8B 1D C6 7A 60
|
||||
0030 | F3 43 1A F7 D8 96 00 09 E9 F2 AB 7A AA 49 96 19
|
||||
0040 | FC 1B D4 88 E2 3F DC 45 75 8A 4B 6C C4 3F AC 79
|
||||
0050 | 18 BC AD 25 84 01 F2 6A C5 F5 64 DF 7A DA 35 06
|
||||
<pre><code>0000 | 95 5F F5 A9 08 16 44 F7 E5 6E 72 C8 BF 00 00 00
|
||||
0010 | 04 4A C0 BD 6F 00 00 00 04 4C 43 A1 B1 00 00 00
|
||||
0020 | 9B 01 C4 BE E4 4F B3 88 B6 C0 29 C7 44 D2 86 0E
|
||||
0030 | 47 EE 45 59 FE 7A 60 1D 03 FA 6C A2 51 0F 2F 36
|
||||
0040 | D2 F8 19 F2 4D 66 32 53 B8 E9 36 1A F1 B0 11 13
|
||||
0050 | D6 22 AC B9 96 44 39 89 0D 30 8C 5C C5 11 24 E7
|
||||
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 = 1992778133</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>081E191946D2C90749000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2168792487530399561</td>
|
||||
<td><code>081644F7E56E72C8BF000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1604679932023326911</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>0440DE89E5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1088326117</td>
|
||||
<td><code>044AC0BD6F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1254145391</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>0476C76195000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1992778133</td>
|
||||
<td><code>044C43A1B1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1279500721</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>FFBF89C2AF616F9E5946CF8B1DC67A60</code></td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>F3431AF7D8960009E9F2AB7AAA499619</code></td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>FC1BD488E23FDC45758A4B6CC43FAC79</code> <code>18BCAD258401F26AC5F564DF7ADA3506</code></td>
|
||||
<td><code>D2F819F24D663253B8E9361AF1B01113</code> <code>D622ACB9964439890D308C5CC51124E7</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1992778133</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 = 955FF5A9081E191946D2C907490000000440DE89E50000000476C76195000000FFBF89C2AF616F9E5946CF8B1DC67A60F3431AF7D8960009E9F2AB7AAA499619FC1BD488E23FDC45758A4B6CC43FAC7918BCAD258401F26AC5F564DF7ADA350602000000
|
||||
random_padding_bytes = C3CAAB0D9CA763A9968A1CB0D5EB78AE9ADA553A5A10D1078FE23865EE7E2EEDCC5C8BC7DC54205B464C414C4A8FE0F21625319E98029DCC572091218198167D510520198972517A1FA8FFBD6AC20E8A9435E62910CF795153111314</code></pre>
|
||||
<pre><code>data = 955FF5A9081644F7E56E72C8BF000000044AC0BD6F000000044C43A1B10000009B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F36D2F819F24D663253B8E9361AF1B01113D622ACB9964439890D308C5CC51124E702000000
|
||||
random_padding_bytes = B21DADEA02D355477CB91F6AEBFF1AC70CB3ABFC5ABC13F86F27C9F61F620D9C27FDF00D8D09BDCD01D4F97A0AB04B73AFB0297F2453FEE3023C5B4D9DF76E6C2F3BEAC47E5F61D8DCEDF4F3C48C8B939884EDB6BA8B647AA9843BA4</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 = 0F1A3FF0BD8C4B5A153F935A3EB891E9A2144A4C38FD87A52A974BB058FE6DD7464C9A8174A537126FF8F6C13E18C96CE787D398A2E9EC9A6040887AEB9C69BF1B77BB37C9B65D7436A8F3D9122EC41B1A9D950528CD70CDCF49B660570C7E55E3F17E00ABD3C0FBE33E5D8F08D7656B5E8AF458DF9BEC3E76EC835DEAB3599110B063F746CD50E643C03BF2AAC9BB682CDBD8D0FDCBB88DCC5C3A3599A99B08D0B9408E1862CD5B6F9BD2A0571490F312AA4ECCCCDEC6EE9A4C8E3FA87AB6713C4F86F452FCE82DBA247F7B695471B74D20F1A764369D4197FA176A0BC1D85FF121BCCD224529DC9D96A7F55316F968D795B2D5FB8BA26267840CE9DE24918A</code></pre>
|
||||
<pre><code>encrypted_data = 5BC2201B2F24B780A8A199A9DF143925A946046CCCAF0A8F3127C46205C0DD3A9C84B987C337A29F10C89500A7C21347F48706A90C7392FFD6977DB7DC8934B942FFBFF647F0E9F5DCE5B78B0BA833724233B15C638106818D240887FE806836B0A863D4F77B7956D41C2CCA521341DA7CF52D8BB7EA2D4860DBB110E61627C8A660861F71150B22C533791797551D2AC4E5B28C924231CF008DDC318100521CDFE523B9BE204ECA3F5196AC0E173D25F7552CFCCD261E94565C590A0D12609E0F187DBD0B4A71817EB003EEC945E85BA480B0FEAEA96F70C464E44DC87BAA1B24193C65CB6EB609E1858578807E4B187DFEF7702F6BE62CEB3ECC9DFEB4D7CE</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 2C A2 0D 00 BF 5F AE 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 FF BF 89 C2 AF 61 6F 9E
|
||||
0020 | 59 46 CF 8B 1D C6 7A 60 F3 43 1A F7 D8 96 00 09
|
||||
0030 | E9 F2 AB 7A AA 49 96 19 04 40 DE 89 E5 00 00 00
|
||||
0040 | 04 76 C7 61 95 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 0F 1A 3F F0 BD 8C 4B 5A 15 3F 93 5A
|
||||
0060 | 3E B8 91 E9 A2 14 4A 4C 38 FD 87 A5 2A 97 4B B0
|
||||
0070 | 58 FE 6D D7 46 4C 9A 81 74 A5 37 12 6F F8 F6 C1
|
||||
0080 | 3E 18 C9 6C E7 87 D3 98 A2 E9 EC 9A 60 40 88 7A
|
||||
0090 | EB 9C 69 BF 1B 77 BB 37 C9 B6 5D 74 36 A8 F3 D9
|
||||
00A0 | 12 2E C4 1B 1A 9D 95 05 28 CD 70 CD CF 49 B6 60
|
||||
00B0 | 57 0C 7E 55 E3 F1 7E 00 AB D3 C0 FB E3 3E 5D 8F
|
||||
00C0 | 08 D7 65 6B 5E 8A F4 58 DF 9B EC 3E 76 EC 83 5D
|
||||
00D0 | EA B3 59 91 10 B0 63 F7 46 CD 50 E6 43 C0 3B F2
|
||||
00E0 | AA C9 BB 68 2C DB D8 D0 FD CB B8 8D CC 5C 3A 35
|
||||
00F0 | 99 A9 9B 08 D0 B9 40 8E 18 62 CD 5B 6F 9B D2 A0
|
||||
0100 | 57 14 90 F3 12 AA 4E CC CC DE C6 EE 9A 4C 8E 3F
|
||||
0110 | A8 7A B6 71 3C 4F 86 F4 52 FC E8 2D BA 24 7F 7B
|
||||
0120 | 69 54 71 B7 4D 20 F1 A7 64 36 9D 41 97 FA 17 6A
|
||||
0130 | 0B C1 D8 5F F1 21 BC CD 22 45 29 DC 9D 96 A7 F5
|
||||
0140 | 53 16 F9 68 D7 95 B2 D5 FB 8B A2 62 67 84 0C E9
|
||||
0150 | DE 24 91 8A</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 4C 85 0E 00 7F 62 AE 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 9B 01 C4 BE E4 4F B3 88
|
||||
0020 | B6 C0 29 C7 44 D2 86 0E 47 EE 45 59 FE 7A 60 1D
|
||||
0030 | 03 FA 6C A2 51 0F 2F 36 04 4A C0 BD 6F 00 00 00
|
||||
0040 | 04 4C 43 A1 B1 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 5B C2 20 1B 2F 24 B7 80 A8 A1 99 A9
|
||||
0060 | DF 14 39 25 A9 46 04 6C CC AF 0A 8F 31 27 C4 62
|
||||
0070 | 05 C0 DD 3A 9C 84 B9 87 C3 37 A2 9F 10 C8 95 00
|
||||
0080 | A7 C2 13 47 F4 87 06 A9 0C 73 92 FF D6 97 7D B7
|
||||
0090 | DC 89 34 B9 42 FF BF F6 47 F0 E9 F5 DC E5 B7 8B
|
||||
00A0 | 0B A8 33 72 42 33 B1 5C 63 81 06 81 8D 24 08 87
|
||||
00B0 | FE 80 68 36 B0 A8 63 D4 F7 7B 79 56 D4 1C 2C CA
|
||||
00C0 | 52 13 41 DA 7C F5 2D 8B B7 EA 2D 48 60 DB B1 10
|
||||
00D0 | E6 16 27 C8 A6 60 86 1F 71 15 0B 22 C5 33 79 17
|
||||
00E0 | 97 55 1D 2A C4 E5 B2 8C 92 42 31 CF 00 8D DC 31
|
||||
00F0 | 81 00 52 1C DF E5 23 B9 BE 20 4E CA 3F 51 96 AC
|
||||
0100 | 0E 17 3D 25 F7 55 2C FC CD 26 1E 94 56 5C 59 0A
|
||||
0110 | 0D 12 60 9E 0F 18 7D BD 0B 4A 71 81 7E B0 03 EE
|
||||
0120 | C9 45 E8 5B A4 80 B0 FE AE A9 6F 70 C4 64 E4 4D
|
||||
0130 | C8 7B AA 1B 24 19 3C 65 CB 6E B6 09 E1 85 85 78
|
||||
0140 | 80 7E 4B 18 7D FE F7 70 2F 6B E6 2C EB 3E CC 9D
|
||||
0150 | FE B4 D7 CE</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 = C3CAAB0D9CA763A9968A1CB0D5EB78AE9ADA553A5A10D1078FE23865E
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>2CA20D00BF5FAE66</code></td>
|
||||
<td><code>4C850E007F62AE66</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 = C3CAAB0D9CA763A9968A1CB0D5EB78AE9ADA553A5A10D1078FE23865E
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FFBF89C2AF616F9E5946CF8B1DC67A60</code></td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>F3431AF7D8960009E9F2AB7AAA499619</code></td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>0440DE89E5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1088326117</td>
|
||||
<td><code>044AC0BD6F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1254145391</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>0476C76195000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1992778133</td>
|
||||
<td><code>044C43A1B1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1279500721</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 = C3CAAB0D9CA763A9968A1CB0D5EB78AE9ADA553A5A10D1078FE23865E
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE0001000F1A3FF0BD8C4B5A153F935A</code> <code>3EB891E9A2144A4C38FD87A52A974BB0</code> <code>58FE6DD7464C9A8174A537126FF8F6C1</code> <code>3E18C96CE787D398A2E9EC9A6040887A</code> <code>EB9C69BF1B77BB37C9B65D7436A8F3D9</code> <code>122EC41B1A9D950528CD70CDCF49B660</code> <code>570C7E55E3F17E00ABD3C0FBE33E5D8F</code> <code>08D7656B5E8AF458DF9BEC3E76EC835D</code> <code>EAB3599110B063F746CD50E643C03BF2</code> <code>AAC9BB682CDBD8D0FDCBB88DCC5C3A35</code> <code>99A99B08D0B9408E1862CD5B6F9BD2A0</code> <code>571490F312AA4ECCCCDEC6EE9A4C8E3F</code> <code>A87AB6713C4F86F452FCE82DBA247F7B</code> <code>695471B74D20F1A764369D4197FA176A</code> <code>0BC1D85FF121BCCD224529DC9D96A7F5</code> <code>5316F968D795B2D5FB8BA26267840CE9</code><br> <code>DE24918A</code></td>
|
||||
<td><code>FE0001005BC2201B2F24B780A8A199A9</code> <code>DF143925A946046CCCAF0A8F3127C462</code> <code>05C0DD3A9C84B987C337A29F10C89500</code> <code>A7C21347F48706A90C7392FFD6977DB7</code> <code>DC8934B942FFBFF647F0E9F5DCE5B78B</code> <code>0BA833724233B15C638106818D240887</code> <code>FE806836B0A863D4F77B7956D41C2CCA</code> <code>521341DA7CF52D8BB7EA2D4860DBB110</code> <code>E61627C8A660861F71150B22C5337917</code> <code>97551D2AC4E5B28C924231CF008DDC31</code> <code>8100521CDFE523B9BE204ECA3F5196AC</code> <code>0E173D25F7552CFCCD261E94565C590A</code> <code>0D12609E0F187DBD0B4A71817EB003EE</code> <code>C945E85BA480B0FEAEA96F70C464E44D</code> <code>C87BAA1B24193C65CB6EB609E1858578</code> <code>807E4B187DFEF7702F6BE62CEB3ECC9D</code><br> <code>FEB4D7CE</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = C3CAAB0D9CA763A9968A1CB0D5EB78AE9ADA553A5A10D1078FE23865E
|
|||
<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 BC 33 C1 BF 5F AE 66
|
||||
0010 | E8 02 00 00 5C 07 E8 D0 FF BF 89 C2 AF 61 6F 9E
|
||||
0020 | 59 46 CF 8B 1D C6 7A 60 F3 43 1A F7 D8 96 00 09
|
||||
0030 | E9 F2 AB 7A AA 49 96 19 FE 50 02 00 A5 33 9E 32
|
||||
0040 | F5 A1 46 2D FC 5C 1D 83 67 20 B8 59 8D 2D 15 C7
|
||||
0050 | 70 B8 00 28 E7 0F 91 13 8E EC 21 EE 01 93 54 D5
|
||||
0060 | 18 2C A6 D3 E3 9A E8 06 FC AF 14 26 EC E9 56 BA
|
||||
0070 | F3 DD F5 53 9D 68 EA 82 7B 66 7E C0 4A 0F 8F A6
|
||||
0080 | 6C 4F 36 AD AE 01 30 0C 80 2B 09 FC 27 E2 4B 24
|
||||
0090 | DE 64 D0 E6 CA 76 21 9A E2 C5 47 28 6A C6 AB 66
|
||||
00A0 | 4E BF B4 36 EF 50 C7 EC 6B 25 87 A2 D8 A8 96 DF
|
||||
00B0 | 8C 52 52 C5 B6 05 1F CA 45 38 41 65 8E 06 53 33
|
||||
00C0 | 94 74 71 88 25 8C 5E 04 FB 79 E9 FD 28 C5 6A 32
|
||||
00D0 | BD C3 27 FA 3B 3A B4 74 43 58 BC A6 74 3A 67 66
|
||||
00E0 | 88 92 EA 35 AA 88 55 A9 D2 3D 8B 65 D1 CA 90 12
|
||||
00F0 | E3 E8 59 92 B1 92 93 5E CB 0F F2 72 4C 11 D5 22
|
||||
0100 | FB 35 B8 88 1D F3 F5 04 77 11 48 20 B2 DC 61 1F
|
||||
0110 | 1E 61 0B F9 64 ED E2 14 3B BB 2A 2A C9 E6 84 F6
|
||||
0120 | 2C FF 06 95 31 5B EA C2 A0 CB F8 B5 62 AE 05 51
|
||||
0130 | C2 D2 51 FA 7B 96 26 8F B0 AD 4F 20 A4 2E B0 EB
|
||||
0140 | 72 44 74 17 C7 BD C2 2B 58 90 AA 16 B2 DB 6F 38
|
||||
0150 | EB B7 08 A6 CF 82 B4 AF 9B 2F E2 A8 67 C9 DD 29
|
||||
0160 | 24 20 61 64 AB 99 93 2B 5C E3 58 70 44 D5 53 E4
|
||||
0170 | 39 06 A6 27 4C A8 9D 72 CF BE 29 67 9A 4E 21 54
|
||||
0180 | C9 01 4F F5 85 D8 10 61 9C D9 69 60 C6 3B BF E6
|
||||
0190 | 0A BC 15 50 E9 0C 61 90 0C 28 EA 34 48 86 1C 8C
|
||||
01A0 | 4B 1C 4E 27 A4 DC 5D 2E B4 83 79 90 5B F8 17 1C
|
||||
01B0 | 34 16 72 BB F9 CA E0 03 BA F4 4A 6A 0C C7 15 8C
|
||||
01C0 | E0 5C CD AA 48 15 2B 6F D8 5B 71 32 8E 44 10 B8
|
||||
01D0 | 87 5A 9C 26 03 C6 30 86 C2 79 A8 87 4A E8 8A F2
|
||||
01E0 | 5B 9F 82 04 B4 5D FF 3A 26 D7 49 D4 3D 15 A7 D8
|
||||
01F0 | E3 3F 69 E4 5D 2B 04 4F 8E F5 E8 F7 C9 1C 79 DA
|
||||
0200 | 51 F6 E3 D7 94 E3 D2 6F 8F 77 2C 23 80 EA D6 0E
|
||||
0210 | E9 CC 3B D1 73 13 9A A1 B6 82 AA A2 19 44 5B 64
|
||||
0220 | 3C 11 38 50 73 97 9B 45 24 4E 65 D9 88 3D EA 0E
|
||||
0230 | 42 0D 30 D7 4B DF 5F CD EE 9F AF FE 7C AE 51 1E
|
||||
0240 | 6A 15 23 18 C9 4E 6F 65 48 7E 2D 2D B8 39 6E D0
|
||||
0250 | 8F 05 A0 36 6B 2A CF FB D1 7C 5A F5 BC 46 10 6C
|
||||
0260 | 13 93 02 9B 44 4D F7 15 B2 73 5B 50 FC 57 9B DC
|
||||
0270 | 73 41 02 67 54 7A 61 E2 4E 82 38 E7 1C 85 3E FF
|
||||
0280 | 0E 6C B2 AA B3 C8 A4 A4 A0 EC 8A 9F</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 6C 16 32 80 62 AE 66
|
||||
0010 | E0 02 00 00 5C 07 E8 D0 9B 01 C4 BE E4 4F B3 88
|
||||
0020 | B6 C0 29 C7 44 D2 86 0E 47 EE 45 59 FE 7A 60 1D
|
||||
0030 | 03 FA 6C A2 51 0F 2F 36 FE 50 02 00 DF 31 89 55
|
||||
0040 | 8F D5 83 B8 2C F6 4B 6C 2C 3E 88 48 4E 62 72 5E
|
||||
0050 | CC 2D F7 32 B5 84 89 50 99 CC AD 44 0A 99 8B BD
|
||||
0060 | E2 BB 01 79 17 5A 95 48 B8 55 A2 A3 CD 6E 0A 99
|
||||
0070 | 38 A0 83 36 FA 15 6E B7 41 98 1D 90 91 7A 97 F8
|
||||
0080 | 58 8A 6B 8C F9 36 AC 4E D8 1B 02 33 8A 17 CD E1
|
||||
0090 | 40 12 66 4B CE 04 AF 80 51 19 3B F4 71 8F 0F 53
|
||||
00A0 | 1D 4A 5C 8D 2A 65 36 90 6B CD 61 8E CB 90 70 6B
|
||||
00B0 | F5 DF 15 8E 80 98 8C 55 58 F8 5A 71 74 A5 B9 08
|
||||
00C0 | 63 79 86 12 2B 56 79 9E 55 2B 3F 4A D1 9C 33 A6
|
||||
00D0 | B1 09 01 26 EF 0A BE 1C 84 6B 6E 11 8D EC 83 3E
|
||||
00E0 | 68 5D FB 60 EB 1E 2B 9E 1C BD 5C 3F 84 E8 E7 DE
|
||||
00F0 | 6A 4C 04 1B 12 5E 51 A2 45 76 30 08 0B 2E 76 91
|
||||
0100 | 30 82 AF F5 BB 4C D5 16 7A F0 CF 74 05 35 85 B1
|
||||
0110 | EC 82 D5 39 E8 DE 3A 20 ED 0A 03 0D BF 54 E2 CB
|
||||
0120 | 62 8A 6C AF 5A 23 21 17 DB FB 31 A6 69 1E AE 56
|
||||
0130 | 97 2D 56 A6 8F 78 14 3B FD F8 CF A8 E2 30 BC 1D
|
||||
0140 | 0D 41 9D E9 6D A9 10 13 5F 22 1C 98 06 F9 3E 37
|
||||
0150 | 43 C7 4E 64 9C 09 EC 23 20 DF 8A D4 2B 21 1B 51
|
||||
0160 | 20 5F 58 AF 99 B6 EA B6 F2 17 9F D2 1E 5D C8 06
|
||||
0170 | 5C E1 3C 82 EA 76 F9 7A 9F 1B 81 40 F9 2B A4 42
|
||||
0180 | 6E C4 2D 65 F9 13 A9 98 A9 FF 14 C3 5F 7F 9C 08
|
||||
0190 | 0D 9A E0 DE FF 71 BB DD 71 7F E7 F0 1B 30 90 9F
|
||||
01A0 | DA C3 E8 DB 7B 94 85 3D 1A 7C 3F EF 69 B3 8C CB
|
||||
01B0 | 9C A9 15 E8 7C 3D 15 A0 83 F6 45 2C CA 3F 41 0F
|
||||
01C0 | 89 02 E6 98 5D 61 B9 96 89 55 7F 03 37 21 6B 15
|
||||
01D0 | 24 2A A3 9E EE 52 40 51 4C E2 55 C4 6A C7 E2 D2
|
||||
01E0 | ED B9 ED DA 6E B1 1E 92 D9 65 6D AD DB 79 AA CB
|
||||
01F0 | 9F A1 B4 E2 CB 5A E7 4E 99 A1 D2 26 EF C1 04 D9
|
||||
0200 | 6D 67 4B 9C 85 6B 3C FE EB FD F2 0D 0C 3D CA 01
|
||||
0210 | 56 FC 69 BF 1F 74 55 7F EB D7 5A DB 04 CC 6F 4E
|
||||
0220 | 48 F4 B7 84 64 D8 0A A2 1A 97 E8 9A 35 E8 04 06
|
||||
0230 | A2 BD 5D 87 AA 19 18 48 DB 74 01 A0 5D 9A 8C 86
|
||||
0240 | B9 BC 17 14 8C A1 3B AB B1 99 A6 E0 A9 F9 F5 F9
|
||||
0250 | F5 7F BE 26 9B 64 2B 63 4F 4C 9F 09 F6 34 CC 99
|
||||
0260 | 30 7D E7 8B 5C 02 39 CB 44 3A 9D E9 93 30 08 B1
|
||||
0270 | 43 53 42 00 AF 74 F4 11 78 AD BA 3C 60 61 80 33
|
||||
0280 | 8D B4 B4 E8 F6 C6 2C 2E 44 C2 9B C5</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 = C3CAAB0D9CA763A9968A1CB0D5EB78AE9ADA553A5A10D1078FE23865E
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01BC33C1BF5FAE66</code></td>
|
||||
<td><code>016C16328062AE66</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>E8020000</code> (744 in decimal)</td>
|
||||
<td><code>E0020000</code> (736 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = C3CAAB0D9CA763A9968A1CB0D5EB78AE9ADA553A5A10D1078FE23865E
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FFBF89C2AF616F9E5946CF8B1DC67A60</code></td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>F3431AF7D8960009E9F2AB7AAA499619</code></td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE500200A5339E32F5A1462DFC5C1D83</code> <code>6720B8598D2D15C770B80028E70F9113</code> <code>8EEC21EE019354D5182CA6D3E39AE806</code> <code>FCAF1426ECE956BAF3DDF5539D68EA82</code> <code>7B667EC04A0F8FA66C4F36ADAE01300C</code> <code>802B09FC27E24B24DE64D0E6CA76219A</code> <code>E2C547286AC6AB664EBFB436EF50C7EC</code> <code>6B2587A2D8A896DF8C5252C5B6051FCA</code> <code>453841658E06533394747188258C5E04</code> <code>FB79E9FD28C56A32BDC327FA3B3AB474</code> <code>4358BCA6743A67668892EA35AA8855A9</code> <code>D23D8B65D1CA9012E3E85992B192935E</code> <code>CB0FF2724C11D522FB35B8881DF3F504</code> <code>77114820B2DC611F1E610BF964EDE214</code> <code>3BBB2A2AC9E684F62CFF0695315BEAC2</code> <code>A0CBF8B562AE0551C2D251FA7B96268F</code> <code>B0AD4F20A42EB0EB72447417C7BDC22B</code> <code>5890AA16B2DB6F38EBB708A6CF82B4AF</code> <code>9B2FE2A867C9DD2924206164AB99932B</code> <code>5CE3587044D553E43906A6274CA89D72</code> <code>CFBE29679A4E2154C9014FF585D81061</code> <code>9CD96960C63BBFE60ABC1550E90C6190</code> <code>0C28EA3448861C8C4B1C4E27A4DC5D2E</code> <code>B48379905BF8171C341672BBF9CAE003</code> <code>BAF44A6A0CC7158CE05CCDAA48152B6F</code> <code>D85B71328E4410B8875A9C2603C63086</code> <code>C279A8874AE88AF25B9F8204B45DFF3A</code> <code>26D749D43D15A7D8E33F69E45D2B044F</code> <code>8EF5E8F7C91C79DA51F6E3D794E3D26F</code> <code>8F772C2380EAD60EE9CC3BD173139AA1</code> <code>B682AAA219445B643C11385073979B45</code> <code>244E65D9883DEA0E420D30D74BDF5FCD</code> <code>EE9FAFFE7CAE511E6A152318C94E6F65</code> <code>487E2D2DB8396ED08F05A0366B2ACFFB</code> <code>D17C5AF5BC46106C1393029B444DF715</code> <code>B2735B50FC579BDC73410267547A61E2</code> <code>4E8238E71C853EFF0E6CB2AAB3C8A4A4</code><br> <code>A0EC8A9F</code></td>
|
||||
<td><code>FE500200DF3189558FD583B82CF64B6C</code> <code>2C3E88484E62725ECC2DF732B5848950</code> <code>99CCAD440A998BBDE2BB0179175A9548</code> <code>B855A2A3CD6E0A9938A08336FA156EB7</code> <code>41981D90917A97F8588A6B8CF936AC4E</code> <code>D81B02338A17CDE14012664BCE04AF80</code> <code>51193BF4718F0F531D4A5C8D2A653690</code> <code>6BCD618ECB90706BF5DF158E80988C55</code> <code>58F85A7174A5B908637986122B56799E</code> <code>552B3F4AD19C33A6B1090126EF0ABE1C</code> <code>846B6E118DEC833E685DFB60EB1E2B9E</code> <code>1CBD5C3F84E8E7DE6A4C041B125E51A2</code> <code>457630080B2E76913082AFF5BB4CD516</code> <code>7AF0CF74053585B1EC82D539E8DE3A20</code> <code>ED0A030DBF54E2CB628A6CAF5A232117</code> <code>DBFB31A6691EAE56972D56A68F78143B</code> <code>FDF8CFA8E230BC1D0D419DE96DA91013</code> <code>5F221C9806F93E3743C74E649C09EC23</code> <code>20DF8AD42B211B51205F58AF99B6EAB6</code> <code>F2179FD21E5DC8065CE13C82EA76F97A</code> <code>9F1B8140F92BA4426EC42D65F913A998</code> <code>A9FF14C35F7F9C080D9AE0DEFF71BBDD</code> <code>717FE7F01B30909FDAC3E8DB7B94853D</code> <code>1A7C3FEF69B38CCB9CA915E87C3D15A0</code> <code>83F6452CCA3F410F8902E6985D61B996</code> <code>89557F0337216B15242AA39EEE524051</code> <code>4CE255C46AC7E2D2EDB9EDDA6EB11E92</code> <code>D9656DADDB79AACB9FA1B4E2CB5AE74E</code> <code>99A1D226EFC104D96D674B9C856B3CFE</code> <code>EBFDF20D0C3DCA0156FC69BF1F74557F</code> <code>EBD75ADB04CC6F4E48F4B78464D80AA2</code> <code>1A97E89A35E80406A2BD5D87AA191848</code> <code>DB7401A05D9A8C86B9BC17148CA13BAB</code> <code>B199A6E0A9F9F5F9F57FBE269B642B63</code> <code>4F4C9F09F634CC99307DE78B5C0239CB</code> <code>443A9DE9933008B143534200AF74F411</code> <code>78ADBA3C606180338DB4B4E8F6C62C2E</code><br> <code>44C29BC5</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = C3CAAB0D9CA763A9968A1CB0D5EB78AE9ADA553A5A10D1078FE23865E
|
|||
<!-- 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 = A5339E32F5A1462DFC5C1D836720B8598D2D15C770B80028E70F91138EEC21EE019354D5182CA6D3E39AE806FCAF1426ECE956BAF3DDF5539D68EA827B667EC04A0F8FA66C4F36ADAE01300C802B09FC27E24B24DE64D0E6CA76219AE2C547286AC6AB664EBFB436EF50C7EC6B2587A2D8A896DF8C5252C5B6051FCA453841658E06533394747188258C5E04FB79E9FD28C56A32BDC327FA3B3AB4744358BCA6743A67668892EA35AA8855A9D23D8B65D1CA9012E3E85992B192935ECB0FF2724C11D522FB35B8881DF3F50477114820B2DC611F1E610BF964EDE2143BBB2A2AC9E684F62CFF0695315BEAC2A0CBF8B562AE0551C2D251FA7B96268FB0AD4F20A42EB0EB72447417C7BDC22B5890AA16B2DB6F38EBB708A6CF82B4AF9B2FE2A867C9DD2924206164AB99932B5CE3587044D553E43906A6274CA89D72CFBE29679A4E2154C9014FF585D810619CD96960C63BBFE60ABC1550E90C61900C28EA3448861C8C4B1C4E27A4DC5D2EB48379905BF8171C341672BBF9CAE003BAF44A6A0CC7158CE05CCDAA48152B6FD85B71328E4410B8875A9C2603C63086C279A8874AE88AF25B9F8204B45DFF3A26D749D43D15A7D8E33F69E45D2B044F8EF5E8F7C91C79DA51F6E3D794E3D26F8F772C2380EAD60EE9CC3BD173139AA1B682AAA219445B643C11385073979B45244E65D9883DEA0E420D30D74BDF5FCDEE9FAFFE7CAE511E6A152318C94E6F65487E2D2DB8396ED08F05A0366B2ACFFBD17C5AF5BC46106C1393029B444DF715B2735B50FC579BDC73410267547A61E24E8238E71C853EFF0E6CB2AAB3C8A4A4A0EC8A9F
|
||||
tmp_aes_key = B025233C2D0BE415F2D978000429D04908F4107759FED43ED2572C802894A431
|
||||
tmp_aes_iv = 857BAC258C90E735067828AB3249FF945DFAA7CF4E582BD785742656FC1BD488</code></pre>
|
||||
<pre><code>encrypted_answer = DF3189558FD583B82CF64B6C2C3E88484E62725ECC2DF732B584895099CCAD440A998BBDE2BB0179175A9548B855A2A3CD6E0A9938A08336FA156EB741981D90917A97F8588A6B8CF936AC4ED81B02338A17CDE14012664BCE04AF8051193BF4718F0F531D4A5C8D2A6536906BCD618ECB90706BF5DF158E80988C5558F85A7174A5B908637986122B56799E552B3F4AD19C33A6B1090126EF0ABE1C846B6E118DEC833E685DFB60EB1E2B9E1CBD5C3F84E8E7DE6A4C041B125E51A2457630080B2E76913082AFF5BB4CD5167AF0CF74053585B1EC82D539E8DE3A20ED0A030DBF54E2CB628A6CAF5A232117DBFB31A6691EAE56972D56A68F78143BFDF8CFA8E230BC1D0D419DE96DA910135F221C9806F93E3743C74E649C09EC2320DF8AD42B211B51205F58AF99B6EAB6F2179FD21E5DC8065CE13C82EA76F97A9F1B8140F92BA4426EC42D65F913A998A9FF14C35F7F9C080D9AE0DEFF71BBDD717FE7F01B30909FDAC3E8DB7B94853D1A7C3FEF69B38CCB9CA915E87C3D15A083F6452CCA3F410F8902E6985D61B99689557F0337216B15242AA39EEE5240514CE255C46AC7E2D2EDB9EDDA6EB11E92D9656DADDB79AACB9FA1B4E2CB5AE74E99A1D226EFC104D96D674B9C856B3CFEEBFDF20D0C3DCA0156FC69BF1F74557FEBD75ADB04CC6F4E48F4B78464D80AA21A97E89A35E80406A2BD5D87AA191848DB7401A05D9A8C86B9BC17148CA13BABB199A6E0A9F9F5F9F57FBE269B642B634F4C9F09F634CC99307DE78B5C0239CB443A9DE9933008B143534200AF74F41178ADBA3C606180338DB4B4E8F6C62C2E44C29BC5
|
||||
tmp_aes_key = E5D04D3D974072B1E3BBE0A64AF5226F1B4AC9E12E3E1E1EF6BFB38312175BD8
|
||||
tmp_aes_iv = B6A314D270A63B8FB6AAE4839FD6FA2B964B9D05ED1593039031F1C9D2F819F2</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = 057EA9A2DFB071DFDCB8757F3BC4CFB0AC8024D1BA0D89B5FFBF89C2AF616F9E5946CF8B1DC67A60F3431AF7D8960009E9F2AB7AAA49961903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001004776BC37BB62C99645DEAF4B851D25AE5D50422C362E5765012369F6EF34734A201E843E1B49917264842F5D2F61C5BB087EC9AC8AB5907DB3BDEA778C911D84F9B4D329AA543D0162C7F35060196BD50B0E4A02F47DED2BCB982B1F40BD8477851152F76C172D3EA7E82574304C2E3E51E259A6449BCFC9FEAEFFA51150EFFBFEB12231741C5ABD7C871732D853C6E5103F247B194CB266665B20A51CE1F66103E244685F2EA3E3A9C3CCE467665E15F194787BE3F9D53C876BDDD1D40C05696B68AE0D8416042BDEBB284A7D767F093CB1B2352D38D4BC7609DC37C250EBD7843247071CA590BD1FC03D517867A91EC64A9D5601D6D1AF43A216F67C75F5C8BF5FAE66FE206CD76AA6241B
|
||||
answer = BA0D89B5FFBF89C2AF616F9E5946CF8B1DC67A60F3431AF7D8960009E9F2AB7AAA49961903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001004776BC37BB62C99645DEAF4B851D25AE5D50422C362E5765012369F6EF34734A201E843E1B49917264842F5D2F61C5BB087EC9AC8AB5907DB3BDEA778C911D84F9B4D329AA543D0162C7F35060196BD50B0E4A02F47DED2BCB982B1F40BD8477851152F76C172D3EA7E82574304C2E3E51E259A6449BCFC9FEAEFFA51150EFFBFEB12231741C5ABD7C871732D853C6E5103F247B194CB266665B20A51CE1F66103E244685F2EA3E3A9C3CCE467665E15F194787BE3F9D53C876BDDD1D40C05696B68AE0D8416042BDEBB284A7D767F093CB1B2352D38D4BC7609DC37C250EBD7843247071CA590BD1FC03D517867A91EC64A9D5601D6D1AF43A216F67C75F5C8BF5FAE66FE206CD76AA6241B</code></pre>
|
||||
<pre><code>answer_with_hash = F4B92C626F44ADB3825A6534FCA04EC72F3D9345BA0D89B59B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F3603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007064B314A50AE2361CC4F5EC9123FD1BBD28AE5AF6B788FA07B41122BBAB699B0C48DB346B5E98F0C8A1D73305F587878F759F81379DA3C4A87D1E884BA9AD31AE7F5F97D845C057347AC261C5F672373D61FE682AE867EE978DC72A0F09CE2C2E9F17432A58ACC45F4B0B262DFC474A0EF74941D76F75921A1014B5E1B964F5FB1F96E67E9ACFCA1658C0BA37FA392370C854711839EC23E8D99193FB781A736C61CE60769077622913663FC0F9B2291E62E089D3F80F3B5E75245FB843F673BCEAB8E2B9852D99F82F630E238806218CF0237C040767EA5D366A7D1AE64292DCD8D95E67832279DAD7588F2424567F6308E1045EFB035DC084795437E66FD58062AE66E74A2AD89FB3B3FD
|
||||
answer = BA0D89B59B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F3603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007064B314A50AE2361CC4F5EC9123FD1BBD28AE5AF6B788FA07B41122BBAB699B0C48DB346B5E98F0C8A1D73305F587878F759F81379DA3C4A87D1E884BA9AD31AE7F5F97D845C057347AC261C5F672373D61FE682AE867EE978DC72A0F09CE2C2E9F17432A58ACC45F4B0B262DFC474A0EF74941D76F75921A1014B5E1B964F5FB1F96E67E9ACFCA1658C0BA37FA392370C854711839EC23E8D99193FB781A736C61CE60769077622913663FC0F9B2291E62E089D3F80F3B5E75245FB843F673BCEAB8E2B9852D99F82F630E238806218CF0237C040767EA5D366A7D1AE64292DCD8D95E67832279DAD7588F2424567F6308E1045EFB035DC084795437E66FD58062AE66E74A2AD89FB3B3FD</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 FF BF 89 C2 AF 61 6F 9E 59 46 CF 8B
|
||||
0010 | 1D C6 7A 60 F3 43 1A F7 D8 96 00 09 E9 F2 AB 7A
|
||||
0020 | AA 49 96 19 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 9B 01 C4 BE E4 4F B3 88 B6 C0 29 C7
|
||||
0010 | 44 D2 86 0E 47 EE 45 59 FE 7A 60 1D 03 FA 6C A2
|
||||
0020 | 51 0F 2F 36 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 = BA0D89B5FFBF89C2AF616F9E5946CF8B1DC67A60F3431AF7D8960009E9F2AB7AAA49961
|
|||
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 | 47 76 BC 37 BB 62 C9 96 45 DE AF 4B 85 1D 25 AE
|
||||
0140 | 5D 50 42 2C 36 2E 57 65 01 23 69 F6 EF 34 73 4A
|
||||
0150 | 20 1E 84 3E 1B 49 91 72 64 84 2F 5D 2F 61 C5 BB
|
||||
0160 | 08 7E C9 AC 8A B5 90 7D B3 BD EA 77 8C 91 1D 84
|
||||
0170 | F9 B4 D3 29 AA 54 3D 01 62 C7 F3 50 60 19 6B D5
|
||||
0180 | 0B 0E 4A 02 F4 7D ED 2B CB 98 2B 1F 40 BD 84 77
|
||||
0190 | 85 11 52 F7 6C 17 2D 3E A7 E8 25 74 30 4C 2E 3E
|
||||
01A0 | 51 E2 59 A6 44 9B CF C9 FE AE FF A5 11 50 EF FB
|
||||
01B0 | FE B1 22 31 74 1C 5A BD 7C 87 17 32 D8 53 C6 E5
|
||||
01C0 | 10 3F 24 7B 19 4C B2 66 66 5B 20 A5 1C E1 F6 61
|
||||
01D0 | 03 E2 44 68 5F 2E A3 E3 A9 C3 CC E4 67 66 5E 15
|
||||
01E0 | F1 94 78 7B E3 F9 D5 3C 87 6B DD D1 D4 0C 05 69
|
||||
01F0 | 6B 68 AE 0D 84 16 04 2B DE BB 28 4A 7D 76 7F 09
|
||||
0200 | 3C B1 B2 35 2D 38 D4 BC 76 09 DC 37 C2 50 EB D7
|
||||
0210 | 84 32 47 07 1C A5 90 BD 1F C0 3D 51 78 67 A9 1E
|
||||
0220 | C6 4A 9D 56 01 D6 D1 AF 43 A2 16 F6 7C 75 F5 C8
|
||||
0230 | BF 5F AE 66</code></pre>
|
||||
0130 | 70 64 B3 14 A5 0A E2 36 1C C4 F5 EC 91 23 FD 1B
|
||||
0140 | BD 28 AE 5A F6 B7 88 FA 07 B4 11 22 BB AB 69 9B
|
||||
0150 | 0C 48 DB 34 6B 5E 98 F0 C8 A1 D7 33 05 F5 87 87
|
||||
0160 | 8F 75 9F 81 37 9D A3 C4 A8 7D 1E 88 4B A9 AD 31
|
||||
0170 | AE 7F 5F 97 D8 45 C0 57 34 7A C2 61 C5 F6 72 37
|
||||
0180 | 3D 61 FE 68 2A E8 67 EE 97 8D C7 2A 0F 09 CE 2C
|
||||
0190 | 2E 9F 17 43 2A 58 AC C4 5F 4B 0B 26 2D FC 47 4A
|
||||
01A0 | 0E F7 49 41 D7 6F 75 92 1A 10 14 B5 E1 B9 64 F5
|
||||
01B0 | FB 1F 96 E6 7E 9A CF CA 16 58 C0 BA 37 FA 39 23
|
||||
01C0 | 70 C8 54 71 18 39 EC 23 E8 D9 91 93 FB 78 1A 73
|
||||
01D0 | 6C 61 CE 60 76 90 77 62 29 13 66 3F C0 F9 B2 29
|
||||
01E0 | 1E 62 E0 89 D3 F8 0F 3B 5E 75 24 5F B8 43 F6 73
|
||||
01F0 | BC EA B8 E2 B9 85 2D 99 F8 2F 63 0E 23 88 06 21
|
||||
0200 | 8C F0 23 7C 04 07 67 EA 5D 36 6A 7D 1A E6 42 92
|
||||
0210 | DC D8 D9 5E 67 83 22 79 DA D7 58 8F 24 24 56 7F
|
||||
0220 | 63 08 E1 04 5E FB 03 5D C0 84 79 54 37 E6 6F D5
|
||||
0230 | 80 62 AE 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 = BA0D89B5FFBF89C2AF616F9E5946CF8B1DC67A60F3431AF7D8960009E9F2AB7AAA49961
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>FFBF89C2AF616F9E5946CF8B1DC67A60</code></td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>F3431AF7D8960009E9F2AB7AAA499619</code></td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B5FFBF89C2AF616F9E5946CF8B1DC67A60F3431AF7D8960009E9F2AB7AAA49961
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE0001004776BC37BB62C99645DEAF4B</code> <code>851D25AE5D50422C362E5765012369F6</code> <code>EF34734A201E843E1B49917264842F5D</code> <code>2F61C5BB087EC9AC8AB5907DB3BDEA77</code> <code>8C911D84F9B4D329AA543D0162C7F350</code> <code>60196BD50B0E4A02F47DED2BCB982B1F</code> <code>40BD8477851152F76C172D3EA7E82574</code> <code>304C2E3E51E259A6449BCFC9FEAEFFA5</code> <code>1150EFFBFEB12231741C5ABD7C871732</code> <code>D853C6E5103F247B194CB266665B20A5</code> <code>1CE1F66103E244685F2EA3E3A9C3CCE4</code> <code>67665E15F194787BE3F9D53C876BDDD1</code> <code>D40C05696B68AE0D8416042BDEBB284A</code> <code>7D767F093CB1B2352D38D4BC7609DC37</code> <code>C250EBD7843247071CA590BD1FC03D51</code> <code>7867A91EC64A9D5601D6D1AF43A216F6</code><br> <code>7C75F5C8</code></td>
|
||||
<td><code>FE0001007064B314A50AE2361CC4F5EC</code> <code>9123FD1BBD28AE5AF6B788FA07B41122</code> <code>BBAB699B0C48DB346B5E98F0C8A1D733</code> <code>05F587878F759F81379DA3C4A87D1E88</code> <code>4BA9AD31AE7F5F97D845C057347AC261</code> <code>C5F672373D61FE682AE867EE978DC72A</code> <code>0F09CE2C2E9F17432A58ACC45F4B0B26</code> <code>2DFC474A0EF74941D76F75921A1014B5</code> <code>E1B964F5FB1F96E67E9ACFCA1658C0BA</code> <code>37FA392370C854711839EC23E8D99193</code> <code>FB781A736C61CE60769077622913663F</code> <code>C0F9B2291E62E089D3F80F3B5E75245F</code> <code>B843F673BCEAB8E2B9852D99F82F630E</code> <code>238806218CF0237C040767EA5D366A7D</code> <code>1AE64292DCD8D95E67832279DAD7588F</code> <code>2424567F6308E1045EFB035DC0847954</code><br> <code>37E66FD5</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>BF5FAE66</code> (1722703807 in decimal)</td>
|
||||
<td><code>8062AE66</code> (1722704512 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B5FFBF89C2AF616F9E5946CF8B1DC67A60F3431AF7D8960009E9F2AB7AAA49961
|
|||
<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 = 091BF72733ACD769D90FD22C62B0A5274BFE05C91163521A43FBB747F66D38768821629CD6800E0B74D56A4229E2E70F00ED12E5CB0FAE35376B4DDBE5D38143C655B466043980213992A3D2C8AE0810FC81E7AB80E6C13D1B02F5D2062030E0D67C9F165511805F8E5E9129EE08FD2D710E946473ECAF37CC9F372F1C649CE03DEFD2EDC79F146428D6C3F675A19C84229000EE666E634D778E915F2E2ADEFF3C194715BB530A1C2185AC5C431641E85F61CB85DC34AF92D3627663DC603EF5B02F6C4C1849842E68BE4F185E6FD47DB479261BD4DA3DA525B879C5D3A7B6293531F462AD19F386A42515621774EBCC8E329C185575005561D0B1DB924B6446</code></pre>
|
||||
<pre><code>b = C4714EF06165EC1263E7C02F5C98C59D8A79103CD5C51550948BEDAB3D9074250A6E98ECA699654BD702532013921FD6EB65F25974136BFEB07BACEA0F88464188E6B196EA97801C4D63CFE4DCEB4DC6F3CE59BFBAAED7CE525BDBEDAF35C6D81A5547C4D2D9C32568432C7B6868A2A09F1E97B99C515FB838ED92F980270DF0472854AB47040B426EC48E3D3EC6AAA560F9492385C1B0664258A3BEA1D2E96CCE930884E284494FDCB5A7C76A302D78AC0C92B161D07BA834504DFC112BC6E36E070AC1F6610B3E941433BE355CAEAEB68698921297C08EDCD49CC3008DBF577C4DAD15E08F55C761733ED555F586F1396D01A998138BC4A300F0655BA86F57</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 = 70F24CC44C13D7EB184E0459D1FE5FCCA24CFA9CAE9CCE27BA49A4FD01986BCD8C5C8ECBB51D68259267AC3AF181D5C6DD52ED8E88C6B2952851A33FB8A9BF6810EE664422D4B82FCB4B24B460A62BFB075A6A6D0A00083A28BABF071906BCD96418A68EB2983B946B552F0341C75A4179EE786DD05DD668928B73F906076BED2E94360A70599FDBA6C2FEC1D6616C869233C386B9C3F3E2977E7E9DD68B27A0FB054FD62AE69C68FD6FB00E0BA5EF4521107504FBCA20D69F65FEBD518993594841B8B83B3144B99D02BB9D5F30490C626AA3672DA54A9FF27FF213D042A280D3EAEB8388CAB7D88A422533BCB646C24CCF692F41B34680A642A16C9134887A</code></pre>
|
||||
<pre><code>g_b = A677087BC6E180E68FE728ED795EAB074FBB0210DDDBDA036D8EFAEEC03EEC96F7113A446B80B6AF0784198F47B7649B63B8D8C8DE35E8B51857F54D1207D267C55630F62208C0622611E393284743C6B1FEFACD3DE3E62E19F358F50AEFEC32EA1327A1095295FCA91F52F69C1D838CA857508B3CC86E252418282FD570A5F5D4BC02FE5498095B22799EEAD7ACA91AF495A3B2023D5C85B3A47F55720087582ED38EB99A2340B75F732B9E311E509D8E9DCE66A4AFF13F47BECD0A86342C76F45CC307BC33934942488D2ACAFC34DA13695503752634AE64D5693ED31EE5020376B36862A5CCA91CE1C871B03042D18FC93AC4352A810FA9F8317A1D968A90</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 FF BF 89 C2 AF 61 6F 9E 59 46 CF 8B
|
||||
0010 | 1D C6 7A 60 F3 43 1A F7 D8 96 00 09 E9 F2 AB 7A
|
||||
0020 | AA 49 96 19 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 70 F2 4C C4 4C 13 D7 EB 18 4E 04 59 D1 FE 5F CC
|
||||
0040 | A2 4C FA 9C AE 9C CE 27 BA 49 A4 FD 01 98 6B CD
|
||||
0050 | 8C 5C 8E CB B5 1D 68 25 92 67 AC 3A F1 81 D5 C6
|
||||
0060 | DD 52 ED 8E 88 C6 B2 95 28 51 A3 3F B8 A9 BF 68
|
||||
0070 | 10 EE 66 44 22 D4 B8 2F CB 4B 24 B4 60 A6 2B FB
|
||||
0080 | 07 5A 6A 6D 0A 00 08 3A 28 BA BF 07 19 06 BC D9
|
||||
0090 | 64 18 A6 8E B2 98 3B 94 6B 55 2F 03 41 C7 5A 41
|
||||
00A0 | 79 EE 78 6D D0 5D D6 68 92 8B 73 F9 06 07 6B ED
|
||||
00B0 | 2E 94 36 0A 70 59 9F DB A6 C2 FE C1 D6 61 6C 86
|
||||
00C0 | 92 33 C3 86 B9 C3 F3 E2 97 7E 7E 9D D6 8B 27 A0
|
||||
00D0 | FB 05 4F D6 2A E6 9C 68 FD 6F B0 0E 0B A5 EF 45
|
||||
00E0 | 21 10 75 04 FB CA 20 D6 9F 65 FE BD 51 89 93 59
|
||||
00F0 | 48 41 B8 B8 3B 31 44 B9 9D 02 BB 9D 5F 30 49 0C
|
||||
0100 | 62 6A A3 67 2D A5 4A 9F F2 7F F2 13 D0 42 A2 80
|
||||
0110 | D3 EA EB 83 88 CA B7 D8 8A 42 25 33 BC B6 46 C2
|
||||
0120 | 4C CF 69 2F 41 B3 46 80 A6 42 A1 6C 91 34 88 7A</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 9B 01 C4 BE E4 4F B3 88 B6 C0 29 C7
|
||||
0010 | 44 D2 86 0E 47 EE 45 59 FE 7A 60 1D 03 FA 6C A2
|
||||
0020 | 51 0F 2F 36 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | A6 77 08 7B C6 E1 80 E6 8F E7 28 ED 79 5E AB 07
|
||||
0040 | 4F BB 02 10 DD DB DA 03 6D 8E FA EE C0 3E EC 96
|
||||
0050 | F7 11 3A 44 6B 80 B6 AF 07 84 19 8F 47 B7 64 9B
|
||||
0060 | 63 B8 D8 C8 DE 35 E8 B5 18 57 F5 4D 12 07 D2 67
|
||||
0070 | C5 56 30 F6 22 08 C0 62 26 11 E3 93 28 47 43 C6
|
||||
0080 | B1 FE FA CD 3D E3 E6 2E 19 F3 58 F5 0A EF EC 32
|
||||
0090 | EA 13 27 A1 09 52 95 FC A9 1F 52 F6 9C 1D 83 8C
|
||||
00A0 | A8 57 50 8B 3C C8 6E 25 24 18 28 2F D5 70 A5 F5
|
||||
00B0 | D4 BC 02 FE 54 98 09 5B 22 79 9E EA D7 AC A9 1A
|
||||
00C0 | F4 95 A3 B2 02 3D 5C 85 B3 A4 7F 55 72 00 87 58
|
||||
00D0 | 2E D3 8E B9 9A 23 40 B7 5F 73 2B 9E 31 1E 50 9D
|
||||
00E0 | 8E 9D CE 66 A4 AF F1 3F 47 BE CD 0A 86 34 2C 76
|
||||
00F0 | F4 5C C3 07 BC 33 93 49 42 48 8D 2A CA FC 34 DA
|
||||
0100 | 13 69 55 03 75 26 34 AE 64 D5 69 3E D3 1E E5 02
|
||||
0110 | 03 76 B3 68 62 A5 CC A9 1C E1 C8 71 B0 30 42 D1
|
||||
0120 | 8F C9 3A C4 35 2A 81 0F A9 F8 31 7A 1D 96 8A 90</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 = BA0D89B5FFBF89C2AF616F9E5946CF8B1DC67A60F3431AF7D8960009E9F2AB7AAA49961
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>FFBF89C2AF616F9E5946CF8B1DC67A60</code></td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>F3431AF7D8960009E9F2AB7AAA499619</code></td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE00010070F24CC44C13D7EB184E0459</code> <code>D1FE5FCCA24CFA9CAE9CCE27BA49A4FD</code> <code>01986BCD8C5C8ECBB51D68259267AC3A</code> <code>F181D5C6DD52ED8E88C6B2952851A33F</code> <code>B8A9BF6810EE664422D4B82FCB4B24B4</code> <code>60A62BFB075A6A6D0A00083A28BABF07</code> <code>1906BCD96418A68EB2983B946B552F03</code> <code>41C75A4179EE786DD05DD668928B73F9</code> <code>06076BED2E94360A70599FDBA6C2FEC1</code> <code>D6616C869233C386B9C3F3E2977E7E9D</code> <code>D68B27A0FB054FD62AE69C68FD6FB00E</code> <code>0BA5EF4521107504FBCA20D69F65FEBD</code> <code>518993594841B8B83B3144B99D02BB9D</code> <code>5F30490C626AA3672DA54A9FF27FF213</code> <code>D042A280D3EAEB8388CAB7D88A422533</code> <code>BCB646C24CCF692F41B34680A642A16C</code><br> <code>9134887A</code></td>
|
||||
<td><code>FE000100A677087BC6E180E68FE728ED</code> <code>795EAB074FBB0210DDDBDA036D8EFAEE</code> <code>C03EEC96F7113A446B80B6AF0784198F</code> <code>47B7649B63B8D8C8DE35E8B51857F54D</code> <code>1207D267C55630F62208C0622611E393</code> <code>284743C6B1FEFACD3DE3E62E19F358F5</code> <code>0AEFEC32EA1327A1095295FCA91F52F6</code> <code>9C1D838CA857508B3CC86E252418282F</code> <code>D570A5F5D4BC02FE5498095B22799EEA</code> <code>D7ACA91AF495A3B2023D5C85B3A47F55</code> <code>720087582ED38EB99A2340B75F732B9E</code> <code>311E509D8E9DCE66A4AFF13F47BECD0A</code> <code>86342C76F45CC307BC33934942488D2A</code> <code>CAFC34DA13695503752634AE64D5693E</code> <code>D31EE5020376B36862A5CCA91CE1C871</code> <code>B03042D18FC93AC4352A810FA9F8317A</code><br> <code>1D968A90</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 = BA0D89B5FFBF89C2AF616F9E5946CF8B1DC67A60F3431AF7D8960009E9F2AB7AAA49961
|
|||
<!-- 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 = 54B64366FFBF89C2AF616F9E5946CF8B1DC67A60F3431AF7D8960009E9F2AB7AAA4996190000000000000000FE00010070F24CC44C13D7EB184E0459D1FE5FCCA24CFA9CAE9CCE27BA49A4FD01986BCD8C5C8ECBB51D68259267AC3AF181D5C6DD52ED8E88C6B2952851A33FB8A9BF6810EE664422D4B82FCB4B24B460A62BFB075A6A6D0A00083A28BABF071906BCD96418A68EB2983B946B552F0341C75A4179EE786DD05DD668928B73F906076BED2E94360A70599FDBA6C2FEC1D6616C869233C386B9C3F3E2977E7E9DD68B27A0FB054FD62AE69C68FD6FB00E0BA5EF4521107504FBCA20D69F65FEBD518993594841B8B83B3144B99D02BB9D5F30490C626AA3672DA54A9FF27FF213D042A280D3EAEB8388CAB7D88A422533BCB646C24CCF692F41B34680A642A16C9134887A
|
||||
padding = 33D6693D06443AA59C4211E3
|
||||
tmp_aes_key = B025233C2D0BE415F2D978000429D04908F4107759FED43ED2572C802894A431
|
||||
tmp_aes_iv = 857BAC258C90E735067828AB3249FF945DFAA7CF4E582BD785742656FC1BD488</code></pre>
|
||||
<pre><code>data = 54B643669B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F360000000000000000FE000100A677087BC6E180E68FE728ED795EAB074FBB0210DDDBDA036D8EFAEEC03EEC96F7113A446B80B6AF0784198F47B7649B63B8D8C8DE35E8B51857F54D1207D267C55630F62208C0622611E393284743C6B1FEFACD3DE3E62E19F358F50AEFEC32EA1327A1095295FCA91F52F69C1D838CA857508B3CC86E252418282FD570A5F5D4BC02FE5498095B22799EEAD7ACA91AF495A3B2023D5C85B3A47F55720087582ED38EB99A2340B75F732B9E311E509D8E9DCE66A4AFF13F47BECD0A86342C76F45CC307BC33934942488D2ACAFC34DA13695503752634AE64D5693ED31EE5020376B36862A5CCA91CE1C871B03042D18FC93AC4352A810FA9F8317A1D968A90
|
||||
padding = A151B081366094066064BE85
|
||||
tmp_aes_key = E5D04D3D974072B1E3BBE0A64AF5226F1B4AC9E12E3E1E1EF6BFB38312175BD8
|
||||
tmp_aes_iv = B6A314D270A63B8FB6AAE4839FD6FA2B964B9D05ED1593039031F1C9D2F819F2</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 = EB96A87DE7B9691D064FB262D606C3A2659ACEB875F559AA887202F6E76B20D3280A532034D341AF4B14A93272725C16C40A7C62CA59A54476D0654ADFA2BD50411E8E4A0C8AE5BD9E3A0B03943FF3E3654F81ED12BCFF434369D795E668929D6040AF67BBBFBAF9D2AF4ABD987ED10B60091392502534051095D613AF3A4A821AF4AFB7CDE91E4CB082F520E178195AF43E2FDD55E05369C13ADC797018351B45280B9CAA960A28B572587761D0A70E66CEB1F61D2F8550BB64798060B45823988E5CD52EFC8BF01E342FD5F0509AB3E97D3CF5FEA08A8A4A74B5BE9DD94C08FAB59E311D5C80700486C9B2623530D94D67A81EFEEEC8E0EC48B31F8B6C97D2D3EF375F7752ACE2E7C1CBD9B3DF1F52FC94AECEE66CF15812D4E2D134F3083A35785FA15CFE0D83F602E837EBE44C6980A6122B62B552EE981AC7EFD708A2E5AC74B087717B1079CFCBE1273AC18EA1</code></pre>
|
||||
<pre><code>encrypted_data = C5A7061B4C92136CEF1CC3844E817A5AD33F20E7008B7971C674ED4A43782651DF651C4FD952D563E35B68BE227BE66C857D877D2B4CF5D0DEA3EB16DB02CB6AF0125F531B43E738C9E6F2F2FFE4FC49D3550D75E4B98AD16CD59CAF1D353EBB9A854F0E6E342EC1517B1B74C6D4BC89525BAAB0C199F2BAB1DD82569F629B396D4027526BDB3E2B17DDA4FAA1FE3F9FE144DAE8ABDD5B1A3677486FEF248ABBD242AD99E856EAF670A819956AA23BF00AA04F41138AB3F9B11EF1F4CA778D3360247189559CE662AD3A3B523A082C22340B0BC98F5E8D367B062EDA3EA38B40D87F8B1C454C9F2AC761925E2FF27D366E2FB47554732635804E595234ED81ED891E4B50E99DEDBC431ED1EC4E9E0DD02E5E5208EB6C3F6288354F861A32489582C006FB3BBB354707E0DAB0063BDCAE95038000E1FAF0271EDF1C77A9B69B7EE2A42E8DF31158BF66D504DB35098F7D</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 30 A2 0D 00 BF 5F AE 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 FF BF 89 C2 AF 61 6F 9E
|
||||
0020 | 59 46 CF 8B 1D C6 7A 60 F3 43 1A F7 D8 96 00 09
|
||||
0030 | E9 F2 AB 7A AA 49 96 19 FE 50 01 00 EB 96 A8 7D
|
||||
0040 | E7 B9 69 1D 06 4F B2 62 D6 06 C3 A2 65 9A CE B8
|
||||
0050 | 75 F5 59 AA 88 72 02 F6 E7 6B 20 D3 28 0A 53 20
|
||||
0060 | 34 D3 41 AF 4B 14 A9 32 72 72 5C 16 C4 0A 7C 62
|
||||
0070 | CA 59 A5 44 76 D0 65 4A DF A2 BD 50 41 1E 8E 4A
|
||||
0080 | 0C 8A E5 BD 9E 3A 0B 03 94 3F F3 E3 65 4F 81 ED
|
||||
0090 | 12 BC FF 43 43 69 D7 95 E6 68 92 9D 60 40 AF 67
|
||||
00A0 | BB BF BA F9 D2 AF 4A BD 98 7E D1 0B 60 09 13 92
|
||||
00B0 | 50 25 34 05 10 95 D6 13 AF 3A 4A 82 1A F4 AF B7
|
||||
00C0 | CD E9 1E 4C B0 82 F5 20 E1 78 19 5A F4 3E 2F DD
|
||||
00D0 | 55 E0 53 69 C1 3A DC 79 70 18 35 1B 45 28 0B 9C
|
||||
00E0 | AA 96 0A 28 B5 72 58 77 61 D0 A7 0E 66 CE B1 F6
|
||||
00F0 | 1D 2F 85 50 BB 64 79 80 60 B4 58 23 98 8E 5C D5
|
||||
0100 | 2E FC 8B F0 1E 34 2F D5 F0 50 9A B3 E9 7D 3C F5
|
||||
0110 | FE A0 8A 8A 4A 74 B5 BE 9D D9 4C 08 FA B5 9E 31
|
||||
0120 | 1D 5C 80 70 04 86 C9 B2 62 35 30 D9 4D 67 A8 1E
|
||||
0130 | FE EE C8 E0 EC 48 B3 1F 8B 6C 97 D2 D3 EF 37 5F
|
||||
0140 | 77 52 AC E2 E7 C1 CB D9 B3 DF 1F 52 FC 94 AE CE
|
||||
0150 | E6 6C F1 58 12 D4 E2 D1 34 F3 08 3A 35 78 5F A1
|
||||
0160 | 5C FE 0D 83 F6 02 E8 37 EB E4 4C 69 80 A6 12 2B
|
||||
0170 | 62 B5 52 EE 98 1A C7 EF D7 08 A2 E5 AC 74 B0 87
|
||||
0180 | 71 7B 10 79 CF CB E1 27 3A C1 8E A1</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 F8 54 06 00 80 62 AE 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 9B 01 C4 BE E4 4F B3 88
|
||||
0020 | B6 C0 29 C7 44 D2 86 0E 47 EE 45 59 FE 7A 60 1D
|
||||
0030 | 03 FA 6C A2 51 0F 2F 36 FE 50 01 00 C5 A7 06 1B
|
||||
0040 | 4C 92 13 6C EF 1C C3 84 4E 81 7A 5A D3 3F 20 E7
|
||||
0050 | 00 8B 79 71 C6 74 ED 4A 43 78 26 51 DF 65 1C 4F
|
||||
0060 | D9 52 D5 63 E3 5B 68 BE 22 7B E6 6C 85 7D 87 7D
|
||||
0070 | 2B 4C F5 D0 DE A3 EB 16 DB 02 CB 6A F0 12 5F 53
|
||||
0080 | 1B 43 E7 38 C9 E6 F2 F2 FF E4 FC 49 D3 55 0D 75
|
||||
0090 | E4 B9 8A D1 6C D5 9C AF 1D 35 3E BB 9A 85 4F 0E
|
||||
00A0 | 6E 34 2E C1 51 7B 1B 74 C6 D4 BC 89 52 5B AA B0
|
||||
00B0 | C1 99 F2 BA B1 DD 82 56 9F 62 9B 39 6D 40 27 52
|
||||
00C0 | 6B DB 3E 2B 17 DD A4 FA A1 FE 3F 9F E1 44 DA E8
|
||||
00D0 | AB DD 5B 1A 36 77 48 6F EF 24 8A BB D2 42 AD 99
|
||||
00E0 | E8 56 EA F6 70 A8 19 95 6A A2 3B F0 0A A0 4F 41
|
||||
00F0 | 13 8A B3 F9 B1 1E F1 F4 CA 77 8D 33 60 24 71 89
|
||||
0100 | 55 9C E6 62 AD 3A 3B 52 3A 08 2C 22 34 0B 0B C9
|
||||
0110 | 8F 5E 8D 36 7B 06 2E DA 3E A3 8B 40 D8 7F 8B 1C
|
||||
0120 | 45 4C 9F 2A C7 61 92 5E 2F F2 7D 36 6E 2F B4 75
|
||||
0130 | 54 73 26 35 80 4E 59 52 34 ED 81 ED 89 1E 4B 50
|
||||
0140 | E9 9D ED BC 43 1E D1 EC 4E 9E 0D D0 2E 5E 52 08
|
||||
0150 | EB 6C 3F 62 88 35 4F 86 1A 32 48 95 82 C0 06 FB
|
||||
0160 | 3B BB 35 47 07 E0 DA B0 06 3B DC AE 95 03 80 00
|
||||
0170 | E1 FA F0 27 1E DF 1C 77 A9 B6 9B 7E E2 A4 2E 8D
|
||||
0180 | F3 11 58 BF 66 D5 04 DB 35 09 8F 7D</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>30A20D00BF5FAE66</code></td>
|
||||
<td><code>F85406008062AE66</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>FFBF89C2AF616F9E5946CF8B1DC67A60</code></td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>F3431AF7D8960009E9F2AB7AAA499619</code></td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE500100EB96A87DE7B9691D064FB262</code> <code>D606C3A2659ACEB875F559AA887202F6</code> <code>E76B20D3280A532034D341AF4B14A932</code> <code>72725C16C40A7C62CA59A54476D0654A</code> <code>DFA2BD50411E8E4A0C8AE5BD9E3A0B03</code> <code>943FF3E3654F81ED12BCFF434369D795</code> <code>E668929D6040AF67BBBFBAF9D2AF4ABD</code> <code>987ED10B60091392502534051095D613</code> <code>AF3A4A821AF4AFB7CDE91E4CB082F520</code> <code>E178195AF43E2FDD55E05369C13ADC79</code> <code>7018351B45280B9CAA960A28B5725877</code> <code>61D0A70E66CEB1F61D2F8550BB647980</code> <code>60B45823988E5CD52EFC8BF01E342FD5</code> <code>F0509AB3E97D3CF5FEA08A8A4A74B5BE</code> <code>9DD94C08FAB59E311D5C80700486C9B2</code> <code>623530D94D67A81EFEEEC8E0EC48B31F</code> <code>8B6C97D2D3EF375F7752ACE2E7C1CBD9</code> <code>B3DF1F52FC94AECEE66CF15812D4E2D1</code> <code>34F3083A35785FA15CFE0D83F602E837</code> <code>EBE44C6980A6122B62B552EE981AC7EF</code> <code>D708A2E5AC74B087717B1079CFCBE127</code><br> <code>3AC18EA1</code></td>
|
||||
<td><code>FE500100C5A7061B4C92136CEF1CC384</code> <code>4E817A5AD33F20E7008B7971C674ED4A</code> <code>43782651DF651C4FD952D563E35B68BE</code> <code>227BE66C857D877D2B4CF5D0DEA3EB16</code> <code>DB02CB6AF0125F531B43E738C9E6F2F2</code> <code>FFE4FC49D3550D75E4B98AD16CD59CAF</code> <code>1D353EBB9A854F0E6E342EC1517B1B74</code> <code>C6D4BC89525BAAB0C199F2BAB1DD8256</code> <code>9F629B396D4027526BDB3E2B17DDA4FA</code> <code>A1FE3F9FE144DAE8ABDD5B1A3677486F</code> <code>EF248ABBD242AD99E856EAF670A81995</code> <code>6AA23BF00AA04F41138AB3F9B11EF1F4</code> <code>CA778D3360247189559CE662AD3A3B52</code> <code>3A082C22340B0BC98F5E8D367B062EDA</code> <code>3EA38B40D87F8B1C454C9F2AC761925E</code> <code>2FF27D366E2FB47554732635804E5952</code> <code>34ED81ED891E4B50E99DEDBC431ED1EC</code> <code>4E9E0DD02E5E5208EB6C3F6288354F86</code> <code>1A32489582C006FB3BBB354707E0DAB0</code> <code>063BDCAE95038000E1FAF0271EDF1C77</code> <code>A9B69B7EE2A42E8DF31158BF66D504DB</code><br> <code>35098F7D</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 = 9ECD53C772EF30454E5F0E591AB8A9CBA5543176A4A1993F9F17D23AFC6D75317AEDA29D9AFD3B6A8DBAEE205E370D892533B11601DC581F52CA51CBCE8AB8C40938A68715F3857AE36F5C82870A5025C6835804E7AC75B6F173EB9DBA9DB115439C7101B563725F7EE6DE19A9977C22DC193DE6E8FB98B1AD392FCD4547A077F74ED6D50233154A2141762FC263CA1BA01A9C5F7D224D140CCF35AF78DA44D7951A73B58110E0735A7A2230AB9A4599B2A693BFAAD55FC428EBF9BC282B99025DCD1F5D95DE69FF35DAC5E111B8852868D6E4193E733699D476434C6556B9826D0E286FAF308792CE9125D6118B614EDE9365F7BB2128C98E1C89571F8CF736</code></pre>
|
||||
<pre><code>auth_key = 3CA723940E9A49A23BCEAC8653F26A5886C7354691968120A8276301082956DE8601423EFDDA879ACDC32A0D867C914207B786C0E71C6FD24519A6D4C6430C747A5F913EEEE867EC2B30C7A11B12CDF7186DD238917D5F062BA43A45944A9FA34585C38B3EEDB8DE48672DCCCF5F43CDF8D541EF34575454CA71FE75C3F14B95A324C03837E758EE4E2C11E33EAA256CD5F81D5427032F3A1904D73D42639917F702BC8806913E90C779F8937562D1B860AEC06F0019664FBB5A4678A088075B4048AB787B666BCB7866B954C1169DB596BFBE5C1B2BAB4E04B5FBC2E2B9DEA5D8700EBF55DDD3F2B8EE309DD7D9F88F97E837FE5CAF3DC1AD00FAB1D99B2FC2</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 AC 23 29 C0 5F AE 66
|
||||
0010 | 8C 00 00 00 34 F7 CB 3B FF BF 89 C2 AF 61 6F 9E
|
||||
0020 | 59 46 CF 8B 1D C6 7A 60 F3 43 1A F7 D8 96 00 09
|
||||
0030 | E9 F2 AB 7A AA 49 96 19 49 74 0A 0F B8 56 B1 3F
|
||||
0040 | 16 95 62 66 95 06 35 B1</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 6C 89 DD 80 62 AE 66
|
||||
0010 | 74 00 00 00 34 F7 CB 3B 9B 01 C4 BE E4 4F B3 88
|
||||
0020 | B6 C0 29 C7 44 D2 86 0E 47 EE 45 59 FE 7A 60 1D
|
||||
0030 | 03 FA 6C A2 51 0F 2F 36 74 5B 1F 2A 70 86 15 F6
|
||||
0040 | E1 F1 7A 92 AA D7 BF FE</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>01AC2329C05FAE66</code></td>
|
||||
<td><code>016C89DD8062AE66</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>8C000000</code> (140 in decimal)</td>
|
||||
<td><code>74000000</code> (116 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FFBF89C2AF616F9E5946CF8B1DC67A60</code></td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>F3431AF7D8960009E9F2AB7AAA499619</code></td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>49740A0FB856B13F16956266950635B1</code></td>
|
||||
<td><code>745B1F2A708615F6E1F17A92AAD7BFFE</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>
|
||||
|
|
|
@ -88,11 +88,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/inputStorePaymentStarsTopup">inputStorePaymentStarsTopup</a></td>
|
||||
<td> </td>
|
||||
<td>Used to top up the <a href="/api/stars">Telegram Stars balance</a> using the Play Store/App Store flow (official apps only).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/inputStorePaymentStarsGift">inputStorePaymentStarsGift</a></td>
|
||||
<td> </td>
|
||||
<td>Used to top up the <a href="/api/stars">Telegram Stars</a> balance of a friend using the Play Store/App Store flow (official apps only).</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
|
Loading…
Reference in a new issue