mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-05 18:38:19 +01:00
Update content of files
This commit is contained in:
parent
212b5cf744
commit
528474d9ce
6 changed files with 214 additions and 211 deletions
|
@ -45,6 +45,7 @@
|
|||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Telegram allows including animated and static custom emojis inside of messages.</p>
|
||||
<h3><a class="anchor" href="#custom-emoji-entities" id="custom-emoji-entities" name="custom-emoji-entities"><i class="anchor-icon"></i></a>Custom emoji entities</h3>
|
||||
<pre><code><a href='/constructor/messageEntityCustomEmoji'>messageEntityCustomEmoji</a>#c8cf05f8 offset:<a href='/type/int'>int</a> length:<a href='/type/int'>int</a> document_id:<a href='/type/long'>long</a> = <a href='/type/MessageEntity'>MessageEntity</a>;
|
||||
|
||||
<a href='/constructor/document'>document</a>#8fd4c4d8 flags:<a href='/type/%23'>#</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> size:<a href='/type/long'>long</a> thumbs:flags.0?<a href='/type/Vector%20t'>Vector</a><<a href='/type/PhotoSize'>PhotoSize</a>> video_thumbs:flags.1?<a href='/type/Vector%20t'>Vector</a><<a href='/type/VideoSize'>VideoSize</a>> dc_id:<a href='/type/int'>int</a> attributes:<a href='/type/Vector%20t'>Vector</a><<a href='/type/DocumentAttribute'>DocumentAttribute</a>> = <a href='/type/Document'>Document</a>;
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
<p>Use <a href="/method/messages.getAvailableEffects">messages.getAvailableEffects</a> to fetch the full list of message effects that may be used. </p>
|
||||
<p>Clients should re-invoke the method (re-using the <code>hash</code> returned from the previous method call) to check for updates in the effects list at most once an hour (or if a <a href="/constructor/message">message</a> with an unknown <code>effect</code> is received). </p>
|
||||
<p>Info about each effect is stored in the <a href="/constructor/availableEffect">availableEffect</a> constructor, identified by its <code>id</code> field: this ID should then be passed to the <code>effect</code> field of <a href="/method/messages.sendMessage">messages.sendMessage</a>, <a href="/method/messages.sendMedia">messages.sendMedia</a>, <a href="/method/messages.sendMultiMedia">messages.sendMultiMedia</a> to attach the effect to the <a href="/constructor/message">message</a>, in the <code>effect</code> field. </p>
|
||||
<p>All <code>long</code> IDs of <a href="/constructor/availableEffect">availableEffect</a> except for <code>id</code> are <a href="/constructor/document">document</a>.<code>id</code>s from the containing <a href="/constructor/messages.availableEffects">messages.availableEffects</a> constructor. </p>
|
||||
<p>Each effect has the following info, described by the fields of <a href="/constructor/availableEffect">availableEffect</a> as follows:</p>
|
||||
<ul>
|
||||
<li>Emoji: specified in <code>emoticon</code>, used to quickly search for effects. </li>
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<p>It should be played the first time the sticker scrolls into view; it should be played again if the chat is closed and then opened again. </p>
|
||||
<p>Premium stickers may only be <em>sent</em> by users with a <a href="/api/premium">Premium</a> subscription, and the animated effect should be played by all users, including those without a Premium subscription. </p>
|
||||
<p>A premium sticker is identified by the presence of a <a href="/constructor/videoSize">videoSize</a> of <code>type=f</code> in the sticker's main <a href="/constructor/document">document</a>.<br>
|
||||
The lottie file of the animated effect may be fetched by using <a href="/constructor/inputDocumentFileLocation">inputDocumentFileLocation</a> with <code>thumb_size=f</code>, as specified <a href="/api/files#downloading-files">here »</a>. </p>
|
||||
The TGS file of the animated effect (different from the TGS file of the sticker itself) may be fetched by using <a href="/constructor/inputDocumentFileLocation">inputDocumentFileLocation</a> with <code>thumb_size=f</code>, as specified <a href="/api/files#downloading-files">here »</a>. </p>
|
||||
<p>Note that <a href="/api/effects">animated message effects »</a> can also re-use the animated effect of a premium sticker. </p>
|
||||
<p>Also, premium animated stickers may be sent with an extra <a href="/api/effects">animated message effect »</a>, in which case both the effect of the sticker and the additional effect should be played simultaneously. </p>
|
||||
<h4><a class="anchor" href="#video-stickers" id="video-stickers" name="video-stickers"><i class="anchor-icon"></i></a>Video stickers</h4>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>availableEffect</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents a message effect ». All long IDs except for id are document.ids from the containing messages.availableEffects constructor.">
|
||||
<meta property="description" content="Represents a message effect ». All long IDs except for id are document.ids from the containing messages.availableEffects constructor. See here » for more info on how to use following fields.">
|
||||
<meta property="og:title" content="availableEffect">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents a message effect ». All long IDs except for id are document.ids from the containing messages.availableEffects constructor.">
|
||||
<meta property="og:description" content="Represents a message effect ». All long IDs except for id are document.ids from the containing messages.availableEffects constructor. See here » for more info on how to use following fields.">
|
||||
<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">
|
||||
|
@ -44,6 +44,7 @@
|
|||
|
||||
<div id="dev_page_content"><p>Represents a <a href="/api/effects">message effect »</a>.</p>
|
||||
<p>All <code>long</code> IDs except for <code>id</code> are <a href="/constructor/document">document</a>.<code>id</code>s from the containing <a href="/constructor/messages.availableEffects">messages.availableEffects</a> constructor.</p>
|
||||
<p>See <a href="/api/effects">here »</a> for more info on how to use following fields.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -90,7 +91,7 @@
|
|||
<tr>
|
||||
<td><strong>static_icon_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/long">long</a></td>
|
||||
<td>ID of the document containing the static icon (WEBP) of the effect. <br>Shown in the right bottom corner of the preview animation as a quick way for the user to classify effects.</td>
|
||||
<td>ID of the document containing the static icon (WEBP) of the effect.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>effect_sticker_id</strong></td>
|
||||
|
|
|
@ -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 8C 76 09 00 65 B5 92 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 0D F5 56 34 D0 15 BE D7
|
||||
0020 | 7B AD 5D CB 16 D3 AB BA</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 6C 1D 0C 00 33 B7 92 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 48 94 4F 38 A8 CC 74 0A
|
||||
0020 | EA 5E D9 B5 FE EE 63 DF</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>8C76090065B59266</code></td>
|
||||
<td><code>6C1D0C0033B79266</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>0DF55634D015BED77BAD5DCB16D3ABBA</code></td>
|
||||
<td><code>48944F38A8CC740AEA5ED9B5FEEE63DF</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 44 22 00 66 B5 92 66
|
||||
0010 | 6C 00 00 00 63 24 16 05 0D F5 56 34 D0 15 BE D7
|
||||
0020 | 7B AD 5D CB 16 D3 AB BA 28 AC 44 D1 B5 66 09 89
|
||||
0030 | 4E 08 DB 79 0A 60 23 0B 08 27 A1 90 98 14 2B 03
|
||||
0040 | 79 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 4C B5 CE 33 B7 92 66
|
||||
0010 | 58 00 00 00 63 24 16 05 48 94 4F 38 A8 CC 74 0A
|
||||
0020 | EA 5E D9 B5 FE EE 63 DF 2E D7 F8 E0 A2 C6 3D 14
|
||||
0030 | ED 13 DC CB 07 9A 9D 52 08 11 57 92 5F 70 19 5A
|
||||
0040 | 57 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>0144220066B59266</code></td>
|
||||
<td><code>014CB5CE33B79266</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>6C000000</code> (108 in decimal)</td>
|
||||
<td><code>58000000</code> (88 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>0DF55634D015BED77BAD5DCB16D3ABBA</code></td>
|
||||
<td><code>48944F38A8CC740AEA5ED9B5FEEE63DF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>28AC44D1B56609894E08DB790A60230B</code></td>
|
||||
<td><code>2ED7F8E0A2C63D14ED13DCCB079A9D52</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>0827A19098142B0379000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2855722621577397113</td>
|
||||
<td><code>081157925F70195A57000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1249628360218860119</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 = 2855722621577397113</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2855722621577397113 = 1676538949 * 1703344037</code></p>
|
||||
<pre><code>p = 1676538949
|
||||
q = 1703344037</code></pre>
|
||||
<pre><code>pq = 1249628360218860119</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1249628360218860119 = 1003235927 * 1245597697</code></p>
|
||||
<pre><code>p = 1003235927
|
||||
q = 1245597697</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 A1 90 98 14 2B 03 79 00 00 00
|
||||
0010 | 04 63 ED F4 45 00 00 00 04 65 86 F7 A5 00 00 00
|
||||
0020 | 0D F5 56 34 D0 15 BE D7 7B AD 5D CB 16 D3 AB BA
|
||||
0030 | 28 AC 44 D1 B5 66 09 89 4E 08 DB 79 0A 60 23 0B
|
||||
0040 | 7C CE 6C 10 57 1C 8B 3A 6A DE A9 F2 7C 43 20 D2
|
||||
0050 | 03 13 03 A9 B3 AF 3E C6 EE 17 41 B9 CD 2E 3A 63
|
||||
<pre><code>0000 | 95 5F F5 A9 08 11 57 92 5F 70 19 5A 57 00 00 00
|
||||
0010 | 04 3B CC 2A 57 00 00 00 04 4A 3E 50 01 00 00 00
|
||||
0020 | 48 94 4F 38 A8 CC 74 0A EA 5E D9 B5 FE EE 63 DF
|
||||
0030 | 2E D7 F8 E0 A2 C6 3D 14 ED 13 DC CB 07 9A 9D 52
|
||||
0040 | B8 C0 06 60 65 59 C9 68 46 DB 4C 1D B6 8E 2C 1A
|
||||
0050 | 82 27 7A CD 0F D7 41 79 FA 1D 1C BD 6D A3 8B CE
|
||||
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 = 1703344037</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>0827A19098142B0379000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2855722621577397113</td>
|
||||
<td><code>081157925F70195A57000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1249628360218860119</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>0463EDF445000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1676538949</td>
|
||||
<td><code>043BCC2A57000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1003235927</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>046586F7A5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1703344037</td>
|
||||
<td><code>044A3E5001000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1245597697</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>0DF55634D015BED77BAD5DCB16D3ABBA</code></td>
|
||||
<td><code>48944F38A8CC740AEA5ED9B5FEEE63DF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>28AC44D1B56609894E08DB790A60230B</code></td>
|
||||
<td><code>2ED7F8E0A2C63D14ED13DCCB079A9D52</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>7CCE6C10571C8B3A6ADEA9F27C4320D2</code> <code>031303A9B3AF3EC6EE1741B9CD2E3A63</code></td>
|
||||
<td><code>B8C006606559C96846DB4C1DB68E2C1A</code> <code>82277ACD0FD74179FA1D1CBD6DA38BCE</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1703344037</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 = 955FF5A90827A19098142B03790000000463EDF445000000046586F7A50000000DF55634D015BED77BAD5DCB16D3ABBA28AC44D1B56609894E08DB790A60230B7CCE6C10571C8B3A6ADEA9F27C4320D2031303A9B3AF3EC6EE1741B9CD2E3A6302000000
|
||||
random_padding_bytes = FAEEF667A5D1DC66AABF2BC22FBDFD47A564DA25A10AB703FC9B30D4218E7EDF97A9C600B718FEB73DC8353248BD1E4E1B5F7EC3319B456B5C8BCD67C3EE85858584AF5D557570B485B141C44EC78FBFFB7267E29C9E0A1A33B15925</code></pre>
|
||||
<pre><code>data = 955FF5A9081157925F70195A57000000043BCC2A57000000044A3E500100000048944F38A8CC740AEA5ED9B5FEEE63DF2ED7F8E0A2C63D14ED13DCCB079A9D52B8C006606559C96846DB4C1DB68E2C1A82277ACD0FD74179FA1D1CBD6DA38BCE02000000
|
||||
random_padding_bytes = A187B95462ECDC248C12FD0B5946AB3AE5FCC1B97981BBC1023A60AD42E62475FFD0334686CD46B2B5DE49C9A958285FD341DF9471DBD527C4A2DE1EBDBB06EE42542C3F959272CFA68517A7F3E91F55A988CE2D624793215CE73A3F</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 = 518D88BABCAB39A5F1B1C470135689C22A9DEABC66E800322E93E092A0C19B790573FC157C3D2A63E3C7C2F5B248B837C8CD2B27F11A7288F7C023B21218BA519ED271E7CBE5570B28887FEC00654A86E2A0B548127B2149F0BD06E5CB80D481D9E43F5B3CB22B638683356948854DE035FF820DF114D99A0754E80E73331DCD15076079BEE1F635AFD3CCEFA2B1D036D08A4E3350B2C458529EEB33DF48E486B8D7A673DDCD4C1FD9099D3FF6E8B5128CCBCA79DCD5899422FC66BCDD3E6AD4FD8227981ADC8AA1284E0327776E1E183F965ED5BB7A5F630BE9659C7F406085D8247AF0C6FDBFD4EE1601714C8E230A4E0AC2B7C44B0C2E57B69E09F4287200</code></pre>
|
||||
<pre><code>encrypted_data = 947802D2D1F7FBBE1DC176A4C9E1ECB82347C11FAB34749AFD6ECC53219F1562C7875D8DCBD75398B0FEDAD834596923F911A85D29C8E10A4041C0AB58CFCCADA6448521602AB15EDA11B339FC8DE8BE8512148DD78C88F2772702B3C11C60C92B6CB2A7F85B1C7729E8D1AD51548257B80750D24B7257F97AB25D80EF29B3965C267F8BFD20BA9B1577FE886A647CBA4EDFC36AE5D0D94DB8223C1ECFC3FEB0B189C1D089A9A56874B4D0554D783BA7DB7453AA67613E53C39CE63AB7EE0C3BF798524F0E014ABFE3AC91A715610B2E4AC4CD0A8DB7D8C8239223AB708A6DDAC58007619C2D28BA3A4C291E4AA0AE2057302D1A97516D0CDF32496A4DD54AF1</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 40 22 08 00 66 B5 92 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 0D F5 56 34 D0 15 BE D7
|
||||
0020 | 7B AD 5D CB 16 D3 AB BA 28 AC 44 D1 B5 66 09 89
|
||||
0030 | 4E 08 DB 79 0A 60 23 0B 04 63 ED F4 45 00 00 00
|
||||
0040 | 04 65 86 F7 A5 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 51 8D 88 BA BC AB 39 A5 F1 B1 C4 70
|
||||
0060 | 13 56 89 C2 2A 9D EA BC 66 E8 00 32 2E 93 E0 92
|
||||
0070 | A0 C1 9B 79 05 73 FC 15 7C 3D 2A 63 E3 C7 C2 F5
|
||||
0080 | B2 48 B8 37 C8 CD 2B 27 F1 1A 72 88 F7 C0 23 B2
|
||||
0090 | 12 18 BA 51 9E D2 71 E7 CB E5 57 0B 28 88 7F EC
|
||||
00A0 | 00 65 4A 86 E2 A0 B5 48 12 7B 21 49 F0 BD 06 E5
|
||||
00B0 | CB 80 D4 81 D9 E4 3F 5B 3C B2 2B 63 86 83 35 69
|
||||
00C0 | 48 85 4D E0 35 FF 82 0D F1 14 D9 9A 07 54 E8 0E
|
||||
00D0 | 73 33 1D CD 15 07 60 79 BE E1 F6 35 AF D3 CC EF
|
||||
00E0 | A2 B1 D0 36 D0 8A 4E 33 50 B2 C4 58 52 9E EB 33
|
||||
00F0 | DF 48 E4 86 B8 D7 A6 73 DD CD 4C 1F D9 09 9D 3F
|
||||
0100 | F6 E8 B5 12 8C CB CA 79 DC D5 89 94 22 FC 66 BC
|
||||
0110 | DD 3E 6A D4 FD 82 27 98 1A DC 8A A1 28 4E 03 27
|
||||
0120 | 77 6E 1E 18 3F 96 5E D5 BB 7A 5F 63 0B E9 65 9C
|
||||
0130 | 7F 40 60 85 D8 24 7A F0 C6 FD BF D4 EE 16 01 71
|
||||
0140 | 4C 8E 23 0A 4E 0A C2 B7 C4 4B 0C 2E 57 B6 9E 09
|
||||
0150 | F4 28 72 00</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 70 1D 0C 00 33 B7 92 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 48 94 4F 38 A8 CC 74 0A
|
||||
0020 | EA 5E D9 B5 FE EE 63 DF 2E D7 F8 E0 A2 C6 3D 14
|
||||
0030 | ED 13 DC CB 07 9A 9D 52 04 3B CC 2A 57 00 00 00
|
||||
0040 | 04 4A 3E 50 01 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 94 78 02 D2 D1 F7 FB BE 1D C1 76 A4
|
||||
0060 | C9 E1 EC B8 23 47 C1 1F AB 34 74 9A FD 6E CC 53
|
||||
0070 | 21 9F 15 62 C7 87 5D 8D CB D7 53 98 B0 FE DA D8
|
||||
0080 | 34 59 69 23 F9 11 A8 5D 29 C8 E1 0A 40 41 C0 AB
|
||||
0090 | 58 CF CC AD A6 44 85 21 60 2A B1 5E DA 11 B3 39
|
||||
00A0 | FC 8D E8 BE 85 12 14 8D D7 8C 88 F2 77 27 02 B3
|
||||
00B0 | C1 1C 60 C9 2B 6C B2 A7 F8 5B 1C 77 29 E8 D1 AD
|
||||
00C0 | 51 54 82 57 B8 07 50 D2 4B 72 57 F9 7A B2 5D 80
|
||||
00D0 | EF 29 B3 96 5C 26 7F 8B FD 20 BA 9B 15 77 FE 88
|
||||
00E0 | 6A 64 7C BA 4E DF C3 6A E5 D0 D9 4D B8 22 3C 1E
|
||||
00F0 | CF C3 FE B0 B1 89 C1 D0 89 A9 A5 68 74 B4 D0 55
|
||||
0100 | 4D 78 3B A7 DB 74 53 AA 67 61 3E 53 C3 9C E6 3A
|
||||
0110 | B7 EE 0C 3B F7 98 52 4F 0E 01 4A BF E3 AC 91 A7
|
||||
0120 | 15 61 0B 2E 4A C4 CD 0A 8D B7 D8 C8 23 92 23 AB
|
||||
0130 | 70 8A 6D DA C5 80 07 61 9C 2D 28 BA 3A 4C 29 1E
|
||||
0140 | 4A A0 AE 20 57 30 2D 1A 97 51 6D 0C DF 32 49 6A
|
||||
0150 | 4D D5 4A F1</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 = FAEEF667A5D1DC66AABF2BC22FBDFD47A564DA25A10AB703FC9B30D42
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>4022080066B59266</code></td>
|
||||
<td><code>701D0C0033B79266</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 = FAEEF667A5D1DC66AABF2BC22FBDFD47A564DA25A10AB703FC9B30D42
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>0DF55634D015BED77BAD5DCB16D3ABBA</code></td>
|
||||
<td><code>48944F38A8CC740AEA5ED9B5FEEE63DF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>28AC44D1B56609894E08DB790A60230B</code></td>
|
||||
<td><code>2ED7F8E0A2C63D14ED13DCCB079A9D52</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>0463EDF445000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1676538949</td>
|
||||
<td><code>043BCC2A57000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1003235927</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>046586F7A5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1703344037</td>
|
||||
<td><code>044A3E5001000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1245597697</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 = FAEEF667A5D1DC66AABF2BC22FBDFD47A564DA25A10AB703FC9B30D42
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE000100518D88BABCAB39A5F1B1C470</code> <code>135689C22A9DEABC66E800322E93E092</code> <code>A0C19B790573FC157C3D2A63E3C7C2F5</code> <code>B248B837C8CD2B27F11A7288F7C023B2</code> <code>1218BA519ED271E7CBE5570B28887FEC</code> <code>00654A86E2A0B548127B2149F0BD06E5</code> <code>CB80D481D9E43F5B3CB22B6386833569</code> <code>48854DE035FF820DF114D99A0754E80E</code> <code>73331DCD15076079BEE1F635AFD3CCEF</code> <code>A2B1D036D08A4E3350B2C458529EEB33</code> <code>DF48E486B8D7A673DDCD4C1FD9099D3F</code> <code>F6E8B5128CCBCA79DCD5899422FC66BC</code> <code>DD3E6AD4FD8227981ADC8AA1284E0327</code> <code>776E1E183F965ED5BB7A5F630BE9659C</code> <code>7F406085D8247AF0C6FDBFD4EE160171</code> <code>4C8E230A4E0AC2B7C44B0C2E57B69E09</code><br> <code>F4287200</code></td>
|
||||
<td><code>FE000100947802D2D1F7FBBE1DC176A4</code> <code>C9E1ECB82347C11FAB34749AFD6ECC53</code> <code>219F1562C7875D8DCBD75398B0FEDAD8</code> <code>34596923F911A85D29C8E10A4041C0AB</code> <code>58CFCCADA6448521602AB15EDA11B339</code> <code>FC8DE8BE8512148DD78C88F2772702B3</code> <code>C11C60C92B6CB2A7F85B1C7729E8D1AD</code> <code>51548257B80750D24B7257F97AB25D80</code> <code>EF29B3965C267F8BFD20BA9B1577FE88</code> <code>6A647CBA4EDFC36AE5D0D94DB8223C1E</code> <code>CFC3FEB0B189C1D089A9A56874B4D055</code> <code>4D783BA7DB7453AA67613E53C39CE63A</code> <code>B7EE0C3BF798524F0E014ABFE3AC91A7</code> <code>15610B2E4AC4CD0A8DB7D8C8239223AB</code> <code>708A6DDAC58007619C2D28BA3A4C291E</code> <code>4AA0AE2057302D1A97516D0CDF32496A</code><br> <code>4DD54AF1</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = FAEEF667A5D1DC66AABF2BC22FBDFD47A564DA25A10AB703FC9B30D42
|
|||
<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 8C 43 D2 66 B5 92 66
|
||||
0010 | DC 02 00 00 5C 07 E8 D0 0D F5 56 34 D0 15 BE D7
|
||||
0020 | 7B AD 5D CB 16 D3 AB BA 28 AC 44 D1 B5 66 09 89
|
||||
0030 | 4E 08 DB 79 0A 60 23 0B FE 50 02 00 3E C9 E9 0B
|
||||
0040 | 6B 4D 9F EC 16 27 B2 C5 E3 B3 E6 26 BC 1C 56 5A
|
||||
0050 | C4 7F 81 A0 E6 C6 24 E3 28 40 DF 3F D2 2E 2B F3
|
||||
0060 | D0 52 F0 36 A9 C2 14 B1 2D 32 0A 2B EF 7A CD B0
|
||||
0070 | 43 A9 70 2E E5 57 A5 5C D4 69 0A 2D 04 59 4E 55
|
||||
0080 | 3F 70 72 E1 6E FD A2 2C 09 17 D1 CF 7C CB E0 B3
|
||||
0090 | 80 1A 84 88 40 FE 50 0C 7B 17 FA 83 AF FF 5E 3C
|
||||
00A0 | B0 EB A4 5D DC B6 DF 0F 96 3B D6 F5 5D DA 4B 40
|
||||
00B0 | C5 A7 E1 AD 08 97 24 70 E2 05 34 FE 5F A9 D1 79
|
||||
00C0 | DF 0F D4 1F 2B 04 12 ED 8A 1A 9D D2 A1 2B C8 9C
|
||||
00D0 | 3F 72 01 CD 9A 75 E4 C3 A7 0F 6B 87 7E E9 58 EA
|
||||
00E0 | C1 DB 9C 4A 29 5A 7E CA 94 73 FE 65 C3 83 49 6E
|
||||
00F0 | 71 08 8E 3A CE 94 77 0B 13 C7 36 24 D5 F1 CF F9
|
||||
0100 | 05 63 65 DC 03 38 21 37 F3 1C 16 15 CB 8C 96 99
|
||||
0110 | 7F F3 24 63 18 32 6A 40 1C 60 E2 5D 64 43 00 2A
|
||||
0120 | 65 63 7F C9 BA 0C 18 8E D4 B8 E2 D5 A6 3A 30 0F
|
||||
0130 | E6 AC 11 8B F3 9C 1F CE 20 01 8D A5 B1 56 FB 11
|
||||
0140 | EE E0 5B 5C 00 0F D3 0B AF FA 23 19 97 EE F9 B2
|
||||
0150 | 02 41 50 92 08 5B 03 E4 AC 89 9B C6 6C 12 60 05
|
||||
0160 | C7 70 57 20 D3 E8 DF D2 59 D3 BA 4A 20 3F C7 39
|
||||
0170 | 47 27 5B E0 58 FF BA 15 5B E4 69 CF 2B 8B D9 B9
|
||||
0180 | F0 3F 02 8D 00 D2 5D CD 70 B5 18 E1 08 66 69 52
|
||||
0190 | 1E 88 23 55 54 6F 76 30 74 24 41 DE 58 50 C2 57
|
||||
01A0 | 24 40 AF D8 24 BC F5 6C F2 BB A1 9E 40 0E 5D 8E
|
||||
01B0 | 49 59 89 3B 12 76 84 41 75 3E BF 70 30 D1 C7 1D
|
||||
01C0 | A1 2C 1C 29 A3 DF B4 1C 30 77 0C 00 DF E7 28 C1
|
||||
01D0 | 93 4C 7B AF 5A 8C 70 2D 0E 62 E9 B5 58 44 A8 01
|
||||
01E0 | B9 B7 0C C6 AC 9B BB 43 B4 92 B2 B4 A7 21 30 29
|
||||
01F0 | 4F 56 A4 C5 84 30 6B 3B F0 18 D5 FB F6 75 1C 42
|
||||
0200 | 25 12 E7 F6 E2 A7 44 42 01 23 B2 28 A5 BE 36 4C
|
||||
0210 | 9D AF 49 A6 EF 33 47 59 A4 3D 17 8A 0A 28 C1 09
|
||||
0220 | 2D 5C F3 B3 B7 FE A0 57 B9 7A 2E A0 61 4F E3 0D
|
||||
0230 | 11 EC 93 FA 8A 27 EF 91 DB 39 92 13 63 8D CB 2A
|
||||
0240 | 72 3B F8 77 C0 80 8B ED 6B D3 B0 66 D8 56 44 93
|
||||
0250 | 2C 35 96 86 A0 70 A8 95 3A C6 13 BF C4 D3 9E 98
|
||||
0260 | 22 C5 37 89 31 AA 89 BE 94 57 27 D1 54 5F FE C8
|
||||
0270 | A0 C9 14 D6 4B FC F0 1C ED 58 EA 2E DE 08 2F 1C
|
||||
0280 | 75 CA E0 54 34 C1 D1 66 D5 06 F1 98</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 A0 F6 7E 34 B7 92 66
|
||||
0010 | 98 02 00 00 5C 07 E8 D0 48 94 4F 38 A8 CC 74 0A
|
||||
0020 | EA 5E D9 B5 FE EE 63 DF 2E D7 F8 E0 A2 C6 3D 14
|
||||
0030 | ED 13 DC CB 07 9A 9D 52 FE 50 02 00 50 64 1F 9D
|
||||
0040 | 2F BC E6 8F 93 E4 C8 EA 07 AD 42 EB 3E DB 1C 61
|
||||
0050 | 1A 39 E5 06 0A 35 CA F7 C7 89 70 8B 69 FD FC C3
|
||||
0060 | 10 43 E8 52 08 9A E9 FC 2D 18 2B D7 01 ED AF 93
|
||||
0070 | 4F 5E 35 E8 6F 14 11 CF 43 40 C2 37 7F CE FF FD
|
||||
0080 | 68 50 7A 08 FD 96 7E D9 77 09 AA 57 44 46 9C B8
|
||||
0090 | 29 4C B1 D8 10 B0 37 9C 26 FB 97 4E 09 93 1A 75
|
||||
00A0 | 53 55 D1 37 66 38 36 30 C5 4A 6D 96 0C 09 62 99
|
||||
00B0 | B1 F5 A9 14 FE 17 3A 46 8D 5F 3B FF 96 47 29 7D
|
||||
00C0 | 62 E2 17 0E 0F 8C A4 47 87 2D 27 9A 5C D2 01 2B
|
||||
00D0 | 5B 82 B3 A5 DC 70 EB 22 F4 C2 E9 A7 3E 71 C0 B9
|
||||
00E0 | B2 31 78 8D 6D 4B DD CC 14 45 8F 89 A4 88 F1 83
|
||||
00F0 | 1D C3 C9 B9 31 AD 65 86 9A 86 97 73 5A 6E 54 B1
|
||||
0100 | 82 7F 81 CE 56 C5 36 DA 01 88 BF 84 EE A4 AC A4
|
||||
0110 | 99 7B A3 13 FA 3C CA 1C E9 2A 26 4F B8 36 F8 8A
|
||||
0120 | B1 00 AA 2B 7F 15 C9 8A 36 30 98 49 A5 86 CA 0E
|
||||
0130 | 3A AB 66 D7 4E 7B 4F C1 11 64 31 9B 88 3B EA 6E
|
||||
0140 | 94 1C DF 0D 59 E7 DF 8E CF 97 E5 A4 4E B8 1F F6
|
||||
0150 | FE 5F CB DA 05 14 BF 81 F6 64 80 91 47 8B F9 E5
|
||||
0160 | 76 2D 63 B3 DB 6B 5B 0A E6 DF 37 3F 61 9B 16 C1
|
||||
0170 | 10 F4 92 6E AE 32 6B 54 57 E1 0D 1E B9 D4 EE 12
|
||||
0180 | 0D 2F 14 DC 22 FF 01 8F A7 09 A5 79 09 8F 4D 4C
|
||||
0190 | B6 15 26 00 5E 14 63 B2 C7 4E B3 E3 D1 FC FC A4
|
||||
01A0 | 20 39 21 05 86 38 4D 76 32 EF D9 7C E4 3C 90 87
|
||||
01B0 | DC 32 B5 6D 6F 2E 14 B3 FB DD B2 FE CF 01 AD 37
|
||||
01C0 | B6 D9 45 85 D9 77 BA 56 8B 96 C5 17 86 7C DB 31
|
||||
01D0 | CB 5C 24 AF 84 1D 00 79 FE 93 3E BC 03 50 4D 82
|
||||
01E0 | 49 1D 6B 24 AF 66 B1 BD 8C 90 E3 59 53 AE 39 2B
|
||||
01F0 | 99 CE 8A 2C 29 3E CD 3B 20 00 45 1C 68 9C DC 60
|
||||
0200 | 27 53 B8 80 DD 42 85 E9 73 FF C4 29 29 E1 02 9A
|
||||
0210 | F1 45 70 34 3E 33 1F C0 90 09 B6 E2 9D 33 33 59
|
||||
0220 | 0F 88 14 52 E0 ED C6 F3 9C E4 E3 0D 62 81 85 F3
|
||||
0230 | 22 DD D0 33 F7 E4 2F 59 15 F2 67 1B 87 EB 6E C1
|
||||
0240 | 1A D6 1A F8 2B F3 9F CD 36 C7 52 A6 82 64 3D 0A
|
||||
0250 | A6 04 83 AA 9F DD 5E F6 EF E4 A5 47 D5 5B 45 C5
|
||||
0260 | 45 B1 39 6C 58 93 A5 CC B8 B2 0D 80 72 31 BE 72
|
||||
0270 | 76 1A 07 33 E5 9A 7A 51 A3 3A 44 28 64 0A 06 24
|
||||
0280 | E2 BB BC 54 0E 73 28 9D 52 C3 70 30</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 = FAEEF667A5D1DC66AABF2BC22FBDFD47A564DA25A10AB703FC9B30D42
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>018C43D266B59266</code></td>
|
||||
<td><code>01A0F67E34B79266</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>DC020000</code> (732 in decimal)</td>
|
||||
<td><code>98020000</code> (664 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = FAEEF667A5D1DC66AABF2BC22FBDFD47A564DA25A10AB703FC9B30D42
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>0DF55634D015BED77BAD5DCB16D3ABBA</code></td>
|
||||
<td><code>48944F38A8CC740AEA5ED9B5FEEE63DF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>28AC44D1B56609894E08DB790A60230B</code></td>
|
||||
<td><code>2ED7F8E0A2C63D14ED13DCCB079A9D52</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE5002003EC9E90B6B4D9FEC1627B2C5</code> <code>E3B3E626BC1C565AC47F81A0E6C624E3</code> <code>2840DF3FD22E2BF3D052F036A9C214B1</code> <code>2D320A2BEF7ACDB043A9702EE557A55C</code> <code>D4690A2D04594E553F7072E16EFDA22C</code> <code>0917D1CF7CCBE0B3801A848840FE500C</code> <code>7B17FA83AFFF5E3CB0EBA45DDCB6DF0F</code> <code>963BD6F55DDA4B40C5A7E1AD08972470</code> <code>E20534FE5FA9D179DF0FD41F2B0412ED</code> <code>8A1A9DD2A12BC89C3F7201CD9A75E4C3</code> <code>A70F6B877EE958EAC1DB9C4A295A7ECA</code> <code>9473FE65C383496E71088E3ACE94770B</code> <code>13C73624D5F1CFF9056365DC03382137</code> <code>F31C1615CB8C96997FF3246318326A40</code> <code>1C60E25D6443002A65637FC9BA0C188E</code> <code>D4B8E2D5A63A300FE6AC118BF39C1FCE</code> <code>20018DA5B156FB11EEE05B5C000FD30B</code> <code>AFFA231997EEF9B202415092085B03E4</code> <code>AC899BC66C126005C7705720D3E8DFD2</code> <code>59D3BA4A203FC73947275BE058FFBA15</code> <code>5BE469CF2B8BD9B9F03F028D00D25DCD</code> <code>70B518E1086669521E882355546F7630</code> <code>742441DE5850C2572440AFD824BCF56C</code> <code>F2BBA19E400E5D8E4959893B12768441</code> <code>753EBF7030D1C71DA12C1C29A3DFB41C</code> <code>30770C00DFE728C1934C7BAF5A8C702D</code> <code>0E62E9B55844A801B9B70CC6AC9BBB43</code> <code>B492B2B4A72130294F56A4C584306B3B</code> <code>F018D5FBF6751C422512E7F6E2A74442</code> <code>0123B228A5BE364C9DAF49A6EF334759</code> <code>A43D178A0A28C1092D5CF3B3B7FEA057</code> <code>B97A2EA0614FE30D11EC93FA8A27EF91</code> <code>DB399213638DCB2A723BF877C0808BED</code> <code>6BD3B066D85644932C359686A070A895</code> <code>3AC613BFC4D39E9822C5378931AA89BE</code> <code>945727D1545FFEC8A0C914D64BFCF01C</code> <code>ED58EA2EDE082F1C75CAE05434C1D166</code><br> <code>D506F198</code></td>
|
||||
<td><code>FE50020050641F9D2FBCE68F93E4C8EA</code> <code>07AD42EB3EDB1C611A39E5060A35CAF7</code> <code>C789708B69FDFCC31043E852089AE9FC</code> <code>2D182BD701EDAF934F5E35E86F1411CF</code> <code>4340C2377FCEFFFD68507A08FD967ED9</code> <code>7709AA5744469CB8294CB1D810B0379C</code> <code>26FB974E09931A755355D13766383630</code> <code>C54A6D960C096299B1F5A914FE173A46</code> <code>8D5F3BFF9647297D62E2170E0F8CA447</code> <code>872D279A5CD2012B5B82B3A5DC70EB22</code> <code>F4C2E9A73E71C0B9B231788D6D4BDDCC</code> <code>14458F89A488F1831DC3C9B931AD6586</code> <code>9A8697735A6E54B1827F81CE56C536DA</code> <code>0188BF84EEA4ACA4997BA313FA3CCA1C</code> <code>E92A264FB836F88AB100AA2B7F15C98A</code> <code>36309849A586CA0E3AAB66D74E7B4FC1</code> <code>1164319B883BEA6E941CDF0D59E7DF8E</code> <code>CF97E5A44EB81FF6FE5FCBDA0514BF81</code> <code>F6648091478BF9E5762D63B3DB6B5B0A</code> <code>E6DF373F619B16C110F4926EAE326B54</code> <code>57E10D1EB9D4EE120D2F14DC22FF018F</code> <code>A709A579098F4D4CB61526005E1463B2</code> <code>C74EB3E3D1FCFCA42039210586384D76</code> <code>32EFD97CE43C9087DC32B56D6F2E14B3</code> <code>FBDDB2FECF01AD37B6D94585D977BA56</code> <code>8B96C517867CDB31CB5C24AF841D0079</code> <code>FE933EBC03504D82491D6B24AF66B1BD</code> <code>8C90E35953AE392B99CE8A2C293ECD3B</code> <code>2000451C689CDC602753B880DD4285E9</code> <code>73FFC42929E1029AF14570343E331FC0</code> <code>9009B6E29D3333590F881452E0EDC6F3</code> <code>9CE4E30D628185F322DDD033F7E42F59</code> <code>15F2671B87EB6EC11AD61AF82BF39FCD</code> <code>36C752A682643D0AA60483AA9FDD5EF6</code> <code>EFE4A547D55B45C545B1396C5893A5CC</code> <code>B8B20D807231BE72761A0733E59A7A51</code> <code>A33A4428640A0624E2BBBC540E73289D</code><br> <code>52C37030</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = FAEEF667A5D1DC66AABF2BC22FBDFD47A564DA25A10AB703FC9B30D42
|
|||
<!-- 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 = 3EC9E90B6B4D9FEC1627B2C5E3B3E626BC1C565AC47F81A0E6C624E32840DF3FD22E2BF3D052F036A9C214B12D320A2BEF7ACDB043A9702EE557A55CD4690A2D04594E553F7072E16EFDA22C0917D1CF7CCBE0B3801A848840FE500C7B17FA83AFFF5E3CB0EBA45DDCB6DF0F963BD6F55DDA4B40C5A7E1AD08972470E20534FE5FA9D179DF0FD41F2B0412ED8A1A9DD2A12BC89C3F7201CD9A75E4C3A70F6B877EE958EAC1DB9C4A295A7ECA9473FE65C383496E71088E3ACE94770B13C73624D5F1CFF9056365DC03382137F31C1615CB8C96997FF3246318326A401C60E25D6443002A65637FC9BA0C188ED4B8E2D5A63A300FE6AC118BF39C1FCE20018DA5B156FB11EEE05B5C000FD30BAFFA231997EEF9B202415092085B03E4AC899BC66C126005C7705720D3E8DFD259D3BA4A203FC73947275BE058FFBA155BE469CF2B8BD9B9F03F028D00D25DCD70B518E1086669521E882355546F7630742441DE5850C2572440AFD824BCF56CF2BBA19E400E5D8E4959893B12768441753EBF7030D1C71DA12C1C29A3DFB41C30770C00DFE728C1934C7BAF5A8C702D0E62E9B55844A801B9B70CC6AC9BBB43B492B2B4A72130294F56A4C584306B3BF018D5FBF6751C422512E7F6E2A744420123B228A5BE364C9DAF49A6EF334759A43D178A0A28C1092D5CF3B3B7FEA057B97A2EA0614FE30D11EC93FA8A27EF91DB399213638DCB2A723BF877C0808BED6BD3B066D85644932C359686A070A8953AC613BFC4D39E9822C5378931AA89BE945727D1545FFEC8A0C914D64BFCF01CED58EA2EDE082F1C75CAE05434C1D166D506F198
|
||||
tmp_aes_key = E154AA8A1DBEDF05F4ACA24419D69DB951D847893A94587963D417EC8246DCA6
|
||||
tmp_aes_iv = 9045432B6D986C1F1845D8237206542E1D8F89B0D4C1645BC577B96A7CCE6C10</code></pre>
|
||||
<pre><code>encrypted_answer = 50641F9D2FBCE68F93E4C8EA07AD42EB3EDB1C611A39E5060A35CAF7C789708B69FDFCC31043E852089AE9FC2D182BD701EDAF934F5E35E86F1411CF4340C2377FCEFFFD68507A08FD967ED97709AA5744469CB8294CB1D810B0379C26FB974E09931A755355D13766383630C54A6D960C096299B1F5A914FE173A468D5F3BFF9647297D62E2170E0F8CA447872D279A5CD2012B5B82B3A5DC70EB22F4C2E9A73E71C0B9B231788D6D4BDDCC14458F89A488F1831DC3C9B931AD65869A8697735A6E54B1827F81CE56C536DA0188BF84EEA4ACA4997BA313FA3CCA1CE92A264FB836F88AB100AA2B7F15C98A36309849A586CA0E3AAB66D74E7B4FC11164319B883BEA6E941CDF0D59E7DF8ECF97E5A44EB81FF6FE5FCBDA0514BF81F6648091478BF9E5762D63B3DB6B5B0AE6DF373F619B16C110F4926EAE326B5457E10D1EB9D4EE120D2F14DC22FF018FA709A579098F4D4CB61526005E1463B2C74EB3E3D1FCFCA42039210586384D7632EFD97CE43C9087DC32B56D6F2E14B3FBDDB2FECF01AD37B6D94585D977BA568B96C517867CDB31CB5C24AF841D0079FE933EBC03504D82491D6B24AF66B1BD8C90E35953AE392B99CE8A2C293ECD3B2000451C689CDC602753B880DD4285E973FFC42929E1029AF14570343E331FC09009B6E29D3333590F881452E0EDC6F39CE4E30D628185F322DDD033F7E42F5915F2671B87EB6EC11AD61AF82BF39FCD36C752A682643D0AA60483AA9FDD5EF6EFE4A547D55B45C545B1396C5893A5CCB8B20D807231BE72761A0733E59A7A51A33A4428640A0624E2BBBC540E73289D52C37030
|
||||
tmp_aes_key = A5E7AEE690B167CBD0589EF1B4CE787E419A77BF2274F5AA04236744FE17426B
|
||||
tmp_aes_iv = 7828906EA860A7DE71FF938BBF2DDEF3AE3A6EA9652657ECC37AEA1BB8C00660</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = 7436663F53A8FD1049B69B29B7D6A73C6FA22E69BA0D89B50DF55634D015BED77BAD5DCB16D3ABBA28AC44D1B56609894E08DB790A60230B03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010059C7340E73A4F8199AC7777457858177AF9D83F22DDCB849F3D5565AA550C6D481A6EB706A172243BBE5E4AD38B98778B853C18158C1F0DD487D17371B99B1B467874A0BB339D3FA0FC72280C86AF7EA3F6E4C9700C9AC8963A227B15B5918AD260E9198216305FEF1E3894E433B6472C526E089AD84671C45F7A140E824F70E6CD70154EECE9DC8EC5A4739537930A54BE7514B343FB7D96A842B11DB524F991E71081FD945068C058562A78A4B7828FBB44BEC541C7D1C1F63EE6CC079E8E6BFB0A4FD661EBB88BDF8E9EF009326C7ECBCBD28436BA51CFE3F81FBCBACE3D6E549D4E857C6BBFDBDAA93EC758D61228070828D07934B5305822450D70912FF66B5926685EE6516EEDF69E2
|
||||
answer = BA0D89B50DF55634D015BED77BAD5DCB16D3ABBA28AC44D1B56609894E08DB790A60230B03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010059C7340E73A4F8199AC7777457858177AF9D83F22DDCB849F3D5565AA550C6D481A6EB706A172243BBE5E4AD38B98778B853C18158C1F0DD487D17371B99B1B467874A0BB339D3FA0FC72280C86AF7EA3F6E4C9700C9AC8963A227B15B5918AD260E9198216305FEF1E3894E433B6472C526E089AD84671C45F7A140E824F70E6CD70154EECE9DC8EC5A4739537930A54BE7514B343FB7D96A842B11DB524F991E71081FD945068C058562A78A4B7828FBB44BEC541C7D1C1F63EE6CC079E8E6BFB0A4FD661EBB88BDF8E9EF009326C7ECBCBD28436BA51CFE3F81FBCBACE3D6E549D4E857C6BBFDBDAA93EC758D61228070828D07934B5305822450D70912FF66B5926685EE6516EEDF69E2</code></pre>
|
||||
<pre><code>answer_with_hash = 699222A0D5732CE66169A90669A6F1AC5882BD25BA0D89B548944F38A8CC740AEA5ED9B5FEEE63DF2ED7F8E0A2C63D14ED13DCCB079A9D5203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001009816BAA5752B2921F7817155E1D9247232F913D748BF958957AF3A74C549E0D5322C4FE5F0B0F1DFD47B36BAA2777948F0218A2EC85F19F90332781436D57F2A1DDFBCBFB8FADB83082E7FD6D22338542563079AA109BEF2664026B7CFDF6A148554743FC92795C06E9498EF30EEFF12CE86B5C989DA61A59587992D653E0B29BBECA39460202882023AE263140C0C395DB2906EDD04D95350414D3089E734A1BECDBF7E5FCC96D5E0B464C8A9C769ED35E0D07BD5AB6648CF388B517584B45D5BE6BCA10094785563CCD26F27926E48AA4BB5ABDBBD0534767405D5F280170F10F3C33181254BD110578F6B443557D9BD07D89108B136D46880112906A8DB3034B79266901F3B2787731321
|
||||
answer = BA0D89B548944F38A8CC740AEA5ED9B5FEEE63DF2ED7F8E0A2C63D14ED13DCCB079A9D5203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001009816BAA5752B2921F7817155E1D9247232F913D748BF958957AF3A74C549E0D5322C4FE5F0B0F1DFD47B36BAA2777948F0218A2EC85F19F90332781436D57F2A1DDFBCBFB8FADB83082E7FD6D22338542563079AA109BEF2664026B7CFDF6A148554743FC92795C06E9498EF30EEFF12CE86B5C989DA61A59587992D653E0B29BBECA39460202882023AE263140C0C395DB2906EDD04D95350414D3089E734A1BECDBF7E5FCC96D5E0B464C8A9C769ED35E0D07BD5AB6648CF388B517584B45D5BE6BCA10094785563CCD26F27926E48AA4BB5ABDBBD0534767405D5F280170F10F3C33181254BD110578F6B443557D9BD07D89108B136D46880112906A8DB3034B79266901F3B2787731321</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 0D F5 56 34 D0 15 BE D7 7B AD 5D CB
|
||||
0010 | 16 D3 AB BA 28 AC 44 D1 B5 66 09 89 4E 08 DB 79
|
||||
0020 | 0A 60 23 0B 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 48 94 4F 38 A8 CC 74 0A EA 5E D9 B5
|
||||
0010 | FE EE 63 DF 2E D7 F8 E0 A2 C6 3D 14 ED 13 DC CB
|
||||
0020 | 07 9A 9D 52 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 = BA0D89B50DF55634D015BED77BAD5DCB16D3ABBA28AC44D1B56609894E08DB790A60230
|
|||
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 | 59 C7 34 0E 73 A4 F8 19 9A C7 77 74 57 85 81 77
|
||||
0140 | AF 9D 83 F2 2D DC B8 49 F3 D5 56 5A A5 50 C6 D4
|
||||
0150 | 81 A6 EB 70 6A 17 22 43 BB E5 E4 AD 38 B9 87 78
|
||||
0160 | B8 53 C1 81 58 C1 F0 DD 48 7D 17 37 1B 99 B1 B4
|
||||
0170 | 67 87 4A 0B B3 39 D3 FA 0F C7 22 80 C8 6A F7 EA
|
||||
0180 | 3F 6E 4C 97 00 C9 AC 89 63 A2 27 B1 5B 59 18 AD
|
||||
0190 | 26 0E 91 98 21 63 05 FE F1 E3 89 4E 43 3B 64 72
|
||||
01A0 | C5 26 E0 89 AD 84 67 1C 45 F7 A1 40 E8 24 F7 0E
|
||||
01B0 | 6C D7 01 54 EE CE 9D C8 EC 5A 47 39 53 79 30 A5
|
||||
01C0 | 4B E7 51 4B 34 3F B7 D9 6A 84 2B 11 DB 52 4F 99
|
||||
01D0 | 1E 71 08 1F D9 45 06 8C 05 85 62 A7 8A 4B 78 28
|
||||
01E0 | FB B4 4B EC 54 1C 7D 1C 1F 63 EE 6C C0 79 E8 E6
|
||||
01F0 | BF B0 A4 FD 66 1E BB 88 BD F8 E9 EF 00 93 26 C7
|
||||
0200 | EC BC BD 28 43 6B A5 1C FE 3F 81 FB CB AC E3 D6
|
||||
0210 | E5 49 D4 E8 57 C6 BB FD BD AA 93 EC 75 8D 61 22
|
||||
0220 | 80 70 82 8D 07 93 4B 53 05 82 24 50 D7 09 12 FF
|
||||
0230 | 66 B5 92 66</code></pre>
|
||||
0130 | 98 16 BA A5 75 2B 29 21 F7 81 71 55 E1 D9 24 72
|
||||
0140 | 32 F9 13 D7 48 BF 95 89 57 AF 3A 74 C5 49 E0 D5
|
||||
0150 | 32 2C 4F E5 F0 B0 F1 DF D4 7B 36 BA A2 77 79 48
|
||||
0160 | F0 21 8A 2E C8 5F 19 F9 03 32 78 14 36 D5 7F 2A
|
||||
0170 | 1D DF BC BF B8 FA DB 83 08 2E 7F D6 D2 23 38 54
|
||||
0180 | 25 63 07 9A A1 09 BE F2 66 40 26 B7 CF DF 6A 14
|
||||
0190 | 85 54 74 3F C9 27 95 C0 6E 94 98 EF 30 EE FF 12
|
||||
01A0 | CE 86 B5 C9 89 DA 61 A5 95 87 99 2D 65 3E 0B 29
|
||||
01B0 | BB EC A3 94 60 20 28 82 02 3A E2 63 14 0C 0C 39
|
||||
01C0 | 5D B2 90 6E DD 04 D9 53 50 41 4D 30 89 E7 34 A1
|
||||
01D0 | BE CD BF 7E 5F CC 96 D5 E0 B4 64 C8 A9 C7 69 ED
|
||||
01E0 | 35 E0 D0 7B D5 AB 66 48 CF 38 8B 51 75 84 B4 5D
|
||||
01F0 | 5B E6 BC A1 00 94 78 55 63 CC D2 6F 27 92 6E 48
|
||||
0200 | AA 4B B5 AB DB BD 05 34 76 74 05 D5 F2 80 17 0F
|
||||
0210 | 10 F3 C3 31 81 25 4B D1 10 57 8F 6B 44 35 57 D9
|
||||
0220 | BD 07 D8 91 08 B1 36 D4 68 80 11 29 06 A8 DB 30
|
||||
0230 | 34 B7 92 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 = BA0D89B50DF55634D015BED77BAD5DCB16D3ABBA28AC44D1B56609894E08DB790A60230
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>0DF55634D015BED77BAD5DCB16D3ABBA</code></td>
|
||||
<td><code>48944F38A8CC740AEA5ED9B5FEEE63DF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>28AC44D1B56609894E08DB790A60230B</code></td>
|
||||
<td><code>2ED7F8E0A2C63D14ED13DCCB079A9D52</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B50DF55634D015BED77BAD5DCB16D3ABBA28AC44D1B56609894E08DB790A60230
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE00010059C7340E73A4F8199AC77774</code> <code>57858177AF9D83F22DDCB849F3D5565A</code> <code>A550C6D481A6EB706A172243BBE5E4AD</code> <code>38B98778B853C18158C1F0DD487D1737</code> <code>1B99B1B467874A0BB339D3FA0FC72280</code> <code>C86AF7EA3F6E4C9700C9AC8963A227B1</code> <code>5B5918AD260E9198216305FEF1E3894E</code> <code>433B6472C526E089AD84671C45F7A140</code> <code>E824F70E6CD70154EECE9DC8EC5A4739</code> <code>537930A54BE7514B343FB7D96A842B11</code> <code>DB524F991E71081FD945068C058562A7</code> <code>8A4B7828FBB44BEC541C7D1C1F63EE6C</code> <code>C079E8E6BFB0A4FD661EBB88BDF8E9EF</code> <code>009326C7ECBCBD28436BA51CFE3F81FB</code> <code>CBACE3D6E549D4E857C6BBFDBDAA93EC</code> <code>758D61228070828D07934B5305822450</code><br> <code>D70912FF</code></td>
|
||||
<td><code>FE0001009816BAA5752B2921F7817155</code> <code>E1D9247232F913D748BF958957AF3A74</code> <code>C549E0D5322C4FE5F0B0F1DFD47B36BA</code> <code>A2777948F0218A2EC85F19F903327814</code> <code>36D57F2A1DDFBCBFB8FADB83082E7FD6</code> <code>D22338542563079AA109BEF2664026B7</code> <code>CFDF6A148554743FC92795C06E9498EF</code> <code>30EEFF12CE86B5C989DA61A59587992D</code> <code>653E0B29BBECA39460202882023AE263</code> <code>140C0C395DB2906EDD04D95350414D30</code> <code>89E734A1BECDBF7E5FCC96D5E0B464C8</code> <code>A9C769ED35E0D07BD5AB6648CF388B51</code> <code>7584B45D5BE6BCA10094785563CCD26F</code> <code>27926E48AA4BB5ABDBBD0534767405D5</code> <code>F280170F10F3C33181254BD110578F6B</code> <code>443557D9BD07D89108B136D468801129</code><br> <code>06A8DB30</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>66B59266</code> (1720890726 in decimal)</td>
|
||||
<td><code>34B79266</code> (1720891188 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B50DF55634D015BED77BAD5DCB16D3ABBA28AC44D1B56609894E08DB790A60230
|
|||
<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 = 8E195FAE6EE454BD9EA18950C2B59DF8066748A0896703890AA7A7E40CAF36A64848C040B03C2F87413487BC091073EE55AD48073CEE3B4EEA4D1891BD2AD87DA01800DF40AC89A2183CA21E4C77D9B011427E876506658A1F00250E49417C11F41953FC1B4A8F5135910E3C75AF409D1B7F436112890EB7DB9D747115BA65797D1619C4608ADA8994FAE914E505B7ACE89C46877F749D48AFBF731401BD13DB5DDEDB6753AEEB1D8D667271F17A6EF8CC2EE6CC9C701BE17B3C4E7E4BCF9F3F7B69FCE6492E64811F2A12BF03AF673C6544E9FE7DC1037E3CA6FF1D8EAB066E8D8330EEC186EA07C275CC89D525C785C24CA3AC93ABBF41A5CEE6A03DF0E603</code></pre>
|
||||
<pre><code>b = 68BF58E88A6CBC8BE492F7422DFE81F3812545E2C3EFDAEFB0F47656FB4EE179EB07853F9FCFBBB64FA7286CE5CF81FC5B6C722A95F13F9D9142E3DF24CA6530900AE03DFF174062C789B92A4D5EFC7761350EEA625DB69CC1FF49D83FFEF147406057077D024D0DFDDA4E9ACF6B49A69DE7295A6290BD5D028EDF5F45ED82D2EB80CE5D6B9AD03E71AFE08641064F2955836D5649DB99A755E3FE5E259DE6C6912664267B40432E7FED22C4C027ED9D62DCECDF21ED5A2B6236BC5FA6F672994ECE45556F467E66626253C22B63387BE9C8EB42B4A72E661410D9544F923114E712CD977F6E5F001B16874DA174BB6B176DA0853C3D6E0602FAAC8AE9782E40</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 = C329A54AA5E6B71448C2EC4ADC46442A3761376C9AE7CF80A0D33AD12E732E6C4435884156647C08AA2DDDB04BD3F3358DE679AB572A9574BB3C33693EE675906F9C9478DFD1C7A7D906C0D41E27B0DB1DBCF97D12ADD8B6592EFD0C95F0AA247EDD9E2159F49372214A296C8CBC7E3FF21CF2DA4740A7F72390B084E45A09FAF174CE2C5A74ACC568ACDBB855C41DDCFA5EAD95DB51A7F12A8A7F65394E91F5E8F70807A634F24D5B01FA7C0706F571CDEAF317B0F1AAA8BE43E7A8D6826867466F72DEA6BDE26E2AF844794E32B339C0951077F2BB0A80B0FBB9CF487E8514A4C8C8BF567DBBF4B96574247BBF981C99F98A618B346804B688F149F6DE8EB1</code></pre>
|
||||
<pre><code>g_b = 39679113512A4013CCB3E42E3FD9EFF48EAD1FB31102CB20B73D1F8A09721D11765F85CF7CF94AA81FA23E082E8018F9F01072DD4D038A4E26512A3828E01AF99EA1C7F75763CA34E41ECF0E8D11FF0B5FFC004C69325F54689043270B50B3B60B6D57EA18062FF03FEEE5A08FD897ACECEDCDEF5E1335259221AAF457D439DDB188862C9BD5CE010C6C25BE3141E2206DFC5E4769B80356147191FE5A3CB6BF29D6433A4A524B326E51D05C4961A18507DABB3EEFB930C871DB8AB28BAEED64C52D7802683E90F5018927BD623C2B67EA99C1B8C4EB364230E7590C6D025F0E9E09455616E768BA851E89AC462C16E3562610DAE6E4A12A53487C46B5DAF72B</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 0D F5 56 34 D0 15 BE D7 7B AD 5D CB
|
||||
0010 | 16 D3 AB BA 28 AC 44 D1 B5 66 09 89 4E 08 DB 79
|
||||
0020 | 0A 60 23 0B 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | C3 29 A5 4A A5 E6 B7 14 48 C2 EC 4A DC 46 44 2A
|
||||
0040 | 37 61 37 6C 9A E7 CF 80 A0 D3 3A D1 2E 73 2E 6C
|
||||
0050 | 44 35 88 41 56 64 7C 08 AA 2D DD B0 4B D3 F3 35
|
||||
0060 | 8D E6 79 AB 57 2A 95 74 BB 3C 33 69 3E E6 75 90
|
||||
0070 | 6F 9C 94 78 DF D1 C7 A7 D9 06 C0 D4 1E 27 B0 DB
|
||||
0080 | 1D BC F9 7D 12 AD D8 B6 59 2E FD 0C 95 F0 AA 24
|
||||
0090 | 7E DD 9E 21 59 F4 93 72 21 4A 29 6C 8C BC 7E 3F
|
||||
00A0 | F2 1C F2 DA 47 40 A7 F7 23 90 B0 84 E4 5A 09 FA
|
||||
00B0 | F1 74 CE 2C 5A 74 AC C5 68 AC DB B8 55 C4 1D DC
|
||||
00C0 | FA 5E AD 95 DB 51 A7 F1 2A 8A 7F 65 39 4E 91 F5
|
||||
00D0 | E8 F7 08 07 A6 34 F2 4D 5B 01 FA 7C 07 06 F5 71
|
||||
00E0 | CD EA F3 17 B0 F1 AA A8 BE 43 E7 A8 D6 82 68 67
|
||||
00F0 | 46 6F 72 DE A6 BD E2 6E 2A F8 44 79 4E 32 B3 39
|
||||
0100 | C0 95 10 77 F2 BB 0A 80 B0 FB B9 CF 48 7E 85 14
|
||||
0110 | A4 C8 C8 BF 56 7D BB F4 B9 65 74 24 7B BF 98 1C
|
||||
0120 | 99 F9 8A 61 8B 34 68 04 B6 88 F1 49 F6 DE 8E B1</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 48 94 4F 38 A8 CC 74 0A EA 5E D9 B5
|
||||
0010 | FE EE 63 DF 2E D7 F8 E0 A2 C6 3D 14 ED 13 DC CB
|
||||
0020 | 07 9A 9D 52 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 39 67 91 13 51 2A 40 13 CC B3 E4 2E 3F D9 EF F4
|
||||
0040 | 8E AD 1F B3 11 02 CB 20 B7 3D 1F 8A 09 72 1D 11
|
||||
0050 | 76 5F 85 CF 7C F9 4A A8 1F A2 3E 08 2E 80 18 F9
|
||||
0060 | F0 10 72 DD 4D 03 8A 4E 26 51 2A 38 28 E0 1A F9
|
||||
0070 | 9E A1 C7 F7 57 63 CA 34 E4 1E CF 0E 8D 11 FF 0B
|
||||
0080 | 5F FC 00 4C 69 32 5F 54 68 90 43 27 0B 50 B3 B6
|
||||
0090 | 0B 6D 57 EA 18 06 2F F0 3F EE E5 A0 8F D8 97 AC
|
||||
00A0 | EC ED CD EF 5E 13 35 25 92 21 AA F4 57 D4 39 DD
|
||||
00B0 | B1 88 86 2C 9B D5 CE 01 0C 6C 25 BE 31 41 E2 20
|
||||
00C0 | 6D FC 5E 47 69 B8 03 56 14 71 91 FE 5A 3C B6 BF
|
||||
00D0 | 29 D6 43 3A 4A 52 4B 32 6E 51 D0 5C 49 61 A1 85
|
||||
00E0 | 07 DA BB 3E EF B9 30 C8 71 DB 8A B2 8B AE ED 64
|
||||
00F0 | C5 2D 78 02 68 3E 90 F5 01 89 27 BD 62 3C 2B 67
|
||||
0100 | EA 99 C1 B8 C4 EB 36 42 30 E7 59 0C 6D 02 5F 0E
|
||||
0110 | 9E 09 45 56 16 E7 68 BA 85 1E 89 AC 46 2C 16 E3
|
||||
0120 | 56 26 10 DA E6 E4 A1 2A 53 48 7C 46 B5 DA F7 2B</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 = BA0D89B50DF55634D015BED77BAD5DCB16D3ABBA28AC44D1B56609894E08DB790A60230
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>0DF55634D015BED77BAD5DCB16D3ABBA</code></td>
|
||||
<td><code>48944F38A8CC740AEA5ED9B5FEEE63DF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>28AC44D1B56609894E08DB790A60230B</code></td>
|
||||
<td><code>2ED7F8E0A2C63D14ED13DCCB079A9D52</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE000100C329A54AA5E6B71448C2EC4A</code> <code>DC46442A3761376C9AE7CF80A0D33AD1</code> <code>2E732E6C4435884156647C08AA2DDDB0</code> <code>4BD3F3358DE679AB572A9574BB3C3369</code> <code>3EE675906F9C9478DFD1C7A7D906C0D4</code> <code>1E27B0DB1DBCF97D12ADD8B6592EFD0C</code> <code>95F0AA247EDD9E2159F49372214A296C</code> <code>8CBC7E3FF21CF2DA4740A7F72390B084</code> <code>E45A09FAF174CE2C5A74ACC568ACDBB8</code> <code>55C41DDCFA5EAD95DB51A7F12A8A7F65</code> <code>394E91F5E8F70807A634F24D5B01FA7C</code> <code>0706F571CDEAF317B0F1AAA8BE43E7A8</code> <code>D6826867466F72DEA6BDE26E2AF84479</code> <code>4E32B339C0951077F2BB0A80B0FBB9CF</code> <code>487E8514A4C8C8BF567DBBF4B9657424</code> <code>7BBF981C99F98A618B346804B688F149</code><br> <code>F6DE8EB1</code></td>
|
||||
<td><code>FE00010039679113512A4013CCB3E42E</code> <code>3FD9EFF48EAD1FB31102CB20B73D1F8A</code> <code>09721D11765F85CF7CF94AA81FA23E08</code> <code>2E8018F9F01072DD4D038A4E26512A38</code> <code>28E01AF99EA1C7F75763CA34E41ECF0E</code> <code>8D11FF0B5FFC004C69325F5468904327</code> <code>0B50B3B60B6D57EA18062FF03FEEE5A0</code> <code>8FD897ACECEDCDEF5E1335259221AAF4</code> <code>57D439DDB188862C9BD5CE010C6C25BE</code> <code>3141E2206DFC5E4769B80356147191FE</code> <code>5A3CB6BF29D6433A4A524B326E51D05C</code> <code>4961A18507DABB3EEFB930C871DB8AB2</code> <code>8BAEED64C52D7802683E90F5018927BD</code> <code>623C2B67EA99C1B8C4EB364230E7590C</code> <code>6D025F0E9E09455616E768BA851E89AC</code> <code>462C16E3562610DAE6E4A12A53487C46</code><br> <code>B5DAF72B</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 = BA0D89B50DF55634D015BED77BAD5DCB16D3ABBA28AC44D1B56609894E08DB790A60230
|
|||
<!-- 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 = 54B643660DF55634D015BED77BAD5DCB16D3ABBA28AC44D1B56609894E08DB790A60230B0000000000000000FE000100C329A54AA5E6B71448C2EC4ADC46442A3761376C9AE7CF80A0D33AD12E732E6C4435884156647C08AA2DDDB04BD3F3358DE679AB572A9574BB3C33693EE675906F9C9478DFD1C7A7D906C0D41E27B0DB1DBCF97D12ADD8B6592EFD0C95F0AA247EDD9E2159F49372214A296C8CBC7E3FF21CF2DA4740A7F72390B084E45A09FAF174CE2C5A74ACC568ACDBB855C41DDCFA5EAD95DB51A7F12A8A7F65394E91F5E8F70807A634F24D5B01FA7C0706F571CDEAF317B0F1AAA8BE43E7A8D6826867466F72DEA6BDE26E2AF844794E32B339C0951077F2BB0A80B0FBB9CF487E8514A4C8C8BF567DBBF4B96574247BBF981C99F98A618B346804B688F149F6DE8EB1
|
||||
padding = 7389490A97CA08AA4F83897E
|
||||
tmp_aes_key = E154AA8A1DBEDF05F4ACA24419D69DB951D847893A94587963D417EC8246DCA6
|
||||
tmp_aes_iv = 9045432B6D986C1F1845D8237206542E1D8F89B0D4C1645BC577B96A7CCE6C10</code></pre>
|
||||
<pre><code>data = 54B6436648944F38A8CC740AEA5ED9B5FEEE63DF2ED7F8E0A2C63D14ED13DCCB079A9D520000000000000000FE00010039679113512A4013CCB3E42E3FD9EFF48EAD1FB31102CB20B73D1F8A09721D11765F85CF7CF94AA81FA23E082E8018F9F01072DD4D038A4E26512A3828E01AF99EA1C7F75763CA34E41ECF0E8D11FF0B5FFC004C69325F54689043270B50B3B60B6D57EA18062FF03FEEE5A08FD897ACECEDCDEF5E1335259221AAF457D439DDB188862C9BD5CE010C6C25BE3141E2206DFC5E4769B80356147191FE5A3CB6BF29D6433A4A524B326E51D05C4961A18507DABB3EEFB930C871DB8AB28BAEED64C52D7802683E90F5018927BD623C2B67EA99C1B8C4EB364230E7590C6D025F0E9E09455616E768BA851E89AC462C16E3562610DAE6E4A12A53487C46B5DAF72B
|
||||
padding = CE9F80A32B3D107F7388706C
|
||||
tmp_aes_key = A5E7AEE690B167CBD0589EF1B4CE787E419A77BF2274F5AA04236744FE17426B
|
||||
tmp_aes_iv = 7828906EA860A7DE71FF938BBF2DDEF3AE3A6EA9652657ECC37AEA1BB8C00660</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 = E16DAD36B1DD4541AE93119CC5210E0EFA98149E4A4FF1498184616064623CE3CCA2D7B56D030631E2CF4E3798A18FDDB393B06E8A7FA6E961F6A738074092DCDA45BE2136AF1BA1264951C27D17592FD34051B621C4817563C93BBD3297617826F38928D0F4544E05A95B588BFBE994C8BB006BD18FE66E2BE497F4C05E4803341B13BB705092ACE39D38FBFC5C194D88FC867CB379C6081B2BCDC9E0686856AE7125F09A8A2C81E76513518E6D7F3BA005485A6BF23F95AC43E447B8AFC83B8B6325DD99FD31B59BE295A13D97032441C266E2252A26C32A045B9E810C66ABF604397370235932783B53503CB6E876445183A096587A175088C6A3E6DF75016FBC5108D01A373428672092266E78EAFD3FD28347727AAFE3A660F188651B077B7A7A8C1CBE7E61BFB8E6ED979A7CFB179D1DD55257ABC8007892B8374F2DC6AB391AF9C02D3EAD119C8F6A483A1613</code></pre>
|
||||
<pre><code>encrypted_data = F777A0959856A3AA96F43B79A124200DB8217CA8C2980722D67A8493711CA7F733B64438665CF8FBF406E62F2AA11B600748BCC94BEAAC7222FFB319D44E2983A1C0612D59656853C0EA82468FE51E521C4E18AC3B8FC5F6CBF381EAEA42A157975428D6A0276E47AC27B480C0DC7E4B09F0E83592EDDB6C9865F10A5D7F269A924C75C9D9F92EAC832E88A1B36D2462E93F0031FAA7854DD3913CA1A38692239A07C9B6B78FB784DD48F91995A8C2076B43D0D6186BF495787E30BFEE130F827B6749DB1158DE16C215CB162D1CADE98E54824656E2D6EA0649577165780ADEFA5337086401E7535FFD07BF1641FAE7E09BDD4FD4A4BA2B82FA544152D075014E6F95264ACFDECFD24A71CD1A30F6B8E493D96560D11E6968F486202B7A59E61AD0B4C260A897F0BB9BD2E13AF3D94ED2938E2DE8B4665A92160D9A8DB602C5D8EE48E7AA13FC40A5E8F586025E7BF8</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 98 BA 09 00 66 B5 92 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 0D F5 56 34 D0 15 BE D7
|
||||
0020 | 7B AD 5D CB 16 D3 AB BA 28 AC 44 D1 B5 66 09 89
|
||||
0030 | 4E 08 DB 79 0A 60 23 0B FE 50 01 00 E1 6D AD 36
|
||||
0040 | B1 DD 45 41 AE 93 11 9C C5 21 0E 0E FA 98 14 9E
|
||||
0050 | 4A 4F F1 49 81 84 61 60 64 62 3C E3 CC A2 D7 B5
|
||||
0060 | 6D 03 06 31 E2 CF 4E 37 98 A1 8F DD B3 93 B0 6E
|
||||
0070 | 8A 7F A6 E9 61 F6 A7 38 07 40 92 DC DA 45 BE 21
|
||||
0080 | 36 AF 1B A1 26 49 51 C2 7D 17 59 2F D3 40 51 B6
|
||||
0090 | 21 C4 81 75 63 C9 3B BD 32 97 61 78 26 F3 89 28
|
||||
00A0 | D0 F4 54 4E 05 A9 5B 58 8B FB E9 94 C8 BB 00 6B
|
||||
00B0 | D1 8F E6 6E 2B E4 97 F4 C0 5E 48 03 34 1B 13 BB
|
||||
00C0 | 70 50 92 AC E3 9D 38 FB FC 5C 19 4D 88 FC 86 7C
|
||||
00D0 | B3 79 C6 08 1B 2B CD C9 E0 68 68 56 AE 71 25 F0
|
||||
00E0 | 9A 8A 2C 81 E7 65 13 51 8E 6D 7F 3B A0 05 48 5A
|
||||
00F0 | 6B F2 3F 95 AC 43 E4 47 B8 AF C8 3B 8B 63 25 DD
|
||||
0100 | 99 FD 31 B5 9B E2 95 A1 3D 97 03 24 41 C2 66 E2
|
||||
0110 | 25 2A 26 C3 2A 04 5B 9E 81 0C 66 AB F6 04 39 73
|
||||
0120 | 70 23 59 32 78 3B 53 50 3C B6 E8 76 44 51 83 A0
|
||||
0130 | 96 58 7A 17 50 88 C6 A3 E6 DF 75 01 6F BC 51 08
|
||||
0140 | D0 1A 37 34 28 67 20 92 26 6E 78 EA FD 3F D2 83
|
||||
0150 | 47 72 7A AF E3 A6 60 F1 88 65 1B 07 7B 7A 7A 8C
|
||||
0160 | 1C BE 7E 61 BF B8 E6 ED 97 9A 7C FB 17 9D 1D D5
|
||||
0170 | 52 57 AB C8 00 78 92 B8 37 4F 2D C6 AB 39 1A F9
|
||||
0180 | C0 2D 3E AD 11 9C 8F 6A 48 3A 16 13</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 FC 2A 01 00 34 B7 92 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 48 94 4F 38 A8 CC 74 0A
|
||||
0020 | EA 5E D9 B5 FE EE 63 DF 2E D7 F8 E0 A2 C6 3D 14
|
||||
0030 | ED 13 DC CB 07 9A 9D 52 FE 50 01 00 F7 77 A0 95
|
||||
0040 | 98 56 A3 AA 96 F4 3B 79 A1 24 20 0D B8 21 7C A8
|
||||
0050 | C2 98 07 22 D6 7A 84 93 71 1C A7 F7 33 B6 44 38
|
||||
0060 | 66 5C F8 FB F4 06 E6 2F 2A A1 1B 60 07 48 BC C9
|
||||
0070 | 4B EA AC 72 22 FF B3 19 D4 4E 29 83 A1 C0 61 2D
|
||||
0080 | 59 65 68 53 C0 EA 82 46 8F E5 1E 52 1C 4E 18 AC
|
||||
0090 | 3B 8F C5 F6 CB F3 81 EA EA 42 A1 57 97 54 28 D6
|
||||
00A0 | A0 27 6E 47 AC 27 B4 80 C0 DC 7E 4B 09 F0 E8 35
|
||||
00B0 | 92 ED DB 6C 98 65 F1 0A 5D 7F 26 9A 92 4C 75 C9
|
||||
00C0 | D9 F9 2E AC 83 2E 88 A1 B3 6D 24 62 E9 3F 00 31
|
||||
00D0 | FA A7 85 4D D3 91 3C A1 A3 86 92 23 9A 07 C9 B6
|
||||
00E0 | B7 8F B7 84 DD 48 F9 19 95 A8 C2 07 6B 43 D0 D6
|
||||
00F0 | 18 6B F4 95 78 7E 30 BF EE 13 0F 82 7B 67 49 DB
|
||||
0100 | 11 58 DE 16 C2 15 CB 16 2D 1C AD E9 8E 54 82 46
|
||||
0110 | 56 E2 D6 EA 06 49 57 71 65 78 0A DE FA 53 37 08
|
||||
0120 | 64 01 E7 53 5F FD 07 BF 16 41 FA E7 E0 9B DD 4F
|
||||
0130 | D4 A4 BA 2B 82 FA 54 41 52 D0 75 01 4E 6F 95 26
|
||||
0140 | 4A CF DE CF D2 4A 71 CD 1A 30 F6 B8 E4 93 D9 65
|
||||
0150 | 60 D1 1E 69 68 F4 86 20 2B 7A 59 E6 1A D0 B4 C2
|
||||
0160 | 60 A8 97 F0 BB 9B D2 E1 3A F3 D9 4E D2 93 8E 2D
|
||||
0170 | E8 B4 66 5A 92 16 0D 9A 8D B6 02 C5 D8 EE 48 E7
|
||||
0180 | AA 13 FC 40 A5 E8 F5 86 02 5E 7B F8</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>98BA090066B59266</code></td>
|
||||
<td><code>FC2A010034B79266</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>0DF55634D015BED77BAD5DCB16D3ABBA</code></td>
|
||||
<td><code>48944F38A8CC740AEA5ED9B5FEEE63DF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>28AC44D1B56609894E08DB790A60230B</code></td>
|
||||
<td><code>2ED7F8E0A2C63D14ED13DCCB079A9D52</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE500100E16DAD36B1DD4541AE93119C</code> <code>C5210E0EFA98149E4A4FF14981846160</code> <code>64623CE3CCA2D7B56D030631E2CF4E37</code> <code>98A18FDDB393B06E8A7FA6E961F6A738</code> <code>074092DCDA45BE2136AF1BA1264951C2</code> <code>7D17592FD34051B621C4817563C93BBD</code> <code>3297617826F38928D0F4544E05A95B58</code> <code>8BFBE994C8BB006BD18FE66E2BE497F4</code> <code>C05E4803341B13BB705092ACE39D38FB</code> <code>FC5C194D88FC867CB379C6081B2BCDC9</code> <code>E0686856AE7125F09A8A2C81E7651351</code> <code>8E6D7F3BA005485A6BF23F95AC43E447</code> <code>B8AFC83B8B6325DD99FD31B59BE295A1</code> <code>3D97032441C266E2252A26C32A045B9E</code> <code>810C66ABF604397370235932783B5350</code> <code>3CB6E876445183A096587A175088C6A3</code> <code>E6DF75016FBC5108D01A373428672092</code> <code>266E78EAFD3FD28347727AAFE3A660F1</code> <code>88651B077B7A7A8C1CBE7E61BFB8E6ED</code> <code>979A7CFB179D1DD55257ABC8007892B8</code> <code>374F2DC6AB391AF9C02D3EAD119C8F6A</code><br> <code>483A1613</code></td>
|
||||
<td><code>FE500100F777A0959856A3AA96F43B79</code> <code>A124200DB8217CA8C2980722D67A8493</code> <code>711CA7F733B64438665CF8FBF406E62F</code> <code>2AA11B600748BCC94BEAAC7222FFB319</code> <code>D44E2983A1C0612D59656853C0EA8246</code> <code>8FE51E521C4E18AC3B8FC5F6CBF381EA</code> <code>EA42A157975428D6A0276E47AC27B480</code> <code>C0DC7E4B09F0E83592EDDB6C9865F10A</code> <code>5D7F269A924C75C9D9F92EAC832E88A1</code> <code>B36D2462E93F0031FAA7854DD3913CA1</code> <code>A38692239A07C9B6B78FB784DD48F919</code> <code>95A8C2076B43D0D6186BF495787E30BF</code> <code>EE130F827B6749DB1158DE16C215CB16</code> <code>2D1CADE98E54824656E2D6EA06495771</code> <code>65780ADEFA5337086401E7535FFD07BF</code> <code>1641FAE7E09BDD4FD4A4BA2B82FA5441</code> <code>52D075014E6F95264ACFDECFD24A71CD</code> <code>1A30F6B8E493D96560D11E6968F48620</code> <code>2B7A59E61AD0B4C260A897F0BB9BD2E1</code> <code>3AF3D94ED2938E2DE8B4665A92160D9A</code> <code>8DB602C5D8EE48E7AA13FC40A5E8F586</code><br> <code>025E7BF8</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 = BC5F8685473CEC47AA45796B2312EC8E356216BA2EF8567718BA39524570D83ECEA990050DA8241538574A0EFD0271B565EC174F1AE51AE18D514A277C17BE898AF1927FDE97E21ADAABC992F0153A0FDCE38A0D17DACEBB716FC8B9AB5FECB69FF1C2AE25BF5AD2AD1B99B2261229AF9234B6353E5F27EAD71814CC62B8859DC8B2F4B6312DCCDBCA3A10C51C9C5DBD9D1F626760F69A191AF4E18F0D153BACA8BF5790F580AEE77EAFB301946620616EDAA63F93CE87E0214F23FCF88EE5234557D46316189FF7A9B9320CA27B6DC3B743BBA9FE5156A0BDDFA1C87A146E06EF159234EE6838B6101FF5C18E347EC12477CB32DC9910B8ACD52909F065DEFF</code></pre>
|
||||
<pre><code>auth_key = 87C49174C3DE070B9CC8DECD2AA3A29E37A5D5662213D765D4224B9223533E73735CF75DFBEA585F01842EA294A949A3997639344C20A4C7CD963A1F1EA33B44D1798A0F07B2E07A030A3214DD9843C71CAE22E4980045D8AF62EE55E19535B2BFE990F31026A1BF00E54438BAFDDC57AAB531643DE47CC16EBB9D053A5095C1C34FC90D0E0559E84B8E432F1E482476034AB1C727A6738D97B6FE9CA60CD7498269642266E625F83AD711E61D27576EF7C38D88305C036E0A27424D74F523A3BA7A873D0C27B8514B4DFAA2FBEF39B9BCABA890AE08C6C37EDEFBA65D12537406B58352FBFAC27F0335D9C4C7D027A3A80FECBA8CB369C32FD9EA991217D44C</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 D4 F7 DF 67 B5 92 66
|
||||
0010 | 3C 00 00 00 34 F7 CB 3B 0D F5 56 34 D0 15 BE D7
|
||||
0020 | 7B AD 5D CB 16 D3 AB BA 28 AC 44 D1 B5 66 09 89
|
||||
0030 | 4E 08 DB 79 0A 60 23 0B 92 8A 41 2C C2 1E 5C 4E
|
||||
0040 | 5F 1B 98 7B AD 30 82 DD</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 20 E4 3A 35 B7 92 66
|
||||
0010 | 48 00 00 00 34 F7 CB 3B 48 94 4F 38 A8 CC 74 0A
|
||||
0020 | EA 5E D9 B5 FE EE 63 DF 2E D7 F8 E0 A2 C6 3D 14
|
||||
0030 | ED 13 DC CB 07 9A 9D 52 B8 CC 3D 23 EB 0F 21 E9
|
||||
0040 | E3 D1 7B 79 56 2E 41 EC</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>01D4F7DF67B59266</code></td>
|
||||
<td><code>0120E43A35B79266</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>3C000000</code> (60 in decimal)</td>
|
||||
<td><code>48000000</code> (72 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>0DF55634D015BED77BAD5DCB16D3ABBA</code></td>
|
||||
<td><code>48944F38A8CC740AEA5ED9B5FEEE63DF</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>28AC44D1B56609894E08DB790A60230B</code></td>
|
||||
<td><code>2ED7F8E0A2C63D14ED13DCCB079A9D52</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>928A412CC21E5C4E5F1B987BAD3082DD</code></td>
|
||||
<td><code>B8CC3D23EB0F21E9E3D17B79562E41EC</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>
|
||||
|
|
|
@ -76,7 +76,7 @@ All long IDs except for id are document.ids…">
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/availableEffect">availableEffect</a></td>
|
||||
<td>Represents a <a href="/api/effects">message effect »</a>.<br><br>All <code>long</code> IDs except for <code>id</code> are <a href="/constructor/document">document</a>.<code>id</code>s from the containing <a href="/constructor/messages.availableEffects">messages.availableEffects</a> constructor.</td>
|
||||
<td>Represents a <a href="/api/effects">message effect »</a>.<br><br>All <code>long</code> IDs except for <code>id</code> are <a href="/constructor/document">document</a>.<code>id</code>s from the containing <a href="/constructor/messages.availableEffects">messages.availableEffects</a> constructor.<br><br>See <a href="/api/effects">here »</a> for more info on how to use following fields.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
|
Loading…
Reference in a new issue