Update content of files

This commit is contained in:
GitHub Action 2024-01-26 18:44:02 +00:00
parent 767cbda66f
commit 69aa7a0f00
9 changed files with 253 additions and 214 deletions

View file

@ -49,7 +49,7 @@ An error is characterized by several parameters:</p>
<h4><a class="anchor" href="#error-type" id="error-type" name="error-type"><i class="anchor-icon"></i></a>Error Type</h4>
<p>A string literal in the form of <code>/[A-Z_0-9]+/</code>, which summarizes the problem. For example, <code>AUTH_KEY_UNREGISTERED</code>. This is an optional parameter.</p>
<h4><a class="anchor" href="#error-database" id="error-database" name="error-database"><i class="anchor-icon"></i></a>Error Database</h4>
<p>A full human-readable JSON list of RPC errors that can be returned by all methods in the API can be found <a href="/file/400780400611/2/XkmfThIEcv8.110347.json/51cc99a679642fa439">here »</a>, what follows is a description of its fields: </p>
<p>A full human-readable JSON list of RPC errors that can be returned by all methods in the API can be found <a href="/file/400780400139/3/9tGNf7t7Qes.110764.json/5860a4abc1d147899b">here »</a>, what follows is a description of its fields: </p>
<ul>
<li><code>errors</code> - All error messages and codes for each method (object).<ul>
<li>Keys: Error codes as strings (numeric strings)</li>

View file

@ -103,6 +103,23 @@
</table>
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
<p><a href="/type/Updates">Updates</a></p>
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
<table class="table">
<thead>
<tr>
<th>Code</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>400</td>
<td>MSG_ID_INVALID</td>
<td>Invalid message ID provided.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#discussion-groups" id="discussion-groups" name="discussion-groups"><i class="anchor-icon"></i></a><a href="/api/discussion">Discussion groups</a></h4>
<p>Groups can be associated to a channel as a discussion group, to allow users to discuss about posts.</p></div>

View file

@ -87,7 +87,24 @@
</tbody>
</table>
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
<p><a href="/type/Updates">Updates</a></p></div>
<p><a href="/type/Updates">Updates</a></p>
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
<table class="table">
<thead>
<tr>
<th>Code</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>400</td>
<td>PEER_ID_INVALID</td>
<td>The provided peer id is invalid.</td>
</tr>
</tbody>
</table></div>
</div>

View file

@ -95,6 +95,11 @@
<tbody>
<tr>
<td>400</td>
<td>MAX_DATE_INVALID</td>
<td>The specified maximum date is invalid.</td>
</tr>
<tr>
<td>400</td>
<td>MSG_WAIT_FAILED</td>
<td>A waiting call returned an error.</td>
</tr>

View file

@ -94,11 +94,6 @@
</thead>
<tbody>
<tr>
<td>406</td>
<td>GIFTCODE_NOT_ALLOWED</td>
<td> </td>
</tr>
<tr>
<td>400</td>
<td>GIFT_SLUG_EXPIRED</td>
<td>The specified gift slug has expired.</td>

View file

@ -99,6 +99,11 @@
</tr>
<tr>
<td>400</td>
<td>STORY_ID_EMPTY</td>
<td>You specified no story IDs.</td>
</tr>
<tr>
<td>400</td>
<td>USER_PUBLIC_MISSING</td>
<td>Cannot generate a link to stories posted by a peer without a username.</td>
</tr>

View file

@ -105,7 +105,7 @@
<tr>
<td>400</td>
<td>STORIES_NEVER_CREATED</td>
<td> </td>
<td>This peer hasn't ever posted any stories.</td>
</tr>
<tr>
<td>400</td>

View file

@ -104,7 +104,7 @@
<tr>
<td>400</td>
<td>STORIES_NEVER_CREATED</td>
<td> </td>
<td>This peer hasn't ever posted any stories.</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 2C 7E 08 00 D9 43 AE 65
0010 | 14 00 00 00 F1 8E 7E BE 24 1F 00 3A F6 F6 FD 97
0020 | 50 7C DC D4 33 FA 01 B4</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 F8 0F 0C 00 C0 FB B3 65
0010 | 14 00 00 00 F1 8E 7E BE 0F B3 89 6D B8 D4 F6 4A
0020 | A3 BF 00 07 47 45 01 BB</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>2C7E0800D943AE65</code></td>
<td><code>F80F0C00C0FBB365</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>241F003AF6F6FD97507CDCD433FA01B4</code></td>
<td><code>0FB3896DB8D4F64AA3BF0007474501BB</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 D4 2A A0 D9 43 AE 65
0010 | AC 00 00 00 63 24 16 05 24 1F 00 3A F6 F6 FD 97
0020 | 50 7C DC D4 33 FA 01 B4 EE 4B 80 54 7C 05 E0 4E
0030 | 0C 5D BE 6A 1E 7C 6F E2 08 13 C9 85 5A A9 E3 EB
0040 | AF 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 08 25 87 C0 FB B3 65
0010 | CC 00 00 00 63 24 16 05 0F B3 89 6D B8 D4 F6 4A
0020 | A3 BF 00 07 47 45 01 BB B2 FB 10 D3 78 A3 4B 01
0030 | 87 44 4E 66 1C A0 BC 2D 08 12 FB 88 BE A7 BA B9
0040 | 27 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>01D42AA0D943AE65</code></td>
<td><code>01082587C0FBB365</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>AC000000</code> (172 in decimal)</td>
<td><code>CC000000</code> (204 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>241F003AF6F6FD97507CDCD433FA01B4</code></td>
<td><code>0FB3896DB8D4F64AA3BF0007474501BB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>EE4B80547C05E04E0C5DBE6A1E7C6FE2</code></td>
<td><code>B2FB10D378A34B0187444E661CA0BC2D</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>0813C9855AA9E3EBAF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1425817381483309999</td>
<td><code>0812FB88BEA7BAB927000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1367837264276273447</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 = 1425817381483309999</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1425817381483309999 = 1193570509 * 1194581611</code></p>
<pre><code>p = 1193570509
q = 1194581611</code></pre>
<pre><code>pq = 1367837264276273447</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1367837264276273447 = 1145893927 * 1193685761</code></p>
<pre><code>p = 1145893927
q = 1193685761</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 13 C9 85 5A A9 E3 EB AF 00 00 00
0010 | 04 47 24 70 CD 00 00 00 04 47 33 DE 6B 00 00 00
0020 | 24 1F 00 3A F6 F6 FD 97 50 7C DC D4 33 FA 01 B4
0030 | EE 4B 80 54 7C 05 E0 4E 0C 5D BE 6A 1E 7C 6F E2
0040 | E7 E9 0B 5C E3 77 F3 B7 7A B2 3B DA B9 02 C5 38
0050 | EC 83 06 E9 53 61 32 FA 91 49 7D D3 16 33 9C 34
<pre><code>0000 | 95 5F F5 A9 08 12 FB 88 BE A7 BA B9 27 00 00 00
0010 | 04 44 4C F4 27 00 00 00 04 47 26 33 01 00 00 00
0020 | 0F B3 89 6D B8 D4 F6 4A A3 BF 00 07 47 45 01 BB
0030 | B2 FB 10 D3 78 A3 4B 01 87 44 4E 66 1C A0 BC 2D
0040 | 94 25 B6 19 AD 20 13 51 DA 61 FF 35 D8 D7 1F 10
0050 | 17 2F C1 2A E3 5F 80 E1 2D C8 26 AD AC CE 38 DF
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 = 1194581611</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>0813C9855AA9E3EBAF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1425817381483309999</td>
<td><code>0812FB88BEA7BAB927000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1367837264276273447</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>04472470CD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1193570509</td>
<td><code>04444CF427000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1145893927</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>044733DE6B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1194581611</td>
<td><code>0447263301000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1193685761</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>241F003AF6F6FD97507CDCD433FA01B4</code></td>
<td><code>0FB3896DB8D4F64AA3BF0007474501BB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>EE4B80547C05E04E0C5DBE6A1E7C6FE2</code></td>
<td><code>B2FB10D378A34B0187444E661CA0BC2D</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>E7E90B5CE377F3B77AB23BDAB902C538</code> <code>EC8306E9536132FA91497DD316339C34</code></td>
<td><code>9425B619AD201351DA61FF35D8D71F10</code> <code>172FC12AE35F80E12DC826ADACCE38DF</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1194581611</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 = 955FF5A90813C9855AA9E3EBAF00000004472470CD000000044733DE6B000000241F003AF6F6FD97507CDCD433FA01B4EE4B80547C05E04E0C5DBE6A1E7C6FE2E7E90B5CE377F3B77AB23BDAB902C538EC8306E9536132FA91497DD316339C3402000000
random_padding_bytes = 3ECAF7EBC8BAFD416F7887A914C17ECF171D437D87E7B160EBA8DC99472113CD52156DDB7B0F6F3004983D381CA2368E67733DC4812E52053A77DDD91D4DC2E19FC65FCE1FCDB652723ED156BE637085953BC96583C2DB2CC273DA10</code></pre>
<pre><code>data = 955FF5A90812FB88BEA7BAB92700000004444CF42700000004472633010000000FB3896DB8D4F64AA3BF0007474501BBB2FB10D378A34B0187444E661CA0BC2D9425B619AD201351DA61FF35D8D71F10172FC12AE35F80E12DC826ADACCE38DF02000000
random_padding_bytes = 493EED61CB26155C38368CCD6D4994E9EC8501BE820C9D4FC3F51ED630C390EF4A541E70EF70321606360D2602B0C2BB2ED6190BF1712EB8082B7791A42556955145014F947E4BAA5DDA157EAB8B60469D0834AA1EFBADA91D9DF7FD</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 = A399DE72003D26DE4886E25DF298B0D922868C4A27BCB03E59165EDE38A1A2E0555C11D05EFE80A7895F7617470C51DEDD6CD44CE5083BADC377065C592443A363CCDAC0193D9B8EDB1A2E16A6305BCAE156510C936A61BC8CAFDD5D193E0A7226465FDEB405B7F07102A3FFA1514568BE5DCE975D9BD0183A0341D49AE79C86078855C117EC4E1D7276D7E9B225BA1FEB8F2D6B6EC9241586E21B900134913B66ACADF5F696DAFD6C7B0D6BB8C1EF09EFFB1206D0B89FBE3C61F1DC044D101FA960AD6EF7B47BC1605413A500D5121BF67A5A3422EB8C97A2734FCA1295EAB6AB85A1D09693A65673312C06CFBBEB7D47EC8084AAD07C5AAB4286FAD8AC9B3E</code></pre>
<pre><code>encrypted_data = 341338BAFE30B6F50135AD07F4571652DDAD90697D5BE5B32AE38BCF0A5F54DBEDB039694EC300BC75EC388C4A202822E385826F3171B8EB607997C6FAA99DC3AAD24D23603F8170975382258F770452B27817879CCBC8AB3014E82E985A9C6032A4E529E3F1615A8698EA18B846CEE48D18C656AF3D64DE9E3A5DF5DB5E929AA1355942534EBC5DBC5CBC057C97CE48656585DF91B19A44FA77DC345CAE1BF8CDE43EB4A759A989E9EEA192986149E8FFB443E699045F7B08AA866BDC429F66FDA98276688FC0BF3BB3FCB3F9FE57911AE3A95FD71624ED6EC89A93EB73EF249517E4343D3644D044250EC135833BCF2F3FFB783B80A3105113E9B71E2E0E7F</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 9C B1 0E 00 D9 43 AE 65
0010 | 40 01 00 00 BE E4 12 D7 24 1F 00 3A F6 F6 FD 97
0020 | 50 7C DC D4 33 FA 01 B4 EE 4B 80 54 7C 05 E0 4E
0030 | 0C 5D BE 6A 1E 7C 6F E2 04 47 24 70 CD 00 00 00
0040 | 04 47 33 DE 6B 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 A3 99 DE 72 00 3D 26 DE 48 86 E2 5D
0060 | F2 98 B0 D9 22 86 8C 4A 27 BC B0 3E 59 16 5E DE
0070 | 38 A1 A2 E0 55 5C 11 D0 5E FE 80 A7 89 5F 76 17
0080 | 47 0C 51 DE DD 6C D4 4C E5 08 3B AD C3 77 06 5C
0090 | 59 24 43 A3 63 CC DA C0 19 3D 9B 8E DB 1A 2E 16
00A0 | A6 30 5B CA E1 56 51 0C 93 6A 61 BC 8C AF DD 5D
00B0 | 19 3E 0A 72 26 46 5F DE B4 05 B7 F0 71 02 A3 FF
00C0 | A1 51 45 68 BE 5D CE 97 5D 9B D0 18 3A 03 41 D4
00D0 | 9A E7 9C 86 07 88 55 C1 17 EC 4E 1D 72 76 D7 E9
00E0 | B2 25 BA 1F EB 8F 2D 6B 6E C9 24 15 86 E2 1B 90
00F0 | 01 34 91 3B 66 AC AD F5 F6 96 DA FD 6C 7B 0D 6B
0100 | B8 C1 EF 09 EF FB 12 06 D0 B8 9F BE 3C 61 F1 DC
0110 | 04 4D 10 1F A9 60 AD 6E F7 B4 7B C1 60 54 13 A5
0120 | 00 D5 12 1B F6 7A 5A 34 22 EB 8C 97 A2 73 4F CA
0130 | 12 95 EA B6 AB 85 A1 D0 96 93 A6 56 73 31 2C 06
0140 | CF BB EB 7D 47 EC 80 84 AA D0 7C 5A AB 42 86 FA
0150 | D8 AC 9B 3E</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 FC 0F 0C 00 C0 FB B3 65
0010 | 40 01 00 00 BE E4 12 D7 0F B3 89 6D B8 D4 F6 4A
0020 | A3 BF 00 07 47 45 01 BB B2 FB 10 D3 78 A3 4B 01
0030 | 87 44 4E 66 1C A0 BC 2D 04 44 4C F4 27 00 00 00
0040 | 04 47 26 33 01 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 34 13 38 BA FE 30 B6 F5 01 35 AD 07
0060 | F4 57 16 52 DD AD 90 69 7D 5B E5 B3 2A E3 8B CF
0070 | 0A 5F 54 DB ED B0 39 69 4E C3 00 BC 75 EC 38 8C
0080 | 4A 20 28 22 E3 85 82 6F 31 71 B8 EB 60 79 97 C6
0090 | FA A9 9D C3 AA D2 4D 23 60 3F 81 70 97 53 82 25
00A0 | 8F 77 04 52 B2 78 17 87 9C CB C8 AB 30 14 E8 2E
00B0 | 98 5A 9C 60 32 A4 E5 29 E3 F1 61 5A 86 98 EA 18
00C0 | B8 46 CE E4 8D 18 C6 56 AF 3D 64 DE 9E 3A 5D F5
00D0 | DB 5E 92 9A A1 35 59 42 53 4E BC 5D BC 5C BC 05
00E0 | 7C 97 CE 48 65 65 85 DF 91 B1 9A 44 FA 77 DC 34
00F0 | 5C AE 1B F8 CD E4 3E B4 A7 59 A9 89 E9 EE A1 92
0100 | 98 61 49 E8 FF B4 43 E6 99 04 5F 7B 08 AA 86 6B
0110 | DC 42 9F 66 FD A9 82 76 68 8F C0 BF 3B B3 FC B3
0120 | F9 FE 57 91 1A E3 A9 5F D7 16 24 ED 6E C8 9A 93
0130 | EB 73 EF 24 95 17 E4 34 3D 36 44 D0 44 25 0E C1
0140 | 35 83 3B CF 2F 3F FB 78 3B 80 A3 10 51 13 E9 B7
0150 | 1E 2E 0E 7F</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 = 3ECAF7EBC8BAFD416F7887A914C17ECF171D437D87E7B160EBA8DC994
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>9CB10E00D943AE65</code></td>
<td><code>FC0F0C00C0FBB365</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 = 3ECAF7EBC8BAFD416F7887A914C17ECF171D437D87E7B160EBA8DC994
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>241F003AF6F6FD97507CDCD433FA01B4</code></td>
<td><code>0FB3896DB8D4F64AA3BF0007474501BB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>EE4B80547C05E04E0C5DBE6A1E7C6FE2</code></td>
<td><code>B2FB10D378A34B0187444E661CA0BC2D</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>04472470CD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1193570509</td>
<td><code>04444CF427000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1145893927</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>044733DE6B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1194581611</td>
<td><code>0447263301000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1193685761</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 = 3ECAF7EBC8BAFD416F7887A914C17ECF171D437D87E7B160EBA8DC994
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE000100A399DE72003D26DE4886E25D</code> <code>F298B0D922868C4A27BCB03E59165EDE</code> <code>38A1A2E0555C11D05EFE80A7895F7617</code> <code>470C51DEDD6CD44CE5083BADC377065C</code> <code>592443A363CCDAC0193D9B8EDB1A2E16</code> <code>A6305BCAE156510C936A61BC8CAFDD5D</code> <code>193E0A7226465FDEB405B7F07102A3FF</code> <code>A1514568BE5DCE975D9BD0183A0341D4</code> <code>9AE79C86078855C117EC4E1D7276D7E9</code> <code>B225BA1FEB8F2D6B6EC9241586E21B90</code> <code>0134913B66ACADF5F696DAFD6C7B0D6B</code> <code>B8C1EF09EFFB1206D0B89FBE3C61F1DC</code> <code>044D101FA960AD6EF7B47BC1605413A5</code> <code>00D5121BF67A5A3422EB8C97A2734FCA</code> <code>1295EAB6AB85A1D09693A65673312C06</code> <code>CFBBEB7D47EC8084AAD07C5AAB4286FA</code><br> <code>D8AC9B3E</code></td>
<td><code>FE000100341338BAFE30B6F50135AD07</code> <code>F4571652DDAD90697D5BE5B32AE38BCF</code> <code>0A5F54DBEDB039694EC300BC75EC388C</code> <code>4A202822E385826F3171B8EB607997C6</code> <code>FAA99DC3AAD24D23603F817097538225</code> <code>8F770452B27817879CCBC8AB3014E82E</code> <code>985A9C6032A4E529E3F1615A8698EA18</code> <code>B846CEE48D18C656AF3D64DE9E3A5DF5</code> <code>DB5E929AA1355942534EBC5DBC5CBC05</code> <code>7C97CE48656585DF91B19A44FA77DC34</code> <code>5CAE1BF8CDE43EB4A759A989E9EEA192</code> <code>986149E8FFB443E699045F7B08AA866B</code> <code>DC429F66FDA98276688FC0BF3BB3FCB3</code> <code>F9FE57911AE3A95FD71624ED6EC89A93</code> <code>EB73EF249517E4343D3644D044250EC1</code> <code>35833BCF2F3FFB783B80A3105113E9B7</code><br> <code>1E2E0E7F</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 3ECAF7EBC8BAFD416F7887A914C17ECF171D437D87E7B160EBA8DC994
<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 9C 58 43 DA 43 AE 65
0010 | EC 02 00 00 5C 07 E8 D0 24 1F 00 3A F6 F6 FD 97
0020 | 50 7C DC D4 33 FA 01 B4 EE 4B 80 54 7C 05 E0 4E
0030 | 0C 5D BE 6A 1E 7C 6F E2 FE 50 02 00 B9 CD 70 FC
0040 | 28 8D 08 42 DF 75 A8 62 F9 F0 90 A2 C5 66 E6 3D
0050 | 83 96 BC FF D6 5E E7 25 39 1B A9 8D 5D B3 FD 96
0060 | 17 BF 14 1E A9 55 A2 E4 B9 D0 7D 38 EC E6 C1 46
0070 | DE 5D F3 F9 86 49 2C 5B DF 1C 93 99 C4 4F 35 9A
0080 | AB 2B F9 22 DB C0 26 85 A2 4D 37 C0 B2 E5 D3 06
0090 | E4 31 34 AD BC 60 47 49 D7 0A A8 93 73 35 85 60
00A0 | 23 16 7E 09 B3 6F 37 2D 98 77 3F 1A A7 12 E6 81
00B0 | BB 96 8C CF AF 55 3D 76 A9 0E 7D 11 02 41 9D C7
00C0 | 06 7D CD 4F 31 A9 B8 AE 47 05 E8 F3 31 D1 8F 37
00D0 | 3D 83 4A 97 1D 61 92 60 9D 3B EA 77 A7 07 CF 29
00E0 | A4 88 E3 B6 73 BA 1F 76 D9 1E ED 78 57 B0 97 66
00F0 | 17 84 6A FE CD 31 13 03 D8 E5 B7 1F 59 68 0C 7A
0100 | BA 4D CB CA 28 83 1D 32 C3 4D ED E0 DC B6 4D FE
0110 | 24 80 65 6E 0A DB E8 78 71 D0 55 5F 54 68 FA AE
0120 | 29 EE E6 69 29 47 83 EE EB C7 0F E9 2E 4D CD 86
0130 | 2F 68 D6 79 AE 49 B8 83 6F 45 EA C3 F0 C9 8A 21
0140 | 00 12 C8 6B A4 BE 71 57 F3 04 A7 B1 14 80 BE 9E
0150 | DA C4 DE 80 02 B5 3C A1 2E 7D 68 A2 32 35 BB 06
0160 | 35 4D CF F9 7A 02 86 79 6E 99 D1 EF 68 BC 1E 57
0170 | D2 96 EB ED 30 B4 4B F3 C8 12 6C 6D A5 72 81 C2
0180 | 4C 37 93 D7 72 07 F5 80 37 B6 1E D8 31 C3 31 62
0190 | 3E 4E 7D A3 BD 9D 2A 82 E2 04 76 19 EC 47 15 09
01A0 | 1B 2C 1D 9C AE 5A 64 2B 09 FA 34 1C 1C 2A 52 24
01B0 | FA A8 8A 15 AC 7D FC 0D 32 05 6B 12 07 AF 39 E1
01C0 | B3 36 86 BE E4 97 46 B0 32 23 2A 96 19 D8 D0 E1
01D0 | 0F 62 30 9A C5 B8 6F 76 43 08 80 32 C9 BF 73 59
01E0 | 84 F0 36 61 76 0F E0 FF 75 C5 D2 07 CB 83 05 68
01F0 | 20 E5 D9 EC 4A 87 BC A4 D3 2E 48 C8 AF A2 3F AC
0200 | F2 F3 46 8E D6 76 21 4E 2E 4B C4 23 06 22 58 6F
0210 | 9E 31 4F 3F FF B0 F9 06 6E 28 15 D0 AA 84 82 D6
0220 | 1E A7 85 9D 0C 54 5C E4 43 63 99 2B D0 54 0E 3C
0230 | 38 BD E7 52 25 EF EA A4 BA 7F 0A 6B 98 58 30 2A
0240 | 5B BD 77 6F 2B A5 CA 17 DD B3 3E 81 65 3E 3E 9C
0250 | B0 24 96 65 A0 A0 8F BB EA 0B 05 0B 28 B2 CF 1F
0260 | E5 37 07 0E 8B D6 88 A9 79 5A B8 A7 F9 B8 31 06
0270 | E0 22 20 E4 BB 09 46 AF E7 DE 0E B1 C5 74 5D 3F
0280 | 53 20 BB C6 CC 77 B3 E5 5D CB 2C 13</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 A4 A6 3C C1 FB B3 65
0010 | 8C 02 00 00 5C 07 E8 D0 0F B3 89 6D B8 D4 F6 4A
0020 | A3 BF 00 07 47 45 01 BB B2 FB 10 D3 78 A3 4B 01
0030 | 87 44 4E 66 1C A0 BC 2D FE 50 02 00 23 53 27 9B
0040 | B1 E1 E7 23 EF D9 ED 37 B9 6F D9 40 82 84 A9 C9
0050 | 99 CC 57 BE 3E 2A 7F 77 A9 3E 4E AA 3B 02 AD 83
0060 | A2 CB F1 F2 27 E8 85 6E E2 8C 51 40 D0 56 7A A0
0070 | 77 09 39 C7 D7 F8 93 E2 41 71 D6 CE 4B 53 CC BE
0080 | 1E 8F 84 F4 7D 75 13 43 5B 99 F6 50 E5 78 71 D8
0090 | 34 73 C1 68 E3 82 A8 BA EC 66 1E B2 15 52 12 15
00A0 | BA 52 98 04 49 47 DB FE 1A CF A2 CE 62 87 8E 91
00B0 | C8 19 62 D9 43 FE 34 A4 37 FB 76 DA 5C F2 1F 60
00C0 | C2 24 D8 14 8B A3 31 16 F2 72 A1 F8 B5 9B 23 20
00D0 | BF 8B B0 B6 5C 2A 78 CA 60 15 FE 70 5D CD 95 FB
00E0 | 7E 50 A2 C1 BB 59 E8 11 66 B8 F9 BE E1 E9 18 0D
00F0 | 49 E6 24 1B 02 E8 B5 6C AD E3 9D 79 8D 03 49 A3
0100 | 9F 63 7B 44 3D 68 BB AA 1B 65 FC 4C 12 92 C6 D6
0110 | D3 0B D9 73 C4 B6 18 FF 47 9C 5C 0C 46 A8 6F 97
0120 | 6A 78 62 21 5F 46 C1 7A 13 A3 73 40 D6 C1 FB 34
0130 | 9D E2 23 4B 74 C0 AF 08 61 04 84 F5 AA 89 4E 23
0140 | 12 FA 4B D0 32 CA F2 8D E8 D6 9B 47 C7 CF 4F F1
0150 | 2D D4 E0 AE 4D D0 B3 7E 93 64 2E 5A 4A 2F 1E 3F
0160 | FB CD 5D C5 46 E5 2A 1B 83 FA 0F A5 E8 DE DF 52
0170 | FB B8 A0 42 02 5C B4 E4 72 EA 89 DC 9A 9A CE 6E
0180 | FC 2D 9E BA 09 3E 28 6F AB 46 79 92 8C F7 86 E2
0190 | E8 4E 95 59 AA 33 51 7B 90 7A 05 52 6F 32 76 8F
01A0 | 7A 91 AC 9A 5A 08 82 48 40 53 02 0B 9C 08 D1 AA
01B0 | BD 9A 48 F6 3F 1F 66 13 60 1E 54 24 F2 8E D4 D1
01C0 | 9E 99 AE A1 65 5D 60 C0 7A 61 3D AC 32 C6 8F 48
01D0 | 3B 6A 3E B5 50 CC AC 6F 4F 56 50 9D C1 EC C9 F6
01E0 | C7 C1 A5 EF 72 59 EE 09 D0 34 35 84 51 E5 51 89
01F0 | E9 4D 88 88 3C 57 46 E2 44 DF C5 8C 22 30 CA 4E
0200 | 16 CA 7A 69 48 74 02 41 67 E3 7E 83 78 36 A0 18
0210 | 00 FF 00 15 FE CC 08 2F D1 06 5C 4F A2 A6 EA B5
0220 | 9B 8D 4E 21 0F EC 3B E7 88 4C A9 60 02 2C 81 B9
0230 | 5C EC 7A F2 34 C1 DE 6C B0 5F EA DD B5 1D 4F 06
0240 | 4C FF 61 70 25 81 13 32 A9 F8 21 D3 1C 40 40 17
0250 | 5A E4 F2 8C FD CC 81 77 00 B7 96 0E 61 30 25 65
0260 | 69 34 93 36 67 7C 68 D4 C2 59 75 5F 9E 22 C6 39
0270 | C3 C4 CA 3F 27 6F 91 AC 94 25 0F 98 84 EE 55 8D
0280 | BE D9 5C 70 B7 CF 41 35 5F C5 9C 6D</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 = 3ECAF7EBC8BAFD416F7887A914C17ECF171D437D87E7B160EBA8DC994
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>019C5843DA43AE65</code></td>
<td><code>01A4A63CC1FBB365</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>EC020000</code> (748 in decimal)</td>
<td><code>8C020000</code> (652 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 3ECAF7EBC8BAFD416F7887A914C17ECF171D437D87E7B160EBA8DC994
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>241F003AF6F6FD97507CDCD433FA01B4</code></td>
<td><code>0FB3896DB8D4F64AA3BF0007474501BB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>EE4B80547C05E04E0C5DBE6A1E7C6FE2</code></td>
<td><code>B2FB10D378A34B0187444E661CA0BC2D</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200B9CD70FC288D0842DF75A862</code> <code>F9F090A2C566E63D8396BCFFD65EE725</code> <code>391BA98D5DB3FD9617BF141EA955A2E4</code> <code>B9D07D38ECE6C146DE5DF3F986492C5B</code> <code>DF1C9399C44F359AAB2BF922DBC02685</code> <code>A24D37C0B2E5D306E43134ADBC604749</code> <code>D70AA8937335856023167E09B36F372D</code> <code>98773F1AA712E681BB968CCFAF553D76</code> <code>A90E7D1102419DC7067DCD4F31A9B8AE</code> <code>4705E8F331D18F373D834A971D619260</code> <code>9D3BEA77A707CF29A488E3B673BA1F76</code> <code>D91EED7857B0976617846AFECD311303</code> <code>D8E5B71F59680C7ABA4DCBCA28831D32</code> <code>C34DEDE0DCB64DFE2480656E0ADBE878</code> <code>71D0555F5468FAAE29EEE669294783EE</code> <code>EBC70FE92E4DCD862F68D679AE49B883</code> <code>6F45EAC3F0C98A210012C86BA4BE7157</code> <code>F304A7B11480BE9EDAC4DE8002B53CA1</code> <code>2E7D68A23235BB06354DCFF97A028679</code> <code>6E99D1EF68BC1E57D296EBED30B44BF3</code> <code>C8126C6DA57281C24C3793D77207F580</code> <code>37B61ED831C331623E4E7DA3BD9D2A82</code> <code>E2047619EC4715091B2C1D9CAE5A642B</code> <code>09FA341C1C2A5224FAA88A15AC7DFC0D</code> <code>32056B1207AF39E1B33686BEE49746B0</code> <code>32232A9619D8D0E10F62309AC5B86F76</code> <code>43088032C9BF735984F03661760FE0FF</code> <code>75C5D207CB83056820E5D9EC4A87BCA4</code> <code>D32E48C8AFA23FACF2F3468ED676214E</code> <code>2E4BC4230622586F9E314F3FFFB0F906</code> <code>6E2815D0AA8482D61EA7859D0C545CE4</code> <code>4363992BD0540E3C38BDE75225EFEAA4</code> <code>BA7F0A6B9858302A5BBD776F2BA5CA17</code> <code>DDB33E81653E3E9CB0249665A0A08FBB</code> <code>EA0B050B28B2CF1FE537070E8BD688A9</code> <code>795AB8A7F9B83106E02220E4BB0946AF</code> <code>E7DE0EB1C5745D3F5320BBC6CC77B3E5</code><br> <code>5DCB2C13</code></td>
<td><code>FE5002002353279BB1E1E723EFD9ED37</code> <code>B96FD9408284A9C999CC57BE3E2A7F77</code> <code>A93E4EAA3B02AD83A2CBF1F227E8856E</code> <code>E28C5140D0567AA0770939C7D7F893E2</code> <code>4171D6CE4B53CCBE1E8F84F47D751343</code> <code>5B99F650E57871D83473C168E382A8BA</code> <code>EC661EB215521215BA5298044947DBFE</code> <code>1ACFA2CE62878E91C81962D943FE34A4</code> <code>37FB76DA5CF21F60C224D8148BA33116</code> <code>F272A1F8B59B2320BF8BB0B65C2A78CA</code> <code>6015FE705DCD95FB7E50A2C1BB59E811</code> <code>66B8F9BEE1E9180D49E6241B02E8B56C</code> <code>ADE39D798D0349A39F637B443D68BBAA</code> <code>1B65FC4C1292C6D6D30BD973C4B618FF</code> <code>479C5C0C46A86F976A7862215F46C17A</code> <code>13A37340D6C1FB349DE2234B74C0AF08</code> <code>610484F5AA894E2312FA4BD032CAF28D</code> <code>E8D69B47C7CF4FF12DD4E0AE4DD0B37E</code> <code>93642E5A4A2F1E3FFBCD5DC546E52A1B</code> <code>83FA0FA5E8DEDF52FBB8A042025CB4E4</code> <code>72EA89DC9A9ACE6EFC2D9EBA093E286F</code> <code>AB4679928CF786E2E84E9559AA33517B</code> <code>907A05526F32768F7A91AC9A5A088248</code> <code>4053020B9C08D1AABD9A48F63F1F6613</code> <code>601E5424F28ED4D19E99AEA1655D60C0</code> <code>7A613DAC32C68F483B6A3EB550CCAC6F</code> <code>4F56509DC1ECC9F6C7C1A5EF7259EE09</code> <code>D034358451E55189E94D88883C5746E2</code> <code>44DFC58C2230CA4E16CA7A6948740241</code> <code>67E37E837836A01800FF0015FECC082F</code> <code>D1065C4FA2A6EAB59B8D4E210FEC3BE7</code> <code>884CA960022C81B95CEC7AF234C1DE6C</code> <code>B05FEADDB51D4F064CFF617025811332</code> <code>A9F821D31C4040175AE4F28CFDCC8177</code> <code>00B7960E6130256569349336677C68D4</code> <code>C259755F9E22C639C3C4CA3F276F91AC</code> <code>94250F9884EE558DBED95C70B7CF4135</code><br> <code>5FC59C6D</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 3ECAF7EBC8BAFD416F7887A914C17ECF171D437D87E7B160EBA8DC994
<!-- 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 = B9CD70FC288D0842DF75A862F9F090A2C566E63D8396BCFFD65EE725391BA98D5DB3FD9617BF141EA955A2E4B9D07D38ECE6C146DE5DF3F986492C5BDF1C9399C44F359AAB2BF922DBC02685A24D37C0B2E5D306E43134ADBC604749D70AA8937335856023167E09B36F372D98773F1AA712E681BB968CCFAF553D76A90E7D1102419DC7067DCD4F31A9B8AE4705E8F331D18F373D834A971D6192609D3BEA77A707CF29A488E3B673BA1F76D91EED7857B0976617846AFECD311303D8E5B71F59680C7ABA4DCBCA28831D32C34DEDE0DCB64DFE2480656E0ADBE87871D0555F5468FAAE29EEE669294783EEEBC70FE92E4DCD862F68D679AE49B8836F45EAC3F0C98A210012C86BA4BE7157F304A7B11480BE9EDAC4DE8002B53CA12E7D68A23235BB06354DCFF97A0286796E99D1EF68BC1E57D296EBED30B44BF3C8126C6DA57281C24C3793D77207F58037B61ED831C331623E4E7DA3BD9D2A82E2047619EC4715091B2C1D9CAE5A642B09FA341C1C2A5224FAA88A15AC7DFC0D32056B1207AF39E1B33686BEE49746B032232A9619D8D0E10F62309AC5B86F7643088032C9BF735984F03661760FE0FF75C5D207CB83056820E5D9EC4A87BCA4D32E48C8AFA23FACF2F3468ED676214E2E4BC4230622586F9E314F3FFFB0F9066E2815D0AA8482D61EA7859D0C545CE44363992BD0540E3C38BDE75225EFEAA4BA7F0A6B9858302A5BBD776F2BA5CA17DDB33E81653E3E9CB0249665A0A08FBBEA0B050B28B2CF1FE537070E8BD688A9795AB8A7F9B83106E02220E4BB0946AFE7DE0EB1C5745D3F5320BBC6CC77B3E55DCB2C13
tmp_aes_key = 3BA9DA5B1C1D928E7A90E65D8038A87E65311670846630CE2BE18143D31E4B6E
tmp_aes_iv = 84E00D843F27A25A23F947C778FDDED885954732D3BD240FC62D65AEE7E90B5C</code></pre>
<pre><code>encrypted_answer = 2353279BB1E1E723EFD9ED37B96FD9408284A9C999CC57BE3E2A7F77A93E4EAA3B02AD83A2CBF1F227E8856EE28C5140D0567AA0770939C7D7F893E24171D6CE4B53CCBE1E8F84F47D7513435B99F650E57871D83473C168E382A8BAEC661EB215521215BA5298044947DBFE1ACFA2CE62878E91C81962D943FE34A437FB76DA5CF21F60C224D8148BA33116F272A1F8B59B2320BF8BB0B65C2A78CA6015FE705DCD95FB7E50A2C1BB59E81166B8F9BEE1E9180D49E6241B02E8B56CADE39D798D0349A39F637B443D68BBAA1B65FC4C1292C6D6D30BD973C4B618FF479C5C0C46A86F976A7862215F46C17A13A37340D6C1FB349DE2234B74C0AF08610484F5AA894E2312FA4BD032CAF28DE8D69B47C7CF4FF12DD4E0AE4DD0B37E93642E5A4A2F1E3FFBCD5DC546E52A1B83FA0FA5E8DEDF52FBB8A042025CB4E472EA89DC9A9ACE6EFC2D9EBA093E286FAB4679928CF786E2E84E9559AA33517B907A05526F32768F7A91AC9A5A0882484053020B9C08D1AABD9A48F63F1F6613601E5424F28ED4D19E99AEA1655D60C07A613DAC32C68F483B6A3EB550CCAC6F4F56509DC1ECC9F6C7C1A5EF7259EE09D034358451E55189E94D88883C5746E244DFC58C2230CA4E16CA7A694874024167E37E837836A01800FF0015FECC082FD1065C4FA2A6EAB59B8D4E210FEC3BE7884CA960022C81B95CEC7AF234C1DE6CB05FEADDB51D4F064CFF617025811332A9F821D31C4040175AE4F28CFDCC817700B7960E6130256569349336677C68D4C259755F9E22C639C3C4CA3F276F91AC94250F9884EE558DBED95C70B7CF41355FC59C6D
tmp_aes_key = 695E5D5073BA35408BB39AC367E613169C326D1FF07AF7431B871C839E5A54ED
tmp_aes_iv = EA681B84941A2E507EE05F6923DCA7B2E0AD5FD9A83859856EE0B6AD9425B619</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = ED463046A6349629B40D82AC556E31BFECD6D591BA0D89B5241F003AF6F6FD97507CDCD433FA01B4EE4B80547C05E04E0C5DBE6A1E7C6FE203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001003D3820BD0A0C97671C73FBA0C7FAAB215C4AC36DA361AC336E18C38A377D6D5F077817DE3350FB3296BA16297890C00518982DC1FC3F54D1EED6C9866A5C638A5267F732540D77DE3DA9EEE77B1A564F8B2C9CB15E72754E716CFAD59E2F8287152148DA4C35FF353CBAE3054EA0A8DBD83BF6F9768DA8A5B6425B76DBEC9DCABE0CCA40FB22CCB0ADA4F152F64873A9E730C4AD4EC910C6FD1B693283AF66E4B1744DE2DC1B219AABC45A31EF57497D1DACD09A03288D1EC2040036010D069AA653A1D46324A312BDCF00E1B17C8ABD67D8576F8E7BE28C1CDDF9758D3248395A6032E97130B244B0E549C5C73F3A00990F966D81149D9DBE646CBC5E9D49E6DA43AE65713A57C2E435AE83
answer = BA0D89B5241F003AF6F6FD97507CDCD433FA01B4EE4B80547C05E04E0C5DBE6A1E7C6FE203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001003D3820BD0A0C97671C73FBA0C7FAAB215C4AC36DA361AC336E18C38A377D6D5F077817DE3350FB3296BA16297890C00518982DC1FC3F54D1EED6C9866A5C638A5267F732540D77DE3DA9EEE77B1A564F8B2C9CB15E72754E716CFAD59E2F8287152148DA4C35FF353CBAE3054EA0A8DBD83BF6F9768DA8A5B6425B76DBEC9DCABE0CCA40FB22CCB0ADA4F152F64873A9E730C4AD4EC910C6FD1B693283AF66E4B1744DE2DC1B219AABC45A31EF57497D1DACD09A03288D1EC2040036010D069AA653A1D46324A312BDCF00E1B17C8ABD67D8576F8E7BE28C1CDDF9758D3248395A6032E97130B244B0E549C5C73F3A00990F966D81149D9DBE646CBC5E9D49E6DA43AE65713A57C2E435AE83</code></pre>
<pre><code>answer_with_hash = BC46D671D2B508231144D92D9202D9A3C66D7490BA0D89B50FB3896DB8D4F64AA3BF0007474501BBB2FB10D378A34B0187444E661CA0BC2D03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010097C24DCAE30AEA5E7CB1213EDCD92578132D9E658F8A661BE55E9157F4457B12AA67EB921C408D52B93CD77F045D974C191613A8920054C7F72B9B74D5EEE95EDF9425DA675CDD3011D6F3DCD22BA453FC90159385082702D24B0E1F91DB1E1E9136B06E6195C719021905E17A5C607B57EF6D0189B0E5434A7DCCF7A979D1F6CAB988156FAB405526E4E27DA9F95B95440C84049631B12A93A33B7A0AE963697A25E2DA442DAE9BD18A373ECC2EFC38B50521BCADCD2141AFF240613C8B8C9A03B437D1877AC681BCF9BF1BE5488AEDC2F695B0B5262E3240620D881175E78E906F00341B9100598EDDA65B3C0A983F168EB595B142196D47CFDB39A2E9D890C1FBB365EB2748982C31AB5A
answer = BA0D89B50FB3896DB8D4F64AA3BF0007474501BBB2FB10D378A34B0187444E661CA0BC2D03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010097C24DCAE30AEA5E7CB1213EDCD92578132D9E658F8A661BE55E9157F4457B12AA67EB921C408D52B93CD77F045D974C191613A8920054C7F72B9B74D5EEE95EDF9425DA675CDD3011D6F3DCD22BA453FC90159385082702D24B0E1F91DB1E1E9136B06E6195C719021905E17A5C607B57EF6D0189B0E5434A7DCCF7A979D1F6CAB988156FAB405526E4E27DA9F95B95440C84049631B12A93A33B7A0AE963697A25E2DA442DAE9BD18A373ECC2EFC38B50521BCADCD2141AFF240613C8B8C9A03B437D1877AC681BCF9BF1BE5488AEDC2F695B0B5262E3240620D881175E78E906F00341B9100598EDDA65B3C0A983F168EB595B142196D47CFDB39A2E9D890C1FBB365EB2748982C31AB5A</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 24 1F 00 3A F6 F6 FD 97 50 7C DC D4
0010 | 33 FA 01 B4 EE 4B 80 54 7C 05 E0 4E 0C 5D BE 6A
0020 | 1E 7C 6F E2 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 0F B3 89 6D B8 D4 F6 4A A3 BF 00 07
0010 | 47 45 01 BB B2 FB 10 D3 78 A3 4B 01 87 44 4E 66
0020 | 1C A0 BC 2D 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 = BA0D89B5241F003AF6F6FD97507CDCD433FA01B4EE4B80547C05E04E0C5DBE6A1E7C6FE
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 | 3D 38 20 BD 0A 0C 97 67 1C 73 FB A0 C7 FA AB 21
0140 | 5C 4A C3 6D A3 61 AC 33 6E 18 C3 8A 37 7D 6D 5F
0150 | 07 78 17 DE 33 50 FB 32 96 BA 16 29 78 90 C0 05
0160 | 18 98 2D C1 FC 3F 54 D1 EE D6 C9 86 6A 5C 63 8A
0170 | 52 67 F7 32 54 0D 77 DE 3D A9 EE E7 7B 1A 56 4F
0180 | 8B 2C 9C B1 5E 72 75 4E 71 6C FA D5 9E 2F 82 87
0190 | 15 21 48 DA 4C 35 FF 35 3C BA E3 05 4E A0 A8 DB
01A0 | D8 3B F6 F9 76 8D A8 A5 B6 42 5B 76 DB EC 9D CA
01B0 | BE 0C CA 40 FB 22 CC B0 AD A4 F1 52 F6 48 73 A9
01C0 | E7 30 C4 AD 4E C9 10 C6 FD 1B 69 32 83 AF 66 E4
01D0 | B1 74 4D E2 DC 1B 21 9A AB C4 5A 31 EF 57 49 7D
01E0 | 1D AC D0 9A 03 28 8D 1E C2 04 00 36 01 0D 06 9A
01F0 | A6 53 A1 D4 63 24 A3 12 BD CF 00 E1 B1 7C 8A BD
0200 | 67 D8 57 6F 8E 7B E2 8C 1C DD F9 75 8D 32 48 39
0210 | 5A 60 32 E9 71 30 B2 44 B0 E5 49 C5 C7 3F 3A 00
0220 | 99 0F 96 6D 81 14 9D 9D BE 64 6C BC 5E 9D 49 E6
0230 | DA 43 AE 65</code></pre>
0130 | 97 C2 4D CA E3 0A EA 5E 7C B1 21 3E DC D9 25 78
0140 | 13 2D 9E 65 8F 8A 66 1B E5 5E 91 57 F4 45 7B 12
0150 | AA 67 EB 92 1C 40 8D 52 B9 3C D7 7F 04 5D 97 4C
0160 | 19 16 13 A8 92 00 54 C7 F7 2B 9B 74 D5 EE E9 5E
0170 | DF 94 25 DA 67 5C DD 30 11 D6 F3 DC D2 2B A4 53
0180 | FC 90 15 93 85 08 27 02 D2 4B 0E 1F 91 DB 1E 1E
0190 | 91 36 B0 6E 61 95 C7 19 02 19 05 E1 7A 5C 60 7B
01A0 | 57 EF 6D 01 89 B0 E5 43 4A 7D CC F7 A9 79 D1 F6
01B0 | CA B9 88 15 6F AB 40 55 26 E4 E2 7D A9 F9 5B 95
01C0 | 44 0C 84 04 96 31 B1 2A 93 A3 3B 7A 0A E9 63 69
01D0 | 7A 25 E2 DA 44 2D AE 9B D1 8A 37 3E CC 2E FC 38
01E0 | B5 05 21 BC AD CD 21 41 AF F2 40 61 3C 8B 8C 9A
01F0 | 03 B4 37 D1 87 7A C6 81 BC F9 BF 1B E5 48 8A ED
0200 | C2 F6 95 B0 B5 26 2E 32 40 62 0D 88 11 75 E7 8E
0210 | 90 6F 00 34 1B 91 00 59 8E DD A6 5B 3C 0A 98 3F
0220 | 16 8E B5 95 B1 42 19 6D 47 CF DB 39 A2 E9 D8 90
0230 | C1 FB B3 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 = BA0D89B5241F003AF6F6FD97507CDCD433FA01B4EE4B80547C05E04E0C5DBE6A1E7C6FE
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>241F003AF6F6FD97507CDCD433FA01B4</code></td>
<td><code>0FB3896DB8D4F64AA3BF0007474501BB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>EE4B80547C05E04E0C5DBE6A1E7C6FE2</code></td>
<td><code>B2FB10D378A34B0187444E661CA0BC2D</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B5241F003AF6F6FD97507CDCD433FA01B4EE4B80547C05E04E0C5DBE6A1E7C6FE
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE0001003D3820BD0A0C97671C73FBA0</code> <code>C7FAAB215C4AC36DA361AC336E18C38A</code> <code>377D6D5F077817DE3350FB3296BA1629</code> <code>7890C00518982DC1FC3F54D1EED6C986</code> <code>6A5C638A5267F732540D77DE3DA9EEE7</code> <code>7B1A564F8B2C9CB15E72754E716CFAD5</code> <code>9E2F8287152148DA4C35FF353CBAE305</code> <code>4EA0A8DBD83BF6F9768DA8A5B6425B76</code> <code>DBEC9DCABE0CCA40FB22CCB0ADA4F152</code> <code>F64873A9E730C4AD4EC910C6FD1B6932</code> <code>83AF66E4B1744DE2DC1B219AABC45A31</code> <code>EF57497D1DACD09A03288D1EC2040036</code> <code>010D069AA653A1D46324A312BDCF00E1</code> <code>B17C8ABD67D8576F8E7BE28C1CDDF975</code> <code>8D3248395A6032E97130B244B0E549C5</code> <code>C73F3A00990F966D81149D9DBE646CBC</code><br> <code>5E9D49E6</code></td>
<td><code>FE00010097C24DCAE30AEA5E7CB1213E</code> <code>DCD92578132D9E658F8A661BE55E9157</code> <code>F4457B12AA67EB921C408D52B93CD77F</code> <code>045D974C191613A8920054C7F72B9B74</code> <code>D5EEE95EDF9425DA675CDD3011D6F3DC</code> <code>D22BA453FC90159385082702D24B0E1F</code> <code>91DB1E1E9136B06E6195C719021905E1</code> <code>7A5C607B57EF6D0189B0E5434A7DCCF7</code> <code>A979D1F6CAB988156FAB405526E4E27D</code> <code>A9F95B95440C84049631B12A93A33B7A</code> <code>0AE963697A25E2DA442DAE9BD18A373E</code> <code>CC2EFC38B50521BCADCD2141AFF24061</code> <code>3C8B8C9A03B437D1877AC681BCF9BF1B</code> <code>E5488AEDC2F695B0B5262E3240620D88</code> <code>1175E78E906F00341B9100598EDDA65B</code> <code>3C0A983F168EB595B142196D47CFDB39</code><br> <code>A2E9D890</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>DA43AE65</code> (1705919450 in decimal)</td>
<td><code>C1FBB365</code> (1706294209 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B5241F003AF6F6FD97507CDCD433FA01B4EE4B80547C05E04E0C5DBE6A1E7C6FE
<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 = E80FC2C5400046085AFB586D36E4F8DA6014316439ACBAF3B453E5DA67BD74348DCFCA44170B8A89E070A951593CCA759A3F20DA2659E82981C7852FD9295409FD4986777B69755C1D7912084FBC4CF4E1374CD77054003395DAC79024FFEA1918B2D8FDBBDBA90C56DA6381C6B957686535B15BD94AD2504109EB6F66A472A087FBAFCE7123F06632A10DB43236A0A3FC328B0B308E46E3D78402958EFAB9FE53B6C164850A8494172EB4AE442CC7EED93C9DBD29D6244BA00BB16D7ADAE00D1B8F633D56370E8E543F6E673103AA22B9FEF2B9060F5EDB2CC7536FCAFBF765161CFFE2360CA3E394BCE9BCAD32C65D06D08F4CF6BF29B2AEDBC840CDA9C83D</code></pre>
<pre><code>b = FBD2AF203260953DEFA154C1247CD766720E31A267F8D05DED49D9C8BDDC42952DA652189A214F37C83D0A6BE2604C3C32A9F020C16B0D72B102B313B2B17452AA0FCC42ECB01C6D7FE35DCF7A1E6AEFD547DD757EB3549C36B87A48E49E48E3F3F2B64E784B2A75A464EFAE5DD43EA0AB2CEDD321D18BB8EAE7A0A483CC125286F8D313EBFD9F5DEED2DD6C9B2FB6923258C741BCA3C3A03FD2590B025D20775D630A95D8F803D42131BC428095E7E021980D5DDC2AC608CD4D32DA2C8EC76C32EF84E007FE5FBC08166B9C2F81620149C66B17AA4E8FBA3A704C66270ACA2F469274AB4A1B27E0A93C7F224129FCFA6E80D2CE642F3608A38050846E95BEF2</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 = 2E1F7A0A6B21FA5305CC25725D91CD006490E2323D1C0722ECE6E013EA7464AE6393C82CA8380EFB49C0F7DB5803198C41E4007483D59F228CA5062EA2327F767F8D276E5686BE6E75CAD4486BD8CB102274FDE80FE9AB2DA84AAD8885326366122D92E4EBE7EA1A2142B1728CECEB4B1C7282B25D1B4CC8C45D2894AE04632537882762732FADCAC6C2BE123DA238624EA73BD58647918F3B74C98DA48F80753037219C2D637C0BCE2B5A6184C217EF4641B667F788B082C1B5DE4E5EF6D7AA0766EE3D91DDBE107DAA4123C51BB0CE5EF2F40C5F170EFFFA9720527E4B18D615DF0E947162CD7BB07BF13D6FB720BC3E7CA8D3488E27C44A403873B72E6EEF</code></pre>
<pre><code>g_b = 6900C2840E67BFBB5D418B3823070B495E1375D7B4A32A36CA0DA2E68E1F60957A6BF2626DBD542532D746A738E175DC1B33B97736D3DDD600A6EE2B64D6EF89A355DD7EE35DC1FCC735DAD938736A2C6FE6D2A98606BF328A8D7D6CA8A06A57F149482F06ED77A71F8C8ECA8686012D766E694B2603D0308258A4F3E7F3EFED9DFB160E2CF9CE8AAA124784B23969B3F16CB3EE04DD27C49C54FC6F42F1A5BFC25F9F34FAFEF6F5EA32CB335DBE73A9B1DB2EA4E3B2E5C0991799F8E92C1C354B8C7CF411BB5690396BAA8722EBFC9D9C00E6FE9A3128E6BDA6D8C89EF6B2C3C70C32D879D6C932E95BA7C39CC2D55D055D300CF510BC6CB584C5CD248CED54</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 24 1F 00 3A F6 F6 FD 97 50 7C DC D4
0010 | 33 FA 01 B4 EE 4B 80 54 7C 05 E0 4E 0C 5D BE 6A
0020 | 1E 7C 6F E2 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 2E 1F 7A 0A 6B 21 FA 53 05 CC 25 72 5D 91 CD 00
0040 | 64 90 E2 32 3D 1C 07 22 EC E6 E0 13 EA 74 64 AE
0050 | 63 93 C8 2C A8 38 0E FB 49 C0 F7 DB 58 03 19 8C
0060 | 41 E4 00 74 83 D5 9F 22 8C A5 06 2E A2 32 7F 76
0070 | 7F 8D 27 6E 56 86 BE 6E 75 CA D4 48 6B D8 CB 10
0080 | 22 74 FD E8 0F E9 AB 2D A8 4A AD 88 85 32 63 66
0090 | 12 2D 92 E4 EB E7 EA 1A 21 42 B1 72 8C EC EB 4B
00A0 | 1C 72 82 B2 5D 1B 4C C8 C4 5D 28 94 AE 04 63 25
00B0 | 37 88 27 62 73 2F AD CA C6 C2 BE 12 3D A2 38 62
00C0 | 4E A7 3B D5 86 47 91 8F 3B 74 C9 8D A4 8F 80 75
00D0 | 30 37 21 9C 2D 63 7C 0B CE 2B 5A 61 84 C2 17 EF
00E0 | 46 41 B6 67 F7 88 B0 82 C1 B5 DE 4E 5E F6 D7 AA
00F0 | 07 66 EE 3D 91 DD BE 10 7D AA 41 23 C5 1B B0 CE
0100 | 5E F2 F4 0C 5F 17 0E FF FA 97 20 52 7E 4B 18 D6
0110 | 15 DF 0E 94 71 62 CD 7B B0 7B F1 3D 6F B7 20 BC
0120 | 3E 7C A8 D3 48 8E 27 C4 4A 40 38 73 B7 2E 6E EF</code></pre>
<pre><code>0000 | 54 B6 43 66 0F B3 89 6D B8 D4 F6 4A A3 BF 00 07
0010 | 47 45 01 BB B2 FB 10 D3 78 A3 4B 01 87 44 4E 66
0020 | 1C A0 BC 2D 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 69 00 C2 84 0E 67 BF BB 5D 41 8B 38 23 07 0B 49
0040 | 5E 13 75 D7 B4 A3 2A 36 CA 0D A2 E6 8E 1F 60 95
0050 | 7A 6B F2 62 6D BD 54 25 32 D7 46 A7 38 E1 75 DC
0060 | 1B 33 B9 77 36 D3 DD D6 00 A6 EE 2B 64 D6 EF 89
0070 | A3 55 DD 7E E3 5D C1 FC C7 35 DA D9 38 73 6A 2C
0080 | 6F E6 D2 A9 86 06 BF 32 8A 8D 7D 6C A8 A0 6A 57
0090 | F1 49 48 2F 06 ED 77 A7 1F 8C 8E CA 86 86 01 2D
00A0 | 76 6E 69 4B 26 03 D0 30 82 58 A4 F3 E7 F3 EF ED
00B0 | 9D FB 16 0E 2C F9 CE 8A AA 12 47 84 B2 39 69 B3
00C0 | F1 6C B3 EE 04 DD 27 C4 9C 54 FC 6F 42 F1 A5 BF
00D0 | C2 5F 9F 34 FA FE F6 F5 EA 32 CB 33 5D BE 73 A9
00E0 | B1 DB 2E A4 E3 B2 E5 C0 99 17 99 F8 E9 2C 1C 35
00F0 | 4B 8C 7C F4 11 BB 56 90 39 6B AA 87 22 EB FC 9D
0100 | 9C 00 E6 FE 9A 31 28 E6 BD A6 D8 C8 9E F6 B2 C3
0110 | C7 0C 32 D8 79 D6 C9 32 E9 5B A7 C3 9C C2 D5 5D
0120 | 05 5D 30 0C F5 10 BC 6C B5 84 C5 CD 24 8C ED 54</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 = BA0D89B5241F003AF6F6FD97507CDCD433FA01B4EE4B80547C05E04E0C5DBE6A1E7C6FE
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>241F003AF6F6FD97507CDCD433FA01B4</code></td>
<td><code>0FB3896DB8D4F64AA3BF0007474501BB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>EE4B80547C05E04E0C5DBE6A1E7C6FE2</code></td>
<td><code>B2FB10D378A34B0187444E661CA0BC2D</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE0001002E1F7A0A6B21FA5305CC2572</code> <code>5D91CD006490E2323D1C0722ECE6E013</code> <code>EA7464AE6393C82CA8380EFB49C0F7DB</code> <code>5803198C41E4007483D59F228CA5062E</code> <code>A2327F767F8D276E5686BE6E75CAD448</code> <code>6BD8CB102274FDE80FE9AB2DA84AAD88</code> <code>85326366122D92E4EBE7EA1A2142B172</code> <code>8CECEB4B1C7282B25D1B4CC8C45D2894</code> <code>AE04632537882762732FADCAC6C2BE12</code> <code>3DA238624EA73BD58647918F3B74C98D</code> <code>A48F80753037219C2D637C0BCE2B5A61</code> <code>84C217EF4641B667F788B082C1B5DE4E</code> <code>5EF6D7AA0766EE3D91DDBE107DAA4123</code> <code>C51BB0CE5EF2F40C5F170EFFFA972052</code> <code>7E4B18D615DF0E947162CD7BB07BF13D</code> <code>6FB720BC3E7CA8D3488E27C44A403873</code><br> <code>B72E6EEF</code></td>
<td><code>FE0001006900C2840E67BFBB5D418B38</code> <code>23070B495E1375D7B4A32A36CA0DA2E6</code> <code>8E1F60957A6BF2626DBD542532D746A7</code> <code>38E175DC1B33B97736D3DDD600A6EE2B</code> <code>64D6EF89A355DD7EE35DC1FCC735DAD9</code> <code>38736A2C6FE6D2A98606BF328A8D7D6C</code> <code>A8A06A57F149482F06ED77A71F8C8ECA</code> <code>8686012D766E694B2603D0308258A4F3</code> <code>E7F3EFED9DFB160E2CF9CE8AAA124784</code> <code>B23969B3F16CB3EE04DD27C49C54FC6F</code> <code>42F1A5BFC25F9F34FAFEF6F5EA32CB33</code> <code>5DBE73A9B1DB2EA4E3B2E5C0991799F8</code> <code>E92C1C354B8C7CF411BB5690396BAA87</code> <code>22EBFC9D9C00E6FE9A3128E6BDA6D8C8</code> <code>9EF6B2C3C70C32D879D6C932E95BA7C3</code> <code>9CC2D55D055D300CF510BC6CB584C5CD</code><br> <code>248CED54</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 = BA0D89B5241F003AF6F6FD97507CDCD433FA01B4EE4B80547C05E04E0C5DBE6A1E7C6FE
<!-- 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 = 54B64366241F003AF6F6FD97507CDCD433FA01B4EE4B80547C05E04E0C5DBE6A1E7C6FE20000000000000000FE0001002E1F7A0A6B21FA5305CC25725D91CD006490E2323D1C0722ECE6E013EA7464AE6393C82CA8380EFB49C0F7DB5803198C41E4007483D59F228CA5062EA2327F767F8D276E5686BE6E75CAD4486BD8CB102274FDE80FE9AB2DA84AAD8885326366122D92E4EBE7EA1A2142B1728CECEB4B1C7282B25D1B4CC8C45D2894AE04632537882762732FADCAC6C2BE123DA238624EA73BD58647918F3B74C98DA48F80753037219C2D637C0BCE2B5A6184C217EF4641B667F788B082C1B5DE4E5EF6D7AA0766EE3D91DDBE107DAA4123C51BB0CE5EF2F40C5F170EFFFA9720527E4B18D615DF0E947162CD7BB07BF13D6FB720BC3E7CA8D3488E27C44A403873B72E6EEF
padding = 97DEC38E29172E3269A33399
tmp_aes_key = 3BA9DA5B1C1D928E7A90E65D8038A87E65311670846630CE2BE18143D31E4B6E
tmp_aes_iv = 84E00D843F27A25A23F947C778FDDED885954732D3BD240FC62D65AEE7E90B5C</code></pre>
<pre><code>data = 54B643660FB3896DB8D4F64AA3BF0007474501BBB2FB10D378A34B0187444E661CA0BC2D0000000000000000FE0001006900C2840E67BFBB5D418B3823070B495E1375D7B4A32A36CA0DA2E68E1F60957A6BF2626DBD542532D746A738E175DC1B33B97736D3DDD600A6EE2B64D6EF89A355DD7EE35DC1FCC735DAD938736A2C6FE6D2A98606BF328A8D7D6CA8A06A57F149482F06ED77A71F8C8ECA8686012D766E694B2603D0308258A4F3E7F3EFED9DFB160E2CF9CE8AAA124784B23969B3F16CB3EE04DD27C49C54FC6F42F1A5BFC25F9F34FAFEF6F5EA32CB335DBE73A9B1DB2EA4E3B2E5C0991799F8E92C1C354B8C7CF411BB5690396BAA8722EBFC9D9C00E6FE9A3128E6BDA6D8C89EF6B2C3C70C32D879D6C932E95BA7C39CC2D55D055D300CF510BC6CB584C5CD248CED54
padding = CBC58A6F6911365FC22A9177
tmp_aes_key = 695E5D5073BA35408BB39AC367E613169C326D1FF07AF7431B871C839E5A54ED
tmp_aes_iv = EA681B84941A2E507EE05F6923DCA7B2E0AD5FD9A83859856EE0B6AD9425B619</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 = D2F27DD98D6885F64628A1E476EA61975184DC4C8D31B1A71DC1AA2ECBBC8BCF4624EF368DEA3B1B2CC4A63E4D6513862631CC5387D3E16FC3024B984CA3909390F365C0DE58D2D5FDE7538D2C639C52CEA7C3EB4287850470DF77FC09C79D7163D1FB88854228B0B3C85CE8C04A1CB1AA2B243ED36ECDFE7D5396BE51C6D7FFB7EE8E25A3FC6629DE58F015A21E92355952762129E609D89936EF6A0DE5E6EFC06FBABC00CF707DE261D446C1FC6CA77283FE51AD369DA2D3345091C3DED9403533958CB32D490C993801577C1821A8E1847BE07735459E1DED08911D82CE482E5479105E48C5785821546743CE3A714A7A55BC7FD8447AC2F45CEA5AB989AA903E3EB4A6A9915EFB128FBBD4DFD767D8B292F94ECF67FD0CF80D6A67CD634D012EE8B0242E4E49CE1F5AF9B0C372AB12C82222CB629CB4517F654DC4FF530CB2E0E6D0520FAB4D0BCB4B22FC5104ED</code></pre>
<pre><code>encrypted_data = EFC413BB078845D2CBA59C121502CFFF26BA817B89D172115B803438C82E52861DFF773222C8C754B1F4CFBAF586D65A31BB45DE2B1FD2E36267FD208B5374681A561339A6906C13438B50177927B021B59765698273B16E14DBE3B5D492170B624DFD30AD7A2DC7EE44B6B069056CA69590D58FB63A149AF5FBB491C6945EFCE2E8100F3A1434AA2E3A0CC9B30A038EBDBA436B8C23FF9CAF0D8FD4ABEA97A68BE0775B07BB8C9F30097F26F65A57099615AB31E2DDC844C05F62609C378579A0CE2C564AC31F43664AC9A74549F8AEF9565E79E21A35847799F6B950DCCC6B11CF6B10A53A5DF4167EA4E00151207DA9C48A9D268D070D8F93C12CDA71130C8618744B556712E1977481B2D333F800A0B9EB781D297B888C3BE702EA5E196496F4B13CA2B365670E88A391567B559EDAEC68A1A049F6B3D0AD397C94F34A38C977B768E3EA9529BC5D363246B0B399</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 B0 48 02 00 DA 43 AE 65
0010 | 78 01 00 00 1F 5F 04 F5 24 1F 00 3A F6 F6 FD 97
0020 | 50 7C DC D4 33 FA 01 B4 EE 4B 80 54 7C 05 E0 4E
0030 | 0C 5D BE 6A 1E 7C 6F E2 FE 50 01 00 D2 F2 7D D9
0040 | 8D 68 85 F6 46 28 A1 E4 76 EA 61 97 51 84 DC 4C
0050 | 8D 31 B1 A7 1D C1 AA 2E CB BC 8B CF 46 24 EF 36
0060 | 8D EA 3B 1B 2C C4 A6 3E 4D 65 13 86 26 31 CC 53
0070 | 87 D3 E1 6F C3 02 4B 98 4C A3 90 93 90 F3 65 C0
0080 | DE 58 D2 D5 FD E7 53 8D 2C 63 9C 52 CE A7 C3 EB
0090 | 42 87 85 04 70 DF 77 FC 09 C7 9D 71 63 D1 FB 88
00A0 | 85 42 28 B0 B3 C8 5C E8 C0 4A 1C B1 AA 2B 24 3E
00B0 | D3 6E CD FE 7D 53 96 BE 51 C6 D7 FF B7 EE 8E 25
00C0 | A3 FC 66 29 DE 58 F0 15 A2 1E 92 35 59 52 76 21
00D0 | 29 E6 09 D8 99 36 EF 6A 0D E5 E6 EF C0 6F BA BC
00E0 | 00 CF 70 7D E2 61 D4 46 C1 FC 6C A7 72 83 FE 51
00F0 | AD 36 9D A2 D3 34 50 91 C3 DE D9 40 35 33 95 8C
0100 | B3 2D 49 0C 99 38 01 57 7C 18 21 A8 E1 84 7B E0
0110 | 77 35 45 9E 1D ED 08 91 1D 82 CE 48 2E 54 79 10
0120 | 5E 48 C5 78 58 21 54 67 43 CE 3A 71 4A 7A 55 BC
0130 | 7F D8 44 7A C2 F4 5C EA 5A B9 89 AA 90 3E 3E B4
0140 | A6 A9 91 5E FB 12 8F BB D4 DF D7 67 D8 B2 92 F9
0150 | 4E CF 67 FD 0C F8 0D 6A 67 CD 63 4D 01 2E E8 B0
0160 | 24 2E 4E 49 CE 1F 5A F9 B0 C3 72 AB 12 C8 22 22
0170 | CB 62 9C B4 51 7F 65 4D C4 FF 53 0C B2 E0 E6 D0
0180 | 52 0F AB 4D 0B CB 4B 22 FC 51 04 ED</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 AC 62 00 00 C1 FB B3 65
0010 | 78 01 00 00 1F 5F 04 F5 0F B3 89 6D B8 D4 F6 4A
0020 | A3 BF 00 07 47 45 01 BB B2 FB 10 D3 78 A3 4B 01
0030 | 87 44 4E 66 1C A0 BC 2D FE 50 01 00 EF C4 13 BB
0040 | 07 88 45 D2 CB A5 9C 12 15 02 CF FF 26 BA 81 7B
0050 | 89 D1 72 11 5B 80 34 38 C8 2E 52 86 1D FF 77 32
0060 | 22 C8 C7 54 B1 F4 CF BA F5 86 D6 5A 31 BB 45 DE
0070 | 2B 1F D2 E3 62 67 FD 20 8B 53 74 68 1A 56 13 39
0080 | A6 90 6C 13 43 8B 50 17 79 27 B0 21 B5 97 65 69
0090 | 82 73 B1 6E 14 DB E3 B5 D4 92 17 0B 62 4D FD 30
00A0 | AD 7A 2D C7 EE 44 B6 B0 69 05 6C A6 95 90 D5 8F
00B0 | B6 3A 14 9A F5 FB B4 91 C6 94 5E FC E2 E8 10 0F
00C0 | 3A 14 34 AA 2E 3A 0C C9 B3 0A 03 8E BD BA 43 6B
00D0 | 8C 23 FF 9C AF 0D 8F D4 AB EA 97 A6 8B E0 77 5B
00E0 | 07 BB 8C 9F 30 09 7F 26 F6 5A 57 09 96 15 AB 31
00F0 | E2 DD C8 44 C0 5F 62 60 9C 37 85 79 A0 CE 2C 56
0100 | 4A C3 1F 43 66 4A C9 A7 45 49 F8 AE F9 56 5E 79
0110 | E2 1A 35 84 77 99 F6 B9 50 DC CC 6B 11 CF 6B 10
0120 | A5 3A 5D F4 16 7E A4 E0 01 51 20 7D A9 C4 8A 9D
0130 | 26 8D 07 0D 8F 93 C1 2C DA 71 13 0C 86 18 74 4B
0140 | 55 67 12 E1 97 74 81 B2 D3 33 F8 00 A0 B9 EB 78
0150 | 1D 29 7B 88 8C 3B E7 02 EA 5E 19 64 96 F4 B1 3C
0160 | A2 B3 65 67 0E 88 A3 91 56 7B 55 9E DA EC 68 A1
0170 | A0 49 F6 B3 D0 AD 39 7C 94 F3 4A 38 C9 77 B7 68
0180 | E3 EA 95 29 BC 5D 36 32 46 B0 B3 99</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>B0480200DA43AE65</code></td>
<td><code>AC620000C1FBB365</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>241F003AF6F6FD97507CDCD433FA01B4</code></td>
<td><code>0FB3896DB8D4F64AA3BF0007474501BB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>EE4B80547C05E04E0C5DBE6A1E7C6FE2</code></td>
<td><code>B2FB10D378A34B0187444E661CA0BC2D</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100D2F27DD98D6885F64628A1E4</code> <code>76EA61975184DC4C8D31B1A71DC1AA2E</code> <code>CBBC8BCF4624EF368DEA3B1B2CC4A63E</code> <code>4D6513862631CC5387D3E16FC3024B98</code> <code>4CA3909390F365C0DE58D2D5FDE7538D</code> <code>2C639C52CEA7C3EB4287850470DF77FC</code> <code>09C79D7163D1FB88854228B0B3C85CE8</code> <code>C04A1CB1AA2B243ED36ECDFE7D5396BE</code> <code>51C6D7FFB7EE8E25A3FC6629DE58F015</code> <code>A21E92355952762129E609D89936EF6A</code> <code>0DE5E6EFC06FBABC00CF707DE261D446</code> <code>C1FC6CA77283FE51AD369DA2D3345091</code> <code>C3DED9403533958CB32D490C99380157</code> <code>7C1821A8E1847BE07735459E1DED0891</code> <code>1D82CE482E5479105E48C57858215467</code> <code>43CE3A714A7A55BC7FD8447AC2F45CEA</code> <code>5AB989AA903E3EB4A6A9915EFB128FBB</code> <code>D4DFD767D8B292F94ECF67FD0CF80D6A</code> <code>67CD634D012EE8B0242E4E49CE1F5AF9</code> <code>B0C372AB12C82222CB629CB4517F654D</code> <code>C4FF530CB2E0E6D0520FAB4D0BCB4B22</code><br> <code>FC5104ED</code></td>
<td><code>FE500100EFC413BB078845D2CBA59C12</code> <code>1502CFFF26BA817B89D172115B803438</code> <code>C82E52861DFF773222C8C754B1F4CFBA</code> <code>F586D65A31BB45DE2B1FD2E36267FD20</code> <code>8B5374681A561339A6906C13438B5017</code> <code>7927B021B59765698273B16E14DBE3B5</code> <code>D492170B624DFD30AD7A2DC7EE44B6B0</code> <code>69056CA69590D58FB63A149AF5FBB491</code> <code>C6945EFCE2E8100F3A1434AA2E3A0CC9</code> <code>B30A038EBDBA436B8C23FF9CAF0D8FD4</code> <code>ABEA97A68BE0775B07BB8C9F30097F26</code> <code>F65A57099615AB31E2DDC844C05F6260</code> <code>9C378579A0CE2C564AC31F43664AC9A7</code> <code>4549F8AEF9565E79E21A35847799F6B9</code> <code>50DCCC6B11CF6B10A53A5DF4167EA4E0</code> <code>0151207DA9C48A9D268D070D8F93C12C</code> <code>DA71130C8618744B556712E1977481B2</code> <code>D333F800A0B9EB781D297B888C3BE702</code> <code>EA5E196496F4B13CA2B365670E88A391</code> <code>567B559EDAEC68A1A049F6B3D0AD397C</code> <code>94F34A38C977B768E3EA9529BC5D3632</code><br> <code>46B0B399</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 = 685AA341C7DF6A5D2587C58545A66BB55EDD2B2B00DDABC313E44E12A0986264C78E21274E1724F361BD13340CB9453182CFA173E7FAC7CC6AA2CE3664FEBD16918FF4FD65B153996589D2260634FE5C94DFCC066771445B00A61B07EFDC768C8ED17623000A5B171F0EE9E38D837C9478E2FEC19DDC35CD4CF85AF8A0F23F3B5336336178A05F0E643A8486E18C7C39F519673B8D46926AC1D635923B0159381A97CF8995D9DBBDBA3102A23DB4618ECB48C37B6AF2FBD8AD086546D3B2D7679BCDFD29A3951C238C678789A177002E1E1E816F78CF203CE691CC62DA2B4AEC3600EC635115CA759A29FAA48336B06F30920AAA65D3571C2912D2AA897AFEA2</code></pre>
<pre><code>auth_key = 76050AE4569B3765E53E541207CD161CF3D47AB4BACDE545E6F5356921DC4C90FD11CC1B134A81D316276149E4BB9E47E1AD229FF7E117109304E48DCE192FAED5A41AF091FEBD89CC1AD9F79FB223CB4F7AFC63C4F6E9635DBD44B83A968D7253A84590E04A062201C097F42F40492A62B6E38D9A23F4C81B04EE2113FCABE2BE396C2247CDC500050494188DC5BAFE5A92C07FD051CFC1EAF3C54FEBCCD47655ADEBBB183CFA67EE4B64BDBBE97C4CEC9DBD995861EACDA905ED51CB7E28D2F1872B1F0C4D24ED98638595DA06459EAAC14C47ED8FF72C4F834DC78CE92C1BD5E274FBB62F8B7474A9404FE1F7D09231DABC41009A3BB9C58FED3FE65A2A81</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 34 A9 4E DB 43 AE 65
0010 | 74 00 00 00 34 F7 CB 3B 24 1F 00 3A F6 F6 FD 97
0020 | 50 7C DC D4 33 FA 01 B4 EE 4B 80 54 7C 05 E0 4E
0030 | 0C 5D BE 6A 1E 7C 6F E2 E5 37 34 C1 98 C0 7D 1A
0040 | 0F 52 BB 7A 90 F0 98 FB</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 70 F0 45 C2 FB B3 65
0010 | 74 00 00 00 34 F7 CB 3B 0F B3 89 6D B8 D4 F6 4A
0020 | A3 BF 00 07 47 45 01 BB B2 FB 10 D3 78 A3 4B 01
0030 | 87 44 4E 66 1C A0 BC 2D 2A DF 61 64 25 7C 6B B8
0040 | 4B 11 E5 0C 8D 67 A2 DD</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,7 +817,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>0134A94EDB43AE65</code></td>
<td><code>0170F045C2FBB365</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>
@ -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>241F003AF6F6FD97507CDCD433FA01B4</code></td>
<td><code>0FB3896DB8D4F64AA3BF0007474501BB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>EE4B80547C05E04E0C5DBE6A1E7C6FE2</code></td>
<td><code>B2FB10D378A34B0187444E661CA0BC2D</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>E53734C198C07D1A0F52BB7A90F098FB</code></td>
<td><code>2ADF6164257C6BB84B11E50C8D67A2DD</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>