Update content of files

This commit is contained in:
GitHub Action 2024-07-25 15:21:43 +00:00
parent 2ffbe2debb
commit 92236ec62c
3 changed files with 232 additions and 207 deletions

View file

@ -256,6 +256,21 @@
<a href="/method/account.getReactionsNotifySettings">account.getReactionsNotifySettings</a>#06dd654c = <a href="/type/ReactionsNotifySettings">ReactionsNotifySettings</a>;
<a href="/method/account.setReactionsNotifySettings">account.setReactionsNotifySettings</a>#316ce548 settings:<a href="/type/ReactionsNotifySettings">ReactionsNotifySettings</a> = <a href="/type/ReactionsNotifySettings">ReactionsNotifySettings</a>;<br></code></pre></div>
<h3><a class="anchor" href="#layer-177" id="layer-177" name="layer-177"><i class="anchor-icon"></i></a><a href="/schema?layer=177">Layer 177</a></h3>
<p>This layer adds the following features:</p>
<ul>
<li><a href="/api/revenue">Channel ad revenue »</a> - Telegram channel owners can now receive 50% of the revenue from ads displayed in their channels, as well as view detailed revenue statistics. </li>
<li><a href="/api/business#connected-bots">Telegram Business connected bots »</a> (bot-side constructors)</li>
<li><a href="/api/business#business-introduction">Telegram Business introduction »</a></li>
<li><a href="/api/business#business-chat-links">Telegram Business chat links »</a></li>
<li><a href="/api/fragment">Fetch info about Fragment collectibles »</a></li>
<li><a href="/api/profile#birthday">Birthdays »</a></li>
<li><a href="/api/profile#personal-channel">Linked personal channels »</a></li>
<li><a href="/api/sponsored-messages#reporting-sponsored-messages">Report ads »</a></li>
<li><a href="/method/channels.restrictSponsoredMessages">Disable ads on boosted channels you own »</a></li>
<li><a href="/method/stickers.replaceSticker">Replace single stickers in stickersets »</a></li>
<li><a href="/method/messages.getMyStickers">Fetch all stickersets owned by the current account »</a></li>
<li>A refactored and improved <a href="/api/invites#direct-invites">channel/supergroup/group invitation flow »</a></li>
</ul>
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
<ul>
@ -432,6 +447,16 @@
<a href="/method/stats.getBroadcastRevenueTransactions">stats.getBroadcastRevenueTransactions</a>#0069280f channel:<a href="/type/InputChannel">InputChannel</a> offset:<a href="/type/int">int</a> limit:<a href="/type/int">int</a> = <a href="/type/stats.BroadcastRevenueTransactions">stats.BroadcastRevenueTransactions</a>;<br>
<a href="/method/channels.restrictSponsoredMessages">channels.restrictSponsoredMessages</a>#9ae91519 channel:<a href="/type/InputChannel">InputChannel</a> restricted:<a href="/type/Bool">Bool</a> = <a href="/type/Updates">Updates</a>;<br></code></pre></div>
<h3><a class="anchor" href="#layer-176" id="layer-176" name="layer-176"><i class="anchor-icon"></i></a><a href="/schema?layer=176">Layer 176</a></h3>
<p>This layer introduces <a href="/api/business">Telegram Business »</a>, with a plethora of new features:</p>
<ul>
<li><a href="/api/business#opening-hours">Telegram Business opening hours »</a></li>
<li><a href="/api/business#location">Telegram Business location »</a></li>
<li><a href="/api/business#quick-reply-shortcuts">Telegram Business quick reply shortcuts »</a></li>
<li><a href="/api/business#greeting-messages">Telegram Business greeting messages »</a></li>
<li><a href="/api/business#away-messages">Telegram Business away messages »</a></li>
<li><a href="/api/business#connected-bots">Telegram Business connected bots »</a> (user-side constructors)</li>
<li><a href="/api/business#folder-tags">Telegram Business folder tags »</a></li>
</ul>
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
<ul>
@ -581,7 +606,7 @@
<li><a href="/method/messages.getOutboxReadDate">Exact read dates in private messages »</a></li>
<li>Disabling signup notifications for new users via <a href="/method/auth.signUp">no_joined_notifications »</a></li>
<li>Improvements to <a href="/api/saved-messages#tags">saved message tags »</a> (search for tagged messages only in certain <a href="/api/saved-messages#saved-message-dialogs">saved message dialogs »</a>).</li>
<li><a href="/api/stories">Stories for groups</a></li>
<li><a href="/api/stories">Stories for groups »</a></li>
</ul>
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>

View file

@ -42,7 +42,7 @@
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.getMyStickers" >messages.getMyStickers</a></li></ul></div>
<h1 id="dev_page_title">messages.getMyStickers</h1>
<div id="dev_page_content"><p>Fetch <a href="/api/stickers">stickerset owned by the current user</a>.</p>
<div id="dev_page_content"><p>Fetch all <a href="/api/stickers">stickersets »</a> owned by the current user.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">

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 1C DF 07 00 6D 4C A1 66
0010 | 14 00 00 00 F1 8E 7E BE 63 87 AF ED 66 02 EE C4
0020 | BE 34 FF AB CB 78 31 46</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 0C E8 09 00 72 64 A2 66
0010 | 14 00 00 00 F1 8E 7E BE 8B FC FA 60 96 C5 00 12
0020 | F6 4C 5A DF 97 62 83 FB</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>1CDF07006D4CA166</code></td>
<td><code>0CE809007264A266</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>6387AFED6602EEC4BE34FFABCB783146</code></td>
<td><code>8BFCFA6096C50012F64C5ADF976283FB</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 54 82 F4 6D 4C A1 66
0010 | BC 00 00 00 63 24 16 05 63 87 AF ED 66 02 EE C4
0020 | BE 34 FF AB CB 78 31 46 91 81 A5 0F 01 24 0C A8
0030 | 58 79 08 6C 85 0C 6C 58 08 1F 93 90 C2 6C D9 D8
0040 | E5 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 04 50 73 72 64 A2 66
0010 | 7C 00 00 00 63 24 16 05 8B FC FA 60 96 C5 00 12
0020 | F6 4C 5A DF 97 62 83 FB E3 0B C5 CB 5D 67 71 98
0030 | 50 5F 75 42 9F 74 75 BF 08 0F 51 1E E3 5C D8 E9
0040 | 17 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>015482F46D4CA166</code></td>
<td><code>010450737264A266</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>BC000000</code> (188 in decimal)</td>
<td><code>7C000000</code> (124 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>6387AFED6602EEC4BE34FFABCB783146</code></td>
<td><code>8BFCFA6096C50012F64C5ADF976283FB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>9181A50F01240CA85879086C850C6C58</code></td>
<td><code>E30BC5CB5D677198505F75429F7475BF</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>081F9390C26CD9D8E5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2275321401476503781</td>
<td><code>080F511EE35CD8E917000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1103697345546610967</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 = 2275321401476503781</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2275321401476503781 = 1239149183 * 1836196507</code></p>
<pre><code>p = 1239149183
q = 1836196507</code></pre>
<pre><code>pq = 1103697345546610967</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1103697345546610967 = 1014582419 * 1087834093</code></p>
<pre><code>p = 1014582419
q = 1087834093</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 1F 93 90 C2 6C D9 D8 E5 00 00 00
0010 | 04 49 DB EA 7F 00 00 00 04 6D 72 22 9B 00 00 00
0020 | 63 87 AF ED 66 02 EE C4 BE 34 FF AB CB 78 31 46
0030 | 91 81 A5 0F 01 24 0C A8 58 79 08 6C 85 0C 6C 58
0040 | 5E 49 3C EC F0 53 CD 5D B9 A4 CF CF 43 9E 30 1B
0050 | 7D D6 65 88 10 55 C1 AB 0D 63 D0 A9 7E 76 57 63
<pre><code>0000 | 95 5F F5 A9 08 0F 51 1E E3 5C D8 E9 17 00 00 00
0010 | 04 3C 79 4C 93 00 00 00 04 40 D7 07 ED 00 00 00
0020 | 8B FC FA 60 96 C5 00 12 F6 4C 5A DF 97 62 83 FB
0030 | E3 0B C5 CB 5D 67 71 98 50 5F 75 42 9F 74 75 BF
0040 | 9E BF DF 4C 03 6E 07 CB 8C A8 4D 19 4C F9 DD 8C
0050 | 9A 5C D6 EC 71 01 B3 DE 00 5C B3 9E 9D BE 9B C4
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 = 1836196507</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>081F9390C26CD9D8E5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2275321401476503781</td>
<td><code>080F511EE35CD8E917000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1103697345546610967</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>0449DBEA7F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1239149183</td>
<td><code>043C794C93000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1014582419</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>046D72229B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1836196507</td>
<td><code>0440D707ED000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1087834093</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>6387AFED6602EEC4BE34FFABCB783146</code></td>
<td><code>8BFCFA6096C50012F64C5ADF976283FB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>9181A50F01240CA85879086C850C6C58</code></td>
<td><code>E30BC5CB5D677198505F75429F7475BF</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>5E493CECF053CD5DB9A4CFCF439E301B</code> <code>7DD665881055C1AB0D63D0A97E765763</code></td>
<td><code>9EBFDF4C036E07CB8CA84D194CF9DD8C</code> <code>9A5CD6EC7101B3DE005CB39E9DBE9BC4</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1836196507</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 = 955FF5A9081F9390C26CD9D8E50000000449DBEA7F000000046D72229B0000006387AFED6602EEC4BE34FFABCB7831469181A50F01240CA85879086C850C6C585E493CECF053CD5DB9A4CFCF439E301B7DD665881055C1AB0D63D0A97E76576302000000
random_padding_bytes = 0698269139B02028B47DE71A40CD62C1A289DADF0EAD34F3C433FD23A0620195304EB11ACC6A85FAFC827A9E91280C61523CDF0FF3AC654E2F06FD60D2FFEB4D921ABF6131D3B8C652ABAAEFDF1F3FCEC5FA060C99B13498891F0F89</code></pre>
<pre><code>data = 955FF5A9080F511EE35CD8E917000000043C794C930000000440D707ED0000008BFCFA6096C50012F64C5ADF976283FBE30BC5CB5D677198505F75429F7475BF9EBFDF4C036E07CB8CA84D194CF9DD8C9A5CD6EC7101B3DE005CB39E9DBE9BC402000000
random_padding_bytes = 2C2821466EBB7D4973FCD6FBEDC8A53A1115334BBFC29B21B2C3E3B674FBEF9E7BCAC760DA776F1C59236A30CCE1470C83C1EFA3F487B0DE9BA4DC6A68C4C2E5FBB57B4D5AD04273E146786D39C5B779620FABAC01AA423410B6EE8D</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 = 8731291CDD5513220A82626E9BE5FFBE1F760F72AA6D277BE83F2132B0734E46B518AADF0AC8E2348E1CCC3474C7F6F72C4874B2313DCF8F5E40C978B3317DB30872B428DE70FA6317DA068B31C428414AD03B8ACE80D222A48EA4AEA93D1AAB7B98B36820D68723F2110BEBEFA56EEEE1989226A902E2D0A7116D1F90E1CDBBE735C85948FD12AA010E94A6B8CA76B641EDA7D81571260D9B68D1C8DD23D3875255DFEC41C90B7FD00D08FDF4C1FF4EB91063D51790FE3F3B96E6FE9476D076A1ECB55E7ED1B9221353B9EADDBDB1E71CBDE9E08B1211355CBEFD12D6350361515CBCF4991A280A40AD95A5F6F73DC24658580FFD89F29B65D5FDC0677F333E</code></pre>
<pre><code>encrypted_data = 64567DA3790EF92C6CA990DB6C5EE25ACAE4D30EC0A83225423DD67BEC17CC9E1170331BD9C3D46E6817424CD8788A70D00E681FB5760E273F40A15DA279F812C1E65D429712AC31603292404F3256E87B4FD14C21EACED3075D2EC792630D8C9D752325CE986033385566108937E98BE43D0C3CD986E8B3F9F3C09BA482DE75ED59FB9A7218652056F6FAA65C37BC058BD483E8936AD883AB949F0A5C8012FBBD6E649F673E33FF335CA91E18E0B072086DD3F390BCDBF42EBD86532F4695E3244B9FEF5A537909D7EDD26E5671C1615C2DF30C77EB1C43CF880031A97DB1CF76644E8F61DD321DE9662DF9A902C3A3DD1ED3EB8A0A9F98CFE6A66326AD3578</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 F0 28 0E 00 6E 4C A1 66
0010 | 40 01 00 00 BE E4 12 D7 63 87 AF ED 66 02 EE C4
0020 | BE 34 FF AB CB 78 31 46 91 81 A5 0F 01 24 0C A8
0030 | 58 79 08 6C 85 0C 6C 58 04 49 DB EA 7F 00 00 00
0040 | 04 6D 72 22 9B 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 87 31 29 1C DD 55 13 22 0A 82 62 6E
0060 | 9B E5 FF BE 1F 76 0F 72 AA 6D 27 7B E8 3F 21 32
0070 | B0 73 4E 46 B5 18 AA DF 0A C8 E2 34 8E 1C CC 34
0080 | 74 C7 F6 F7 2C 48 74 B2 31 3D CF 8F 5E 40 C9 78
0090 | B3 31 7D B3 08 72 B4 28 DE 70 FA 63 17 DA 06 8B
00A0 | 31 C4 28 41 4A D0 3B 8A CE 80 D2 22 A4 8E A4 AE
00B0 | A9 3D 1A AB 7B 98 B3 68 20 D6 87 23 F2 11 0B EB
00C0 | EF A5 6E EE E1 98 92 26 A9 02 E2 D0 A7 11 6D 1F
00D0 | 90 E1 CD BB E7 35 C8 59 48 FD 12 AA 01 0E 94 A6
00E0 | B8 CA 76 B6 41 ED A7 D8 15 71 26 0D 9B 68 D1 C8
00F0 | DD 23 D3 87 52 55 DF EC 41 C9 0B 7F D0 0D 08 FD
0100 | F4 C1 FF 4E B9 10 63 D5 17 90 FE 3F 3B 96 E6 FE
0110 | 94 76 D0 76 A1 EC B5 5E 7E D1 B9 22 13 53 B9 EA
0120 | DD BD B1 E7 1C BD E9 E0 8B 12 11 35 5C BE FD 12
0130 | D6 35 03 61 51 5C BC F4 99 1A 28 0A 40 AD 95 A5
0140 | F6 F7 3D C2 46 58 58 0F FD 89 F2 9B 65 D5 FD C0
0150 | 67 7F 33 3E</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 10 E8 09 00 72 64 A2 66
0010 | 40 01 00 00 BE E4 12 D7 8B FC FA 60 96 C5 00 12
0020 | F6 4C 5A DF 97 62 83 FB E3 0B C5 CB 5D 67 71 98
0030 | 50 5F 75 42 9F 74 75 BF 04 3C 79 4C 93 00 00 00
0040 | 04 40 D7 07 ED 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 64 56 7D A3 79 0E F9 2C 6C A9 90 DB
0060 | 6C 5E E2 5A CA E4 D3 0E C0 A8 32 25 42 3D D6 7B
0070 | EC 17 CC 9E 11 70 33 1B D9 C3 D4 6E 68 17 42 4C
0080 | D8 78 8A 70 D0 0E 68 1F B5 76 0E 27 3F 40 A1 5D
0090 | A2 79 F8 12 C1 E6 5D 42 97 12 AC 31 60 32 92 40
00A0 | 4F 32 56 E8 7B 4F D1 4C 21 EA CE D3 07 5D 2E C7
00B0 | 92 63 0D 8C 9D 75 23 25 CE 98 60 33 38 55 66 10
00C0 | 89 37 E9 8B E4 3D 0C 3C D9 86 E8 B3 F9 F3 C0 9B
00D0 | A4 82 DE 75 ED 59 FB 9A 72 18 65 20 56 F6 FA A6
00E0 | 5C 37 BC 05 8B D4 83 E8 93 6A D8 83 AB 94 9F 0A
00F0 | 5C 80 12 FB BD 6E 64 9F 67 3E 33 FF 33 5C A9 1E
0100 | 18 E0 B0 72 08 6D D3 F3 90 BC DB F4 2E BD 86 53
0110 | 2F 46 95 E3 24 4B 9F EF 5A 53 79 09 D7 ED D2 6E
0120 | 56 71 C1 61 5C 2D F3 0C 77 EB 1C 43 CF 88 00 31
0130 | A9 7D B1 CF 76 64 4E 8F 61 DD 32 1D E9 66 2D F9
0140 | A9 02 C3 A3 DD 1E D3 EB 8A 0A 9F 98 CF E6 A6 63
0150 | 26 AD 35 78</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 = 0698269139B02028B47DE71A40CD62C1A289DADF0EAD34F3C433FD23A
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>F0280E006E4CA166</code></td>
<td><code>10E809007264A266</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 = 0698269139B02028B47DE71A40CD62C1A289DADF0EAD34F3C433FD23A
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>6387AFED6602EEC4BE34FFABCB783146</code></td>
<td><code>8BFCFA6096C50012F64C5ADF976283FB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>9181A50F01240CA85879086C850C6C58</code></td>
<td><code>E30BC5CB5D677198505F75429F7475BF</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>0449DBEA7F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1239149183</td>
<td><code>043C794C93000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1014582419</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>046D72229B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1836196507</td>
<td><code>0440D707ED000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1087834093</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 = 0698269139B02028B47DE71A40CD62C1A289DADF0EAD34F3C433FD23A
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001008731291CDD5513220A82626E</code> <code>9BE5FFBE1F760F72AA6D277BE83F2132</code> <code>B0734E46B518AADF0AC8E2348E1CCC34</code> <code>74C7F6F72C4874B2313DCF8F5E40C978</code> <code>B3317DB30872B428DE70FA6317DA068B</code> <code>31C428414AD03B8ACE80D222A48EA4AE</code> <code>A93D1AAB7B98B36820D68723F2110BEB</code> <code>EFA56EEEE1989226A902E2D0A7116D1F</code> <code>90E1CDBBE735C85948FD12AA010E94A6</code> <code>B8CA76B641EDA7D81571260D9B68D1C8</code> <code>DD23D3875255DFEC41C90B7FD00D08FD</code> <code>F4C1FF4EB91063D51790FE3F3B96E6FE</code> <code>9476D076A1ECB55E7ED1B9221353B9EA</code> <code>DDBDB1E71CBDE9E08B1211355CBEFD12</code> <code>D6350361515CBCF4991A280A40AD95A5</code> <code>F6F73DC24658580FFD89F29B65D5FDC0</code><br> <code>677F333E</code></td>
<td><code>FE00010064567DA3790EF92C6CA990DB</code> <code>6C5EE25ACAE4D30EC0A83225423DD67B</code> <code>EC17CC9E1170331BD9C3D46E6817424C</code> <code>D8788A70D00E681FB5760E273F40A15D</code> <code>A279F812C1E65D429712AC3160329240</code> <code>4F3256E87B4FD14C21EACED3075D2EC7</code> <code>92630D8C9D752325CE98603338556610</code> <code>8937E98BE43D0C3CD986E8B3F9F3C09B</code> <code>A482DE75ED59FB9A7218652056F6FAA6</code> <code>5C37BC058BD483E8936AD883AB949F0A</code> <code>5C8012FBBD6E649F673E33FF335CA91E</code> <code>18E0B072086DD3F390BCDBF42EBD8653</code> <code>2F4695E3244B9FEF5A537909D7EDD26E</code> <code>5671C1615C2DF30C77EB1C43CF880031</code> <code>A97DB1CF76644E8F61DD321DE9662DF9</code> <code>A902C3A3DD1ED3EB8A0A9F98CFE6A663</code><br> <code>26AD3578</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 0698269139B02028B47DE71A40CD62C1A289DADF0EAD34F3C433FD23A
<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 34 21 96 6E 4C A1 66
0010 | 78 02 00 00 5C 07 E8 D0 63 87 AF ED 66 02 EE C4
0020 | BE 34 FF AB CB 78 31 46 91 81 A5 0F 01 24 0C A8
0030 | 58 79 08 6C 85 0C 6C 58 FE 50 02 00 24 D0 29 7F
0040 | B1 57 8E B5 7D 1B B0 90 DE 7D DB B0 84 CE B3 3A
0050 | 48 CA 1A 7C D1 BD 38 AD B0 E7 CE 35 DE 20 7C 03
0060 | 85 51 82 7B B7 A3 8A F8 53 88 AA A9 B6 4C 8A 7F
0070 | 28 E6 A0 B7 4A FE BD EB 11 91 1A 19 C7 7F 68 55
0080 | 1F B0 BB 18 C2 B6 04 2E A0 44 3D 17 C7 59 A0 0F
0090 | 88 E1 B9 19 D5 F6 13 61 72 75 C4 F7 14 B7 E3 E4
00A0 | 2C 13 46 CF 37 CF B7 E4 05 DC 83 52 21 DC 3B 8D
00B0 | B4 FE CE 96 06 3C 5E B4 95 ED 1B 1D A2 A4 80 F4
00C0 | A1 F2 7C 28 5E 81 76 C4 18 8A 28 3A 0F 0B EE F9
00D0 | 09 3A 05 8F 3F 69 09 1C 39 E6 66 F0 97 BD 0B B2
00E0 | AE 47 BC 46 CC EB 1B 95 6C 51 00 18 F6 27 D6 2C
00F0 | 70 D2 B7 2B AC 7B 0B DC CE 18 7C 32 6D 66 45 8E
0100 | E2 2E 63 15 9B E2 C1 A2 F7 75 63 D7 C3 F2 0F E8
0110 | 88 FA FB B6 7B CB 18 BB AD 5B 49 18 48 D5 3B A9
0120 | D8 4C D4 B8 31 F6 7F 44 7B DC 68 6C 9E B7 EE 7B
0130 | 17 C9 C0 0D 42 6F C4 FB 12 7C D1 4D B4 2B F7 EA
0140 | 05 2E D1 5D 9D 5E DF 2F C0 6A F1 75 B3 28 E6 A5
0150 | 3A A6 B5 32 07 80 74 6C 7C 81 1A 50 23 5D E7 E3
0160 | 5D 08 E4 4D 52 2C 4A 17 63 B6 84 89 BD A3 6F B7
0170 | F6 0B FE 17 43 02 DC 72 50 DC 0F 0C 9A 8A 2A A9
0180 | 65 2B DE 11 56 92 08 B8 24 53 9A 95 4C 12 EE 41
0190 | C0 89 2D 80 E4 43 E2 0B E2 4A B3 65 76 F6 8C 67
01A0 | CC 90 36 0E 85 FC C1 92 55 2D C4 23 F6 BA 11 65
01B0 | F2 23 78 F8 B3 92 91 5F 89 1E DC 57 C1 5B 64 AC
01C0 | 0B EF 3F 4E 07 5F 9C 4B EE FB 9A 4E F3 0E EB 4A
01D0 | 82 03 EE 60 51 10 9D 97 DE F1 47 B7 6C 42 AA B3
01E0 | C7 27 46 C4 D7 0E 26 48 AC 79 35 B7 21 AD 64 00
01F0 | 9E C5 A5 19 DF 85 BA ED 49 0E EB CA C0 69 82 1D
0200 | 71 0F D1 65 7D D7 29 FC 5B 77 69 B8 7D 3E 90 17
0210 | C9 0F 34 EF C1 39 3C A1 B1 E4 AC 2E FE 2D 53 E1
0220 | 58 E7 7A 8F ED 95 2B 66 27 81 B3 19 2F 44 47 EB
0230 | 44 C4 A8 C8 CA EC DA 02 63 FF 74 59 61 2D 53 0D
0240 | 4B F5 33 22 B4 4E 92 E0 2E A5 E8 4C C2 2B D7 C0
0250 | 16 C8 1D F2 FA 98 DE BE B7 3D 5D 8A C8 D3 6D 03
0260 | 42 60 78 52 76 C2 61 69 A2 19 7A 74 07 C4 D3 53
0270 | 27 EF 77 67 C5 C8 56 02 A2 09 34 12 15 D1 6D 00
0280 | 78 6C E8 30 66 CF E3 B6 21 52 6E EF</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 7C EE 13 73 64 A2 66
0010 | 78 02 00 00 5C 07 E8 D0 8B FC FA 60 96 C5 00 12
0020 | F6 4C 5A DF 97 62 83 FB E3 0B C5 CB 5D 67 71 98
0030 | 50 5F 75 42 9F 74 75 BF FE 50 02 00 C9 9A 9D EF
0040 | 2A 9F 3D 05 90 FB 9A A3 41 C6 2C AD 3D 28 3C E4
0050 | A6 09 54 60 18 8A 1B 7C 32 D3 FB 8C E4 40 AF 3E
0060 | 4C 3E 0F F4 5F 1F 53 36 6C 2B 13 E2 DC A4 80 6E
0070 | F3 4E DE 1C 5D C1 82 C7 C0 E8 1E 44 0D 07 C3 E9
0080 | 41 6E A5 82 BE 9E 6D 33 BC 5A 30 40 89 54 B4 1B
0090 | AB 62 41 6C 3C F8 86 25 E8 18 47 38 5A FB D4 3A
00A0 | 45 30 CD 86 27 95 57 A0 0F 76 D1 00 F8 31 2C 03
00B0 | 45 FB 93 73 B4 D8 32 6E F3 CA 71 75 DB ED 83 C0
00C0 | F4 F4 40 A9 3E DA 0E C5 42 9D DE 02 77 44 8D 87
00D0 | 90 A0 D1 10 7E 94 E3 AA B1 56 50 86 E4 ED 4F F3
00E0 | 1A EC B0 D8 95 6E F5 F2 0A 1C 6A 73 6E A4 94 8F
00F0 | E7 63 1B 80 85 DB FA B7 C3 78 2F 40 C5 D9 62 85
0100 | 07 D5 2E F9 6C 66 3C 00 4A 8F 14 82 FA 5B 78 F0
0110 | 9C D6 6A F1 A1 51 64 43 23 B4 4B 0F D0 16 5E EE
0120 | 6E EA D8 F7 81 3F 27 5C D2 EE 3D CC CF E2 A8 42
0130 | EB 8C AE E0 56 2F 20 6D C9 EA 06 F0 95 35 5C D0
0140 | 53 12 94 CD 89 42 4C 3D 9E 88 50 D9 43 C7 FD D0
0150 | 0A A3 31 AE 0F 02 8F 21 5F 5C D3 EF 4F 1E DD 26
0160 | 90 10 0F 2E CA BD B6 B2 02 55 AD 4B 35 BD 03 CA
0170 | B5 68 6B D7 49 77 6C 49 86 E3 2D 5B 92 6F 15 C3
0180 | 33 E4 42 3D 42 75 EE 7F 49 F8 D5 12 99 09 32 EF
0190 | 32 1F FB 4D 17 C8 C6 FB 3B A9 5A 49 C3 D1 72 3A
01A0 | EB EC EC 7A DB C6 6F 52 7E 64 E4 5E D7 A9 A6 4B
01B0 | 2B AB 27 5E 37 2D C1 4E A8 A7 2C 20 BD 6A F8 2C
01C0 | 40 FE 43 E7 9B 77 D6 A8 20 DB B7 29 F7 86 82 F2
01D0 | 5C 86 45 46 93 0A 57 AA B5 18 F2 C2 CF 77 83 67
01E0 | 81 65 B4 28 C0 A3 37 6B 8D C7 E7 14 10 E1 CE EF
01F0 | 31 67 26 02 8C 04 BF 65 17 1F 24 0B 82 A6 8F 8C
0200 | D1 B0 F3 B5 B2 40 BA 13 EE 98 DC 07 09 E5 BA 55
0210 | 34 C6 C4 E1 79 AB EC 35 AE BB 75 9C 1A 3E 5D 6A
0220 | FA 21 D4 7F 38 BD 1F 8A ED B3 84 6E C0 8D 17 15
0230 | 44 EE B4 A6 E3 43 89 9B 86 C6 A8 62 95 2B 70 DA
0240 | C2 8D E2 00 01 29 BE 05 55 99 3C 6F 22 CB 2C 59
0250 | 04 9C BE 8E C1 81 82 84 BF D9 1E DF 7B 3F B9 61
0260 | E0 F9 55 06 DE 80 32 08 15 78 A3 61 8B AE 8A D5
0270 | D3 F8 73 54 3C 70 C8 2C 62 ED 99 AA E9 A6 D3 EA
0280 | 7E A9 2A B6 50 47 31 D6 1E DD F1 FE</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,7 +464,7 @@ random_padding_bytes = 0698269139B02028B47DE71A40CD62C1A289DADF0EAD34F3C433FD23A
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>013421966E4CA166</code></td>
<td><code>017CEE137364A266</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>
@ -482,19 +482,19 @@ random_padding_bytes = 0698269139B02028B47DE71A40CD62C1A289DADF0EAD34F3C433FD23A
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>6387AFED6602EEC4BE34FFABCB783146</code></td>
<td><code>8BFCFA6096C50012F64C5ADF976283FB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>9181A50F01240CA85879086C850C6C58</code></td>
<td><code>E30BC5CB5D677198505F75429F7475BF</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE50020024D0297FB1578EB57D1BB090</code> <code>DE7DDBB084CEB33A48CA1A7CD1BD38AD</code> <code>B0E7CE35DE207C038551827BB7A38AF8</code> <code>5388AAA9B64C8A7F28E6A0B74AFEBDEB</code> <code>11911A19C77F68551FB0BB18C2B6042E</code> <code>A0443D17C759A00F88E1B919D5F61361</code> <code>7275C4F714B7E3E42C1346CF37CFB7E4</code> <code>05DC835221DC3B8DB4FECE96063C5EB4</code> <code>95ED1B1DA2A480F4A1F27C285E8176C4</code> <code>188A283A0F0BEEF9093A058F3F69091C</code> <code>39E666F097BD0BB2AE47BC46CCEB1B95</code> <code>6C510018F627D62C70D2B72BAC7B0BDC</code> <code>CE187C326D66458EE22E63159BE2C1A2</code> <code>F77563D7C3F20FE888FAFBB67BCB18BB</code> <code>AD5B491848D53BA9D84CD4B831F67F44</code> <code>7BDC686C9EB7EE7B17C9C00D426FC4FB</code> <code>127CD14DB42BF7EA052ED15D9D5EDF2F</code> <code>C06AF175B328E6A53AA6B5320780746C</code> <code>7C811A50235DE7E35D08E44D522C4A17</code> <code>63B68489BDA36FB7F60BFE174302DC72</code> <code>50DC0F0C9A8A2AA9652BDE11569208B8</code> <code>24539A954C12EE41C0892D80E443E20B</code> <code>E24AB36576F68C67CC90360E85FCC192</code> <code>552DC423F6BA1165F22378F8B392915F</code> <code>891EDC57C15B64AC0BEF3F4E075F9C4B</code> <code>EEFB9A4EF30EEB4A8203EE6051109D97</code> <code>DEF147B76C42AAB3C72746C4D70E2648</code> <code>AC7935B721AD64009EC5A519DF85BAED</code> <code>490EEBCAC069821D710FD1657DD729FC</code> <code>5B7769B87D3E9017C90F34EFC1393CA1</code> <code>B1E4AC2EFE2D53E158E77A8FED952B66</code> <code>2781B3192F4447EB44C4A8C8CAECDA02</code> <code>63FF7459612D530D4BF53322B44E92E0</code> <code>2EA5E84CC22BD7C016C81DF2FA98DEBE</code> <code>B73D5D8AC8D36D034260785276C26169</code> <code>A2197A7407C4D35327EF7767C5C85602</code> <code>A209341215D16D00786CE83066CFE3B6</code><br> <code>21526EEF</code></td>
<td><code>FE500200C99A9DEF2A9F3D0590FB9AA3</code> <code>41C62CAD3D283CE4A6095460188A1B7C</code> <code>32D3FB8CE440AF3E4C3E0FF45F1F5336</code> <code>6C2B13E2DCA4806EF34EDE1C5DC182C7</code> <code>C0E81E440D07C3E9416EA582BE9E6D33</code> <code>BC5A30408954B41BAB62416C3CF88625</code> <code>E81847385AFBD43A4530CD86279557A0</code> <code>0F76D100F8312C0345FB9373B4D8326E</code> <code>F3CA7175DBED83C0F4F440A93EDA0EC5</code> <code>429DDE0277448D8790A0D1107E94E3AA</code> <code>B1565086E4ED4FF31AECB0D8956EF5F2</code> <code>0A1C6A736EA4948FE7631B8085DBFAB7</code> <code>C3782F40C5D9628507D52EF96C663C00</code> <code>4A8F1482FA5B78F09CD66AF1A1516443</code> <code>23B44B0FD0165EEE6EEAD8F7813F275C</code> <code>D2EE3DCCCFE2A842EB8CAEE0562F206D</code> <code>C9EA06F095355CD0531294CD89424C3D</code> <code>9E8850D943C7FDD00AA331AE0F028F21</code> <code>5F5CD3EF4F1EDD2690100F2ECABDB6B2</code> <code>0255AD4B35BD03CAB5686BD749776C49</code> <code>86E32D5B926F15C333E4423D4275EE7F</code> <code>49F8D512990932EF321FFB4D17C8C6FB</code> <code>3BA95A49C3D1723AEBECEC7ADBC66F52</code> <code>7E64E45ED7A9A64B2BAB275E372DC14E</code> <code>A8A72C20BD6AF82C40FE43E79B77D6A8</code> <code>20DBB729F78682F25C864546930A57AA</code> <code>B518F2C2CF7783678165B428C0A3376B</code> <code>8DC7E71410E1CEEF316726028C04BF65</code> <code>171F240B82A68F8CD1B0F3B5B240BA13</code> <code>EE98DC0709E5BA5534C6C4E179ABEC35</code> <code>AEBB759C1A3E5D6AFA21D47F38BD1F8A</code> <code>EDB3846EC08D171544EEB4A6E343899B</code> <code>86C6A862952B70DAC28DE2000129BE05</code> <code>55993C6F22CB2C59049CBE8EC1818284</code> <code>BFD91EDF7B3FB961E0F95506DE803208</code> <code>1578A3618BAE8AD5D3F873543C70C82C</code> <code>62ED99AAE9A6D3EA7EA92AB6504731D6</code><br> <code>1EDDF1FE</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 0698269139B02028B47DE71A40CD62C1A289DADF0EAD34F3C433FD23A
<!-- 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 = 24D0297FB1578EB57D1BB090DE7DDBB084CEB33A48CA1A7CD1BD38ADB0E7CE35DE207C038551827BB7A38AF85388AAA9B64C8A7F28E6A0B74AFEBDEB11911A19C77F68551FB0BB18C2B6042EA0443D17C759A00F88E1B919D5F613617275C4F714B7E3E42C1346CF37CFB7E405DC835221DC3B8DB4FECE96063C5EB495ED1B1DA2A480F4A1F27C285E8176C4188A283A0F0BEEF9093A058F3F69091C39E666F097BD0BB2AE47BC46CCEB1B956C510018F627D62C70D2B72BAC7B0BDCCE187C326D66458EE22E63159BE2C1A2F77563D7C3F20FE888FAFBB67BCB18BBAD5B491848D53BA9D84CD4B831F67F447BDC686C9EB7EE7B17C9C00D426FC4FB127CD14DB42BF7EA052ED15D9D5EDF2FC06AF175B328E6A53AA6B5320780746C7C811A50235DE7E35D08E44D522C4A1763B68489BDA36FB7F60BFE174302DC7250DC0F0C9A8A2AA9652BDE11569208B824539A954C12EE41C0892D80E443E20BE24AB36576F68C67CC90360E85FCC192552DC423F6BA1165F22378F8B392915F891EDC57C15B64AC0BEF3F4E075F9C4BEEFB9A4EF30EEB4A8203EE6051109D97DEF147B76C42AAB3C72746C4D70E2648AC7935B721AD64009EC5A519DF85BAED490EEBCAC069821D710FD1657DD729FC5B7769B87D3E9017C90F34EFC1393CA1B1E4AC2EFE2D53E158E77A8FED952B662781B3192F4447EB44C4A8C8CAECDA0263FF7459612D530D4BF53322B44E92E02EA5E84CC22BD7C016C81DF2FA98DEBEB73D5D8AC8D36D034260785276C26169A2197A7407C4D35327EF7767C5C85602A209341215D16D00786CE83066CFE3B621526EEF
tmp_aes_key = 87A16D7D6F2AED65D4FDB26C6F77466043B2F2DB09F5CB131C091193BA7493A5
tmp_aes_iv = 2EF58137AFB5123EADA871026C9DEB69207A69AD90ADC7FACA1570495E493CEC</code></pre>
<pre><code>encrypted_answer = C99A9DEF2A9F3D0590FB9AA341C62CAD3D283CE4A6095460188A1B7C32D3FB8CE440AF3E4C3E0FF45F1F53366C2B13E2DCA4806EF34EDE1C5DC182C7C0E81E440D07C3E9416EA582BE9E6D33BC5A30408954B41BAB62416C3CF88625E81847385AFBD43A4530CD86279557A00F76D100F8312C0345FB9373B4D8326EF3CA7175DBED83C0F4F440A93EDA0EC5429DDE0277448D8790A0D1107E94E3AAB1565086E4ED4FF31AECB0D8956EF5F20A1C6A736EA4948FE7631B8085DBFAB7C3782F40C5D9628507D52EF96C663C004A8F1482FA5B78F09CD66AF1A151644323B44B0FD0165EEE6EEAD8F7813F275CD2EE3DCCCFE2A842EB8CAEE0562F206DC9EA06F095355CD0531294CD89424C3D9E8850D943C7FDD00AA331AE0F028F215F5CD3EF4F1EDD2690100F2ECABDB6B20255AD4B35BD03CAB5686BD749776C4986E32D5B926F15C333E4423D4275EE7F49F8D512990932EF321FFB4D17C8C6FB3BA95A49C3D1723AEBECEC7ADBC66F527E64E45ED7A9A64B2BAB275E372DC14EA8A72C20BD6AF82C40FE43E79B77D6A820DBB729F78682F25C864546930A57AAB518F2C2CF7783678165B428C0A3376B8DC7E71410E1CEEF316726028C04BF65171F240B82A68F8CD1B0F3B5B240BA13EE98DC0709E5BA5534C6C4E179ABEC35AEBB759C1A3E5D6AFA21D47F38BD1F8AEDB3846EC08D171544EEB4A6E343899B86C6A862952B70DAC28DE2000129BE0555993C6F22CB2C59049CBE8EC1818284BFD91EDF7B3FB961E0F95506DE8032081578A3618BAE8AD5D3F873543C70C82C62ED99AAE9A6D3EA7EA92AB6504731D61EDDF1FE
tmp_aes_key = F05610AA46B5986B74F2E9DE05DC9CC1BE6D92A6C893B252B49D8E05B46DABFA
tmp_aes_iv = 082C119CE869890D52BEE3A7015B770B0AC0B012A2BDB09DCB420CE19EBFDF4C</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = AC0276C7739EEDE2111877BDA636E63A646074A1BA0D89B56387AFED6602EEC4BE34FFABCB7831469181A50F01240CA85879086C850C6C5803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010061A54F355453D62BA850E1DEB2B9577E0ADFA00EF2B6A78426054AA8860885A2169064A4596EBF4CC332B564EC7594E841A8658355698A403EEF98C3D777919475A8311E62ECA435DBEC740F8BB8677C6A7650542872F24967352E83EEB889A44588DE6C8B380F7F69617EEE1C11344E3CB123DD27550D752E87567DED6E1CFE21ED4D517855E71E08BE0FC5144837BADB8CD899CA09E16C778CC9BDD7FC548D316F56EC204601F70E7C0103978014067D4BA5271C1D261CCCFA79CF5F6D6B47D768AABD844BB343A25341AD29BD9E705B1BB8EEDFEAE6AC6C775DB2B3324C4E02A84EFC1080DDB22B568C58FF05E633DD7D868EADC5DE69E44184964E260E146E4CA166B99604E76897DCB2
answer = BA0D89B56387AFED6602EEC4BE34FFABCB7831469181A50F01240CA85879086C850C6C5803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010061A54F355453D62BA850E1DEB2B9577E0ADFA00EF2B6A78426054AA8860885A2169064A4596EBF4CC332B564EC7594E841A8658355698A403EEF98C3D777919475A8311E62ECA435DBEC740F8BB8677C6A7650542872F24967352E83EEB889A44588DE6C8B380F7F69617EEE1C11344E3CB123DD27550D752E87567DED6E1CFE21ED4D517855E71E08BE0FC5144837BADB8CD899CA09E16C778CC9BDD7FC548D316F56EC204601F70E7C0103978014067D4BA5271C1D261CCCFA79CF5F6D6B47D768AABD844BB343A25341AD29BD9E705B1BB8EEDFEAE6AC6C775DB2B3324C4E02A84EFC1080DDB22B568C58FF05E633DD7D868EADC5DE69E44184964E260E146E4CA166B99604E76897DCB2</code></pre>
<pre><code>answer_with_hash = 036C9B17A32F0950AE2FC3DFC05F32220541F1FCBA0D89B58BFCFA6096C50012F64C5ADF976283FBE30BC5CB5D677198505F75429F7475BF03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100A555F396881111625E62DB0733DAD37CE5F78062BC0DCBD11B12E3709BAB97E1EE7F7894DB79A09B8459B7ACE32AAB6D6F2FD1895EEF7746115F594E8DE48DA2DD30CE26F65C8365945392B959B6AFA5535C34919A76F2A94EC04C8FE708539291BA4E28C1C245DBF362FC7B356B30EE53EC735F28985AD186976461A138EC083A0095316B7C3E3676A165E0931CBC78F78DDE60131BBEE8D11B3AC53DDA3AD5A93832B644A672E390959A36C589DC8901BFEEAA2956F58AC8D768863FB53CB55EA7C31FDE707C7C6EADBE2CCF15044F03BD924B1B6AD47B0ECDC1361E26F00E40FC98FC1E99B7639A64D460006B27E080493F914C02D80F49750D9F30AF10F77364A266EADA3CA5A0B8F9C0
answer = BA0D89B58BFCFA6096C50012F64C5ADF976283FBE30BC5CB5D677198505F75429F7475BF03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100A555F396881111625E62DB0733DAD37CE5F78062BC0DCBD11B12E3709BAB97E1EE7F7894DB79A09B8459B7ACE32AAB6D6F2FD1895EEF7746115F594E8DE48DA2DD30CE26F65C8365945392B959B6AFA5535C34919A76F2A94EC04C8FE708539291BA4E28C1C245DBF362FC7B356B30EE53EC735F28985AD186976461A138EC083A0095316B7C3E3676A165E0931CBC78F78DDE60131BBEE8D11B3AC53DDA3AD5A93832B644A672E390959A36C589DC8901BFEEAA2956F58AC8D768863FB53CB55EA7C31FDE707C7C6EADBE2CCF15044F03BD924B1B6AD47B0ECDC1361E26F00E40FC98FC1E99B7639A64D460006B27E080493F914C02D80F49750D9F30AF10F77364A266EADA3CA5A0B8F9C0</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 63 87 AF ED 66 02 EE C4 BE 34 FF AB
0010 | CB 78 31 46 91 81 A5 0F 01 24 0C A8 58 79 08 6C
0020 | 85 0C 6C 58 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 8B FC FA 60 96 C5 00 12 F6 4C 5A DF
0010 | 97 62 83 FB E3 0B C5 CB 5D 67 71 98 50 5F 75 42
0020 | 9F 74 75 BF 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 = BA0D89B56387AFED6602EEC4BE34FFABCB7831469181A50F01240CA85879086C850C6C5
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 | 61 A5 4F 35 54 53 D6 2B A8 50 E1 DE B2 B9 57 7E
0140 | 0A DF A0 0E F2 B6 A7 84 26 05 4A A8 86 08 85 A2
0150 | 16 90 64 A4 59 6E BF 4C C3 32 B5 64 EC 75 94 E8
0160 | 41 A8 65 83 55 69 8A 40 3E EF 98 C3 D7 77 91 94
0170 | 75 A8 31 1E 62 EC A4 35 DB EC 74 0F 8B B8 67 7C
0180 | 6A 76 50 54 28 72 F2 49 67 35 2E 83 EE B8 89 A4
0190 | 45 88 DE 6C 8B 38 0F 7F 69 61 7E EE 1C 11 34 4E
01A0 | 3C B1 23 DD 27 55 0D 75 2E 87 56 7D ED 6E 1C FE
01B0 | 21 ED 4D 51 78 55 E7 1E 08 BE 0F C5 14 48 37 BA
01C0 | DB 8C D8 99 CA 09 E1 6C 77 8C C9 BD D7 FC 54 8D
01D0 | 31 6F 56 EC 20 46 01 F7 0E 7C 01 03 97 80 14 06
01E0 | 7D 4B A5 27 1C 1D 26 1C CC FA 79 CF 5F 6D 6B 47
01F0 | D7 68 AA BD 84 4B B3 43 A2 53 41 AD 29 BD 9E 70
0200 | 5B 1B B8 EE DF EA E6 AC 6C 77 5D B2 B3 32 4C 4E
0210 | 02 A8 4E FC 10 80 DD B2 2B 56 8C 58 FF 05 E6 33
0220 | DD 7D 86 8E AD C5 DE 69 E4 41 84 96 4E 26 0E 14
0230 | 6E 4C A1 66</code></pre>
0130 | A5 55 F3 96 88 11 11 62 5E 62 DB 07 33 DA D3 7C
0140 | E5 F7 80 62 BC 0D CB D1 1B 12 E3 70 9B AB 97 E1
0150 | EE 7F 78 94 DB 79 A0 9B 84 59 B7 AC E3 2A AB 6D
0160 | 6F 2F D1 89 5E EF 77 46 11 5F 59 4E 8D E4 8D A2
0170 | DD 30 CE 26 F6 5C 83 65 94 53 92 B9 59 B6 AF A5
0180 | 53 5C 34 91 9A 76 F2 A9 4E C0 4C 8F E7 08 53 92
0190 | 91 BA 4E 28 C1 C2 45 DB F3 62 FC 7B 35 6B 30 EE
01A0 | 53 EC 73 5F 28 98 5A D1 86 97 64 61 A1 38 EC 08
01B0 | 3A 00 95 31 6B 7C 3E 36 76 A1 65 E0 93 1C BC 78
01C0 | F7 8D DE 60 13 1B BE E8 D1 1B 3A C5 3D DA 3A D5
01D0 | A9 38 32 B6 44 A6 72 E3 90 95 9A 36 C5 89 DC 89
01E0 | 01 BF EE AA 29 56 F5 8A C8 D7 68 86 3F B5 3C B5
01F0 | 5E A7 C3 1F DE 70 7C 7C 6E AD BE 2C CF 15 04 4F
0200 | 03 BD 92 4B 1B 6A D4 7B 0E CD C1 36 1E 26 F0 0E
0210 | 40 FC 98 FC 1E 99 B7 63 9A 64 D4 60 00 6B 27 E0
0220 | 80 49 3F 91 4C 02 D8 0F 49 75 0D 9F 30 AF 10 F7
0230 | 73 64 A2 66</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
<table class="table">
@ -570,13 +570,13 @@ answer = BA0D89B56387AFED6602EEC4BE34FFABCB7831469181A50F01240CA85879086C850C6C5
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>6387AFED6602EEC4BE34FFABCB783146</code></td>
<td><code>8BFCFA6096C50012F64C5ADF976283FB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>9181A50F01240CA85879086C850C6C58</code></td>
<td><code>E30BC5CB5D677198505F75429F7475BF</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B56387AFED6602EEC4BE34FFABCB7831469181A50F01240CA85879086C850C6C5
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE00010061A54F355453D62BA850E1DE</code> <code>B2B9577E0ADFA00EF2B6A78426054AA8</code> <code>860885A2169064A4596EBF4CC332B564</code> <code>EC7594E841A8658355698A403EEF98C3</code> <code>D777919475A8311E62ECA435DBEC740F</code> <code>8BB8677C6A7650542872F24967352E83</code> <code>EEB889A44588DE6C8B380F7F69617EEE</code> <code>1C11344E3CB123DD27550D752E87567D</code> <code>ED6E1CFE21ED4D517855E71E08BE0FC5</code> <code>144837BADB8CD899CA09E16C778CC9BD</code> <code>D7FC548D316F56EC204601F70E7C0103</code> <code>978014067D4BA5271C1D261CCCFA79CF</code> <code>5F6D6B47D768AABD844BB343A25341AD</code> <code>29BD9E705B1BB8EEDFEAE6AC6C775DB2</code> <code>B3324C4E02A84EFC1080DDB22B568C58</code> <code>FF05E633DD7D868EADC5DE69E4418496</code><br> <code>4E260E14</code></td>
<td><code>FE000100A555F396881111625E62DB07</code> <code>33DAD37CE5F78062BC0DCBD11B12E370</code> <code>9BAB97E1EE7F7894DB79A09B8459B7AC</code> <code>E32AAB6D6F2FD1895EEF7746115F594E</code> <code>8DE48DA2DD30CE26F65C8365945392B9</code> <code>59B6AFA5535C34919A76F2A94EC04C8F</code> <code>E708539291BA4E28C1C245DBF362FC7B</code> <code>356B30EE53EC735F28985AD186976461</code> <code>A138EC083A0095316B7C3E3676A165E0</code> <code>931CBC78F78DDE60131BBEE8D11B3AC5</code> <code>3DDA3AD5A93832B644A672E390959A36</code> <code>C589DC8901BFEEAA2956F58AC8D76886</code> <code>3FB53CB55EA7C31FDE707C7C6EADBE2C</code> <code>CF15044F03BD924B1B6AD47B0ECDC136</code> <code>1E26F00E40FC98FC1E99B7639A64D460</code> <code>006B27E080493F914C02D80F49750D9F</code><br> <code>30AF10F7</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>6E4CA166</code> (1721846894 in decimal)</td>
<td><code>7364A266</code> (1721918579 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B56387AFED6602EEC4BE34FFABCB7831469181A50F01240CA85879086C850C6C5
<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 = AF7377821F4A9AD25A2BA317730937A3852EC889E1EE846D52D8847A731DD1EB1625F623DDA1EAF34E96B6B5734D036A4A635EA7DCCC5A413DEE6DF0FE00BF555215612BC3092F68859788BE46C9672AD4EEF080B297AEBA45FED1C6821A0764CFCEDF2FBB8CFD21C0F2A7A9DF24586610CAA82763FDD6E236601C4080B3E44671DEB8486CEFDD53CA18A3008466ACF7B746CB5AB67026B2E791CA535A7A1ED8E87E762400360E1DECE1AA9F117CCAF9492354661B2F8A869F3D5D182CC8538366167512F8FCA58A54E9179D88E415DC57826D7BE026AB623106298EA0D9B01DE8D1A36DECB903B006787E7899E72DD7D4FEF2EAE08684039CF2F6381D5ED5F2</code></pre>
<pre><code>b = 5119C4A04A88A4B4DF4FF479D64F8C0818F3CE62A12CDB2406E487A0E7B9EB9C642BCE244979A9878ADF4ED846F1CABA1EAF9B22B819CB8BC2487EAD668AA6F574E6B76E2D670B7584CCA56B8AA53EA8E0C74A71E0880FB359F5E22BE83036579BD90F1907D674003D544C3D1B08148C22360CAE4020C463D7CC1D10DE27C34C4BACDE653FFDF06259CCAEEF8F02A1DA5DBC347F7459CBFF3A9E5CF01E89AE56E0E5E245C1814C2ADC71A937EAFBBAF28469D88E871F0119D39ECFA5B142C41B396679CD3E150E6A2F8912661294E3A3CD31F913A733D1DCC4C6796F7765AD9D6AEC96796D7681DC1A8EE223B1504F35412255C098579A3E3ECDE0B0E5AD94AD</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 = 1CA04FBD754009365B8FF282703B55FA9F7D69CB6A2CE521C355F750865FB2A2F75B2788FDB3B19ACA8F7C25334D042E8D9363181E01844D6B573B45A53172E29025E53BA90749951B1CE528DCDBC30BADF95340BAB141050864D02529D81136CCE69F88DCEDEA0AD9251E5D8F57C2B1EFC873C2993B635484C2E83807D7833A4DF6AEE22D614651452DB36F4A0ABE5A5C679CCD88CA874290672DC71644B5FC6D374BA3F4C9976860D6F5CCC50E66E3F30DDBA74AF340FC3629E99863E40903C42BFFDEAC80F2524543DD0887D0FFFBFACE0775B7EC64F4F5452C800DAFE4A2A342229EA3234A0838910A3E52D6CF8CA0C83D7612863174688F341E5E9169DA</code></pre>
<pre><code>g_b = 77C1344D47A63FC14017EE1D34F5AA90B878D1F9BBBDA2374190AD70682755193721BE123E877E9D23E01570790DA8595515C1487523BBD82CC814A07D7F4BE0892A485553C42187569EBA0DDBEC63E7F19D7A965C5AAF2D8751439912D54E5677C2A651C3FC018C6798CBE9640E4868CE28FBE94BAA5FD60BB63698AF567751465EE7B37B4F01AD82D9C68822173CB0AB40CBB5B8675ABB991448DDA990F05DCD41CA196AFBE1AB4CE3D9F698C543EFF5B25873B079F1F50D3EF23A48F82980CA5869E5B643284CC606AE420A58D2285ED935A0644A860FA40E42D5F6F480D9043840CF63166B4DE49F0681ACBE3243F861B1F41C818F71EC1D6924FD62D1E5</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 63 87 AF ED 66 02 EE C4 BE 34 FF AB
0010 | CB 78 31 46 91 81 A5 0F 01 24 0C A8 58 79 08 6C
0020 | 85 0C 6C 58 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 1C A0 4F BD 75 40 09 36 5B 8F F2 82 70 3B 55 FA
0040 | 9F 7D 69 CB 6A 2C E5 21 C3 55 F7 50 86 5F B2 A2
0050 | F7 5B 27 88 FD B3 B1 9A CA 8F 7C 25 33 4D 04 2E
0060 | 8D 93 63 18 1E 01 84 4D 6B 57 3B 45 A5 31 72 E2
0070 | 90 25 E5 3B A9 07 49 95 1B 1C E5 28 DC DB C3 0B
0080 | AD F9 53 40 BA B1 41 05 08 64 D0 25 29 D8 11 36
0090 | CC E6 9F 88 DC ED EA 0A D9 25 1E 5D 8F 57 C2 B1
00A0 | EF C8 73 C2 99 3B 63 54 84 C2 E8 38 07 D7 83 3A
00B0 | 4D F6 AE E2 2D 61 46 51 45 2D B3 6F 4A 0A BE 5A
00C0 | 5C 67 9C CD 88 CA 87 42 90 67 2D C7 16 44 B5 FC
00D0 | 6D 37 4B A3 F4 C9 97 68 60 D6 F5 CC C5 0E 66 E3
00E0 | F3 0D DB A7 4A F3 40 FC 36 29 E9 98 63 E4 09 03
00F0 | C4 2B FF DE AC 80 F2 52 45 43 DD 08 87 D0 FF FB
0100 | FA CE 07 75 B7 EC 64 F4 F5 45 2C 80 0D AF E4 A2
0110 | A3 42 22 9E A3 23 4A 08 38 91 0A 3E 52 D6 CF 8C
0120 | A0 C8 3D 76 12 86 31 74 68 8F 34 1E 5E 91 69 DA</code></pre>
<pre><code>0000 | 54 B6 43 66 8B FC FA 60 96 C5 00 12 F6 4C 5A DF
0010 | 97 62 83 FB E3 0B C5 CB 5D 67 71 98 50 5F 75 42
0020 | 9F 74 75 BF 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 77 C1 34 4D 47 A6 3F C1 40 17 EE 1D 34 F5 AA 90
0040 | B8 78 D1 F9 BB BD A2 37 41 90 AD 70 68 27 55 19
0050 | 37 21 BE 12 3E 87 7E 9D 23 E0 15 70 79 0D A8 59
0060 | 55 15 C1 48 75 23 BB D8 2C C8 14 A0 7D 7F 4B E0
0070 | 89 2A 48 55 53 C4 21 87 56 9E BA 0D DB EC 63 E7
0080 | F1 9D 7A 96 5C 5A AF 2D 87 51 43 99 12 D5 4E 56
0090 | 77 C2 A6 51 C3 FC 01 8C 67 98 CB E9 64 0E 48 68
00A0 | CE 28 FB E9 4B AA 5F D6 0B B6 36 98 AF 56 77 51
00B0 | 46 5E E7 B3 7B 4F 01 AD 82 D9 C6 88 22 17 3C B0
00C0 | AB 40 CB B5 B8 67 5A BB 99 14 48 DD A9 90 F0 5D
00D0 | CD 41 CA 19 6A FB E1 AB 4C E3 D9 F6 98 C5 43 EF
00E0 | F5 B2 58 73 B0 79 F1 F5 0D 3E F2 3A 48 F8 29 80
00F0 | CA 58 69 E5 B6 43 28 4C C6 06 AE 42 0A 58 D2 28
0100 | 5E D9 35 A0 64 4A 86 0F A4 0E 42 D5 F6 F4 80 D9
0110 | 04 38 40 CF 63 16 6B 4D E4 9F 06 81 AC BE 32 43
0120 | F8 61 B1 F4 1C 81 8F 71 EC 1D 69 24 FD 62 D1 E5</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 = BA0D89B56387AFED6602EEC4BE34FFABCB7831469181A50F01240CA85879086C850C6C5
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>6387AFED6602EEC4BE34FFABCB783146</code></td>
<td><code>8BFCFA6096C50012F64C5ADF976283FB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>9181A50F01240CA85879086C850C6C58</code></td>
<td><code>E30BC5CB5D677198505F75429F7475BF</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE0001001CA04FBD754009365B8FF282</code> <code>703B55FA9F7D69CB6A2CE521C355F750</code> <code>865FB2A2F75B2788FDB3B19ACA8F7C25</code> <code>334D042E8D9363181E01844D6B573B45</code> <code>A53172E29025E53BA90749951B1CE528</code> <code>DCDBC30BADF95340BAB141050864D025</code> <code>29D81136CCE69F88DCEDEA0AD9251E5D</code> <code>8F57C2B1EFC873C2993B635484C2E838</code> <code>07D7833A4DF6AEE22D614651452DB36F</code> <code>4A0ABE5A5C679CCD88CA874290672DC7</code> <code>1644B5FC6D374BA3F4C9976860D6F5CC</code> <code>C50E66E3F30DDBA74AF340FC3629E998</code> <code>63E40903C42BFFDEAC80F2524543DD08</code> <code>87D0FFFBFACE0775B7EC64F4F5452C80</code> <code>0DAFE4A2A342229EA3234A0838910A3E</code> <code>52D6CF8CA0C83D7612863174688F341E</code><br> <code>5E9169DA</code></td>
<td><code>FE00010077C1344D47A63FC14017EE1D</code> <code>34F5AA90B878D1F9BBBDA2374190AD70</code> <code>682755193721BE123E877E9D23E01570</code> <code>790DA8595515C1487523BBD82CC814A0</code> <code>7D7F4BE0892A485553C42187569EBA0D</code> <code>DBEC63E7F19D7A965C5AAF2D87514399</code> <code>12D54E5677C2A651C3FC018C6798CBE9</code> <code>640E4868CE28FBE94BAA5FD60BB63698</code> <code>AF567751465EE7B37B4F01AD82D9C688</code> <code>22173CB0AB40CBB5B8675ABB991448DD</code> <code>A990F05DCD41CA196AFBE1AB4CE3D9F6</code> <code>98C543EFF5B25873B079F1F50D3EF23A</code> <code>48F82980CA5869E5B643284CC606AE42</code> <code>0A58D2285ED935A0644A860FA40E42D5</code> <code>F6F480D9043840CF63166B4DE49F0681</code> <code>ACBE3243F861B1F41C818F71EC1D6924</code><br> <code>FD62D1E5</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 = BA0D89B56387AFED6602EEC4BE34FFABCB7831469181A50F01240CA85879086C850C6C5
<!-- 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 = 54B643666387AFED6602EEC4BE34FFABCB7831469181A50F01240CA85879086C850C6C580000000000000000FE0001001CA04FBD754009365B8FF282703B55FA9F7D69CB6A2CE521C355F750865FB2A2F75B2788FDB3B19ACA8F7C25334D042E8D9363181E01844D6B573B45A53172E29025E53BA90749951B1CE528DCDBC30BADF95340BAB141050864D02529D81136CCE69F88DCEDEA0AD9251E5D8F57C2B1EFC873C2993B635484C2E83807D7833A4DF6AEE22D614651452DB36F4A0ABE5A5C679CCD88CA874290672DC71644B5FC6D374BA3F4C9976860D6F5CCC50E66E3F30DDBA74AF340FC3629E99863E40903C42BFFDEAC80F2524543DD0887D0FFFBFACE0775B7EC64F4F5452C800DAFE4A2A342229EA3234A0838910A3E52D6CF8CA0C83D7612863174688F341E5E9169DA
padding = 7D41867F9FBED9344D62FB68
tmp_aes_key = 87A16D7D6F2AED65D4FDB26C6F77466043B2F2DB09F5CB131C091193BA7493A5
tmp_aes_iv = 2EF58137AFB5123EADA871026C9DEB69207A69AD90ADC7FACA1570495E493CEC</code></pre>
<pre><code>data = 54B643668BFCFA6096C50012F64C5ADF976283FBE30BC5CB5D677198505F75429F7475BF0000000000000000FE00010077C1344D47A63FC14017EE1D34F5AA90B878D1F9BBBDA2374190AD70682755193721BE123E877E9D23E01570790DA8595515C1487523BBD82CC814A07D7F4BE0892A485553C42187569EBA0DDBEC63E7F19D7A965C5AAF2D8751439912D54E5677C2A651C3FC018C6798CBE9640E4868CE28FBE94BAA5FD60BB63698AF567751465EE7B37B4F01AD82D9C68822173CB0AB40CBB5B8675ABB991448DDA990F05DCD41CA196AFBE1AB4CE3D9F698C543EFF5B25873B079F1F50D3EF23A48F82980CA5869E5B643284CC606AE420A58D2285ED935A0644A860FA40E42D5F6F480D9043840CF63166B4DE49F0681ACBE3243F861B1F41C818F71EC1D6924FD62D1E5
padding = 5E397C84C1E846D9EC94E56F
tmp_aes_key = F05610AA46B5986B74F2E9DE05DC9CC1BE6D92A6C893B252B49D8E05B46DABFA
tmp_aes_iv = 082C119CE869890D52BEE3A7015B770B0AC0B012A2BDB09DCB420CE19EBFDF4C</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 = 128050427D220458D6D465483BD6792A75C2B14E84C610B3F6DD61C61D726D602F62BD7271C61C6D535A72AF63DFA8CCC375D246D9E64D985DCEA9C2A42CF76C2BEC2A275B578EFD27B054ABF7C088FEDBEA46C3DA5AD096B09C6B1E4256A08D37ECE8F6EE7B47B142AE7DA9816D41587471D443197ECCF0683AB25EAD6A2FDD696D6D752EAF2A12865AA504CBA16B7F39A18B9BAAE6103F539B56FA7D49D16E944041DDA3468F895FAA157164A7269A22D1EFD825F6BB01F0C784FA78E52182146AF568D6825818359C70EAA655C59019B534DC7F96B4D8A75589859B41BBD93624095D1A3D1BB4DBAAB42949F0E76627F4BB838BAC71AADA4A545496490C5DCBB4AE9397D89B837B00A01A2BD7961CF50E7F8A6FD804475E28F76E5006462F69C8989C2B0D1665D0542DE9BD04C70F165885F4DA49997199866990492C7B652FE2729BA002F4967CB4980844249F82</code></pre>
<pre><code>encrypted_data = A652F3A948D94C22F2277451692467980A87FB3ECBB23D54C59D68AFB7C887E84079E089F9ED473C77C58A40533C0162B18E173429D45E74D199BB3202BE403B3A80BB6B5CD80F3ACC98811F63BB58079371627B2A55151856F724CC1036E4DFBD11F8A07FAD9606EEE04E40B9A7B9C76518D66F46D1BC232DE813DE89F7C7ACE00887E3D70DEBFD4ADD3CE826E26B641C3F10B7D1DA73431D4EA253590F89DF2E48CB4AA696C4DF33F17C7FFC1D4132CA12A3B63D37CB58179ABB3BE4DCE0763172349EFFACA8E73F957B9DD79577901FE2FF678807D395B9FDB86D7AB5B80279B4DD011F211E999DB948224E691AFB2FDA89A9B68529333C4BDD796DA931B031F834038BA7C0DB10D554E157F71537DBA4EB8A5839CC789B75EFA5A5A244C5ABC1BBFD85434C94981142077C7F356E553BBBD886A7729E03D1ADAEEB4244FDAF5847060507CFD82DF11A7ADE9B44F1</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 F4 28 0E 00 6E 4C A1 66
0010 | 78 01 00 00 1F 5F 04 F5 63 87 AF ED 66 02 EE C4
0020 | BE 34 FF AB CB 78 31 46 91 81 A5 0F 01 24 0C A8
0030 | 58 79 08 6C 85 0C 6C 58 FE 50 01 00 12 80 50 42
0040 | 7D 22 04 58 D6 D4 65 48 3B D6 79 2A 75 C2 B1 4E
0050 | 84 C6 10 B3 F6 DD 61 C6 1D 72 6D 60 2F 62 BD 72
0060 | 71 C6 1C 6D 53 5A 72 AF 63 DF A8 CC C3 75 D2 46
0070 | D9 E6 4D 98 5D CE A9 C2 A4 2C F7 6C 2B EC 2A 27
0080 | 5B 57 8E FD 27 B0 54 AB F7 C0 88 FE DB EA 46 C3
0090 | DA 5A D0 96 B0 9C 6B 1E 42 56 A0 8D 37 EC E8 F6
00A0 | EE 7B 47 B1 42 AE 7D A9 81 6D 41 58 74 71 D4 43
00B0 | 19 7E CC F0 68 3A B2 5E AD 6A 2F DD 69 6D 6D 75
00C0 | 2E AF 2A 12 86 5A A5 04 CB A1 6B 7F 39 A1 8B 9B
00D0 | AA E6 10 3F 53 9B 56 FA 7D 49 D1 6E 94 40 41 DD
00E0 | A3 46 8F 89 5F AA 15 71 64 A7 26 9A 22 D1 EF D8
00F0 | 25 F6 BB 01 F0 C7 84 FA 78 E5 21 82 14 6A F5 68
0100 | D6 82 58 18 35 9C 70 EA A6 55 C5 90 19 B5 34 DC
0110 | 7F 96 B4 D8 A7 55 89 85 9B 41 BB D9 36 24 09 5D
0120 | 1A 3D 1B B4 DB AA B4 29 49 F0 E7 66 27 F4 BB 83
0130 | 8B AC 71 AA DA 4A 54 54 96 49 0C 5D CB B4 AE 93
0140 | 97 D8 9B 83 7B 00 A0 1A 2B D7 96 1C F5 0E 7F 8A
0150 | 6F D8 04 47 5E 28 F7 6E 50 06 46 2F 69 C8 98 9C
0160 | 2B 0D 16 65 D0 54 2D E9 BD 04 C7 0F 16 58 85 F4
0170 | DA 49 99 71 99 86 69 90 49 2C 7B 65 2F E2 72 9B
0180 | A0 02 F4 96 7C B4 98 08 44 24 9F 82</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 84 EC 06 00 73 64 A2 66
0010 | 78 01 00 00 1F 5F 04 F5 8B FC FA 60 96 C5 00 12
0020 | F6 4C 5A DF 97 62 83 FB E3 0B C5 CB 5D 67 71 98
0030 | 50 5F 75 42 9F 74 75 BF FE 50 01 00 A6 52 F3 A9
0040 | 48 D9 4C 22 F2 27 74 51 69 24 67 98 0A 87 FB 3E
0050 | CB B2 3D 54 C5 9D 68 AF B7 C8 87 E8 40 79 E0 89
0060 | F9 ED 47 3C 77 C5 8A 40 53 3C 01 62 B1 8E 17 34
0070 | 29 D4 5E 74 D1 99 BB 32 02 BE 40 3B 3A 80 BB 6B
0080 | 5C D8 0F 3A CC 98 81 1F 63 BB 58 07 93 71 62 7B
0090 | 2A 55 15 18 56 F7 24 CC 10 36 E4 DF BD 11 F8 A0
00A0 | 7F AD 96 06 EE E0 4E 40 B9 A7 B9 C7 65 18 D6 6F
00B0 | 46 D1 BC 23 2D E8 13 DE 89 F7 C7 AC E0 08 87 E3
00C0 | D7 0D EB FD 4A DD 3C E8 26 E2 6B 64 1C 3F 10 B7
00D0 | D1 DA 73 43 1D 4E A2 53 59 0F 89 DF 2E 48 CB 4A
00E0 | A6 96 C4 DF 33 F1 7C 7F FC 1D 41 32 CA 12 A3 B6
00F0 | 3D 37 CB 58 17 9A BB 3B E4 DC E0 76 31 72 34 9E
0100 | FF AC A8 E7 3F 95 7B 9D D7 95 77 90 1F E2 FF 67
0110 | 88 07 D3 95 B9 FD B8 6D 7A B5 B8 02 79 B4 DD 01
0120 | 1F 21 1E 99 9D B9 48 22 4E 69 1A FB 2F DA 89 A9
0130 | B6 85 29 33 3C 4B DD 79 6D A9 31 B0 31 F8 34 03
0140 | 8B A7 C0 DB 10 D5 54 E1 57 F7 15 37 DB A4 EB 8A
0150 | 58 39 CC 78 9B 75 EF A5 A5 A2 44 C5 AB C1 BB FD
0160 | 85 43 4C 94 98 11 42 07 7C 7F 35 6E 55 3B BB D8
0170 | 86 A7 72 9E 03 D1 AD AE EB 42 44 FD AF 58 47 06
0180 | 05 07 CF D8 2D F1 1A 7A DE 9B 44 F1</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>F4280E006E4CA166</code></td>
<td><code>84EC06007364A266</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>6387AFED6602EEC4BE34FFABCB783146</code></td>
<td><code>8BFCFA6096C50012F64C5ADF976283FB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>9181A50F01240CA85879086C850C6C58</code></td>
<td><code>E30BC5CB5D677198505F75429F7475BF</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100128050427D220458D6D46548</code> <code>3BD6792A75C2B14E84C610B3F6DD61C6</code> <code>1D726D602F62BD7271C61C6D535A72AF</code> <code>63DFA8CCC375D246D9E64D985DCEA9C2</code> <code>A42CF76C2BEC2A275B578EFD27B054AB</code> <code>F7C088FEDBEA46C3DA5AD096B09C6B1E</code> <code>4256A08D37ECE8F6EE7B47B142AE7DA9</code> <code>816D41587471D443197ECCF0683AB25E</code> <code>AD6A2FDD696D6D752EAF2A12865AA504</code> <code>CBA16B7F39A18B9BAAE6103F539B56FA</code> <code>7D49D16E944041DDA3468F895FAA1571</code> <code>64A7269A22D1EFD825F6BB01F0C784FA</code> <code>78E52182146AF568D6825818359C70EA</code> <code>A655C59019B534DC7F96B4D8A7558985</code> <code>9B41BBD93624095D1A3D1BB4DBAAB429</code> <code>49F0E76627F4BB838BAC71AADA4A5454</code> <code>96490C5DCBB4AE9397D89B837B00A01A</code> <code>2BD7961CF50E7F8A6FD804475E28F76E</code> <code>5006462F69C8989C2B0D1665D0542DE9</code> <code>BD04C70F165885F4DA49997199866990</code> <code>492C7B652FE2729BA002F4967CB49808</code><br> <code>44249F82</code></td>
<td><code>FE500100A652F3A948D94C22F2277451</code> <code>692467980A87FB3ECBB23D54C59D68AF</code> <code>B7C887E84079E089F9ED473C77C58A40</code> <code>533C0162B18E173429D45E74D199BB32</code> <code>02BE403B3A80BB6B5CD80F3ACC98811F</code> <code>63BB58079371627B2A55151856F724CC</code> <code>1036E4DFBD11F8A07FAD9606EEE04E40</code> <code>B9A7B9C76518D66F46D1BC232DE813DE</code> <code>89F7C7ACE00887E3D70DEBFD4ADD3CE8</code> <code>26E26B641C3F10B7D1DA73431D4EA253</code> <code>590F89DF2E48CB4AA696C4DF33F17C7F</code> <code>FC1D4132CA12A3B63D37CB58179ABB3B</code> <code>E4DCE0763172349EFFACA8E73F957B9D</code> <code>D79577901FE2FF678807D395B9FDB86D</code> <code>7AB5B80279B4DD011F211E999DB94822</code> <code>4E691AFB2FDA89A9B68529333C4BDD79</code> <code>6DA931B031F834038BA7C0DB10D554E1</code> <code>57F71537DBA4EB8A5839CC789B75EFA5</code> <code>A5A244C5ABC1BBFD85434C9498114207</code> <code>7C7F356E553BBBD886A7729E03D1ADAE</code> <code>EB4244FDAF5847060507CFD82DF11A7A</code><br> <code>DE9B44F1</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 = 41BF02FB10F92AC40FC93D22820D05D943FAAFDC3D5B03F814409357751ABDCE81334CCD6BBDF5EBF0BCB127ED1989FA40D52C45C93C0CA4120A299E23BEEDA657ABDD4495CED827F3E87AA7DC13804EE1C80DE61DDAE5B28357450AA42D2D00600A5A354BC1936A55A337103342E9A4809839EE69CF01B36DCEAAC03815AA2C681261581ECE75E2F4AC5C32733966A5F25F0822A6233B8EC464F4415F9862F04A51D6D42662DDFBB2CE40735A80DEA7023325216DE430FC470B8EFD55803B1EA98053F1A926D322FD90EF2F21B8319F655459CABAA827DB379B7B7D59A1866D78AE919E23E21399432891C857BF4DF5946E8070107586EC4DBDC1190564293B</code></pre>
<pre><code>auth_key = 48C943699A50A2677F9ED3E5E4D4EFBCC83C0578F739092CDE6D8E52581ECCEB3FDAF1E7B9A368D2B6A31182907C3DBE6B1873C0EBC0FCC34820BF2208AA1CDD0000647DB09BEAEEF1D631BE8F130E84AEE5ABBC7C7D2D80669D01FADF18512376EFDC7A0EF58502E31BCC174BF2ED9B6262825791F09FB2808FB9783628E67BB02BCE6EF83C3107B87CF8D64C41AE2DB3CC9486D7D4C4FD3B8F74298D2A462AFC37999BF3BF054942B459429DB1F6C4D36C0948A10720B5BF025A3A60475150005E18DB7A439632BCA2BA591F1C3F3AE65E80FC6245CAF5FF4F5F59F65FB354C48302BFCA0DEE2D64C7E56A52E0E11CCA204E4CE32F6858C976835F4786E167</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 B0 01 1E 6F 4C A1 66
0010 | 90 00 00 00 34 F7 CB 3B 63 87 AF ED 66 02 EE C4
0020 | BE 34 FF AB CB 78 31 46 91 81 A5 0F 01 24 0C A8
0030 | 58 79 08 6C 85 0C 6C 58 7F 1F 84 10 80 7A 10 EB
0040 | 7C 48 40 9D A8 D9 F1 03</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 34 7A CC 73 64 A2 66
0010 | A0 00 00 00 34 F7 CB 3B 8B FC FA 60 96 C5 00 12
0020 | F6 4C 5A DF 97 62 83 FB E3 0B C5 CB 5D 67 71 98
0030 | 50 5F 75 42 9F 74 75 BF 18 30 B1 37 56 0A 3F A0
0040 | F6 07 2D 3D EF 86 B6 72</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>01B0011E6F4CA166</code></td>
<td><code>01347ACC7364A266</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>90000000</code> (144 in decimal)</td>
<td><code>A0000000</code> (160 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>6387AFED6602EEC4BE34FFABCB783146</code></td>
<td><code>8BFCFA6096C50012F64C5ADF976283FB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>9181A50F01240CA85879086C850C6C58</code></td>
<td><code>E30BC5CB5D677198505F75429F7475BF</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>7F1F8410807A10EB7C48409DA8D9F103</code></td>
<td><code>1830B137560A3FA0F6072D3DEF86B672</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>