Update content of files

This commit is contained in:
GitHub Action 2024-07-06 17:06:45 +00:00
parent 449d64e3d7
commit 2408a4a566
25 changed files with 251 additions and 276 deletions

View file

@ -87,7 +87,7 @@
<p><a href="/type/account.BusinessChatLinks">account.BusinessChatLinks</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -82,7 +82,7 @@
<p><a href="/type/account.ConnectedBots">account.ConnectedBots</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -107,7 +107,7 @@
<p><a href="/type/BotBusinessConnection">BotBusinessConnection</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p>
<h4><a class="anchor" href="#invokewithbusinessconnection" id="invokewithbusinessconnection" name="invokewithbusinessconnection"><i class="anchor-icon"></i></a><a href="/method/invokeWithBusinessConnection">invokeWithBusinessConnection</a></h4>
<p>Invoke a method using a <a href="/api/business#connected-bots">Telegram Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor</a>.</p>
<p>Make sure to always send queries wrapped in a <code>invokeWithBusinessConnection</code> to the datacenter ID, specified in the <code>dc_id</code> field of the <a href="/constructor/botBusinessConnection">botBusinessConnection</a> that is being used.</p></div>

View file

@ -62,7 +62,7 @@
<p><a href="/type/BusinessAwayMessageSchedule">BusinessAwayMessageSchedule</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -82,7 +82,7 @@
<p><a href="/type/BusinessAwayMessageSchedule">BusinessAwayMessageSchedule</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -62,7 +62,7 @@
<p><a href="/type/BusinessAwayMessageSchedule">BusinessAwayMessageSchedule</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -112,7 +112,7 @@
<p><a href="/type/BusinessBotRecipients">BusinessBotRecipients</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -106,7 +106,7 @@
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
<p>How to create styled text with message entities</p>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -87,7 +87,7 @@
<p><a href="/type/BusinessLocation">BusinessLocation</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -84,7 +84,7 @@
<h4><a class="anchor" href="#pagination-in-the-api" id="pagination-in-the-api" name="pagination-in-the-api"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination in the API</a></h4>
<p>How to fetch results from large lists of objects.</p>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -112,7 +112,7 @@
<p><a href="/type/InputBusinessBotRecipients">InputBusinessBotRecipients</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -108,7 +108,7 @@
<p><a href="/type/InputBusinessRecipients">InputBusinessRecipients</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -4,16 +4,10 @@
<meta charset="utf-8">
<title>inputPrivacyKeyBirthday</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
This constructor does not require any parameters.
Type
InputPrivacyKey">
<meta property="description" content="Whether the user can see our birthday.">
<meta property="og:title" content="inputPrivacyKeyBirthday">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
This constructor does not require any parameters.
Type
InputPrivacyKey">
<meta property="og:description" content="Whether the user can see our birthday.">
<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">
@ -48,7 +42,8 @@ InputPrivacyKey">
<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/inputPrivacyKeyBirthday" >inputPrivacyKeyBirthday</a></li></ul></div>
<h1 id="dev_page_title">inputPrivacyKeyBirthday</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Whether the user can see our birthday.</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>

View file

@ -77,7 +77,7 @@
<p><a href="/type/InputQuickReplyShortcut">InputQuickReplyShortcut</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -92,7 +92,7 @@
<p><a href="/type/messages.QuickReplies">messages.QuickReplies</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -77,7 +77,7 @@
<p><a href="/type/Update">Update</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -4,16 +4,10 @@
<meta charset="utf-8">
<title>updateSavedReactionTags</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
This constructor does not require any parameters.
Type
Update">
<meta property="description" content="The list of reaction tag » names assigned by the user has changed and should be refetched using messages.getSavedReactionTags ».">
<meta property="og:title" content="updateSavedReactionTags">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
This constructor does not require any parameters.
Type
Update">
<meta property="og:description" content="The list of reaction tag » names assigned by the user has changed and should be refetched using messages.getSavedReactionTags ».">
<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">
@ -48,7 +42,8 @@ Update">
<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/updateSavedReactionTags" >updateSavedReactionTags</a></li></ul></div>
<h1 id="dev_page_title">updateSavedReactionTags</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>The list of <a href="/api/saved-messages#tags">reaction tag »</a> names assigned by the user has changed and should be refetched using <a href="/method/messages.getSavedReactionTags">messages.getSavedReactionTags »</a>.</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>
@ -64,7 +59,12 @@ Update">
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Update">Update</a></p></div>
<p><a href="/type/Update">Update</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#saved-messages" id="saved-messages" name="saved-messages"><i class="anchor-icon"></i></a><a href="/api/saved-messages">Saved messages</a></h4>
<p>The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.</p>
<h4><a class="anchor" href="#messagesgetsavedreactiontags" id="messagesgetsavedreactiontags" name="messagesgetsavedreactiontags"><i class="anchor-icon"></i></a><a href="/method/messages.getSavedReactionTags">messages.getSavedReactionTags</a></h4>
<p>Fetch the full list of <a href="/api/saved-messages#tags">saved message tags</a> created by the user.</p></div>
</div>

View file

@ -99,7 +99,7 @@
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
<p>Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.</p>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -102,7 +102,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p></div>
</div>

View file

@ -107,7 +107,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p>
<h4><a class="anchor" href="#updatedeletequickreplymessages" id="updatedeletequickreplymessages" name="updatedeletequickreplymessages"><i class="anchor-icon"></i></a><a href="/constructor/updateDeleteQuickReplyMessages">updateDeleteQuickReplyMessages</a></h4>
<p>One or more messages in a <a href="/api/business#quick-reply-shortcuts">quick reply shortcut »</a> were deleted.</p></div>

View file

@ -98,7 +98,7 @@ This will also emit an <a href="/constructor/updateDeleteQuickReply">updateDelet
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p>
<h4><a class="anchor" href="#updatedeletequickreply" id="updatedeletequickreply" name="updatedeletequickreply"><i class="anchor-icon"></i></a><a href="/constructor/updateDeleteQuickReply">updateDeleteQuickReply</a></h4>
<p>A <a href="/api/business#quick-reply-shortcuts">quick reply shortcut »</a> was deleted. This will <strong>not</strong> emit <a href="/constructor/updateDeleteQuickReplyMessages">updateDeleteQuickReplyMessages</a> updates, even if all the messages in the shortcut are also deleted by this update.</p>
<h4><a class="anchor" href="#updatedeletequickreplymessages" id="updatedeletequickreplymessages" name="updatedeletequickreplymessages"><i class="anchor-icon"></i></a><a href="/constructor/updateDeleteQuickReplyMessages">updateDeleteQuickReplyMessages</a></h4>

View file

@ -4,34 +4,10 @@
<meta charset="utf-8">
<title>stickers.replaceSticker</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
sticker
InputDocument
 
new_sticker
InputStickerSetItem
 
Result
messages.StickerSet
Possible…">
<meta property="description" content="Replace a sticker in a stickerset ».">
<meta property="og:title" content="stickers.replaceSticker">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
sticker
InputDocument
 
new_sticker
InputStickerSetItem
 
Result
messages.StickerSet
Possible…">
<meta property="og:description" content="Replace a sticker in a stickerset ».">
<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">
@ -66,7 +42,8 @@ Possible…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/stickers.replaceSticker" >stickers.replaceSticker</a></li></ul></div>
<h1 id="dev_page_title">stickers.replaceSticker</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Replace a sticker in a <a href="/api/stickers">stickerset »</a>.</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,12 +72,12 @@ Possible…">
<tr>
<td><strong>sticker</strong></td>
<td style="text-align: center;"><a href="/type/InputDocument">InputDocument</a></td>
<td> </td>
<td>Old sticker document.</td>
</tr>
<tr>
<td><strong>new_sticker</strong></td>
<td style="text-align: center;"><a href="/type/InputStickerSetItem">InputStickerSetItem</a></td>
<td> </td>
<td>New sticker.</td>
</tr>
</tbody>
</table>
@ -123,7 +100,10 @@ Possible…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div>
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#stickers" id="stickers" name="stickers"><i class="anchor-icon"></i></a><a href="/api/stickers">Stickers</a></h4>
<p>Telegram clients support displaying static and animated stickers.</p></div>
</div>

View file

@ -53,9 +53,9 @@
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
<!-- start req_pq_multi -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 64 E8 02 00 80 73 89 66
0010 | 14 00 00 00 F1 8E 7E BE 4E 90 12 C4 75 8A 36 D6
0020 | 8D B9 02 03 46 5D 45 B2</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 64 3F 0A 00 8B 78 89 66
0010 | 14 00 00 00 F1 8E 7E BE 23 00 4D B0 2E A4 32 B4
0020 | 51 42 F9 A4 B3 F8 D2 DC</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>64E8020080738966</code></td>
<td><code>643F0A008B788966</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -95,7 +95,7 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4E9012C4758A36D68DB90203465D45B2</code></td>
<td><code>23004DB02EA432B45142F9A4B3F8D2DC</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 BC B7 9E 80 73 89 66
0010 | 5C 00 00 00 63 24 16 05 4E 90 12 C4 75 8A 36 D6
0020 | 8D B9 02 03 46 5D 45 B2 BD 22 72 95 FA 46 54 EF
0030 | FC 02 5D 6D BB 8F 2B F0 08 1C 52 9B AE 35 A0 BB
0040 | EF 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 8C A7 3F 8B 78 89 66
0010 | 50 00 00 00 63 24 16 05 23 00 4D B0 2E A4 32 B4
0020 | 51 42 F9 A4 B3 F8 D2 DC 1E B7 5D 37 0D C0 B6 22
0030 | 9B AD AA 07 F8 A0 C9 94 08 2D CB 39 5E A3 CA C0
0040 | A1 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>01BCB79E80738966</code></td>
<td><code>018CA73F8B788966</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>5C000000</code> (92 in decimal)</td>
<td><code>50000000</code> (80 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4E9012C4758A36D68DB90203465D45B2</code></td>
<td><code>23004DB02EA432B45142F9A4B3F8D2DC</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>BD227295FA4654EFFC025D6DBB8F2BF0</code></td>
<td><code>1EB75D370DC0B6229BADAA07F8A0C994</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>081C529BAE35A0BBEF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2040864753678597103</td>
<td><code>082DCB395EA3CAC0A1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 3299794230616703137</td>
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
</tr>
<tr>
@ -208,22 +208,22 @@
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p &lt; q.</h5>
<!-- start pq -->
<pre><code>pq = 2040864753678597103</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2040864753678597103 = 1340344051 * 1522642453</code></p>
<pre><code>p = 1340344051
q = 1522642453</code></pre>
<pre><code>pq = 3299794230616703137</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>3299794230616703137 = 1751492063 * 1883990399</code></p>
<pre><code>p = 1751492063
q = 1883990399</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 1C 52 9B AE 35 A0 BB EF 00 00 00
0010 | 04 4F E4 06 F3 00 00 00 04 5A C1 AE 15 00 00 00
0020 | 4E 90 12 C4 75 8A 36 D6 8D B9 02 03 46 5D 45 B2
0030 | BD 22 72 95 FA 46 54 EF FC 02 5D 6D BB 8F 2B F0
0040 | 85 E6 D9 B6 20 E4 1C E9 22 49 AA 3E 7F 3E 2E 23
0050 | 40 05 A2 E0 4B 27 5F 44 5A 76 AA 24 A7 17 23 9C
<pre><code>0000 | 95 5F F5 A9 08 2D CB 39 5E A3 CA C0 A1 00 00 00
0010 | 04 68 65 A5 DF 00 00 00 04 70 4B 69 7F 00 00 00
0020 | 23 00 4D B0 2E A4 32 B4 51 42 F9 A4 B3 F8 D2 DC
0030 | 1E B7 5D 37 0D C0 B6 22 9B AD AA 07 F8 A0 C9 94
0040 | BD 50 A7 4D 41 51 E5 46 82 C4 8D D7 1F 97 75 0E
0050 | 10 F5 46 49 78 41 68 C6 02 62 DF 9D 07 B7 C1 02
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 = 1522642453</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>081C529BAE35A0BBEF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2040864753678597103</td>
<td><code>082DCB395EA3CAC0A1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 3299794230616703137</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>044FE406F3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1340344051</td>
<td><code>046865A5DF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1751492063</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>045AC1AE15000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1522642453</td>
<td><code>04704B697F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1883990399</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>4E9012C4758A36D68DB90203465D45B2</code></td>
<td><code>23004DB02EA432B45142F9A4B3F8D2DC</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>BD227295FA4654EFFC025D6DBB8F2BF0</code></td>
<td><code>1EB75D370DC0B6229BADAA07F8A0C994</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>85E6D9B620E41CE92249AA3E7F3E2E23</code> <code>4005A2E04B275F445A76AA24A717239C</code></td>
<td><code>BD50A74D4151E54682C48DD71F97750E</code> <code>10F54649784168C60262DF9D07B7C102</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1522642453</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 = 955FF5A9081C529BAE35A0BBEF000000044FE406F3000000045AC1AE150000004E9012C4758A36D68DB90203465D45B2BD227295FA4654EFFC025D6DBB8F2BF085E6D9B620E41CE92249AA3E7F3E2E234005A2E04B275F445A76AA24A717239C02000000
random_padding_bytes = 3B0C60B6D2B443CAD8CEFD575DD9F82D6B4E5B321D032743927338AE9562137F91ED7D6B26E9F5F121F9EFF82C6BD2899B523CD8E27EFCC2CD9B9BB9943784735D890B13052D457EBDDE3C0D85509CE93DFAB3BC972F39D083871960</code></pre>
<pre><code>data = 955FF5A9082DCB395EA3CAC0A1000000046865A5DF00000004704B697F00000023004DB02EA432B45142F9A4B3F8D2DC1EB75D370DC0B6229BADAA07F8A0C994BD50A74D4151E54682C48DD71F97750E10F54649784168C60262DF9D07B7C10202000000
random_padding_bytes = C4E43C4F26A7E55D5F9F7233FF763F2DE3F7AF5DA4F63C0843967342071791DC6180A97D17AC1D13B6F6A8E3764AE43939A0B8D0409E39E579791430011FA96399C4A8013B32E80F838BEF1DF497EB20D417030C41CA3080557CA87E</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 = DC0790885D5680EC38C464050918DC91B65E9E11C8E420A46C7CD28066AEFDB1AF535839614929BBC1D1B7099B73B551432751D4E6328F8D09E1D22FE47EACBA6D77D9117AE7118D283ED6FFF71F2CE932C6E6FF84AC3D419F93C6E249FA05133D2C7101252F2922A012E21C96FD2610535FE3D2E79743EC90BB7E6CE8D74BB8A29D31BE49256D68F50190871650312F2A6F7DE15F0D57310A906F11CFB9F6DF594D6FDF08EF53199B3ACE34C8AEF444B6D10A8164ECA32AB49AF2097B7A001AE5D460F2B3877E6B2C5D2B7F4990C85D5218EE728F235778F7044B91E267EDFD18C901344CDDCD57999C97485743B67157A4EE932954347E56F2279FCDD53F27</code></pre>
<pre><code>encrypted_data = 8AD69B7B309807A798C95E81629D8C0CFB5CAA11FE73D2DEBC7ED583658840B376EF348FDE50FD020D2CD1570E2CCE912CD0306461B9B5088004F60B2D5CDD080C2EF906DC044DD95993FA148AC3BBF0CA0397BB595BEA78BE19E3A789564E453521E7016C1B27828418A6FC65A4EB0F500C2D8BB3BB5808F65D2B4F7397CEE47DD4AD4589337519E5677E381FBEAA9AD8114399670F33BBE98F6DA3AD80D8338753B7CDFAD41BB9C277742953B1D23235BFE1F97B0946003E933C853E03F2639042DB8A2A55E588397D6B49D5F12F20EF8ADFB081447884B588BEA11405EE5B4D50B69EE10C5029190A62D4918D561E8AB9375C85A8D4276652A8DA7B3DF91D</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 4C 0D 07 00 80 73 89 66
0010 | 40 01 00 00 BE E4 12 D7 4E 90 12 C4 75 8A 36 D6
0020 | 8D B9 02 03 46 5D 45 B2 BD 22 72 95 FA 46 54 EF
0030 | FC 02 5D 6D BB 8F 2B F0 04 4F E4 06 F3 00 00 00
0040 | 04 5A C1 AE 15 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 DC 07 90 88 5D 56 80 EC 38 C4 64 05
0060 | 09 18 DC 91 B6 5E 9E 11 C8 E4 20 A4 6C 7C D2 80
0070 | 66 AE FD B1 AF 53 58 39 61 49 29 BB C1 D1 B7 09
0080 | 9B 73 B5 51 43 27 51 D4 E6 32 8F 8D 09 E1 D2 2F
0090 | E4 7E AC BA 6D 77 D9 11 7A E7 11 8D 28 3E D6 FF
00A0 | F7 1F 2C E9 32 C6 E6 FF 84 AC 3D 41 9F 93 C6 E2
00B0 | 49 FA 05 13 3D 2C 71 01 25 2F 29 22 A0 12 E2 1C
00C0 | 96 FD 26 10 53 5F E3 D2 E7 97 43 EC 90 BB 7E 6C
00D0 | E8 D7 4B B8 A2 9D 31 BE 49 25 6D 68 F5 01 90 87
00E0 | 16 50 31 2F 2A 6F 7D E1 5F 0D 57 31 0A 90 6F 11
00F0 | CF B9 F6 DF 59 4D 6F DF 08 EF 53 19 9B 3A CE 34
0100 | C8 AE F4 44 B6 D1 0A 81 64 EC A3 2A B4 9A F2 09
0110 | 7B 7A 00 1A E5 D4 60 F2 B3 87 7E 6B 2C 5D 2B 7F
0120 | 49 90 C8 5D 52 18 EE 72 8F 23 57 78 F7 04 4B 91
0130 | E2 67 ED FD 18 C9 01 34 4C DD CD 57 99 9C 97 48
0140 | 57 43 B6 71 57 A4 EE 93 29 54 34 7E 56 F2 27 9F
0150 | CD D5 3F 27</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 68 3F 0A 00 8B 78 89 66
0010 | 40 01 00 00 BE E4 12 D7 23 00 4D B0 2E A4 32 B4
0020 | 51 42 F9 A4 B3 F8 D2 DC 1E B7 5D 37 0D C0 B6 22
0030 | 9B AD AA 07 F8 A0 C9 94 04 68 65 A5 DF 00 00 00
0040 | 04 70 4B 69 7F 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 8A D6 9B 7B 30 98 07 A7 98 C9 5E 81
0060 | 62 9D 8C 0C FB 5C AA 11 FE 73 D2 DE BC 7E D5 83
0070 | 65 88 40 B3 76 EF 34 8F DE 50 FD 02 0D 2C D1 57
0080 | 0E 2C CE 91 2C D0 30 64 61 B9 B5 08 80 04 F6 0B
0090 | 2D 5C DD 08 0C 2E F9 06 DC 04 4D D9 59 93 FA 14
00A0 | 8A C3 BB F0 CA 03 97 BB 59 5B EA 78 BE 19 E3 A7
00B0 | 89 56 4E 45 35 21 E7 01 6C 1B 27 82 84 18 A6 FC
00C0 | 65 A4 EB 0F 50 0C 2D 8B B3 BB 58 08 F6 5D 2B 4F
00D0 | 73 97 CE E4 7D D4 AD 45 89 33 75 19 E5 67 7E 38
00E0 | 1F BE AA 9A D8 11 43 99 67 0F 33 BB E9 8F 6D A3
00F0 | AD 80 D8 33 87 53 B7 CD FA D4 1B B9 C2 77 74 29
0100 | 53 B1 D2 32 35 BF E1 F9 7B 09 46 00 3E 93 3C 85
0110 | 3E 03 F2 63 90 42 DB 8A 2A 55 E5 88 39 7D 6B 49
0120 | D5 F1 2F 20 EF 8A DF B0 81 44 78 84 B5 88 BE A1
0130 | 14 05 EE 5B 4D 50 B6 9E E1 0C 50 29 19 0A 62 D4
0140 | 91 8D 56 1E 8A B9 37 5C 85 A8 D4 27 66 52 A8 DA
0150 | 7B 3D F9 1D</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 = 3B0C60B6D2B443CAD8CEFD575DD9F82D6B4E5B321D032743927338AE9
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>4C0D070080738966</code></td>
<td><code>683F0A008B788966</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -363,25 +363,25 @@ random_padding_bytes = 3B0C60B6D2B443CAD8CEFD575DD9F82D6B4E5B321D032743927338AE9
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4E9012C4758A36D68DB90203465D45B2</code></td>
<td><code>23004DB02EA432B45142F9A4B3F8D2DC</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>BD227295FA4654EFFC025D6DBB8F2BF0</code></td>
<td><code>1EB75D370DC0B6229BADAA07F8A0C994</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>044FE406F3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1340344051</td>
<td><code>046865A5DF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1751492063</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>045AC1AE15000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1522642453</td>
<td><code>04704B697F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1883990399</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 = 3B0C60B6D2B443CAD8CEFD575DD9F82D6B4E5B321D032743927338AE9
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE000100DC0790885D5680EC38C46405</code> <code>0918DC91B65E9E11C8E420A46C7CD280</code> <code>66AEFDB1AF535839614929BBC1D1B709</code> <code>9B73B551432751D4E6328F8D09E1D22F</code> <code>E47EACBA6D77D9117AE7118D283ED6FF</code> <code>F71F2CE932C6E6FF84AC3D419F93C6E2</code> <code>49FA05133D2C7101252F2922A012E21C</code> <code>96FD2610535FE3D2E79743EC90BB7E6C</code> <code>E8D74BB8A29D31BE49256D68F5019087</code> <code>1650312F2A6F7DE15F0D57310A906F11</code> <code>CFB9F6DF594D6FDF08EF53199B3ACE34</code> <code>C8AEF444B6D10A8164ECA32AB49AF209</code> <code>7B7A001AE5D460F2B3877E6B2C5D2B7F</code> <code>4990C85D5218EE728F235778F7044B91</code> <code>E267EDFD18C901344CDDCD57999C9748</code> <code>5743B67157A4EE932954347E56F2279F</code><br> <code>CDD53F27</code></td>
<td><code>FE0001008AD69B7B309807A798C95E81</code> <code>629D8C0CFB5CAA11FE73D2DEBC7ED583</code> <code>658840B376EF348FDE50FD020D2CD157</code> <code>0E2CCE912CD0306461B9B5088004F60B</code> <code>2D5CDD080C2EF906DC044DD95993FA14</code> <code>8AC3BBF0CA0397BB595BEA78BE19E3A7</code> <code>89564E453521E7016C1B27828418A6FC</code> <code>65A4EB0F500C2D8BB3BB5808F65D2B4F</code> <code>7397CEE47DD4AD4589337519E5677E38</code> <code>1FBEAA9AD8114399670F33BBE98F6DA3</code> <code>AD80D8338753B7CDFAD41BB9C2777429</code> <code>53B1D23235BFE1F97B0946003E933C85</code> <code>3E03F2639042DB8A2A55E588397D6B49</code> <code>D5F12F20EF8ADFB081447884B588BEA1</code> <code>1405EE5B4D50B69EE10C5029190A62D4</code> <code>918D561E8AB9375C85A8D4276652A8DA</code><br> <code>7B3DF91D</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 3B0C60B6D2B443CAD8CEFD575DD9F82D6B4E5B321D032743927338AE9
<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 24 B8 50 81 73 89 66
0010 | 80 02 00 00 5C 07 E8 D0 4E 90 12 C4 75 8A 36 D6
0020 | 8D B9 02 03 46 5D 45 B2 BD 22 72 95 FA 46 54 EF
0030 | FC 02 5D 6D BB 8F 2B F0 FE 50 02 00 A6 DA 00 40
0040 | 2D A7 D7 9F E8 23 17 08 D1 90 D6 B5 4F 17 0D 6F
0050 | ED F7 FA 57 40 C8 79 1D C3 69 57 3F 36 45 9F DB
0060 | 9E 62 CA B5 B5 3F 85 CA 07 F3 CB 82 D2 B7 A0 A4
0070 | DB E7 15 35 64 61 C8 C6 46 A4 A0 74 0B EA 7E 30
0080 | 19 7F F3 FD F4 38 12 DD F6 F9 8A 42 66 AD 0F 04
0090 | 43 BE 48 B2 52 DA 7E 30 B7 7C 3F D6 D4 20 FF 59
00A0 | 7F 7B 16 A4 A3 4E CF ED 6B 08 81 6D BE 0A 65 6F
00B0 | C8 D3 7F 1C B3 96 97 6C 27 C5 B4 63 23 99 D7 D7
00C0 | 04 78 87 31 D3 EC 83 EE E3 E1 F7 C3 52 6A 55 66
00D0 | 42 CD 82 45 FD 32 34 B2 05 2F FB 37 5E FA 84 D1
00E0 | CC 79 94 00 43 EE 20 F7 C6 EA AD 65 95 D2 FC D1
00F0 | 92 55 3E 22 E2 8C 04 21 CB 5C 50 5F 45 C4 98 AB
0100 | E5 E1 65 11 CC FF CE 7F 44 EC BD D1 08 2A E1 7E
0110 | 93 76 23 9D 71 CA B5 06 B2 73 6F 5C EC A3 F0 70
0120 | 28 A6 24 0D B0 71 24 A5 84 49 E9 18 C4 FD 9D 8A
0130 | CD A1 00 04 46 A7 5A BB AE FE C0 D0 01 20 17 A4
0140 | DD 2B 2D C9 F0 39 AF 85 7C 09 6D 59 A1 5F 22 60
0150 | 73 9B 3B 1F 54 B4 1E 94 F7 57 36 5B C4 9B 9E FB
0160 | 34 B3 9D A1 42 13 67 D3 8A 60 F3 9A F8 FF 50 50
0170 | DA 8F B7 5A 3E 48 5A 06 3C 69 35 30 6D 6E C2 A0
0180 | 59 A8 77 5A A2 69 15 F5 58 D6 EA 94 E7 EC EA D1
0190 | A6 DA C5 4F B5 84 F9 C5 DA B0 4D 9D CA 24 3C D0
01A0 | 75 11 72 ED DA E4 38 55 31 6E 27 0B 9B 31 CB 33
01B0 | BC CC 85 FE 73 62 9C 17 91 F3 2E 92 98 3E 98 35
01C0 | 37 E4 4F 74 9A 97 54 73 D5 22 6B DA A5 53 03 D9
01D0 | 2F 74 9E 48 DC 26 D8 8B D7 F5 0F 9A FB 43 48 9F
01E0 | 34 F2 52 01 43 18 91 2F 01 3C 86 F6 8E 31 C5 F1
01F0 | 23 37 83 F4 CD D7 4F 8B B7 B1 AB 0F 58 11 B1 F9
0200 | 4F 91 E0 F5 12 B1 31 E8 5D 2E D3 97 3A 70 80 EB
0210 | E1 64 E7 13 D5 6C AF 32 96 9C 5C 97 FC B2 45 BD
0220 | FC 67 BC F3 14 E4 A2 F0 32 C4 52 FB 4A C5 7C 27
0230 | 1D 99 E3 59 92 54 D7 96 91 27 61 B6 65 1E B5 A4
0240 | 45 8D C6 6D E3 16 48 83 94 A0 A6 48 F3 AE 0F 35
0250 | 8B 96 62 9B E1 02 51 AD 93 05 F5 E1 BA 00 DE B2
0260 | F9 4C 17 D1 80 B8 A2 95 C0 27 10 F1 D5 E9 C9 5D
0270 | 69 CA 8D 93 60 66 66 5E 5A D1 4E 4E 54 73 74 4B
0280 | 2F 3D FF 7B 4A 02 3D D3 AC 9D 6D 27</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 78 01 FE 8B 78 89 66
0010 | 8C 02 00 00 5C 07 E8 D0 23 00 4D B0 2E A4 32 B4
0020 | 51 42 F9 A4 B3 F8 D2 DC 1E B7 5D 37 0D C0 B6 22
0030 | 9B AD AA 07 F8 A0 C9 94 FE 50 02 00 2D D1 01 08
0040 | 24 7B C0 2A 26 B4 9C 83 A6 8A F6 B1 33 29 A0 3C
0050 | F6 CA DF 9B C3 42 7D 11 D0 15 CD 2C A4 86 E7 2C
0060 | 6E 70 DC 44 30 55 38 FB C2 E0 E0 B0 13 D7 23 A1
0070 | BA FE EA B4 8B D0 1D 74 EA D9 E9 1C 61 29 65 43
0080 | 49 91 A7 F5 3A 96 35 F3 2F AC A1 18 CB EE 3A 14
0090 | 85 45 73 12 A3 65 0F 12 01 A6 4E 11 EE 61 4A 7E
00A0 | E0 A2 08 98 DB 6B 3D A0 D9 A1 A9 92 C3 B7 C5 CF
00B0 | AD C6 9F 6E 01 81 99 42 89 A6 8D 59 8B 2D 6F 70
00C0 | 64 53 F8 83 A5 CB 58 1E 9B E2 AB F3 7C 50 1E AE
00D0 | 51 13 5F D7 1F E7 B2 F3 21 DC 24 A7 CC BF E9 7A
00E0 | 97 CA 07 47 F5 E8 0D 6E 73 7A 5A 48 D6 5F 6B 1A
00F0 | 9A FB 56 36 92 E1 C3 67 64 9C DB 5E F6 CF 18 16
0100 | E4 17 C1 21 C9 7F 87 FC 17 3F D9 94 1E C9 43 69
0110 | 0E 5D 57 9C 7A 57 2E B3 D4 11 36 56 EC CA 07 6A
0120 | BE F8 F2 19 86 28 9E 8D 48 B0 55 60 75 73 5C 9A
0130 | E2 6F 3B 8A C9 9C 33 CC C2 48 F8 73 42 D1 E5 2E
0140 | 35 94 17 B0 15 8C EE B0 62 0F 2C 2E 28 77 5F 88
0150 | B5 6B 96 88 79 CD 47 51 00 72 A4 FD 27 7A 93 39
0160 | 52 57 13 CE A1 A1 9E 18 46 B2 C9 7D 4E E2 1D D6
0170 | 74 B2 E2 D2 95 E8 AB 41 61 24 C6 8C EF 78 FD CC
0180 | E8 77 7A 49 80 A7 FE F3 EE FD 36 34 24 F1 80 3F
0190 | 32 07 BF F8 A7 2F 1C 31 5E 75 69 64 12 FA F7 AD
01A0 | 62 C6 BA FF 1B ED 42 BD 4C D7 03 19 0F 82 7F 61
01B0 | E8 70 28 07 55 35 0B D0 ED 4C 69 92 3D C0 AC BC
01C0 | EA 47 57 83 EA DC 31 74 46 04 91 1A B0 C0 54 AA
01D0 | 1E 74 DA D0 6C 08 3B 14 16 24 17 63 9F DA F6 14
01E0 | 80 A5 E0 02 FC BA 7D 9C 0E E1 24 6A F2 8B 96 6B
01F0 | 4E CE 02 97 44 73 E2 7C 0F 2A 12 0F 61 97 89 0F
0200 | C2 AE 5C C8 F7 D8 21 1C BC 92 BF 09 0B 18 55 FF
0210 | 0C 78 DA B8 9D 30 6F 21 8C 8A 79 8A 7B 53 27 55
0220 | BB E7 D6 A7 1C 2A FC 3D 32 F5 16 6D C8 87 A1 15
0230 | 0A BC 11 D0 E1 DE 6D 1C EE 88 D1 D4 6E 9A C9 BA
0240 | 6F 8E BC CF C0 E4 E6 34 C2 2C E6 F6 BF 4E FC 18
0250 | CB 20 1E CA F3 DD 17 16 FC 50 07 BC 6B B6 62 21
0260 | DC 22 1B E6 59 54 96 F2 31 26 8B EF BB 6D DF 9F
0270 | 8E A6 12 0D D1 CA 74 5F EC B1 3A 13 44 BF 3D F2
0280 | 38 BC 33 05 D2 C8 94 4D F3 8E B3 70</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 = 3B0C60B6D2B443CAD8CEFD575DD9F82D6B4E5B321D032743927338AE9
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>0124B85081738966</code></td>
<td><code>017801FE8B788966</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>80020000</code> (640 in decimal)</td>
<td><code>8C020000</code> (652 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 3B0C60B6D2B443CAD8CEFD575DD9F82D6B4E5B321D032743927338AE9
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4E9012C4758A36D68DB90203465D45B2</code></td>
<td><code>23004DB02EA432B45142F9A4B3F8D2DC</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>BD227295FA4654EFFC025D6DBB8F2BF0</code></td>
<td><code>1EB75D370DC0B6229BADAA07F8A0C994</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200A6DA00402DA7D79FE8231708</code> <code>D190D6B54F170D6FEDF7FA5740C8791D</code> <code>C369573F36459FDB9E62CAB5B53F85CA</code> <code>07F3CB82D2B7A0A4DBE715356461C8C6</code> <code>46A4A0740BEA7E30197FF3FDF43812DD</code> <code>F6F98A4266AD0F0443BE48B252DA7E30</code> <code>B77C3FD6D420FF597F7B16A4A34ECFED</code> <code>6B08816DBE0A656FC8D37F1CB396976C</code> <code>27C5B4632399D7D704788731D3EC83EE</code> <code>E3E1F7C3526A556642CD8245FD3234B2</code> <code>052FFB375EFA84D1CC79940043EE20F7</code> <code>C6EAAD6595D2FCD192553E22E28C0421</code> <code>CB5C505F45C498ABE5E16511CCFFCE7F</code> <code>44ECBDD1082AE17E9376239D71CAB506</code> <code>B2736F5CECA3F07028A6240DB07124A5</code> <code>8449E918C4FD9D8ACDA1000446A75ABB</code> <code>AEFEC0D0012017A4DD2B2DC9F039AF85</code> <code>7C096D59A15F2260739B3B1F54B41E94</code> <code>F757365BC49B9EFB34B39DA1421367D3</code> <code>8A60F39AF8FF5050DA8FB75A3E485A06</code> <code>3C6935306D6EC2A059A8775AA26915F5</code> <code>58D6EA94E7ECEAD1A6DAC54FB584F9C5</code> <code>DAB04D9DCA243CD0751172EDDAE43855</code> <code>316E270B9B31CB33BCCC85FE73629C17</code> <code>91F32E92983E983537E44F749A975473</code> <code>D5226BDAA55303D92F749E48DC26D88B</code> <code>D7F50F9AFB43489F34F252014318912F</code> <code>013C86F68E31C5F1233783F4CDD74F8B</code> <code>B7B1AB0F5811B1F94F91E0F512B131E8</code> <code>5D2ED3973A7080EBE164E713D56CAF32</code> <code>969C5C97FCB245BDFC67BCF314E4A2F0</code> <code>32C452FB4AC57C271D99E3599254D796</code> <code>912761B6651EB5A4458DC66DE3164883</code> <code>94A0A648F3AE0F358B96629BE10251AD</code> <code>9305F5E1BA00DEB2F94C17D180B8A295</code> <code>C02710F1D5E9C95D69CA8D936066665E</code> <code>5AD14E4E5473744B2F3DFF7B4A023DD3</code><br> <code>AC9D6D27</code></td>
<td><code>FE5002002DD10108247BC02A26B49C83</code> <code>A68AF6B13329A03CF6CADF9BC3427D11</code> <code>D015CD2CA486E72C6E70DC44305538FB</code> <code>C2E0E0B013D723A1BAFEEAB48BD01D74</code> <code>EAD9E91C612965434991A7F53A9635F3</code> <code>2FACA118CBEE3A1485457312A3650F12</code> <code>01A64E11EE614A7EE0A20898DB6B3DA0</code> <code>D9A1A992C3B7C5CFADC69F6E01819942</code> <code>89A68D598B2D6F706453F883A5CB581E</code> <code>9BE2ABF37C501EAE51135FD71FE7B2F3</code> <code>21DC24A7CCBFE97A97CA0747F5E80D6E</code> <code>737A5A48D65F6B1A9AFB563692E1C367</code> <code>649CDB5EF6CF1816E417C121C97F87FC</code> <code>173FD9941EC943690E5D579C7A572EB3</code> <code>D4113656ECCA076ABEF8F21986289E8D</code> <code>48B0556075735C9AE26F3B8AC99C33CC</code> <code>C248F87342D1E52E359417B0158CEEB0</code> <code>620F2C2E28775F88B56B968879CD4751</code> <code>0072A4FD277A9339525713CEA1A19E18</code> <code>46B2C97D4EE21DD674B2E2D295E8AB41</code> <code>6124C68CEF78FDCCE8777A4980A7FEF3</code> <code>EEFD363424F1803F3207BFF8A72F1C31</code> <code>5E75696412FAF7AD62C6BAFF1BED42BD</code> <code>4CD703190F827F61E870280755350BD0</code> <code>ED4C69923DC0ACBCEA475783EADC3174</code> <code>4604911AB0C054AA1E74DAD06C083B14</code> <code>162417639FDAF61480A5E002FCBA7D9C</code> <code>0EE1246AF28B966B4ECE02974473E27C</code> <code>0F2A120F6197890FC2AE5CC8F7D8211C</code> <code>BC92BF090B1855FF0C78DAB89D306F21</code> <code>8C8A798A7B532755BBE7D6A71C2AFC3D</code> <code>32F5166DC887A1150ABC11D0E1DE6D1C</code> <code>EE88D1D46E9AC9BA6F8EBCCFC0E4E634</code> <code>C22CE6F6BF4EFC18CB201ECAF3DD1716</code> <code>FC5007BC6BB66221DC221BE6595496F2</code> <code>31268BEFBB6DDF9F8EA6120DD1CA745F</code> <code>ECB13A1344BF3DF238BC3305D2C8944D</code><br> <code>F38EB370</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 3B0C60B6D2B443CAD8CEFD575DD9F82D6B4E5B321D032743927338AE9
<!-- 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 = A6DA00402DA7D79FE8231708D190D6B54F170D6FEDF7FA5740C8791DC369573F36459FDB9E62CAB5B53F85CA07F3CB82D2B7A0A4DBE715356461C8C646A4A0740BEA7E30197FF3FDF43812DDF6F98A4266AD0F0443BE48B252DA7E30B77C3FD6D420FF597F7B16A4A34ECFED6B08816DBE0A656FC8D37F1CB396976C27C5B4632399D7D704788731D3EC83EEE3E1F7C3526A556642CD8245FD3234B2052FFB375EFA84D1CC79940043EE20F7C6EAAD6595D2FCD192553E22E28C0421CB5C505F45C498ABE5E16511CCFFCE7F44ECBDD1082AE17E9376239D71CAB506B2736F5CECA3F07028A6240DB07124A58449E918C4FD9D8ACDA1000446A75ABBAEFEC0D0012017A4DD2B2DC9F039AF857C096D59A15F2260739B3B1F54B41E94F757365BC49B9EFB34B39DA1421367D38A60F39AF8FF5050DA8FB75A3E485A063C6935306D6EC2A059A8775AA26915F558D6EA94E7ECEAD1A6DAC54FB584F9C5DAB04D9DCA243CD0751172EDDAE43855316E270B9B31CB33BCCC85FE73629C1791F32E92983E983537E44F749A975473D5226BDAA55303D92F749E48DC26D88BD7F50F9AFB43489F34F252014318912F013C86F68E31C5F1233783F4CDD74F8BB7B1AB0F5811B1F94F91E0F512B131E85D2ED3973A7080EBE164E713D56CAF32969C5C97FCB245BDFC67BCF314E4A2F032C452FB4AC57C271D99E3599254D796912761B6651EB5A4458DC66DE316488394A0A648F3AE0F358B96629BE10251AD9305F5E1BA00DEB2F94C17D180B8A295C02710F1D5E9C95D69CA8D936066665E5AD14E4E5473744B2F3DFF7B4A023DD3AC9D6D27
tmp_aes_key = 1407755E0E6988432A52EEE9A218358F8EBE6DD36C815123E3FC9D373433B534
tmp_aes_iv = 14B31DFE04F8334F78AFC84A129CB7588957F58978B9459AA369143085E6D9B6</code></pre>
<pre><code>encrypted_answer = 2DD10108247BC02A26B49C83A68AF6B13329A03CF6CADF9BC3427D11D015CD2CA486E72C6E70DC44305538FBC2E0E0B013D723A1BAFEEAB48BD01D74EAD9E91C612965434991A7F53A9635F32FACA118CBEE3A1485457312A3650F1201A64E11EE614A7EE0A20898DB6B3DA0D9A1A992C3B7C5CFADC69F6E0181994289A68D598B2D6F706453F883A5CB581E9BE2ABF37C501EAE51135FD71FE7B2F321DC24A7CCBFE97A97CA0747F5E80D6E737A5A48D65F6B1A9AFB563692E1C367649CDB5EF6CF1816E417C121C97F87FC173FD9941EC943690E5D579C7A572EB3D4113656ECCA076ABEF8F21986289E8D48B0556075735C9AE26F3B8AC99C33CCC248F87342D1E52E359417B0158CEEB0620F2C2E28775F88B56B968879CD47510072A4FD277A9339525713CEA1A19E1846B2C97D4EE21DD674B2E2D295E8AB416124C68CEF78FDCCE8777A4980A7FEF3EEFD363424F1803F3207BFF8A72F1C315E75696412FAF7AD62C6BAFF1BED42BD4CD703190F827F61E870280755350BD0ED4C69923DC0ACBCEA475783EADC31744604911AB0C054AA1E74DAD06C083B14162417639FDAF61480A5E002FCBA7D9C0EE1246AF28B966B4ECE02974473E27C0F2A120F6197890FC2AE5CC8F7D8211CBC92BF090B1855FF0C78DAB89D306F218C8A798A7B532755BBE7D6A71C2AFC3D32F5166DC887A1150ABC11D0E1DE6D1CEE88D1D46E9AC9BA6F8EBCCFC0E4E634C22CE6F6BF4EFC18CB201ECAF3DD1716FC5007BC6BB66221DC221BE6595496F231268BEFBB6DDF9F8EA6120DD1CA745FECB13A1344BF3DF238BC3305D2C8944DF38EB370
tmp_aes_key = 90B448A39F3C8681ACE767470201D93D0763A9863A333E49438C990FC881A2DB
tmp_aes_iv = E24C9ADD7896815475F5D99A4401D0F47A4C56DD50355376E1560763BD50A74D</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 386B85282691C408104D39506AF67A43DB3BF4AEBA0D89B54E9012C4758A36D68DB90203465D45B2BD227295FA4654EFFC025D6DBB8F2BF003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001009E5864B4238701915F5E3F0C151F7C756C4B594684FAF0AC1E9E52C94C7BC94C48852D46BDDE0DB4FF1C24229EA54289A7C0396EA302474C8EB91DB2CA08688D1FFF95296C5A1E3552E779C7AF3F22A9390194BC30BFB385614DA0A9542BAB0422C63BE58E7FEDE7DD455F328187DAD9342AFF968612481C25377AD346326062655BD87FB1528CA28598862AD25FBE2EF8FA779877DBD633E1836C0DA980AA51E973D3F0CA590D9C4234ED82FF8798F9FE047A15794399E849B3605FC8D6D1F85AF6E7A6645468293E86BAB873F6BA228B349EDF53118550862934FAB1766839C58C0C0396FAE1154427C90F415F830CDB0F38CF6A24ED174757DFFFE8F1AD5181738966F8B51CD67E005080
answer = BA0D89B54E9012C4758A36D68DB90203465D45B2BD227295FA4654EFFC025D6DBB8F2BF003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001009E5864B4238701915F5E3F0C151F7C756C4B594684FAF0AC1E9E52C94C7BC94C48852D46BDDE0DB4FF1C24229EA54289A7C0396EA302474C8EB91DB2CA08688D1FFF95296C5A1E3552E779C7AF3F22A9390194BC30BFB385614DA0A9542BAB0422C63BE58E7FEDE7DD455F328187DAD9342AFF968612481C25377AD346326062655BD87FB1528CA28598862AD25FBE2EF8FA779877DBD633E1836C0DA980AA51E973D3F0CA590D9C4234ED82FF8798F9FE047A15794399E849B3605FC8D6D1F85AF6E7A6645468293E86BAB873F6BA228B349EDF53118550862934FAB1766839C58C0C0396FAE1154427C90F415F830CDB0F38CF6A24ED174757DFFFE8F1AD5181738966F8B51CD67E005080</code></pre>
<pre><code>answer_with_hash = 2F9DE8C7F2ECA589AF0B1F614DFF3832DD17A401BA0D89B523004DB02EA432B45142F9A4B3F8D2DC1EB75D370DC0B6229BADAA07F8A0C99403000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010074AF2B1581DAA3356CEC52AE21B3341BEE6BB53BC9BE29F80FC653B369EEC8C5B5199C178EC52E47A52C99F07977D148E3499AEEB7A99A41CF8FBA55F0CB5B62483E4F5843ACAB6C985C58E6655A063240387E389223D8D7C01EF69C72573766304DDFE0C9B826005D10A64991E846F3BF765CDC74C63F7BE736928C266C5807FEE64820B907E6EFEDF75BA05896CC9CECF458D3A384846EE35E79258AC0C150C681831ED501AE4C7DCBA4EA1673F6FEC3919752D4F3A6733B81F56E9C6707FB96B9D6EB88E01E03175446D1DFCAB90E954A0AE3C670B9D87BA2CDF11D948DE41C04A7E3EF7EB77795B9F54AAACB5297A66642ADEF7499A799DCB2DC197E1D408B788966B8E1C758A95D0E01
answer = BA0D89B523004DB02EA432B45142F9A4B3F8D2DC1EB75D370DC0B6229BADAA07F8A0C99403000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010074AF2B1581DAA3356CEC52AE21B3341BEE6BB53BC9BE29F80FC653B369EEC8C5B5199C178EC52E47A52C99F07977D148E3499AEEB7A99A41CF8FBA55F0CB5B62483E4F5843ACAB6C985C58E6655A063240387E389223D8D7C01EF69C72573766304DDFE0C9B826005D10A64991E846F3BF765CDC74C63F7BE736928C266C5807FEE64820B907E6EFEDF75BA05896CC9CECF458D3A384846EE35E79258AC0C150C681831ED501AE4C7DCBA4EA1673F6FEC3919752D4F3A6733B81F56E9C6707FB96B9D6EB88E01E03175446D1DFCAB90E954A0AE3C670B9D87BA2CDF11D948DE41C04A7E3EF7EB77795B9F54AAACB5297A66642ADEF7499A799DCB2DC197E1D408B788966B8E1C758A95D0E01</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 4E 90 12 C4 75 8A 36 D6 8D B9 02 03
0010 | 46 5D 45 B2 BD 22 72 95 FA 46 54 EF FC 02 5D 6D
0020 | BB 8F 2B F0 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 23 00 4D B0 2E A4 32 B4 51 42 F9 A4
0010 | B3 F8 D2 DC 1E B7 5D 37 0D C0 B6 22 9B AD AA 07
0020 | F8 A0 C9 94 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 = BA0D89B54E9012C4758A36D68DB90203465D45B2BD227295FA4654EFFC025D6DBB8F2BF
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 | 9E 58 64 B4 23 87 01 91 5F 5E 3F 0C 15 1F 7C 75
0140 | 6C 4B 59 46 84 FA F0 AC 1E 9E 52 C9 4C 7B C9 4C
0150 | 48 85 2D 46 BD DE 0D B4 FF 1C 24 22 9E A5 42 89
0160 | A7 C0 39 6E A3 02 47 4C 8E B9 1D B2 CA 08 68 8D
0170 | 1F FF 95 29 6C 5A 1E 35 52 E7 79 C7 AF 3F 22 A9
0180 | 39 01 94 BC 30 BF B3 85 61 4D A0 A9 54 2B AB 04
0190 | 22 C6 3B E5 8E 7F ED E7 DD 45 5F 32 81 87 DA D9
01A0 | 34 2A FF 96 86 12 48 1C 25 37 7A D3 46 32 60 62
01B0 | 65 5B D8 7F B1 52 8C A2 85 98 86 2A D2 5F BE 2E
01C0 | F8 FA 77 98 77 DB D6 33 E1 83 6C 0D A9 80 AA 51
01D0 | E9 73 D3 F0 CA 59 0D 9C 42 34 ED 82 FF 87 98 F9
01E0 | FE 04 7A 15 79 43 99 E8 49 B3 60 5F C8 D6 D1 F8
01F0 | 5A F6 E7 A6 64 54 68 29 3E 86 BA B8 73 F6 BA 22
0200 | 8B 34 9E DF 53 11 85 50 86 29 34 FA B1 76 68 39
0210 | C5 8C 0C 03 96 FA E1 15 44 27 C9 0F 41 5F 83 0C
0220 | DB 0F 38 CF 6A 24 ED 17 47 57 DF FF E8 F1 AD 51
0230 | 81 73 89 66</code></pre>
0130 | 74 AF 2B 15 81 DA A3 35 6C EC 52 AE 21 B3 34 1B
0140 | EE 6B B5 3B C9 BE 29 F8 0F C6 53 B3 69 EE C8 C5
0150 | B5 19 9C 17 8E C5 2E 47 A5 2C 99 F0 79 77 D1 48
0160 | E3 49 9A EE B7 A9 9A 41 CF 8F BA 55 F0 CB 5B 62
0170 | 48 3E 4F 58 43 AC AB 6C 98 5C 58 E6 65 5A 06 32
0180 | 40 38 7E 38 92 23 D8 D7 C0 1E F6 9C 72 57 37 66
0190 | 30 4D DF E0 C9 B8 26 00 5D 10 A6 49 91 E8 46 F3
01A0 | BF 76 5C DC 74 C6 3F 7B E7 36 92 8C 26 6C 58 07
01B0 | FE E6 48 20 B9 07 E6 EF ED F7 5B A0 58 96 CC 9C
01C0 | EC F4 58 D3 A3 84 84 6E E3 5E 79 25 8A C0 C1 50
01D0 | C6 81 83 1E D5 01 AE 4C 7D CB A4 EA 16 73 F6 FE
01E0 | C3 91 97 52 D4 F3 A6 73 3B 81 F5 6E 9C 67 07 FB
01F0 | 96 B9 D6 EB 88 E0 1E 03 17 54 46 D1 DF CA B9 0E
0200 | 95 4A 0A E3 C6 70 B9 D8 7B A2 CD F1 1D 94 8D E4
0210 | 1C 04 A7 E3 EF 7E B7 77 95 B9 F5 4A AA CB 52 97
0220 | A6 66 42 AD EF 74 99 A7 99 DC B2 DC 19 7E 1D 40
0230 | 8B 78 89 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 = BA0D89B54E9012C4758A36D68DB90203465D45B2BD227295FA4654EFFC025D6DBB8F2BF
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>4E9012C4758A36D68DB90203465D45B2</code></td>
<td><code>23004DB02EA432B45142F9A4B3F8D2DC</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>BD227295FA4654EFFC025D6DBB8F2BF0</code></td>
<td><code>1EB75D370DC0B6229BADAA07F8A0C994</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B54E9012C4758A36D68DB90203465D45B2BD227295FA4654EFFC025D6DBB8F2BF
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE0001009E5864B4238701915F5E3F0C</code> <code>151F7C756C4B594684FAF0AC1E9E52C9</code> <code>4C7BC94C48852D46BDDE0DB4FF1C2422</code> <code>9EA54289A7C0396EA302474C8EB91DB2</code> <code>CA08688D1FFF95296C5A1E3552E779C7</code> <code>AF3F22A9390194BC30BFB385614DA0A9</code> <code>542BAB0422C63BE58E7FEDE7DD455F32</code> <code>8187DAD9342AFF968612481C25377AD3</code> <code>46326062655BD87FB1528CA28598862A</code> <code>D25FBE2EF8FA779877DBD633E1836C0D</code> <code>A980AA51E973D3F0CA590D9C4234ED82</code> <code>FF8798F9FE047A15794399E849B3605F</code> <code>C8D6D1F85AF6E7A6645468293E86BAB8</code> <code>73F6BA228B349EDF53118550862934FA</code> <code>B1766839C58C0C0396FAE1154427C90F</code> <code>415F830CDB0F38CF6A24ED174757DFFF</code><br> <code>E8F1AD51</code></td>
<td><code>FE00010074AF2B1581DAA3356CEC52AE</code> <code>21B3341BEE6BB53BC9BE29F80FC653B3</code> <code>69EEC8C5B5199C178EC52E47A52C99F0</code> <code>7977D148E3499AEEB7A99A41CF8FBA55</code> <code>F0CB5B62483E4F5843ACAB6C985C58E6</code> <code>655A063240387E389223D8D7C01EF69C</code> <code>72573766304DDFE0C9B826005D10A649</code> <code>91E846F3BF765CDC74C63F7BE736928C</code> <code>266C5807FEE64820B907E6EFEDF75BA0</code> <code>5896CC9CECF458D3A384846EE35E7925</code> <code>8AC0C150C681831ED501AE4C7DCBA4EA</code> <code>1673F6FEC3919752D4F3A6733B81F56E</code> <code>9C6707FB96B9D6EB88E01E03175446D1</code> <code>DFCAB90E954A0AE3C670B9D87BA2CDF1</code> <code>1D948DE41C04A7E3EF7EB77795B9F54A</code> <code>AACB5297A66642ADEF7499A799DCB2DC</code><br> <code>197E1D40</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>81738966</code> (1720284033 in decimal)</td>
<td><code>8B788966</code> (1720285323 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B54E9012C4758A36D68DB90203465D45B2BD227295FA4654EFFC025D6DBB8F2BF
<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 = 47E68614CF64E8E9D0298500461EAD1C2D252BCF7BB6355625F0A697BCD99B5D8002D9990B49E32F13A679E3CA4EA7058362C6B8EC0E9A06A35446C94D9CA7F1B3718B28B46ECC4D88D9142BFA05A1047AB525E7E5AA813E2C494F29E1AAA74DD08785E7FEB750E571B661C3223AB7E3F5E012C2A1E6122341F729BD5CA513EF6B110425EEC0BC1F025575EFA91710D17DEB7B8F940DD10B1139907C2A11B9F85B239F1428FE468C6170D14BFB1094F31C29A8031752A5EF345DE5D2E0EFE240A51DA52CBCDB526C305F1B7D373A4AAC20C075463C566D0B73D00D203BE974056736492C9D4308123117285E0303A7041B2D27721DB2E3668602F1914448C1AA</code></pre>
<pre><code>b = B9526D6395ED9ED7DFF9B61C5A8F851A051AFC039B18239677FF5E86E70CC9945C30263D33AB8A7FEB2EFF68CC545DC43C5F573FC7248ECE6951E1375A7D58279BBCA6EACCB020F060022F6E1AAE14D3B711A666BB7B1629BA6463D591ABDDE89BF7FFAE62A0A9126627ACAD451ADD06103EB4805C20E4123C05CBA5473B76D2D85479BB1D11E3F4A7E93DA9EAA5D9589C1D5A6AC85F42E1E37CB7C82BA176A57E3B3FFA0EA83EA81A27BFC7497461E56E64CFA9C4230FEE0E56CFA893C0901F736A032A896BB323F0BD07C01BCCEA81F7574462145CB96BD817EC1E833DB002480C11214129039B524EFE5E5E422A1662B9DCFBAF986AA37DA952F74405C289</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 = 31EC02D76AAA2A359CC98FDD91C178D2A41BA1C64F79B530D93F9CCA03E8C2F9F7669A289511D14988D1566F0022C0E85848598C2D08AA459E7A156552FA4AEA8AB642744E6C405E5D736C72B780E2B142840D9A642810EBB01B2854B9991834329A0900B30AE6B80A1D545CD153FBAC10F51D83AC7EC972176C3C77EAA1D647A8F3B5500A5151C4E2944B5A0A0472A2F753D5C7E4ADAC4F70636D5CD1B47C9671B1CF787294A035830A3062C2C1EFC991177E92CF77239D20C18841894081F05302FF9AF15791CFC4022AD644127C3E9D6598FA793B8B4A589509A2005E0E340CF46D112C4CA7BB20B1179432E60B8EB0570279D783344D0CFB006ED7858C97</code></pre>
<pre><code>g_b = 0A769804311C255AB78311A004EF08F9EC3906A8547D8DA7552B9A79CF186D5C1B9E7C5050EC833169DF93046892A83A759DB47E8B0B978E51D1652D6B44F6787EDD3948D584343D9E119C45E0D577167727750E3F1964FD62CD3E4E6910E8FFBFCBC61A65425053CF3BB82E763737D0A36DB84823C6404E07CFE41103A390D5093EB1B568A92CC00C136C21FF373CEE2E006E978815CBF5AD0ABF5A2E958C03FEECC1B208337B3ABB9A126FD7D7B6BB4CDD690790B66BBEEE2FACA30E1BC3DE6F7C876EDE7F1CB2E896CFAB0D962F1C363B8F3A8E24C24A7017A3E905A3C1E182559C9B4FB91754B94CDEA17BC87062512F218F0C674135A3F38D33629887F3</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 4E 90 12 C4 75 8A 36 D6 8D B9 02 03
0010 | 46 5D 45 B2 BD 22 72 95 FA 46 54 EF FC 02 5D 6D
0020 | BB 8F 2B F0 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 31 EC 02 D7 6A AA 2A 35 9C C9 8F DD 91 C1 78 D2
0040 | A4 1B A1 C6 4F 79 B5 30 D9 3F 9C CA 03 E8 C2 F9
0050 | F7 66 9A 28 95 11 D1 49 88 D1 56 6F 00 22 C0 E8
0060 | 58 48 59 8C 2D 08 AA 45 9E 7A 15 65 52 FA 4A EA
0070 | 8A B6 42 74 4E 6C 40 5E 5D 73 6C 72 B7 80 E2 B1
0080 | 42 84 0D 9A 64 28 10 EB B0 1B 28 54 B9 99 18 34
0090 | 32 9A 09 00 B3 0A E6 B8 0A 1D 54 5C D1 53 FB AC
00A0 | 10 F5 1D 83 AC 7E C9 72 17 6C 3C 77 EA A1 D6 47
00B0 | A8 F3 B5 50 0A 51 51 C4 E2 94 4B 5A 0A 04 72 A2
00C0 | F7 53 D5 C7 E4 AD AC 4F 70 63 6D 5C D1 B4 7C 96
00D0 | 71 B1 CF 78 72 94 A0 35 83 0A 30 62 C2 C1 EF C9
00E0 | 91 17 7E 92 CF 77 23 9D 20 C1 88 41 89 40 81 F0
00F0 | 53 02 FF 9A F1 57 91 CF C4 02 2A D6 44 12 7C 3E
0100 | 9D 65 98 FA 79 3B 8B 4A 58 95 09 A2 00 5E 0E 34
0110 | 0C F4 6D 11 2C 4C A7 BB 20 B1 17 94 32 E6 0B 8E
0120 | B0 57 02 79 D7 83 34 4D 0C FB 00 6E D7 85 8C 97</code></pre>
<pre><code>0000 | 54 B6 43 66 23 00 4D B0 2E A4 32 B4 51 42 F9 A4
0010 | B3 F8 D2 DC 1E B7 5D 37 0D C0 B6 22 9B AD AA 07
0020 | F8 A0 C9 94 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 0A 76 98 04 31 1C 25 5A B7 83 11 A0 04 EF 08 F9
0040 | EC 39 06 A8 54 7D 8D A7 55 2B 9A 79 CF 18 6D 5C
0050 | 1B 9E 7C 50 50 EC 83 31 69 DF 93 04 68 92 A8 3A
0060 | 75 9D B4 7E 8B 0B 97 8E 51 D1 65 2D 6B 44 F6 78
0070 | 7E DD 39 48 D5 84 34 3D 9E 11 9C 45 E0 D5 77 16
0080 | 77 27 75 0E 3F 19 64 FD 62 CD 3E 4E 69 10 E8 FF
0090 | BF CB C6 1A 65 42 50 53 CF 3B B8 2E 76 37 37 D0
00A0 | A3 6D B8 48 23 C6 40 4E 07 CF E4 11 03 A3 90 D5
00B0 | 09 3E B1 B5 68 A9 2C C0 0C 13 6C 21 FF 37 3C EE
00C0 | 2E 00 6E 97 88 15 CB F5 AD 0A BF 5A 2E 95 8C 03
00D0 | FE EC C1 B2 08 33 7B 3A BB 9A 12 6F D7 D7 B6 BB
00E0 | 4C DD 69 07 90 B6 6B BE EE 2F AC A3 0E 1B C3 DE
00F0 | 6F 7C 87 6E DE 7F 1C B2 E8 96 CF AB 0D 96 2F 1C
0100 | 36 3B 8F 3A 8E 24 C2 4A 70 17 A3 E9 05 A3 C1 E1
0110 | 82 55 9C 9B 4F B9 17 54 B9 4C DE A1 7B C8 70 62
0120 | 51 2F 21 8F 0C 67 41 35 A3 F3 8D 33 62 98 87 F3</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 = BA0D89B54E9012C4758A36D68DB90203465D45B2BD227295FA4654EFFC025D6DBB8F2BF
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>4E9012C4758A36D68DB90203465D45B2</code></td>
<td><code>23004DB02EA432B45142F9A4B3F8D2DC</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>BD227295FA4654EFFC025D6DBB8F2BF0</code></td>
<td><code>1EB75D370DC0B6229BADAA07F8A0C994</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE00010031EC02D76AAA2A359CC98FDD</code> <code>91C178D2A41BA1C64F79B530D93F9CCA</code> <code>03E8C2F9F7669A289511D14988D1566F</code> <code>0022C0E85848598C2D08AA459E7A1565</code> <code>52FA4AEA8AB642744E6C405E5D736C72</code> <code>B780E2B142840D9A642810EBB01B2854</code> <code>B9991834329A0900B30AE6B80A1D545C</code> <code>D153FBAC10F51D83AC7EC972176C3C77</code> <code>EAA1D647A8F3B5500A5151C4E2944B5A</code> <code>0A0472A2F753D5C7E4ADAC4F70636D5C</code> <code>D1B47C9671B1CF787294A035830A3062</code> <code>C2C1EFC991177E92CF77239D20C18841</code> <code>894081F05302FF9AF15791CFC4022AD6</code> <code>44127C3E9D6598FA793B8B4A589509A2</code> <code>005E0E340CF46D112C4CA7BB20B11794</code> <code>32E60B8EB0570279D783344D0CFB006E</code><br> <code>D7858C97</code></td>
<td><code>FE0001000A769804311C255AB78311A0</code> <code>04EF08F9EC3906A8547D8DA7552B9A79</code> <code>CF186D5C1B9E7C5050EC833169DF9304</code> <code>6892A83A759DB47E8B0B978E51D1652D</code> <code>6B44F6787EDD3948D584343D9E119C45</code> <code>E0D577167727750E3F1964FD62CD3E4E</code> <code>6910E8FFBFCBC61A65425053CF3BB82E</code> <code>763737D0A36DB84823C6404E07CFE411</code> <code>03A390D5093EB1B568A92CC00C136C21</code> <code>FF373CEE2E006E978815CBF5AD0ABF5A</code> <code>2E958C03FEECC1B208337B3ABB9A126F</code> <code>D7D7B6BB4CDD690790B66BBEEE2FACA3</code> <code>0E1BC3DE6F7C876EDE7F1CB2E896CFAB</code> <code>0D962F1C363B8F3A8E24C24A7017A3E9</code> <code>05A3C1E182559C9B4FB91754B94CDEA1</code> <code>7BC87062512F218F0C674135A3F38D33</code><br> <code>629887F3</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 = BA0D89B54E9012C4758A36D68DB90203465D45B2BD227295FA4654EFFC025D6DBB8F2BF
<!-- 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 = 54B643664E9012C4758A36D68DB90203465D45B2BD227295FA4654EFFC025D6DBB8F2BF00000000000000000FE00010031EC02D76AAA2A359CC98FDD91C178D2A41BA1C64F79B530D93F9CCA03E8C2F9F7669A289511D14988D1566F0022C0E85848598C2D08AA459E7A156552FA4AEA8AB642744E6C405E5D736C72B780E2B142840D9A642810EBB01B2854B9991834329A0900B30AE6B80A1D545CD153FBAC10F51D83AC7EC972176C3C77EAA1D647A8F3B5500A5151C4E2944B5A0A0472A2F753D5C7E4ADAC4F70636D5CD1B47C9671B1CF787294A035830A3062C2C1EFC991177E92CF77239D20C18841894081F05302FF9AF15791CFC4022AD644127C3E9D6598FA793B8B4A589509A2005E0E340CF46D112C4CA7BB20B1179432E60B8EB0570279D783344D0CFB006ED7858C97
padding = 60A8C139AA65EB15A4B46B1B
tmp_aes_key = 1407755E0E6988432A52EEE9A218358F8EBE6DD36C815123E3FC9D373433B534
tmp_aes_iv = 14B31DFE04F8334F78AFC84A129CB7588957F58978B9459AA369143085E6D9B6</code></pre>
<pre><code>data = 54B6436623004DB02EA432B45142F9A4B3F8D2DC1EB75D370DC0B6229BADAA07F8A0C9940000000000000000FE0001000A769804311C255AB78311A004EF08F9EC3906A8547D8DA7552B9A79CF186D5C1B9E7C5050EC833169DF93046892A83A759DB47E8B0B978E51D1652D6B44F6787EDD3948D584343D9E119C45E0D577167727750E3F1964FD62CD3E4E6910E8FFBFCBC61A65425053CF3BB82E763737D0A36DB84823C6404E07CFE41103A390D5093EB1B568A92CC00C136C21FF373CEE2E006E978815CBF5AD0ABF5A2E958C03FEECC1B208337B3ABB9A126FD7D7B6BB4CDD690790B66BBEEE2FACA30E1BC3DE6F7C876EDE7F1CB2E896CFAB0D962F1C363B8F3A8E24C24A7017A3E905A3C1E182559C9B4FB91754B94CDEA17BC87062512F218F0C674135A3F38D33629887F3
padding = 36171DEE20476DCDC51A6942
tmp_aes_key = 90B448A39F3C8681ACE767470201D93D0763A9863A333E49438C990FC881A2DB
tmp_aes_iv = E24C9ADD7896815475F5D99A4401D0F47A4C56DD50355376E1560763BD50A74D</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 = 755639CAEC9E04D1755E20C8D621A8390DB6FC9CC1CBF50D830F31930C8381CB1DA491B3012457A93C6697CF6B4D332858D6E7A1100A384D4F6385895832FB1FB87DAB29993FDA09F4BB9CD997E6702AF358794AAAAAB2FA21A55632098295588B13F1399F0F77CDCA1E2D5CFDE833F5BCE1C9FA578D74CC53E494FD4DADBE6C231A722E4085B8A283F3586456991D592861BEBE8B406EE621DFD0FD8FA710FC20F87E7395CF01E79358C3B7DE311D6BBE436D41E1DCA7667BA3FD941806872881BD1C7AE13606FFBE7B70E0A868037C264D7C77F2AE1C5B0E64295F3B1D5109DC356C2ED36D80E020148A8174F5E31B34D9BF5CD8FDC08E449D62A5DC0B33BF86E95E9A8D90ECA849D39DE9C7FC129C363D0C876B18A150C01A306E71AA5DFB51462EADF6A918A43559B9E1B12E244386B75755C80AD509075A327E124167712E513C84811B860FECA1FD56BF4E16AB</code></pre>
<pre><code>encrypted_data = 11D37CB7A0AECE95AC2D93938D9F3AA0465E9FC216D9081915C1820F336450C77B951DD024ECCBAD3F69D25030CA8C963BDF41C8DF1F5DE536990AA3A444AA3E4D726DA0F631AF4D3A3122090C6F287FB282109C690684D6C19E79BC18EA3D417A829EA7E09E596DE3F87E0BC8355ED5708080F3937023D08D6A4AA84C6817C8F458B490A2E01F44F26DA712208055C95F0AB2AC5A9E2F002DF51157F7D70E37EC1656A1C8C9EC14DBAD72CE75E6B9121759B55B1CEE6E2C5E5AF9643BBAF6B2555A6182B509600698D618DA9131B7E3CAAEB341A0FC929EB19B1BBD2E878B56BF9A9D25FDCBD6F2E774AF95CABF7D41F6352D1E0CC38460129AC4E17A587145A994FB2A44B8DE8FE7DAB98D6DBA78AEB7EF9B3F9D27E859B80E28C22764BEB9A135850769DBB018C1D8A8527533FF285C928D7F1FC957979C9CE87C98CDA8994BAF2EEECEBEEF397FE539B14E0A2452</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 EC 6A 0E 00 81 73 89 66
0010 | 78 01 00 00 1F 5F 04 F5 4E 90 12 C4 75 8A 36 D6
0020 | 8D B9 02 03 46 5D 45 B2 BD 22 72 95 FA 46 54 EF
0030 | FC 02 5D 6D BB 8F 2B F0 FE 50 01 00 75 56 39 CA
0040 | EC 9E 04 D1 75 5E 20 C8 D6 21 A8 39 0D B6 FC 9C
0050 | C1 CB F5 0D 83 0F 31 93 0C 83 81 CB 1D A4 91 B3
0060 | 01 24 57 A9 3C 66 97 CF 6B 4D 33 28 58 D6 E7 A1
0070 | 10 0A 38 4D 4F 63 85 89 58 32 FB 1F B8 7D AB 29
0080 | 99 3F DA 09 F4 BB 9C D9 97 E6 70 2A F3 58 79 4A
0090 | AA AA B2 FA 21 A5 56 32 09 82 95 58 8B 13 F1 39
00A0 | 9F 0F 77 CD CA 1E 2D 5C FD E8 33 F5 BC E1 C9 FA
00B0 | 57 8D 74 CC 53 E4 94 FD 4D AD BE 6C 23 1A 72 2E
00C0 | 40 85 B8 A2 83 F3 58 64 56 99 1D 59 28 61 BE BE
00D0 | 8B 40 6E E6 21 DF D0 FD 8F A7 10 FC 20 F8 7E 73
00E0 | 95 CF 01 E7 93 58 C3 B7 DE 31 1D 6B BE 43 6D 41
00F0 | E1 DC A7 66 7B A3 FD 94 18 06 87 28 81 BD 1C 7A
0100 | E1 36 06 FF BE 7B 70 E0 A8 68 03 7C 26 4D 7C 77
0110 | F2 AE 1C 5B 0E 64 29 5F 3B 1D 51 09 DC 35 6C 2E
0120 | D3 6D 80 E0 20 14 8A 81 74 F5 E3 1B 34 D9 BF 5C
0130 | D8 FD C0 8E 44 9D 62 A5 DC 0B 33 BF 86 E9 5E 9A
0140 | 8D 90 EC A8 49 D3 9D E9 C7 FC 12 9C 36 3D 0C 87
0150 | 6B 18 A1 50 C0 1A 30 6E 71 AA 5D FB 51 46 2E AD
0160 | F6 A9 18 A4 35 59 B9 E1 B1 2E 24 43 86 B7 57 55
0170 | C8 0A D5 09 07 5A 32 7E 12 41 67 71 2E 51 3C 84
0180 | 81 1B 86 0F EC A1 FD 56 BF 4E 16 AB</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 6C 3F 0A 00 8B 78 89 66
0010 | 78 01 00 00 1F 5F 04 F5 23 00 4D B0 2E A4 32 B4
0020 | 51 42 F9 A4 B3 F8 D2 DC 1E B7 5D 37 0D C0 B6 22
0030 | 9B AD AA 07 F8 A0 C9 94 FE 50 01 00 11 D3 7C B7
0040 | A0 AE CE 95 AC 2D 93 93 8D 9F 3A A0 46 5E 9F C2
0050 | 16 D9 08 19 15 C1 82 0F 33 64 50 C7 7B 95 1D D0
0060 | 24 EC CB AD 3F 69 D2 50 30 CA 8C 96 3B DF 41 C8
0070 | DF 1F 5D E5 36 99 0A A3 A4 44 AA 3E 4D 72 6D A0
0080 | F6 31 AF 4D 3A 31 22 09 0C 6F 28 7F B2 82 10 9C
0090 | 69 06 84 D6 C1 9E 79 BC 18 EA 3D 41 7A 82 9E A7
00A0 | E0 9E 59 6D E3 F8 7E 0B C8 35 5E D5 70 80 80 F3
00B0 | 93 70 23 D0 8D 6A 4A A8 4C 68 17 C8 F4 58 B4 90
00C0 | A2 E0 1F 44 F2 6D A7 12 20 80 55 C9 5F 0A B2 AC
00D0 | 5A 9E 2F 00 2D F5 11 57 F7 D7 0E 37 EC 16 56 A1
00E0 | C8 C9 EC 14 DB AD 72 CE 75 E6 B9 12 17 59 B5 5B
00F0 | 1C EE 6E 2C 5E 5A F9 64 3B BA F6 B2 55 5A 61 82
0100 | B5 09 60 06 98 D6 18 DA 91 31 B7 E3 CA AE B3 41
0110 | A0 FC 92 9E B1 9B 1B BD 2E 87 8B 56 BF 9A 9D 25
0120 | FD CB D6 F2 E7 74 AF 95 CA BF 7D 41 F6 35 2D 1E
0130 | 0C C3 84 60 12 9A C4 E1 7A 58 71 45 A9 94 FB 2A
0140 | 44 B8 DE 8F E7 DA B9 8D 6D BA 78 AE B7 EF 9B 3F
0150 | 9D 27 E8 59 B8 0E 28 C2 27 64 BE B9 A1 35 85 07
0160 | 69 DB B0 18 C1 D8 A8 52 75 33 FF 28 5C 92 8D 7F
0170 | 1F C9 57 97 9C 9C E8 7C 98 CD A8 99 4B AF 2E EE
0180 | CE BE EF 39 7F E5 39 B1 4E 0A 24 52</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>EC6A0E0081738966</code></td>
<td><code>6C3F0A008B788966</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4E9012C4758A36D68DB90203465D45B2</code></td>
<td><code>23004DB02EA432B45142F9A4B3F8D2DC</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>BD227295FA4654EFFC025D6DBB8F2BF0</code></td>
<td><code>1EB75D370DC0B6229BADAA07F8A0C994</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100755639CAEC9E04D1755E20C8</code> <code>D621A8390DB6FC9CC1CBF50D830F3193</code> <code>0C8381CB1DA491B3012457A93C6697CF</code> <code>6B4D332858D6E7A1100A384D4F638589</code> <code>5832FB1FB87DAB29993FDA09F4BB9CD9</code> <code>97E6702AF358794AAAAAB2FA21A55632</code> <code>098295588B13F1399F0F77CDCA1E2D5C</code> <code>FDE833F5BCE1C9FA578D74CC53E494FD</code> <code>4DADBE6C231A722E4085B8A283F35864</code> <code>56991D592861BEBE8B406EE621DFD0FD</code> <code>8FA710FC20F87E7395CF01E79358C3B7</code> <code>DE311D6BBE436D41E1DCA7667BA3FD94</code> <code>1806872881BD1C7AE13606FFBE7B70E0</code> <code>A868037C264D7C77F2AE1C5B0E64295F</code> <code>3B1D5109DC356C2ED36D80E020148A81</code> <code>74F5E31B34D9BF5CD8FDC08E449D62A5</code> <code>DC0B33BF86E95E9A8D90ECA849D39DE9</code> <code>C7FC129C363D0C876B18A150C01A306E</code> <code>71AA5DFB51462EADF6A918A43559B9E1</code> <code>B12E244386B75755C80AD509075A327E</code> <code>124167712E513C84811B860FECA1FD56</code><br> <code>BF4E16AB</code></td>
<td><code>FE50010011D37CB7A0AECE95AC2D9393</code> <code>8D9F3AA0465E9FC216D9081915C1820F</code> <code>336450C77B951DD024ECCBAD3F69D250</code> <code>30CA8C963BDF41C8DF1F5DE536990AA3</code> <code>A444AA3E4D726DA0F631AF4D3A312209</code> <code>0C6F287FB282109C690684D6C19E79BC</code> <code>18EA3D417A829EA7E09E596DE3F87E0B</code> <code>C8355ED5708080F3937023D08D6A4AA8</code> <code>4C6817C8F458B490A2E01F44F26DA712</code> <code>208055C95F0AB2AC5A9E2F002DF51157</code> <code>F7D70E37EC1656A1C8C9EC14DBAD72CE</code> <code>75E6B9121759B55B1CEE6E2C5E5AF964</code> <code>3BBAF6B2555A6182B509600698D618DA</code> <code>9131B7E3CAAEB341A0FC929EB19B1BBD</code> <code>2E878B56BF9A9D25FDCBD6F2E774AF95</code> <code>CABF7D41F6352D1E0CC38460129AC4E1</code> <code>7A587145A994FB2A44B8DE8FE7DAB98D</code> <code>6DBA78AEB7EF9B3F9D27E859B80E28C2</code> <code>2764BEB9A135850769DBB018C1D8A852</code> <code>7533FF285C928D7F1FC957979C9CE87C</code> <code>98CDA8994BAF2EEECEBEEF397FE539B1</code><br> <code>4E0A2452</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 = 0ADC8517D2336D04A4806C2CF2A698699316FD20998508DA9AC10B44B0696E8465193DF3D2A2D3C848E93646899E31781B2C92A263CFA113BC7FB8B6F32C6D254020532EFCA434D4A902AFDE72A6409788E058A3722822D74C8B56DD70A921F433A34808D8D51A73F645D03AAE15F153B3A609651B68BA9B43CAFF4BC19E10839825E11F3F958D39E47BE87141856F1C10220C59EA9146DF12DEC833D1CC1F0E50F433E6BBCD289EA264FD013BBAC5DBD9338BB2D2EFF149C1A50A19C16447B915D3FAD884A00336506F6D0B153BBCACE75CFFF63A23A2993D668E873C6698645078B9CE909613CD391A2CE9C88EA309608E7FDB2137625E16809C795963F839</code></pre>
<pre><code>auth_key = 29828E34CBECB254AFFD08DA01CA16A420724BAADBF19BB49A8C6F0DB809852B20D98751847527777B0870C8F4B81EBE195D405811540568974287B2234AD99D7648EE881B4B1A8C54F4D317E1B52332059F45DFDD83B28655470CC15D59CE88AC902670AC66990E6ADD60A1459AC705BF36796C289FC8C4BB41209FDF8B917786E4E38E19A5E0EEE69098329FB3CCB37FE16CDF16424D9F6B07A5AE882FA51EBBF26F40409F0971DE744D174259CB674EE73D47E9BC60DFEAB13934CC2F204560699C2A9A5F25BC3A5908F7B9BD3AFDB384DB4E7F5F29B3F65A25EF1B2736140982A4AE9192D9EB5FEB05151F9E0BCEA41026C16ACF0E09408607B2DA6C77B0</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 B8 D4 09 82 73 89 66
0010 | 74 00 00 00 34 F7 CB 3B 4E 90 12 C4 75 8A 36 D6
0020 | 8D B9 02 03 46 5D 45 B2 BD 22 72 95 FA 46 54 EF
0030 | FC 02 5D 6D BB 8F 2B F0 0E EF 65 A8 56 1B BD 64
0040 | 55 63 BB D8 9B 45 59 14</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 4C 09 7A 8C 78 89 66
0010 | 6C 00 00 00 34 F7 CB 3B 23 00 4D B0 2E A4 32 B4
0020 | 51 42 F9 A4 B3 F8 D2 DC 1E B7 5D 37 0D C0 B6 22
0030 | 9B AD AA 07 F8 A0 C9 94 03 E5 25 2A 17 84 07 2E
0040 | 33 2B 11 DC 59 40 00 A2</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>01B8D40982738966</code></td>
<td><code>014C097A8C788966</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>74000000</code> (116 in decimal)</td>
<td><code>6C000000</code> (108 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>4E9012C4758A36D68DB90203465D45B2</code></td>
<td><code>23004DB02EA432B45142F9A4B3F8D2DC</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>BD227295FA4654EFFC025D6DBB8F2BF0</code></td>
<td><code>1EB75D370DC0B6229BADAA07F8A0C994</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>0EEF65A8561BBD645563BBD89B455914</code></td>
<td><code>03E5252A1784072E332B11DC594000A2</code></td>
<td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td>
</tr>
</tbody>

View file

@ -960,7 +960,7 @@
</tr>
<tr>
<td><a href="/method/account.updateBirthday">account.updateBirthday</a></td>
<td> </td>
<td>Update our <a href="/api/profile#birthday">birthday, see here »</a> for more info.</td>
</tr>
<tr>
<td><a href="/method/account.deleteBusinessChatLink">account.deleteBusinessChatLink</a></td>

View file

@ -118,7 +118,7 @@
</tr>
<tr>
<td><a href="/constructor/inputPrivacyKeyBirthday">inputPrivacyKeyBirthday</a></td>
<td> </td>
<td>Whether the user can see our birthday.</td>
</tr>
</tbody>
</table>