Update content of files

This commit is contained in:
GitHub Action 2024-08-03 15:31:24 +00:00
parent 9050821f3a
commit 394c29e6c7
5 changed files with 220 additions and 208 deletions

View file

@ -676,6 +676,8 @@ Note that the stickerset can be fetched using <a href="/constructor/inputSticker
<p>If false, indicates that <a href="/api/stars">Telegram Stars may be used in the current region</a>; otherwise, all Star-related UI options should be hidden from the user. (boolean)</p>
<h4><a class="anchor" href="#stars-revenue-withdrawal-min" id="stars-revenue-withdrawal-min" name="stars-revenue-withdrawal-min"><i class="anchor-icon"></i></a><code>stars_revenue_withdrawal_min</code></h4>
<p>Minimum required amount of <a href="/api/stars">Telegram Stars</a> on a channel or bot's balance to allow <a href="/api/stars#withdrawal">withdrawal »</a>. (integer)</p>
<h4><a class="anchor" href="#stars-paid-post-amount-max" id="stars-paid-post-amount-max" name="stars-paid-post-amount-max"><i class="anchor-icon"></i></a><code>stars_paid_post_amount_max</code></h4>
<p>Maximum price in <a href="/api/stars">Telegram Stars</a> for posted <a href="/api/paid-media">paid media</a>. (integer)</p>
<h4><a class="anchor" href="#web-app-allowed-protocols" id="web-app-allowed-protocols" name="web-app-allowed-protocols"><i class="anchor-icon"></i></a><code>web_app_allowed_protocols</code></h4>
<p>Specifies a list of allowed schemes for URLs received in <a href="/api/web-events#web-app-open-link">web_app_open_link events</a>. (array of strings)</p>
<h3><a class="anchor" href="#suggestions" id="suggestions" name="suggestions"><i class="anchor-icon"></i></a>Suggestions</h3>

View file

@ -139,7 +139,7 @@ To return all <a href="/constructor/starsTransaction">star transactions »</a> (
---functions---
<a href='/method/payments.getStarsRevenueAdsAccountUrl'>payments.getStarsRevenueAdsAccountUrl</a>#d1d7efc5 peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/payments.StarsRevenueAdsAccountUrl'>payments.StarsRevenueAdsAccountUrl</a>;</code></pre>
<p>Channel/bot owners may place Telegram advertisements for channels/bots they own using the Telegram Ad platform, paying using <strong>Stars</strong> at a special rate with a <strong>30% discount</strong> creating a <strong>cost-effective</strong> way of reaching new users. </p>
<p>Channel/bot owners may place Telegram advertisements for channels/bots they own using the Telegram Ad platform, paying using the <strong>Stars</strong> currently available on the bot/channel's balance at a special rate with a <strong>30% discount</strong> creating a <strong>cost-effective</strong> way of reaching new users. </p>
<p>To use Stars for ads, go to your bot's or channels' Balance or Monetization section and tap '<em>Buy Ads</em>'.<br>
Clicking on the button should invoke <a href="/method/payments.getStarsRevenueAdsAccountUrl">payments.getStarsRevenueAdsAccountUrl</a> (passing the bot/channel in <code>peer</code>).<br>
The returned <code>url</code> will lead to a page where the user will be able to place ads for the channel/bot passed in <code>peer</code>. </p>

View file

@ -397,6 +397,8 @@
<p>Telegram Premium users can grant their favorite channels and supergroups additional features like the ability to post stories by giving them boosts.</p>
<h4><a class="anchor" href="#channel-ad-revenue" id="channel-ad-revenue" name="channel-ad-revenue"><i class="anchor-icon"></i></a><a href="/api/revenue">Channel ad revenue</a></h4>
<p>Telegram has one of the most generous reward systems in the history of social media. Telegram channel owners can now receive 50% of the revenue from ads displayed in their channels. This page describes the methods used to withdraw channel ad revenue, as well as view detailed revenue stats.</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>
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p>
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>

View file

@ -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 44 6B 0C 00 FF 41 AE 66
0010 | 14 00 00 00 F1 8E 7E BE 7B F4 DA A0 1D 3E D2 26
0020 | DE F7 1A 76 39 5F D6 6D</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 B0 B7 09 00 67 4B AE 66
0010 | 14 00 00 00 F1 8E 7E BE 98 6F 64 A7 DD EA 29 51
0020 | 4E 0E 8D 15 D6 F2 76 D2</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>446B0C00FF41AE66</code></td>
<td><code>B0B70900674BAE66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -95,7 +95,7 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>7BF4DAA01D3ED226DEF71A76395FD66D</code></td>
<td><code>986F64A7DDEA29514E0E8D15D6F276D2</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 68 B3 8E FF 41 AE 66
0010 | 68 00 00 00 63 24 16 05 7B F4 DA A0 1D 3E D2 26
0020 | DE F7 1A 76 39 5F D6 6D EA E3 5E 07 58 C0 E4 8B
0030 | B2 BF EF CE 74 A6 78 EB 08 1A 36 A4 50 4C 89 83
0040 | 7D 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 30 D3 9B 67 4B AE 66
0010 | A8 00 00 00 63 24 16 05 98 6F 64 A7 DD EA 29 51
0020 | 4E 0E 8D 15 D6 F2 76 D2 A5 02 24 04 0E D5 17 4D
0030 | F5 66 64 9C 15 AE 15 24 08 13 FA F3 8D D9 35 E1
0040 | F5 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>0168B38EFF41AE66</code></td>
<td><code>0130D39B674BAE66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>68000000</code> (104 in decimal)</td>
<td><code>A8000000</code> (168 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>7BF4DAA01D3ED226DEF71A76395FD66D</code></td>
<td><code>986F64A7DDEA29514E0E8D15D6F276D2</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>EAE35E0758C0E48BB2BFEFCE74A678EB</code></td>
<td><code>A50224040ED5174DF566649C15AE1524</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>081A36A4504C89837D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1888877758516921213</td>
<td><code>0813FAF38DD935E1F5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1439730821458420213</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 &lt; q.</h5>
<!-- start pq -->
<pre><code>pq = 1888877758516921213</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1888877758516921213 = 1165801213 * 1620240001</code></p>
<pre><code>p = 1165801213
q = 1620240001</code></pre>
<pre><code>pq = 1439730821458420213</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1439730821458420213 = 1153968341 * 1247634593</code></p>
<pre><code>p = 1153968341
q = 1247634593</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 1A 36 A4 50 4C 89 83 7D 00 00 00
0010 | 04 45 7C B6 FD 00 00 00 04 60 92 E6 81 00 00 00
0020 | 7B F4 DA A0 1D 3E D2 26 DE F7 1A 76 39 5F D6 6D
0030 | EA E3 5E 07 58 C0 E4 8B B2 BF EF CE 74 A6 78 EB
0040 | 46 29 AA 8D 04 78 07 B2 7C 76 56 50 63 22 3F A8
0050 | 14 50 FC 55 96 00 B6 65 41 19 24 37 6F 86 EB 37
<pre><code>0000 | 95 5F F5 A9 08 13 FA F3 8D D9 35 E1 F5 00 00 00
0010 | 04 44 C8 28 D5 00 00 00 04 4A 5D 64 A1 00 00 00
0020 | 98 6F 64 A7 DD EA 29 51 4E 0E 8D 15 D6 F2 76 D2
0030 | A5 02 24 04 0E D5 17 4D F5 66 64 9C 15 AE 15 24
0040 | D0 D6 F4 71 6B F2 EB 1F 40 0D E3 11 C7 A9 5B 06
0050 | E0 DC 0A 00 A1 9C B8 A1 AC 6F 73 3C E8 DB 3E 4F
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 = 1620240001</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>081A36A4504C89837D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1888877758516921213</td>
<td><code>0813FAF38DD935E1F5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1439730821458420213</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>04457CB6FD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1165801213</td>
<td><code>0444C828D5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1153968341</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>046092E681000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1620240001</td>
<td><code>044A5D64A1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1247634593</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>7BF4DAA01D3ED226DEF71A76395FD66D</code></td>
<td><code>986F64A7DDEA29514E0E8D15D6F276D2</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>EAE35E0758C0E48BB2BFEFCE74A678EB</code></td>
<td><code>A50224040ED5174DF566649C15AE1524</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>4629AA8D047807B27C76565063223FA8</code> <code>1450FC559600B665411924376F86EB37</code></td>
<td><code>D0D6F4716BF2EB1F400DE311C7A95B06</code> <code>E0DC0A00A19CB8A1AC6F733CE8DB3E4F</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1620240001</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 = 955FF5A9081A36A4504C89837D00000004457CB6FD000000046092E6810000007BF4DAA01D3ED226DEF71A76395FD66DEAE35E0758C0E48BB2BFEFCE74A678EB4629AA8D047807B27C76565063223FA81450FC559600B665411924376F86EB3702000000
random_padding_bytes = 205B6E525EE93A7E9C311A9D868F778C32B40AA8E64095A7F0B54830A6035F763EE809F35D392E335A6B4BC58687C54904343D3DD331E55F5B6C3EF456C6D56CD34DE215ED190D154C826D0E104932AAF3E8F0A0B486922A2004CC1F</code></pre>
<pre><code>data = 955FF5A90813FAF38DD935E1F50000000444C828D5000000044A5D64A1000000986F64A7DDEA29514E0E8D15D6F276D2A50224040ED5174DF566649C15AE1524D0D6F4716BF2EB1F400DE311C7A95B06E0DC0A00A19CB8A1AC6F733CE8DB3E4F02000000
random_padding_bytes = D7A82E654340BE8EBCE5A3E542BCA740ACD8D1081AA705383236E39CFD0F538AB643964988D5269A5B9C4E3929F6CF83C60C8D46A560E227BD50B7F60449DCD2324FB5A7FCAEAB1068144A9280009D0A16C918350FD5E9C6A8E5AF66</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 = D95C66C9C9E3CB75836867AD85D761D8E0DA2F3A87E3675EA5F9B407F8EC484894A3E994151A2B07B6AA7568CC4587F99612764A6C3138228595A98D565657844EF00891FA9E59E3DB8319A146D29D1482DB0A8F22B49A3748AB7C8B35CD50010AF69DFAE28B8BE36395A32267C2A68C4D6F54D701CCA14149B102F7D226692E35B187BCD45987B0AC0A2B3784B223E5B122A9810BE0EFEFB483E5FD098EC8E7D4C0555D4D36742F0670CD2FD7B2E4D7C6CCAA3348EFC80BC5BF9B79B4B3482A8D664ECEDEC606F9BC67C36EEBD045F5E8E4A8AED657D48D6FD33021A5E91CD7CF22811AFD040959873B2EE4F29E9F8123729F6C9B694C47DA1F2EB581B112D5</code></pre>
<pre><code>encrypted_data = 990B0DA1D97893E9E6911475778E7F2B616911D838E11078CB16FB5863F7EED6DFC8FE8B8B76D1FD7A8C25CA3B5CDCD91A8A642891FCFBE6D2B3531AF6B8EF063960F5FE92814FA0CC027C24C26F142FF762AC32690C616D36ABDCA5FE7C37C277E6EA23DC09F1D912F8AF2DBB18B9007EAE21111441DD0C20AACBCF2091C50E5778A2FDD24A5AADF1415BB3753F0B521AD1DCE8E825B100F18E3A593DED86C6FEFC4096733972FBC83969CCACBBEC4A13B57A7A395B56925C823CC5C39CA974D20A7807E0EA9B94E40000893A89CBB9A64C624DF9D005A6505E2B08F581C5ABC226245539971FCE174505A135C80E5B6FD77018DA11BDA529D91E3D35407873</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 48 6B 0C 00 FF 41 AE 66
0010 | 40 01 00 00 BE E4 12 D7 7B F4 DA A0 1D 3E D2 26
0020 | DE F7 1A 76 39 5F D6 6D EA E3 5E 07 58 C0 E4 8B
0030 | B2 BF EF CE 74 A6 78 EB 04 45 7C B6 FD 00 00 00
0040 | 04 60 92 E6 81 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 D9 5C 66 C9 C9 E3 CB 75 83 68 67 AD
0060 | 85 D7 61 D8 E0 DA 2F 3A 87 E3 67 5E A5 F9 B4 07
0070 | F8 EC 48 48 94 A3 E9 94 15 1A 2B 07 B6 AA 75 68
0080 | CC 45 87 F9 96 12 76 4A 6C 31 38 22 85 95 A9 8D
0090 | 56 56 57 84 4E F0 08 91 FA 9E 59 E3 DB 83 19 A1
00A0 | 46 D2 9D 14 82 DB 0A 8F 22 B4 9A 37 48 AB 7C 8B
00B0 | 35 CD 50 01 0A F6 9D FA E2 8B 8B E3 63 95 A3 22
00C0 | 67 C2 A6 8C 4D 6F 54 D7 01 CC A1 41 49 B1 02 F7
00D0 | D2 26 69 2E 35 B1 87 BC D4 59 87 B0 AC 0A 2B 37
00E0 | 84 B2 23 E5 B1 22 A9 81 0B E0 EF EF B4 83 E5 FD
00F0 | 09 8E C8 E7 D4 C0 55 5D 4D 36 74 2F 06 70 CD 2F
0100 | D7 B2 E4 D7 C6 CC AA 33 48 EF C8 0B C5 BF 9B 79
0110 | B4 B3 48 2A 8D 66 4E CE DE C6 06 F9 BC 67 C3 6E
0120 | EB D0 45 F5 E8 E4 A8 AE D6 57 D4 8D 6F D3 30 21
0130 | A5 E9 1C D7 CF 22 81 1A FD 04 09 59 87 3B 2E E4
0140 | F2 9E 9F 81 23 72 9F 6C 9B 69 4C 47 DA 1F 2E B5
0150 | 81 B1 12 D5</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 CC 70 0B 00 67 4B AE 66
0010 | 40 01 00 00 BE E4 12 D7 98 6F 64 A7 DD EA 29 51
0020 | 4E 0E 8D 15 D6 F2 76 D2 A5 02 24 04 0E D5 17 4D
0030 | F5 66 64 9C 15 AE 15 24 04 44 C8 28 D5 00 00 00
0040 | 04 4A 5D 64 A1 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 99 0B 0D A1 D9 78 93 E9 E6 91 14 75
0060 | 77 8E 7F 2B 61 69 11 D8 38 E1 10 78 CB 16 FB 58
0070 | 63 F7 EE D6 DF C8 FE 8B 8B 76 D1 FD 7A 8C 25 CA
0080 | 3B 5C DC D9 1A 8A 64 28 91 FC FB E6 D2 B3 53 1A
0090 | F6 B8 EF 06 39 60 F5 FE 92 81 4F A0 CC 02 7C 24
00A0 | C2 6F 14 2F F7 62 AC 32 69 0C 61 6D 36 AB DC A5
00B0 | FE 7C 37 C2 77 E6 EA 23 DC 09 F1 D9 12 F8 AF 2D
00C0 | BB 18 B9 00 7E AE 21 11 14 41 DD 0C 20 AA CB CF
00D0 | 20 91 C5 0E 57 78 A2 FD D2 4A 5A AD F1 41 5B B3
00E0 | 75 3F 0B 52 1A D1 DC E8 E8 25 B1 00 F1 8E 3A 59
00F0 | 3D ED 86 C6 FE FC 40 96 73 39 72 FB C8 39 69 CC
0100 | AC BB EC 4A 13 B5 7A 7A 39 5B 56 92 5C 82 3C C5
0110 | C3 9C A9 74 D2 0A 78 07 E0 EA 9B 94 E4 00 00 89
0120 | 3A 89 CB B9 A6 4C 62 4D F9 D0 05 A6 50 5E 2B 08
0130 | F5 81 C5 AB C2 26 24 55 39 97 1F CE 17 45 05 A1
0140 | 35 C8 0E 5B 6F D7 70 18 DA 11 BD A5 29 D9 1E 3D
0150 | 35 40 78 73</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 = 205B6E525EE93A7E9C311A9D868F778C32B40AA8E64095A7F0B54830A
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>486B0C00FF41AE66</code></td>
<td><code>CC700B00674BAE66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -363,25 +363,25 @@ random_padding_bytes = 205B6E525EE93A7E9C311A9D868F778C32B40AA8E64095A7F0B54830A
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>7BF4DAA01D3ED226DEF71A76395FD66D</code></td>
<td><code>986F64A7DDEA29514E0E8D15D6F276D2</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>EAE35E0758C0E48BB2BFEFCE74A678EB</code></td>
<td><code>A50224040ED5174DF566649C15AE1524</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>04457CB6FD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1165801213</td>
<td><code>0444C828D5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1153968341</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>046092E681000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1620240001</td>
<td><code>044A5D64A1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1247634593</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 = 205B6E525EE93A7E9C311A9D868F778C32B40AA8E64095A7F0B54830A
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE000100D95C66C9C9E3CB75836867AD</code> <code>85D761D8E0DA2F3A87E3675EA5F9B407</code> <code>F8EC484894A3E994151A2B07B6AA7568</code> <code>CC4587F99612764A6C3138228595A98D</code> <code>565657844EF00891FA9E59E3DB8319A1</code> <code>46D29D1482DB0A8F22B49A3748AB7C8B</code> <code>35CD50010AF69DFAE28B8BE36395A322</code> <code>67C2A68C4D6F54D701CCA14149B102F7</code> <code>D226692E35B187BCD45987B0AC0A2B37</code> <code>84B223E5B122A9810BE0EFEFB483E5FD</code> <code>098EC8E7D4C0555D4D36742F0670CD2F</code> <code>D7B2E4D7C6CCAA3348EFC80BC5BF9B79</code> <code>B4B3482A8D664ECEDEC606F9BC67C36E</code> <code>EBD045F5E8E4A8AED657D48D6FD33021</code> <code>A5E91CD7CF22811AFD040959873B2EE4</code> <code>F29E9F8123729F6C9B694C47DA1F2EB5</code><br> <code>81B112D5</code></td>
<td><code>FE000100990B0DA1D97893E9E6911475</code> <code>778E7F2B616911D838E11078CB16FB58</code> <code>63F7EED6DFC8FE8B8B76D1FD7A8C25CA</code> <code>3B5CDCD91A8A642891FCFBE6D2B3531A</code> <code>F6B8EF063960F5FE92814FA0CC027C24</code> <code>C26F142FF762AC32690C616D36ABDCA5</code> <code>FE7C37C277E6EA23DC09F1D912F8AF2D</code> <code>BB18B9007EAE21111441DD0C20AACBCF</code> <code>2091C50E5778A2FDD24A5AADF1415BB3</code> <code>753F0B521AD1DCE8E825B100F18E3A59</code> <code>3DED86C6FEFC4096733972FBC83969CC</code> <code>ACBBEC4A13B57A7A395B56925C823CC5</code> <code>C39CA974D20A7807E0EA9B94E4000089</code> <code>3A89CBB9A64C624DF9D005A6505E2B08</code> <code>F581C5ABC226245539971FCE174505A1</code> <code>35C80E5B6FD77018DA11BDA529D91E3D</code><br> <code>35407873</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 205B6E525EE93A7E9C311A9D868F778C32B40AA8E64095A7F0B54830A
<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 0C EB 37 00 42 AE 66
0010 | F0 02 00 00 5C 07 E8 D0 7B F4 DA A0 1D 3E D2 26
0020 | DE F7 1A 76 39 5F D6 6D EA E3 5E 07 58 C0 E4 8B
0030 | B2 BF EF CE 74 A6 78 EB FE 50 02 00 C4 9D 66 B7
0040 | 8E 6C D0 36 80 F1 64 C8 F0 F4 50 EE 75 12 7A 70
0050 | 94 98 DE E8 3C 3A B5 61 A9 8B 89 15 BF 2A F0 48
0060 | 83 6A 84 E3 6B 8A BD 20 E0 9A 52 FC E6 4F 14 38
0070 | D3 01 6E F3 53 A9 61 E9 B6 58 70 E0 EC DF 99 BC
0080 | DB D5 45 F2 5A A2 19 60 20 B9 C6 56 77 AC 09 F3
0090 | 86 35 68 F4 A2 1B C5 FD CB 7A 77 34 46 1E 78 E6
00A0 | 8F B3 63 67 25 D5 27 DC 58 54 F9 77 E7 51 12 6B
00B0 | EE 81 45 39 C1 EA BB A8 E8 0B F4 6C A6 70 CF 9F
00C0 | 79 4C D2 3B 14 A0 07 FD F4 2D 9E 68 8F 10 30 B5
00D0 | 2D E2 23 ED 0F 86 80 4F 20 57 41 F6 EA AD 88 8E
00E0 | 2A 10 90 67 1E 57 A6 C3 68 FE 9B 54 A5 D8 0B 2B
00F0 | 01 2B 0E 7A 78 EF CA 9D 6A D7 B8 61 59 26 20 FC
0100 | 33 CB 8D B4 B4 78 1A 62 42 EB E5 0A C2 C6 FB 54
0110 | 8D F8 D6 1E 00 AF A3 11 22 67 FB FF E2 E4 DC 64
0120 | E6 06 1D 34 45 53 B3 E9 FC 62 D5 6D BF 31 63 E0
0130 | B3 84 3E 91 65 E8 73 C6 AC 90 44 B9 B9 CD D3 6D
0140 | 7B 7C 8F 18 F7 E6 05 06 9B ED 87 2F FE CC 02 3C
0150 | FD 56 E3 E9 BA DC AE 0E 49 10 41 BA 81 3D 94 62
0160 | 16 94 1C 0C F0 8A DC 73 EA F6 85 49 21 4F D1 74
0170 | 92 89 B2 A0 71 53 22 8F C4 D7 DC 79 1B 57 F6 E3
0180 | 44 77 51 13 83 82 37 50 D9 F8 99 0E 0C 12 41 D7
0190 | 61 E1 21 AA 64 F3 0A 61 BE 89 35 6E B6 17 A7 FC
01A0 | 1F 4D 0B 89 51 12 3A 69 C3 3E 17 DA 63 9A 04 F6
01B0 | 63 DF 32 AB AE EE 5A 45 89 30 11 99 F8 5F 18 B7
01C0 | D7 76 76 9A 56 0F 84 90 F8 9A 63 8F FE 4C 36 08
01D0 | 44 8D 80 0B 54 6E E7 12 B5 AE 41 40 DE E2 85 EB
01E0 | 62 24 CA 6D D9 2F 23 27 77 04 EE E7 5F A7 99 6A
01F0 | 02 BB EF AA F6 A9 D6 36 14 AB 94 08 66 65 B2 09
0200 | D1 81 9A E1 55 B4 14 66 C5 11 E0 54 1D D8 8B B7
0210 | 7F 11 73 A9 F7 CA 3B 09 17 41 12 3F 7D C3 9F D3
0220 | D1 53 66 54 78 27 82 3A B3 87 32 A1 3F 66 A5 11
0230 | C8 02 FC 1F 83 9D AA 56 72 AB 74 4C C5 0D 78 D1
0240 | 54 11 7D 95 19 C1 2E 0C 73 BF 80 03 0D 25 32 9E
0250 | 3C 82 66 C6 0D 7D 80 EF 31 03 0E 25 A4 B2 60 46
0260 | E3 A9 25 7C 69 97 27 5D 8C C4 9D 97 2B 96 67 1D
0270 | F7 00 B1 02 07 97 B5 F4 A4 53 CF 80 43 9C B3 A0
0280 | 7E 10 BB B4 18 50 A2 A6 D4 0A F8 D0</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 FC DE 5A 68 4B AE 66
0010 | 84 02 00 00 5C 07 E8 D0 98 6F 64 A7 DD EA 29 51
0020 | 4E 0E 8D 15 D6 F2 76 D2 A5 02 24 04 0E D5 17 4D
0030 | F5 66 64 9C 15 AE 15 24 FE 50 02 00 7C 9C B6 FE
0040 | 47 ED E7 FB C4 2C 21 CD 7E EA D1 01 D0 FE 4B 0B
0050 | 50 89 0C 7C 61 AE 1A 04 E7 B6 67 34 10 3B 89 4E
0060 | 28 80 E1 9D 46 A2 44 52 DD 02 7F 9F E8 BF 41 10
0070 | 3B A2 C4 85 62 62 38 0A 9F CF 1D 86 11 6E 61 20
0080 | E5 90 BC CB BF CA D8 83 E3 2D 6A 57 CA 90 A0 60
0090 | 04 E3 6D FF E9 B8 80 F8 F1 EE 83 F6 6A 66 B0 A2
00A0 | 36 23 66 E8 B7 B7 AC C3 AF 3B 21 15 C1 A5 5C C3
00B0 | 02 0C 86 D1 39 69 9D A3 E2 83 A3 62 5B D8 B1 D4
00C0 | AE 4A 16 56 F0 C6 40 F2 A7 16 18 40 A4 0F C8 D6
00D0 | EF 99 ED 9F 96 4D FF 0D 6C 33 6B DE 1B B2 97 F2
00E0 | 52 17 86 3F 25 53 9B B7 75 76 02 B5 9D F3 4D 50
00F0 | 14 92 0F CF E2 82 20 57 F2 09 FC 60 65 F1 FD 53
0100 | 23 A8 28 9C D8 60 A8 48 71 28 53 25 1E 79 FE B8
0110 | F6 D5 47 44 57 87 29 6E 89 C0 DE 68 49 2A 2F 8B
0120 | BB DB 8D 34 32 D4 D6 AD AA 94 A4 2B 45 13 28 9D
0130 | BC 67 D6 FF 94 47 DB 4D E4 EF D8 BA 85 68 B6 DF
0140 | 1B D8 C1 60 27 7B 20 FB A3 80 00 7E D0 D9 B1 FC
0150 | 61 DF 36 96 77 A5 21 2C 88 E1 E5 08 D1 BF 3B 0C
0160 | 53 00 E4 B6 FE C0 AC AF 46 A9 89 E6 32 06 33 B9
0170 | E1 53 4A 22 8A 5A AA B9 1E 1F D0 8C 52 87 37 6A
0180 | 3E 5F D2 81 52 B2 04 4C 9A AE 2A 87 86 BB A5 90
0190 | 08 C0 4A CF 99 02 00 4B EA F6 77 67 40 AC C6 51
01A0 | 7A 6E FC 21 02 FF 6F 69 11 B0 83 3C 94 6D 91 9C
01B0 | DF 9D AF 04 D7 30 9F D5 0C 9C F3 3B 2B E8 35 1F
01C0 | 18 FD 99 4D F5 EA D2 20 44 EB F6 55 DC 35 DE 98
01D0 | 8E 0B 93 FC D3 EB 21 63 F6 DB 6D 45 75 BA D4 14
01E0 | 8F C8 5E B7 AA E2 C1 B8 21 1A 2D 5F 75 BB 46 1D
01F0 | 38 BD 8A 1F 42 23 34 3B 3B 62 66 5F 28 9C 5A 89
0200 | 12 59 46 56 D9 54 FD BC 97 33 67 F6 17 E9 D7 C0
0210 | B6 6F 3C DE 69 2C DE B3 A7 3E 0C FA 13 C9 CF EC
0220 | 1A EC C1 6E 91 2A 4B 2F 37 8E E0 5A AA 04 CC BE
0230 | 10 AB 8C 7D 6C 0D 72 26 8A 02 D0 F6 1F 02 F0 15
0240 | 68 92 69 81 4B 96 60 8B 27 57 85 E8 4E D9 47 08
0250 | 1D 74 85 DB 60 2E 8B CC 9A 0A A7 02 A3 24 23 B1
0260 | 6C 9E F1 37 6D C6 FC AC 77 A3 F6 9A C1 9A F2 51
0270 | 33 C1 A1 19 89 EF 7C D8 2E 41 26 F1 37 40 06 11
0280 | 96 3F 9E C7 AE 6A C5 BB 89 2E 5F 1D</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 = 205B6E525EE93A7E9C311A9D868F778C32B40AA8E64095A7F0B54830A
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>010CEB370042AE66</code></td>
<td><code>01FCDE5A684BAE66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>F0020000</code> (752 in decimal)</td>
<td><code>84020000</code> (644 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 205B6E525EE93A7E9C311A9D868F778C32B40AA8E64095A7F0B54830A
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>7BF4DAA01D3ED226DEF71A76395FD66D</code></td>
<td><code>986F64A7DDEA29514E0E8D15D6F276D2</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>EAE35E0758C0E48BB2BFEFCE74A678EB</code></td>
<td><code>A50224040ED5174DF566649C15AE1524</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200C49D66B78E6CD03680F164C8</code> <code>F0F450EE75127A709498DEE83C3AB561</code> <code>A98B8915BF2AF048836A84E36B8ABD20</code> <code>E09A52FCE64F1438D3016EF353A961E9</code> <code>B65870E0ECDF99BCDBD545F25AA21960</code> <code>20B9C65677AC09F3863568F4A21BC5FD</code> <code>CB7A7734461E78E68FB3636725D527DC</code> <code>5854F977E751126BEE814539C1EABBA8</code> <code>E80BF46CA670CF9F794CD23B14A007FD</code> <code>F42D9E688F1030B52DE223ED0F86804F</code> <code>205741F6EAAD888E2A1090671E57A6C3</code> <code>68FE9B54A5D80B2B012B0E7A78EFCA9D</code> <code>6AD7B861592620FC33CB8DB4B4781A62</code> <code>42EBE50AC2C6FB548DF8D61E00AFA311</code> <code>2267FBFFE2E4DC64E6061D344553B3E9</code> <code>FC62D56DBF3163E0B3843E9165E873C6</code> <code>AC9044B9B9CDD36D7B7C8F18F7E60506</code> <code>9BED872FFECC023CFD56E3E9BADCAE0E</code> <code>491041BA813D946216941C0CF08ADC73</code> <code>EAF68549214FD1749289B2A07153228F</code> <code>C4D7DC791B57F6E34477511383823750</code> <code>D9F8990E0C1241D761E121AA64F30A61</code> <code>BE89356EB617A7FC1F4D0B8951123A69</code> <code>C33E17DA639A04F663DF32ABAEEE5A45</code> <code>89301199F85F18B7D776769A560F8490</code> <code>F89A638FFE4C3608448D800B546EE712</code> <code>B5AE4140DEE285EB6224CA6DD92F2327</code> <code>7704EEE75FA7996A02BBEFAAF6A9D636</code> <code>14AB94086665B209D1819AE155B41466</code> <code>C511E0541DD88BB77F1173A9F7CA3B09</code> <code>1741123F7DC39FD3D15366547827823A</code> <code>B38732A13F66A511C802FC1F839DAA56</code> <code>72AB744CC50D78D154117D9519C12E0C</code> <code>73BF80030D25329E3C8266C60D7D80EF</code> <code>31030E25A4B26046E3A9257C6997275D</code> <code>8CC49D972B96671DF700B1020797B5F4</code> <code>A453CF80439CB3A07E10BBB41850A2A6</code><br> <code>D40AF8D0</code></td>
<td><code>FE5002007C9CB6FE47EDE7FBC42C21CD</code> <code>7EEAD101D0FE4B0B50890C7C61AE1A04</code> <code>E7B66734103B894E2880E19D46A24452</code> <code>DD027F9FE8BF41103BA2C4856262380A</code> <code>9FCF1D86116E6120E590BCCBBFCAD883</code> <code>E32D6A57CA90A06004E36DFFE9B880F8</code> <code>F1EE83F66A66B0A2362366E8B7B7ACC3</code> <code>AF3B2115C1A55CC3020C86D139699DA3</code> <code>E283A3625BD8B1D4AE4A1656F0C640F2</code> <code>A7161840A40FC8D6EF99ED9F964DFF0D</code> <code>6C336BDE1BB297F25217863F25539BB7</code> <code>757602B59DF34D5014920FCFE2822057</code> <code>F209FC6065F1FD5323A8289CD860A848</code> <code>712853251E79FEB8F6D547445787296E</code> <code>89C0DE68492A2F8BBBDB8D3432D4D6AD</code> <code>AA94A42B4513289DBC67D6FF9447DB4D</code> <code>E4EFD8BA8568B6DF1BD8C160277B20FB</code> <code>A380007ED0D9B1FC61DF369677A5212C</code> <code>88E1E508D1BF3B0C5300E4B6FEC0ACAF</code> <code>46A989E6320633B9E1534A228A5AAAB9</code> <code>1E1FD08C5287376A3E5FD28152B2044C</code> <code>9AAE2A8786BBA59008C04ACF9902004B</code> <code>EAF6776740ACC6517A6EFC2102FF6F69</code> <code>11B0833C946D919CDF9DAF04D7309FD5</code> <code>0C9CF33B2BE8351F18FD994DF5EAD220</code> <code>44EBF655DC35DE988E0B93FCD3EB2163</code> <code>F6DB6D4575BAD4148FC85EB7AAE2C1B8</code> <code>211A2D5F75BB461D38BD8A1F4223343B</code> <code>3B62665F289C5A8912594656D954FDBC</code> <code>973367F617E9D7C0B66F3CDE692CDEB3</code> <code>A73E0CFA13C9CFEC1AECC16E912A4B2F</code> <code>378EE05AAA04CCBE10AB8C7D6C0D7226</code> <code>8A02D0F61F02F015689269814B96608B</code> <code>275785E84ED947081D7485DB602E8BCC</code> <code>9A0AA702A32423B16C9EF1376DC6FCAC</code> <code>77A3F69AC19AF25133C1A11989EF7CD8</code> <code>2E4126F137400611963F9EC7AE6AC5BB</code><br> <code>892E5F1D</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 205B6E525EE93A7E9C311A9D868F778C32B40AA8E64095A7F0B54830A
<!-- 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 = C49D66B78E6CD03680F164C8F0F450EE75127A709498DEE83C3AB561A98B8915BF2AF048836A84E36B8ABD20E09A52FCE64F1438D3016EF353A961E9B65870E0ECDF99BCDBD545F25AA2196020B9C65677AC09F3863568F4A21BC5FDCB7A7734461E78E68FB3636725D527DC5854F977E751126BEE814539C1EABBA8E80BF46CA670CF9F794CD23B14A007FDF42D9E688F1030B52DE223ED0F86804F205741F6EAAD888E2A1090671E57A6C368FE9B54A5D80B2B012B0E7A78EFCA9D6AD7B861592620FC33CB8DB4B4781A6242EBE50AC2C6FB548DF8D61E00AFA3112267FBFFE2E4DC64E6061D344553B3E9FC62D56DBF3163E0B3843E9165E873C6AC9044B9B9CDD36D7B7C8F18F7E605069BED872FFECC023CFD56E3E9BADCAE0E491041BA813D946216941C0CF08ADC73EAF68549214FD1749289B2A07153228FC4D7DC791B57F6E34477511383823750D9F8990E0C1241D761E121AA64F30A61BE89356EB617A7FC1F4D0B8951123A69C33E17DA639A04F663DF32ABAEEE5A4589301199F85F18B7D776769A560F8490F89A638FFE4C3608448D800B546EE712B5AE4140DEE285EB6224CA6DD92F23277704EEE75FA7996A02BBEFAAF6A9D63614AB94086665B209D1819AE155B41466C511E0541DD88BB77F1173A9F7CA3B091741123F7DC39FD3D15366547827823AB38732A13F66A511C802FC1F839DAA5672AB744CC50D78D154117D9519C12E0C73BF80030D25329E3C8266C60D7D80EF31030E25A4B26046E3A9257C6997275D8CC49D972B96671DF700B1020797B5F4A453CF80439CB3A07E10BBB41850A2A6D40AF8D0
tmp_aes_key = 2A09CB2316555F817D3FB3A5670510B3E4A9836E4B383F9EB99E86EC09C2ABA2
tmp_aes_iv = 9350FDD9B8A18BB179E4E761F363B5AE463DE2ED9FABF58AEF904FBB4629AA8D</code></pre>
<pre><code>encrypted_answer = 7C9CB6FE47EDE7FBC42C21CD7EEAD101D0FE4B0B50890C7C61AE1A04E7B66734103B894E2880E19D46A24452DD027F9FE8BF41103BA2C4856262380A9FCF1D86116E6120E590BCCBBFCAD883E32D6A57CA90A06004E36DFFE9B880F8F1EE83F66A66B0A2362366E8B7B7ACC3AF3B2115C1A55CC3020C86D139699DA3E283A3625BD8B1D4AE4A1656F0C640F2A7161840A40FC8D6EF99ED9F964DFF0D6C336BDE1BB297F25217863F25539BB7757602B59DF34D5014920FCFE2822057F209FC6065F1FD5323A8289CD860A848712853251E79FEB8F6D547445787296E89C0DE68492A2F8BBBDB8D3432D4D6ADAA94A42B4513289DBC67D6FF9447DB4DE4EFD8BA8568B6DF1BD8C160277B20FBA380007ED0D9B1FC61DF369677A5212C88E1E508D1BF3B0C5300E4B6FEC0ACAF46A989E6320633B9E1534A228A5AAAB91E1FD08C5287376A3E5FD28152B2044C9AAE2A8786BBA59008C04ACF9902004BEAF6776740ACC6517A6EFC2102FF6F6911B0833C946D919CDF9DAF04D7309FD50C9CF33B2BE8351F18FD994DF5EAD22044EBF655DC35DE988E0B93FCD3EB2163F6DB6D4575BAD4148FC85EB7AAE2C1B8211A2D5F75BB461D38BD8A1F4223343B3B62665F289C5A8912594656D954FDBC973367F617E9D7C0B66F3CDE692CDEB3A73E0CFA13C9CFEC1AECC16E912A4B2F378EE05AAA04CCBE10AB8C7D6C0D72268A02D0F61F02F015689269814B96608B275785E84ED947081D7485DB602E8BCC9A0AA702A32423B16C9EF1376DC6FCAC77A3F69AC19AF25133C1A11989EF7CD82E4126F137400611963F9EC7AE6AC5BB892E5F1D
tmp_aes_key = A44135AA9E8C2BAC86949B14ECA5F27C08B11F0C16B920282C852BF645376715
tmp_aes_iv = FF950162823557628C3C6586D31EC8A3C0A7DDE6AFF79F993B46F855D0D6F471</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = FF10119CF1C6819637678D151572A62AF3217C95BA0D89B57BF4DAA01D3ED226DEF71A76395FD66DEAE35E0758C0E48BB2BFEFCE74A678EB03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100C3466BC328ADC5FA71BEF3CF70AFD9B49EE524B6D4215386345BB32244AC679AA6679DC8177DDC1B2ACFBAD82CC2EE855A90225F56C23B927E0AFDCC306038C6072B39296E53E5EA4B8A6279DF49CAD9C1F7F4BE0F0EA65F388422D7663B1F0D05738C829ACA9B59C9E5A8052C025BD734285C37E6935EFEE4391A4FABE8523C244FE04D6CDAA9FC7A70CCC025E1DE20FB9C1AEEECC93F5A89C0F68B5D38B9A020DC154280B7A03A5EEEB12757C4CE9E2058EF67DCD743F8CC45167F235831C48C1E97A05A0C8EBC624A00724681930455B6D53BB90976C562EDA9E3249260576517DF9BBF22FC1CEB07975CD263A21129FB49675DBC20B710DDB588EAC739E50042AE6694CB4F708F7E7738
answer = BA0D89B57BF4DAA01D3ED226DEF71A76395FD66DEAE35E0758C0E48BB2BFEFCE74A678EB03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100C3466BC328ADC5FA71BEF3CF70AFD9B49EE524B6D4215386345BB32244AC679AA6679DC8177DDC1B2ACFBAD82CC2EE855A90225F56C23B927E0AFDCC306038C6072B39296E53E5EA4B8A6279DF49CAD9C1F7F4BE0F0EA65F388422D7663B1F0D05738C829ACA9B59C9E5A8052C025BD734285C37E6935EFEE4391A4FABE8523C244FE04D6CDAA9FC7A70CCC025E1DE20FB9C1AEEECC93F5A89C0F68B5D38B9A020DC154280B7A03A5EEEB12757C4CE9E2058EF67DCD743F8CC45167F235831C48C1E97A05A0C8EBC624A00724681930455B6D53BB90976C562EDA9E3249260576517DF9BBF22FC1CEB07975CD263A21129FB49675DBC20B710DDB588EAC739E50042AE6694CB4F708F7E7738</code></pre>
<pre><code>answer_with_hash = 6701F663E989B85A8BDDBAFD97757F4F38A074E5BA0D89B5986F64A7DDEA29514E0E8D15D6F276D2A50224040ED5174DF566649C15AE152403000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002BBAA01F68318E1CB4DCF61B36930C77E7AB021C9B1B06E42CAB9C1561E30DE1156D5B5504B7B558CFC9A4FDDF61D78AB43562F243CD0791D9BD1E1FB48F5854C42D716EDC49D047E52621FDC447B165DAFE7FC93F8CA53D333686E1170893952A8278901617796656E138CCB3C4FFB7396DF8D730661456361D4B36DBD9A3253A051160B84E3643EBABDC93C1A2975B0BA06DEBA057A9F06279059486CC0726CA7FA8FFFF941035512A063ADD2AEE7839DB9F318B23ADC1FF8A0F1CBFB9EC19C5022721A15713DC05B119EA10C3D4B99FEFCDCFD3871F7949528F60F44529A03B5241E91589610C755FD3F311EB70706A79A799EE65386D43B9BB451A9E507C684BAE6677B14F7FD21E2F51
answer = BA0D89B5986F64A7DDEA29514E0E8D15D6F276D2A50224040ED5174DF566649C15AE152403000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002BBAA01F68318E1CB4DCF61B36930C77E7AB021C9B1B06E42CAB9C1561E30DE1156D5B5504B7B558CFC9A4FDDF61D78AB43562F243CD0791D9BD1E1FB48F5854C42D716EDC49D047E52621FDC447B165DAFE7FC93F8CA53D333686E1170893952A8278901617796656E138CCB3C4FFB7396DF8D730661456361D4B36DBD9A3253A051160B84E3643EBABDC93C1A2975B0BA06DEBA057A9F06279059486CC0726CA7FA8FFFF941035512A063ADD2AEE7839DB9F318B23ADC1FF8A0F1CBFB9EC19C5022721A15713DC05B119EA10C3D4B99FEFCDCFD3871F7949528F60F44529A03B5241E91589610C755FD3F311EB70706A79A799EE65386D43B9BB451A9E507C684BAE6677B14F7FD21E2F51</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 7B F4 DA A0 1D 3E D2 26 DE F7 1A 76
0010 | 39 5F D6 6D EA E3 5E 07 58 C0 E4 8B B2 BF EF CE
0020 | 74 A6 78 EB 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 98 6F 64 A7 DD EA 29 51 4E 0E 8D 15
0010 | D6 F2 76 D2 A5 02 24 04 0E D5 17 4D F5 66 64 9C
0020 | 15 AE 15 24 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 = BA0D89B57BF4DAA01D3ED226DEF71A76395FD66DEAE35E0758C0E48BB2BFEFCE74A678E
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 | C3 46 6B C3 28 AD C5 FA 71 BE F3 CF 70 AF D9 B4
0140 | 9E E5 24 B6 D4 21 53 86 34 5B B3 22 44 AC 67 9A
0150 | A6 67 9D C8 17 7D DC 1B 2A CF BA D8 2C C2 EE 85
0160 | 5A 90 22 5F 56 C2 3B 92 7E 0A FD CC 30 60 38 C6
0170 | 07 2B 39 29 6E 53 E5 EA 4B 8A 62 79 DF 49 CA D9
0180 | C1 F7 F4 BE 0F 0E A6 5F 38 84 22 D7 66 3B 1F 0D
0190 | 05 73 8C 82 9A CA 9B 59 C9 E5 A8 05 2C 02 5B D7
01A0 | 34 28 5C 37 E6 93 5E FE E4 39 1A 4F AB E8 52 3C
01B0 | 24 4F E0 4D 6C DA A9 FC 7A 70 CC C0 25 E1 DE 20
01C0 | FB 9C 1A EE EC C9 3F 5A 89 C0 F6 8B 5D 38 B9 A0
01D0 | 20 DC 15 42 80 B7 A0 3A 5E EE B1 27 57 C4 CE 9E
01E0 | 20 58 EF 67 DC D7 43 F8 CC 45 16 7F 23 58 31 C4
01F0 | 8C 1E 97 A0 5A 0C 8E BC 62 4A 00 72 46 81 93 04
0200 | 55 B6 D5 3B B9 09 76 C5 62 ED A9 E3 24 92 60 57
0210 | 65 17 DF 9B BF 22 FC 1C EB 07 97 5C D2 63 A2 11
0220 | 29 FB 49 67 5D BC 20 B7 10 DD B5 88 EA C7 39 E5
0230 | 00 42 AE 66</code></pre>
0130 | 2B BA A0 1F 68 31 8E 1C B4 DC F6 1B 36 93 0C 77
0140 | E7 AB 02 1C 9B 1B 06 E4 2C AB 9C 15 61 E3 0D E1
0150 | 15 6D 5B 55 04 B7 B5 58 CF C9 A4 FD DF 61 D7 8A
0160 | B4 35 62 F2 43 CD 07 91 D9 BD 1E 1F B4 8F 58 54
0170 | C4 2D 71 6E DC 49 D0 47 E5 26 21 FD C4 47 B1 65
0180 | DA FE 7F C9 3F 8C A5 3D 33 36 86 E1 17 08 93 95
0190 | 2A 82 78 90 16 17 79 66 56 E1 38 CC B3 C4 FF B7
01A0 | 39 6D F8 D7 30 66 14 56 36 1D 4B 36 DB D9 A3 25
01B0 | 3A 05 11 60 B8 4E 36 43 EB AB DC 93 C1 A2 97 5B
01C0 | 0B A0 6D EB A0 57 A9 F0 62 79 05 94 86 CC 07 26
01D0 | CA 7F A8 FF FF 94 10 35 51 2A 06 3A DD 2A EE 78
01E0 | 39 DB 9F 31 8B 23 AD C1 FF 8A 0F 1C BF B9 EC 19
01F0 | C5 02 27 21 A1 57 13 DC 05 B1 19 EA 10 C3 D4 B9
0200 | 9F EF CD CF D3 87 1F 79 49 52 8F 60 F4 45 29 A0
0210 | 3B 52 41 E9 15 89 61 0C 75 5F D3 F3 11 EB 70 70
0220 | 6A 79 A7 99 EE 65 38 6D 43 B9 BB 45 1A 9E 50 7C
0230 | 68 4B 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 = BA0D89B57BF4DAA01D3ED226DEF71A76395FD66DEAE35E0758C0E48BB2BFEFCE74A678E
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>7BF4DAA01D3ED226DEF71A76395FD66D</code></td>
<td><code>986F64A7DDEA29514E0E8D15D6F276D2</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>EAE35E0758C0E48BB2BFEFCE74A678EB</code></td>
<td><code>A50224040ED5174DF566649C15AE1524</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B57BF4DAA01D3ED226DEF71A76395FD66DEAE35E0758C0E48BB2BFEFCE74A678E
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE000100C3466BC328ADC5FA71BEF3CF</code> <code>70AFD9B49EE524B6D4215386345BB322</code> <code>44AC679AA6679DC8177DDC1B2ACFBAD8</code> <code>2CC2EE855A90225F56C23B927E0AFDCC</code> <code>306038C6072B39296E53E5EA4B8A6279</code> <code>DF49CAD9C1F7F4BE0F0EA65F388422D7</code> <code>663B1F0D05738C829ACA9B59C9E5A805</code> <code>2C025BD734285C37E6935EFEE4391A4F</code> <code>ABE8523C244FE04D6CDAA9FC7A70CCC0</code> <code>25E1DE20FB9C1AEEECC93F5A89C0F68B</code> <code>5D38B9A020DC154280B7A03A5EEEB127</code> <code>57C4CE9E2058EF67DCD743F8CC45167F</code> <code>235831C48C1E97A05A0C8EBC624A0072</code> <code>4681930455B6D53BB90976C562EDA9E3</code> <code>249260576517DF9BBF22FC1CEB07975C</code> <code>D263A21129FB49675DBC20B710DDB588</code><br> <code>EAC739E5</code></td>
<td><code>FE0001002BBAA01F68318E1CB4DCF61B</code> <code>36930C77E7AB021C9B1B06E42CAB9C15</code> <code>61E30DE1156D5B5504B7B558CFC9A4FD</code> <code>DF61D78AB43562F243CD0791D9BD1E1F</code> <code>B48F5854C42D716EDC49D047E52621FD</code> <code>C447B165DAFE7FC93F8CA53D333686E1</code> <code>170893952A8278901617796656E138CC</code> <code>B3C4FFB7396DF8D730661456361D4B36</code> <code>DBD9A3253A051160B84E3643EBABDC93</code> <code>C1A2975B0BA06DEBA057A9F062790594</code> <code>86CC0726CA7FA8FFFF941035512A063A</code> <code>DD2AEE7839DB9F318B23ADC1FF8A0F1C</code> <code>BFB9EC19C5022721A15713DC05B119EA</code> <code>10C3D4B99FEFCDCFD3871F7949528F60</code> <code>F44529A03B5241E91589610C755FD3F3</code> <code>11EB70706A79A799EE65386D43B9BB45</code><br> <code>1A9E507C</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>0042AE66</code> (1722696192 in decimal)</td>
<td><code>684BAE66</code> (1722698600 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B57BF4DAA01D3ED226DEF71A76395FD66DEAE35E0758C0E48BB2BFEFCE74A678E
<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 = 90F9FD5DCD676D3946745CB375CB929A9F15EC7ADAB1AEFF7B039C3FEB7DB7793D1F564DF22ADD2CF9EA46FF5F8CE0200B27CC5E1C778C65BACEF726BC57799F0FEFA969FC901B24051AB2D0890A5B9A6179C184BCE2E58D4F052A588E0E461A84528D0EB127B7CB473CDD47AF769BE4AF53F795578438730FC36D5B2B3F4AEDC9B391C6D645B269713C2AA7327B3883F704D1FF08AB3E231A6CED25316FE08ACC44F2F3771E7B3EFF120282C90B6997BAB9CD5DCF86FE29D04AC874193E4A517D9436A32D91B3A9FC1B963D1001094AFEE9761608A9704482AA425A96990FE9E689EA72472804B24ADA10EE01C2561D46EDFAD255A8EAE8405D6A2BB7F97DCB</code></pre>
<pre><code>b = 54DDBA8398983CC2DBBAA8348BA456295ECA6453F7BDF4AC05542AA16020129894833FACC43208368BB560F1957CAD964DA1E8588B577D2EA0FA435E5BE052C2FF16E31F5AC25C2C288A99ED9BA16A48351018CF24FDAF1CDE50D8B9587CEF1C765DD3A84EB04A3B31022D16BDF9AAFC7C2AA6A284F7A20EF1D59670E2EA1C39F48AD5A9CD87DA28CC9CA2CDBA1D851952AD2527A5C58AB5B45A2448D126AEE29FD4F1D6465C4DA1BCE5E243B943D87B75F1BC2EB6FE79FD45F0B28E57B63D196A6E7CF787F8E9E8411282AC5C4170C731318C365A595AA8CAF91B297D335A6D23B76A74F83D8FD91F3C48613724DDFABDFA72ABF7DFC5F20038673F6CC032CC</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 = 2FE913F17BFE9EF86F114857877E97500B407D4861575A019CE1D3E3F3803DF1B1662D546669DBE8BD67562B42654E191B5E6F712075B419DEA6C2CCB5698F3BBA636551B97360EA49F3C6B13892E6BE925313A7FAC9F7AB8B5DF9E589F3FA6E79AA1B899D63068252CEECDEBAC49DA553AD23B62B68ABE965975D9CF4464A623DC35C02868FE93BEEA370DCAECC5A1E6F9F4433F6CB46F4317FF2D69AD3B633295790F889791301E72E22252321038467DA3F843B446A9635105775512A351EEB54BDA02E22877F223562E21368D0107F626F9A9299395D9FF7274FE6B7716E28978ABC28AB0C3DCFEC2D30AEC5371AA11A1347056A19497F74BCA663390CAC</code></pre>
<pre><code>g_b = 81FAC94270A6CDD90B9AB63F17C7CC192D2CD65F31DCB5A18EC18F206956282A3B2D048F5A9C32FC10AE538D16D12649AE840447AFD19802452BCA28C0447389C063E9E79551B36FAE0EA72E39FDC302412C3FC293DA658B36BC435411793A32CE9125BD310FB517DC59E38EAD664965B900564B7B5EA328E46A132BA637C65B963F5452092FC1121FF8C6C2B9C9CC12FB72D5CB99CD8CDC703CE687715FB6ADCF753FFBAE27956DCD1BB424BCB026D259060C66787A71EFB3BCD566BF6832CC363495083BC72657C5A756D8748464B8E28E8A01CC8C962B06FF234DA3051E9E4824BDCDB7071B2A43E55E663B5A9A9AD4472997F696566B50F4B22516B4082E</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 7B F4 DA A0 1D 3E D2 26 DE F7 1A 76
0010 | 39 5F D6 6D EA E3 5E 07 58 C0 E4 8B B2 BF EF CE
0020 | 74 A6 78 EB 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 2F E9 13 F1 7B FE 9E F8 6F 11 48 57 87 7E 97 50
0040 | 0B 40 7D 48 61 57 5A 01 9C E1 D3 E3 F3 80 3D F1
0050 | B1 66 2D 54 66 69 DB E8 BD 67 56 2B 42 65 4E 19
0060 | 1B 5E 6F 71 20 75 B4 19 DE A6 C2 CC B5 69 8F 3B
0070 | BA 63 65 51 B9 73 60 EA 49 F3 C6 B1 38 92 E6 BE
0080 | 92 53 13 A7 FA C9 F7 AB 8B 5D F9 E5 89 F3 FA 6E
0090 | 79 AA 1B 89 9D 63 06 82 52 CE EC DE BA C4 9D A5
00A0 | 53 AD 23 B6 2B 68 AB E9 65 97 5D 9C F4 46 4A 62
00B0 | 3D C3 5C 02 86 8F E9 3B EE A3 70 DC AE CC 5A 1E
00C0 | 6F 9F 44 33 F6 CB 46 F4 31 7F F2 D6 9A D3 B6 33
00D0 | 29 57 90 F8 89 79 13 01 E7 2E 22 25 23 21 03 84
00E0 | 67 DA 3F 84 3B 44 6A 96 35 10 57 75 51 2A 35 1E
00F0 | EB 54 BD A0 2E 22 87 7F 22 35 62 E2 13 68 D0 10
0100 | 7F 62 6F 9A 92 99 39 5D 9F F7 27 4F E6 B7 71 6E
0110 | 28 97 8A BC 28 AB 0C 3D CF EC 2D 30 AE C5 37 1A
0120 | A1 1A 13 47 05 6A 19 49 7F 74 BC A6 63 39 0C AC</code></pre>
<pre><code>0000 | 54 B6 43 66 98 6F 64 A7 DD EA 29 51 4E 0E 8D 15
0010 | D6 F2 76 D2 A5 02 24 04 0E D5 17 4D F5 66 64 9C
0020 | 15 AE 15 24 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 81 FA C9 42 70 A6 CD D9 0B 9A B6 3F 17 C7 CC 19
0040 | 2D 2C D6 5F 31 DC B5 A1 8E C1 8F 20 69 56 28 2A
0050 | 3B 2D 04 8F 5A 9C 32 FC 10 AE 53 8D 16 D1 26 49
0060 | AE 84 04 47 AF D1 98 02 45 2B CA 28 C0 44 73 89
0070 | C0 63 E9 E7 95 51 B3 6F AE 0E A7 2E 39 FD C3 02
0080 | 41 2C 3F C2 93 DA 65 8B 36 BC 43 54 11 79 3A 32
0090 | CE 91 25 BD 31 0F B5 17 DC 59 E3 8E AD 66 49 65
00A0 | B9 00 56 4B 7B 5E A3 28 E4 6A 13 2B A6 37 C6 5B
00B0 | 96 3F 54 52 09 2F C1 12 1F F8 C6 C2 B9 C9 CC 12
00C0 | FB 72 D5 CB 99 CD 8C DC 70 3C E6 87 71 5F B6 AD
00D0 | CF 75 3F FB AE 27 95 6D CD 1B B4 24 BC B0 26 D2
00E0 | 59 06 0C 66 78 7A 71 EF B3 BC D5 66 BF 68 32 CC
00F0 | 36 34 95 08 3B C7 26 57 C5 A7 56 D8 74 84 64 B8
0100 | E2 8E 8A 01 CC 8C 96 2B 06 FF 23 4D A3 05 1E 9E
0110 | 48 24 BD CD B7 07 1B 2A 43 E5 5E 66 3B 5A 9A 9A
0120 | D4 47 29 97 F6 96 56 6B 50 F4 B2 25 16 B4 08 2E</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 = BA0D89B57BF4DAA01D3ED226DEF71A76395FD66DEAE35E0758C0E48BB2BFEFCE74A678E
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>7BF4DAA01D3ED226DEF71A76395FD66D</code></td>
<td><code>986F64A7DDEA29514E0E8D15D6F276D2</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>EAE35E0758C0E48BB2BFEFCE74A678EB</code></td>
<td><code>A50224040ED5174DF566649C15AE1524</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE0001002FE913F17BFE9EF86F114857</code> <code>877E97500B407D4861575A019CE1D3E3</code> <code>F3803DF1B1662D546669DBE8BD67562B</code> <code>42654E191B5E6F712075B419DEA6C2CC</code> <code>B5698F3BBA636551B97360EA49F3C6B1</code> <code>3892E6BE925313A7FAC9F7AB8B5DF9E5</code> <code>89F3FA6E79AA1B899D63068252CEECDE</code> <code>BAC49DA553AD23B62B68ABE965975D9C</code> <code>F4464A623DC35C02868FE93BEEA370DC</code> <code>AECC5A1E6F9F4433F6CB46F4317FF2D6</code> <code>9AD3B633295790F889791301E72E2225</code> <code>2321038467DA3F843B446A9635105775</code> <code>512A351EEB54BDA02E22877F223562E2</code> <code>1368D0107F626F9A9299395D9FF7274F</code> <code>E6B7716E28978ABC28AB0C3DCFEC2D30</code> <code>AEC5371AA11A1347056A19497F74BCA6</code><br> <code>63390CAC</code></td>
<td><code>FE00010081FAC94270A6CDD90B9AB63F</code> <code>17C7CC192D2CD65F31DCB5A18EC18F20</code> <code>6956282A3B2D048F5A9C32FC10AE538D</code> <code>16D12649AE840447AFD19802452BCA28</code> <code>C0447389C063E9E79551B36FAE0EA72E</code> <code>39FDC302412C3FC293DA658B36BC4354</code> <code>11793A32CE9125BD310FB517DC59E38E</code> <code>AD664965B900564B7B5EA328E46A132B</code> <code>A637C65B963F5452092FC1121FF8C6C2</code> <code>B9C9CC12FB72D5CB99CD8CDC703CE687</code> <code>715FB6ADCF753FFBAE27956DCD1BB424</code> <code>BCB026D259060C66787A71EFB3BCD566</code> <code>BF6832CC363495083BC72657C5A756D8</code> <code>748464B8E28E8A01CC8C962B06FF234D</code> <code>A3051E9E4824BDCDB7071B2A43E55E66</code> <code>3B5A9A9AD4472997F696566B50F4B225</code><br> <code>16B4082E</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 = BA0D89B57BF4DAA01D3ED226DEF71A76395FD66DEAE35E0758C0E48BB2BFEFCE74A678E
<!-- 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 = 54B643667BF4DAA01D3ED226DEF71A76395FD66DEAE35E0758C0E48BB2BFEFCE74A678EB0000000000000000FE0001002FE913F17BFE9EF86F114857877E97500B407D4861575A019CE1D3E3F3803DF1B1662D546669DBE8BD67562B42654E191B5E6F712075B419DEA6C2CCB5698F3BBA636551B97360EA49F3C6B13892E6BE925313A7FAC9F7AB8B5DF9E589F3FA6E79AA1B899D63068252CEECDEBAC49DA553AD23B62B68ABE965975D9CF4464A623DC35C02868FE93BEEA370DCAECC5A1E6F9F4433F6CB46F4317FF2D69AD3B633295790F889791301E72E22252321038467DA3F843B446A9635105775512A351EEB54BDA02E22877F223562E21368D0107F626F9A9299395D9FF7274FE6B7716E28978ABC28AB0C3DCFEC2D30AEC5371AA11A1347056A19497F74BCA663390CAC
padding = D8226BD895F4DA71838A4E15
tmp_aes_key = 2A09CB2316555F817D3FB3A5670510B3E4A9836E4B383F9EB99E86EC09C2ABA2
tmp_aes_iv = 9350FDD9B8A18BB179E4E761F363B5AE463DE2ED9FABF58AEF904FBB4629AA8D</code></pre>
<pre><code>data = 54B64366986F64A7DDEA29514E0E8D15D6F276D2A50224040ED5174DF566649C15AE15240000000000000000FE00010081FAC94270A6CDD90B9AB63F17C7CC192D2CD65F31DCB5A18EC18F206956282A3B2D048F5A9C32FC10AE538D16D12649AE840447AFD19802452BCA28C0447389C063E9E79551B36FAE0EA72E39FDC302412C3FC293DA658B36BC435411793A32CE9125BD310FB517DC59E38EAD664965B900564B7B5EA328E46A132BA637C65B963F5452092FC1121FF8C6C2B9C9CC12FB72D5CB99CD8CDC703CE687715FB6ADCF753FFBAE27956DCD1BB424BCB026D259060C66787A71EFB3BCD566BF6832CC363495083BC72657C5A756D8748464B8E28E8A01CC8C962B06FF234DA3051E9E4824BDCDB7071B2A43E55E663B5A9A9AD4472997F696566B50F4B22516B4082E
padding = 9C866DF39A2B96056D276D7B
tmp_aes_key = A44135AA9E8C2BAC86949B14ECA5F27C08B11F0C16B920282C852BF645376715
tmp_aes_iv = FF950162823557628C3C6586D31EC8A3C0A7DDE6AFF79F993B46F855D0D6F471</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 = 373EB48F6603F510965AD884570C2C617B9EE37DA7F83CC9A9B8E954213D2CAF26FDB91B3EC626CCDC4935EF3249518C730845866A49DD87DA14CCE2E277232EB62E4C137E2CE85512C5044A4055AF993FCB77303F47D47E0B7D837BF82A2CDA34BEDE1C7C442F7DB5E9E3BCDD57F676840841C4B69B835BC8F9D56D780F81C457C18F5897359117294074874A7AB47C55986ED005477EE29B88FFA1DE64C160D4C90EACDAB9AB8D9960C67ADEF76B0FFEFB8C361FCEC9602BCE69FE482434809F846A95180DB3F383DE8AE845FDFB7C97AC290D35760CBF52D88149D75B649E28EACF938AF6F705AE3BDE6FF074F90DCC909058CD01A450A571C8BB38AF8DF20CE6B96AE218EFA7D2F9812075C413D4BC66606140C2CF6BC24FB8394D08A848B48E1ECF2440238292E1F2537E82CD7FADBFD666E181BCA1D0194FD79B168D08CD589D982A9A16B45B2ACBC14BCF94C9</code></pre>
<pre><code>encrypted_data = ABE1B56BE263762EA0D5E710BF0A2AD10C393B30D7AEC4E33C0FDF67A1FF5B6F263B827858AF464E62545D4FC2153DFBF33B8DAB02E361C2772CB266500F688B3827A2AEBCFA6585B66C07B185FF620BECBD28A1958CBB4EEC14229EFD37A110C160AE2EE3388123EAB0025B553C27470DB21C6E6D06CFAE4BDCE6297E6AC2A1FC387AA0FA5D3ABD5B8C8305E0B401B79F40F2E3C7456DBB7F23B324326354C721E88034A6229F5471719C2778A242F46B752A909D30E2EB28654F8EBE53DA516DEE189E199CDC09678B40A65C1D9854B3A4E45188D36D962175125C2781067DE1322E66787E0279B822FFE6BC0CD34B493356F87BCFF15EDE597EA7347E40E5F599C9F6869A77AF6D2F1DA0E8CC26E03EC2535707E56E3D337CCC331FB98C7C66FCE5CD56C5BC6F2D77E0BD42F4CDB72B65A25F0CF01CE147C7D1580C974B6FC3BE4DF316B9D6FE6A1AB87423C3DB7E</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 78 0C 04 00 00 42 AE 66
0010 | 78 01 00 00 1F 5F 04 F5 7B F4 DA A0 1D 3E D2 26
0020 | DE F7 1A 76 39 5F D6 6D EA E3 5E 07 58 C0 E4 8B
0030 | B2 BF EF CE 74 A6 78 EB FE 50 01 00 37 3E B4 8F
0040 | 66 03 F5 10 96 5A D8 84 57 0C 2C 61 7B 9E E3 7D
0050 | A7 F8 3C C9 A9 B8 E9 54 21 3D 2C AF 26 FD B9 1B
0060 | 3E C6 26 CC DC 49 35 EF 32 49 51 8C 73 08 45 86
0070 | 6A 49 DD 87 DA 14 CC E2 E2 77 23 2E B6 2E 4C 13
0080 | 7E 2C E8 55 12 C5 04 4A 40 55 AF 99 3F CB 77 30
0090 | 3F 47 D4 7E 0B 7D 83 7B F8 2A 2C DA 34 BE DE 1C
00A0 | 7C 44 2F 7D B5 E9 E3 BC DD 57 F6 76 84 08 41 C4
00B0 | B6 9B 83 5B C8 F9 D5 6D 78 0F 81 C4 57 C1 8F 58
00C0 | 97 35 91 17 29 40 74 87 4A 7A B4 7C 55 98 6E D0
00D0 | 05 47 7E E2 9B 88 FF A1 DE 64 C1 60 D4 C9 0E AC
00E0 | DA B9 AB 8D 99 60 C6 7A DE F7 6B 0F FE FB 8C 36
00F0 | 1F CE C9 60 2B CE 69 FE 48 24 34 80 9F 84 6A 95
0100 | 18 0D B3 F3 83 DE 8A E8 45 FD FB 7C 97 AC 29 0D
0110 | 35 76 0C BF 52 D8 81 49 D7 5B 64 9E 28 EA CF 93
0120 | 8A F6 F7 05 AE 3B DE 6F F0 74 F9 0D CC 90 90 58
0130 | CD 01 A4 50 A5 71 C8 BB 38 AF 8D F2 0C E6 B9 6A
0140 | E2 18 EF A7 D2 F9 81 20 75 C4 13 D4 BC 66 60 61
0150 | 40 C2 CF 6B C2 4F B8 39 4D 08 A8 48 B4 8E 1E CF
0160 | 24 40 23 82 92 E1 F2 53 7E 82 CD 7F AD BF D6 66
0170 | E1 81 BC A1 D0 19 4F D7 9B 16 8D 08 CD 58 9D 98
0180 | 2A 9A 16 B4 5B 2A CB C1 4B CF 94 C9</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 78 A7 06 00 68 4B AE 66
0010 | 78 01 00 00 1F 5F 04 F5 98 6F 64 A7 DD EA 29 51
0020 | 4E 0E 8D 15 D6 F2 76 D2 A5 02 24 04 0E D5 17 4D
0030 | F5 66 64 9C 15 AE 15 24 FE 50 01 00 AB E1 B5 6B
0040 | E2 63 76 2E A0 D5 E7 10 BF 0A 2A D1 0C 39 3B 30
0050 | D7 AE C4 E3 3C 0F DF 67 A1 FF 5B 6F 26 3B 82 78
0060 | 58 AF 46 4E 62 54 5D 4F C2 15 3D FB F3 3B 8D AB
0070 | 02 E3 61 C2 77 2C B2 66 50 0F 68 8B 38 27 A2 AE
0080 | BC FA 65 85 B6 6C 07 B1 85 FF 62 0B EC BD 28 A1
0090 | 95 8C BB 4E EC 14 22 9E FD 37 A1 10 C1 60 AE 2E
00A0 | E3 38 81 23 EA B0 02 5B 55 3C 27 47 0D B2 1C 6E
00B0 | 6D 06 CF AE 4B DC E6 29 7E 6A C2 A1 FC 38 7A A0
00C0 | FA 5D 3A BD 5B 8C 83 05 E0 B4 01 B7 9F 40 F2 E3
00D0 | C7 45 6D BB 7F 23 B3 24 32 63 54 C7 21 E8 80 34
00E0 | A6 22 9F 54 71 71 9C 27 78 A2 42 F4 6B 75 2A 90
00F0 | 9D 30 E2 EB 28 65 4F 8E BE 53 DA 51 6D EE 18 9E
0100 | 19 9C DC 09 67 8B 40 A6 5C 1D 98 54 B3 A4 E4 51
0110 | 88 D3 6D 96 21 75 12 5C 27 81 06 7D E1 32 2E 66
0120 | 78 7E 02 79 B8 22 FF E6 BC 0C D3 4B 49 33 56 F8
0130 | 7B CF F1 5E DE 59 7E A7 34 7E 40 E5 F5 99 C9 F6
0140 | 86 9A 77 AF 6D 2F 1D A0 E8 CC 26 E0 3E C2 53 57
0150 | 07 E5 6E 3D 33 7C CC 33 1F B9 8C 7C 66 FC E5 CD
0160 | 56 C5 BC 6F 2D 77 E0 BD 42 F4 CD B7 2B 65 A2 5F
0170 | 0C F0 1C E1 47 C7 D1 58 0C 97 4B 6F C3 BE 4D F3
0180 | 16 B9 D6 FE 6A 1A B8 74 23 C3 DB 7E</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>780C04000042AE66</code></td>
<td><code>78A70600684BAE66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 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>7BF4DAA01D3ED226DEF71A76395FD66D</code></td>
<td><code>986F64A7DDEA29514E0E8D15D6F276D2</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>EAE35E0758C0E48BB2BFEFCE74A678EB</code></td>
<td><code>A50224040ED5174DF566649C15AE1524</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100373EB48F6603F510965AD884</code> <code>570C2C617B9EE37DA7F83CC9A9B8E954</code> <code>213D2CAF26FDB91B3EC626CCDC4935EF</code> <code>3249518C730845866A49DD87DA14CCE2</code> <code>E277232EB62E4C137E2CE85512C5044A</code> <code>4055AF993FCB77303F47D47E0B7D837B</code> <code>F82A2CDA34BEDE1C7C442F7DB5E9E3BC</code> <code>DD57F676840841C4B69B835BC8F9D56D</code> <code>780F81C457C18F589735911729407487</code> <code>4A7AB47C55986ED005477EE29B88FFA1</code> <code>DE64C160D4C90EACDAB9AB8D9960C67A</code> <code>DEF76B0FFEFB8C361FCEC9602BCE69FE</code> <code>482434809F846A95180DB3F383DE8AE8</code> <code>45FDFB7C97AC290D35760CBF52D88149</code> <code>D75B649E28EACF938AF6F705AE3BDE6F</code> <code>F074F90DCC909058CD01A450A571C8BB</code> <code>38AF8DF20CE6B96AE218EFA7D2F98120</code> <code>75C413D4BC66606140C2CF6BC24FB839</code> <code>4D08A848B48E1ECF2440238292E1F253</code> <code>7E82CD7FADBFD666E181BCA1D0194FD7</code> <code>9B168D08CD589D982A9A16B45B2ACBC1</code><br> <code>4BCF94C9</code></td>
<td><code>FE500100ABE1B56BE263762EA0D5E710</code> <code>BF0A2AD10C393B30D7AEC4E33C0FDF67</code> <code>A1FF5B6F263B827858AF464E62545D4F</code> <code>C2153DFBF33B8DAB02E361C2772CB266</code> <code>500F688B3827A2AEBCFA6585B66C07B1</code> <code>85FF620BECBD28A1958CBB4EEC14229E</code> <code>FD37A110C160AE2EE3388123EAB0025B</code> <code>553C27470DB21C6E6D06CFAE4BDCE629</code> <code>7E6AC2A1FC387AA0FA5D3ABD5B8C8305</code> <code>E0B401B79F40F2E3C7456DBB7F23B324</code> <code>326354C721E88034A6229F5471719C27</code> <code>78A242F46B752A909D30E2EB28654F8E</code> <code>BE53DA516DEE189E199CDC09678B40A6</code> <code>5C1D9854B3A4E45188D36D962175125C</code> <code>2781067DE1322E66787E0279B822FFE6</code> <code>BC0CD34B493356F87BCFF15EDE597EA7</code> <code>347E40E5F599C9F6869A77AF6D2F1DA0</code> <code>E8CC26E03EC2535707E56E3D337CCC33</code> <code>1FB98C7C66FCE5CD56C5BC6F2D77E0BD</code> <code>42F4CDB72B65A25F0CF01CE147C7D158</code> <code>0C974B6FC3BE4DF316B9D6FE6A1AB874</code><br> <code>23C3DB7E</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 = 7ED025CC629ABBB40C4B812FF856EDC8B6950F73C275C3C99F6E9DB52709EE9B2475B0A0A0491D1FAA27D58B036339BFA089EC8E70A53125EB15B46B294A0906A62C5613AB1A2C70209A91CE3A850BC29329127433F776F591DC11A3D85305FB82B6D14B90D219F207A4E28541180C2957BB61B39F65671FC3F1A328FE3F1A3E64476749FE4B6256AD35C4077C7A52C913D2D036E6089166AA1D905AD6E2D9578F59EC4380248B8AE288E29C76CE2F7F9348E7F305C5DD6F6B7D1779428DB259D14F6C0DC16D06CE642521C562FAB4AB26E742E3681E2FAD060A60F68480174A3EA4B81E8BE9F6DCDA0208443E7FECCD4D323EE6BF6F1DE95D7DE2B79623A81C</code></pre>
<pre><code>auth_key = 29952891DEB88692CDBE7786DF0A8E36BF22842EF5DE2DA64E09811931C660F539C30850E21A95F6039A0F83436EF692E96D9F66A75209DC33935072E531363C5D58BE1F9C2C53C66AA224D612AF301A2E54E6EEFB8AC0A785F6134692100C91508ACAAE31F874C3614FBDF8759B8CA9EABA2B9A07E98FB274738A9D61F99ED1C2665CB44B920DEE33B84DF427240F83C59DEF87211C36BB0A99E69655091A7BD96358F6EFF595CF729471DC9586FB460C5E8854EBBD82CEE228811C432D7E3054CE43652216F74D6EA8AFC0E5589337C23DAA0F5E4EE4ADA2B53DC68511EAA493C4F9740718C7AA69112EFFF6B2644BD509B20C6E3472765ED1476035EC580A</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 E8 BF C7 00 42 AE 66
0010 | 4C 00 00 00 34 F7 CB 3B 7B F4 DA A0 1D 3E D2 26
0020 | DE F7 1A 76 39 5F D6 6D EA E3 5E 07 58 C0 E4 8B
0030 | B2 BF EF CE 74 A6 78 EB 5E 1F 60 95 FA AC 51 75
0040 | 54 78 03 60 D3 71 8F 6E</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 D0 ED F3 68 4B AE 66
0010 | 94 00 00 00 34 F7 CB 3B 98 6F 64 A7 DD EA 29 51
0020 | 4E 0E 8D 15 D6 F2 76 D2 A5 02 24 04 0E D5 17 4D
0030 | F5 66 64 9C 15 AE 15 24 BF 15 02 47 83 45 01 C5
0040 | 3B 1E E2 0F DC 89 E0 E4</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>01E8BFC70042AE66</code></td>
<td><code>01D0EDF3684BAE66</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>4C000000</code> (76 in decimal)</td>
<td><code>94000000</code> (148 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>7BF4DAA01D3ED226DEF71A76395FD66D</code></td>
<td><code>986F64A7DDEA29514E0E8D15D6F276D2</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>EAE35E0758C0E48BB2BFEFCE74A678EB</code></td>
<td><code>A50224040ED5174DF566649C15AE1524</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>5E1F6095FAAC517554780360D3718F6E</code></td>
<td><code>BF150247834501C53B1EE20FDC89E0E4</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>

View file

@ -587,6 +587,8 @@ i.icon {
right: 0;
top: 0;
z-index: 100;
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
background-color: var(--header-bg-color);
-webkit-backdrop-filter: blur(25px);
backdrop-filter: blur(25px);
@ -937,6 +939,7 @@ a.tm-pagination-item.active:focus {
right: 0;
top: 0;
bottom: 0;
padding-bottom: env(safe-area-inset-bottom);
background: var(--bg-color);
transition: transform var(--def-transition);
}
@ -1135,6 +1138,8 @@ a.tm-menu-link:focus {
}
.tm-footer {
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
background-color: var(--footer-bg-color);
}
.tm-footer-links {
@ -1305,7 +1310,7 @@ a.tm-menu-link:focus {
.tm-main {
margin: 0 auto;
width: 100%;
width: auto;
max-width: 480px;
padding-bottom: 70px;
flex-grow: 1;
@ -3816,6 +3821,9 @@ a.tm-table-action-link:hover {
.tm-main {
max-width: 720px;
box-sizing: content-box;
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
.tm-main-premium {
max-width: 480px;