mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-21 00:17:06 +01:00
Update content of files
This commit is contained in:
parent
525987225c
commit
d2bac2337a
4 changed files with 216 additions and 237 deletions
|
@ -188,8 +188,8 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><strong>contact_require_premium</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.10?<a href="/constructor/true">true</a></td>
|
||||
<td> </td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.29?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, we can only write to this user if they have already sent some messages to us, if we are subscribed to <a href="/api/premium">Telegram Premium</a>, or if they're a mutual contact (<a href="/constructor/user">user</a>.<code>mutual_contact</code>). <br>All the secondary conditions listed above must be checked separately to verify whether we can still write to the user, even if this flag is set (i.e. a mutual contact will have this flag set even if we can still write to them, and so on...); to avoid doing these extra checks if we haven't yet cached all the required information (for example while displaying the chat list in the sharing UI) the <a href="/method/users.getIsPremiumRequiredToContact">users.getIsPremiumRequiredToContact</a> method may be invoked instead, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user. <br>To set this flag for ourselves invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a>, setting the <code>settings.new_noncontact_peers_require_premium</code> flag.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>bot_business</strong></td>
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
<tr>
|
||||
<td><strong>type</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
|
||||
<td>Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else</td>
|
||||
<td>Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else, see <a href="https://github.com/telegramdesktop/tdesktop/blob/4f7a124f3e85f3f61d862b94fb5a45236976f38f/Telegram/SourceFiles/data/data_web_page.cpp#L127">here »</a> for a full list.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>site_name</strong></td>
|
||||
|
|
|
@ -4,32 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>webPageAttributeStickerSet</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
flags
|
||||
#
|
||||
Flags, see TL conditional fields
|
||||
emojis
|
||||
flags.0?true
|
||||
|
||||
text_color
|
||||
flags.1?true…">
|
||||
<meta property="description" content="Contains info about a stickerset », for a webPage preview of a stickerset deep link » (the webPage will have a type of …">
|
||||
<meta property="og:title" content="webPageAttributeStickerSet">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
flags
|
||||
#
|
||||
Flags, see TL conditional fields
|
||||
emojis
|
||||
flags.0?true
|
||||
|
||||
text_color
|
||||
flags.1?true…">
|
||||
<meta property="og:description" content="Contains info about a stickerset », for a webPage preview of a stickerset deep link » (the webPage will have a type of …">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -64,7 +42,8 @@ flags.1?true…">
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/webPageAttributeStickerSet" >webPageAttributeStickerSet</a></li></ul></div>
|
||||
<h1 id="dev_page_title">webPageAttributeStickerSet</h1>
|
||||
|
||||
<div id="dev_page_content"><p><div class="clearfix">
|
||||
<div id="dev_page_content"><p>Contains info about a <a href="/api/stickers">stickerset »</a>, for a <a href="/constructor/webPage">webPage</a> preview of a <a href="/api/links#stickerset-links">stickerset deep link »</a> (the <a href="/constructor/webPage">webPage</a> will have a <code>type</code> of <code>telegram_stickerset</code>). </p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
|
||||
|
@ -95,17 +74,17 @@ flags.1?true…">
|
|||
<tr>
|
||||
<td><strong>emojis</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
|
||||
<td> </td>
|
||||
<td>Whether this i s a <a href="/api/custom-emoji">custom emoji stickerset</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>text_color</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
|
||||
<td> </td>
|
||||
<td>Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>stickers</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/Document">Document</a>></td>
|
||||
<td> </td>
|
||||
<td>A subset of the stickerset in the stickerset.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -53,9 +53,9 @@
|
|||
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
|
||||
<!-- start req_pq_multi -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 50 14 0A 00 7C 4D 99 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 97 F2 BF 9D 89 B6 71 73
|
||||
0020 | 7F 89 9F BA 14 AD 4F 31</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 BC 76 09 00 AF 4D 99 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE A6 B2 F8 1F 8F DB 3D 17
|
||||
0020 | 33 82 A6 28 5E 43 3C 5E</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>50140A007C4D9966</code></td>
|
||||
<td><code>BC760900AF4D9966</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>97F2BF9D89B671737F899FBA14AD4F31</code></td>
|
||||
<td><code>A6B2F81F8FDB3D173382A6285E433C5E</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 98 5B 6C 7C 4D 99 66
|
||||
0010 | A8 00 00 00 63 24 16 05 97 F2 BF 9D 89 B6 71 73
|
||||
0020 | 7F 89 9F BA 14 AD 4F 31 2E 16 F7 C4 E6 84 CF A8
|
||||
0030 | 88 C7 B2 FA BD 72 61 68 08 27 0F 8B 7E 2C 69 A9
|
||||
0040 | 51 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 48 04 FE AF 4D 99 66
|
||||
0010 | 7C 00 00 00 63 24 16 05 A6 B2 F8 1F 8F DB 3D 17
|
||||
0020 | 33 82 A6 28 5E 43 3C 5E 57 23 72 FC D6 8B D9 7F
|
||||
0030 | 39 4B A8 98 AB 19 56 DE 08 19 69 25 89 F3 72 50
|
||||
0040 | 2F 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>01985B6C7C4D9966</code></td>
|
||||
<td><code>014804FEAF4D9966</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>A8000000</code> (168 in decimal)</td>
|
||||
<td><code>7C000000</code> (124 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>97F2BF9D89B671737F899FBA14AD4F31</code></td>
|
||||
<td><code>A6B2F81F8FDB3D173382A6285E433C5E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>2E16F7C4E684CFA888C7B2FABD726168</code></td>
|
||||
<td><code>572372FCD68BD97F394BA898AB1956DE</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>08270F8B7E2C69A951000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2814621666157111633</td>
|
||||
<td><code>0819692589F372502F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1831035997927919663</td>
|
||||
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -208,22 +208,22 @@
|
|||
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
|
||||
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p < q.</h5>
|
||||
<!-- start pq -->
|
||||
<pre><code>pq = 2814621666157111633</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2814621666157111633 = 1416441211 * 1987108003</code></p>
|
||||
<pre><code>p = 1416441211
|
||||
q = 1987108003</code></pre>
|
||||
<pre><code>pq = 1831035997927919663</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1831035997927919663 = 1065167549 * 1719012187</code></p>
|
||||
<pre><code>p = 1065167549
|
||||
q = 1719012187</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 27 0F 8B 7E 2C 69 A9 51 00 00 00
|
||||
0010 | 04 54 6D 2D 7B 00 00 00 04 76 70 DC A3 00 00 00
|
||||
0020 | 97 F2 BF 9D 89 B6 71 73 7F 89 9F BA 14 AD 4F 31
|
||||
0030 | 2E 16 F7 C4 E6 84 CF A8 88 C7 B2 FA BD 72 61 68
|
||||
0040 | F7 8E 08 9A 93 73 12 EC 51 3A 2B F7 1E 2F 9F BA
|
||||
0050 | 64 CE BC BD 40 07 E9 39 69 25 20 BA 05 A4 50 3E
|
||||
<pre><code>0000 | 95 5F F5 A9 08 19 69 25 89 F3 72 50 2F 00 00 00
|
||||
0010 | 04 3F 7D 2A BD 00 00 00 04 66 76 0B 5B 00 00 00
|
||||
0020 | A6 B2 F8 1F 8F DB 3D 17 33 82 A6 28 5E 43 3C 5E
|
||||
0030 | 57 23 72 FC D6 8B D9 7F 39 4B A8 98 AB 19 56 DE
|
||||
0040 | 45 66 5B FB DA BB 71 20 49 33 58 6A D5 1B 7D 65
|
||||
0050 | 96 CD AA 76 99 E2 2A 3E A8 0A F2 EF 1C 6D 78 EF
|
||||
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 = 1987108003</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>08270F8B7E2C69A951000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2814621666157111633</td>
|
||||
<td><code>0819692589F372502F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1831035997927919663</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>04546D2D7B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1416441211</td>
|
||||
<td><code>043F7D2ABD000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1065167549</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>047670DCA3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1987108003</td>
|
||||
<td><code>0466760B5B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1719012187</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>97F2BF9D89B671737F899FBA14AD4F31</code></td>
|
||||
<td><code>A6B2F81F8FDB3D173382A6285E433C5E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>2E16F7C4E684CFA888C7B2FABD726168</code></td>
|
||||
<td><code>572372FCD68BD97F394BA898AB1956DE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>F78E089A937312EC513A2BF71E2F9FBA</code> <code>64CEBCBD4007E939692520BA05A4503E</code></td>
|
||||
<td><code>45665BFBDABB71204933586AD51B7D65</code> <code>96CDAA7699E22A3EA80AF2EF1C6D78EF</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1987108003</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 = 955FF5A908270F8B7E2C69A95100000004546D2D7B000000047670DCA300000097F2BF9D89B671737F899FBA14AD4F312E16F7C4E684CFA888C7B2FABD726168F78E089A937312EC513A2BF71E2F9FBA64CEBCBD4007E939692520BA05A4503E02000000
|
||||
random_padding_bytes = 118AB3EBEEE52168275927B3F294313C3D7F3FE085E32C82B3642E4309904AE7F881639A0C0A1DD992EB57C24AB17059A4D98A3A909BBA1F08F6DC77D072BDE595E842FE86227AAC4200DE680A3EFE9FCC4138AFFACD89B766E30326</code></pre>
|
||||
<pre><code>data = 955FF5A90819692589F372502F000000043F7D2ABD0000000466760B5B000000A6B2F81F8FDB3D173382A6285E433C5E572372FCD68BD97F394BA898AB1956DE45665BFBDABB71204933586AD51B7D6596CDAA7699E22A3EA80AF2EF1C6D78EF02000000
|
||||
random_padding_bytes = 5AD52E434950F61F04ECE6113D993F76FD9B11EAC7204ACCA6A11A9EAC03D1A0FAEDA729CB0F870B97FDFBFD93A090CE4AE044850CDB1A7EB4393018354D8AC3D7312F9E5363DD6FD8EB762AD1E717D830F11C1031CB2571084EB371</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 = CBA173F75B564ACD149EAF633986902664B75610FDDFFFE3F50D24935490B51FFEBD0AD62A7049D933A89ED39F3239C6109AABF2C1A9AF012B6BE0A2DE30B1BCEF8E2284A99054E0B414358F2E1E2EF7820A2C2AD953C5B61D54EDF2E1515E8898EE661218177EA95D895BC54B0052586AEBFE1E2F394B2057F171324ED4A6A0E99D52F87B270E57134FFCB10CB007BECEA0665CB8007497658FD91BB1D0E90E352333BA561D76D52FC94C8F1990E4C63AB306721F1E144EA3D4475623A9B1A4E702039DF1B4059303A0EAA0BACFCFF1166C830AE1B38EE3C714B6702B0DAB6310F2915AD5D443A9DA0D997BC4FC939CA781EA7C258C7D7889AB5A5F8E55AC50</code></pre>
|
||||
<pre><code>encrypted_data = 60D52FF3615070E9CB98A925B8FBE3D88F56022CD55253064B6D1F579B4CF6BF0A9A55CED20CB1AC6D91C801FF3C8AE5F88B164A7F98BB6AA5B0764D4B4F21B1031271490CEC627D3F8B171AC078090E4F8545A48557E6A2DB4A7F1937B9197DEE3B53C4494B23183DDE61C0FF9B5757A96F9916E89DE30279E815877C11EF8B659B0E531DA5306695C78B8ABA9EF329D8F12CEB810CC338C287D2DE70347401225BB8A042376B4662A2A103D5C7ED317B2A49FBF3409F10A8DD8988EA128D40637BC66102D0965EA5532FBCFE5DBF022A4889605CF7D4A45D62D0CE5C2471DFABED92DD4DC3FAFB6E6DFFFF41FB7B58129A27F9C09292DED23E1BE058DDBC0D</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 BC 0D 0C 00 7C 4D 99 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 97 F2 BF 9D 89 B6 71 73
|
||||
0020 | 7F 89 9F BA 14 AD 4F 31 2E 16 F7 C4 E6 84 CF A8
|
||||
0030 | 88 C7 B2 FA BD 72 61 68 04 54 6D 2D 7B 00 00 00
|
||||
0040 | 04 76 70 DC A3 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 CB A1 73 F7 5B 56 4A CD 14 9E AF 63
|
||||
0060 | 39 86 90 26 64 B7 56 10 FD DF FF E3 F5 0D 24 93
|
||||
0070 | 54 90 B5 1F FE BD 0A D6 2A 70 49 D9 33 A8 9E D3
|
||||
0080 | 9F 32 39 C6 10 9A AB F2 C1 A9 AF 01 2B 6B E0 A2
|
||||
0090 | DE 30 B1 BC EF 8E 22 84 A9 90 54 E0 B4 14 35 8F
|
||||
00A0 | 2E 1E 2E F7 82 0A 2C 2A D9 53 C5 B6 1D 54 ED F2
|
||||
00B0 | E1 51 5E 88 98 EE 66 12 18 17 7E A9 5D 89 5B C5
|
||||
00C0 | 4B 00 52 58 6A EB FE 1E 2F 39 4B 20 57 F1 71 32
|
||||
00D0 | 4E D4 A6 A0 E9 9D 52 F8 7B 27 0E 57 13 4F FC B1
|
||||
00E0 | 0C B0 07 BE CE A0 66 5C B8 00 74 97 65 8F D9 1B
|
||||
00F0 | B1 D0 E9 0E 35 23 33 BA 56 1D 76 D5 2F C9 4C 8F
|
||||
0100 | 19 90 E4 C6 3A B3 06 72 1F 1E 14 4E A3 D4 47 56
|
||||
0110 | 23 A9 B1 A4 E7 02 03 9D F1 B4 05 93 03 A0 EA A0
|
||||
0120 | BA CF CF F1 16 6C 83 0A E1 B3 8E E3 C7 14 B6 70
|
||||
0130 | 2B 0D AB 63 10 F2 91 5A D5 D4 43 A9 DA 0D 99 7B
|
||||
0140 | C4 FC 93 9C A7 81 EA 7C 25 8C 7D 78 89 AB 5A 5F
|
||||
0150 | 8E 55 AC 50</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 20 C0 03 00 B0 4D 99 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 A6 B2 F8 1F 8F DB 3D 17
|
||||
0020 | 33 82 A6 28 5E 43 3C 5E 57 23 72 FC D6 8B D9 7F
|
||||
0030 | 39 4B A8 98 AB 19 56 DE 04 3F 7D 2A BD 00 00 00
|
||||
0040 | 04 66 76 0B 5B 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 60 D5 2F F3 61 50 70 E9 CB 98 A9 25
|
||||
0060 | B8 FB E3 D8 8F 56 02 2C D5 52 53 06 4B 6D 1F 57
|
||||
0070 | 9B 4C F6 BF 0A 9A 55 CE D2 0C B1 AC 6D 91 C8 01
|
||||
0080 | FF 3C 8A E5 F8 8B 16 4A 7F 98 BB 6A A5 B0 76 4D
|
||||
0090 | 4B 4F 21 B1 03 12 71 49 0C EC 62 7D 3F 8B 17 1A
|
||||
00A0 | C0 78 09 0E 4F 85 45 A4 85 57 E6 A2 DB 4A 7F 19
|
||||
00B0 | 37 B9 19 7D EE 3B 53 C4 49 4B 23 18 3D DE 61 C0
|
||||
00C0 | FF 9B 57 57 A9 6F 99 16 E8 9D E3 02 79 E8 15 87
|
||||
00D0 | 7C 11 EF 8B 65 9B 0E 53 1D A5 30 66 95 C7 8B 8A
|
||||
00E0 | BA 9E F3 29 D8 F1 2C EB 81 0C C3 38 C2 87 D2 DE
|
||||
00F0 | 70 34 74 01 22 5B B8 A0 42 37 6B 46 62 A2 A1 03
|
||||
0100 | D5 C7 ED 31 7B 2A 49 FB F3 40 9F 10 A8 DD 89 88
|
||||
0110 | EA 12 8D 40 63 7B C6 61 02 D0 96 5E A5 53 2F BC
|
||||
0120 | FE 5D BF 02 2A 48 89 60 5C F7 D4 A4 5D 62 D0 CE
|
||||
0130 | 5C 24 71 DF AB ED 92 DD 4D C3 FA FB 6E 6D FF FF
|
||||
0140 | 41 FB 7B 58 12 9A 27 F9 C0 92 92 DE D2 3E 1B E0
|
||||
0150 | 58 DD BC 0D</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 = 118AB3EBEEE52168275927B3F294313C3D7F3FE085E32C82B3642E430
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>BC0D0C007C4D9966</code></td>
|
||||
<td><code>20C00300B04D9966</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -363,25 +363,25 @@ random_padding_bytes = 118AB3EBEEE52168275927B3F294313C3D7F3FE085E32C82B3642E430
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>97F2BF9D89B671737F899FBA14AD4F31</code></td>
|
||||
<td><code>A6B2F81F8FDB3D173382A6285E433C5E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>2E16F7C4E684CFA888C7B2FABD726168</code></td>
|
||||
<td><code>572372FCD68BD97F394BA898AB1956DE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>04546D2D7B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1416441211</td>
|
||||
<td><code>043F7D2ABD000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1065167549</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>047670DCA3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1987108003</td>
|
||||
<td><code>0466760B5B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1719012187</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 = 118AB3EBEEE52168275927B3F294313C3D7F3FE085E32C82B3642E430
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE000100CBA173F75B564ACD149EAF63</code> <code>3986902664B75610FDDFFFE3F50D2493</code> <code>5490B51FFEBD0AD62A7049D933A89ED3</code> <code>9F3239C6109AABF2C1A9AF012B6BE0A2</code> <code>DE30B1BCEF8E2284A99054E0B414358F</code> <code>2E1E2EF7820A2C2AD953C5B61D54EDF2</code> <code>E1515E8898EE661218177EA95D895BC5</code> <code>4B0052586AEBFE1E2F394B2057F17132</code> <code>4ED4A6A0E99D52F87B270E57134FFCB1</code> <code>0CB007BECEA0665CB8007497658FD91B</code> <code>B1D0E90E352333BA561D76D52FC94C8F</code> <code>1990E4C63AB306721F1E144EA3D44756</code> <code>23A9B1A4E702039DF1B4059303A0EAA0</code> <code>BACFCFF1166C830AE1B38EE3C714B670</code> <code>2B0DAB6310F2915AD5D443A9DA0D997B</code> <code>C4FC939CA781EA7C258C7D7889AB5A5F</code><br> <code>8E55AC50</code></td>
|
||||
<td><code>FE00010060D52FF3615070E9CB98A925</code> <code>B8FBE3D88F56022CD55253064B6D1F57</code> <code>9B4CF6BF0A9A55CED20CB1AC6D91C801</code> <code>FF3C8AE5F88B164A7F98BB6AA5B0764D</code> <code>4B4F21B1031271490CEC627D3F8B171A</code> <code>C078090E4F8545A48557E6A2DB4A7F19</code> <code>37B9197DEE3B53C4494B23183DDE61C0</code> <code>FF9B5757A96F9916E89DE30279E81587</code> <code>7C11EF8B659B0E531DA5306695C78B8A</code> <code>BA9EF329D8F12CEB810CC338C287D2DE</code> <code>70347401225BB8A042376B4662A2A103</code> <code>D5C7ED317B2A49FBF3409F10A8DD8988</code> <code>EA128D40637BC66102D0965EA5532FBC</code> <code>FE5DBF022A4889605CF7D4A45D62D0CE</code> <code>5C2471DFABED92DD4DC3FAFB6E6DFFFF</code> <code>41FB7B58129A27F9C09292DED23E1BE0</code><br> <code>58DDBC0D</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = 118AB3EBEEE52168275927B3F294313C3D7F3FE085E32C82B3642E430
|
|||
<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 C4 FA 32 7D 4D 99 66
|
||||
0010 | BC 02 00 00 5C 07 E8 D0 97 F2 BF 9D 89 B6 71 73
|
||||
0020 | 7F 89 9F BA 14 AD 4F 31 2E 16 F7 C4 E6 84 CF A8
|
||||
0030 | 88 C7 B2 FA BD 72 61 68 FE 50 02 00 BA 0B 42 41
|
||||
0040 | 30 A5 B8 5D D9 20 8E 3A 3E 31 DA 71 D2 23 C1 8B
|
||||
0050 | EC 36 7E 7B 41 D0 D7 60 EC 5D 8C 92 D8 0D BC A0
|
||||
0060 | A8 4C E9 E7 79 42 AD C3 8C C6 99 2C A0 9E 1F A8
|
||||
0070 | A6 68 8A 41 38 89 79 EB DA 1F 03 84 A4 9C 9F F6
|
||||
0080 | 92 46 37 A2 81 69 A1 97 68 5E 19 14 25 B0 12 BD
|
||||
0090 | C8 DE F1 D8 6F E4 AB 77 C8 2C 2F 78 0E F2 22 29
|
||||
00A0 | 01 C4 B6 B9 01 32 C1 FC 9D 34 8D 0B 36 D0 63 9B
|
||||
00B0 | 69 6A DD 48 D4 66 D3 33 35 DA 14 AB 76 79 93 78
|
||||
00C0 | 49 2D 47 3C 21 5B AA 89 F2 E6 36 60 9E 12 4E 87
|
||||
00D0 | 74 10 9A EA 37 09 E2 53 AD FC 51 A5 09 BA 26 06
|
||||
00E0 | 37 AE F8 11 F1 31 C0 2B 02 46 60 C8 7A 12 C1 84
|
||||
00F0 | 51 D0 7A 60 60 2B 03 5B 56 03 3A 4A 19 0D 83 A6
|
||||
0100 | E9 AF A5 CE 5E B8 76 C7 22 71 0E E7 C3 CE A4 A9
|
||||
0110 | 70 03 35 3A 11 86 85 69 AD 65 B8 16 DD 71 E9 C2
|
||||
0120 | 75 44 51 F6 04 57 33 F8 85 F9 F8 41 3E 4E EB 65
|
||||
0130 | 1F 57 4F 07 3E 31 7E 82 95 CA 89 29 43 24 7E BA
|
||||
0140 | 47 67 01 82 59 44 26 BF D2 B9 CA 7F 33 E6 FF 0D
|
||||
0150 | 82 EF AC 53 12 68 64 D0 FB DD C3 33 46 70 CF D6
|
||||
0160 | 08 62 34 84 D7 CF BD A4 63 CA 23 0B E8 3C ED CC
|
||||
0170 | F5 F8 FD 70 D9 3B 69 89 27 10 17 C0 A2 3E DB A6
|
||||
0180 | 40 7C 33 17 EF D5 7B C7 F3 D9 C2 97 BF 3C 2F 47
|
||||
0190 | 60 FB 03 12 0D 78 8F 08 E1 0F 24 AF 22 97 B2 D6
|
||||
01A0 | DC 6C 1A 6A 6C 8E 94 48 71 06 E1 45 EC DB AF 99
|
||||
01B0 | 70 09 39 33 2A 3B A7 73 E7 C1 7A 01 41 D2 E2 32
|
||||
01C0 | B9 EA FC 47 9D 8A 9F 65 70 ED 56 B8 D3 38 82 06
|
||||
01D0 | 94 CF 7A E6 CF 8B 10 C0 CF 25 FC 77 8C 30 14 9E
|
||||
01E0 | 45 75 9E 25 10 8F C2 60 3F 7E AF 43 21 33 A7 74
|
||||
01F0 | 8F B9 D1 E7 11 B2 4B C2 72 F9 60 3B 24 C6 F0 00
|
||||
0200 | 27 1C 61 E0 34 0B C1 2F 7F 0C C7 46 F7 0F 88 79
|
||||
0210 | 52 1E 97 9E CB 28 8B D1 50 69 89 97 25 F0 9E E2
|
||||
0220 | 96 20 0B A1 0B 35 C2 D9 99 EB 33 04 9C 8E 1B 59
|
||||
0230 | 96 BA 03 3A FC B1 52 FE 8F 6B 82 60 01 FB C8 A2
|
||||
0240 | 6E 13 4E 7A E0 A6 BC 44 7B 97 0F 0F CC FC F0 80
|
||||
0250 | 2D 7C BB 7E A6 CD 99 7D 5C AA 4B 34 58 89 8A 81
|
||||
0260 | 83 59 12 2C 8D C5 60 74 16 86 8E CF F5 48 43 B3
|
||||
0270 | 8C B5 73 D7 70 3A 14 32 C6 85 9E F1 12 DE 54 DE
|
||||
0280 | 73 CD 05 0C 11 51 DD 7C 5E AD D0 EA</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 90 B0 B1 B0 4D 99 66
|
||||
0010 | DC 02 00 00 5C 07 E8 D0 A6 B2 F8 1F 8F DB 3D 17
|
||||
0020 | 33 82 A6 28 5E 43 3C 5E 57 23 72 FC D6 8B D9 7F
|
||||
0030 | 39 4B A8 98 AB 19 56 DE FE 50 02 00 C1 3C 7E AA
|
||||
0040 | 1A DB 0C C9 0D B1 B7 FF 76 43 6C D2 2D 3B 28 95
|
||||
0050 | 1D EF A9 08 3D 1F 52 3B 83 DB C2 A5 F3 38 CA B8
|
||||
0060 | 75 44 B2 30 9E 17 29 AD F7 DF A8 5A 5B 68 95 C1
|
||||
0070 | 03 81 B1 0F 86 4D 31 84 9A 17 23 D9 49 68 CE D0
|
||||
0080 | E1 8F E0 57 FA 92 1A 10 F4 7C 6D 11 22 A8 E6 53
|
||||
0090 | A2 CB 68 7D 0B 47 BB A2 BF 65 DC 11 9D 17 22 EE
|
||||
00A0 | 8D AB A9 89 B8 ED 02 45 3D D4 E8 59 33 DD 8C 87
|
||||
00B0 | 99 FE B8 BF 0A 95 2D C9 29 85 D7 D9 B3 1E 7F 75
|
||||
00C0 | 7A D6 13 FB 48 CF 5F 3E 29 65 57 5D D9 42 2D D0
|
||||
00D0 | 43 94 87 8B 07 5A CA D3 1B 39 AF 12 C4 04 4D 49
|
||||
00E0 | 67 90 1F 71 0D DA 37 09 AC E3 71 42 75 9F 97 9B
|
||||
00F0 | AC 10 F2 90 C6 6B 9E 9C D0 65 10 22 8A 40 4A AD
|
||||
0100 | 47 00 EA 0A AC C8 DA D1 0A 81 85 64 B9 79 5D 8D
|
||||
0110 | E7 0E B1 EE CC 2F 58 23 65 FA 4E DE ED AE 3C DB
|
||||
0120 | CF AC F3 EE AC A6 30 54 D9 0E C1 5B 8C 54 A8 CF
|
||||
0130 | C9 4F 4D C9 67 BC 6A 11 92 BA 89 70 0B 45 BA CD
|
||||
0140 | BA 60 32 B1 9E 7E AC B6 6E 01 AD D5 8F 17 0B 9D
|
||||
0150 | F7 33 EC FF 4C 27 35 95 DA 18 1D A8 5B 44 9A 5B
|
||||
0160 | 89 7E E4 65 21 F4 CD 51 B1 DD 96 53 FA 95 02 0A
|
||||
0170 | 54 CC 9E EC DB A2 DE 7B 5C 69 58 40 27 93 37 24
|
||||
0180 | 82 84 01 D5 B1 7F CB B2 2E B8 60 D6 C4 45 E6 F7
|
||||
0190 | 86 A0 BE 04 01 60 78 2A 63 9A F3 4B C4 EC 0E E4
|
||||
01A0 | A3 85 96 C6 F2 F8 E9 8F 44 39 01 CB F8 A3 B9 0C
|
||||
01B0 | C6 13 3A 7D 7C D1 8B FA D2 D0 DC FE C4 85 D3 A0
|
||||
01C0 | 2B 60 52 F5 91 B0 3F B6 99 E2 16 9E B8 D7 4A 7C
|
||||
01D0 | 98 A9 A7 02 13 DD 45 C3 FB 5C 81 0A F7 A9 2C 81
|
||||
01E0 | 5C A5 0B 58 48 F5 C8 8C D7 4F 87 87 6B 7E 60 11
|
||||
01F0 | B5 4B 92 BE 8A 24 E8 CD 7F FA EC ED 79 1A D8 4A
|
||||
0200 | 47 25 B6 2A DA 02 FA 0D F2 33 35 68 C8 E2 CC 0A
|
||||
0210 | 9E E5 1A 8A 81 EA 70 EE C9 94 F2 76 75 14 15 1F
|
||||
0220 | 14 69 9D 19 D9 53 F8 FA 8F 80 77 CF 06 C5 8B 47
|
||||
0230 | CF FA DE 83 A1 81 4E 38 3E C3 F6 63 24 14 C4 BD
|
||||
0240 | 1D D7 A7 0A 26 A1 95 C9 63 2C 13 58 A2 77 59 AF
|
||||
0250 | 88 DA 06 5B 5D 95 60 3B EC DD F7 18 D9 12 B7 A7
|
||||
0260 | 0C B9 11 2A 1C F9 37 31 91 A9 06 A5 6C 8F 98 4C
|
||||
0270 | 9F 4D 71 8A 4D 9C 62 42 40 05 B6 B7 4F 87 80 B0
|
||||
0280 | 99 91 AC 83 0E F5 80 B8 19 77 54 79</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 = 118AB3EBEEE52168275927B3F294313C3D7F3FE085E32C82B3642E430
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01C4FA327D4D9966</code></td>
|
||||
<td><code>0190B0B1B04D9966</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>BC020000</code> (700 in decimal)</td>
|
||||
<td><code>DC020000</code> (732 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = 118AB3EBEEE52168275927B3F294313C3D7F3FE085E32C82B3642E430
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>97F2BF9D89B671737F899FBA14AD4F31</code></td>
|
||||
<td><code>A6B2F81F8FDB3D173382A6285E433C5E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>2E16F7C4E684CFA888C7B2FABD726168</code></td>
|
||||
<td><code>572372FCD68BD97F394BA898AB1956DE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE500200BA0B424130A5B85DD9208E3A</code> <code>3E31DA71D223C18BEC367E7B41D0D760</code> <code>EC5D8C92D80DBCA0A84CE9E77942ADC3</code> <code>8CC6992CA09E1FA8A6688A41388979EB</code> <code>DA1F0384A49C9FF6924637A28169A197</code> <code>685E191425B012BDC8DEF1D86FE4AB77</code> <code>C82C2F780EF2222901C4B6B90132C1FC</code> <code>9D348D0B36D0639B696ADD48D466D333</code> <code>35DA14AB76799378492D473C215BAA89</code> <code>F2E636609E124E8774109AEA3709E253</code> <code>ADFC51A509BA260637AEF811F131C02B</code> <code>024660C87A12C18451D07A60602B035B</code> <code>56033A4A190D83A6E9AFA5CE5EB876C7</code> <code>22710EE7C3CEA4A97003353A11868569</code> <code>AD65B816DD71E9C2754451F6045733F8</code> <code>85F9F8413E4EEB651F574F073E317E82</code> <code>95CA892943247EBA47670182594426BF</code> <code>D2B9CA7F33E6FF0D82EFAC53126864D0</code> <code>FBDDC3334670CFD608623484D7CFBDA4</code> <code>63CA230BE83CEDCCF5F8FD70D93B6989</code> <code>271017C0A23EDBA6407C3317EFD57BC7</code> <code>F3D9C297BF3C2F4760FB03120D788F08</code> <code>E10F24AF2297B2D6DC6C1A6A6C8E9448</code> <code>7106E145ECDBAF99700939332A3BA773</code> <code>E7C17A0141D2E232B9EAFC479D8A9F65</code> <code>70ED56B8D338820694CF7AE6CF8B10C0</code> <code>CF25FC778C30149E45759E25108FC260</code> <code>3F7EAF432133A7748FB9D1E711B24BC2</code> <code>72F9603B24C6F000271C61E0340BC12F</code> <code>7F0CC746F70F8879521E979ECB288BD1</code> <code>5069899725F09EE296200BA10B35C2D9</code> <code>99EB33049C8E1B5996BA033AFCB152FE</code> <code>8F6B826001FBC8A26E134E7AE0A6BC44</code> <code>7B970F0FCCFCF0802D7CBB7EA6CD997D</code> <code>5CAA4B3458898A818359122C8DC56074</code> <code>16868ECFF54843B38CB573D7703A1432</code> <code>C6859EF112DE54DE73CD050C1151DD7C</code><br> <code>5EADD0EA</code></td>
|
||||
<td><code>FE500200C13C7EAA1ADB0CC90DB1B7FF</code> <code>76436CD22D3B28951DEFA9083D1F523B</code> <code>83DBC2A5F338CAB87544B2309E1729AD</code> <code>F7DFA85A5B6895C10381B10F864D3184</code> <code>9A1723D94968CED0E18FE057FA921A10</code> <code>F47C6D1122A8E653A2CB687D0B47BBA2</code> <code>BF65DC119D1722EE8DABA989B8ED0245</code> <code>3DD4E85933DD8C8799FEB8BF0A952DC9</code> <code>2985D7D9B31E7F757AD613FB48CF5F3E</code> <code>2965575DD9422DD04394878B075ACAD3</code> <code>1B39AF12C4044D4967901F710DDA3709</code> <code>ACE37142759F979BAC10F290C66B9E9C</code> <code>D06510228A404AAD4700EA0AACC8DAD1</code> <code>0A818564B9795D8DE70EB1EECC2F5823</code> <code>65FA4EDEEDAE3CDBCFACF3EEACA63054</code> <code>D90EC15B8C54A8CFC94F4DC967BC6A11</code> <code>92BA89700B45BACDBA6032B19E7EACB6</code> <code>6E01ADD58F170B9DF733ECFF4C273595</code> <code>DA181DA85B449A5B897EE46521F4CD51</code> <code>B1DD9653FA95020A54CC9EECDBA2DE7B</code> <code>5C69584027933724828401D5B17FCBB2</code> <code>2EB860D6C445E6F786A0BE040160782A</code> <code>639AF34BC4EC0EE4A38596C6F2F8E98F</code> <code>443901CBF8A3B90CC6133A7D7CD18BFA</code> <code>D2D0DCFEC485D3A02B6052F591B03FB6</code> <code>99E2169EB8D74A7C98A9A70213DD45C3</code> <code>FB5C810AF7A92C815CA50B5848F5C88C</code> <code>D74F87876B7E6011B54B92BE8A24E8CD</code> <code>7FFAECED791AD84A4725B62ADA02FA0D</code> <code>F2333568C8E2CC0A9EE51A8A81EA70EE</code> <code>C994F2767514151F14699D19D953F8FA</code> <code>8F8077CF06C58B47CFFADE83A1814E38</code> <code>3EC3F6632414C4BD1DD7A70A26A195C9</code> <code>632C1358A27759AF88DA065B5D95603B</code> <code>ECDDF718D912B7A70CB9112A1CF93731</code> <code>91A906A56C8F984C9F4D718A4D9C6242</code> <code>4005B6B74F8780B09991AC830EF580B8</code><br> <code>19775479</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = 118AB3EBEEE52168275927B3F294313C3D7F3FE085E32C82B3642E430
|
|||
<!-- 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 = BA0B424130A5B85DD9208E3A3E31DA71D223C18BEC367E7B41D0D760EC5D8C92D80DBCA0A84CE9E77942ADC38CC6992CA09E1FA8A6688A41388979EBDA1F0384A49C9FF6924637A28169A197685E191425B012BDC8DEF1D86FE4AB77C82C2F780EF2222901C4B6B90132C1FC9D348D0B36D0639B696ADD48D466D33335DA14AB76799378492D473C215BAA89F2E636609E124E8774109AEA3709E253ADFC51A509BA260637AEF811F131C02B024660C87A12C18451D07A60602B035B56033A4A190D83A6E9AFA5CE5EB876C722710EE7C3CEA4A97003353A11868569AD65B816DD71E9C2754451F6045733F885F9F8413E4EEB651F574F073E317E8295CA892943247EBA47670182594426BFD2B9CA7F33E6FF0D82EFAC53126864D0FBDDC3334670CFD608623484D7CFBDA463CA230BE83CEDCCF5F8FD70D93B6989271017C0A23EDBA6407C3317EFD57BC7F3D9C297BF3C2F4760FB03120D788F08E10F24AF2297B2D6DC6C1A6A6C8E94487106E145ECDBAF99700939332A3BA773E7C17A0141D2E232B9EAFC479D8A9F6570ED56B8D338820694CF7AE6CF8B10C0CF25FC778C30149E45759E25108FC2603F7EAF432133A7748FB9D1E711B24BC272F9603B24C6F000271C61E0340BC12F7F0CC746F70F8879521E979ECB288BD15069899725F09EE296200BA10B35C2D999EB33049C8E1B5996BA033AFCB152FE8F6B826001FBC8A26E134E7AE0A6BC447B970F0FCCFCF0802D7CBB7EA6CD997D5CAA4B3458898A818359122C8DC5607416868ECFF54843B38CB573D7703A1432C6859EF112DE54DE73CD050C1151DD7C5EADD0EA
|
||||
tmp_aes_key = ECB80E870717032F7CD29BBD7D1A4CFD284797E9A4986262B46A5AB4B9D19DD9
|
||||
tmp_aes_iv = BF221FC35073EEB56CC626DF73D8B4EE7FDE5E937AC3B992E3DB72FCF78E089A</code></pre>
|
||||
<pre><code>encrypted_answer = C13C7EAA1ADB0CC90DB1B7FF76436CD22D3B28951DEFA9083D1F523B83DBC2A5F338CAB87544B2309E1729ADF7DFA85A5B6895C10381B10F864D31849A1723D94968CED0E18FE057FA921A10F47C6D1122A8E653A2CB687D0B47BBA2BF65DC119D1722EE8DABA989B8ED02453DD4E85933DD8C8799FEB8BF0A952DC92985D7D9B31E7F757AD613FB48CF5F3E2965575DD9422DD04394878B075ACAD31B39AF12C4044D4967901F710DDA3709ACE37142759F979BAC10F290C66B9E9CD06510228A404AAD4700EA0AACC8DAD10A818564B9795D8DE70EB1EECC2F582365FA4EDEEDAE3CDBCFACF3EEACA63054D90EC15B8C54A8CFC94F4DC967BC6A1192BA89700B45BACDBA6032B19E7EACB66E01ADD58F170B9DF733ECFF4C273595DA181DA85B449A5B897EE46521F4CD51B1DD9653FA95020A54CC9EECDBA2DE7B5C69584027933724828401D5B17FCBB22EB860D6C445E6F786A0BE040160782A639AF34BC4EC0EE4A38596C6F2F8E98F443901CBF8A3B90CC6133A7D7CD18BFAD2D0DCFEC485D3A02B6052F591B03FB699E2169EB8D74A7C98A9A70213DD45C3FB5C810AF7A92C815CA50B5848F5C88CD74F87876B7E6011B54B92BE8A24E8CD7FFAECED791AD84A4725B62ADA02FA0DF2333568C8E2CC0A9EE51A8A81EA70EEC994F2767514151F14699D19D953F8FA8F8077CF06C58B47CFFADE83A1814E383EC3F6632414C4BD1DD7A70A26A195C9632C1358A27759AF88DA065B5D95603BECDDF718D912B7A70CB9112A1CF9373191A906A56C8F984C9F4D718A4D9C62424005B6B74F8780B09991AC830EF580B819775479
|
||||
tmp_aes_key = D431055F7852B00BB641DE00717E3C33AD4CA820CAF6CB655007B603E0B12517
|
||||
tmp_aes_iv = E22CBE27AAAF912C4CF8D06BA75F482EA4C255AD3EE6D08278028B8C45665BFB</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = D7D85A7CA5FF5388C2FB3245444E0D326A0C0636BA0D89B597F2BF9D89B671737F899FBA14AD4F312E16F7C4E684CFA888C7B2FABD72616803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010092B4CA666A757C27521E5CC00018B009EDEFE6E9BC5F1AB9B2A78DB56E74FB2D7B7650D3CCD6754DAFA6B62EDFB13364B528B05C63BE08314D8BF0C3CC00EA678A11B613D0E1D4425FE6BF51CB541E16E57CB69F05CE34F4104ADB8914E134B5695BD4386EE05BB00A01F66DD07B234E4444CBBB01736204CE1E47BADB9A7BACCC864CF73923F58710266B0C2D0895703A967486DA429086A7C585F894E1636D3EAFC3BBC3FCA4740483AF06E2F4F3D5B09BE9F643978869F01AD95C12B4D9F1828948D8BF459273B0583D06D429A63EFE0483D21E4E36275EB1F549AF1583CEE711C37666B2F41D0174626615D2476936D94B11D923BC12A8F27E38394A4C437D4D9966C69174E18704FC83
|
||||
answer = BA0D89B597F2BF9D89B671737F899FBA14AD4F312E16F7C4E684CFA888C7B2FABD72616803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010092B4CA666A757C27521E5CC00018B009EDEFE6E9BC5F1AB9B2A78DB56E74FB2D7B7650D3CCD6754DAFA6B62EDFB13364B528B05C63BE08314D8BF0C3CC00EA678A11B613D0E1D4425FE6BF51CB541E16E57CB69F05CE34F4104ADB8914E134B5695BD4386EE05BB00A01F66DD07B234E4444CBBB01736204CE1E47BADB9A7BACCC864CF73923F58710266B0C2D0895703A967486DA429086A7C585F894E1636D3EAFC3BBC3FCA4740483AF06E2F4F3D5B09BE9F643978869F01AD95C12B4D9F1828948D8BF459273B0583D06D429A63EFE0483D21E4E36275EB1F549AF1583CEE711C37666B2F41D0174626615D2476936D94B11D923BC12A8F27E38394A4C437D4D9966C69174E18704FC83</code></pre>
|
||||
<pre><code>answer_with_hash = 4E52418E166EAC51AF46B18AB0EEB6FB7740FC8CBA0D89B5A6B2F81F8FDB3D173382A6285E433C5E572372FCD68BD97F394BA898AB1956DE03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001008EE2D7D2170232D3497A4264B2913BAED126F682EA5AF3E2BC90A8AF48652C29A8EB9BC37BF9F5465C8861F06BF241C7F7A9988DC07D1E33E670D2E344FA7C7F4029CFA27135FC7884D319E7580EC4B271444D7A4B12B247B984161D6A46AC973FC02FC0A0E833A261023DA11395B313D174428E891A7A174FE4CB5A694C64DDDE6FA7E520F09403513B4BB3B1CEBD6F487143307B87CAAAEFBF1436A52B9E35E3CE44056CA5DA49DC628478DF4EDA96DBA7159E004973FB1F706CE65F0AE0DCDA00A22E50516D16CD64F7DB17AEE7A0BA7FA553327C8CC1DAC881494DBD53AE610FB1ED544D039D052B725067B246F4A2352B1A918A113A04CEE7C5D16FD2F9B04D99661CA8261664812E16
|
||||
answer = BA0D89B5A6B2F81F8FDB3D173382A6285E433C5E572372FCD68BD97F394BA898AB1956DE03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001008EE2D7D2170232D3497A4264B2913BAED126F682EA5AF3E2BC90A8AF48652C29A8EB9BC37BF9F5465C8861F06BF241C7F7A9988DC07D1E33E670D2E344FA7C7F4029CFA27135FC7884D319E7580EC4B271444D7A4B12B247B984161D6A46AC973FC02FC0A0E833A261023DA11395B313D174428E891A7A174FE4CB5A694C64DDDE6FA7E520F09403513B4BB3B1CEBD6F487143307B87CAAAEFBF1436A52B9E35E3CE44056CA5DA49DC628478DF4EDA96DBA7159E004973FB1F706CE65F0AE0DCDA00A22E50516D16CD64F7DB17AEE7A0BA7FA553327C8CC1DAC881494DBD53AE610FB1ED544D039D052B725067B246F4A2352B1A918A113A04CEE7C5D16FD2F9B04D99661CA8261664812E16</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 97 F2 BF 9D 89 B6 71 73 7F 89 9F BA
|
||||
0010 | 14 AD 4F 31 2E 16 F7 C4 E6 84 CF A8 88 C7 B2 FA
|
||||
0020 | BD 72 61 68 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 A6 B2 F8 1F 8F DB 3D 17 33 82 A6 28
|
||||
0010 | 5E 43 3C 5E 57 23 72 FC D6 8B D9 7F 39 4B A8 98
|
||||
0020 | AB 19 56 DE 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 = BA0D89B597F2BF9D89B671737F899FBA14AD4F312E16F7C4E684CFA888C7B2FABD72616
|
|||
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 | 92 B4 CA 66 6A 75 7C 27 52 1E 5C C0 00 18 B0 09
|
||||
0140 | ED EF E6 E9 BC 5F 1A B9 B2 A7 8D B5 6E 74 FB 2D
|
||||
0150 | 7B 76 50 D3 CC D6 75 4D AF A6 B6 2E DF B1 33 64
|
||||
0160 | B5 28 B0 5C 63 BE 08 31 4D 8B F0 C3 CC 00 EA 67
|
||||
0170 | 8A 11 B6 13 D0 E1 D4 42 5F E6 BF 51 CB 54 1E 16
|
||||
0180 | E5 7C B6 9F 05 CE 34 F4 10 4A DB 89 14 E1 34 B5
|
||||
0190 | 69 5B D4 38 6E E0 5B B0 0A 01 F6 6D D0 7B 23 4E
|
||||
01A0 | 44 44 CB BB 01 73 62 04 CE 1E 47 BA DB 9A 7B AC
|
||||
01B0 | CC 86 4C F7 39 23 F5 87 10 26 6B 0C 2D 08 95 70
|
||||
01C0 | 3A 96 74 86 DA 42 90 86 A7 C5 85 F8 94 E1 63 6D
|
||||
01D0 | 3E AF C3 BB C3 FC A4 74 04 83 AF 06 E2 F4 F3 D5
|
||||
01E0 | B0 9B E9 F6 43 97 88 69 F0 1A D9 5C 12 B4 D9 F1
|
||||
01F0 | 82 89 48 D8 BF 45 92 73 B0 58 3D 06 D4 29 A6 3E
|
||||
0200 | FE 04 83 D2 1E 4E 36 27 5E B1 F5 49 AF 15 83 CE
|
||||
0210 | E7 11 C3 76 66 B2 F4 1D 01 74 62 66 15 D2 47 69
|
||||
0220 | 36 D9 4B 11 D9 23 BC 12 A8 F2 7E 38 39 4A 4C 43
|
||||
0230 | 7D 4D 99 66</code></pre>
|
||||
0130 | 8E E2 D7 D2 17 02 32 D3 49 7A 42 64 B2 91 3B AE
|
||||
0140 | D1 26 F6 82 EA 5A F3 E2 BC 90 A8 AF 48 65 2C 29
|
||||
0150 | A8 EB 9B C3 7B F9 F5 46 5C 88 61 F0 6B F2 41 C7
|
||||
0160 | F7 A9 98 8D C0 7D 1E 33 E6 70 D2 E3 44 FA 7C 7F
|
||||
0170 | 40 29 CF A2 71 35 FC 78 84 D3 19 E7 58 0E C4 B2
|
||||
0180 | 71 44 4D 7A 4B 12 B2 47 B9 84 16 1D 6A 46 AC 97
|
||||
0190 | 3F C0 2F C0 A0 E8 33 A2 61 02 3D A1 13 95 B3 13
|
||||
01A0 | D1 74 42 8E 89 1A 7A 17 4F E4 CB 5A 69 4C 64 DD
|
||||
01B0 | DE 6F A7 E5 20 F0 94 03 51 3B 4B B3 B1 CE BD 6F
|
||||
01C0 | 48 71 43 30 7B 87 CA AA EF BF 14 36 A5 2B 9E 35
|
||||
01D0 | E3 CE 44 05 6C A5 DA 49 DC 62 84 78 DF 4E DA 96
|
||||
01E0 | DB A7 15 9E 00 49 73 FB 1F 70 6C E6 5F 0A E0 DC
|
||||
01F0 | DA 00 A2 2E 50 51 6D 16 CD 64 F7 DB 17 AE E7 A0
|
||||
0200 | BA 7F A5 53 32 7C 8C C1 DA C8 81 49 4D BD 53 AE
|
||||
0210 | 61 0F B1 ED 54 4D 03 9D 05 2B 72 50 67 B2 46 F4
|
||||
0220 | A2 35 2B 1A 91 8A 11 3A 04 CE E7 C5 D1 6F D2 F9
|
||||
0230 | B0 4D 99 66</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -570,13 +570,13 @@ answer = BA0D89B597F2BF9D89B671737F899FBA14AD4F312E16F7C4E684CFA888C7B2FABD72616
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>97F2BF9D89B671737F899FBA14AD4F31</code></td>
|
||||
<td><code>A6B2F81F8FDB3D173382A6285E433C5E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>2E16F7C4E684CFA888C7B2FABD726168</code></td>
|
||||
<td><code>572372FCD68BD97F394BA898AB1956DE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B597F2BF9D89B671737F899FBA14AD4F312E16F7C4E684CFA888C7B2FABD72616
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE00010092B4CA666A757C27521E5CC0</code> <code>0018B009EDEFE6E9BC5F1AB9B2A78DB5</code> <code>6E74FB2D7B7650D3CCD6754DAFA6B62E</code> <code>DFB13364B528B05C63BE08314D8BF0C3</code> <code>CC00EA678A11B613D0E1D4425FE6BF51</code> <code>CB541E16E57CB69F05CE34F4104ADB89</code> <code>14E134B5695BD4386EE05BB00A01F66D</code> <code>D07B234E4444CBBB01736204CE1E47BA</code> <code>DB9A7BACCC864CF73923F58710266B0C</code> <code>2D0895703A967486DA429086A7C585F8</code> <code>94E1636D3EAFC3BBC3FCA4740483AF06</code> <code>E2F4F3D5B09BE9F643978869F01AD95C</code> <code>12B4D9F1828948D8BF459273B0583D06</code> <code>D429A63EFE0483D21E4E36275EB1F549</code> <code>AF1583CEE711C37666B2F41D01746266</code> <code>15D2476936D94B11D923BC12A8F27E38</code><br> <code>394A4C43</code></td>
|
||||
<td><code>FE0001008EE2D7D2170232D3497A4264</code> <code>B2913BAED126F682EA5AF3E2BC90A8AF</code> <code>48652C29A8EB9BC37BF9F5465C8861F0</code> <code>6BF241C7F7A9988DC07D1E33E670D2E3</code> <code>44FA7C7F4029CFA27135FC7884D319E7</code> <code>580EC4B271444D7A4B12B247B984161D</code> <code>6A46AC973FC02FC0A0E833A261023DA1</code> <code>1395B313D174428E891A7A174FE4CB5A</code> <code>694C64DDDE6FA7E520F09403513B4BB3</code> <code>B1CEBD6F487143307B87CAAAEFBF1436</code> <code>A52B9E35E3CE44056CA5DA49DC628478</code> <code>DF4EDA96DBA7159E004973FB1F706CE6</code> <code>5F0AE0DCDA00A22E50516D16CD64F7DB</code> <code>17AEE7A0BA7FA553327C8CC1DAC88149</code> <code>4DBD53AE610FB1ED544D039D052B7250</code> <code>67B246F4A2352B1A918A113A04CEE7C5</code><br> <code>D16FD2F9</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>7D4D9966</code> (1721322877 in decimal)</td>
|
||||
<td><code>B04D9966</code> (1721322928 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B597F2BF9D89B671737F899FBA14AD4F312E16F7C4E684CFA888C7B2FABD72616
|
|||
<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 = 667F6B8A44CC344BF2801435D3998D99149593EC47780EB620943CE898E204D41C5ADAAE889FE36478A27B5D49488DDEECB2765E444145B40E72BD091497298AC70BB2D32B95CF98F6818A5132EAC8E67DE5C2A14443C1BE90E70521A6742722694486E8E135266FED71D48C53343652FFFADD7136E3102CA727EF80C9D246C884AE749B95276ECE212CF6A90D01DF5C9C51C54E4D9C1FC2213CF9B656C3B5BE85F70564578B0F0A626BD859E5BDA49463A1BFB6C67DD8D2DF63E96CC3B7908D281692A05DF8C311A07C0735C69A5CB3DDE8E143BD1CA2416D0545B328500B7CFBFA2EC9176AAE07A2A6A152535EB8EA94E84BD18F80528B285EF6A4A80DB3D8</code></pre>
|
||||
<pre><code>b = 7D89404EF1BEB0A46904BDF7B07B533AC09D7D26339EDCC81DC5005EDD8D43DB31751D91BA51270266E5AFEA9B23E31E3C820D98F2C699BC60164A8B5D9E4D884CE5AEB8396029DD3753EC3EDE65C38BAFC0B8FAD22B6DFC6BFAF9F33B9B8F87E7EA993FBC32408AA96E286FB45D4394CEFE381435719E5F7128C3E55CED789641A1F7D2B3652C67EE0BFBA6F617B11AC18228AB056E87CACFD1B2ACC470A9F161677C781C1787F2950D271971CB47CC8C2FA9C86B01FFB65EA1505D7A8E95AFC48A6FE097E389AA181FF79F47C4516EF0F7DA3436B8FFBD9788B5C50602BD6FACA3AAFC35D597B40DBAD00ADF068C0E5F30C7BB39ED121CE6D32A783E1B430F</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 = 02372725774934BD5658CB8C072382F31AC554E44B66241F3E634C0C30CB4595E3BEEC7096EA25345B85DB86A79A9A07E000CBF4502A5A702E2F9D747C339CD451808B0B9B5AAEE02DBF7A2C54E95BC8E68FC9565197BF25A58A5C01980A753DFE1CE1A54BA7A18036974B13054A84E1A9DF403F6F79B18BF5CA8F74053D962F82CB6587A656C305BA857A4992210CA23366FB6F28E2A632209E7810907DE4E65DD3BA4C1570335C3524E4C35728E2C4891670B5C4E2D4DC75F8D4DA29B69CA9C119CF411E04E16A2A52DA64A3C2EEF6EAF496C00FEC62427F3C2B9360695A7F67B4CC362182BBBA69316BF17084448C41718E2BAC9DCA8F8379A35676745E98</code></pre>
|
||||
<pre><code>g_b = 969772FCE1BA2A936243E1150C0F3D6E9FC1FAB952F817F729C3E6825C1C85C1A70A2732DFA83FC7C3570965FE591BE60EA91678F3E67A46C04F77F692C0DCAFA125AF0E71FB6C276208472B9089B2F73979787BA9F789A213BBF63C90FD9E0EE5492BBE68476798DFBFA1AD5A30DD6739C24A333ECB8C22369F384416A533DC18D3FF5D1FD257950C0D384F9972E9BB48C64C9B224C672EC9D5991EE5E63FCA8BEBC2BEDCC853973CA3DCF663721FBB43EA33A1AFF8EBF02497252A2023024C98B68A90B9A2DF15911B53DF1AAABFB8DA7C79A5759A8BE9C6B18843F18A8D6A9A0C1AB4FB24A7862EA2D92F0B5A938D4FA37F6CD953D35F255815ED32015F9E</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 97 F2 BF 9D 89 B6 71 73 7F 89 9F BA
|
||||
0010 | 14 AD 4F 31 2E 16 F7 C4 E6 84 CF A8 88 C7 B2 FA
|
||||
0020 | BD 72 61 68 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 02 37 27 25 77 49 34 BD 56 58 CB 8C 07 23 82 F3
|
||||
0040 | 1A C5 54 E4 4B 66 24 1F 3E 63 4C 0C 30 CB 45 95
|
||||
0050 | E3 BE EC 70 96 EA 25 34 5B 85 DB 86 A7 9A 9A 07
|
||||
0060 | E0 00 CB F4 50 2A 5A 70 2E 2F 9D 74 7C 33 9C D4
|
||||
0070 | 51 80 8B 0B 9B 5A AE E0 2D BF 7A 2C 54 E9 5B C8
|
||||
0080 | E6 8F C9 56 51 97 BF 25 A5 8A 5C 01 98 0A 75 3D
|
||||
0090 | FE 1C E1 A5 4B A7 A1 80 36 97 4B 13 05 4A 84 E1
|
||||
00A0 | A9 DF 40 3F 6F 79 B1 8B F5 CA 8F 74 05 3D 96 2F
|
||||
00B0 | 82 CB 65 87 A6 56 C3 05 BA 85 7A 49 92 21 0C A2
|
||||
00C0 | 33 66 FB 6F 28 E2 A6 32 20 9E 78 10 90 7D E4 E6
|
||||
00D0 | 5D D3 BA 4C 15 70 33 5C 35 24 E4 C3 57 28 E2 C4
|
||||
00E0 | 89 16 70 B5 C4 E2 D4 DC 75 F8 D4 DA 29 B6 9C A9
|
||||
00F0 | C1 19 CF 41 1E 04 E1 6A 2A 52 DA 64 A3 C2 EE F6
|
||||
0100 | EA F4 96 C0 0F EC 62 42 7F 3C 2B 93 60 69 5A 7F
|
||||
0110 | 67 B4 CC 36 21 82 BB BA 69 31 6B F1 70 84 44 8C
|
||||
0120 | 41 71 8E 2B AC 9D CA 8F 83 79 A3 56 76 74 5E 98</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 A6 B2 F8 1F 8F DB 3D 17 33 82 A6 28
|
||||
0010 | 5E 43 3C 5E 57 23 72 FC D6 8B D9 7F 39 4B A8 98
|
||||
0020 | AB 19 56 DE 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 96 97 72 FC E1 BA 2A 93 62 43 E1 15 0C 0F 3D 6E
|
||||
0040 | 9F C1 FA B9 52 F8 17 F7 29 C3 E6 82 5C 1C 85 C1
|
||||
0050 | A7 0A 27 32 DF A8 3F C7 C3 57 09 65 FE 59 1B E6
|
||||
0060 | 0E A9 16 78 F3 E6 7A 46 C0 4F 77 F6 92 C0 DC AF
|
||||
0070 | A1 25 AF 0E 71 FB 6C 27 62 08 47 2B 90 89 B2 F7
|
||||
0080 | 39 79 78 7B A9 F7 89 A2 13 BB F6 3C 90 FD 9E 0E
|
||||
0090 | E5 49 2B BE 68 47 67 98 DF BF A1 AD 5A 30 DD 67
|
||||
00A0 | 39 C2 4A 33 3E CB 8C 22 36 9F 38 44 16 A5 33 DC
|
||||
00B0 | 18 D3 FF 5D 1F D2 57 95 0C 0D 38 4F 99 72 E9 BB
|
||||
00C0 | 48 C6 4C 9B 22 4C 67 2E C9 D5 99 1E E5 E6 3F CA
|
||||
00D0 | 8B EB C2 BE DC C8 53 97 3C A3 DC F6 63 72 1F BB
|
||||
00E0 | 43 EA 33 A1 AF F8 EB F0 24 97 25 2A 20 23 02 4C
|
||||
00F0 | 98 B6 8A 90 B9 A2 DF 15 91 1B 53 DF 1A AA BF B8
|
||||
0100 | DA 7C 79 A5 75 9A 8B E9 C6 B1 88 43 F1 8A 8D 6A
|
||||
0110 | 9A 0C 1A B4 FB 24 A7 86 2E A2 D9 2F 0B 5A 93 8D
|
||||
0120 | 4F A3 7F 6C D9 53 D3 5F 25 58 15 ED 32 01 5F 9E</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 = BA0D89B597F2BF9D89B671737F899FBA14AD4F312E16F7C4E684CFA888C7B2FABD72616
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>97F2BF9D89B671737F899FBA14AD4F31</code></td>
|
||||
<td><code>A6B2F81F8FDB3D173382A6285E433C5E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>2E16F7C4E684CFA888C7B2FABD726168</code></td>
|
||||
<td><code>572372FCD68BD97F394BA898AB1956DE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE00010002372725774934BD5658CB8C</code> <code>072382F31AC554E44B66241F3E634C0C</code> <code>30CB4595E3BEEC7096EA25345B85DB86</code> <code>A79A9A07E000CBF4502A5A702E2F9D74</code> <code>7C339CD451808B0B9B5AAEE02DBF7A2C</code> <code>54E95BC8E68FC9565197BF25A58A5C01</code> <code>980A753DFE1CE1A54BA7A18036974B13</code> <code>054A84E1A9DF403F6F79B18BF5CA8F74</code> <code>053D962F82CB6587A656C305BA857A49</code> <code>92210CA23366FB6F28E2A632209E7810</code> <code>907DE4E65DD3BA4C1570335C3524E4C3</code> <code>5728E2C4891670B5C4E2D4DC75F8D4DA</code> <code>29B69CA9C119CF411E04E16A2A52DA64</code> <code>A3C2EEF6EAF496C00FEC62427F3C2B93</code> <code>60695A7F67B4CC362182BBBA69316BF1</code> <code>7084448C41718E2BAC9DCA8F8379A356</code><br> <code>76745E98</code></td>
|
||||
<td><code>FE000100969772FCE1BA2A936243E115</code> <code>0C0F3D6E9FC1FAB952F817F729C3E682</code> <code>5C1C85C1A70A2732DFA83FC7C3570965</code> <code>FE591BE60EA91678F3E67A46C04F77F6</code> <code>92C0DCAFA125AF0E71FB6C276208472B</code> <code>9089B2F73979787BA9F789A213BBF63C</code> <code>90FD9E0EE5492BBE68476798DFBFA1AD</code> <code>5A30DD6739C24A333ECB8C22369F3844</code> <code>16A533DC18D3FF5D1FD257950C0D384F</code> <code>9972E9BB48C64C9B224C672EC9D5991E</code> <code>E5E63FCA8BEBC2BEDCC853973CA3DCF6</code> <code>63721FBB43EA33A1AFF8EBF02497252A</code> <code>2023024C98B68A90B9A2DF15911B53DF</code> <code>1AAABFB8DA7C79A5759A8BE9C6B18843</code> <code>F18A8D6A9A0C1AB4FB24A7862EA2D92F</code> <code>0B5A938D4FA37F6CD953D35F255815ED</code><br> <code>32015F9E</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 = BA0D89B597F2BF9D89B671737F899FBA14AD4F312E16F7C4E684CFA888C7B2FABD72616
|
|||
<!-- 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 = 54B6436697F2BF9D89B671737F899FBA14AD4F312E16F7C4E684CFA888C7B2FABD7261680000000000000000FE00010002372725774934BD5658CB8C072382F31AC554E44B66241F3E634C0C30CB4595E3BEEC7096EA25345B85DB86A79A9A07E000CBF4502A5A702E2F9D747C339CD451808B0B9B5AAEE02DBF7A2C54E95BC8E68FC9565197BF25A58A5C01980A753DFE1CE1A54BA7A18036974B13054A84E1A9DF403F6F79B18BF5CA8F74053D962F82CB6587A656C305BA857A4992210CA23366FB6F28E2A632209E7810907DE4E65DD3BA4C1570335C3524E4C35728E2C4891670B5C4E2D4DC75F8D4DA29B69CA9C119CF411E04E16A2A52DA64A3C2EEF6EAF496C00FEC62427F3C2B9360695A7F67B4CC362182BBBA69316BF17084448C41718E2BAC9DCA8F8379A35676745E98
|
||||
padding = B4E912B6D330FB401C13795F
|
||||
tmp_aes_key = ECB80E870717032F7CD29BBD7D1A4CFD284797E9A4986262B46A5AB4B9D19DD9
|
||||
tmp_aes_iv = BF221FC35073EEB56CC626DF73D8B4EE7FDE5E937AC3B992E3DB72FCF78E089A</code></pre>
|
||||
<pre><code>data = 54B64366A6B2F81F8FDB3D173382A6285E433C5E572372FCD68BD97F394BA898AB1956DE0000000000000000FE000100969772FCE1BA2A936243E1150C0F3D6E9FC1FAB952F817F729C3E6825C1C85C1A70A2732DFA83FC7C3570965FE591BE60EA91678F3E67A46C04F77F692C0DCAFA125AF0E71FB6C276208472B9089B2F73979787BA9F789A213BBF63C90FD9E0EE5492BBE68476798DFBFA1AD5A30DD6739C24A333ECB8C22369F384416A533DC18D3FF5D1FD257950C0D384F9972E9BB48C64C9B224C672EC9D5991EE5E63FCA8BEBC2BEDCC853973CA3DCF663721FBB43EA33A1AFF8EBF02497252A2023024C98B68A90B9A2DF15911B53DF1AAABFB8DA7C79A5759A8BE9C6B18843F18A8D6A9A0C1AB4FB24A7862EA2D92F0B5A938D4FA37F6CD953D35F255815ED32015F9E
|
||||
padding = F668B655E93835549635A919
|
||||
tmp_aes_key = D431055F7852B00BB641DE00717E3C33AD4CA820CAF6CB655007B603E0B12517
|
||||
tmp_aes_iv = E22CBE27AAAF912C4CF8D06BA75F482EA4C255AD3EE6D08278028B8C45665BFB</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 = 04D63A08E7B438BBC154EDBB6A5B3D40B5717B886E32AE8C8CF886325CD02CCDCB8566B4DBF1F24CCA8CBDCCEDFCAC34A42E93356A972E741354AEE77462108E7D5BF17F5F696F764A3A508882C2832E12B751BC16B35DE39DC24FE03D99E0257F356287D9BFBCCE02F4B3021C7FEB922832669CF1EF18B8D21442F0E6F927FFCD578BFAF1CBBDCC838E37C251EDD6F2353BF32D5D535EB1599DB97C648C5225F8B191704E6DA5A15E2BD658CF73092B8C47CCFD592B03ADC2B826EF7C7B142E302C48D5F700BD4284A99712F01B73BE0FA9845ADC61CF496D898D068D69E7445514F05FC12CE45750090885AF654CD9CE7766E3953BD5B653124A1767A51BF37A197D58EF186A5059CA89D5F2A047E03841F5D61007D43B813695F6A468C3D0550A1A84EB5D03774A65B7183DFE0F0AFA8E880D366E8D35B09A9BC8EE6953738CD36DFC9080DC7B7C045B71DE72116F</code></pre>
|
||||
<pre><code>encrypted_data = 2972F6F8B8F60A763B9B354CDAEE82840FD9EA2310156D74E43D07AD54C97B6690232A20FC71B26CECA538AB3EE460CC85F443BF2C87AC3E75D355751238D4A405F25F3954800CB91CB98B447608474F1423D9AE04E2BA52E5C8FCA0C7F80C82286C07EF88C8F778A6C120E0A97A9FCF8B4734C3F3BFE5A170300C1A402E68051B5293F72E1C731775A21CAE5C2C5217057A1E7AAF9FB7EBD02421992BB69BB24D03607DAEC57DF97284562BC88508C11F5228D4F09F16FAE729118FE51A9AB12B6271D46C4EDFC17CA51847DADB1EAD472C2EAD2281A844F8A655D25336E9042CD4396A3CF1AFC35B44D1DCB3C3EE53C2B9A14AD1A4B0FD309F41CDC4D3ECCC3BEE425C7D9F692DB8ACB0896506A870A947010FAEAE41FDE7EDC5774B733C4F1262A4A4665B27E139F85D6C24F6AC6A2E03B15B73880A5F9EAFE4E6547AAB60AFB18DA17EA838514FFB3B8C1EE647DB</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 48 8A 09 00 7D 4D 99 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 97 F2 BF 9D 89 B6 71 73
|
||||
0020 | 7F 89 9F BA 14 AD 4F 31 2E 16 F7 C4 E6 84 CF A8
|
||||
0030 | 88 C7 B2 FA BD 72 61 68 FE 50 01 00 04 D6 3A 08
|
||||
0040 | E7 B4 38 BB C1 54 ED BB 6A 5B 3D 40 B5 71 7B 88
|
||||
0050 | 6E 32 AE 8C 8C F8 86 32 5C D0 2C CD CB 85 66 B4
|
||||
0060 | DB F1 F2 4C CA 8C BD CC ED FC AC 34 A4 2E 93 35
|
||||
0070 | 6A 97 2E 74 13 54 AE E7 74 62 10 8E 7D 5B F1 7F
|
||||
0080 | 5F 69 6F 76 4A 3A 50 88 82 C2 83 2E 12 B7 51 BC
|
||||
0090 | 16 B3 5D E3 9D C2 4F E0 3D 99 E0 25 7F 35 62 87
|
||||
00A0 | D9 BF BC CE 02 F4 B3 02 1C 7F EB 92 28 32 66 9C
|
||||
00B0 | F1 EF 18 B8 D2 14 42 F0 E6 F9 27 FF CD 57 8B FA
|
||||
00C0 | F1 CB BD CC 83 8E 37 C2 51 ED D6 F2 35 3B F3 2D
|
||||
00D0 | 5D 53 5E B1 59 9D B9 7C 64 8C 52 25 F8 B1 91 70
|
||||
00E0 | 4E 6D A5 A1 5E 2B D6 58 CF 73 09 2B 8C 47 CC FD
|
||||
00F0 | 59 2B 03 AD C2 B8 26 EF 7C 7B 14 2E 30 2C 48 D5
|
||||
0100 | F7 00 BD 42 84 A9 97 12 F0 1B 73 BE 0F A9 84 5A
|
||||
0110 | DC 61 CF 49 6D 89 8D 06 8D 69 E7 44 55 14 F0 5F
|
||||
0120 | C1 2C E4 57 50 09 08 85 AF 65 4C D9 CE 77 66 E3
|
||||
0130 | 95 3B D5 B6 53 12 4A 17 67 A5 1B F3 7A 19 7D 58
|
||||
0140 | EF 18 6A 50 59 CA 89 D5 F2 A0 47 E0 38 41 F5 D6
|
||||
0150 | 10 07 D4 3B 81 36 95 F6 A4 68 C3 D0 55 0A 1A 84
|
||||
0160 | EB 5D 03 77 4A 65 B7 18 3D FE 0F 0A FA 8E 88 0D
|
||||
0170 | 36 6E 8D 35 B0 9A 9B C8 EE 69 53 73 8C D3 6D FC
|
||||
0180 | 90 80 DC 7B 7C 04 5B 71 DE 72 11 6F</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 24 C0 03 00 B0 4D 99 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 A6 B2 F8 1F 8F DB 3D 17
|
||||
0020 | 33 82 A6 28 5E 43 3C 5E 57 23 72 FC D6 8B D9 7F
|
||||
0030 | 39 4B A8 98 AB 19 56 DE FE 50 01 00 29 72 F6 F8
|
||||
0040 | B8 F6 0A 76 3B 9B 35 4C DA EE 82 84 0F D9 EA 23
|
||||
0050 | 10 15 6D 74 E4 3D 07 AD 54 C9 7B 66 90 23 2A 20
|
||||
0060 | FC 71 B2 6C EC A5 38 AB 3E E4 60 CC 85 F4 43 BF
|
||||
0070 | 2C 87 AC 3E 75 D3 55 75 12 38 D4 A4 05 F2 5F 39
|
||||
0080 | 54 80 0C B9 1C B9 8B 44 76 08 47 4F 14 23 D9 AE
|
||||
0090 | 04 E2 BA 52 E5 C8 FC A0 C7 F8 0C 82 28 6C 07 EF
|
||||
00A0 | 88 C8 F7 78 A6 C1 20 E0 A9 7A 9F CF 8B 47 34 C3
|
||||
00B0 | F3 BF E5 A1 70 30 0C 1A 40 2E 68 05 1B 52 93 F7
|
||||
00C0 | 2E 1C 73 17 75 A2 1C AE 5C 2C 52 17 05 7A 1E 7A
|
||||
00D0 | AF 9F B7 EB D0 24 21 99 2B B6 9B B2 4D 03 60 7D
|
||||
00E0 | AE C5 7D F9 72 84 56 2B C8 85 08 C1 1F 52 28 D4
|
||||
00F0 | F0 9F 16 FA E7 29 11 8F E5 1A 9A B1 2B 62 71 D4
|
||||
0100 | 6C 4E DF C1 7C A5 18 47 DA DB 1E AD 47 2C 2E AD
|
||||
0110 | 22 81 A8 44 F8 A6 55 D2 53 36 E9 04 2C D4 39 6A
|
||||
0120 | 3C F1 AF C3 5B 44 D1 DC B3 C3 EE 53 C2 B9 A1 4A
|
||||
0130 | D1 A4 B0 FD 30 9F 41 CD C4 D3 EC CC 3B EE 42 5C
|
||||
0140 | 7D 9F 69 2D B8 AC B0 89 65 06 A8 70 A9 47 01 0F
|
||||
0150 | AE AE 41 FD E7 ED C5 77 4B 73 3C 4F 12 62 A4 A4
|
||||
0160 | 66 5B 27 E1 39 F8 5D 6C 24 F6 AC 6A 2E 03 B1 5B
|
||||
0170 | 73 88 0A 5F 9E AF E4 E6 54 7A AB 60 AF B1 8D A1
|
||||
0180 | 7E A8 38 51 4F FB 3B 8C 1E E6 47 DB</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>488A09007D4D9966</code></td>
|
||||
<td><code>24C00300B04D9966</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>97F2BF9D89B671737F899FBA14AD4F31</code></td>
|
||||
<td><code>A6B2F81F8FDB3D173382A6285E433C5E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>2E16F7C4E684CFA888C7B2FABD726168</code></td>
|
||||
<td><code>572372FCD68BD97F394BA898AB1956DE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE50010004D63A08E7B438BBC154EDBB</code> <code>6A5B3D40B5717B886E32AE8C8CF88632</code> <code>5CD02CCDCB8566B4DBF1F24CCA8CBDCC</code> <code>EDFCAC34A42E93356A972E741354AEE7</code> <code>7462108E7D5BF17F5F696F764A3A5088</code> <code>82C2832E12B751BC16B35DE39DC24FE0</code> <code>3D99E0257F356287D9BFBCCE02F4B302</code> <code>1C7FEB922832669CF1EF18B8D21442F0</code> <code>E6F927FFCD578BFAF1CBBDCC838E37C2</code> <code>51EDD6F2353BF32D5D535EB1599DB97C</code> <code>648C5225F8B191704E6DA5A15E2BD658</code> <code>CF73092B8C47CCFD592B03ADC2B826EF</code> <code>7C7B142E302C48D5F700BD4284A99712</code> <code>F01B73BE0FA9845ADC61CF496D898D06</code> <code>8D69E7445514F05FC12CE45750090885</code> <code>AF654CD9CE7766E3953BD5B653124A17</code> <code>67A51BF37A197D58EF186A5059CA89D5</code> <code>F2A047E03841F5D61007D43B813695F6</code> <code>A468C3D0550A1A84EB5D03774A65B718</code> <code>3DFE0F0AFA8E880D366E8D35B09A9BC8</code> <code>EE6953738CD36DFC9080DC7B7C045B71</code><br> <code>DE72116F</code></td>
|
||||
<td><code>FE5001002972F6F8B8F60A763B9B354C</code> <code>DAEE82840FD9EA2310156D74E43D07AD</code> <code>54C97B6690232A20FC71B26CECA538AB</code> <code>3EE460CC85F443BF2C87AC3E75D35575</code> <code>1238D4A405F25F3954800CB91CB98B44</code> <code>7608474F1423D9AE04E2BA52E5C8FCA0</code> <code>C7F80C82286C07EF88C8F778A6C120E0</code> <code>A97A9FCF8B4734C3F3BFE5A170300C1A</code> <code>402E68051B5293F72E1C731775A21CAE</code> <code>5C2C5217057A1E7AAF9FB7EBD0242199</code> <code>2BB69BB24D03607DAEC57DF97284562B</code> <code>C88508C11F5228D4F09F16FAE729118F</code> <code>E51A9AB12B6271D46C4EDFC17CA51847</code> <code>DADB1EAD472C2EAD2281A844F8A655D2</code> <code>5336E9042CD4396A3CF1AFC35B44D1DC</code> <code>B3C3EE53C2B9A14AD1A4B0FD309F41CD</code> <code>C4D3ECCC3BEE425C7D9F692DB8ACB089</code> <code>6506A870A947010FAEAE41FDE7EDC577</code> <code>4B733C4F1262A4A4665B27E139F85D6C</code> <code>24F6AC6A2E03B15B73880A5F9EAFE4E6</code> <code>547AAB60AFB18DA17EA838514FFB3B8C</code><br> <code>1EE647DB</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 = 04BD9C00CB29B13ABBA826E2B9C3FCEC8EB727ADB5B8B0A03CB9817379B44B6F0B1B51C2DF4CBCAA7823C91D7371D40730E26AE80FA9FCB9AC372F3A24EB9FA18F38CAB717B961A6E3789FF7EBD65E9F5B7F59AD8A329D62A11C441943E50A5C77A35D27348B192153173AB39C47D9E3591F1EE1948E64CFFD5D67615818061FBD2232E41FC24B3529D034E6B683B112094D2D0BCE167D4E200A057C2A59A834C4C5805A46D17141692886BBBEE7C3EB91D5595425E2B5A1DA7C325210DB9EF3D5DDB610538804BCD1F674CBAA30E6B4241EA29EA0BF01470F4D0E49739EE22E49925AF18E88660326391686076D4F02AD7668D40310CDCB0BC49C31BA9209BA</code></pre>
|
||||
<pre><code>auth_key = 71724462E7CBA8F41C0D5B3CC0020CB3C6265109EE49272995FBBA174F30C6A94BA1EDEAA5120D706BC5299F808B4914A07D8D81209E7654B92097E4F168B0F96D432B7D7B919B1ED870A07221AB0C1F6C4A7CB3F9925C4EDC23673D9BD9FD6B3C3EC157CB54DACD7F04BE900FC2F1100EE5C131AC3377CFAE8166337915BF3AFDB7693DCE5E17B9FDAFEDD50F6127C47384379AB70CCF814442C5DCA6013813643EB191C08646BA3C94712E5AB0A615DE022CBBFD5508981ADA93B5FC30E619C96F6E80148B5736772EF97F513EC5D8AA40CB1BEDEA11AE3B130D5DD091717C32E73EA051210553C95215F6EC9A68578C5D9B8748BD2F75028659EBB773EDAF</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 E0 D4 C6 7D 4D 99 66
|
||||
0010 | AC 00 00 00 34 F7 CB 3B 97 F2 BF 9D 89 B6 71 73
|
||||
0020 | 7F 89 9F BA 14 AD 4F 31 2E 16 F7 C4 E6 84 CF A8
|
||||
0030 | 88 C7 B2 FA BD 72 61 68 B3 3A 17 55 AB 59 60 2B
|
||||
0040 | 4A CB 13 9F F5 73 AA 12</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 54 48 0A B1 4D 99 66
|
||||
0010 | 7C 00 00 00 34 F7 CB 3B A6 B2 F8 1F 8F DB 3D 17
|
||||
0020 | 33 82 A6 28 5E 43 3C 5E 57 23 72 FC D6 8B D9 7F
|
||||
0030 | 39 4B A8 98 AB 19 56 DE E1 34 34 5D C1 4B 2D A1
|
||||
0040 | 74 21 33 B5 3C 2A BE 8F</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>01E0D4C67D4D9966</code></td>
|
||||
<td><code>0154480AB14D9966</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>AC000000</code> (172 in decimal)</td>
|
||||
<td><code>7C000000</code> (124 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>97F2BF9D89B671737F899FBA14AD4F31</code></td>
|
||||
<td><code>A6B2F81F8FDB3D173382A6285E433C5E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>2E16F7C4E684CFA888C7B2FABD726168</code></td>
|
||||
<td><code>572372FCD68BD97F394BA898AB1956DE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>B33A1755AB59602B4ACB139FF573AA12</code></td>
|
||||
<td><code>E134345DC14B2DA1742133B53C2ABE8F</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>
|
||||
|
|
Loading…
Reference in a new issue