mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-05 10:34:43 +01:00
Update content of files
This commit is contained in:
parent
c632bba341
commit
124fd50eb7
18 changed files with 354 additions and 287 deletions
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Bot attachment menu entries</title>
|
||||
<title>Bot attachment menu and side menu entries</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.">
|
||||
<meta property="og:title" content="Bot attachment menu entries">
|
||||
<meta property="description" content="Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.">
|
||||
<meta property="og:title" content="Bot attachment menu and side menu entries">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.">
|
||||
<meta property="og:description" content="Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.">
|
||||
<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">
|
||||
|
@ -39,12 +39,12 @@
|
|||
<div class="container clearfix">
|
||||
<div class="dev_page">
|
||||
<div id="dev_page_content_wrap" class=" ">
|
||||
<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="/api/bots%2Fattach" >Bot attachment menu entries</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Bot attachment menu entries</h1>
|
||||
<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="/api/bots%2Fattach" >Bot attachment menu and side menu entries</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Bot attachment menu and side menu entries</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile <a href="/api/bots/webapps#normal-mini-apps">web apps</a>.</p>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile <a href="/api/bots/webapps#normal-mini-apps">web apps</a>.</p>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/user'>user</a>#abb5f120 flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> fake:flags.26?<a href='/constructor/true'>true</a> bot_attach_menu:flags.27?<a href='/constructor/true'>true</a> premium:flags.28?<a href='/constructor/true'>true</a> attach_menu_enabled:flags.29?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> bot_can_edit:flags2.1?<a href='/constructor/true'>true</a> close_friend:flags2.2?<a href='/constructor/true'>true</a> stories_hidden:flags2.3?<a href='/constructor/true'>true</a> stories_unavailable:flags2.4?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a><<a href='/type/RestrictionReason'>RestrictionReason</a>> bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> emoji_status:flags.30?<a href='/type/EmojiStatus'>EmojiStatus</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a><<a href='/type/Username'>Username</a>> stories_max_id:flags2.5?<a href='/type/int'>int</a> = <a href='/type/User'>User</a>;
|
||||
|
||||
|
@ -76,15 +76,39 @@
|
|||
<a href='/method/messages.toggleBotInAttachMenu'>messages.toggleBotInAttachMenu</a>#69f59d69 flags:<a href='/type/%23'>#</a> write_allowed:flags.0?<a href='/constructor/true'>true</a> bot:<a href='/type/InputUser'>InputUser</a> enabled:<a href='/type/Bool'>Bool</a> = <a href='/type/Bool'>Bool</a>;
|
||||
|
||||
<a href='/method/messages.getAttachMenuBots'>messages.getAttachMenuBots</a>#16fcc2cb hash:<a href='/type/long'>long</a> = <a href='/type/AttachMenuBots'>AttachMenuBots</a>;</code></pre>
|
||||
<p>Bots that have the <code>bot_attach_menu</code> flag set offer an attachment menu entry that can be added to the attachment menu. </p>
|
||||
<p>Use <a href="/method/messages.getAttachMenuBot">messages.getAttachMenuBot</a> to get info about the attachment menu entry of a given bot, see the <a href="/constructor/attachMenuBot">attachMenuBot constructor page for more info »</a>.</p>
|
||||
<p>The installed attachment menu list can be fetched using <a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a>. </p>
|
||||
<p>Use <a href="/method/messages.toggleBotInAttachMenu">messages.toggleBotInAttachMenu</a> to enable or disable the attachment menu of a given bot.<br>
|
||||
Changes made using this method will trigger an <a href="/constructor/updateAttachMenuBots">updateAttachMenuBots</a> update in other clients, which should trigger a <a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a> call to fetch the full updated list of installed attachment menu entries.<br>
|
||||
The attachment menu list should also be refreshed if the user changes the app's language in the settings. </p>
|
||||
<p>Once an attachment menu is enabled for a certain user, the <a href="/constructor/user">user</a>.<code>attach_menu_enabled</code> flag will be set <em>for the bot</em>, and the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>inactive</code> flag will be unset. </p>
|
||||
<p>Clicking on the attachment menu entry should open the related <a href="/api/bots/webapps#normal-mini-apps">bot mini app</a>, see <a href="/api/bots/webapps#normal-mini-apps">here »</a> for more info on the required steps.</p>
|
||||
<p>Attachment menus can be installed and opened through <a href="/api/links#bot-attachment-menu-links">attachment menu deep links</a>.</p></div>
|
||||
<p>Bots that have the <code>bot_attach_menu</code> flag set offer an attachment or side menu entry that can be added to the in-app attachment menu or main view side menu. </p>
|
||||
<p>Use <a href="/method/messages.getAttachMenuBot">messages.getAttachMenuBot</a> to get info about the attachment/side menu entry of a given bot, see the <a href="/constructor/attachMenuBot">attachMenuBot constructor page for more info »</a>. </p>
|
||||
<p>The currently installed attachment/side menu list can be fetched using <a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a>. </p>
|
||||
<p>Use <a href="/method/messages.toggleBotInAttachMenu">messages.toggleBotInAttachMenu</a> to enable or disable the attachment and/or side menu of a given bot (the entries that must be installed or uninstalled depend on the values of the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>show_in_attach_menu</code> and <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>show_in_side_menu</code> flags).<br>
|
||||
Changes made using this method will trigger an <a href="/constructor/updateAttachMenuBots">updateAttachMenuBots</a> update in other clients, which should trigger a <a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a> call to fetch the full updated list of installed attachment/side menu entries.<br>
|
||||
The attachment/side menu list should also be refreshed if the user changes the app's language in the settings. </p>
|
||||
<p>Once an attachment/side menu is enabled for a certain user, the <a href="/constructor/user">user</a>.<code>attach_menu_enabled</code> flag will be set <em>for the bot</em>, and the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>inactive</code> flag will be unset. </p>
|
||||
<p>Clicking on the attachment/side menu entry should open the related <a href="/api/bots/webapps#normal-mini-apps">bot mini app</a>, see <a href="/api/bots/webapps#normal-mini-apps">here »</a> for more info on the required steps.</p>
|
||||
<p>Attachment menus can be installed and opened through <a href="/api/links#bot-attachment-or-side-menu-links">attachment/side menu deep links</a>.</p>
|
||||
<p>In particular, when clicking on such a link, <a href="/method/messages.getAttachMenuBot">messages.getAttachMenuBot</a> should be invoked to check if the bot has an associated attachment/side menu entry, and if yes: </p>
|
||||
<ul>
|
||||
<li>If the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>inactive</code> flag:<ul>
|
||||
<li>...is set, the attachment/side menu entry is not installed.<br>
|
||||
Thus, before launching the mini app when clicking on a <a href="/api/links#bot-attachment-or-side-menu-links">attachment/side menu deep link</a>, the client should show a prompt to the user, asking to add the mini app to the attachment/side menu.<br>
|
||||
Note that if the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>side_menu_disclaimer</code> flag is set, an additional mandatory checkbox to accept the <a href="https://telegram.org/tos/mini-apps">mini apps TOS</a> and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown in the installation prompt.<br>
|
||||
If the user accepts, invoke <a href="/method/messages.toggleBotInAttachMenu">messages.toggleBotInAttachMenu</a> and proceed to the next step, otherwise abort the process. </li>
|
||||
<li>...is not set, proceed to the next step unconditionally. </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Open the Mini App:<ul>
|
||||
<li>If the link subtype is a <a href="/api/links#open-anywhere"><code>startapp</code> link</a>, open the Mini App regardless of the currently open Telegram chat (in fact, the Mini App should opened even if the client itself is minimized), as specified <a href="/api/bots/webapps#normal-mini-apps">here »</a>. </li>
|
||||
<li>For <a href="/api/links#bot-attachment-or-side-menu-links">any other link subtype</a>, check that the attachment menu can be opened in the chosen chat type by checking the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>peer_types</code> field. <ul>
|
||||
<li>If the chosen chat is supported, open the attachment menu <a href="/api/bots/webapps#normal-mini-apps">mini app »</a> as specified <a href="/api/bots/webapps#normal-mini-apps">here »</a>.</li>
|
||||
<li>Otherwise:<ul>
|
||||
<li>If the user has just installed the attachment menu @ step 1, notify the user that the attachment menu was installed successfully.</li>
|
||||
<li>Otherwise, notify the user that the attachment menu webapp can't be opened in the specified chat.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ Note that eventual errors will not be sent as a <code>failed</code> event if the
|
|||
<ul>
|
||||
<li>A <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> button contained in an inline keyboard identified by a <a href="/constructor/replyInlineMarkup">replyInlineMarkup</a> constructor: in this case, <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a>.<code>url</code> must be passed to <a href="/method/messages.requestWebView">messages.requestWebView</a>.<code>url</code>.</li>
|
||||
<li>A <a href="/constructor/botMenuButton">botMenuButton</a> <a href="/api/bots/menu">menu button »</a>: in this case, the <a href="/method/messages.requestWebView">messages.requestWebView</a>.<code>from_bot_menu</code> flag should be set.</li>
|
||||
<li>An <a href="/api/bots/attach">attachment menu »</a>: in this case, no special flag should be set, unless the attachment menu is opened via a with a <a href="/api/links#bot-attachment-menu-links">bot attachment menu deep link</a>, in which case the <code>start_parameter</code> should be provided to <a href="/method/messages.requestWebView">messages.requestWebView</a>.<code>start_param</code>, if present.</li>
|
||||
<li>An <a href="/api/bots/attach">attachment menu »</a>: in this case, no special flag should be set, unless the attachment menu is opened via a with a <a href="/api/links#bot-attachment-or-side-menu-links">bot attachment menu deep link</a>, in which case the <code>start_parameter</code> should be provided to <a href="/method/messages.requestWebView">messages.requestWebView</a>.<code>start_param</code>, if present.</li>
|
||||
</ul>
|
||||
<p>To open them, clients should call <a href="/method/messages.requestWebView">messages.requestWebView</a>, and then open a webview using the <code>url</code> contained in the returned <a href="/constructor/webViewResultUrl">webViewResultUrl</a>. </p>
|
||||
<p>After loading the webview, until it is closed by a <a href="/api/web-events#web-app-close">web_app_close event</a>, the user client must invoke <a href="/method/messages.prolongWebView">messages.prolongWebView</a> every 60 seconds: if the method call returns <code>QUERY_ID_INVALID</code>, the webview must be closed. </p>
|
||||
|
@ -175,7 +175,7 @@ Note that eventual errors will not be sent as a <code>failed</code> event if the
|
|||
|
||||
<a href='/method/messages.requestAppWebView'>messages.requestAppWebView</a>#8c5a3b3c flags:<a href='/type/%23'>#</a> write_allowed:flags.0?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> app:<a href='/type/InputBotApp'>InputBotApp</a> start_param:flags.1?<a href='/type/string'>string</a> theme_params:flags.2?<a href='/type/DataJSON'>DataJSON</a> platform:<a href='/type/string'>string</a> = <a href='/type/AppWebViewResult'>AppWebViewResult</a>;</code></pre>
|
||||
<p>Another way to open Mini Apps is by using <a href="/api/links#named-bot-mini-app-links">named bot Mini App links »</a>. </p>
|
||||
<p>These links are different from <a href="/api/links#bot-attachment-menu-links">bot attachment menu deep links »</a>, because they don't require the user to install an attachment menu, and a single bot can offer multiple Mini Apps, distinguished by their <code>short_name</code>. </p>
|
||||
<p>These links are different from <a href="/api/links#bot-attachment-or-side-menu-links">bot attachment menu deep links »</a>, because they don't require the user to install an attachment menu, and a single bot can offer multiple Mini Apps, distinguished by their <code>short_name</code>. </p>
|
||||
<p>These links should be handled as follows: </p>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
<a href="/method/stories.canApplyBoost">stories.canApplyBoost</a>#db05c1bd peer:<a href="/type/InputPeer">InputPeer</a> = <a href="/type/stories.CanApplyBoostResult">stories.CanApplyBoostResult</a>;
|
||||
<a href="/method/stories.applyBoost">stories.applyBoost</a>#f29d7c2b peer:<a href="/type/InputPeer">InputPeer</a> = <a href="/type/Bool">Bool</a>;<br></code></pre></div>
|
||||
<h3><a class="anchor" href="#layer-159" id="layer-159" name="layer-159"><i class="anchor-icon"></i></a><a href="/schema?layer=159">Layer 159</a></h3>
|
||||
<p>Introducing privacy settings for user bios, <a href="/api/auth#invalidating-login-codes">improved login code invalidation</a>, improved chat invites, improved <a href="/api/updates">update handling</a>, <a href="/api/sponsored-messages">sponsored websites</a> and <a href="/api/sponsored-messages#clicking-on-sponsored-messages">click reporting for sponsored messages</a>. </p>
|
||||
<p>Introducing privacy settings for user bios, <a href="/api/auth#invalidating-login-codes">improved login code invalidation</a>, improved chat invites, improved <a href="/api/updates">update handling</a>, <a href="/api/sponsored-messages">sponsored websites</a> and <a href="/api/sponsored-messages#clicking-on-sponsored-messages">click reporting for sponsored messages</a>.</p>
|
||||
<p>Also, anonymous channel admins can now vote in polls.</p>
|
||||
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
|
||||
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
|
||||
|
@ -1404,7 +1404,7 @@ Also, discussion group admins can now <a href="/api/discussion#requiring-users-t
|
|||
<ul>
|
||||
<li>Added <a href="/constructor/attachMenuBotIconColor">attachMenuBotIconColor</a> - Represents an attachment menu icon color for <a href="/api/bots/attach">bot mini apps »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBotIcon">attachMenuBotIcon</a> - Represents an attachment menu icon for <a href="/api/bots/attach">bot mini apps »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBot">attachMenuBot</a> - Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBot">attachMenuBot</a> - Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment/side menu »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBotsNotModified">attachMenuBotsNotModified</a> - The list of bot mini apps hasn't changed</li>
|
||||
<li>Added <a href="/constructor/attachMenuBots">attachMenuBots</a> - Represents a list of <a href="/api/bots/attach">bot mini apps that can be launched from the attachment menu »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBotsBot">attachMenuBotsBot</a> - Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></li>
|
||||
|
|
|
@ -59,7 +59,17 @@
|
|||
<li><code>tg://path?query</code></li>
|
||||
</ul>
|
||||
<p>The <code>#fragment</code> part is always ignored when parsing Telegram deep links. </p>
|
||||
<p>Also note that whenever a <code><username>.t.me</code> link is encountered and <code><username></code> is not equal to <code>www</code>, is not a single letter and is a valid username, it should be treated exactly as a <code>t.me/<username>/</code> link (generate a <code>t.me/<username>/</code> link and append the rest of the path (if present) and the query string (if present)). </p>
|
||||
<p>Also note that whenever a <code><username>.t.me</code> link is encountered and <code><username></code>:</p>
|
||||
<ul>
|
||||
<li>Is not equal to:<ul>
|
||||
<li><code>www</code></li>
|
||||
<li>Any of the values specified in <a href="https://github.com/tdlib/td/blob/07c1d53a6d3cb1fad58d2822e55eef6d57363581/td/telegram/LinkManager.cpp#L1099">this list »</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>AND is not a single letter</li>
|
||||
<li>AND is a valid username</li>
|
||||
</ul>
|
||||
<p>...it should be treated exactly as a <code>t.me/<username>/</code> link (generate a <code>t.me/<username>/</code> link and append the rest of the path (if present) and the query string (if present)). </p>
|
||||
<h3><a class="anchor" href="#public-username-links" id="public-username-links" name="public-username-links"><i class="anchor-icon"></i></a>Public username links</h3>
|
||||
<p>Used to link to public users, groups and channels, see <a href="/api/invites#public-usernames">here for more info on how to handle them »</a>. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
|
@ -368,13 +378,15 @@ tg://addemoji?set=<slug></code></pre>
|
|||
<p>Used by users to <a href="/api/boost">boost channels »</a>, granting them the ability to post stories.</p>
|
||||
<p>Use the channel information to boost the channel as described <a href="/api/boost">here »</a>. </p>
|
||||
<p><code>t.me</code> syntax (public channels):</p>
|
||||
<pre><code>t.me/<username>?boost</code></pre>
|
||||
<pre><code>t.me/boost/<username>
|
||||
t.me/<username>?boost</code></pre>
|
||||
<p><code>t.me</code> syntax (private channels):</p>
|
||||
<pre><code>t.me/c/<id>?boost</code></pre>
|
||||
<pre><code>t.me/boost?c=<id>
|
||||
t.me/c/<id>?boost</code></pre>
|
||||
<p><code>tg:</code> syntax (public channels):</p>
|
||||
<pre><code>tg://boost?domain=<username></code></pre>
|
||||
<p><code>tg:</code> syntax (private channels):</p>
|
||||
<pre><code>tg://boost?channel=<channel></code></pre>
|
||||
<pre><code>tg://boost?channel=<id></code></pre>
|
||||
<p>Parameters:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -886,12 +898,13 @@ tg://resolve?domain=<bot_username>&startgroup&admin=<permission
|
|||
</table>
|
||||
<h3><a class="anchor" href="#named-bot-mini-app-links" id="named-bot-mini-app-links" name="named-bot-mini-app-links"><i class="anchor-icon"></i></a>Named bot mini app links</h3>
|
||||
<p>Used to share <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini apps</a>. </p>
|
||||
<p>These links are different from <a href="#bot-attachment-menu-links">bot attachment menu deep links</a>, because they don't require the user to install an attachment menu, and a single bot can offer multiple named mini apps, distinguished by their <code>short_name</code>. </p>
|
||||
<p>These links are different from <a href="#bot-attachment-or-side-menu-links">bot attachment menu deep links</a>, because they don't require the user to install an attachment menu, and a single bot can offer multiple named mini apps, distinguished by their <code>short_name</code>. </p>
|
||||
<p>These links should be handled as specified in the <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app documentation »</a>. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/<bot_username>/<short_name>?startapp=<start_parameter></code></pre>
|
||||
<p><code>tg:</code> syntax:</p>
|
||||
<pre><code>tg://resolve?domain=<bot_username>&appname=<short_name>&startapp=<start_parameter></code></pre>
|
||||
<p>Note that <a href="#bot-attachment-or-side-menu-links">bot attachment or side menu links</a> have a similar syntax, <em>without</em> a <code>short_name</code> parameter. </p>
|
||||
<p>Parameters: </p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -1091,7 +1104,7 @@ These links are used to confirm ownership of the phone number, to prevent accoun
|
|||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#qr-code-login-links" id="qr-code-login-links" name="qr-code-login-links"><i class="anchor-icon"></i></a>QR code login links</h3>
|
||||
<p>Used by <a href="/api/qr-login">QR code login</a>.</p>
|
||||
<p>Used by the <a href="/api/qr-login">QR code login flow »</a>.</p>
|
||||
<p><code>tg:</code> syntax:</p>
|
||||
<pre><code>tg://login?token=<base64encodedtoken></code></pre>
|
||||
<p>Parameters:</p>
|
||||
|
@ -1111,24 +1124,47 @@ These links are used to confirm ownership of the phone number, to prevent accoun
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bot-attachment-menu-links" id="bot-attachment-menu-links" name="bot-attachment-menu-links"><i class="anchor-icon"></i></a>Bot attachment menu links</h3>
|
||||
<p>Used to install and optionally open a <a href="/api/bots/attach">bot attachment menu »</a> in a certain chat.<br>
|
||||
For all link types, clients should:</p>
|
||||
<h3><a class="anchor" href="#bot-attachment-or-side-menu-links" id="bot-attachment-or-side-menu-links" name="bot-attachment-or-side-menu-links"><i class="anchor-icon"></i></a>Bot attachment or side menu links</h3>
|
||||
<p>Used to install and open a <a href="/api/bots/attach">bot attachment or side menu »</a> in a certain chat.<br>
|
||||
For all link types, clients should first <a href="/api/bots/attach">install the associated bot attachment or side menu entry as specified here »</a>, and if the user accepts the installation prompt, open the Mini App using the following logic, depending on the link subtype:</p>
|
||||
<h4><a class="anchor" href="#open-anywhere" id="open-anywhere" name="open-anywhere"><i class="anchor-icon"></i></a>Open anywhere</h4>
|
||||
<p>After installing the attachment/side menu entry globally, opens the associated mini app, regardless of the currently open Telegram chat (in fact, the Mini App should opened even if the client itself is minimized). </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/<bot_username>?startapp
|
||||
t.me/<bot_username>?startapp=<start_parameter></code></pre>
|
||||
<p>Note that <a href="#named-bot-mini-app-links">named bot mini app links</a> have a similar syntax, with an additional <code>short_name</code> parameter. </p>
|
||||
<p><code>tg:</code> syntax:</p>
|
||||
<pre><code>tg://resolve?domain=<bot_username>&startapp
|
||||
tg://resolve?domain=<bot_username>&startapp=<start_parameter></code></pre>
|
||||
<p>Parameters:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th style="text-align: center;">Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>bot_username</code></td>
|
||||
<td style="text-align: center;">Required</td>
|
||||
<td>Username of the bot that owns the <a href="/api/bots/attach">attachment/side menu entry</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>start_parameter</code></td>
|
||||
<td style="text-align: center;">Optional</td>
|
||||
<td>If provided, should be passed to <a href="/method/messages.requestWebView">messages.requestWebView</a>.<code>start_param</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#open-in-current-chat" id="open-in-current-chat" name="open-in-current-chat"><i class="anchor-icon"></i></a>Open in current chat</h4>
|
||||
<p>After installing the attachment/side menu entry globally, opens the associated mini app in the currently open chat. </p>
|
||||
<p>If the current chat is not supported by the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>peer_types</code> field: </p>
|
||||
<ul>
|
||||
<li>Check that the associated bot username has an associated <a href="/api/bots/attach">attachment menu</a> as specified <a href="/api/bots/attach">here »</a>.</li>
|
||||
<li>If not installed, ask the user to <a href="/api/bots/attach">install the attachment menu »</a>.</li>
|
||||
<li>Check that the attachment menu can be opened in the chosen chat type by checking the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>peer_types</code> field.<ul>
|
||||
<li>If the chosen chat is supported, open the attachment menu <a href="/api/bots/webapps#normal-mini-apps">mini app »</a></li>
|
||||
<li>Otherwise:<ul>
|
||||
<li>If the user has just installed the attachment menu @ step 2, notify the user that the attachment menu was installed successfully.</li>
|
||||
<li>If the user has just installed the attachment menu in the previous step, notify the user that the attachment menu was installed successfully.</li>
|
||||
<li>Otherwise, notify the user that the attachment menu webapp can't be opened in the specified chat.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#open-in-current-chat" id="open-in-current-chat" name="open-in-current-chat"><i class="anchor-icon"></i></a>Open in current chat</h4>
|
||||
<p>Installs and opens an attachment menu mini app in the currently open chat. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/<bot_username>?startattach
|
||||
t.me/<bot_username>?startattach=<start_parameter></code></pre>
|
||||
|
@ -1148,7 +1184,7 @@ tg://resolve?domain=<bot_username>&startattach=<start_parameter>
|
|||
<tr>
|
||||
<td><code>bot_username</code></td>
|
||||
<td style="text-align: center;">Required</td>
|
||||
<td>Username of the bot that owns the <a href="/api/bots/attach">attachment menu</a></td>
|
||||
<td>Username of the bot that owns the <a href="/api/bots/attach">attachment/side menu entry</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>start_parameter</code></td>
|
||||
|
@ -1158,7 +1194,7 @@ tg://resolve?domain=<bot_username>&startattach=<start_parameter>
|
|||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#open-in-specific-chat" id="open-in-specific-chat" name="open-in-specific-chat"><i class="anchor-icon"></i></a>Open in specific chat</h4>
|
||||
<p>Installs and opens an attachment menu mini app in a specific chat. </p>
|
||||
<p>After installing the attachment/side menu entry globally, opens the associated mini app in a specific chat. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/<username>?attach=<bot_username>
|
||||
t.me/<username>?attach=<bot_username>&startattach=<start_parameter>
|
||||
|
@ -1169,6 +1205,11 @@ t.me/+<phone_number>?attach=<bot_username>&startattach=<start
|
|||
tg://resolve?domain=<username>&attach=<bot_username>&startattach=<start_parameter>
|
||||
tg://resolve?phone=<phone_number>&attach=<bot_username>
|
||||
tg://resolve?phone=<phone_number>&attach=<bot_username>&startattach=<start_parameter></code></pre>
|
||||
<p>If the specified chat is not supported by the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>peer_types</code> field: </p>
|
||||
<ul>
|
||||
<li>If the user has just installed the attachment menu in the previous step, notify the user that the attachment menu was installed successfully.</li>
|
||||
<li>Otherwise, notify the user that the attachment menu webapp can't be opened in the specified chat.</li>
|
||||
</ul>
|
||||
<p>Parameters:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -1182,17 +1223,17 @@ tg://resolve?phone=<phone_number>&attach=<bot_username>&star
|
|||
<tr>
|
||||
<td><code>username</code></td>
|
||||
<td style="text-align: center;">Required for <a href="#public-username-links">username links</a></td>
|
||||
<td>Username of chat where to open mini app</td>
|
||||
<td>Username of chat where to open the mini app</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>phone_number</code></td>
|
||||
<td style="text-align: center;">Required for <a href="#phone-number-links">phone number links</a></td>
|
||||
<td>Phone number of private chat where to open mini app</td>
|
||||
<td>Phone number of private chat where to the open mini app</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>bot_username</code></td>
|
||||
<td style="text-align: center;">Required</td>
|
||||
<td>Username of the bot that owns the <a href="/api/bots/attach">attachment menu</a></td>
|
||||
<td>Username of the bot that owns the <a href="/api/bots/attach">attachment/side menu</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>start_parameter</code></td>
|
||||
|
@ -1202,7 +1243,7 @@ tg://resolve?phone=<phone_number>&attach=<bot_username>&star
|
|||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#open-in-any-chat" id="open-in-any-chat" name="open-in-any-chat"><i class="anchor-icon"></i></a>Open in any chat</h4>
|
||||
<p>Installs an attachment menu, opens a dialog selection form that will open the attachment menu mini app in a specific chat. </p>
|
||||
<p>After installing the attachment/side menu entry globally, opens a dialog selection form that will open the attachment menu mini app in a specific chat. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/<bot_username>?startattach&choose=users+bots+groups+channels
|
||||
t.me/<bot_username>?startattach=<start_parameter>&choose=users+bots+groups+channels</code></pre>
|
||||
|
@ -1222,7 +1263,7 @@ tg://resolve?domain=<bot_username>&startattach=<start_parameter>
|
|||
<tr>
|
||||
<td><code>bot_username</code></td>
|
||||
<td style="text-align: center;">Required</td>
|
||||
<td>Username of the bot that owns the <a href="/api/bots/attach">attachment menu</a></td>
|
||||
<td>Username of the bot that owns the <a href="/api/bots/attach">attachment/side menu</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>start_parameter</code></td>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>attachMenuBot</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents a bot mini app that can be launched from the attachment menu »">
|
||||
<meta property="description" content="Represents a bot mini app that can be launched from the attachment/side menu » At least one of the show_in_attach_menu or the show_in_side_menu flags will always be set.">
|
||||
<meta property="og:title" content="attachMenuBot">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents a bot mini app that can be launched from the attachment menu »">
|
||||
<meta property="og:description" content="Represents a bot mini app that can be launched from the attachment/side menu » At least one of the show_in_attach_menu or the show_in_side_menu flags will always be set.">
|
||||
<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">
|
||||
|
@ -42,7 +42,8 @@
|
|||
<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/attachMenuBot" >attachMenuBot</a></li></ul></div>
|
||||
<h1 id="dev_page_title">attachMenuBot</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></p>
|
||||
<div id="dev_page_content"><p>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment/side menu »</a></p>
|
||||
<p>At least one of the <code>show_in_attach_menu</code> or the <code>show_in_side_menu</code> flags will always be set.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -74,7 +75,7 @@
|
|||
<tr>
|
||||
<td><strong>inactive</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether this bot attachment menu entry should be shown in the attachment menu (toggle using <a href="/method/messages.toggleBotInAttachMenu">messages.toggleBotInAttachMenu</a>)</td>
|
||||
<td>If set, before launching the mini app the client should ask the user to add the mini app to the attachment/side menu, and only if the user accepts, after invoking <a href="/method/messages.toggleBotInAttachMenu">messages.toggleBotInAttachMenu</a> the app should be opened.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>has_settings</strong></td>
|
||||
|
@ -89,17 +90,17 @@
|
|||
<tr>
|
||||
<td><strong>show_in_attach_menu</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/constructor/true">true</a></td>
|
||||
<td> </td>
|
||||
<td>Whether, when installed, an attachment menu entry should be shown for the Mini App.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>show_in_side_menu</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/constructor/true">true</a></td>
|
||||
<td> </td>
|
||||
<td>Whether, when installed, an entry in the main view side menu should be shown for the Mini App.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>side_menu_disclaimer_needed</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.5?<a href="/constructor/true">true</a></td>
|
||||
<td> </td>
|
||||
<td>If <code>inactive</code> if set and the user hasn't previously accepted the third-party mini apps <a href="https://telegram.org/tos/mini-apps">Terms of Service</a> for this bot, when showing the mini app installation prompt, an additional mandatory checkbox to accept the <a href="https://telegram.org/tos/mini-apps">mini apps TOS</a> and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>bot_id</strong></td>
|
||||
|
@ -130,8 +131,8 @@
|
|||
<p>Enable or disable <a href="/api/bots/attach">web bot attachment menu »</a></p>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<tr>
|
||||
<td><strong>name</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app. <br><br><code>default_static</code> - Default attachment menu icon in SVG format <br><code>placeholder_static</code> - Default placeholder for opened Web Apps in SVG format <br><code>ios_static</code> - Attachment menu icon in SVG format for the official iOS app <br><code>ios_animated</code> - Animated attachment menu icon in TGS format for the official iOS app <br><code>android_animated</code> - Animated attachment menu icon in TGS format for the official Android app <br><code>macos_animated</code> - Animated attachment menu icon in TGS format for the official native Mac OS app</td>
|
||||
<td>One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app. <br><br><code>default_static</code> - Default attachment menu icon in SVG format <br><code>placeholder_static</code> - Default placeholder for opened Web Apps in SVG format <br><code>ios_static</code> - Attachment menu icon in SVG format for the official iOS app <br><code>ios_animated</code> - Animated attachment menu icon in TGS format for the official iOS app <br><code>android_animated</code> - Animated attachment menu icon in TGS format for the official Android app <br><code>macos_animated</code> - Animated attachment menu icon in TGS format for the official native Mac OS app <br><code>ios_side_menu_static</code> - Side menu icon in PNG format for the official iOS app <br><code>android_side_menu_static</code> - Side menu icon in SVG format for the official android app <br><code>macos_side_menu_static</code> - Side menu icon in PNG format for the official native Mac OS app</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>icon</strong></td>
|
||||
|
@ -91,8 +91,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/AttachMenuBotIcon">AttachMenuBotIcon</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="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -81,8 +81,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/AttachMenuBotIconColor">AttachMenuBotIconColor</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="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -88,8 +88,8 @@
|
|||
<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="#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="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -81,8 +81,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/AttachMenuBotsBot">AttachMenuBotsBot</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="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -97,8 +97,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/MessageAction">MessageAction</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="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#telegram-login-widget" id="telegram-login-widget" name="telegram-login-widget"><i class="anchor-icon"></i></a><a href="/widgets/login">Telegram Login Widget</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
<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>
|
||||
<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="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#messagesgetattachmenubots" id="messagesgetattachmenubots" name="messagesgetattachmenubots"><i class="anchor-icon"></i></a><a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a></h4>
|
||||
<p>Returns installed attachment menu <a href="/api/bots/attach">bot mini apps »</a></p></div>
|
||||
|
||||
|
|
|
@ -268,8 +268,8 @@
|
|||
<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="#min-constructors" id="min-constructors" name="min-constructors"><i class="anchor-icon"></i></a><a href="/api/min">Min constructors</a></h4>
|
||||
<p>In some situations user and channel constructors have reduced set of fields present (although id is always there) and min flag set.</p>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#stories" id="stories" name="stories"><i class="anchor-icon"></i></a><a href="/api/stories">Stories</a></h4>
|
||||
<p>Telegram users and channels can easily post and view stories through the API.</p>
|
||||
<h4><a class="anchor" href="#userfull" id="userfull" name="userfull"><i class="anchor-icon"></i></a><a href="/constructor/userFull">userFull</a></h4>
|
||||
|
|
|
@ -95,8 +95,8 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -81,8 +81,8 @@
|
|||
<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="#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="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
<tr>
|
||||
<td><strong>start_param</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/string">string</a></td>
|
||||
<td>If the web app was opened from the attachment menu using a <a href="/api/links#bot-attachment-menu-links">attachment menu deep link</a>, <code>start_param</code> should contain the <code>data</code> from the <code>startattach</code> parameter.</td>
|
||||
<td>If the web app was opened from the attachment menu using a <a href="/api/links#bot-attachment-or-side-menu-links">attachment menu deep link</a>, <code>start_param</code> should contain the <code>data</code> from the <code>startattach</code> parameter.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>theme_params</strong></td>
|
||||
|
|
|
@ -95,9 +95,10 @@
|
|||
<p><a href="/type/Bool">Bool</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="#attachmenubot" id="attachmenubot" name="attachmenubot"><i class="anchor-icon"></i></a><a href="/constructor/attachMenuBot">attachMenuBot</a></h4>
|
||||
<p>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></p>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
<p>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment/side menu »</a></p>
|
||||
<p>At least one of the <code>show_in_attach_menu</code> or the <code>show_in_side_menu</code> flags will always be set.</p>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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 98 B8 09 00 E4 57 63 65
|
||||
0010 | 14 00 00 00 F1 8E 7E BE C0 50 C4 54 83 E6 C2 E3
|
||||
0020 | 30 D6 52 14 99 45 3D 5B</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 F8 4C 0D 00 C0 4B 66 65
|
||||
0010 | 14 00 00 00 F1 8E 7E BE B5 59 9A FA 6B AC 2E A9
|
||||
0020 | 0A BE E2 D7 B5 4D D5 1D</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>98B80900E4576365</code></td>
|
||||
<td><code>F84C0D00C04B6665</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>C050C45483E6C2E330D6521499453D5B</code></td>
|
||||
<td><code>B5599AFA6BAC2EA90ABEE2D7B54DD51D</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 A0 36 E7 E4 57 63 65
|
||||
0010 | 58 00 00 00 63 24 16 05 C0 50 C4 54 83 E6 C2 E3
|
||||
0020 | 30 D6 52 14 99 45 3D 5B 53 3B AC FB 11 67 B9 55
|
||||
0030 | 80 95 BD 91 A7 7F 8D 0E 08 2D 8E A2 50 67 4C 7B
|
||||
0040 | 4D 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 F8 B9 D7 C0 4B 66 65
|
||||
0010 | 60 00 00 00 63 24 16 05 B5 59 9A FA 6B AC 2E A9
|
||||
0020 | 0A BE E2 D7 B5 4D D5 1D 97 03 22 93 F4 8B FD EB
|
||||
0030 | 2D 7C 79 AF 50 22 FE FE 08 26 FE F7 F1 B4 91 7C
|
||||
0040 | D1 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>01A036E7E4576365</code></td>
|
||||
<td><code>01F8B9D7C04B6665</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>58000000</code> (88 in decimal)</td>
|
||||
<td><code>60000000</code> (96 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>C050C45483E6C2E330D6521499453D5B</code></td>
|
||||
<td><code>B5599AFA6BAC2EA90ABEE2D7B54DD51D</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>533BACFB1167B9558095BD91A77F8D0E</code></td>
|
||||
<td><code>97032293F48BFDEB2D7C79AF5022FEFE</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>082D8EA250674C7B4D000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 3282739644613819213</td>
|
||||
<td><code>0826FEF7F1B4917CD1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2809955835014380753</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 = 3282739644613819213</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>3282739644613819213 = 1714145599 * 1915087987</code></p>
|
||||
<pre><code>p = 1714145599
|
||||
q = 1915087987</code></pre>
|
||||
<pre><code>pq = 2809955835014380753</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2809955835014380753 = 1420343893 * 1978363021</code></p>
|
||||
<pre><code>p = 1420343893
|
||||
q = 1978363021</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 2D 8E A2 50 67 4C 7B 4D 00 00 00
|
||||
0010 | 04 66 2B C9 3F 00 00 00 04 72 25 EC 73 00 00 00
|
||||
0020 | C0 50 C4 54 83 E6 C2 E3 30 D6 52 14 99 45 3D 5B
|
||||
0030 | 53 3B AC FB 11 67 B9 55 80 95 BD 91 A7 7F 8D 0E
|
||||
0040 | C6 A0 60 71 DD 25 D9 01 92 CD C6 02 F6 5A EE BB
|
||||
0050 | BF BA FF 36 14 11 48 C8 FD 54 BE DA D3 5A D6 97
|
||||
<pre><code>0000 | 95 5F F5 A9 08 26 FE F7 F1 B4 91 7C D1 00 00 00
|
||||
0010 | 04 54 A8 BA 55 00 00 00 04 75 EB 6C 8D 00 00 00
|
||||
0020 | B5 59 9A FA 6B AC 2E A9 0A BE E2 D7 B5 4D D5 1D
|
||||
0030 | 97 03 22 93 F4 8B FD EB 2D 7C 79 AF 50 22 FE FE
|
||||
0040 | 3B AE 9A B8 12 72 6C F2 1A 9D CA 9A 9D 37 A3 11
|
||||
0050 | 7A 81 D3 81 D8 52 8C A0 C4 E2 5C BB CD 8D 94 E6
|
||||
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 = 1915087987</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>082D8EA250674C7B4D000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 3282739644613819213</td>
|
||||
<td><code>0826FEF7F1B4917CD1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2809955835014380753</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>04662BC93F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1714145599</td>
|
||||
<td><code>0454A8BA55000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1420343893</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>047225EC73000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1915087987</td>
|
||||
<td><code>0475EB6C8D000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1978363021</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>C050C45483E6C2E330D6521499453D5B</code></td>
|
||||
<td><code>B5599AFA6BAC2EA90ABEE2D7B54DD51D</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>533BACFB1167B9558095BD91A77F8D0E</code></td>
|
||||
<td><code>97032293F48BFDEB2D7C79AF5022FEFE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>C6A06071DD25D90192CDC602F65AEEBB</code> <code>BFBAFF36141148C8FD54BEDAD35AD697</code></td>
|
||||
<td><code>3BAE9AB812726CF21A9DCA9A9D37A311</code> <code>7A81D381D8528CA0C4E25CBBCD8D94E6</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1915087987</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 = 955FF5A9082D8EA250674C7B4D00000004662BC93F000000047225EC73000000C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0EC6A06071DD25D90192CDC602F65AEEBBBFBAFF36141148C8FD54BEDAD35AD69702000000
|
||||
random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA7FB01CBED39F3B4B6023C1AF3739DA07DA27579BD7BA1788D591F5D5D1101E97821C3EE4989C1104BE50CCC7FC31E23109735366DFBDF1537DB16C7F5642652</code></pre>
|
||||
<pre><code>data = 955FF5A90826FEF7F1B4917CD10000000454A8BA550000000475EB6C8D000000B5599AFA6BAC2EA90ABEE2D7B54DD51D97032293F48BFDEB2D7C79AF5022FEFE3BAE9AB812726CF21A9DCA9A9D37A3117A81D381D8528CA0C4E25CBBCD8D94E602000000
|
||||
random_padding_bytes = A0A08D9129A6004F851B20205F2FA07753FE8291010906D62EE0EFEB8B1C7052449EAF632FDDAF860BD9F128C350D1201526CBADFA7032FD64C2E8CA54A8460D608A626639B64181500138073BF7127B353985BD3F60F4DE37625F99</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 = AB05DFE223030018B0E6A1D58FBA9E9AE568DB395B5202C6284621AE5381E536DC9932757EF89B571D5E8F0D686FF13A952E229608A4D0185E95E86A6C2155CED021AA97A3E97DB21D89C361006FFC1923D168381CC045A82EF1CB2C1E3D75BEC6A22E37930EE6219A3238D10CAED7325C244C1F5906D1B79F252054E80185A8B769AEB7266808A26D8387505796D4E10959C573240AAB2FA611DE816AA069FEFA4D46809C83789D1EAAAD4C14249D98241315561F35E8C9021A69918441AEFA8F34E8523EE9E22CBE57DE903954405E70387306C2E0C40CC272C9F3B9EA361E554677797796194EDFFD385243BF592729F26D54AC82D326053C8580437DD57A</code></pre>
|
||||
<pre><code>encrypted_data = E2936EF84988FDB8D5B7FB7406916AA843002E214F136CDFDAA76DFDCC0AF1490C3740B8CC4C8CC752CDA2ADCF2BE3D6EEC40F69D3527C7E15A22CEFB918CFB57532A69A852A08B71863D8B282C47D8500379CC1D127849B539928ADB63F27373938F2F834F94E30AB266DF541EA8D1C0E651DB17C204E27760FEA822134BBFF5C1490734AF5A5130E077526128B6B62AC2DEE617F51DFC3D176CB0B37A9A61C386DEDA78C1F279BE3FC345E46DBC647E88ABA15D71159B9F69787EA90F5C01368C28356C1B557D07D9D5F3352D3C55A1D911CEE6B32239AAD98DBE0396FB8FB311145E0D9F9D9B8F82446256B7A419E6D99093C05026FB43A08370DC59BF450</code></pre>
|
||||
<!-- end p_q_inner_data_output -->
|
||||
<p>The length of the final string is 256 bytes.</p>
|
||||
<h5><a class="anchor" href="#5-send-req-dh-params-query-with-generated-encrypted-data" id="5-send-req-dh-params-query-with-generated-encrypted-data" name="5-send-req-dh-params-query-with-generated-encrypted-data"><i class="anchor-icon"></i></a>5) Send req_DH_params query with generated <code>encrypted_data</code></h5>
|
||||
<!-- start req_DH_params -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 9C 34 08 00 E5 57 63 65
|
||||
0010 | 40 01 00 00 BE E4 12 D7 C0 50 C4 54 83 E6 C2 E3
|
||||
0020 | 30 D6 52 14 99 45 3D 5B 53 3B AC FB 11 67 B9 55
|
||||
0030 | 80 95 BD 91 A7 7F 8D 0E 04 66 2B C9 3F 00 00 00
|
||||
0040 | 04 72 25 EC 73 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 AB 05 DF E2 23 03 00 18 B0 E6 A1 D5
|
||||
0060 | 8F BA 9E 9A E5 68 DB 39 5B 52 02 C6 28 46 21 AE
|
||||
0070 | 53 81 E5 36 DC 99 32 75 7E F8 9B 57 1D 5E 8F 0D
|
||||
0080 | 68 6F F1 3A 95 2E 22 96 08 A4 D0 18 5E 95 E8 6A
|
||||
0090 | 6C 21 55 CE D0 21 AA 97 A3 E9 7D B2 1D 89 C3 61
|
||||
00A0 | 00 6F FC 19 23 D1 68 38 1C C0 45 A8 2E F1 CB 2C
|
||||
00B0 | 1E 3D 75 BE C6 A2 2E 37 93 0E E6 21 9A 32 38 D1
|
||||
00C0 | 0C AE D7 32 5C 24 4C 1F 59 06 D1 B7 9F 25 20 54
|
||||
00D0 | E8 01 85 A8 B7 69 AE B7 26 68 08 A2 6D 83 87 50
|
||||
00E0 | 57 96 D4 E1 09 59 C5 73 24 0A AB 2F A6 11 DE 81
|
||||
00F0 | 6A A0 69 FE FA 4D 46 80 9C 83 78 9D 1E AA AD 4C
|
||||
0100 | 14 24 9D 98 24 13 15 56 1F 35 E8 C9 02 1A 69 91
|
||||
0110 | 84 41 AE FA 8F 34 E8 52 3E E9 E2 2C BE 57 DE 90
|
||||
0120 | 39 54 40 5E 70 38 73 06 C2 E0 C4 0C C2 72 C9 F3
|
||||
0130 | B9 EA 36 1E 55 46 77 79 77 96 19 4E DF FD 38 52
|
||||
0140 | 43 BF 59 27 29 F2 6D 54 AC 82 D3 26 05 3C 85 80
|
||||
0150 | 43 7D D5 7A</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 FC 4C 0D 00 C0 4B 66 65
|
||||
0010 | 40 01 00 00 BE E4 12 D7 B5 59 9A FA 6B AC 2E A9
|
||||
0020 | 0A BE E2 D7 B5 4D D5 1D 97 03 22 93 F4 8B FD EB
|
||||
0030 | 2D 7C 79 AF 50 22 FE FE 04 54 A8 BA 55 00 00 00
|
||||
0040 | 04 75 EB 6C 8D 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 E2 93 6E F8 49 88 FD B8 D5 B7 FB 74
|
||||
0060 | 06 91 6A A8 43 00 2E 21 4F 13 6C DF DA A7 6D FD
|
||||
0070 | CC 0A F1 49 0C 37 40 B8 CC 4C 8C C7 52 CD A2 AD
|
||||
0080 | CF 2B E3 D6 EE C4 0F 69 D3 52 7C 7E 15 A2 2C EF
|
||||
0090 | B9 18 CF B5 75 32 A6 9A 85 2A 08 B7 18 63 D8 B2
|
||||
00A0 | 82 C4 7D 85 00 37 9C C1 D1 27 84 9B 53 99 28 AD
|
||||
00B0 | B6 3F 27 37 39 38 F2 F8 34 F9 4E 30 AB 26 6D F5
|
||||
00C0 | 41 EA 8D 1C 0E 65 1D B1 7C 20 4E 27 76 0F EA 82
|
||||
00D0 | 21 34 BB FF 5C 14 90 73 4A F5 A5 13 0E 07 75 26
|
||||
00E0 | 12 8B 6B 62 AC 2D EE 61 7F 51 DF C3 D1 76 CB 0B
|
||||
00F0 | 37 A9 A6 1C 38 6D ED A7 8C 1F 27 9B E3 FC 34 5E
|
||||
0100 | 46 DB C6 47 E8 8A BA 15 D7 11 59 B9 F6 97 87 EA
|
||||
0110 | 90 F5 C0 13 68 C2 83 56 C1 B5 57 D0 7D 9D 5F 33
|
||||
0120 | 52 D3 C5 5A 1D 91 1C EE 6B 32 23 9A AD 98 DB E0
|
||||
0130 | 39 6F B8 FB 31 11 45 E0 D9 F9 D9 B8 F8 24 46 25
|
||||
0140 | 6B 7A 41 9E 6D 99 09 3C 05 02 6F B4 3A 08 37 0D
|
||||
0150 | C5 9B F4 50</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 = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>9C340800E5576365</code></td>
|
||||
<td><code>FC4C0D00C04B6665</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 = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>C050C45483E6C2E330D6521499453D5B</code></td>
|
||||
<td><code>B5599AFA6BAC2EA90ABEE2D7B54DD51D</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>533BACFB1167B9558095BD91A77F8D0E</code></td>
|
||||
<td><code>97032293F48BFDEB2D7C79AF5022FEFE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>04662BC93F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1714145599</td>
|
||||
<td><code>0454A8BA55000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1420343893</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>047225EC73000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1915087987</td>
|
||||
<td><code>0475EB6C8D000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1978363021</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 = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE000100AB05DFE223030018B0E6A1D5</code> <code>8FBA9E9AE568DB395B5202C6284621AE</code> <code>5381E536DC9932757EF89B571D5E8F0D</code> <code>686FF13A952E229608A4D0185E95E86A</code> <code>6C2155CED021AA97A3E97DB21D89C361</code> <code>006FFC1923D168381CC045A82EF1CB2C</code> <code>1E3D75BEC6A22E37930EE6219A3238D1</code> <code>0CAED7325C244C1F5906D1B79F252054</code> <code>E80185A8B769AEB7266808A26D838750</code> <code>5796D4E10959C573240AAB2FA611DE81</code> <code>6AA069FEFA4D46809C83789D1EAAAD4C</code> <code>14249D98241315561F35E8C9021A6991</code> <code>8441AEFA8F34E8523EE9E22CBE57DE90</code> <code>3954405E70387306C2E0C40CC272C9F3</code> <code>B9EA361E554677797796194EDFFD3852</code> <code>43BF592729F26D54AC82D326053C8580</code><br> <code>437DD57A</code></td>
|
||||
<td><code>FE000100E2936EF84988FDB8D5B7FB74</code> <code>06916AA843002E214F136CDFDAA76DFD</code> <code>CC0AF1490C3740B8CC4C8CC752CDA2AD</code> <code>CF2BE3D6EEC40F69D3527C7E15A22CEF</code> <code>B918CFB57532A69A852A08B71863D8B2</code> <code>82C47D8500379CC1D127849B539928AD</code> <code>B63F27373938F2F834F94E30AB266DF5</code> <code>41EA8D1C0E651DB17C204E27760FEA82</code> <code>2134BBFF5C1490734AF5A5130E077526</code> <code>128B6B62AC2DEE617F51DFC3D176CB0B</code> <code>37A9A61C386DEDA78C1F279BE3FC345E</code> <code>46DBC647E88ABA15D71159B9F69787EA</code> <code>90F5C01368C28356C1B557D07D9D5F33</code> <code>52D3C55A1D911CEE6B32239AAD98DBE0</code> <code>396FB8FB311145E0D9F9D9B8F8244625</code> <code>6B7A419E6D99093C05026FB43A08370D</code><br> <code>C59BF450</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA
|
|||
<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 EC A2 A7 E5 57 63 65
|
||||
0010 | A4 02 00 00 5C 07 E8 D0 C0 50 C4 54 83 E6 C2 E3
|
||||
0020 | 30 D6 52 14 99 45 3D 5B 53 3B AC FB 11 67 B9 55
|
||||
0030 | 80 95 BD 91 A7 7F 8D 0E FE 50 02 00 A5 43 81 85
|
||||
0040 | D3 4A 6F 57 F3 6A 57 8D 18 9F 02 6F 7A 32 D3 DC
|
||||
0050 | 05 A3 41 A3 9C 23 C4 BA D1 8C 4C DB 78 A1 A2 DE
|
||||
0060 | 8B F1 85 3A BD 10 62 50 C3 7D 13 E2 D3 C3 80 71
|
||||
0070 | 0A 36 F5 02 60 FE D7 8D FA 5A D4 85 D2 AF D5 1D
|
||||
0080 | 05 77 CE 22 98 60 A3 66 8D F2 AA 2C 3B 86 38 0A
|
||||
0090 | 42 40 3B 80 06 60 11 FD 79 D1 81 D4 20 C6 21 B8
|
||||
00A0 | 6E 8F 96 C7 A3 65 F9 34 0D 01 48 26 5B 6E 32 18
|
||||
00B0 | 50 05 5C 4D E7 5E 3C 58 1A 9C E3 9A 11 97 46 7C
|
||||
00C0 | 7F C6 F4 A2 D3 49 85 DA 26 B1 22 A7 5B 1B 66 0B
|
||||
00D0 | 96 85 81 FA AE FD 8B B8 DB 30 7F B3 12 34 EA F3
|
||||
00E0 | DD 3F 31 94 33 17 C3 F0 99 8E 67 59 02 3F 25 4A
|
||||
00F0 | 19 A5 7C 70 41 4D 31 76 68 FF F7 E1 DC B0 EC F0
|
||||
0100 | 88 78 21 B9 A7 B4 05 CD 13 AE 67 54 22 93 E4 04
|
||||
0110 | CA A5 B0 AE 34 63 CE 8B B6 F7 26 BA D9 A1 E0 53
|
||||
0120 | 9F 86 3A 31 81 8D B7 68 49 9C C9 0D 29 21 04 BF
|
||||
0130 | 7D 54 F0 1D 15 73 9A EB 6B 9F 8C 89 28 C6 4C F5
|
||||
0140 | 0C BC B7 2A A4 A4 AE 1F 5E BC B9 2A 9F 56 5F 9C
|
||||
0150 | 45 3D 07 1D 28 9C 91 67 46 1D 8D 3A 2E DA 8C 0C
|
||||
0160 | 8E CC 0A 1D 9B E9 6F DA 1C 56 01 1E C9 D5 79 8A
|
||||
0170 | A2 F3 FD 13 C5 AB 52 DC 06 62 0B CD F2 CC 61 0E
|
||||
0180 | B5 20 B6 DB 94 C8 2E 30 FC 87 AE 65 25 B7 B3 2C
|
||||
0190 | B7 BB 70 87 B3 59 A5 9A 03 9D 04 4C 64 29 81 24
|
||||
01A0 | 7C 30 1A 9C 8E D5 1B 73 F2 D1 D4 45 5C 04 53 D2
|
||||
01B0 | 60 74 1D 3D BB 78 83 74 D1 51 F0 E5 3A 20 DF AA
|
||||
01C0 | 36 38 F2 6F 36 20 62 73 9A 4E 7A 57 1C 4A 96 23
|
||||
01D0 | 91 DB D3 65 10 AF E4 4C 0D 9B 50 0B 9B 46 E1 9E
|
||||
01E0 | 1A EF 88 0E 96 C0 49 3C D7 92 59 91 9C F2 56 24
|
||||
01F0 | 52 3A 74 17 A1 FB 21 7E 5C 97 89 99 F2 29 DE B2
|
||||
0200 | 90 3A DD 8E E1 ED 7E F6 AD B2 A2 4A 9D B4 3D 3C
|
||||
0210 | F4 8B 24 EA A8 48 FF DD 6E EA DC 08 74 04 00 63
|
||||
0220 | 46 A8 B8 2C C7 38 BE 4D E3 27 6D D3 2C 5B 12 A3
|
||||
0230 | AA 60 D5 2B 21 1F D3 1C CF 95 08 E5 9B E8 FB 3A
|
||||
0240 | 32 EE 3A 70 BA BB 60 3F 7D 76 A5 AE 7A DE 0A 6C
|
||||
0250 | 8E 39 1B 1F D9 C2 60 C9 15 D0 92 3B 19 99 43 A9
|
||||
0260 | 56 C7 BB 28 3D 41 BB 4D E4 62 DC BB 7C 2E 4A 2E
|
||||
0270 | E9 71 FD 92 52 CF AB C4 2F 31 9E 99 95 0C E7 D3
|
||||
0280 | 95 E5 9B 42 BC 26 AC 4D BF C3 8F 1A</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 9C 0A 90 C1 4B 66 65
|
||||
0010 | 7C 02 00 00 5C 07 E8 D0 B5 59 9A FA 6B AC 2E A9
|
||||
0020 | 0A BE E2 D7 B5 4D D5 1D 97 03 22 93 F4 8B FD EB
|
||||
0030 | 2D 7C 79 AF 50 22 FE FE FE 50 02 00 DD 82 E6 8C
|
||||
0040 | 30 FC 02 8C 14 BF 84 ED 03 77 85 F2 FA 4E BE BB
|
||||
0050 | 1E 24 AC C2 5C 77 22 C2 40 77 D4 3A 5F 72 21 BF
|
||||
0060 | 3B 90 14 27 19 4A DD 03 56 54 BA 8A 3B DB 30 22
|
||||
0070 | B7 93 AF B4 97 44 45 62 D4 41 46 D2 8A 1B 7A 62
|
||||
0080 | D1 D6 69 51 5B 5E 5A CF F7 5B 07 FE 4B 46 11 9D
|
||||
0090 | 50 CD 05 AD 27 9A 49 C6 4F EF D9 27 F0 A2 77 03
|
||||
00A0 | 38 8A 37 04 D0 4A 9D D4 38 9C FD 0E B6 B6 01 51
|
||||
00B0 | B7 34 F9 20 6B CF 3C 76 F1 77 8B CB 79 B0 71 94
|
||||
00C0 | A1 27 A3 94 85 47 8F 05 C9 B1 87 A0 29 B2 8A AF
|
||||
00D0 | 77 74 6F 1D 2A CF 2F D5 BF F3 5D 3C CD C8 06 DD
|
||||
00E0 | 5B 56 52 F1 60 54 F2 47 C4 03 7B A0 F2 AF CA 9A
|
||||
00F0 | 0A 90 42 C8 23 8C 23 94 1D A5 2A B9 C6 08 A3 9C
|
||||
0100 | F5 C1 E2 DE 4A C3 97 13 D6 E6 A6 37 0F F9 56 31
|
||||
0110 | E9 CF 8C 9B 16 28 E8 BE F6 B0 6D 52 75 94 39 45
|
||||
0120 | 75 2E 6C 4C 83 89 68 B8 09 7E D4 45 40 0A 20 39
|
||||
0130 | 5B F2 4B 43 2D F1 6F 46 99 BE F0 C0 B4 EE 36 3A
|
||||
0140 | 53 64 84 45 43 1A E1 C0 23 20 59 1B B9 95 63 60
|
||||
0150 | 86 DB 66 8F 0E EF 42 34 06 AB 3C F8 CF EE 92 0F
|
||||
0160 | 68 66 88 AC 8B F5 48 E1 89 1C 83 88 30 29 9C 7D
|
||||
0170 | C7 43 41 F0 53 22 38 F2 9F 32 5E 26 47 DA C2 2B
|
||||
0180 | FC FC 99 2B 84 0D 1A 35 24 CB 23 4B C0 F3 7B 05
|
||||
0190 | 39 ED 7A A2 2E 63 67 18 55 DD 5C 0C 22 09 F0 32
|
||||
01A0 | CD 22 D9 2C 83 9E 91 FF A1 AA 6B EF 7E EC 26 9A
|
||||
01B0 | 2C C1 4F F8 0E 98 A1 1A 3C 00 2F CB 32 47 1F C8
|
||||
01C0 | DB 98 EA 0F 2B 94 54 D8 E3 C8 63 9B 64 5B 7A BE
|
||||
01D0 | 2C 42 1F 50 C0 F5 1F 39 42 6E 3A 3D 3D 23 EA 38
|
||||
01E0 | 28 6C 43 39 07 0D A0 4F E3 18 94 87 DC E5 FB 44
|
||||
01F0 | FA 4B 10 FD 78 37 10 B3 56 27 B9 AE 06 79 0B ED
|
||||
0200 | D5 7A EB 9B 5C F6 12 26 CE 89 65 58 22 C5 93 E5
|
||||
0210 | E8 6A EE F4 7A BF FB CB 08 60 1C E1 20 73 3E 27
|
||||
0220 | 3A AC 37 65 9B E4 B5 3A 3B 4A BC 23 31 FB A5 BA
|
||||
0230 | E5 1D 55 BB DA F4 2A 48 64 56 C8 CB D9 58 35 2D
|
||||
0240 | 68 D3 13 72 48 B0 4A B0 AE F9 27 6C CE 42 E9 AB
|
||||
0250 | 52 54 7C 2E 59 70 7E A6 B7 9E 0D 38 3E AF 5C EF
|
||||
0260 | BB 27 A0 CC E4 0F D7 63 3D D1 99 66 73 BA C8 42
|
||||
0270 | 70 00 B9 FC F1 C4 21 22 9E F9 B0 11 F4 40 BB 49
|
||||
0280 | 40 65 D7 EF 2C 35 7D 2E D2 FF 3D 0F</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 = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01ECA2A7E5576365</code></td>
|
||||
<td><code>019C0A90C14B6665</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>A4020000</code> (676 in decimal)</td>
|
||||
<td><code>7C020000</code> (636 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>C050C45483E6C2E330D6521499453D5B</code></td>
|
||||
<td><code>B5599AFA6BAC2EA90ABEE2D7B54DD51D</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>533BACFB1167B9558095BD91A77F8D0E</code></td>
|
||||
<td><code>97032293F48BFDEB2D7C79AF5022FEFE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE500200A5438185D34A6F57F36A578D</code> <code>189F026F7A32D3DC05A341A39C23C4BA</code> <code>D18C4CDB78A1A2DE8BF1853ABD106250</code> <code>C37D13E2D3C380710A36F50260FED78D</code> <code>FA5AD485D2AFD51D0577CE229860A366</code> <code>8DF2AA2C3B86380A42403B80066011FD</code> <code>79D181D420C621B86E8F96C7A365F934</code> <code>0D0148265B6E321850055C4DE75E3C58</code> <code>1A9CE39A1197467C7FC6F4A2D34985DA</code> <code>26B122A75B1B660B968581FAAEFD8BB8</code> <code>DB307FB31234EAF3DD3F31943317C3F0</code> <code>998E6759023F254A19A57C70414D3176</code> <code>68FFF7E1DCB0ECF0887821B9A7B405CD</code> <code>13AE67542293E404CAA5B0AE3463CE8B</code> <code>B6F726BAD9A1E0539F863A31818DB768</code> <code>499CC90D292104BF7D54F01D15739AEB</code> <code>6B9F8C8928C64CF50CBCB72AA4A4AE1F</code> <code>5EBCB92A9F565F9C453D071D289C9167</code> <code>461D8D3A2EDA8C0C8ECC0A1D9BE96FDA</code> <code>1C56011EC9D5798AA2F3FD13C5AB52DC</code> <code>06620BCDF2CC610EB520B6DB94C82E30</code> <code>FC87AE6525B7B32CB7BB7087B359A59A</code> <code>039D044C642981247C301A9C8ED51B73</code> <code>F2D1D4455C0453D260741D3DBB788374</code> <code>D151F0E53A20DFAA3638F26F36206273</code> <code>9A4E7A571C4A962391DBD36510AFE44C</code> <code>0D9B500B9B46E19E1AEF880E96C0493C</code> <code>D79259919CF25624523A7417A1FB217E</code> <code>5C978999F229DEB2903ADD8EE1ED7EF6</code> <code>ADB2A24A9DB43D3CF48B24EAA848FFDD</code> <code>6EEADC087404006346A8B82CC738BE4D</code> <code>E3276DD32C5B12A3AA60D52B211FD31C</code> <code>CF9508E59BE8FB3A32EE3A70BABB603F</code> <code>7D76A5AE7ADE0A6C8E391B1FD9C260C9</code> <code>15D0923B199943A956C7BB283D41BB4D</code> <code>E462DCBB7C2E4A2EE971FD9252CFABC4</code> <code>2F319E99950CE7D395E59B42BC26AC4D</code><br> <code>BFC38F1A</code></td>
|
||||
<td><code>FE500200DD82E68C30FC028C14BF84ED</code> <code>037785F2FA4EBEBB1E24ACC25C7722C2</code> <code>4077D43A5F7221BF3B901427194ADD03</code> <code>5654BA8A3BDB3022B793AFB497444562</code> <code>D44146D28A1B7A62D1D669515B5E5ACF</code> <code>F75B07FE4B46119D50CD05AD279A49C6</code> <code>4FEFD927F0A27703388A3704D04A9DD4</code> <code>389CFD0EB6B60151B734F9206BCF3C76</code> <code>F1778BCB79B07194A127A39485478F05</code> <code>C9B187A029B28AAF77746F1D2ACF2FD5</code> <code>BFF35D3CCDC806DD5B5652F16054F247</code> <code>C4037BA0F2AFCA9A0A9042C8238C2394</code> <code>1DA52AB9C608A39CF5C1E2DE4AC39713</code> <code>D6E6A6370FF95631E9CF8C9B1628E8BE</code> <code>F6B06D5275943945752E6C4C838968B8</code> <code>097ED445400A20395BF24B432DF16F46</code> <code>99BEF0C0B4EE363A53648445431AE1C0</code> <code>2320591BB995636086DB668F0EEF4234</code> <code>06AB3CF8CFEE920F686688AC8BF548E1</code> <code>891C838830299C7DC74341F0532238F2</code> <code>9F325E2647DAC22BFCFC992B840D1A35</code> <code>24CB234BC0F37B0539ED7AA22E636718</code> <code>55DD5C0C2209F032CD22D92C839E91FF</code> <code>A1AA6BEF7EEC269A2CC14FF80E98A11A</code> <code>3C002FCB32471FC8DB98EA0F2B9454D8</code> <code>E3C8639B645B7ABE2C421F50C0F51F39</code> <code>426E3A3D3D23EA38286C4339070DA04F</code> <code>E3189487DCE5FB44FA4B10FD783710B3</code> <code>5627B9AE06790BEDD57AEB9B5CF61226</code> <code>CE89655822C593E5E86AEEF47ABFFBCB</code> <code>08601CE120733E273AAC37659BE4B53A</code> <code>3B4ABC2331FBA5BAE51D55BBDAF42A48</code> <code>6456C8CBD958352D68D3137248B04AB0</code> <code>AEF9276CCE42E9AB52547C2E59707EA6</code> <code>B79E0D383EAF5CEFBB27A0CCE40FD763</code> <code>3DD1996673BAC8427000B9FCF1C42122</code> <code>9EF9B011F440BB494065D7EF2C357D2E</code><br> <code>D2FF3D0F</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA
|
|||
<!-- 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 = A5438185D34A6F57F36A578D189F026F7A32D3DC05A341A39C23C4BAD18C4CDB78A1A2DE8BF1853ABD106250C37D13E2D3C380710A36F50260FED78DFA5AD485D2AFD51D0577CE229860A3668DF2AA2C3B86380A42403B80066011FD79D181D420C621B86E8F96C7A365F9340D0148265B6E321850055C4DE75E3C581A9CE39A1197467C7FC6F4A2D34985DA26B122A75B1B660B968581FAAEFD8BB8DB307FB31234EAF3DD3F31943317C3F0998E6759023F254A19A57C70414D317668FFF7E1DCB0ECF0887821B9A7B405CD13AE67542293E404CAA5B0AE3463CE8BB6F726BAD9A1E0539F863A31818DB768499CC90D292104BF7D54F01D15739AEB6B9F8C8928C64CF50CBCB72AA4A4AE1F5EBCB92A9F565F9C453D071D289C9167461D8D3A2EDA8C0C8ECC0A1D9BE96FDA1C56011EC9D5798AA2F3FD13C5AB52DC06620BCDF2CC610EB520B6DB94C82E30FC87AE6525B7B32CB7BB7087B359A59A039D044C642981247C301A9C8ED51B73F2D1D4455C0453D260741D3DBB788374D151F0E53A20DFAA3638F26F362062739A4E7A571C4A962391DBD36510AFE44C0D9B500B9B46E19E1AEF880E96C0493CD79259919CF25624523A7417A1FB217E5C978999F229DEB2903ADD8EE1ED7EF6ADB2A24A9DB43D3CF48B24EAA848FFDD6EEADC087404006346A8B82CC738BE4DE3276DD32C5B12A3AA60D52B211FD31CCF9508E59BE8FB3A32EE3A70BABB603F7D76A5AE7ADE0A6C8E391B1FD9C260C915D0923B199943A956C7BB283D41BB4DE462DCBB7C2E4A2EE971FD9252CFABC42F319E99950CE7D395E59B42BC26AC4DBFC38F1A
|
||||
tmp_aes_key = DDE9D7DA461399FD1D9564B9313F80C9B33BE062852B3D48A82D396812037569
|
||||
tmp_aes_iv = 23E6A1FE2F85BF5F4EA12E1514BB8D937849463EF3B1027712C1F8D2C6A06071</code></pre>
|
||||
<pre><code>encrypted_answer = DD82E68C30FC028C14BF84ED037785F2FA4EBEBB1E24ACC25C7722C24077D43A5F7221BF3B901427194ADD035654BA8A3BDB3022B793AFB497444562D44146D28A1B7A62D1D669515B5E5ACFF75B07FE4B46119D50CD05AD279A49C64FEFD927F0A27703388A3704D04A9DD4389CFD0EB6B60151B734F9206BCF3C76F1778BCB79B07194A127A39485478F05C9B187A029B28AAF77746F1D2ACF2FD5BFF35D3CCDC806DD5B5652F16054F247C4037BA0F2AFCA9A0A9042C8238C23941DA52AB9C608A39CF5C1E2DE4AC39713D6E6A6370FF95631E9CF8C9B1628E8BEF6B06D5275943945752E6C4C838968B8097ED445400A20395BF24B432DF16F4699BEF0C0B4EE363A53648445431AE1C02320591BB995636086DB668F0EEF423406AB3CF8CFEE920F686688AC8BF548E1891C838830299C7DC74341F0532238F29F325E2647DAC22BFCFC992B840D1A3524CB234BC0F37B0539ED7AA22E63671855DD5C0C2209F032CD22D92C839E91FFA1AA6BEF7EEC269A2CC14FF80E98A11A3C002FCB32471FC8DB98EA0F2B9454D8E3C8639B645B7ABE2C421F50C0F51F39426E3A3D3D23EA38286C4339070DA04FE3189487DCE5FB44FA4B10FD783710B35627B9AE06790BEDD57AEB9B5CF61226CE89655822C593E5E86AEEF47ABFFBCB08601CE120733E273AAC37659BE4B53A3B4ABC2331FBA5BAE51D55BBDAF42A486456C8CBD958352D68D3137248B04AB0AEF9276CCE42E9AB52547C2E59707EA6B79E0D383EAF5CEFBB27A0CCE40FD7633DD1996673BAC8427000B9FCF1C421229EF9B011F440BB494065D7EF2C357D2ED2FF3D0F
|
||||
tmp_aes_key = 1958F662C25BC962035DCDB03466EEE5912D0A27078AC3B48D09FF58C35597ED
|
||||
tmp_aes_iv = 14EAA9C9B97D2BFABEF57C84CEE9FBE743EA0FA0F91CCE32E91A66683BAE9AB8</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = 4981FEE758D8D56353659697CAD7365E11277F6DBA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0E03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001004916D416BFA942C255D504A1D88816E0D80F34339B3C1376A762AD2576372A5249A5FCDE1A49958BC65225E92C93FD93F65DC937E8A7F0546D06736CD8485ACE26F4859402156493386E61B772F5F284CFF194B96D58476DA6A52F2E1C61E932E6FEABB2ADABE10F14F0EA0D09DF221398014C7D0C210470F4C6F9BE6EF14C0003A5985E6B7D82E7B4A6D8C6C304C37852D75E87BAAE2A7D893698EBF5453DA4BACA62DFC5D4E8DC2712F07118A9008824368E96C3EE9D9984DA64D0943F02DB7E17E4321D8C91155CA500B338297405B1B6871BF39AFD240492FBB7D9C6F3AC0DA8EA80070AAAD2590EB474FCE3EEE3736642AACF362169F8C2A7F68BAE15AFE5576365EBFE2B4E1BFAC66E
|
||||
answer = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0E03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001004916D416BFA942C255D504A1D88816E0D80F34339B3C1376A762AD2576372A5249A5FCDE1A49958BC65225E92C93FD93F65DC937E8A7F0546D06736CD8485ACE26F4859402156493386E61B772F5F284CFF194B96D58476DA6A52F2E1C61E932E6FEABB2ADABE10F14F0EA0D09DF221398014C7D0C210470F4C6F9BE6EF14C0003A5985E6B7D82E7B4A6D8C6C304C37852D75E87BAAE2A7D893698EBF5453DA4BACA62DFC5D4E8DC2712F07118A9008824368E96C3EE9D9984DA64D0943F02DB7E17E4321D8C91155CA500B338297405B1B6871BF39AFD240492FBB7D9C6F3AC0DA8EA80070AAAD2590EB474FCE3EEE3736642AACF362169F8C2A7F68BAE15AFE5576365EBFE2B4E1BFAC66E</code></pre>
|
||||
<pre><code>answer_with_hash = 9F5F0A1FE926289582985E0892DEE63154911B2CBA0D89B5B5599AFA6BAC2EA90ABEE2D7B54DD51D97032293F48BFDEB2D7C79AF5022FEFE03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001009B6E8C566CD00054BAFC61744174666511C4F16FA61CDAE17673FC572C8671225A872F4BC049FD32EBE4263B4A19FEEA8C4F89986F158D0D1CF7CB4C45EEAAAFF00A1A38C1240324AEBF04EE53D6B50ED913001266EDF5A0BEBE60D0BC969A81D52F6222E5FBB6E6025B06779C05CAE0FDDFFDF440BCBF543017BF377F00C82E9FA5FE1DD8063CC4CD5B3E2CAF097ECDCFFA64D8B2C9A4C1125882C81DD70BE7A74DE6EFA2C5643F2926610281D55336760DBAFB5EB63147E88C007A481803F5CDCD4769B735D34635D8A4CABC7A2779963030552BB1831709E9489CB12886586AB37E525185D67AC6211B57C3909F3ADBDCF325A1FFD605DEE142468163FBA2C14B6665D241CA53FBE82768
|
||||
answer = BA0D89B5B5599AFA6BAC2EA90ABEE2D7B54DD51D97032293F48BFDEB2D7C79AF5022FEFE03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001009B6E8C566CD00054BAFC61744174666511C4F16FA61CDAE17673FC572C8671225A872F4BC049FD32EBE4263B4A19FEEA8C4F89986F158D0D1CF7CB4C45EEAAAFF00A1A38C1240324AEBF04EE53D6B50ED913001266EDF5A0BEBE60D0BC969A81D52F6222E5FBB6E6025B06779C05CAE0FDDFFDF440BCBF543017BF377F00C82E9FA5FE1DD8063CC4CD5B3E2CAF097ECDCFFA64D8B2C9A4C1125882C81DD70BE7A74DE6EFA2C5643F2926610281D55336760DBAFB5EB63147E88C007A481803F5CDCD4769B735D34635D8A4CABC7A2779963030552BB1831709E9489CB12886586AB37E525185D67AC6211B57C3909F3ADBDCF325A1FFD605DEE142468163FBA2C14B6665D241CA53FBE82768</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 C0 50 C4 54 83 E6 C2 E3 30 D6 52 14
|
||||
0010 | 99 45 3D 5B 53 3B AC FB 11 67 B9 55 80 95 BD 91
|
||||
0020 | A7 7F 8D 0E 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 B5 59 9A FA 6B AC 2E A9 0A BE E2 D7
|
||||
0010 | B5 4D D5 1D 97 03 22 93 F4 8B FD EB 2D 7C 79 AF
|
||||
0020 | 50 22 FE FE 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 = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0
|
|||
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 | 49 16 D4 16 BF A9 42 C2 55 D5 04 A1 D8 88 16 E0
|
||||
0140 | D8 0F 34 33 9B 3C 13 76 A7 62 AD 25 76 37 2A 52
|
||||
0150 | 49 A5 FC DE 1A 49 95 8B C6 52 25 E9 2C 93 FD 93
|
||||
0160 | F6 5D C9 37 E8 A7 F0 54 6D 06 73 6C D8 48 5A CE
|
||||
0170 | 26 F4 85 94 02 15 64 93 38 6E 61 B7 72 F5 F2 84
|
||||
0180 | CF F1 94 B9 6D 58 47 6D A6 A5 2F 2E 1C 61 E9 32
|
||||
0190 | E6 FE AB B2 AD AB E1 0F 14 F0 EA 0D 09 DF 22 13
|
||||
01A0 | 98 01 4C 7D 0C 21 04 70 F4 C6 F9 BE 6E F1 4C 00
|
||||
01B0 | 03 A5 98 5E 6B 7D 82 E7 B4 A6 D8 C6 C3 04 C3 78
|
||||
01C0 | 52 D7 5E 87 BA AE 2A 7D 89 36 98 EB F5 45 3D A4
|
||||
01D0 | BA CA 62 DF C5 D4 E8 DC 27 12 F0 71 18 A9 00 88
|
||||
01E0 | 24 36 8E 96 C3 EE 9D 99 84 DA 64 D0 94 3F 02 DB
|
||||
01F0 | 7E 17 E4 32 1D 8C 91 15 5C A5 00 B3 38 29 74 05
|
||||
0200 | B1 B6 87 1B F3 9A FD 24 04 92 FB B7 D9 C6 F3 AC
|
||||
0210 | 0D A8 EA 80 07 0A AA D2 59 0E B4 74 FC E3 EE E3
|
||||
0220 | 73 66 42 AA CF 36 21 69 F8 C2 A7 F6 8B AE 15 AF
|
||||
0230 | E5 57 63 65</code></pre>
|
||||
0130 | 9B 6E 8C 56 6C D0 00 54 BA FC 61 74 41 74 66 65
|
||||
0140 | 11 C4 F1 6F A6 1C DA E1 76 73 FC 57 2C 86 71 22
|
||||
0150 | 5A 87 2F 4B C0 49 FD 32 EB E4 26 3B 4A 19 FE EA
|
||||
0160 | 8C 4F 89 98 6F 15 8D 0D 1C F7 CB 4C 45 EE AA AF
|
||||
0170 | F0 0A 1A 38 C1 24 03 24 AE BF 04 EE 53 D6 B5 0E
|
||||
0180 | D9 13 00 12 66 ED F5 A0 BE BE 60 D0 BC 96 9A 81
|
||||
0190 | D5 2F 62 22 E5 FB B6 E6 02 5B 06 77 9C 05 CA E0
|
||||
01A0 | FD DF FD F4 40 BC BF 54 30 17 BF 37 7F 00 C8 2E
|
||||
01B0 | 9F A5 FE 1D D8 06 3C C4 CD 5B 3E 2C AF 09 7E CD
|
||||
01C0 | CF FA 64 D8 B2 C9 A4 C1 12 58 82 C8 1D D7 0B E7
|
||||
01D0 | A7 4D E6 EF A2 C5 64 3F 29 26 61 02 81 D5 53 36
|
||||
01E0 | 76 0D BA FB 5E B6 31 47 E8 8C 00 7A 48 18 03 F5
|
||||
01F0 | CD CD 47 69 B7 35 D3 46 35 D8 A4 CA BC 7A 27 79
|
||||
0200 | 96 30 30 55 2B B1 83 17 09 E9 48 9C B1 28 86 58
|
||||
0210 | 6A B3 7E 52 51 85 D6 7A C6 21 1B 57 C3 90 9F 3A
|
||||
0220 | DB DC F3 25 A1 FF D6 05 DE E1 42 46 81 63 FB A2
|
||||
0230 | C1 4B 66 65</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -570,13 +570,13 @@ answer = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>C050C45483E6C2E330D6521499453D5B</code></td>
|
||||
<td><code>B5599AFA6BAC2EA90ABEE2D7B54DD51D</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>533BACFB1167B9558095BD91A77F8D0E</code></td>
|
||||
<td><code>97032293F48BFDEB2D7C79AF5022FEFE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE0001004916D416BFA942C255D504A1</code> <code>D88816E0D80F34339B3C1376A762AD25</code> <code>76372A5249A5FCDE1A49958BC65225E9</code> <code>2C93FD93F65DC937E8A7F0546D06736C</code> <code>D8485ACE26F4859402156493386E61B7</code> <code>72F5F284CFF194B96D58476DA6A52F2E</code> <code>1C61E932E6FEABB2ADABE10F14F0EA0D</code> <code>09DF221398014C7D0C210470F4C6F9BE</code> <code>6EF14C0003A5985E6B7D82E7B4A6D8C6</code> <code>C304C37852D75E87BAAE2A7D893698EB</code> <code>F5453DA4BACA62DFC5D4E8DC2712F071</code> <code>18A9008824368E96C3EE9D9984DA64D0</code> <code>943F02DB7E17E4321D8C91155CA500B3</code> <code>38297405B1B6871BF39AFD240492FBB7</code> <code>D9C6F3AC0DA8EA80070AAAD2590EB474</code> <code>FCE3EEE3736642AACF362169F8C2A7F6</code><br> <code>8BAE15AF</code></td>
|
||||
<td><code>FE0001009B6E8C566CD00054BAFC6174</code> <code>4174666511C4F16FA61CDAE17673FC57</code> <code>2C8671225A872F4BC049FD32EBE4263B</code> <code>4A19FEEA8C4F89986F158D0D1CF7CB4C</code> <code>45EEAAAFF00A1A38C1240324AEBF04EE</code> <code>53D6B50ED913001266EDF5A0BEBE60D0</code> <code>BC969A81D52F6222E5FBB6E6025B0677</code> <code>9C05CAE0FDDFFDF440BCBF543017BF37</code> <code>7F00C82E9FA5FE1DD8063CC4CD5B3E2C</code> <code>AF097ECDCFFA64D8B2C9A4C1125882C8</code> <code>1DD70BE7A74DE6EFA2C5643F29266102</code> <code>81D55336760DBAFB5EB63147E88C007A</code> <code>481803F5CDCD4769B735D34635D8A4CA</code> <code>BC7A2779963030552BB1831709E9489C</code> <code>B12886586AB37E525185D67AC6211B57</code> <code>C3909F3ADBDCF325A1FFD605DEE14246</code><br> <code>8163FBA2</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>E5576365</code> (1701009381 in decimal)</td>
|
||||
<td><code>C14B6665</code> (1701202881 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0
|
|||
<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 = 1690CE50058E37D10D31692F9BA3CCDA8023192F99EAFF1CCB556981BA08BC948D90B29E964137F12FEEB4B416212F96399825D52EEF78BFD0A5EE912DE42AC307AC10FF6547C1AC166D86D9603D259AAABAF03EAA80318CDBE1276476543B7F0FF381419BD9A52101F632608C51FBABAEBE4D16DBEDA7CA729722E304A8A1D0945B1CFEACA4970A4E7BAB66B5159519A10841A641333E76B6F7012C86BD9E7F40D4D7AF86007D713BF5BD716965FDC318370C4AFD10E2FC0B0798C318D757D14F2F88EA8AB529EBC7A8614108EF89DDFCF61F83DECDB688DAC7C8057CA658F4AFD9C450E7B37A86CA67FFFB647708835FE1833F6702820D44B3076943510824</code></pre>
|
||||
<pre><code>b = 6074DE2CD93A3DD76723B23E1AC824FB4510736FFBC794C798108AB034F46FB46E7F7FE8BCD9DFBC01B346AF766D8F2B683F89C7ACA0FB85C3ECC699F3095E20659498E9074A5456CC395F9B7E936D94BDE4468C8DD0EC41ADBC0EC34360563B7365369A5432DB8DE1564F27B51890A57C99FC7AA6C6D6F7F6799947526A50C46C97FFA62272008B7831A903AC2857A3CDA6FD786CE10643E58613145B3E88E0E2E863839C09E27899F68952E12B15EE2A27999527214BBEEF952DA0AB84CCFC382310BD185BF0A930DF27387445ED31D8EBB33339FC01EC3CA5EB60A389D2AC470D71D00C5CEDE2EEB0E5A5E902C27EFCA01BB5CFD35093BAF877C9F0A4D632</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 = B5B7ECA50AA21159E6808734399E78D58C7DE735990AF8B1746B86107EBCEDCBCBAEABD2015748E99BE50429B233BB0E94572C48DF4D138D5587C37FAB8394A1660F7C1183E1C145A5C71349D39D146DF30FB39624AE87868937EA0EC34E433A217DA33A84A0150412DCDC257D11B4B68C7280B06A6C751F3AA8ED313F23049DB2470B09AFDD52A4362F9FF28287C11F4750443C6440125C44F21F0B410E49A39E10F45DA6ACF7FC2AA14D1549C7674692DA2192CE41B1238B0E94F17328C18550BC5C74CA9655B368A95660134B662DFC194F95A7437FD59E9E81FD8E1A6A51CC37604472F864C0317D5A16998F1191D1D539F0105DBD872104B5EDF13A357E</code></pre>
|
||||
<pre><code>g_b = 6BB1E74F256AA9E11A6D1D408213ADD2D81809FBF74D24A61392948C0C0D9814CD9FF9ABED79033B4E10E27EA96121F92FB3FE6CE8224AC2ED82B0BABBC70342D903B8EEDDBC6DB5D5AFAE214A3C141770C1CE2CDCEA1E223D72ACB07F53C4583AC19A3FB61D6629DFE0BE02E5C1817DCC07ED57A759F28AF0C0018F8FFFF20A8E686D7F08B8EF3D1CC2310A81E1E577A408A12BFEC439966DBC8D658FA571399B728325897B4CC3566D6ABA99A688A7011206997BB5970B4CFFBA3AC796FD182CD6C51D9981AB1718F513D95DE2C9016C2841AFBCDB9651D919921D57B64E6E06127D99051FD4E83FD50939B2C15AD092D7D681ABED7C49CD5A0BBBAD40D83C</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 C0 50 C4 54 83 E6 C2 E3 30 D6 52 14
|
||||
0010 | 99 45 3D 5B 53 3B AC FB 11 67 B9 55 80 95 BD 91
|
||||
0020 | A7 7F 8D 0E 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | B5 B7 EC A5 0A A2 11 59 E6 80 87 34 39 9E 78 D5
|
||||
0040 | 8C 7D E7 35 99 0A F8 B1 74 6B 86 10 7E BC ED CB
|
||||
0050 | CB AE AB D2 01 57 48 E9 9B E5 04 29 B2 33 BB 0E
|
||||
0060 | 94 57 2C 48 DF 4D 13 8D 55 87 C3 7F AB 83 94 A1
|
||||
0070 | 66 0F 7C 11 83 E1 C1 45 A5 C7 13 49 D3 9D 14 6D
|
||||
0080 | F3 0F B3 96 24 AE 87 86 89 37 EA 0E C3 4E 43 3A
|
||||
0090 | 21 7D A3 3A 84 A0 15 04 12 DC DC 25 7D 11 B4 B6
|
||||
00A0 | 8C 72 80 B0 6A 6C 75 1F 3A A8 ED 31 3F 23 04 9D
|
||||
00B0 | B2 47 0B 09 AF DD 52 A4 36 2F 9F F2 82 87 C1 1F
|
||||
00C0 | 47 50 44 3C 64 40 12 5C 44 F2 1F 0B 41 0E 49 A3
|
||||
00D0 | 9E 10 F4 5D A6 AC F7 FC 2A A1 4D 15 49 C7 67 46
|
||||
00E0 | 92 DA 21 92 CE 41 B1 23 8B 0E 94 F1 73 28 C1 85
|
||||
00F0 | 50 BC 5C 74 CA 96 55 B3 68 A9 56 60 13 4B 66 2D
|
||||
0100 | FC 19 4F 95 A7 43 7F D5 9E 9E 81 FD 8E 1A 6A 51
|
||||
0110 | CC 37 60 44 72 F8 64 C0 31 7D 5A 16 99 8F 11 91
|
||||
0120 | D1 D5 39 F0 10 5D BD 87 21 04 B5 ED F1 3A 35 7E</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 B5 59 9A FA 6B AC 2E A9 0A BE E2 D7
|
||||
0010 | B5 4D D5 1D 97 03 22 93 F4 8B FD EB 2D 7C 79 AF
|
||||
0020 | 50 22 FE FE 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 6B B1 E7 4F 25 6A A9 E1 1A 6D 1D 40 82 13 AD D2
|
||||
0040 | D8 18 09 FB F7 4D 24 A6 13 92 94 8C 0C 0D 98 14
|
||||
0050 | CD 9F F9 AB ED 79 03 3B 4E 10 E2 7E A9 61 21 F9
|
||||
0060 | 2F B3 FE 6C E8 22 4A C2 ED 82 B0 BA BB C7 03 42
|
||||
0070 | D9 03 B8 EE DD BC 6D B5 D5 AF AE 21 4A 3C 14 17
|
||||
0080 | 70 C1 CE 2C DC EA 1E 22 3D 72 AC B0 7F 53 C4 58
|
||||
0090 | 3A C1 9A 3F B6 1D 66 29 DF E0 BE 02 E5 C1 81 7D
|
||||
00A0 | CC 07 ED 57 A7 59 F2 8A F0 C0 01 8F 8F FF F2 0A
|
||||
00B0 | 8E 68 6D 7F 08 B8 EF 3D 1C C2 31 0A 81 E1 E5 77
|
||||
00C0 | A4 08 A1 2B FE C4 39 96 6D BC 8D 65 8F A5 71 39
|
||||
00D0 | 9B 72 83 25 89 7B 4C C3 56 6D 6A BA 99 A6 88 A7
|
||||
00E0 | 01 12 06 99 7B B5 97 0B 4C FF BA 3A C7 96 FD 18
|
||||
00F0 | 2C D6 C5 1D 99 81 AB 17 18 F5 13 D9 5D E2 C9 01
|
||||
0100 | 6C 28 41 AF BC DB 96 51 D9 19 92 1D 57 B6 4E 6E
|
||||
0110 | 06 12 7D 99 05 1F D4 E8 3F D5 09 39 B2 C1 5A D0
|
||||
0120 | 92 D7 D6 81 AB ED 7C 49 CD 5A 0B BB AD 40 D8 3C</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 = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>C050C45483E6C2E330D6521499453D5B</code></td>
|
||||
<td><code>B5599AFA6BAC2EA90ABEE2D7B54DD51D</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>533BACFB1167B9558095BD91A77F8D0E</code></td>
|
||||
<td><code>97032293F48BFDEB2D7C79AF5022FEFE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE000100B5B7ECA50AA21159E6808734</code> <code>399E78D58C7DE735990AF8B1746B8610</code> <code>7EBCEDCBCBAEABD2015748E99BE50429</code> <code>B233BB0E94572C48DF4D138D5587C37F</code> <code>AB8394A1660F7C1183E1C145A5C71349</code> <code>D39D146DF30FB39624AE87868937EA0E</code> <code>C34E433A217DA33A84A0150412DCDC25</code> <code>7D11B4B68C7280B06A6C751F3AA8ED31</code> <code>3F23049DB2470B09AFDD52A4362F9FF2</code> <code>8287C11F4750443C6440125C44F21F0B</code> <code>410E49A39E10F45DA6ACF7FC2AA14D15</code> <code>49C7674692DA2192CE41B1238B0E94F1</code> <code>7328C18550BC5C74CA9655B368A95660</code> <code>134B662DFC194F95A7437FD59E9E81FD</code> <code>8E1A6A51CC37604472F864C0317D5A16</code> <code>998F1191D1D539F0105DBD872104B5ED</code><br> <code>F13A357E</code></td>
|
||||
<td><code>FE0001006BB1E74F256AA9E11A6D1D40</code> <code>8213ADD2D81809FBF74D24A61392948C</code> <code>0C0D9814CD9FF9ABED79033B4E10E27E</code> <code>A96121F92FB3FE6CE8224AC2ED82B0BA</code> <code>BBC70342D903B8EEDDBC6DB5D5AFAE21</code> <code>4A3C141770C1CE2CDCEA1E223D72ACB0</code> <code>7F53C4583AC19A3FB61D6629DFE0BE02</code> <code>E5C1817DCC07ED57A759F28AF0C0018F</code> <code>8FFFF20A8E686D7F08B8EF3D1CC2310A</code> <code>81E1E577A408A12BFEC439966DBC8D65</code> <code>8FA571399B728325897B4CC3566D6ABA</code> <code>99A688A7011206997BB5970B4CFFBA3A</code> <code>C796FD182CD6C51D9981AB1718F513D9</code> <code>5DE2C9016C2841AFBCDB9651D919921D</code> <code>57B64E6E06127D99051FD4E83FD50939</code> <code>B2C15AD092D7D681ABED7C49CD5A0BBB</code><br> <code>AD40D83C</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 = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0
|
|||
<!-- 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 = 54B64366C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0E0000000000000000FE000100B5B7ECA50AA21159E6808734399E78D58C7DE735990AF8B1746B86107EBCEDCBCBAEABD2015748E99BE50429B233BB0E94572C48DF4D138D5587C37FAB8394A1660F7C1183E1C145A5C71349D39D146DF30FB39624AE87868937EA0EC34E433A217DA33A84A0150412DCDC257D11B4B68C7280B06A6C751F3AA8ED313F23049DB2470B09AFDD52A4362F9FF28287C11F4750443C6440125C44F21F0B410E49A39E10F45DA6ACF7FC2AA14D1549C7674692DA2192CE41B1238B0E94F17328C18550BC5C74CA9655B368A95660134B662DFC194F95A7437FD59E9E81FD8E1A6A51CC37604472F864C0317D5A16998F1191D1D539F0105DBD872104B5EDF13A357E
|
||||
padding = C4134CFF706DDC04451346F6
|
||||
tmp_aes_key = DDE9D7DA461399FD1D9564B9313F80C9B33BE062852B3D48A82D396812037569
|
||||
tmp_aes_iv = 23E6A1FE2F85BF5F4EA12E1514BB8D937849463EF3B1027712C1F8D2C6A06071</code></pre>
|
||||
<pre><code>data = 54B64366B5599AFA6BAC2EA90ABEE2D7B54DD51D97032293F48BFDEB2D7C79AF5022FEFE0000000000000000FE0001006BB1E74F256AA9E11A6D1D408213ADD2D81809FBF74D24A61392948C0C0D9814CD9FF9ABED79033B4E10E27EA96121F92FB3FE6CE8224AC2ED82B0BABBC70342D903B8EEDDBC6DB5D5AFAE214A3C141770C1CE2CDCEA1E223D72ACB07F53C4583AC19A3FB61D6629DFE0BE02E5C1817DCC07ED57A759F28AF0C0018F8FFFF20A8E686D7F08B8EF3D1CC2310A81E1E577A408A12BFEC439966DBC8D658FA571399B728325897B4CC3566D6ABA99A688A7011206997BB5970B4CFFBA3AC796FD182CD6C51D9981AB1718F513D95DE2C9016C2841AFBCDB9651D919921D57B64E6E06127D99051FD4E83FD50939B2C15AD092D7D681ABED7C49CD5A0BBBAD40D83C
|
||||
padding = 3E96302300ACDA40DA16C938
|
||||
tmp_aes_key = 1958F662C25BC962035DCDB03466EEE5912D0A27078AC3B48D09FF58C35597ED
|
||||
tmp_aes_iv = 14EAA9C9B97D2BFABEF57C84CEE9FBE743EA0FA0F91CCE32E91A66683BAE9AB8</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 = 00EE6F2CF13AEEB7440E04A12A3078CDDA211EB8A4A97013C8DEC965B732C51B71452CC89748DB2860DBEDA83F7908EE27AACDE23A63E55162193FB951C95708990E9583E0FC26B7B3892061A7ED7FDBE0DF4A33E06BB9E5BCFC9CB403810589FEFCBE32DDB40EEB2D79493F7CCAD91BEA12E57FBC104B231D85158ABBBF01BF6A48E8C19F1180574E73F59051967B7842AF0B80B30C43DD55ABFBB7F946B1E9A1BF81DFB72E48633B368F88E9CB4FF8DCA7EE762E4E5D9C875F1C91787F7BC6D29E0FE91D88C791FDDDB3FE25C5D4AA4C1C92AE11E3B34D4B012FBE502FA969B1427DC8A2F030BF537CC50723F2E1B88ADC81F496EBEBF328315A96FAB040A83242F53DC9A8C7B8179388C1A52F1477082AF82D687B46464187CA5F6672C7A427F0F32C25CCC5FDBD7E3E44488EF4938402ACEC1512856C3E7D768FBA24D6D8800A4F48B07B8EAED197534D91C84C8B</code></pre>
|
||||
<pre><code>encrypted_data = 307D884EFAE1A7E551D15DF89C96B6DF12AFA5047B19ABB5B726FB9BC3D802CC4546EE5E6AB8928D90869B6C387E0DECF372DC9F937E0ADA1622BBFE64647BBE8291B701530523C7D2A19F704300EE2199FF065F2A04B9598873C37B28978B93B9C461F7B13ECDEEAA45905F453E5A624E97B4FEB56CA1542F66187C22624C4BE1F99A41601E5DCD58410A52A4A02507909FCCF2DACE9A22D1EA6722141705899213C1E8FF168B430F0D13199F3D5E2F7FE6D535CBEFCB727D20B967BF7C90DDA5B96D56B545D98F669DD529FC02C64C7A4E2C0EA4AE5D6DAA6D0ABA0B15C5859F897B8D26DA653772EAACAF7322BB98DDE764B79A5CE4B32AC8E2CFA8D9B31470CE9BBDB501CFDCBCE5D3E35B5C431C6FCD64EA05D7AF5483E1953DCDBB1C04CF3E759A88D289BC9B3A74CEDF1F88D094263B2899A4EE392E8632C96834661D1D1CDC1D675B34E37CF92770780E5E03</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 A0 34 08 00 E5 57 63 65
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 C0 50 C4 54 83 E6 C2 E3
|
||||
0020 | 30 D6 52 14 99 45 3D 5B 53 3B AC FB 11 67 B9 55
|
||||
0030 | 80 95 BD 91 A7 7F 8D 0E FE 50 01 00 00 EE 6F 2C
|
||||
0040 | F1 3A EE B7 44 0E 04 A1 2A 30 78 CD DA 21 1E B8
|
||||
0050 | A4 A9 70 13 C8 DE C9 65 B7 32 C5 1B 71 45 2C C8
|
||||
0060 | 97 48 DB 28 60 DB ED A8 3F 79 08 EE 27 AA CD E2
|
||||
0070 | 3A 63 E5 51 62 19 3F B9 51 C9 57 08 99 0E 95 83
|
||||
0080 | E0 FC 26 B7 B3 89 20 61 A7 ED 7F DB E0 DF 4A 33
|
||||
0090 | E0 6B B9 E5 BC FC 9C B4 03 81 05 89 FE FC BE 32
|
||||
00A0 | DD B4 0E EB 2D 79 49 3F 7C CA D9 1B EA 12 E5 7F
|
||||
00B0 | BC 10 4B 23 1D 85 15 8A BB BF 01 BF 6A 48 E8 C1
|
||||
00C0 | 9F 11 80 57 4E 73 F5 90 51 96 7B 78 42 AF 0B 80
|
||||
00D0 | B3 0C 43 DD 55 AB FB B7 F9 46 B1 E9 A1 BF 81 DF
|
||||
00E0 | B7 2E 48 63 3B 36 8F 88 E9 CB 4F F8 DC A7 EE 76
|
||||
00F0 | 2E 4E 5D 9C 87 5F 1C 91 78 7F 7B C6 D2 9E 0F E9
|
||||
0100 | 1D 88 C7 91 FD DD B3 FE 25 C5 D4 AA 4C 1C 92 AE
|
||||
0110 | 11 E3 B3 4D 4B 01 2F BE 50 2F A9 69 B1 42 7D C8
|
||||
0120 | A2 F0 30 BF 53 7C C5 07 23 F2 E1 B8 8A DC 81 F4
|
||||
0130 | 96 EB EB F3 28 31 5A 96 FA B0 40 A8 32 42 F5 3D
|
||||
0140 | C9 A8 C7 B8 17 93 88 C1 A5 2F 14 77 08 2A F8 2D
|
||||
0150 | 68 7B 46 46 41 87 CA 5F 66 72 C7 A4 27 F0 F3 2C
|
||||
0160 | 25 CC C5 FD BD 7E 3E 44 48 8E F4 93 84 02 AC EC
|
||||
0170 | 15 12 85 6C 3E 7D 76 8F BA 24 D6 D8 80 0A 4F 48
|
||||
0180 | B0 7B 8E AE D1 97 53 4D 91 C8 4C 8B</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 14 B4 04 00 C1 4B 66 65
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 B5 59 9A FA 6B AC 2E A9
|
||||
0020 | 0A BE E2 D7 B5 4D D5 1D 97 03 22 93 F4 8B FD EB
|
||||
0030 | 2D 7C 79 AF 50 22 FE FE FE 50 01 00 30 7D 88 4E
|
||||
0040 | FA E1 A7 E5 51 D1 5D F8 9C 96 B6 DF 12 AF A5 04
|
||||
0050 | 7B 19 AB B5 B7 26 FB 9B C3 D8 02 CC 45 46 EE 5E
|
||||
0060 | 6A B8 92 8D 90 86 9B 6C 38 7E 0D EC F3 72 DC 9F
|
||||
0070 | 93 7E 0A DA 16 22 BB FE 64 64 7B BE 82 91 B7 01
|
||||
0080 | 53 05 23 C7 D2 A1 9F 70 43 00 EE 21 99 FF 06 5F
|
||||
0090 | 2A 04 B9 59 88 73 C3 7B 28 97 8B 93 B9 C4 61 F7
|
||||
00A0 | B1 3E CD EE AA 45 90 5F 45 3E 5A 62 4E 97 B4 FE
|
||||
00B0 | B5 6C A1 54 2F 66 18 7C 22 62 4C 4B E1 F9 9A 41
|
||||
00C0 | 60 1E 5D CD 58 41 0A 52 A4 A0 25 07 90 9F CC F2
|
||||
00D0 | DA CE 9A 22 D1 EA 67 22 14 17 05 89 92 13 C1 E8
|
||||
00E0 | FF 16 8B 43 0F 0D 13 19 9F 3D 5E 2F 7F E6 D5 35
|
||||
00F0 | CB EF CB 72 7D 20 B9 67 BF 7C 90 DD A5 B9 6D 56
|
||||
0100 | B5 45 D9 8F 66 9D D5 29 FC 02 C6 4C 7A 4E 2C 0E
|
||||
0110 | A4 AE 5D 6D AA 6D 0A BA 0B 15 C5 85 9F 89 7B 8D
|
||||
0120 | 26 DA 65 37 72 EA AC AF 73 22 BB 98 DD E7 64 B7
|
||||
0130 | 9A 5C E4 B3 2A C8 E2 CF A8 D9 B3 14 70 CE 9B BD
|
||||
0140 | B5 01 CF DC BC E5 D3 E3 5B 5C 43 1C 6F CD 64 EA
|
||||
0150 | 05 D7 AF 54 83 E1 95 3D CD BB 1C 04 CF 3E 75 9A
|
||||
0160 | 88 D2 89 BC 9B 3A 74 CE DF 1F 88 D0 94 26 3B 28
|
||||
0170 | 99 A4 EE 39 2E 86 32 C9 68 34 66 1D 1D 1C DC 1D
|
||||
0180 | 67 5B 34 E3 7C F9 27 70 78 0E 5E 03</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>A0340800E5576365</code></td>
|
||||
<td><code>14B40400C14B6665</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>C050C45483E6C2E330D6521499453D5B</code></td>
|
||||
<td><code>B5599AFA6BAC2EA90ABEE2D7B54DD51D</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>533BACFB1167B9558095BD91A77F8D0E</code></td>
|
||||
<td><code>97032293F48BFDEB2D7C79AF5022FEFE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE50010000EE6F2CF13AEEB7440E04A1</code> <code>2A3078CDDA211EB8A4A97013C8DEC965</code> <code>B732C51B71452CC89748DB2860DBEDA8</code> <code>3F7908EE27AACDE23A63E55162193FB9</code> <code>51C95708990E9583E0FC26B7B3892061</code> <code>A7ED7FDBE0DF4A33E06BB9E5BCFC9CB4</code> <code>03810589FEFCBE32DDB40EEB2D79493F</code> <code>7CCAD91BEA12E57FBC104B231D85158A</code> <code>BBBF01BF6A48E8C19F1180574E73F590</code> <code>51967B7842AF0B80B30C43DD55ABFBB7</code> <code>F946B1E9A1BF81DFB72E48633B368F88</code> <code>E9CB4FF8DCA7EE762E4E5D9C875F1C91</code> <code>787F7BC6D29E0FE91D88C791FDDDB3FE</code> <code>25C5D4AA4C1C92AE11E3B34D4B012FBE</code> <code>502FA969B1427DC8A2F030BF537CC507</code> <code>23F2E1B88ADC81F496EBEBF328315A96</code> <code>FAB040A83242F53DC9A8C7B8179388C1</code> <code>A52F1477082AF82D687B46464187CA5F</code> <code>6672C7A427F0F32C25CCC5FDBD7E3E44</code> <code>488EF4938402ACEC1512856C3E7D768F</code> <code>BA24D6D8800A4F48B07B8EAED197534D</code><br> <code>91C84C8B</code></td>
|
||||
<td><code>FE500100307D884EFAE1A7E551D15DF8</code> <code>9C96B6DF12AFA5047B19ABB5B726FB9B</code> <code>C3D802CC4546EE5E6AB8928D90869B6C</code> <code>387E0DECF372DC9F937E0ADA1622BBFE</code> <code>64647BBE8291B701530523C7D2A19F70</code> <code>4300EE2199FF065F2A04B9598873C37B</code> <code>28978B93B9C461F7B13ECDEEAA45905F</code> <code>453E5A624E97B4FEB56CA1542F66187C</code> <code>22624C4BE1F99A41601E5DCD58410A52</code> <code>A4A02507909FCCF2DACE9A22D1EA6722</code> <code>141705899213C1E8FF168B430F0D1319</code> <code>9F3D5E2F7FE6D535CBEFCB727D20B967</code> <code>BF7C90DDA5B96D56B545D98F669DD529</code> <code>FC02C64C7A4E2C0EA4AE5D6DAA6D0ABA</code> <code>0B15C5859F897B8D26DA653772EAACAF</code> <code>7322BB98DDE764B79A5CE4B32AC8E2CF</code> <code>A8D9B31470CE9BBDB501CFDCBCE5D3E3</code> <code>5B5C431C6FCD64EA05D7AF5483E1953D</code> <code>CDBB1C04CF3E759A88D289BC9B3A74CE</code> <code>DF1F88D094263B2899A4EE392E8632C9</code> <code>6834661D1D1CDC1D675B34E37CF92770</code><br> <code>780E5E03</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 = 7005033C51F039B6421BB899E60D797774C3566D859FD86BC5BC0715A19411F8FBFCA7F7BDD1776AD091897A9DB32A97E811AE6AF33229A187D667E054CA7E1E4A2887F98A392536A1AB8CF3F65FAA7E71E992E0B628BF4B34337967804DBCC9CB74707639E0B6B6C4E29C7E78AD66846C7C1305923FAEAD6BDD91A6D20F89061F80BBC997BF42A8748338E3F44173C57BFAA2AD1A9B0520475A091F9FDE3BFED9B0A2FA92C0E4ECE12B7D1A98D3C9AFD25F10919EEF0A20F443856DE0284CE2647A9B2DE6C4E8DF71A014F6CAF09ADD5D83CFD066E330B3ECDC024514DE6F54EFFD14C156CC9ECBF472FECC70A4AB10BFA7281D4A93B8348CA48C6215017801</code></pre>
|
||||
<pre><code>auth_key = 2292DBAEE0BFC2859A6AE19B7FEACD33A657DDBB02A7234938AC91B21AED8B368D313899ACFC9CC36CBF2C3373ADAF67B649746145FF92DE00E8AB04C96E266B616C009B389952401D91780937EFCFDB4BD5C0E0657DE4C3B23184C9D5329DB7FF1A8A72B90B9643DD96385C0A3783C1CC5DB095C8E42E6097B92689498368ECDDC023FF6F12E9602F994D37B52B66D8304A269BEE755D6D78EB3794A7DCEB56D32B231A982DED20D180B23295C0E14F0E72133A0A7BF16F4A6801F6F215268DAEBD0674942E4D2DD7A2D789DD79ECE00D9404933FEFA989667A527B4251D8501A7259A580EF50DF95A4B5DE07271BBD00C561E488E3AA38ED9C2EFBCADC97EC</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 38 0B 03 E6 57 63 65
|
||||
0010 | 48 00 00 00 34 F7 CB 3B C0 50 C4 54 83 E6 C2 E3
|
||||
0020 | 30 D6 52 14 99 45 3D 5B 53 3B AC FB 11 67 B9 55
|
||||
0030 | 80 95 BD 91 A7 7F 8D 0E EA 9F 42 E2 0B 5E 54 AF
|
||||
0040 | 96 4B DE BE 06 1B 1B 7A</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 34 28 F4 C1 4B 66 65
|
||||
0010 | 7C 00 00 00 34 F7 CB 3B B5 59 9A FA 6B AC 2E A9
|
||||
0020 | 0A BE E2 D7 B5 4D D5 1D 97 03 22 93 F4 8B FD EB
|
||||
0030 | 2D 7C 79 AF 50 22 FE FE C3 82 F8 B3 46 D5 E0 CA
|
||||
0040 | BF 03 1B 9F 7D 07 1A C8</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>01380B03E6576365</code></td>
|
||||
<td><code>013428F4C14B6665</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>48000000</code> (72 in decimal)</td>
|
||||
<td><code>7C000000</code> (124 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>C050C45483E6C2E330D6521499453D5B</code></td>
|
||||
<td><code>B5599AFA6BAC2EA90ABEE2D7B54DD51D</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>533BACFB1167B9558095BD91A77F8D0E</code></td>
|
||||
<td><code>97032293F48BFDEB2D7C79AF5022FEFE</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>EA9F42E20B5E54AF964BDEBE061B1B7A</code></td>
|
||||
<td><code>C382F8B346D5E0CABF031B9F7D071AC8</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>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/attachMenuBot">attachMenuBot</a></td>
|
||||
<td>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></td>
|
||||
<td>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment/side menu »</a><br><br>At least one of the <code>show_in_attach_menu</code> or the <code>show_in_side_menu</code> flags will always be set.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue