mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-05 18:38:19 +01:00
Update content of files
This commit is contained in:
parent
fadde3e881
commit
d527afd092
7 changed files with 248 additions and 270 deletions
|
@ -119,6 +119,8 @@ To return all <a href="/constructor/starsTransaction">star transactions »</a> (
|
|||
<li>Payment via <a href="https://fragment.com">Fragment</a>, which also allows making larger purchases.</li>
|
||||
<li>The store-based subscription flow based on <a href="/method/payments.assignAppStoreTransaction">payments.assignAppStoreTransaction</a>/<a href="/method/payments.assignPlayMarketTransaction">payments.assignPlayMarketTransaction</a>, currently not available to third-party apps. </li>
|
||||
</ul>
|
||||
<p>For gifts, once the payment is successfully processed, the user to which the gift was sent will automatically receive a <a href="/constructor/messageService">messageService</a> from the user that sent the gift, containing a <a href="/constructor/messageActionGiftStars">messageActionGiftStars</a> constructor with further info about the price and duration of the gifted Telegram Stars.<br>
|
||||
Clients should display this message, along with a sticker from the <a href="/constructor/inputStickerSetPremiumGifts">inputStickerSetPremiumGifts</a> <a href="/api/stickers">stickerset</a>: here's an <a href="https://telegram.org/blog/w3-browser-mini-app-store#gifting-stars-to-friends">example</a>. </p>
|
||||
<h3><a class="anchor" href="#using-stars" id="using-stars" name="using-stars"><i class="anchor-icon"></i></a>Using stars</h3>
|
||||
<pre><code><a href='/constructor/payments.paymentFormStars'>payments.paymentFormStars</a>#7bf6b15c flags:<a href='/type/%23'>#</a> form_id:<a href='/type/long'>long</a> bot_id:<a href='/type/long'>long</a> title:<a href='/type/string'>string</a> description:<a href='/type/string'>string</a> photo:flags.5?<a href='/type/WebDocument'>WebDocument</a> invoice:<a href='/type/Invoice'>Invoice</a> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/payments.PaymentForm'>payments.PaymentForm</a>;
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>inputInvoiceStars</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Used to top up the current account's Telegram Stars balance.">
|
||||
<meta property="description" content="Used to top up the Telegram Stars balance of the current account or someone else's account.">
|
||||
<meta property="og:title" content="inputInvoiceStars">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Used to top up the current account's Telegram Stars balance.">
|
||||
<meta property="og:description" content="Used to top up the Telegram Stars balance of the current account or someone else's account.">
|
||||
<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,6 +76,10 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/InputInvoice">InputInvoice</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="#inputstorepaymentstarstopup" id="inputstorepaymentstarstopup" name="inputstorepaymentstarstopup"><i class="anchor-icon"></i></a><a href="/constructor/inputStorePaymentStarsTopup">inputStorePaymentStarsTopup</a></h4>
|
||||
<p>Used to top up the <a href="/api/stars">Telegram Stars balance</a> of the current account.</p>
|
||||
<h4><a class="anchor" href="#inputstorepaymentstarsgift" id="inputstorepaymentstarsgift" name="inputstorepaymentstarsgift"><i class="anchor-icon"></i></a><a href="/constructor/inputStorePaymentStarsGift">inputStorePaymentStarsGift</a></h4>
|
||||
<p>Used to gift <a href="/api/stars">Telegram Stars</a> to a friend.</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>
|
||||
|
||||
|
|
|
@ -4,40 +4,24 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messageActionGiftStars</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Parameters
|
||||
<meta property="description" content="You gifted or were gifted some Telegram Stars.
|
||||
Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
flags
|
||||
#
|
||||
Flags, see TL conditional fields
|
||||
currency
|
||||
string
|
||||
|
||||
amount
|
||||
long
|
||||
|
||||
stars
|
||||
long
|
||||
…">
|
||||
Flags, see TL conditional fields…">
|
||||
<meta property="og:title" content="messageActionGiftStars">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Parameters
|
||||
<meta property="og:description" content="You gifted or were gifted some Telegram Stars.
|
||||
Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
flags
|
||||
#
|
||||
Flags, see TL conditional fields
|
||||
currency
|
||||
string
|
||||
|
||||
amount
|
||||
long
|
||||
|
||||
stars
|
||||
long
|
||||
…">
|
||||
Flags, see TL conditional fields…">
|
||||
<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">
|
||||
|
@ -72,7 +56,8 @@ long
|
|||
<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/messageActionGiftStars" >messageActionGiftStars</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messageActionGiftStars</h1>
|
||||
|
||||
<div id="dev_page_content"><p><div class="clearfix">
|
||||
<div id="dev_page_content"><p>You gifted or were gifted some <a href="/api/stars">Telegram Stars</a>. </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>
|
||||
|
@ -103,32 +88,32 @@ long
|
|||
<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>Price of the gift 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>
|
||||
<tr>
|
||||
<td><strong>stars</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td> </td>
|
||||
<td>Amount of gifted stars</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>crypto_currency</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>If the gift was bought using a cryptocurrency, the cryptocurrency name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>crypto_amount</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/long">long</a></td>
|
||||
<td> </td>
|
||||
<td>If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>transaction_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/string">string</a></td>
|
||||
<td> </td>
|
||||
<td>Identifier of the transaction, only visible to the receiver of the gift.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
<meta charset="utf-8">
|
||||
<title>payments.getStarsRevenueStats</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Parameters
|
||||
<meta property="description" content="Get Telegram Star revenue statistics ».
|
||||
Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
|
@ -12,16 +13,11 @@ flags
|
|||
#
|
||||
Flags, see TL conditional fields
|
||||
dark
|
||||
flags.0?true
|
||||
|
||||
peer
|
||||
InputPeer
|
||||
|
||||
Result
|
||||
…">
|
||||
flags.0?true…">
|
||||
<meta property="og:title" content="payments.getStarsRevenueStats">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Parameters
|
||||
<meta property="og:description" content="Get Telegram Star revenue statistics ».
|
||||
Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
|
@ -29,13 +25,7 @@ flags
|
|||
#
|
||||
Flags, see TL conditional fields
|
||||
dark
|
||||
flags.0?true
|
||||
|
||||
peer
|
||||
InputPeer
|
||||
|
||||
Result
|
||||
…">
|
||||
flags.0?true…">
|
||||
<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 +60,8 @@ Result
|
|||
<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/payments.getStarsRevenueStats" >payments.getStarsRevenueStats</a></li></ul></div>
|
||||
<h1 id="dev_page_title">payments.getStarsRevenueStats</h1>
|
||||
|
||||
<div id="dev_page_content"><p><div class="clearfix">
|
||||
<div id="dev_page_content"><p>Get <a href="/api/stars">Telegram Star revenue statistics »</a>.</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>
|
||||
|
@ -103,12 +94,12 @@ Result
|
|||
<tr>
|
||||
<td><strong>dark</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
|
||||
<td> </td>
|
||||
<td>Whether to enable dark theme for graph colors</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td> </td>
|
||||
<td>Get statistics for the specified bot, channel or ourselves (<a href="/constructor/inputPeerSelf">inputPeerSelf</a>).</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 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>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 7C 81 07 00 81 68 AE 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 81 BA A8 90 1B 79 63 A6
|
||||
0020 | 9A 8E 8B EB C1 05 93 FD</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>2CE507007F62AE66</code></td>
|
||||
<td><code>7C8107008168AE66</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>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td><code>81BAA8901B7963A69A8E8BEBC10593FD</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 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
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 B4 68 3C 81 68 AE 66
|
||||
0010 | B4 00 00 00 63 24 16 05 81 BA A8 90 1B 79 63 A6
|
||||
0020 | 9A 8E 8B EB C1 05 93 FD 9C FC EE B6 10 AF F6 64
|
||||
0030 | 73 95 1E A6 F9 78 4C F9 08 31 12 2C 48 EB 28 59
|
||||
0040 | 5B 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>01ECA45E7F62AE66</code></td>
|
||||
<td><code>01B4683C8168AE66</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>B4000000</code> (180 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td><code>81BAA8901B7963A69A8E8BEBC10593FD</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td><code>9CFCEEB610AFF66473951EA6F9784CF9</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>081644F7E56E72C8BF000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1604679932023326911</td>
|
||||
<td><code>0831122C48EB28595B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 3535937349133818203</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 = 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>
|
||||
<pre><code>pq = 3535937349133818203</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>3535937349133818203 = 1822522799 * 1940133397</code></p>
|
||||
<pre><code>p = 1822522799
|
||||
q = 1940133397</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 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
|
||||
<pre><code>0000 | 95 5F F5 A9 08 31 12 2C 48 EB 28 59 5B 00 00 00
|
||||
0010 | 04 6C A1 7D AF 00 00 00 04 73 A4 16 15 00 00 00
|
||||
0020 | 81 BA A8 90 1B 79 63 A6 9A 8E 8B EB C1 05 93 FD
|
||||
0030 | 9C FC EE B6 10 AF F6 64 73 95 1E A6 F9 78 4C F9
|
||||
0040 | 47 00 1B 49 AE 5F 60 08 7D 38 1B 0E 1D F9 D1 8B
|
||||
0050 | 0B DF 52 4F E3 50 AC ED E5 A8 A4 AB 80 CC 56 35
|
||||
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 = 1279500721</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>081644F7E56E72C8BF000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1604679932023326911</td>
|
||||
<td><code>0831122C48EB28595B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 3535937349133818203</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>044AC0BD6F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1254145391</td>
|
||||
<td><code>046CA17DAF000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1822522799</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>044C43A1B1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1279500721</td>
|
||||
<td><code>0473A41615000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1940133397</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>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td><code>81BAA8901B7963A69A8E8BEBC10593FD</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td><code>9CFCEEB610AFF66473951EA6F9784CF9</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>D2F819F24D663253B8E9361AF1B01113</code> <code>D622ACB9964439890D308C5CC51124E7</code></td>
|
||||
<td><code>47001B49AE5F60087D381B0E1DF9D18B</code> <code>0BDF524FE350ACEDE5A8A4AB80CC5635</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1279500721</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 = 955FF5A9081644F7E56E72C8BF000000044AC0BD6F000000044C43A1B10000009B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F36D2F819F24D663253B8E9361AF1B01113D622ACB9964439890D308C5CC51124E702000000
|
||||
random_padding_bytes = B21DADEA02D355477CB91F6AEBFF1AC70CB3ABFC5ABC13F86F27C9F61F620D9C27FDF00D8D09BDCD01D4F97A0AB04B73AFB0297F2453FEE3023C5B4D9DF76E6C2F3BEAC47E5F61D8DCEDF4F3C48C8B939884EDB6BA8B647AA9843BA4</code></pre>
|
||||
<pre><code>data = 955FF5A90831122C48EB28595B000000046CA17DAF0000000473A4161500000081BAA8901B7963A69A8E8BEBC10593FD9CFCEEB610AFF66473951EA6F9784CF947001B49AE5F60087D381B0E1DF9D18B0BDF524FE350ACEDE5A8A4AB80CC563502000000
|
||||
random_padding_bytes = 660A1A1E5EB46A6BC07D20589613E340859CDAA8CBD8091F74F11A4DF4B99F245CE6D93A067FDC8D08F3D88E3A80B1DC1FCB1B477272E0756781F371AA0427DB84E901A3820EE1737FC55C10AAF1C03B32B1EDCC026C76C8BB0C7B46</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 = 5BC2201B2F24B780A8A199A9DF143925A946046CCCAF0A8F3127C46205C0DD3A9C84B987C337A29F10C89500A7C21347F48706A90C7392FFD6977DB7DC8934B942FFBFF647F0E9F5DCE5B78B0BA833724233B15C638106818D240887FE806836B0A863D4F77B7956D41C2CCA521341DA7CF52D8BB7EA2D4860DBB110E61627C8A660861F71150B22C533791797551D2AC4E5B28C924231CF008DDC318100521CDFE523B9BE204ECA3F5196AC0E173D25F7552CFCCD261E94565C590A0D12609E0F187DBD0B4A71817EB003EEC945E85BA480B0FEAEA96F70C464E44DC87BAA1B24193C65CB6EB609E1858578807E4B187DFEF7702F6BE62CEB3ECC9DFEB4D7CE</code></pre>
|
||||
<pre><code>encrypted_data = B4AE43924D0F4888D78999BE94242A19FB0823A18FE8A5A05B682ECA77FD6FB02100059ECB4C1C25C599318929A2749DDD53EED08A219587BEDEC54495ECE760698E11D221531E2F47E9940C9EDBF428948386C46A38EE64658082795C415F3D9767C4E6F6413DDD8F783F6C3CDFFAEA5AA68CF397F5CF6D1A1BC0DBAA060FA69600C153FFD933D69156BB74175272E78A8E6127B6C584813D7F2712E92B2AE9F4268122CDE8193F42F21D40B505572870B49F78FC08750D6F66D144B0C7CC63666BD51FFAC64988DC0DEE280247F26965F893BCD3C75108DC94C7E0C1BA39A83CC79F02CFBB6AFE9E3C4159DC8173084E9AAA2B122819C0AAD95EB0DD5DCC65</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 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>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 04 95 09 00 81 68 AE 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 81 BA A8 90 1B 79 63 A6
|
||||
0020 | 9A 8E 8B EB C1 05 93 FD 9C FC EE B6 10 AF F6 64
|
||||
0030 | 73 95 1E A6 F9 78 4C F9 04 6C A1 7D AF 00 00 00
|
||||
0040 | 04 73 A4 16 15 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 B4 AE 43 92 4D 0F 48 88 D7 89 99 BE
|
||||
0060 | 94 24 2A 19 FB 08 23 A1 8F E8 A5 A0 5B 68 2E CA
|
||||
0070 | 77 FD 6F B0 21 00 05 9E CB 4C 1C 25 C5 99 31 89
|
||||
0080 | 29 A2 74 9D DD 53 EE D0 8A 21 95 87 BE DE C5 44
|
||||
0090 | 95 EC E7 60 69 8E 11 D2 21 53 1E 2F 47 E9 94 0C
|
||||
00A0 | 9E DB F4 28 94 83 86 C4 6A 38 EE 64 65 80 82 79
|
||||
00B0 | 5C 41 5F 3D 97 67 C4 E6 F6 41 3D DD 8F 78 3F 6C
|
||||
00C0 | 3C DF FA EA 5A A6 8C F3 97 F5 CF 6D 1A 1B C0 DB
|
||||
00D0 | AA 06 0F A6 96 00 C1 53 FF D9 33 D6 91 56 BB 74
|
||||
00E0 | 17 52 72 E7 8A 8E 61 27 B6 C5 84 81 3D 7F 27 12
|
||||
00F0 | E9 2B 2A E9 F4 26 81 22 CD E8 19 3F 42 F2 1D 40
|
||||
0100 | B5 05 57 28 70 B4 9F 78 FC 08 75 0D 6F 66 D1 44
|
||||
0110 | B0 C7 CC 63 66 6B D5 1F FA C6 49 88 DC 0D EE 28
|
||||
0120 | 02 47 F2 69 65 F8 93 BC D3 C7 51 08 DC 94 C7 E0
|
||||
0130 | C1 BA 39 A8 3C C7 9F 02 CF BB 6A FE 9E 3C 41 59
|
||||
0140 | DC 81 73 08 4E 9A AA 2B 12 28 19 C0 AA D9 5E B0
|
||||
0150 | DD 5D CC 65</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 = B21DADEA02D355477CB91F6AEBFF1AC70CB3ABFC5ABC13F86F27C9F61
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>4C850E007F62AE66</code></td>
|
||||
<td><code>049509008168AE66</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 = B21DADEA02D355477CB91F6AEBFF1AC70CB3ABFC5ABC13F86F27C9F61
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td><code>81BAA8901B7963A69A8E8BEBC10593FD</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td><code>9CFCEEB610AFF66473951EA6F9784CF9</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>044AC0BD6F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1254145391</td>
|
||||
<td><code>046CA17DAF000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1822522799</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>044C43A1B1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1279500721</td>
|
||||
<td><code>0473A41615000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1940133397</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 = B21DADEA02D355477CB91F6AEBFF1AC70CB3ABFC5ABC13F86F27C9F61
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</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><code>FE000100B4AE43924D0F4888D78999BE</code> <code>94242A19FB0823A18FE8A5A05B682ECA</code> <code>77FD6FB02100059ECB4C1C25C5993189</code> <code>29A2749DDD53EED08A219587BEDEC544</code> <code>95ECE760698E11D221531E2F47E9940C</code> <code>9EDBF428948386C46A38EE6465808279</code> <code>5C415F3D9767C4E6F6413DDD8F783F6C</code> <code>3CDFFAEA5AA68CF397F5CF6D1A1BC0DB</code> <code>AA060FA69600C153FFD933D69156BB74</code> <code>175272E78A8E6127B6C584813D7F2712</code> <code>E92B2AE9F4268122CDE8193F42F21D40</code> <code>B505572870B49F78FC08750D6F66D144</code> <code>B0C7CC63666BD51FFAC64988DC0DEE28</code> <code>0247F26965F893BCD3C75108DC94C7E0</code> <code>C1BA39A83CC79F02CFBB6AFE9E3C4159</code> <code>DC8173084E9AAA2B122819C0AAD95EB0</code><br> <code>DD5DCC65</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = B21DADEA02D355477CB91F6AEBFF1AC70CB3ABFC5ABC13F86F27C9F61
|
|||
<h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5>
|
||||
<!-- start server_DH_params_ok -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 6C 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>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 A4 1A 05 82 68 AE 66
|
||||
0010 | B8 02 00 00 5C 07 E8 D0 81 BA A8 90 1B 79 63 A6
|
||||
0020 | 9A 8E 8B EB C1 05 93 FD 9C FC EE B6 10 AF F6 64
|
||||
0030 | 73 95 1E A6 F9 78 4C F9 FE 50 02 00 52 91 D8 15
|
||||
0040 | 21 26 DA FF 92 59 DC F2 BD 3F 8B CC 2C 6B CB 61
|
||||
0050 | 25 84 E5 C7 3C B8 3E 9E 7C 8C BA 88 6A F4 F0 EA
|
||||
0060 | 93 81 B3 6C C5 5C 7A 31 37 F2 C6 D1 74 48 1B CB
|
||||
0070 | EC E9 3C 7A DE 99 52 D4 FB 4E 44 15 11 A6 8B DE
|
||||
0080 | B2 C5 B6 E6 37 C3 72 CF CC 2C 94 B8 41 44 A4 88
|
||||
0090 | 20 BD E4 3D 57 C8 FC 9C 97 B6 D3 5B 6F 53 48 A1
|
||||
00A0 | 18 06 9C 09 95 CB 86 B4 EF 48 C4 11 F3 7C 69 46
|
||||
00B0 | 47 DB 10 9D B5 1C FF 21 F4 E2 C8 75 79 1C 48 FF
|
||||
00C0 | 45 1D 5E 2D 1F 19 F9 A0 94 DE 35 CC EE 5C B7 51
|
||||
00D0 | 33 83 58 92 D9 86 DD C5 D6 53 3A 34 BE 70 E1 28
|
||||
00E0 | 16 7A E1 28 ED 47 C0 30 21 5D 73 7D C8 50 37 85
|
||||
00F0 | 6B AE 74 00 9D C6 03 09 CC 74 A3 94 8E 28 8C E5
|
||||
0100 | 2D 3D 20 C9 C8 C7 69 4B AE 9D DB 65 78 6A 07 FB
|
||||
0110 | 31 CA 32 A1 6A 17 1D 6F B2 C3 4D BF FA DD DC 54
|
||||
0120 | 8F E2 91 D7 43 B1 24 2E E6 69 DB 71 BA 2A 5A 54
|
||||
0130 | 7B 72 9B 9C 4C 48 63 55 FC CB FB D3 61 C4 DF 54
|
||||
0140 | AA E8 EA 9F 57 A5 09 77 E4 18 39 92 49 56 30 C4
|
||||
0150 | D6 2D CE B9 80 5A 70 D2 64 FD D4 E5 35 3A AC C3
|
||||
0160 | 02 36 03 65 40 95 1C 34 72 87 DC 7C B2 A8 EE 8F
|
||||
0170 | 27 8E 03 08 18 37 4B 79 EF 71 42 11 F9 3B BF 36
|
||||
0180 | 67 ED 7D 44 38 42 2B 83 66 8E 6B CB 79 19 8D C5
|
||||
0190 | 66 62 AA C4 17 CC 3F E6 00 5D 4E C2 4C 9C E5 2F
|
||||
01A0 | 71 7E E0 EB 2F C6 21 62 ED 1E 6A C4 85 F1 EC 98
|
||||
01B0 | BF 76 83 28 C4 55 3B DD 67 17 2D 9B 14 EB 7B 48
|
||||
01C0 | 9A 8D EF 7A 2F DB 84 D2 FA B4 0D 61 5C 32 06 4F
|
||||
01D0 | E5 9A B4 FD 0B 4D 2F 5A B7 1C 1F BE 91 FC 19 78
|
||||
01E0 | E6 DA 06 12 2C DC 79 DA C2 B4 43 4A A9 B1 B2 E5
|
||||
01F0 | B4 5B 4B A3 EB BA EF A7 1E 1D 0B 85 27 62 F7 F8
|
||||
0200 | DF 1B 9E FC E9 7E 70 A7 3D 9B 2B AA 0A 95 E1 7F
|
||||
0210 | FB 94 45 05 E5 FE 17 DF AC 06 D3 1F 73 16 69 00
|
||||
0220 | 53 44 81 F5 93 FD 25 C0 95 72 60 1F 8A 54 34 40
|
||||
0230 | 7C 60 A8 15 B4 4D C8 32 9E 48 F5 38 F3 7C 08 D0
|
||||
0240 | 05 BD 31 69 F9 95 E6 51 3C 0B 33 CB 7C 28 FA 50
|
||||
0250 | 7A 04 4E B0 31 6B 2A 8A EB 93 28 5B A5 32 4E A2
|
||||
0260 | EC 61 54 FC 8D 8B E2 88 EE 8F 84 57 68 41 69 B7
|
||||
0270 | 70 02 49 07 AA 06 A6 26 6D 04 F5 15 A9 37 8B DC
|
||||
0280 | 96 19 79 ED DC 18 F1 F0 D9 7E A9 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 = B21DADEA02D355477CB91F6AEBFF1AC70CB3ABFC5ABC13F86F27C9F61
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>016C16328062AE66</code></td>
|
||||
<td><code>01A41A058268AE66</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>E0020000</code> (736 in decimal)</td>
|
||||
<td><code>B8020000</code> (696 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = B21DADEA02D355477CB91F6AEBFF1AC70CB3ABFC5ABC13F86F27C9F61
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td><code>81BAA8901B7963A69A8E8BEBC10593FD</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td><code>9CFCEEB610AFF66473951EA6F9784CF9</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</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><code>FE5002005291D8152126DAFF9259DCF2</code> <code>BD3F8BCC2C6BCB612584E5C73CB83E9E</code> <code>7C8CBA886AF4F0EA9381B36CC55C7A31</code> <code>37F2C6D174481BCBECE93C7ADE9952D4</code> <code>FB4E441511A68BDEB2C5B6E637C372CF</code> <code>CC2C94B84144A48820BDE43D57C8FC9C</code> <code>97B6D35B6F5348A118069C0995CB86B4</code> <code>EF48C411F37C694647DB109DB51CFF21</code> <code>F4E2C875791C48FF451D5E2D1F19F9A0</code> <code>94DE35CCEE5CB75133835892D986DDC5</code> <code>D6533A34BE70E128167AE128ED47C030</code> <code>215D737DC85037856BAE74009DC60309</code> <code>CC74A3948E288CE52D3D20C9C8C7694B</code> <code>AE9DDB65786A07FB31CA32A16A171D6F</code> <code>B2C34DBFFADDDC548FE291D743B1242E</code> <code>E669DB71BA2A5A547B729B9C4C486355</code> <code>FCCBFBD361C4DF54AAE8EA9F57A50977</code> <code>E4183992495630C4D62DCEB9805A70D2</code> <code>64FDD4E5353AACC30236036540951C34</code> <code>7287DC7CB2A8EE8F278E030818374B79</code> <code>EF714211F93BBF3667ED7D4438422B83</code> <code>668E6BCB79198DC56662AAC417CC3FE6</code> <code>005D4EC24C9CE52F717EE0EB2FC62162</code> <code>ED1E6AC485F1EC98BF768328C4553BDD</code> <code>67172D9B14EB7B489A8DEF7A2FDB84D2</code> <code>FAB40D615C32064FE59AB4FD0B4D2F5A</code> <code>B71C1FBE91FC1978E6DA06122CDC79DA</code> <code>C2B4434AA9B1B2E5B45B4BA3EBBAEFA7</code> <code>1E1D0B852762F7F8DF1B9EFCE97E70A7</code> <code>3D9B2BAA0A95E17FFB944505E5FE17DF</code> <code>AC06D31F73166900534481F593FD25C0</code> <code>9572601F8A5434407C60A815B44DC832</code> <code>9E48F538F37C08D005BD3169F995E651</code> <code>3C0B33CB7C28FA507A044EB0316B2A8A</code> <code>EB93285BA5324EA2EC6154FC8D8BE288</code> <code>EE8F8457684169B770024907AA06A626</code> <code>6D04F515A9378BDC961979EDDC18F1F0</code><br> <code>D97EA949</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = B21DADEA02D355477CB91F6AEBFF1AC70CB3ABFC5ABC13F86F27C9F61
|
|||
<!-- 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 = DF3189558FD583B82CF64B6C2C3E88484E62725ECC2DF732B584895099CCAD440A998BBDE2BB0179175A9548B855A2A3CD6E0A9938A08336FA156EB741981D90917A97F8588A6B8CF936AC4ED81B02338A17CDE14012664BCE04AF8051193BF4718F0F531D4A5C8D2A6536906BCD618ECB90706BF5DF158E80988C5558F85A7174A5B908637986122B56799E552B3F4AD19C33A6B1090126EF0ABE1C846B6E118DEC833E685DFB60EB1E2B9E1CBD5C3F84E8E7DE6A4C041B125E51A2457630080B2E76913082AFF5BB4CD5167AF0CF74053585B1EC82D539E8DE3A20ED0A030DBF54E2CB628A6CAF5A232117DBFB31A6691EAE56972D56A68F78143BFDF8CFA8E230BC1D0D419DE96DA910135F221C9806F93E3743C74E649C09EC2320DF8AD42B211B51205F58AF99B6EAB6F2179FD21E5DC8065CE13C82EA76F97A9F1B8140F92BA4426EC42D65F913A998A9FF14C35F7F9C080D9AE0DEFF71BBDD717FE7F01B30909FDAC3E8DB7B94853D1A7C3FEF69B38CCB9CA915E87C3D15A083F6452CCA3F410F8902E6985D61B99689557F0337216B15242AA39EEE5240514CE255C46AC7E2D2EDB9EDDA6EB11E92D9656DADDB79AACB9FA1B4E2CB5AE74E99A1D226EFC104D96D674B9C856B3CFEEBFDF20D0C3DCA0156FC69BF1F74557FEBD75ADB04CC6F4E48F4B78464D80AA21A97E89A35E80406A2BD5D87AA191848DB7401A05D9A8C86B9BC17148CA13BABB199A6E0A9F9F5F9F57FBE269B642B634F4C9F09F634CC99307DE78B5C0239CB443A9DE9933008B143534200AF74F41178ADBA3C606180338DB4B4E8F6C62C2E44C29BC5
|
||||
tmp_aes_key = E5D04D3D974072B1E3BBE0A64AF5226F1B4AC9E12E3E1E1EF6BFB38312175BD8
|
||||
tmp_aes_iv = B6A314D270A63B8FB6AAE4839FD6FA2B964B9D05ED1593039031F1C9D2F819F2</code></pre>
|
||||
<pre><code>encrypted_answer = 5291D8152126DAFF9259DCF2BD3F8BCC2C6BCB612584E5C73CB83E9E7C8CBA886AF4F0EA9381B36CC55C7A3137F2C6D174481BCBECE93C7ADE9952D4FB4E441511A68BDEB2C5B6E637C372CFCC2C94B84144A48820BDE43D57C8FC9C97B6D35B6F5348A118069C0995CB86B4EF48C411F37C694647DB109DB51CFF21F4E2C875791C48FF451D5E2D1F19F9A094DE35CCEE5CB75133835892D986DDC5D6533A34BE70E128167AE128ED47C030215D737DC85037856BAE74009DC60309CC74A3948E288CE52D3D20C9C8C7694BAE9DDB65786A07FB31CA32A16A171D6FB2C34DBFFADDDC548FE291D743B1242EE669DB71BA2A5A547B729B9C4C486355FCCBFBD361C4DF54AAE8EA9F57A50977E4183992495630C4D62DCEB9805A70D264FDD4E5353AACC30236036540951C347287DC7CB2A8EE8F278E030818374B79EF714211F93BBF3667ED7D4438422B83668E6BCB79198DC56662AAC417CC3FE6005D4EC24C9CE52F717EE0EB2FC62162ED1E6AC485F1EC98BF768328C4553BDD67172D9B14EB7B489A8DEF7A2FDB84D2FAB40D615C32064FE59AB4FD0B4D2F5AB71C1FBE91FC1978E6DA06122CDC79DAC2B4434AA9B1B2E5B45B4BA3EBBAEFA71E1D0B852762F7F8DF1B9EFCE97E70A73D9B2BAA0A95E17FFB944505E5FE17DFAC06D31F73166900534481F593FD25C09572601F8A5434407C60A815B44DC8329E48F538F37C08D005BD3169F995E6513C0B33CB7C28FA507A044EB0316B2A8AEB93285BA5324EA2EC6154FC8D8BE288EE8F8457684169B770024907AA06A6266D04F515A9378BDC961979EDDC18F1F0D97EA949
|
||||
tmp_aes_key = 193D433DA179C2B9BBEC2861895A71A884B707887D2CE6D60BD2E9AAAB243E91
|
||||
tmp_aes_iv = 46D34D4E464337AC6C81E0E4D58B221A353C524BFE62B059B152350A47001B49</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = F4B92C626F44ADB3825A6534FCA04EC72F3D9345BA0D89B59B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F3603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007064B314A50AE2361CC4F5EC9123FD1BBD28AE5AF6B788FA07B41122BBAB699B0C48DB346B5E98F0C8A1D73305F587878F759F81379DA3C4A87D1E884BA9AD31AE7F5F97D845C057347AC261C5F672373D61FE682AE867EE978DC72A0F09CE2C2E9F17432A58ACC45F4B0B262DFC474A0EF74941D76F75921A1014B5E1B964F5FB1F96E67E9ACFCA1658C0BA37FA392370C854711839EC23E8D99193FB781A736C61CE60769077622913663FC0F9B2291E62E089D3F80F3B5E75245FB843F673BCEAB8E2B9852D99F82F630E238806218CF0237C040767EA5D366A7D1AE64292DCD8D95E67832279DAD7588F2424567F6308E1045EFB035DC084795437E66FD58062AE66E74A2AD89FB3B3FD
|
||||
answer = BA0D89B59B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F3603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007064B314A50AE2361CC4F5EC9123FD1BBD28AE5AF6B788FA07B41122BBAB699B0C48DB346B5E98F0C8A1D73305F587878F759F81379DA3C4A87D1E884BA9AD31AE7F5F97D845C057347AC261C5F672373D61FE682AE867EE978DC72A0F09CE2C2E9F17432A58ACC45F4B0B262DFC474A0EF74941D76F75921A1014B5E1B964F5FB1F96E67E9ACFCA1658C0BA37FA392370C854711839EC23E8D99193FB781A736C61CE60769077622913663FC0F9B2291E62E089D3F80F3B5E75245FB843F673BCEAB8E2B9852D99F82F630E238806218CF0237C040767EA5D366A7D1AE64292DCD8D95E67832279DAD7588F2424567F6308E1045EFB035DC084795437E66FD58062AE66E74A2AD89FB3B3FD</code></pre>
|
||||
<pre><code>answer_with_hash = B7021C84DF7099D62437262D4CA612C54695F201BA0D89B581BAA8901B7963A69A8E8BEBC10593FD9CFCEEB610AFF66473951EA6F9784CF903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002F06E047C03A469913D6EEBDFE444536C11B3FBBE14B97F992B2E428C1833EB73884D48574504F78220944D8834D843FDEB7D0DE12E00F87F767F55EED24E4F2F9AA6C0D5359C7CACACFBB6917F0989ACB99503BB2F5FE9FB34F4FDAC763E173BA81F93D77A3FDF98C05ED9C1D33E7DE4016655F2E21B1EB272D245FE266B8835AEA5FA0835E643BE58D0B406EE3D3F7C2B93C8F6EF8FB4F0CE05B78CC08B21D64F6658243C6D40625394514B988DDC671222C4EAA05B37BDE9957201AF7061D9A037E4F8551C0C76A01D27D41B38B25B70C0995BF7951AD5F3053CD196C9DF4C3F95BC003718CE2DC92086935D117907E8AF0EDFFBB3C619F9CA8BF54C018928268AE665016D8AB67897248
|
||||
answer = BA0D89B581BAA8901B7963A69A8E8BEBC10593FD9CFCEEB610AFF66473951EA6F9784CF903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002F06E047C03A469913D6EEBDFE444536C11B3FBBE14B97F992B2E428C1833EB73884D48574504F78220944D8834D843FDEB7D0DE12E00F87F767F55EED24E4F2F9AA6C0D5359C7CACACFBB6917F0989ACB99503BB2F5FE9FB34F4FDAC763E173BA81F93D77A3FDF98C05ED9C1D33E7DE4016655F2E21B1EB272D245FE266B8835AEA5FA0835E643BE58D0B406EE3D3F7C2B93C8F6EF8FB4F0CE05B78CC08B21D64F6658243C6D40625394514B988DDC671222C4EAA05B37BDE9957201AF7061D9A037E4F8551C0C76A01D27D41B38B25B70C0995BF7951AD5F3053CD196C9DF4C3F95BC003718CE2DC92086935D117907E8AF0EDFFBB3C619F9CA8BF54C018928268AE665016D8AB67897248</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 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
|
||||
<pre><code>0000 | BA 0D 89 B5 81 BA A8 90 1B 79 63 A6 9A 8E 8B EB
|
||||
0010 | C1 05 93 FD 9C FC EE B6 10 AF F6 64 73 95 1E A6
|
||||
0020 | F9 78 4C F9 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 = BA0D89B59B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F3
|
|||
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 | 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>
|
||||
0130 | 2F 06 E0 47 C0 3A 46 99 13 D6 EE BD FE 44 45 36
|
||||
0140 | C1 1B 3F BB E1 4B 97 F9 92 B2 E4 28 C1 83 3E B7
|
||||
0150 | 38 84 D4 85 74 50 4F 78 22 09 44 D8 83 4D 84 3F
|
||||
0160 | DE B7 D0 DE 12 E0 0F 87 F7 67 F5 5E ED 24 E4 F2
|
||||
0170 | F9 AA 6C 0D 53 59 C7 CA CA CF BB 69 17 F0 98 9A
|
||||
0180 | CB 99 50 3B B2 F5 FE 9F B3 4F 4F DA C7 63 E1 73
|
||||
0190 | BA 81 F9 3D 77 A3 FD F9 8C 05 ED 9C 1D 33 E7 DE
|
||||
01A0 | 40 16 65 5F 2E 21 B1 EB 27 2D 24 5F E2 66 B8 83
|
||||
01B0 | 5A EA 5F A0 83 5E 64 3B E5 8D 0B 40 6E E3 D3 F7
|
||||
01C0 | C2 B9 3C 8F 6E F8 FB 4F 0C E0 5B 78 CC 08 B2 1D
|
||||
01D0 | 64 F6 65 82 43 C6 D4 06 25 39 45 14 B9 88 DD C6
|
||||
01E0 | 71 22 2C 4E AA 05 B3 7B DE 99 57 20 1A F7 06 1D
|
||||
01F0 | 9A 03 7E 4F 85 51 C0 C7 6A 01 D2 7D 41 B3 8B 25
|
||||
0200 | B7 0C 09 95 BF 79 51 AD 5F 30 53 CD 19 6C 9D F4
|
||||
0210 | C3 F9 5B C0 03 71 8C E2 DC 92 08 69 35 D1 17 90
|
||||
0220 | 7E 8A F0 ED FF BB 3C 61 9F 9C A8 BF 54 C0 18 92
|
||||
0230 | 82 68 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 = BA0D89B59B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F3
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td><code>81BAA8901B7963A69A8E8BEBC10593FD</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td><code>9CFCEEB610AFF66473951EA6F9784CF9</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B59B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F3
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</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>FE0001002F06E047C03A469913D6EEBD</code> <code>FE444536C11B3FBBE14B97F992B2E428</code> <code>C1833EB73884D48574504F78220944D8</code> <code>834D843FDEB7D0DE12E00F87F767F55E</code> <code>ED24E4F2F9AA6C0D5359C7CACACFBB69</code> <code>17F0989ACB99503BB2F5FE9FB34F4FDA</code> <code>C763E173BA81F93D77A3FDF98C05ED9C</code> <code>1D33E7DE4016655F2E21B1EB272D245F</code> <code>E266B8835AEA5FA0835E643BE58D0B40</code> <code>6EE3D3F7C2B93C8F6EF8FB4F0CE05B78</code> <code>CC08B21D64F6658243C6D40625394514</code> <code>B988DDC671222C4EAA05B37BDE995720</code> <code>1AF7061D9A037E4F8551C0C76A01D27D</code> <code>41B38B25B70C0995BF7951AD5F3053CD</code> <code>196C9DF4C3F95BC003718CE2DC920869</code> <code>35D117907E8AF0EDFFBB3C619F9CA8BF</code><br> <code>54C01892</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>8062AE66</code> (1722704512 in decimal)</td>
|
||||
<td><code>8268AE66</code> (1722706050 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B59B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F3
|
|||
<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 = C4714EF06165EC1263E7C02F5C98C59D8A79103CD5C51550948BEDAB3D9074250A6E98ECA699654BD702532013921FD6EB65F25974136BFEB07BACEA0F88464188E6B196EA97801C4D63CFE4DCEB4DC6F3CE59BFBAAED7CE525BDBEDAF35C6D81A5547C4D2D9C32568432C7B6868A2A09F1E97B99C515FB838ED92F980270DF0472854AB47040B426EC48E3D3EC6AAA560F9492385C1B0664258A3BEA1D2E96CCE930884E284494FDCB5A7C76A302D78AC0C92B161D07BA834504DFC112BC6E36E070AC1F6610B3E941433BE355CAEAEB68698921297C08EDCD49CC3008DBF577C4DAD15E08F55C761733ED555F586F1396D01A998138BC4A300F0655BA86F57</code></pre>
|
||||
<pre><code>b = 2D31A8A808F5E5E54A9FC59FB282245A5B7333CEF72AC877C911E9B4CA3977D7E9CD657AEA138E3FB9BA15ACEF338C049F59F9A0073EE37C95B4A8255735DF1B8C9C711851EB997E2696466D46B67715B0689EC79FC4E7D30278A75D7D29293638761171619B328348F1680960E6031FE398B3AFC70B097833173F2C4CA14EFA110A8304D9BA70801B40D9508DA1BC7CA56D0C06D31B3ADA169ED9AA42344544D1A1AD18C95A61F28987455AE7E1521A70A1E433E3B5FF832F4E273115BEB1C28686B4F69844E68B89078AA28A5B048027170CF24C71371E399DA78F20514783EC871D13E4B9CFD054A107557BCAC353FCFF0B4ABACC143EFA2EF1EB27BC437C</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 = A677087BC6E180E68FE728ED795EAB074FBB0210DDDBDA036D8EFAEEC03EEC96F7113A446B80B6AF0784198F47B7649B63B8D8C8DE35E8B51857F54D1207D267C55630F62208C0622611E393284743C6B1FEFACD3DE3E62E19F358F50AEFEC32EA1327A1095295FCA91F52F69C1D838CA857508B3CC86E252418282FD570A5F5D4BC02FE5498095B22799EEAD7ACA91AF495A3B2023D5C85B3A47F55720087582ED38EB99A2340B75F732B9E311E509D8E9DCE66A4AFF13F47BECD0A86342C76F45CC307BC33934942488D2ACAFC34DA13695503752634AE64D5693ED31EE5020376B36862A5CCA91CE1C871B03042D18FC93AC4352A810FA9F8317A1D968A90</code></pre>
|
||||
<pre><code>g_b = AC31D4BF09B3D713DCEF1D4D74C3591E05DC39C41BF08FED8D9FA89258E137D3E09AD57593D22616835AB9476B78E3B438B92077574DE56B2026B72CD4963E170566EBB87DBD6549EC656663D5326A7F071326470B5B2AEE70A904FD509785DF360A672CF226F92613DB090D4C56F7D77CAB1B602D468C863DA10C82D853C68AEC5CAF28F53D8F7E488093F992CC0AF0CA71D24C46F899CAEDA29B3752B0B68E4F2F529EFCACAFA2FC76DBFF2ABAC3B8E414CC1216B5E4D72AFA8F5838F133501CBA81132562FA563877C08C0FAEBE1404C27208BE21621B4046ECF68C33A469F7E8ABF7E2EAEE2187B563B58CE441A6314299C8A4A1D2AD6F6CC5C9D507FD1E</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 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>
|
||||
<pre><code>0000 | 54 B6 43 66 81 BA A8 90 1B 79 63 A6 9A 8E 8B EB
|
||||
0010 | C1 05 93 FD 9C FC EE B6 10 AF F6 64 73 95 1E A6
|
||||
0020 | F9 78 4C F9 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | AC 31 D4 BF 09 B3 D7 13 DC EF 1D 4D 74 C3 59 1E
|
||||
0040 | 05 DC 39 C4 1B F0 8F ED 8D 9F A8 92 58 E1 37 D3
|
||||
0050 | E0 9A D5 75 93 D2 26 16 83 5A B9 47 6B 78 E3 B4
|
||||
0060 | 38 B9 20 77 57 4D E5 6B 20 26 B7 2C D4 96 3E 17
|
||||
0070 | 05 66 EB B8 7D BD 65 49 EC 65 66 63 D5 32 6A 7F
|
||||
0080 | 07 13 26 47 0B 5B 2A EE 70 A9 04 FD 50 97 85 DF
|
||||
0090 | 36 0A 67 2C F2 26 F9 26 13 DB 09 0D 4C 56 F7 D7
|
||||
00A0 | 7C AB 1B 60 2D 46 8C 86 3D A1 0C 82 D8 53 C6 8A
|
||||
00B0 | EC 5C AF 28 F5 3D 8F 7E 48 80 93 F9 92 CC 0A F0
|
||||
00C0 | CA 71 D2 4C 46 F8 99 CA ED A2 9B 37 52 B0 B6 8E
|
||||
00D0 | 4F 2F 52 9E FC AC AF A2 FC 76 DB FF 2A BA C3 B8
|
||||
00E0 | E4 14 CC 12 16 B5 E4 D7 2A FA 8F 58 38 F1 33 50
|
||||
00F0 | 1C BA 81 13 25 62 FA 56 38 77 C0 8C 0F AE BE 14
|
||||
0100 | 04 C2 72 08 BE 21 62 1B 40 46 EC F6 8C 33 A4 69
|
||||
0110 | F7 E8 AB F7 E2 EA EE 21 87 B5 63 B5 8C E4 41 A6
|
||||
0120 | 31 42 99 C8 A4 A1 D2 AD 6F 6C C5 C9 D5 07 FD 1E</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 = BA0D89B59B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F3
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td><code>81BAA8901B7963A69A8E8BEBC10593FD</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td><code>9CFCEEB610AFF66473951EA6F9784CF9</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</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><code>FE000100AC31D4BF09B3D713DCEF1D4D</code> <code>74C3591E05DC39C41BF08FED8D9FA892</code> <code>58E137D3E09AD57593D22616835AB947</code> <code>6B78E3B438B92077574DE56B2026B72C</code> <code>D4963E170566EBB87DBD6549EC656663</code> <code>D5326A7F071326470B5B2AEE70A904FD</code> <code>509785DF360A672CF226F92613DB090D</code> <code>4C56F7D77CAB1B602D468C863DA10C82</code> <code>D853C68AEC5CAF28F53D8F7E488093F9</code> <code>92CC0AF0CA71D24C46F899CAEDA29B37</code> <code>52B0B68E4F2F529EFCACAFA2FC76DBFF</code> <code>2ABAC3B8E414CC1216B5E4D72AFA8F58</code> <code>38F133501CBA81132562FA563877C08C</code> <code>0FAEBE1404C27208BE21621B4046ECF6</code> <code>8C33A469F7E8ABF7E2EAEE2187B563B5</code> <code>8CE441A6314299C8A4A1D2AD6F6CC5C9</code><br> <code>D507FD1E</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 = BA0D89B59B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F3
|
|||
<!-- 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 = 54B643669B01C4BEE44FB388B6C029C744D2860E47EE4559FE7A601D03FA6CA2510F2F360000000000000000FE000100A677087BC6E180E68FE728ED795EAB074FBB0210DDDBDA036D8EFAEEC03EEC96F7113A446B80B6AF0784198F47B7649B63B8D8C8DE35E8B51857F54D1207D267C55630F62208C0622611E393284743C6B1FEFACD3DE3E62E19F358F50AEFEC32EA1327A1095295FCA91F52F69C1D838CA857508B3CC86E252418282FD570A5F5D4BC02FE5498095B22799EEAD7ACA91AF495A3B2023D5C85B3A47F55720087582ED38EB99A2340B75F732B9E311E509D8E9DCE66A4AFF13F47BECD0A86342C76F45CC307BC33934942488D2ACAFC34DA13695503752634AE64D5693ED31EE5020376B36862A5CCA91CE1C871B03042D18FC93AC4352A810FA9F8317A1D968A90
|
||||
padding = A151B081366094066064BE85
|
||||
tmp_aes_key = E5D04D3D974072B1E3BBE0A64AF5226F1B4AC9E12E3E1E1EF6BFB38312175BD8
|
||||
tmp_aes_iv = B6A314D270A63B8FB6AAE4839FD6FA2B964B9D05ED1593039031F1C9D2F819F2</code></pre>
|
||||
<pre><code>data = 54B6436681BAA8901B7963A69A8E8BEBC10593FD9CFCEEB610AFF66473951EA6F9784CF90000000000000000FE000100AC31D4BF09B3D713DCEF1D4D74C3591E05DC39C41BF08FED8D9FA89258E137D3E09AD57593D22616835AB9476B78E3B438B92077574DE56B2026B72CD4963E170566EBB87DBD6549EC656663D5326A7F071326470B5B2AEE70A904FD509785DF360A672CF226F92613DB090D4C56F7D77CAB1B602D468C863DA10C82D853C68AEC5CAF28F53D8F7E488093F992CC0AF0CA71D24C46F899CAEDA29B3752B0B68E4F2F529EFCACAFA2FC76DBFF2ABAC3B8E414CC1216B5E4D72AFA8F5838F133501CBA81132562FA563877C08C0FAEBE1404C27208BE21621B4046ECF68C33A469F7E8ABF7E2EAEE2187B563B58CE441A6314299C8A4A1D2AD6F6CC5C9D507FD1E
|
||||
padding = 6BF96602E0860E13C471AFA6
|
||||
tmp_aes_key = 193D433DA179C2B9BBEC2861895A71A884B707887D2CE6D60BD2E9AAAB243E91
|
||||
tmp_aes_iv = 46D34D4E464337AC6C81E0E4D58B221A353C524BFE62B059B152350A47001B49</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 = C5A7061B4C92136CEF1CC3844E817A5AD33F20E7008B7971C674ED4A43782651DF651C4FD952D563E35B68BE227BE66C857D877D2B4CF5D0DEA3EB16DB02CB6AF0125F531B43E738C9E6F2F2FFE4FC49D3550D75E4B98AD16CD59CAF1D353EBB9A854F0E6E342EC1517B1B74C6D4BC89525BAAB0C199F2BAB1DD82569F629B396D4027526BDB3E2B17DDA4FAA1FE3F9FE144DAE8ABDD5B1A3677486FEF248ABBD242AD99E856EAF670A819956AA23BF00AA04F41138AB3F9B11EF1F4CA778D3360247189559CE662AD3A3B523A082C22340B0BC98F5E8D367B062EDA3EA38B40D87F8B1C454C9F2AC761925E2FF27D366E2FB47554732635804E595234ED81ED891E4B50E99DEDBC431ED1EC4E9E0DD02E5E5208EB6C3F6288354F861A32489582C006FB3BBB354707E0DAB0063BDCAE95038000E1FAF0271EDF1C77A9B69B7EE2A42E8DF31158BF66D504DB35098F7D</code></pre>
|
||||
<pre><code>encrypted_data = ED09946D9708F80E7E1EC8B8BE8681727E4D0E2C3D64E39518BD987155090D3AFAE586E728028EE2973AD2D55B9B818A5BC615925D6B2C8FAAA65DB022472FF937FD2F0ADFE06ED1297252F47AC605DDAF3472FD3141D3ED690E6E9EDB6D230A28B0C9AB38C4417F620E85357B2DEFF3E320A4AC0F11B83499FA934CD5D67A9C75138FC1DE2564E886E7055DDF27BE0F9CE8F483D6B92B8401717A4173896498393BD79D8050BC683910FE6713C520CFFE09617576F11C62B9CCAD38BF06FA5CBE3BE3D4721D69ED0343CD3FCEE9E861165FBF5089896CF320D2BF5E0ED3793856944182742BE978AFC85EA38809260C318EB4AAD260367FD5A21503EB58ECB682D08B3BAA37B90646DD6AF8FB403C336210188FD97C33BD653A30C207862C943CCC614830A28A523CE195F23C0027CB14A1894458D870B210F19CB4F30D5109B2F5B1B62D11F2F46E8704B0615489E0</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 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>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 F0 4B 04 00 82 68 AE 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 81 BA A8 90 1B 79 63 A6
|
||||
0020 | 9A 8E 8B EB C1 05 93 FD 9C FC EE B6 10 AF F6 64
|
||||
0030 | 73 95 1E A6 F9 78 4C F9 FE 50 01 00 ED 09 94 6D
|
||||
0040 | 97 08 F8 0E 7E 1E C8 B8 BE 86 81 72 7E 4D 0E 2C
|
||||
0050 | 3D 64 E3 95 18 BD 98 71 55 09 0D 3A FA E5 86 E7
|
||||
0060 | 28 02 8E E2 97 3A D2 D5 5B 9B 81 8A 5B C6 15 92
|
||||
0070 | 5D 6B 2C 8F AA A6 5D B0 22 47 2F F9 37 FD 2F 0A
|
||||
0080 | DF E0 6E D1 29 72 52 F4 7A C6 05 DD AF 34 72 FD
|
||||
0090 | 31 41 D3 ED 69 0E 6E 9E DB 6D 23 0A 28 B0 C9 AB
|
||||
00A0 | 38 C4 41 7F 62 0E 85 35 7B 2D EF F3 E3 20 A4 AC
|
||||
00B0 | 0F 11 B8 34 99 FA 93 4C D5 D6 7A 9C 75 13 8F C1
|
||||
00C0 | DE 25 64 E8 86 E7 05 5D DF 27 BE 0F 9C E8 F4 83
|
||||
00D0 | D6 B9 2B 84 01 71 7A 41 73 89 64 98 39 3B D7 9D
|
||||
00E0 | 80 50 BC 68 39 10 FE 67 13 C5 20 CF FE 09 61 75
|
||||
00F0 | 76 F1 1C 62 B9 CC AD 38 BF 06 FA 5C BE 3B E3 D4
|
||||
0100 | 72 1D 69 ED 03 43 CD 3F CE E9 E8 61 16 5F BF 50
|
||||
0110 | 89 89 6C F3 20 D2 BF 5E 0E D3 79 38 56 94 41 82
|
||||
0120 | 74 2B E9 78 AF C8 5E A3 88 09 26 0C 31 8E B4 AA
|
||||
0130 | D2 60 36 7F D5 A2 15 03 EB 58 EC B6 82 D0 8B 3B
|
||||
0140 | AA 37 B9 06 46 DD 6A F8 FB 40 3C 33 62 10 18 8F
|
||||
0150 | D9 7C 33 BD 65 3A 30 C2 07 86 2C 94 3C CC 61 48
|
||||
0160 | 30 A2 8A 52 3C E1 95 F2 3C 00 27 CB 14 A1 89 44
|
||||
0170 | 58 D8 70 B2 10 F1 9C B4 F3 0D 51 09 B2 F5 B1 B6
|
||||
0180 | 2D 11 F2 F4 6E 87 04 B0 61 54 89 E0</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>F85406008062AE66</code></td>
|
||||
<td><code>F04B04008268AE66</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>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td><code>81BAA8901B7963A69A8E8BEBC10593FD</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td><code>9CFCEEB610AFF66473951EA6F9784CF9</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</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><code>FE500100ED09946D9708F80E7E1EC8B8</code> <code>BE8681727E4D0E2C3D64E39518BD9871</code> <code>55090D3AFAE586E728028EE2973AD2D5</code> <code>5B9B818A5BC615925D6B2C8FAAA65DB0</code> <code>22472FF937FD2F0ADFE06ED1297252F4</code> <code>7AC605DDAF3472FD3141D3ED690E6E9E</code> <code>DB6D230A28B0C9AB38C4417F620E8535</code> <code>7B2DEFF3E320A4AC0F11B83499FA934C</code> <code>D5D67A9C75138FC1DE2564E886E7055D</code> <code>DF27BE0F9CE8F483D6B92B8401717A41</code> <code>73896498393BD79D8050BC683910FE67</code> <code>13C520CFFE09617576F11C62B9CCAD38</code> <code>BF06FA5CBE3BE3D4721D69ED0343CD3F</code> <code>CEE9E861165FBF5089896CF320D2BF5E</code> <code>0ED3793856944182742BE978AFC85EA3</code> <code>8809260C318EB4AAD260367FD5A21503</code> <code>EB58ECB682D08B3BAA37B90646DD6AF8</code> <code>FB403C336210188FD97C33BD653A30C2</code> <code>07862C943CCC614830A28A523CE195F2</code> <code>3C0027CB14A1894458D870B210F19CB4</code> <code>F30D5109B2F5B1B62D11F2F46E8704B0</code><br> <code>615489E0</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 = 3CA723940E9A49A23BCEAC8653F26A5886C7354691968120A8276301082956DE8601423EFDDA879ACDC32A0D867C914207B786C0E71C6FD24519A6D4C6430C747A5F913EEEE867EC2B30C7A11B12CDF7186DD238917D5F062BA43A45944A9FA34585C38B3EEDB8DE48672DCCCF5F43CDF8D541EF34575454CA71FE75C3F14B95A324C03837E758EE4E2C11E33EAA256CD5F81D5427032F3A1904D73D42639917F702BC8806913E90C779F8937562D1B860AEC06F0019664FBB5A4678A088075B4048AB787B666BCB7866B954C1169DB596BFBE5C1B2BAB4E04B5FBC2E2B9DEA5D8700EBF55DDD3F2B8EE309DD7D9F88F97E837FE5CAF3DC1AD00FAB1D99B2FC2</code></pre>
|
||||
<pre><code>auth_key = 24A37A35A158CDCE75FD48B39EC25D533C05D89FC6C4E8BC63A166CAA66962FFA1CBE96115A0586C5EDA91DEE03758D258BD91F744EA591AFD0AB9356CB9D1CD7B1D00F418F23A158D3BAF8D4E0044D951E0A3A36B16B7E8AE30F838B73A8D5DFE07481724695CBE632FC70F8615774D52492236F9379278A29AB02FFA496D43BAA634D9AB297AF93BA532ACF21872DCA2206332CD5FC0711FD0AEDE548814C4A7F22EF6B54010BD4D16A395DFDCAC38626A3F93F44DD2C008DEFB7396D3FAE822F6B273EFF6F9CD53C977ED96E86281480DB1112352BAB990D8F6151905722714BA0881C60A7624BD4B6B57F7D7DF77238E9E436A248625C9F36B24A066CBE5</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 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>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 E0 8C 9E 82 68 AE 66
|
||||
0010 | 90 00 00 00 34 F7 CB 3B 81 BA A8 90 1B 79 63 A6
|
||||
0020 | 9A 8E 8B EB C1 05 93 FD 9C FC EE B6 10 AF F6 64
|
||||
0030 | 73 95 1E A6 F9 78 4C F9 92 E5 40 DB 4E FF B8 D9
|
||||
0040 | 2F 92 4D 74 83 D5 DC EF</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>016C89DD8062AE66</code></td>
|
||||
<td><code>01E08C9E8268AE66</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>74000000</code> (116 in decimal)</td>
|
||||
<td><code>90000000</code> (144 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>9B01C4BEE44FB388B6C029C744D2860E</code></td>
|
||||
<td><code>81BAA8901B7963A69A8E8BEBC10593FD</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>47EE4559FE7A601D03FA6CA2510F2F36</code></td>
|
||||
<td><code>9CFCEEB610AFF66473951EA6F9784CF9</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>745B1F2A708615F6E1F17A92AAD7BFFE</code></td>
|
||||
<td><code>92E540DB4EFFB8D92F924D7483D5DCEF</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>
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/inputInvoiceStars">inputInvoiceStars</a></td>
|
||||
<td>Used to top up the current account's <a href="/api/stars">Telegram Stars</a> balance.</td>
|
||||
<td>Used to top up the <a href="/api/stars">Telegram Stars</a> balance of the current account or someone else's account.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
|
|
@ -4,18 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>StarsGiftOption</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Constructors
|
||||
Constructor
|
||||
Description
|
||||
starsGiftOption
|
||||
">
|
||||
<meta property="description" content="Telegram Stars gift option.">
|
||||
<meta property="og:title" content="StarsGiftOption">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Constructors
|
||||
Constructor
|
||||
Description
|
||||
starsGiftOption
|
||||
">
|
||||
<meta property="og:description" content="Telegram Stars gift option.">
|
||||
<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">
|
||||
|
@ -50,7 +42,8 @@ starsGiftOption
|
|||
<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="/type/StarsGiftOption" >StarsGiftOption</a></li></ul></div>
|
||||
<h1 id="dev_page_title">StarsGiftOption</h1>
|
||||
|
||||
<div id="dev_page_content"><p><div class="clearfix">
|
||||
<div id="dev_page_content"><p><a href="/api/stars#buying-stars">Telegram Stars gift option</a>.</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>
|
||||
|
@ -74,10 +67,13 @@ starsGiftOption
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/starsGiftOption">starsGiftOption</a></td>
|
||||
<td> </td>
|
||||
<td><a href="/api/stars#buying-stars">Telegram Stars gift option</a>.</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="#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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue