Update content of files

This commit is contained in:
GitHub Action 2023-12-09 20:48:03 +00:00
parent 7d14146bc9
commit 617d0a6979
5 changed files with 214 additions and 215 deletions

View file

@ -87,7 +87,9 @@ A <code>BOOST_NOT_MODIFIED</code> RPC error will be returned when calling any of
<a href='/method/stories.getChatsToSend'>stories.getChatsToSend</a>#a56a8b60 = <a href='/type/messages.Chats'>messages.Chats</a>;</code></pre>
<p>Everything works exactly the same as when <a href="/api/stories#posting-stories">posting stories as a user</a>, with the only difference that clients should pass the appropriate <a href="/constructor/inputPeerChannel">inputPeerChannel</a> instead of <a href="/constructor/inputPeerSelf">inputPeerSelf</a> to <a href="/method/stories.canSendStory">stories.canSendStory</a>, <a href="/method/stories.sendStory">stories.sendStory</a> and all the other story methods, see the <a href="/api/stories#posting-stories">main documentation »</a> for more info. </p>
<p>Use <a href="/method/stories.getChatsToSend">stories.getChatsToSend</a> to obtain a list of channels where the user can post stories; <a href="/method/stories.canSendStory">stories.canSendStory</a> must still be used before uploading a story to make sure no other limit was reached, as described in the <a href="/api/stories#posting-stories">main documentation »</a>.</p></div>
<p>Use <a href="/method/stories.getChatsToSend">stories.getChatsToSend</a> to obtain a list of channels where the user can post stories; <a href="/method/stories.canSendStory">stories.canSendStory</a> must still be used before uploading a story to make sure no other limit was reached, as described in the <a href="/api/stories#posting-stories">main documentation »</a>.</p>
<h4><a class="anchor" href="#changing-message-accents" id="changing-message-accents" name="changing-message-accents"><i class="anchor-icon"></i></a>Changing message accents</h4>
<p>After reaching at least boost level <a href="/api/config#channel-color-level-min">channel_color_level_min »</a>, channels gain the ability to change their <a href="/api/colors">message accent palette »</a>.</p></div>
</div>

View file

@ -517,6 +517,8 @@ Note that the stickerset can be fetched using <a href="/constructor/inputSticker
<h4><a class="anchor" href="#stories-entities" id="stories-entities" name="stories-entities"><i class="anchor-icon"></i></a><code>stories_entities</code></h4>
<p>Whether <a href="/api/entities">styled text entities</a> and links in story text captions can be used by all users (<code>enabled</code>), only [Premium](/api/premium users) (<code>premium</code>), or no one (<code>disabled</code>). (string)</p>
<p>This field is used both when posting stories, to indicate to the user whether they can use entities, and when viewing stories, to hide entities (client-side) on stories posted by users whose <a href="/api/premium">Premium</a> subscription has expired (if <code>stories_entities == "premium"</code> and <a href="/constructor/user">user</a>.<code>premium</code> is not set, or if <code>stories_entities == "disabled"</code>). </p>
<h4><a class="anchor" href="#channel-color-level-min" id="channel-color-level-min" name="channel-color-level-min"><i class="anchor-icon"></i></a><code>channel_color_level_min</code></h4>
<p>After reaching at least this <a href="/api/boost">boost level »</a>, channels gain the ability to change their <a href="/api/colors">message accent palette »</a>. (integer)</p>
<h4><a class="anchor" href="#giveaway-gifts-purchase-available" id="giveaway-gifts-purchase-available" name="giveaway-gifts-purchase-available"><i class="anchor-icon"></i></a><code>giveaway_gifts_purchase_available</code></h4>
<h4><a class="anchor" href="#giveaway-add-peers-max" id="giveaway-add-peers-max" name="giveaway-add-peers-max"><i class="anchor-icon"></i></a><code>giveaway_add_peers_max</code></h4>
<h4><a class="anchor" href="#giveaway-countries-max" id="giveaway-countries-max" name="giveaway-countries-max"><i class="anchor-icon"></i></a><code>giveaway_countries_max</code></h4>
@ -525,7 +527,6 @@ Note that the stickerset can be fetched using <a href="/constructor/inputSticker
<h4><a class="anchor" href="#boosts-channel-level-max" id="boosts-channel-level-max" name="boosts-channel-level-max"><i class="anchor-icon"></i></a><code>boosts_channel_level_max</code></h4>
<h4><a class="anchor" href="#boosts-per-sent-gift" id="boosts-per-sent-gift" name="boosts-per-sent-gift"><i class="anchor-icon"></i></a><code>boosts_per_sent_gift</code></h4>
<h4><a class="anchor" href="#quote-length-max" id="quote-length-max" name="quote-length-max"><i class="anchor-icon"></i></a><code>quote_length_max</code></h4>
<h4><a class="anchor" href="#channel-color-level-min" id="channel-color-level-min" name="channel-color-level-min"><i class="anchor-icon"></i></a><code>channel_color_level_min</code></h4>
<h4><a class="anchor" href="#transcribe-audio-trial-weekly-number" id="transcribe-audio-trial-weekly-number" name="transcribe-audio-trial-weekly-number"><i class="anchor-icon"></i></a><code>transcribe_audio_trial_weekly_number</code></h4>
<h4><a class="anchor" href="#transcribe-audio-trial-duration-max" id="transcribe-audio-trial-duration-max" name="transcribe-audio-trial-duration-max"><i class="anchor-icon"></i></a><code>transcribe_audio_trial_duration_max</code></h4>
<h4><a class="anchor" href="#recommended-channels-limit-default" id="recommended-channels-limit-default" name="recommended-channels-limit-default"><i class="anchor-icon"></i></a><code>recommended_channels_limit_default</code></h4>

View file

@ -87,7 +87,7 @@
<tr>
<td><strong>reply_to</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/InputReplyTo">InputReplyTo</a></td>
<td> </td>
<td>If set, indicates that the message should be sent in reply to the specified message or story.</td>
</tr>
<tr>
<td><strong>peer</strong></td>
@ -107,7 +107,7 @@
<tr>
<td><strong>media</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.5?<a href="/type/InputMedia">InputMedia</a></td>
<td> </td>
<td>Attached media</td>
</tr>
</tbody>
</table>

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 FC 1A 0B 00 C2 BD 74 65
0010 | 14 00 00 00 F1 8E 7E BE 59 DE DF 5B B5 F9 3F E0
0020 | B8 6A A6 22 1D 70 B0 B9</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C0 B8 08 00 D5 CF 74 65
0010 | 14 00 00 00 F1 8E 7E BE 8A 1A 2C 01 1E 54 29 F6
0020 | 92 F6 46 62 87 3D EE AB</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>FC1A0B00C2BD7465</code></td>
<td><code>C0B80800D5CF7465</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>59DEDF5BB5F93FE0B86AA6221D70B0B9</code></td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</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 88 60 DF C2 BD 74 65
0010 | 74 00 00 00 63 24 16 05 59 DE DF 5B B5 F9 3F E0
0020 | B8 6A A6 22 1D 70 B0 B9 A1 E0 68 88 4F 45 FD C9
0030 | 74 BA A8 22 30 11 21 C3 08 1E 11 D1 2C 1F 19 BE
0040 | 5F 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 E8 EB 0F D6 CF 74 65
0010 | 74 00 00 00 63 24 16 05 8A 1A 2C 01 1E 54 29 F6
0020 | 92 F6 46 62 87 3D EE AB 6A C0 DB C7 98 A5 05 E5
0030 | 94 81 5E 49 FA E5 76 47 08 21 26 B9 EF E9 DB D1
0040 | 91 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,7 +132,7 @@
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>018860DFC2BD7465</code></td>
<td><code>01E8EB0FD6CF7465</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>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>59DEDF5BB5F93FE0B86AA6221D70B0B9</code></td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>A1E068884F45FDC974BAA822301121C3</code></td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>081E11D12C1F19BE5F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2166742883172466271</td>
<td><code>082126B9EFE9DBD191000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2388801092438446481</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 = 2166742883172466271</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2166742883172466271 = 1471902331 * 1472069741</code></p>
<pre><code>p = 1471902331
q = 1472069741</code></pre>
<pre><code>pq = 2388801092438446481</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2388801092438446481 = 1343244269 * 1778381749</code></p>
<pre><code>p = 1343244269
q = 1778381749</code></pre>
<!-- end pq -->
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
<!-- start p_q_inner_data_dc -->
<p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 95 5F F5 A9 08 1E 11 D1 2C 1F 19 BE 5F 00 00 00
0010 | 04 57 BB 72 7B 00 00 00 04 57 BE 00 6D 00 00 00
0020 | 59 DE DF 5B B5 F9 3F E0 B8 6A A6 22 1D 70 B0 B9
0030 | A1 E0 68 88 4F 45 FD C9 74 BA A8 22 30 11 21 C3
0040 | 82 12 94 E3 32 7D E3 34 6E EF FD 0C DE 04 44 B4
0050 | 35 BF 03 7F EA FA C9 1A AB 5D E9 5F 97 ED CA CA
<pre><code>0000 | 95 5F F5 A9 08 21 26 B9 EF E9 DB D1 91 00 00 00
0010 | 04 50 10 47 ED 00 00 00 04 69 FF F3 B5 00 00 00
0020 | 8A 1A 2C 01 1E 54 29 F6 92 F6 46 62 87 3D EE AB
0030 | 6A C0 DB C7 98 A5 05 E5 94 81 5E 49 FA E5 76 47
0040 | 4A DF 3F 67 BB 21 90 71 31 4F 16 E9 FB B4 A2 93
0050 | 5E C0 DC DD 27 4E 2D B5 32 05 1B 40 A0 CB F3 DE
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 = 1472069741</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>081E11D12C1F19BE5F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2166742883172466271</td>
<td><code>082126B9EFE9DBD191000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2388801092438446481</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>0457BB727B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1471902331</td>
<td><code>04501047ED000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1343244269</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>0457BE006D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1472069741</td>
<td><code>0469FFF3B5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1778381749</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>59DEDF5BB5F93FE0B86AA6221D70B0B9</code></td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>A1E068884F45FDC974BAA822301121C3</code></td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>821294E3327DE3346EEFFD0CDE0444B4</code> <code>35BF037FEAFAC91AAB5DE95F97EDCACA</code></td>
<td><code>4ADF3F67BB219071314F16E9FBB4A293</code> <code>5EC0DCDD274E2DB532051B40A0CBF3DE</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1472069741</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 = 955FF5A9081E11D12C1F19BE5F0000000457BB727B0000000457BE006D00000059DEDF5BB5F93FE0B86AA6221D70B0B9A1E068884F45FDC974BAA822301121C3821294E3327DE3346EEFFD0CDE0444B435BF037FEAFAC91AAB5DE95F97EDCACA02000000
random_padding_bytes = C55B9974477A10A7027C992B4BA5294202137AD6A670EC64185288591D167A0CC5ED15F531E110AF842CC23E6B22BB831F95DA61214A0E97326876BE3FE0C35A34FB9D8599397DFB4CC35048AFA6A7D00C4D6054A46C15DC936C418A</code></pre>
<pre><code>data = 955FF5A9082126B9EFE9DBD19100000004501047ED0000000469FFF3B50000008A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE576474ADF3F67BB219071314F16E9FBB4A2935EC0DCDD274E2DB532051B40A0CBF3DE02000000
random_padding_bytes = 7D4A606F265527494A39B92866DD6F044805CCB671235F4686E6737ADD18B798BC9BB488EE3B04226C50040177FDF7EB7B6AC9C0C35BD41B6A34C063039FE2E04DF12BED8CA0513879BFA1D6D2D3D054CFD3C828B866F5582AE97B69</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 = 5140F776F0F0FAEE120254ED061871F5BB4608C0DA34E65A342C7968B407D8CBF841A7696ADC9CF6E45458D6981621232F59CB53EE98F5FD834F2531DD65CDA6AD59A4F9601B7A8F590FA182A39C80D3A7C2C1ED75192B1DB9E72D727F06CF4468B237EDF01C63D73763F961406B9A33DE0BB896F5E09623641F00CAEFBB8A50839D658991E7D86B3DF238E00C987C1446B746BAC21373DD0A93D2CBD4B0BE57BBE670E5AD00EEA0C0F30BA989EA6BF37FFEEC75D59BB932C010A8E5AC9572E9F86857763A47F226E8E2034D457697628350D21ED96A71F8172C2AF3086BADEBAAD85C776AC194F48A59F750DA63FA1CF4BCAA0587DE688C8FF9E84F5753C01D</code></pre>
<pre><code>encrypted_data = 0322414A15A43AE2003E8477D3912F949D301B60D75A636D048EFF3C9A6EC5BE49B27CA4589CF503A4687AA4424348756AC550B3A8E41F2E52484E75A86D83733D313334A3DA3957F707D06CEA5C56ED0F85BD3790F983250CA3A5D5523695AF64261B7118AFAD7D6DB61482A379D4F59A85BFEE88EDB376C1FF65D481B7C8819E4EC1665E29DB44446E8E2128CF0F4A43D5C98375BE4CCB9B4E8B6CC93CECDF480AA9D94D88EF7B7054934D99CDB3A359E1002BEA64A3D0BD48009F25648362F4611610CB04E27AC7DF11451C342EEC533212D48B7CE11AE8D6ED1D1F255A14445000AAF6D10ACA942BD4729E38DFE7E9DC40417D3C1F9C8788663DA39E55D0</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 80 7B 08 00 C3 BD 74 65
0010 | 40 01 00 00 BE E4 12 D7 59 DE DF 5B B5 F9 3F E0
0020 | B8 6A A6 22 1D 70 B0 B9 A1 E0 68 88 4F 45 FD C9
0030 | 74 BA A8 22 30 11 21 C3 04 57 BB 72 7B 00 00 00
0040 | 04 57 BE 00 6D 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 51 40 F7 76 F0 F0 FA EE 12 02 54 ED
0060 | 06 18 71 F5 BB 46 08 C0 DA 34 E6 5A 34 2C 79 68
0070 | B4 07 D8 CB F8 41 A7 69 6A DC 9C F6 E4 54 58 D6
0080 | 98 16 21 23 2F 59 CB 53 EE 98 F5 FD 83 4F 25 31
0090 | DD 65 CD A6 AD 59 A4 F9 60 1B 7A 8F 59 0F A1 82
00A0 | A3 9C 80 D3 A7 C2 C1 ED 75 19 2B 1D B9 E7 2D 72
00B0 | 7F 06 CF 44 68 B2 37 ED F0 1C 63 D7 37 63 F9 61
00C0 | 40 6B 9A 33 DE 0B B8 96 F5 E0 96 23 64 1F 00 CA
00D0 | EF BB 8A 50 83 9D 65 89 91 E7 D8 6B 3D F2 38 E0
00E0 | 0C 98 7C 14 46 B7 46 BA C2 13 73 DD 0A 93 D2 CB
00F0 | D4 B0 BE 57 BB E6 70 E5 AD 00 EE A0 C0 F3 0B A9
0100 | 89 EA 6B F3 7F FE EC 75 D5 9B B9 32 C0 10 A8 E5
0110 | AC 95 72 E9 F8 68 57 76 3A 47 F2 26 E8 E2 03 4D
0120 | 45 76 97 62 83 50 D2 1E D9 6A 71 F8 17 2C 2A F3
0130 | 08 6B AD EB AA D8 5C 77 6A C1 94 F4 8A 59 F7 50
0140 | DA 63 FA 1C F4 BC AA 05 87 DE 68 8C 8F F9 E8 4F
0150 | 57 53 C0 1D</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 00 13 07 00 D6 CF 74 65
0010 | 40 01 00 00 BE E4 12 D7 8A 1A 2C 01 1E 54 29 F6
0020 | 92 F6 46 62 87 3D EE AB 6A C0 DB C7 98 A5 05 E5
0030 | 94 81 5E 49 FA E5 76 47 04 50 10 47 ED 00 00 00
0040 | 04 69 FF F3 B5 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 03 22 41 4A 15 A4 3A E2 00 3E 84 77
0060 | D3 91 2F 94 9D 30 1B 60 D7 5A 63 6D 04 8E FF 3C
0070 | 9A 6E C5 BE 49 B2 7C A4 58 9C F5 03 A4 68 7A A4
0080 | 42 43 48 75 6A C5 50 B3 A8 E4 1F 2E 52 48 4E 75
0090 | A8 6D 83 73 3D 31 33 34 A3 DA 39 57 F7 07 D0 6C
00A0 | EA 5C 56 ED 0F 85 BD 37 90 F9 83 25 0C A3 A5 D5
00B0 | 52 36 95 AF 64 26 1B 71 18 AF AD 7D 6D B6 14 82
00C0 | A3 79 D4 F5 9A 85 BF EE 88 ED B3 76 C1 FF 65 D4
00D0 | 81 B7 C8 81 9E 4E C1 66 5E 29 DB 44 44 6E 8E 21
00E0 | 28 CF 0F 4A 43 D5 C9 83 75 BE 4C CB 9B 4E 8B 6C
00F0 | C9 3C EC DF 48 0A A9 D9 4D 88 EF 7B 70 54 93 4D
0100 | 99 CD B3 A3 59 E1 00 2B EA 64 A3 D0 BD 48 00 9F
0110 | 25 64 83 62 F4 61 16 10 CB 04 E2 7A C7 DF 11 45
0120 | 1C 34 2E EC 53 32 12 D4 8B 7C E1 1A E8 D6 ED 1D
0130 | 1F 25 5A 14 44 50 00 AA F6 D1 0A CA 94 2B D4 72
0140 | 9E 38 DF E7 E9 DC 40 41 7D 3C 1F 9C 87 88 66 3D
0150 | A3 9E 55 D0</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 = C55B9974477A10A7027C992B4BA5294202137AD6A670EC64185288591
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>807B0800C3BD7465</code></td>
<td><code>00130700D6CF7465</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 = C55B9974477A10A7027C992B4BA5294202137AD6A670EC64185288591
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>59DEDF5BB5F93FE0B86AA6221D70B0B9</code></td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>A1E068884F45FDC974BAA822301121C3</code></td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>0457BB727B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1471902331</td>
<td><code>04501047ED000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1343244269</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>0457BE006D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1472069741</td>
<td><code>0469FFF3B5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1778381749</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 = C55B9974477A10A7027C992B4BA5294202137AD6A670EC64185288591
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001005140F776F0F0FAEE120254ED</code> <code>061871F5BB4608C0DA34E65A342C7968</code> <code>B407D8CBF841A7696ADC9CF6E45458D6</code> <code>981621232F59CB53EE98F5FD834F2531</code> <code>DD65CDA6AD59A4F9601B7A8F590FA182</code> <code>A39C80D3A7C2C1ED75192B1DB9E72D72</code> <code>7F06CF4468B237EDF01C63D73763F961</code> <code>406B9A33DE0BB896F5E09623641F00CA</code> <code>EFBB8A50839D658991E7D86B3DF238E0</code> <code>0C987C1446B746BAC21373DD0A93D2CB</code> <code>D4B0BE57BBE670E5AD00EEA0C0F30BA9</code> <code>89EA6BF37FFEEC75D59BB932C010A8E5</code> <code>AC9572E9F86857763A47F226E8E2034D</code> <code>457697628350D21ED96A71F8172C2AF3</code> <code>086BADEBAAD85C776AC194F48A59F750</code> <code>DA63FA1CF4BCAA0587DE688C8FF9E84F</code><br> <code>5753C01D</code></td>
<td><code>FE0001000322414A15A43AE2003E8477</code> <code>D3912F949D301B60D75A636D048EFF3C</code> <code>9A6EC5BE49B27CA4589CF503A4687AA4</code> <code>424348756AC550B3A8E41F2E52484E75</code> <code>A86D83733D313334A3DA3957F707D06C</code> <code>EA5C56ED0F85BD3790F983250CA3A5D5</code> <code>523695AF64261B7118AFAD7D6DB61482</code> <code>A379D4F59A85BFEE88EDB376C1FF65D4</code> <code>81B7C8819E4EC1665E29DB44446E8E21</code> <code>28CF0F4A43D5C98375BE4CCB9B4E8B6C</code> <code>C93CECDF480AA9D94D88EF7B7054934D</code> <code>99CDB3A359E1002BEA64A3D0BD48009F</code> <code>25648362F4611610CB04E27AC7DF1145</code> <code>1C342EEC533212D48B7CE11AE8D6ED1D</code> <code>1F255A14445000AAF6D10ACA942BD472</code> <code>9E38DFE7E9DC40417D3C1F9C8788663D</code><br> <code>A39E55D0</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = C55B9974477A10A7027C992B4BA5294202137AD6A670EC64185288591
<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 58 A7 9A C3 BD 74 65
0010 | 7C 02 00 00 5C 07 E8 D0 59 DE DF 5B B5 F9 3F E0
0020 | B8 6A A6 22 1D 70 B0 B9 A1 E0 68 88 4F 45 FD C9
0030 | 74 BA A8 22 30 11 21 C3 FE 50 02 00 4C 4E 4C A6
0040 | 13 FE 35 8D 63 35 DE 99 53 6B 1C 1F 07 AA 00 99
0050 | C1 EE 02 F9 CB 4D BE F2 E9 FC 75 39 43 6F 45 AE
0060 | D9 31 C9 62 A8 47 1F A1 26 C1 DA F2 9E 69 74 A0
0070 | D7 10 FA D5 60 DA 7E 89 B2 89 AE E5 CD 64 60 F7
0080 | 1B 8F A1 F3 66 04 16 BE E6 60 8C AE 10 39 FE 43
0090 | 0E C3 7B 61 64 95 67 51 CB 48 8C 47 33 1C CE AF
00A0 | 77 01 39 BD 96 B9 E8 2A A5 80 23 C8 60 14 95 8A
00B0 | C9 7C 42 8A 01 AD 79 7E AC 98 AE F0 92 E6 ED 77
00C0 | B7 22 2C 9C 3F 0F 30 62 3B 9B A6 C7 77 81 A5 FD
00D0 | 23 56 9E F9 56 6F 3B 15 9F 52 28 F1 1B 3C CE 5B
00E0 | 2C B3 04 B0 08 98 6B F1 AD 9B A6 83 2A EA 74 D1
00F0 | 1B 3F C8 80 13 36 7A 6A 65 7A F2 A1 40 6C 30 06
0100 | 7D 06 50 75 9A D9 C6 AB 0C E2 62 53 2A BD 3C 0E
0110 | A3 8C D8 58 E6 64 85 18 6B D0 4D E0 AD 29 FD 2F
0120 | C5 5F 30 C5 D3 AF A2 0D F5 34 A2 6D 7E F0 76 34
0130 | 84 17 BE E1 49 D6 91 F1 DA BE 87 63 C7 B9 E2 A0
0140 | C3 EE C2 28 15 EC 42 C1 C2 9F 80 A6 BA 73 87 E4
0150 | 26 60 12 09 4D 4B E8 38 7F AF 6E B9 86 49 A8 46
0160 | D8 9D B6 9E DA D7 9B 8A 0E D5 F2 56 2A 94 B9 06
0170 | 5B E8 82 A6 F0 D6 AB FE 96 44 61 4E 35 2E C3 73
0180 | 15 89 D3 CD 0C F3 96 0F 3D 9D C7 45 24 C8 34 84
0190 | A9 A2 5A E0 44 FE 1A 64 0D 1B E5 BD 23 82 88 76
01A0 | 60 37 55 56 68 D4 05 89 D2 3B E9 9E CE 04 80 2A
01B0 | 41 82 83 DE 27 83 CC 2E B2 41 BB E9 10 52 B5 19
01C0 | CC C4 A7 3F E0 52 F2 5A 77 45 16 A1 B7 CD 4D 5B
01D0 | 58 A1 F0 C4 C8 03 FF 45 63 77 8E 5F E3 72 C9 3D
01E0 | 3F AA 73 B8 E6 5D 59 9F 4B 15 1B 70 2E C8 26 DF
01F0 | 83 8F 90 64 21 14 19 D3 DD 93 90 EC 09 6F 79 13
0200 | 46 2B 36 A2 A2 FC 02 87 5A B0 9A BD F7 D9 BE 6E
0210 | 8B 29 E0 BC 42 25 ED 6A 45 63 DB A7 77 B4 98 C0
0220 | D5 90 59 46 A2 62 D4 C1 CE BB FD 3F 64 2B 17 35
0230 | 93 97 FC 0A A9 BA 38 F5 70 29 B4 F4 EC E8 8D 07
0240 | 79 45 C8 97 9C 8E 13 7A 98 68 B5 B3 7C 5A AF C4
0250 | EB 80 0F BD 27 49 4F A2 BE D9 17 78 F4 11 C4 F1
0260 | 08 B9 97 15 F8 F8 4D A8 9C CF 2D 84 D5 B2 F3 72
0270 | B0 2C 8F 1C D6 68 90 D3 D6 2B 80 7B E7 0C 25 E5
0280 | 78 D2 0B F6 14 4D 9C 49 BE B1 4C 35</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 48 0E C8 D6 CF 74 65
0010 | D8 02 00 00 5C 07 E8 D0 8A 1A 2C 01 1E 54 29 F6
0020 | 92 F6 46 62 87 3D EE AB 6A C0 DB C7 98 A5 05 E5
0030 | 94 81 5E 49 FA E5 76 47 FE 50 02 00 B0 2D 72 B5
0040 | 18 76 E0 99 A2 D4 B1 7B F6 F7 D3 6D F4 64 C3 20
0050 | 96 E7 81 98 AE CA A6 82 83 C1 82 4D 72 FB C5 44
0060 | C1 F1 61 8A 56 C0 6C B7 B5 A1 92 F3 15 6A F1 5E
0070 | 21 2F 1A FF 12 C8 76 D7 9E 93 79 7B 27 8A 34 59
0080 | 32 41 7F 21 F6 76 FB B6 C7 BC FE FE C9 CC 06 FC
0090 | 91 2D 8D D5 D4 33 F9 83 0D 4B 83 86 6F 23 6D BF
00A0 | 48 04 BC B5 93 70 45 9C B5 11 D1 65 E7 0C 69 97
00B0 | 77 41 7D 7D 53 2F E2 01 B2 5E 6F 97 2F 79 0F C6
00C0 | E3 E3 6C 51 18 3C 1D 66 F9 1C 56 14 1A E7 3C B2
00D0 | 3C 87 5A FB 48 65 5C 65 AF 63 32 F6 BB 8E A2 2A
00E0 | 49 19 02 9E 9B 63 AB AA 51 A6 C0 20 ED EE 8C C8
00F0 | 24 EF 53 58 01 29 16 66 78 77 D6 D9 21 D7 3F C2
0100 | 56 8C AC D5 32 DD 7E 31 B0 43 81 30 62 B7 F5 98
0110 | 42 59 A4 BB EC 4D B0 28 C5 6D 1E 75 0E 85 0E 4B
0120 | E9 44 0F AA A8 24 A8 9B F8 F7 DC E0 D4 A9 01 41
0130 | 90 B1 7D 21 48 92 70 19 67 9D 5A 69 F9 06 17 3F
0140 | A7 52 A4 16 18 65 2F D2 62 DE B1 B9 32 A6 F1 4F
0150 | 98 55 96 31 F6 16 1A A8 44 AA 25 F9 AF 8D 41 F2
0160 | EC 4F AE 9D C7 EF 5E D6 87 91 DA D8 3D C2 4D 88
0170 | D2 4B CE 8E 70 FA 9D 56 49 FB 8C 29 01 D0 63 A3
0180 | 92 17 FE E8 04 13 DB 14 23 F1 07 BC BE 68 E8 3E
0190 | 63 50 DC A8 01 76 5B 72 89 1C 80 D1 EC 7D EC 4B
01A0 | 41 93 39 98 70 CA 8B F0 85 05 D6 5D C3 2B FA F2
01B0 | 05 C3 96 8D E9 AF 1D EF B5 6C 72 4D E3 96 63 D2
01C0 | EA 86 09 95 0A A5 61 53 21 70 A9 40 70 EA 92 D0
01D0 | 35 CB CF F5 16 DA 6E DB BE 78 6B B3 B2 45 70 3C
01E0 | D8 43 45 E0 7C 25 D5 4B 9A 05 0D 09 59 A6 DF 68
01F0 | 39 56 62 BE FA A6 A4 4F 0C 7D 85 64 73 81 9A B0
0200 | 62 E1 34 43 22 99 DA 17 55 57 92 F6 2B 7E A6 7E
0210 | CD 2A 26 A2 96 9A BD EB 87 C1 02 EA 23 26 5F 26
0220 | 69 F6 ED 50 1E B1 CC 50 8B 73 08 7D 3F FE B1 29
0230 | 46 71 74 CC 7F FE 17 BE 82 E7 18 09 5B E8 90 80
0240 | 73 46 53 DA 2A DE 40 8E 0F 37 3A 89 E8 AD 5E 3C
0250 | E1 06 6C 49 14 2E C3 EB 5F E4 2B E7 8B F5 5C F5
0260 | F9 76 5B 52 94 99 CE F2 2B E7 31 C3 1B DB 03 A9
0270 | 6F 63 37 19 C2 AB 26 46 7F 11 DF F1 E3 79 30 F7
0280 | 47 A7 03 D7 D0 98 94 67 51 19 C4 F2</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 = C55B9974477A10A7027C992B4BA5294202137AD6A670EC64185288591
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>0158A79AC3BD7465</code></td>
<td><code>01480EC8D6CF7465</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>7C020000</code> (636 in decimal)</td>
<td><code>D8020000</code> (728 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = C55B9974477A10A7027C992B4BA5294202137AD6A670EC64185288591
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>59DEDF5BB5F93FE0B86AA6221D70B0B9</code></td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>A1E068884F45FDC974BAA822301121C3</code></td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE5002004C4E4CA613FE358D6335DE99</code> <code>536B1C1F07AA0099C1EE02F9CB4DBEF2</code> <code>E9FC7539436F45AED931C962A8471FA1</code> <code>26C1DAF29E6974A0D710FAD560DA7E89</code> <code>B289AEE5CD6460F71B8FA1F3660416BE</code> <code>E6608CAE1039FE430EC37B6164956751</code> <code>CB488C47331CCEAF770139BD96B9E82A</code> <code>A58023C86014958AC97C428A01AD797E</code> <code>AC98AEF092E6ED77B7222C9C3F0F3062</code> <code>3B9BA6C77781A5FD23569EF9566F3B15</code> <code>9F5228F11B3CCE5B2CB304B008986BF1</code> <code>AD9BA6832AEA74D11B3FC88013367A6A</code> <code>657AF2A1406C30067D0650759AD9C6AB</code> <code>0CE262532ABD3C0EA38CD858E6648518</code> <code>6BD04DE0AD29FD2FC55F30C5D3AFA20D</code> <code>F534A26D7EF076348417BEE149D691F1</code> <code>DABE8763C7B9E2A0C3EEC22815EC42C1</code> <code>C29F80A6BA7387E4266012094D4BE838</code> <code>7FAF6EB98649A846D89DB69EDAD79B8A</code> <code>0ED5F2562A94B9065BE882A6F0D6ABFE</code> <code>9644614E352EC3731589D3CD0CF3960F</code> <code>3D9DC74524C83484A9A25AE044FE1A64</code> <code>0D1BE5BD238288766037555668D40589</code> <code>D23BE99ECE04802A418283DE2783CC2E</code> <code>B241BBE91052B519CCC4A73FE052F25A</code> <code>774516A1B7CD4D5B58A1F0C4C803FF45</code> <code>63778E5FE372C93D3FAA73B8E65D599F</code> <code>4B151B702EC826DF838F9064211419D3</code> <code>DD9390EC096F7913462B36A2A2FC0287</code> <code>5AB09ABDF7D9BE6E8B29E0BC4225ED6A</code> <code>4563DBA777B498C0D5905946A262D4C1</code> <code>CEBBFD3F642B17359397FC0AA9BA38F5</code> <code>7029B4F4ECE88D077945C8979C8E137A</code> <code>9868B5B37C5AAFC4EB800FBD27494FA2</code> <code>BED91778F411C4F108B99715F8F84DA8</code> <code>9CCF2D84D5B2F372B02C8F1CD66890D3</code> <code>D62B807BE70C25E578D20BF6144D9C49</code><br> <code>BEB14C35</code></td>
<td><code>FE500200B02D72B51876E099A2D4B17B</code> <code>F6F7D36DF464C32096E78198AECAA682</code> <code>83C1824D72FBC544C1F1618A56C06CB7</code> <code>B5A192F3156AF15E212F1AFF12C876D7</code> <code>9E93797B278A345932417F21F676FBB6</code> <code>C7BCFEFEC9CC06FC912D8DD5D433F983</code> <code>0D4B83866F236DBF4804BCB59370459C</code> <code>B511D165E70C699777417D7D532FE201</code> <code>B25E6F972F790FC6E3E36C51183C1D66</code> <code>F91C56141AE73CB23C875AFB48655C65</code> <code>AF6332F6BB8EA22A4919029E9B63ABAA</code> <code>51A6C020EDEE8CC824EF535801291666</code> <code>7877D6D921D73FC2568CACD532DD7E31</code> <code>B043813062B7F5984259A4BBEC4DB028</code> <code>C56D1E750E850E4BE9440FAAA824A89B</code> <code>F8F7DCE0D4A9014190B17D2148927019</code> <code>679D5A69F906173FA752A41618652FD2</code> <code>62DEB1B932A6F14F98559631F6161AA8</code> <code>44AA25F9AF8D41F2EC4FAE9DC7EF5ED6</code> <code>8791DAD83DC24D88D24BCE8E70FA9D56</code> <code>49FB8C2901D063A39217FEE80413DB14</code> <code>23F107BCBE68E83E6350DCA801765B72</code> <code>891C80D1EC7DEC4B4193399870CA8BF0</code> <code>8505D65DC32BFAF205C3968DE9AF1DEF</code> <code>B56C724DE39663D2EA8609950AA56153</code> <code>2170A94070EA92D035CBCFF516DA6EDB</code> <code>BE786BB3B245703CD84345E07C25D54B</code> <code>9A050D0959A6DF68395662BEFAA6A44F</code> <code>0C7D856473819AB062E134432299DA17</code> <code>555792F62B7EA67ECD2A26A2969ABDEB</code> <code>87C102EA23265F2669F6ED501EB1CC50</code> <code>8B73087D3FFEB129467174CC7FFE17BE</code> <code>82E718095BE89080734653DA2ADE408E</code> <code>0F373A89E8AD5E3CE1066C49142EC3EB</code> <code>5FE42BE78BF55CF5F9765B529499CEF2</code> <code>2BE731C31BDB03A96F633719C2AB2646</code> <code>7F11DFF1E37930F747A703D7D0989467</code><br> <code>5119C4F2</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = C55B9974477A10A7027C992B4BA5294202137AD6A670EC64185288591
<!-- 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 = 4C4E4CA613FE358D6335DE99536B1C1F07AA0099C1EE02F9CB4DBEF2E9FC7539436F45AED931C962A8471FA126C1DAF29E6974A0D710FAD560DA7E89B289AEE5CD6460F71B8FA1F3660416BEE6608CAE1039FE430EC37B6164956751CB488C47331CCEAF770139BD96B9E82AA58023C86014958AC97C428A01AD797EAC98AEF092E6ED77B7222C9C3F0F30623B9BA6C77781A5FD23569EF9566F3B159F5228F11B3CCE5B2CB304B008986BF1AD9BA6832AEA74D11B3FC88013367A6A657AF2A1406C30067D0650759AD9C6AB0CE262532ABD3C0EA38CD858E66485186BD04DE0AD29FD2FC55F30C5D3AFA20DF534A26D7EF076348417BEE149D691F1DABE8763C7B9E2A0C3EEC22815EC42C1C29F80A6BA7387E4266012094D4BE8387FAF6EB98649A846D89DB69EDAD79B8A0ED5F2562A94B9065BE882A6F0D6ABFE9644614E352EC3731589D3CD0CF3960F3D9DC74524C83484A9A25AE044FE1A640D1BE5BD238288766037555668D40589D23BE99ECE04802A418283DE2783CC2EB241BBE91052B519CCC4A73FE052F25A774516A1B7CD4D5B58A1F0C4C803FF4563778E5FE372C93D3FAA73B8E65D599F4B151B702EC826DF838F9064211419D3DD9390EC096F7913462B36A2A2FC02875AB09ABDF7D9BE6E8B29E0BC4225ED6A4563DBA777B498C0D5905946A262D4C1CEBBFD3F642B17359397FC0AA9BA38F57029B4F4ECE88D077945C8979C8E137A9868B5B37C5AAFC4EB800FBD27494FA2BED91778F411C4F108B99715F8F84DA89CCF2D84D5B2F372B02C8F1CD66890D3D62B807BE70C25E578D20BF6144D9C49BEB14C35
tmp_aes_key = 56B2C3E6BB7FBD59CA9178DF4059D3BCA25157272819D34C149366D1E04D9851
tmp_aes_iv = E5D580D8753E8E3F6E6C714C25CB0017D99976612AE7E8689500A2CE821294E3</code></pre>
<pre><code>encrypted_answer = B02D72B51876E099A2D4B17BF6F7D36DF464C32096E78198AECAA68283C1824D72FBC544C1F1618A56C06CB7B5A192F3156AF15E212F1AFF12C876D79E93797B278A345932417F21F676FBB6C7BCFEFEC9CC06FC912D8DD5D433F9830D4B83866F236DBF4804BCB59370459CB511D165E70C699777417D7D532FE201B25E6F972F790FC6E3E36C51183C1D66F91C56141AE73CB23C875AFB48655C65AF6332F6BB8EA22A4919029E9B63ABAA51A6C020EDEE8CC824EF5358012916667877D6D921D73FC2568CACD532DD7E31B043813062B7F5984259A4BBEC4DB028C56D1E750E850E4BE9440FAAA824A89BF8F7DCE0D4A9014190B17D2148927019679D5A69F906173FA752A41618652FD262DEB1B932A6F14F98559631F6161AA844AA25F9AF8D41F2EC4FAE9DC7EF5ED68791DAD83DC24D88D24BCE8E70FA9D5649FB8C2901D063A39217FEE80413DB1423F107BCBE68E83E6350DCA801765B72891C80D1EC7DEC4B4193399870CA8BF08505D65DC32BFAF205C3968DE9AF1DEFB56C724DE39663D2EA8609950AA561532170A94070EA92D035CBCFF516DA6EDBBE786BB3B245703CD84345E07C25D54B9A050D0959A6DF68395662BEFAA6A44F0C7D856473819AB062E134432299DA17555792F62B7EA67ECD2A26A2969ABDEB87C102EA23265F2669F6ED501EB1CC508B73087D3FFEB129467174CC7FFE17BE82E718095BE89080734653DA2ADE408E0F373A89E8AD5E3CE1066C49142EC3EB5FE42BE78BF55CF5F9765B529499CEF22BE731C31BDB03A96F633719C2AB26467F11DFF1E37930F747A703D7D09894675119C4F2
tmp_aes_key = 78576E1A30E6B0940A9D9738D8A08F0902EE0C9B9DF2F4CA62703CDE732E4D9A
tmp_aes_iv = 7D469F9CC0DFA9F67BCC38FE9DD1E77B0EC6D30C040208B306BDB7684ADF3F67</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 6319F0BBD5C9431E73D83D3DD38E68C71C3871E7BA0D89B559DEDF5BB5F93FE0B86AA6221D70B0B9A1E068884F45FDC974BAA822301121C303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010003D66EDC067FE7D78DA60C9B3EA72A31D544C02611193B1F46D47894079C6676B664B6E9BFBAA93E33FBCD8AB19C34A40C4978023860571761E70DE143FCA1B6636B77845055964A2D27AE775074635E9BA4B29FD90ECF2F92B0534ED3252937566F4C8AFCDD398E718AF4E9817BA92B00EC39239E47DADCE4AA2ED8390816D89135D7168DEEC4E8C963B4D73AB479EF6E82E0FBD354968908C15F5FEA444431C54F8347A1A42CDAB57934EB56BF4010FD363399DAF51F72AFFF72D6A6B8D651A530B686B797DE062C9E5101C451187909FAC6A37303ABCAD08EC7F27ED9D176A9CF86574A94633C9126917470FF81BB4E45E9C39EB5FDA81C5BD45A84F53035C3BD7465BE17B117A77C665D
answer = BA0D89B559DEDF5BB5F93FE0B86AA6221D70B0B9A1E068884F45FDC974BAA822301121C303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010003D66EDC067FE7D78DA60C9B3EA72A31D544C02611193B1F46D47894079C6676B664B6E9BFBAA93E33FBCD8AB19C34A40C4978023860571761E70DE143FCA1B6636B77845055964A2D27AE775074635E9BA4B29FD90ECF2F92B0534ED3252937566F4C8AFCDD398E718AF4E9817BA92B00EC39239E47DADCE4AA2ED8390816D89135D7168DEEC4E8C963B4D73AB479EF6E82E0FBD354968908C15F5FEA444431C54F8347A1A42CDAB57934EB56BF4010FD363399DAF51F72AFFF72D6A6B8D651A530B686B797DE062C9E5101C451187909FAC6A37303ABCAD08EC7F27ED9D176A9CF86574A94633C9126917470FF81BB4E45E9C39EB5FDA81C5BD45A84F53035C3BD7465BE17B117A77C665D</code></pre>
<pre><code>answer_with_hash = 12271379349EDC31E311D0B9BC0B42E3EFB80C46BA0D89B58A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE5764703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100C5ED610DA5C0EFD8EC3E79DEA7EACFC9ACF3E18028737BE4E5D17A49C887A6430D9B369E166A20F84F326163AEF6C89189FB051359158455EF4746E528090406312C95871E92CADFF28F9054D5B3AF183FB7227CB68309110A68D3A57C57C067E5B3BAF41FF51D6E777713F67EC7481EEE76842DDBC830E1A2383A0C94A7DE6218337378EFA5D961E483FD36F4B5614B50CC8691D5B9E644DDF3F756EDB24099A3E0607F561E0FDBDEB41606D18EA643F2C50CC33BA4A4E8D57D940AFB474DE732B5746681E52592968C679FEF109EA8ABFB1167BAA904D705D09CAA6966FC2E7B40EB4109EF58020B7451FB43851B5DC28F5AF7FB9AF5723C383C115A7D85C5D6CF746585C7531A5463B73A
answer = BA0D89B58A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE5764703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100C5ED610DA5C0EFD8EC3E79DEA7EACFC9ACF3E18028737BE4E5D17A49C887A6430D9B369E166A20F84F326163AEF6C89189FB051359158455EF4746E528090406312C95871E92CADFF28F9054D5B3AF183FB7227CB68309110A68D3A57C57C067E5B3BAF41FF51D6E777713F67EC7481EEE76842DDBC830E1A2383A0C94A7DE6218337378EFA5D961E483FD36F4B5614B50CC8691D5B9E644DDF3F756EDB24099A3E0607F561E0FDBDEB41606D18EA643F2C50CC33BA4A4E8D57D940AFB474DE732B5746681E52592968C679FEF109EA8ABFB1167BAA904D705D09CAA6966FC2E7B40EB4109EF58020B7451FB43851B5DC28F5AF7FB9AF5723C383C115A7D85C5D6CF746585C7531A5463B73A</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 59 DE DF 5B B5 F9 3F E0 B8 6A A6 22
0010 | 1D 70 B0 B9 A1 E0 68 88 4F 45 FD C9 74 BA A8 22
0020 | 30 11 21 C3 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 8A 1A 2C 01 1E 54 29 F6 92 F6 46 62
0010 | 87 3D EE AB 6A C0 DB C7 98 A5 05 E5 94 81 5E 49
0020 | FA E5 76 47 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 = BA0D89B559DEDF5BB5F93FE0B86AA6221D70B0B9A1E068884F45FDC974BAA822301121C
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 | 03 D6 6E DC 06 7F E7 D7 8D A6 0C 9B 3E A7 2A 31
0140 | D5 44 C0 26 11 19 3B 1F 46 D4 78 94 07 9C 66 76
0150 | B6 64 B6 E9 BF BA A9 3E 33 FB CD 8A B1 9C 34 A4
0160 | 0C 49 78 02 38 60 57 17 61 E7 0D E1 43 FC A1 B6
0170 | 63 6B 77 84 50 55 96 4A 2D 27 AE 77 50 74 63 5E
0180 | 9B A4 B2 9F D9 0E CF 2F 92 B0 53 4E D3 25 29 37
0190 | 56 6F 4C 8A FC DD 39 8E 71 8A F4 E9 81 7B A9 2B
01A0 | 00 EC 39 23 9E 47 DA DC E4 AA 2E D8 39 08 16 D8
01B0 | 91 35 D7 16 8D EE C4 E8 C9 63 B4 D7 3A B4 79 EF
01C0 | 6E 82 E0 FB D3 54 96 89 08 C1 5F 5F EA 44 44 31
01D0 | C5 4F 83 47 A1 A4 2C DA B5 79 34 EB 56 BF 40 10
01E0 | FD 36 33 99 DA F5 1F 72 AF FF 72 D6 A6 B8 D6 51
01F0 | A5 30 B6 86 B7 97 DE 06 2C 9E 51 01 C4 51 18 79
0200 | 09 FA C6 A3 73 03 AB CA D0 8E C7 F2 7E D9 D1 76
0210 | A9 CF 86 57 4A 94 63 3C 91 26 91 74 70 FF 81 BB
0220 | 4E 45 E9 C3 9E B5 FD A8 1C 5B D4 5A 84 F5 30 35
0230 | C3 BD 74 65</code></pre>
0130 | C5 ED 61 0D A5 C0 EF D8 EC 3E 79 DE A7 EA CF C9
0140 | AC F3 E1 80 28 73 7B E4 E5 D1 7A 49 C8 87 A6 43
0150 | 0D 9B 36 9E 16 6A 20 F8 4F 32 61 63 AE F6 C8 91
0160 | 89 FB 05 13 59 15 84 55 EF 47 46 E5 28 09 04 06
0170 | 31 2C 95 87 1E 92 CA DF F2 8F 90 54 D5 B3 AF 18
0180 | 3F B7 22 7C B6 83 09 11 0A 68 D3 A5 7C 57 C0 67
0190 | E5 B3 BA F4 1F F5 1D 6E 77 77 13 F6 7E C7 48 1E
01A0 | EE 76 84 2D DB C8 30 E1 A2 38 3A 0C 94 A7 DE 62
01B0 | 18 33 73 78 EF A5 D9 61 E4 83 FD 36 F4 B5 61 4B
01C0 | 50 CC 86 91 D5 B9 E6 44 DD F3 F7 56 ED B2 40 99
01D0 | A3 E0 60 7F 56 1E 0F DB DE B4 16 06 D1 8E A6 43
01E0 | F2 C5 0C C3 3B A4 A4 E8 D5 7D 94 0A FB 47 4D E7
01F0 | 32 B5 74 66 81 E5 25 92 96 8C 67 9F EF 10 9E A8
0200 | AB FB 11 67 BA A9 04 D7 05 D0 9C AA 69 66 FC 2E
0210 | 7B 40 EB 41 09 EF 58 02 0B 74 51 FB 43 85 1B 5D
0220 | C2 8F 5A F7 FB 9A F5 72 3C 38 3C 11 5A 7D 85 C5
0230 | D6 CF 74 65</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 = BA0D89B559DEDF5BB5F93FE0B86AA6221D70B0B9A1E068884F45FDC974BAA822301121C
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>59DEDF5BB5F93FE0B86AA6221D70B0B9</code></td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>A1E068884F45FDC974BAA822301121C3</code></td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B559DEDF5BB5F93FE0B86AA6221D70B0B9A1E068884F45FDC974BAA822301121C
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE00010003D66EDC067FE7D78DA60C9B</code> <code>3EA72A31D544C02611193B1F46D47894</code> <code>079C6676B664B6E9BFBAA93E33FBCD8A</code> <code>B19C34A40C4978023860571761E70DE1</code> <code>43FCA1B6636B77845055964A2D27AE77</code> <code>5074635E9BA4B29FD90ECF2F92B0534E</code> <code>D3252937566F4C8AFCDD398E718AF4E9</code> <code>817BA92B00EC39239E47DADCE4AA2ED8</code> <code>390816D89135D7168DEEC4E8C963B4D7</code> <code>3AB479EF6E82E0FBD354968908C15F5F</code> <code>EA444431C54F8347A1A42CDAB57934EB</code> <code>56BF4010FD363399DAF51F72AFFF72D6</code> <code>A6B8D651A530B686B797DE062C9E5101</code> <code>C451187909FAC6A37303ABCAD08EC7F2</code> <code>7ED9D176A9CF86574A94633C91269174</code> <code>70FF81BB4E45E9C39EB5FDA81C5BD45A</code><br> <code>84F53035</code></td>
<td><code>FE000100C5ED610DA5C0EFD8EC3E79DE</code> <code>A7EACFC9ACF3E18028737BE4E5D17A49</code> <code>C887A6430D9B369E166A20F84F326163</code> <code>AEF6C89189FB051359158455EF4746E5</code> <code>28090406312C95871E92CADFF28F9054</code> <code>D5B3AF183FB7227CB68309110A68D3A5</code> <code>7C57C067E5B3BAF41FF51D6E777713F6</code> <code>7EC7481EEE76842DDBC830E1A2383A0C</code> <code>94A7DE6218337378EFA5D961E483FD36</code> <code>F4B5614B50CC8691D5B9E644DDF3F756</code> <code>EDB24099A3E0607F561E0FDBDEB41606</code> <code>D18EA643F2C50CC33BA4A4E8D57D940A</code> <code>FB474DE732B5746681E52592968C679F</code> <code>EF109EA8ABFB1167BAA904D705D09CAA</code> <code>6966FC2E7B40EB4109EF58020B7451FB</code> <code>43851B5DC28F5AF7FB9AF5723C383C11</code><br> <code>5A7D85C5</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>C3BD7465</code> (1702149571 in decimal)</td>
<td><code>D6CF7465</code> (1702154198 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B559DEDF5BB5F93FE0B86AA6221D70B0B9A1E068884F45FDC974BAA822301121C
<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 = 5878CC9BCEE0DE7CE9B439D6BE47F88C2B24F4F96ACE1F0C74143335813297DCC40BE82B54628A0C0C3623C0FCFA2453B255101ECD9C1226560F5F2BE832C726CF503B1AF394F557995F95B3EE94D965FFAF43FA862346E58FDC1D2802020E15BB97BE50F2FD7089832D4D0A6F54D4332444C817A4623A10438C633210D77E22AF91ACC18F6743D8E26840664C5B9EBD98ED5F1BED4CFD7439D8C5D872E76FA05AA5903A347262EC2D5D8948207DC0C6FF22A14DF9951CC6890BC9E7D8B51CDEEE509F2AE9DA418A155801B88EB87FF8A02A76159209FC4346EA27104996797D8D6090F7F6F4655C58F363C225E5BC532C1E278FC3C7E3EAD461893E37C66CD5</code></pre>
<pre><code>b = 5DC51D8C155FDDE99C5E4D472A278409BAAF528266CD33AF0259FFAF68D4E7AA558EAE663ED8D29A9FE68E8DA7519163446FFB3CE549A75ED66AD37BE580F66C1306BA4EFE9A14CACA87A900A79968F50E57288B06DD6AEBA49C803C3F50D9BBE53E2074EBD49E145BB84B3DC6D502C03E2D58E7BC271CC3EF93A04433846F126D4951BF6E405870EF9BE01812FB44F10A9EC3C95B266AA0D843436F167178A49F9750A7F0FDCF287D57656A804C191C14BE9D719F9ECF9412EF17AC0AD4501876E19F640239EC75EC6F3567CB7B9FE48DA3C671980891F18D17B89622FDF265FC70EDC226A500981987D296073E693E1EC51A39C166CA5E464E1297E5AD368E</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 = B1952AB41F3302737E52EC2F611B34E444C09B1C21E4CF650E6C6683CB9E99F7EF0A2DB8B9C0268E857670D813E405C57D37C533699513F382D1579EC5B68182DB1C600B3665041247C98F05ADBFB44419CD8B986F268AD8E69993E0A6E9BB5AF9C8425BCDF5B8ADABFAA872D1B34195A8CE178C9353AEF8B8A59FC1C2616627842B86C83236B4E40EE86DCC960E4D08B3BAB54C183A9D8715DF0D9BF77EA110E08A6E9A11BDD93CE47C5059B2E9277A0CFC246B00896DCE82D3038E9033D92629643D63482BC5D1BA688A404A7D2753CFC0A4070B8845B505B233C22726D8A21C5E38760703746C245C7D35A3150724388798F4B8D86440D05EF43DE4BECB98</code></pre>
<pre><code>g_b = 9E8684FCBA2B2D5015BE8FCB61DD37975DD1FF1C8DEC0D50F802B55DCD0EC328F0116C23ACE6E839D5B0BC278823D6D790F3ED28D52E0790D32AAB7A37EB3622021D28878CA2FFA7F8AC3683DBD5AA47C2D716CADD9EE216055095798F253174E445CC594B1D953B1AA5305B1463C96A85307F1B0184CEF0792515B7A85BFA5C4647C452AC4BD7CC8E710F5B590659A86E6230473026273F71549A684069DC3E369D7D8D8CE13F734557C2AB042D9C36718B012C38AE64DF7F006B71BF3FA1C273ED08B30207C41172A6B8D46F829E2C9E47EACA8200A3FFC5F37B9D53CC421153E51BA9136474689358CA50D72AAA457632596E966F15962C0DC49971C8F2C8</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 59 DE DF 5B B5 F9 3F E0 B8 6A A6 22
0010 | 1D 70 B0 B9 A1 E0 68 88 4F 45 FD C9 74 BA A8 22
0020 | 30 11 21 C3 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | B1 95 2A B4 1F 33 02 73 7E 52 EC 2F 61 1B 34 E4
0040 | 44 C0 9B 1C 21 E4 CF 65 0E 6C 66 83 CB 9E 99 F7
0050 | EF 0A 2D B8 B9 C0 26 8E 85 76 70 D8 13 E4 05 C5
0060 | 7D 37 C5 33 69 95 13 F3 82 D1 57 9E C5 B6 81 82
0070 | DB 1C 60 0B 36 65 04 12 47 C9 8F 05 AD BF B4 44
0080 | 19 CD 8B 98 6F 26 8A D8 E6 99 93 E0 A6 E9 BB 5A
0090 | F9 C8 42 5B CD F5 B8 AD AB FA A8 72 D1 B3 41 95
00A0 | A8 CE 17 8C 93 53 AE F8 B8 A5 9F C1 C2 61 66 27
00B0 | 84 2B 86 C8 32 36 B4 E4 0E E8 6D CC 96 0E 4D 08
00C0 | B3 BA B5 4C 18 3A 9D 87 15 DF 0D 9B F7 7E A1 10
00D0 | E0 8A 6E 9A 11 BD D9 3C E4 7C 50 59 B2 E9 27 7A
00E0 | 0C FC 24 6B 00 89 6D CE 82 D3 03 8E 90 33 D9 26
00F0 | 29 64 3D 63 48 2B C5 D1 BA 68 8A 40 4A 7D 27 53
0100 | CF C0 A4 07 0B 88 45 B5 05 B2 33 C2 27 26 D8 A2
0110 | 1C 5E 38 76 07 03 74 6C 24 5C 7D 35 A3 15 07 24
0120 | 38 87 98 F4 B8 D8 64 40 D0 5E F4 3D E4 BE CB 98</code></pre>
<pre><code>0000 | 54 B6 43 66 8A 1A 2C 01 1E 54 29 F6 92 F6 46 62
0010 | 87 3D EE AB 6A C0 DB C7 98 A5 05 E5 94 81 5E 49
0020 | FA E5 76 47 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 9E 86 84 FC BA 2B 2D 50 15 BE 8F CB 61 DD 37 97
0040 | 5D D1 FF 1C 8D EC 0D 50 F8 02 B5 5D CD 0E C3 28
0050 | F0 11 6C 23 AC E6 E8 39 D5 B0 BC 27 88 23 D6 D7
0060 | 90 F3 ED 28 D5 2E 07 90 D3 2A AB 7A 37 EB 36 22
0070 | 02 1D 28 87 8C A2 FF A7 F8 AC 36 83 DB D5 AA 47
0080 | C2 D7 16 CA DD 9E E2 16 05 50 95 79 8F 25 31 74
0090 | E4 45 CC 59 4B 1D 95 3B 1A A5 30 5B 14 63 C9 6A
00A0 | 85 30 7F 1B 01 84 CE F0 79 25 15 B7 A8 5B FA 5C
00B0 | 46 47 C4 52 AC 4B D7 CC 8E 71 0F 5B 59 06 59 A8
00C0 | 6E 62 30 47 30 26 27 3F 71 54 9A 68 40 69 DC 3E
00D0 | 36 9D 7D 8D 8C E1 3F 73 45 57 C2 AB 04 2D 9C 36
00E0 | 71 8B 01 2C 38 AE 64 DF 7F 00 6B 71 BF 3F A1 C2
00F0 | 73 ED 08 B3 02 07 C4 11 72 A6 B8 D4 6F 82 9E 2C
0100 | 9E 47 EA CA 82 00 A3 FF C5 F3 7B 9D 53 CC 42 11
0110 | 53 E5 1B A9 13 64 74 68 93 58 CA 50 D7 2A AA 45
0120 | 76 32 59 6E 96 6F 15 96 2C 0D C4 99 71 C8 F2 C8</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 = BA0D89B559DEDF5BB5F93FE0B86AA6221D70B0B9A1E068884F45FDC974BAA822301121C
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>59DEDF5BB5F93FE0B86AA6221D70B0B9</code></td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>A1E068884F45FDC974BAA822301121C3</code></td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE000100B1952AB41F3302737E52EC2F</code> <code>611B34E444C09B1C21E4CF650E6C6683</code> <code>CB9E99F7EF0A2DB8B9C0268E857670D8</code> <code>13E405C57D37C533699513F382D1579E</code> <code>C5B68182DB1C600B3665041247C98F05</code> <code>ADBFB44419CD8B986F268AD8E69993E0</code> <code>A6E9BB5AF9C8425BCDF5B8ADABFAA872</code> <code>D1B34195A8CE178C9353AEF8B8A59FC1</code> <code>C2616627842B86C83236B4E40EE86DCC</code> <code>960E4D08B3BAB54C183A9D8715DF0D9B</code> <code>F77EA110E08A6E9A11BDD93CE47C5059</code> <code>B2E9277A0CFC246B00896DCE82D3038E</code> <code>9033D92629643D63482BC5D1BA688A40</code> <code>4A7D2753CFC0A4070B8845B505B233C2</code> <code>2726D8A21C5E38760703746C245C7D35</code> <code>A3150724388798F4B8D86440D05EF43D</code><br> <code>E4BECB98</code></td>
<td><code>FE0001009E8684FCBA2B2D5015BE8FCB</code> <code>61DD37975DD1FF1C8DEC0D50F802B55D</code> <code>CD0EC328F0116C23ACE6E839D5B0BC27</code> <code>8823D6D790F3ED28D52E0790D32AAB7A</code> <code>37EB3622021D28878CA2FFA7F8AC3683</code> <code>DBD5AA47C2D716CADD9EE21605509579</code> <code>8F253174E445CC594B1D953B1AA5305B</code> <code>1463C96A85307F1B0184CEF0792515B7</code> <code>A85BFA5C4647C452AC4BD7CC8E710F5B</code> <code>590659A86E6230473026273F71549A68</code> <code>4069DC3E369D7D8D8CE13F734557C2AB</code> <code>042D9C36718B012C38AE64DF7F006B71</code> <code>BF3FA1C273ED08B30207C41172A6B8D4</code> <code>6F829E2C9E47EACA8200A3FFC5F37B9D</code> <code>53CC421153E51BA9136474689358CA50</code> <code>D72AAA457632596E966F15962C0DC499</code><br> <code>71C8F2C8</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 = BA0D89B559DEDF5BB5F93FE0B86AA6221D70B0B9A1E068884F45FDC974BAA822301121C
<!-- 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 = 54B6436659DEDF5BB5F93FE0B86AA6221D70B0B9A1E068884F45FDC974BAA822301121C30000000000000000FE000100B1952AB41F3302737E52EC2F611B34E444C09B1C21E4CF650E6C6683CB9E99F7EF0A2DB8B9C0268E857670D813E405C57D37C533699513F382D1579EC5B68182DB1C600B3665041247C98F05ADBFB44419CD8B986F268AD8E69993E0A6E9BB5AF9C8425BCDF5B8ADABFAA872D1B34195A8CE178C9353AEF8B8A59FC1C2616627842B86C83236B4E40EE86DCC960E4D08B3BAB54C183A9D8715DF0D9BF77EA110E08A6E9A11BDD93CE47C5059B2E9277A0CFC246B00896DCE82D3038E9033D92629643D63482BC5D1BA688A404A7D2753CFC0A4070B8845B505B233C22726D8A21C5E38760703746C245C7D35A3150724388798F4B8D86440D05EF43DE4BECB98
padding = F69BBD80927115ACB89164D0
tmp_aes_key = 56B2C3E6BB7FBD59CA9178DF4059D3BCA25157272819D34C149366D1E04D9851
tmp_aes_iv = E5D580D8753E8E3F6E6C714C25CB0017D99976612AE7E8689500A2CE821294E3</code></pre>
<pre><code>data = 54B643668A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE576470000000000000000FE0001009E8684FCBA2B2D5015BE8FCB61DD37975DD1FF1C8DEC0D50F802B55DCD0EC328F0116C23ACE6E839D5B0BC278823D6D790F3ED28D52E0790D32AAB7A37EB3622021D28878CA2FFA7F8AC3683DBD5AA47C2D716CADD9EE216055095798F253174E445CC594B1D953B1AA5305B1463C96A85307F1B0184CEF0792515B7A85BFA5C4647C452AC4BD7CC8E710F5B590659A86E6230473026273F71549A684069DC3E369D7D8D8CE13F734557C2AB042D9C36718B012C38AE64DF7F006B71BF3FA1C273ED08B30207C41172A6B8D46F829E2C9E47EACA8200A3FFC5F37B9D53CC421153E51BA9136474689358CA50D72AAA457632596E966F15962C0DC49971C8F2C8
padding = 468F095460FF0C3DAB7F600C
tmp_aes_key = 78576E1A30E6B0940A9D9738D8A08F0902EE0C9B9DF2F4CA62703CDE732E4D9A
tmp_aes_iv = 7D469F9CC0DFA9F67BCC38FE9DD1E77B0EC6D30C040208B306BDB7684ADF3F67</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 = 23BC410D26E4C48F28548BC9B1590D266064D3F1E7CB4B06F34FBB73CE3B45713EDEFCECA538578403B8D06ED2CBA2B7EEB2B105CCF468AC8456B602B38602DB37AEF13D3CA9BCB9867BED2C1FA91B5D652D871D2EA71427640CA2BCE82D02578FE43DA39BAA56150D51EDBEACD86090840DABA6DC72265CB49616FB225F5DBB7E6E8C2C3543B7BBAB26B56C3931323C5BD47212B1F2B35471D4E304491A6D4EDC00049DC66176D670F69BB1E1442AD7C6110DCBE3A4AAFBB4A167BECAC2916B91F292C8084251DA204F83E9B3A2CE9E03456D472019F5555AC6BA4E9285FF96536FB7AB369BBBDA7D0AD5C493680EDAE8157DD4313DB2CC6DE351C04B355E39579757E0828598ECCB519E52B4D04AD6C73CE656EB2DC4D76A53F527DEC8ABAF3B71DA1F83D17EB7D0D430CBFE9ACAFA23565A3064EEEAEDCB24EBA89320FAF3F5B90FCEE999AF857EF25AA6E274972D</code></pre>
<pre><code>encrypted_data = 43F7500A87615A4615C7A2F4C6C7C3AE2ADF91ECFD33FD9962D381E8E71D9FA33B78B2A176343890A4295B101CCAFF29801CCDEA284222064388DC4B3EAC94F4FD60A73F930B42EEC19A31138E42CCF9C84BEDD9BF3CADEAB539C904916D1EAAB70112F7546CE2C4E40B053C10322BAC88920F3E4626B10DFD6E14C0C849FC7E5F222839DC5D43C8E73D4E09B2700B389AB6C2736A6F59DC2FCEA44457C6EF668C78D9E7882421A11EF86E23E034AF28D6F52AFF562AAADF26762894286A83F4065887AC666BB79C24E8C1255AE02A26B3996CEF685D680C76C9672C5D61DF4F3F79BF5460A8E74538E39D32A5BFAF0F385323952C0D97FEA2947F5E3CEE2BD2F9F1038A9C875C6858B8761E2BC80F39BA5ECC87A4CD0BC0494556BC695B505500B1CFD96BBDAC0CA9D3483C752B5381AC82767BA272C755F954412816504C60BC04E90E4A07984172113ADC915B7C0A</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 04 3E 0B 00 C3 BD 74 65
0010 | 78 01 00 00 1F 5F 04 F5 59 DE DF 5B B5 F9 3F E0
0020 | B8 6A A6 22 1D 70 B0 B9 A1 E0 68 88 4F 45 FD C9
0030 | 74 BA A8 22 30 11 21 C3 FE 50 01 00 23 BC 41 0D
0040 | 26 E4 C4 8F 28 54 8B C9 B1 59 0D 26 60 64 D3 F1
0050 | E7 CB 4B 06 F3 4F BB 73 CE 3B 45 71 3E DE FC EC
0060 | A5 38 57 84 03 B8 D0 6E D2 CB A2 B7 EE B2 B1 05
0070 | CC F4 68 AC 84 56 B6 02 B3 86 02 DB 37 AE F1 3D
0080 | 3C A9 BC B9 86 7B ED 2C 1F A9 1B 5D 65 2D 87 1D
0090 | 2E A7 14 27 64 0C A2 BC E8 2D 02 57 8F E4 3D A3
00A0 | 9B AA 56 15 0D 51 ED BE AC D8 60 90 84 0D AB A6
00B0 | DC 72 26 5C B4 96 16 FB 22 5F 5D BB 7E 6E 8C 2C
00C0 | 35 43 B7 BB AB 26 B5 6C 39 31 32 3C 5B D4 72 12
00D0 | B1 F2 B3 54 71 D4 E3 04 49 1A 6D 4E DC 00 04 9D
00E0 | C6 61 76 D6 70 F6 9B B1 E1 44 2A D7 C6 11 0D CB
00F0 | E3 A4 AA FB B4 A1 67 BE CA C2 91 6B 91 F2 92 C8
0100 | 08 42 51 DA 20 4F 83 E9 B3 A2 CE 9E 03 45 6D 47
0110 | 20 19 F5 55 5A C6 BA 4E 92 85 FF 96 53 6F B7 AB
0120 | 36 9B BB DA 7D 0A D5 C4 93 68 0E DA E8 15 7D D4
0130 | 31 3D B2 CC 6D E3 51 C0 4B 35 5E 39 57 97 57 E0
0140 | 82 85 98 EC CB 51 9E 52 B4 D0 4A D6 C7 3C E6 56
0150 | EB 2D C4 D7 6A 53 F5 27 DE C8 AB AF 3B 71 DA 1F
0160 | 83 D1 7E B7 D0 D4 30 CB FE 9A CA FA 23 56 5A 30
0170 | 64 EE EA ED CB 24 EB A8 93 20 FA F3 F5 B9 0F CE
0180 | E9 99 AF 85 7E F2 5A A6 E2 74 97 2D</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 04 13 07 00 D6 CF 74 65
0010 | 78 01 00 00 1F 5F 04 F5 8A 1A 2C 01 1E 54 29 F6
0020 | 92 F6 46 62 87 3D EE AB 6A C0 DB C7 98 A5 05 E5
0030 | 94 81 5E 49 FA E5 76 47 FE 50 01 00 43 F7 50 0A
0040 | 87 61 5A 46 15 C7 A2 F4 C6 C7 C3 AE 2A DF 91 EC
0050 | FD 33 FD 99 62 D3 81 E8 E7 1D 9F A3 3B 78 B2 A1
0060 | 76 34 38 90 A4 29 5B 10 1C CA FF 29 80 1C CD EA
0070 | 28 42 22 06 43 88 DC 4B 3E AC 94 F4 FD 60 A7 3F
0080 | 93 0B 42 EE C1 9A 31 13 8E 42 CC F9 C8 4B ED D9
0090 | BF 3C AD EA B5 39 C9 04 91 6D 1E AA B7 01 12 F7
00A0 | 54 6C E2 C4 E4 0B 05 3C 10 32 2B AC 88 92 0F 3E
00B0 | 46 26 B1 0D FD 6E 14 C0 C8 49 FC 7E 5F 22 28 39
00C0 | DC 5D 43 C8 E7 3D 4E 09 B2 70 0B 38 9A B6 C2 73
00D0 | 6A 6F 59 DC 2F CE A4 44 57 C6 EF 66 8C 78 D9 E7
00E0 | 88 24 21 A1 1E F8 6E 23 E0 34 AF 28 D6 F5 2A FF
00F0 | 56 2A AA DF 26 76 28 94 28 6A 83 F4 06 58 87 AC
0100 | 66 6B B7 9C 24 E8 C1 25 5A E0 2A 26 B3 99 6C EF
0110 | 68 5D 68 0C 76 C9 67 2C 5D 61 DF 4F 3F 79 BF 54
0120 | 60 A8 E7 45 38 E3 9D 32 A5 BF AF 0F 38 53 23 95
0130 | 2C 0D 97 FE A2 94 7F 5E 3C EE 2B D2 F9 F1 03 8A
0140 | 9C 87 5C 68 58 B8 76 1E 2B C8 0F 39 BA 5E CC 87
0150 | A4 CD 0B C0 49 45 56 BC 69 5B 50 55 00 B1 CF D9
0160 | 6B BD AC 0C A9 D3 48 3C 75 2B 53 81 AC 82 76 7B
0170 | A2 72 C7 55 F9 54 41 28 16 50 4C 60 BC 04 E9 0E
0180 | 4A 07 98 41 72 11 3A DC 91 5B 7C 0A</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>043E0B00C3BD7465</code></td>
<td><code>04130700D6CF7465</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>59DEDF5BB5F93FE0B86AA6221D70B0B9</code></td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>A1E068884F45FDC974BAA822301121C3</code></td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE50010023BC410D26E4C48F28548BC9</code> <code>B1590D266064D3F1E7CB4B06F34FBB73</code> <code>CE3B45713EDEFCECA538578403B8D06E</code> <code>D2CBA2B7EEB2B105CCF468AC8456B602</code> <code>B38602DB37AEF13D3CA9BCB9867BED2C</code> <code>1FA91B5D652D871D2EA71427640CA2BC</code> <code>E82D02578FE43DA39BAA56150D51EDBE</code> <code>ACD86090840DABA6DC72265CB49616FB</code> <code>225F5DBB7E6E8C2C3543B7BBAB26B56C</code> <code>3931323C5BD47212B1F2B35471D4E304</code> <code>491A6D4EDC00049DC66176D670F69BB1</code> <code>E1442AD7C6110DCBE3A4AAFBB4A167BE</code> <code>CAC2916B91F292C8084251DA204F83E9</code> <code>B3A2CE9E03456D472019F5555AC6BA4E</code> <code>9285FF96536FB7AB369BBBDA7D0AD5C4</code> <code>93680EDAE8157DD4313DB2CC6DE351C0</code> <code>4B355E39579757E0828598ECCB519E52</code> <code>B4D04AD6C73CE656EB2DC4D76A53F527</code> <code>DEC8ABAF3B71DA1F83D17EB7D0D430CB</code> <code>FE9ACAFA23565A3064EEEAEDCB24EBA8</code> <code>9320FAF3F5B90FCEE999AF857EF25AA6</code><br> <code>E274972D</code></td>
<td><code>FE50010043F7500A87615A4615C7A2F4</code> <code>C6C7C3AE2ADF91ECFD33FD9962D381E8</code> <code>E71D9FA33B78B2A176343890A4295B10</code> <code>1CCAFF29801CCDEA284222064388DC4B</code> <code>3EAC94F4FD60A73F930B42EEC19A3113</code> <code>8E42CCF9C84BEDD9BF3CADEAB539C904</code> <code>916D1EAAB70112F7546CE2C4E40B053C</code> <code>10322BAC88920F3E4626B10DFD6E14C0</code> <code>C849FC7E5F222839DC5D43C8E73D4E09</code> <code>B2700B389AB6C2736A6F59DC2FCEA444</code> <code>57C6EF668C78D9E7882421A11EF86E23</code> <code>E034AF28D6F52AFF562AAADF26762894</code> <code>286A83F4065887AC666BB79C24E8C125</code> <code>5AE02A26B3996CEF685D680C76C9672C</code> <code>5D61DF4F3F79BF5460A8E74538E39D32</code> <code>A5BFAF0F385323952C0D97FEA2947F5E</code> <code>3CEE2BD2F9F1038A9C875C6858B8761E</code> <code>2BC80F39BA5ECC87A4CD0BC0494556BC</code> <code>695B505500B1CFD96BBDAC0CA9D3483C</code> <code>752B5381AC82767BA272C755F9544128</code> <code>16504C60BC04E90E4A07984172113ADC</code><br> <code>915B7C0A</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 = 29D550452738C5D5243D21EEF71D21FFB93F3AB03938FACB83CFA34E19D9614E53A7780CA95FF9A9D94E2301DF8B5C06B1488F80B8CC20E1ABFC68DA7E85CA8893E778577D643CC2E615C186FE195B99A89A3C696D3525A3E186466AB768D246B1D16B360029B13DE4AC41550B97C44AAB0F81BF17AD50FBE38838631660BE90D714BDA7F93E2D8EBC0970D8A303C7F80E4953B58792675D93E59DB40FDAABA5D109B8FCF767E61729DE4712D5C7ACECF9E1ED065280970790394C27E9E1E9BDFDAF331E8646708ADB1502159D3138E77F66E12D9BAA05DA564E14A3694BE7059542819B8EF77CFC232F51DC9BE17BC9C6B099AC2536DB26F67F89C0FFF8E513</code></pre>
<pre><code>auth_key = 1B60A767BDFA34AA71F26A012F2EE980B2AD0F0E1FD2266D8AA1D048A6C751DD8074B8CA6E0BE46AB8CE544223D0F288FB4B2F6B85920A0A0BE9F4162E833A8A7A362FBA3EB0E6CF99DD0D603386D28DDE90BE6FB9B197C5E6B9EF616D32797EE025564E0765E5A155FA6E006A1FF2D557418ADE516D1DFC7B76762A75BC32780070DC4508BEF40D593E7BDA46F76521474B0CBF510F9F728490EA691C09E0F05D43798C703B6E9655619359EAC828B28B98B16C51B7B264D09A66226C725043BF182C0A06C5E59DB1D13CAA2D3416E9FB259DDA37B8DCDA021CCC3F3604C6E3F37C164754579A11909C524E2EFEEC5792AA89BAFD9B700B14B950252B283605</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 D8 94 E3 C3 BD 74 65
0010 | 78 00 00 00 34 F7 CB 3B 59 DE DF 5B B5 F9 3F E0
0020 | B8 6A A6 22 1D 70 B0 B9 A1 E0 68 88 4F 45 FD C9
0030 | 74 BA A8 22 30 11 21 C3 75 CE EC A7 57 B5 1E 32
0040 | 54 6F 1A 52 29 5E 13 ED</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 18 C9 11 D7 CF 74 65
0010 | A8 00 00 00 34 F7 CB 3B 8A 1A 2C 01 1E 54 29 F6
0020 | 92 F6 46 62 87 3D EE AB 6A C0 DB C7 98 A5 05 E5
0030 | 94 81 5E 49 FA E5 76 47 EC E7 ED D1 82 82 44 6F
0040 | AB A0 88 3A 32 51 71 1D</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>01D894E3C3BD7465</code></td>
<td><code>0118C911D7CF7465</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>78000000</code> (120 in decimal)</td>
<td><code>A8000000</code> (168 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>59DEDF5BB5F93FE0B86AA6221D70B0B9</code></td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>A1E068884F45FDC974BAA822301121C3</code></td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>75CEECA757B51E32546F1A52295E13ED</code></td>
<td><code>ECE7EDD18282446FABA0883A3251711D</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

@ -1048,9 +1048,7 @@ var Assets = {
username: username,
auction: true
}, function(result) {
if (result.error) {
return showAlert(result.error);
} else if (result.confirm_message) {
if (result.confirm_message) {
showConfirm(result.confirm_message, function() {
doPutToAuction();
}, result.confirm_button);
@ -1150,9 +1148,7 @@ var Assets = {
username: username,
auction: false
}, function(result) {
if (result.error) {
return showAlert(result.error);
} else if (result.confirm_message) {
if (result.confirm_message) {
showConfirm(result.confirm_message, function() {
doSellUsername();
}, result.confirm_button);