Update content of files

This commit is contained in:
GitHub Action 2024-02-08 18:57:52 +00:00
parent 3291add603
commit 97099ed145
17 changed files with 271 additions and 280 deletions

View file

@ -244,18 +244,9 @@ If empty, the current chat is used. </li>
<a href='/method/messages.requestSimpleWebView'>messages.requestSimpleWebView</a>#1a46500a flags:<a href='/type/%23'>#</a> from_switch_webview:flags.1?<a href='/constructor/true'>true</a> from_side_menu:flags.2?<a href='/constructor/true'>true</a> bot:<a href='/type/InputUser'>InputUser</a> url:flags.3?<a href='/type/string'>string</a> start_param:flags.4?<a href='/type/string'>string</a> theme_params:flags.0?<a href='/type/DataJSON'>DataJSON</a> platform:<a href='/type/string'>string</a> = <a href='/type/SimpleWebViewResult'>SimpleWebViewResult</a>;</code></pre>
<p>Side menu Mini Apps can be opened by clicking on the installed <a href="/api/bots/attach">side menu entry »</a>. </p>
<p>This action must trigger a <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> query with the <code>from_side_menu</code> flag set: clients should open a webview using the <code>url</code> contained in the returned <a href="/constructor/simpleWebViewResultUrl">simpleWebViewResultUrl</a>. </p>
<h3><a class="anchor" href="#direct-link-mini-apps" id="direct-link-mini-apps" name="direct-link-mini-apps"><i class="anchor-icon"></i></a>Direct link Mini Apps</h3>
<p>Schema:</p>
<pre><code><a href='/constructor/simpleWebViewResultUrl'>simpleWebViewResultUrl</a>#882f76bb url:<a href='/type/string'>string</a> = <a href='/type/SimpleWebViewResult'>SimpleWebViewResult</a>;
---functions---
<a href='/method/messages.requestSimpleWebView'>messages.requestSimpleWebView</a>#1a46500a flags:<a href='/type/%23'>#</a> from_switch_webview:flags.1?<a href='/constructor/true'>true</a> from_side_menu:flags.2?<a href='/constructor/true'>true</a> bot:<a href='/type/InputUser'>InputUser</a> url:flags.3?<a href='/type/string'>string</a> start_param:flags.4?<a href='/type/string'>string</a> theme_params:flags.0?<a href='/type/DataJSON'>DataJSON</a> platform:<a href='/type/string'>string</a> = <a href='/type/SimpleWebViewResult'>SimpleWebViewResult</a>;</code></pre>
<p>Direct Link Mini Apps can be opened by clicking on a <a href="/api/links#mini-app-links">Mini App link »</a>. </p>
<p>This action must trigger a <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> query with the <code>from_side_menu</code> flag set (like for <a href="#side-menu-mini-apps">side menu Mini Apps</a>), and any eventual <code>start_parameter</code> from the link should also be passed to the <code>start_param</code> flag. </p>
<p>Note that the app should be opened (with an installation prompt before, if needed) even if the client is minimized. </p>
<p>Side menu Mini Apps can also be opened by clicking on a <a href="/api/links#mini-app-links">Mini App link »</a>: in which case the <code>start_parameter</code> should be provided to <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>.<code>start_param</code>, if present; note that in this case, the app should be opened (with an <a href="/api/bots/attach">installation prompt »</a> before, if not already installed) even if the client is minimized. </p>
<p>After invoking <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> and obtaining a <a href="/constructor/simpleWebViewResultUrl">simpleWebViewResultUrl</a> result, clients should open a webview using the <code>url</code> contained in the returned <a href="/constructor/simpleWebViewResultUrl">simpleWebViewResultUrl</a>. </p>
<h3><a class="anchor" href="#named-mini-apps" id="named-mini-apps" name="named-mini-apps"><i class="anchor-icon"></i></a>Named Mini Apps</h3>
<h3><a class="anchor" href="#direct-link-mini-apps" id="direct-link-mini-apps" name="direct-link-mini-apps"><i class="anchor-icon"></i></a>Direct Link Mini Apps</h3>
<p>Schema:</p>
<pre><code><a href='/constructor/inputBotAppID'>inputBotAppID</a>#a920bd7a id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputBotApp'>InputBotApp</a>;
<a href='/constructor/inputBotAppShortName'>inputBotAppShortName</a>#908c0407 bot_id:<a href='/type/InputUser'>InputUser</a> short_name:<a href='/type/string'>string</a> = <a href='/type/InputBotApp'>InputBotApp</a>;
@ -272,7 +263,7 @@ If empty, the current chat is used. </li>
<a href='/method/messages.getBotApp'>messages.getBotApp</a>#34fdc5c3 app:<a href='/type/InputBotApp'>InputBotApp</a> hash:<a href='/type/long'>long</a> = <a href='/type/messages.BotApp'>messages.BotApp</a>;
<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-mini-app-links">named Mini App links »</a>. </p>
<p>Another way to open Mini Apps is by using <a href="/api/links#direct-mini-app-links">Direct Mini App links »</a>. </p>
<p>These links are different from all other Mini App links, 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>

View file

@ -377,8 +377,8 @@ When fetching the admin list of a supergroup using <a href="/method/channels.get
<p>A list of Telegram domains that support automatic login with no user confirmation, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization »</a>. (array of strings)</p>
<h4><a class="anchor" href="#whitelisted-domains" id="whitelisted-domains" name="whitelisted-domains"><i class="anchor-icon"></i></a><code>whitelisted_domains</code></h4>
<p>A list of Telegram domains that can always be opened without additional user confirmation, when clicking on in-app links where the URL is not fully displayed (i.e. <a href="/constructor/messageEntityTextUrl">messageEntityTextUrl</a> entities). (array of strings)</p>
<p>Note that when opening <a href="/api/links#named-mini-app-links">named Mini App links</a> for the first time, confirmation should still be requested from the user, even if the domain of the containing deep link is whitelisted (i.e. <code>t.me/&lt;bot_username&gt;/&lt;short_name&gt;?startapp=&lt;start_parameter&gt;</code>, where <code>t.me</code> is whitelisted). </p>
<p>Confirmation should <strong>always</strong> be asked, even if we already opened the <a href="/api/links#named-mini-app-links">named Mini App</a> before, if the link is not visible (i.e. <a href="/constructor/messageEntityTextUrl">messageEntityTextUrl</a> text links, inline buttons etc.). </p>
<p>Note that when opening <a href="/api/links#direct-mini-app-links">direct Mini App links</a> for the first time, confirmation should still be requested from the user, even if the domain of the containing deep link is whitelisted (i.e. <code>t.me/&lt;bot_username&gt;/&lt;short_name&gt;?startapp=&lt;start_parameter&gt;</code>, where <code>t.me</code> is whitelisted). </p>
<p>Confirmation should <strong>always</strong> be asked, even if we already opened the <a href="/api/links#direct-mini-app-links">direct Mini App</a> before, if the link is not visible (i.e. <a href="/constructor/messageEntityTextUrl">messageEntityTextUrl</a> text links, inline buttons etc.). </p>
<h4><a class="anchor" href="#round-video-encoding" id="round-video-encoding" name="round-video-encoding"><i class="anchor-icon"></i></a><code>round_video_encoding</code></h4>
<p>Contains a set of recommended codec parameters for round videos. (object, as described in the example)</p>
<h4><a class="anchor" href="#chat-read-mark-size-threshold" id="chat-read-mark-size-threshold" name="chat-read-mark-size-threshold"><i class="anchor-icon"></i></a><code>chat_read_mark_size_threshold</code></h4>

View file

@ -1068,7 +1068,7 @@ Bots may also now specify a custom peer filter when using <a href="/constructor/
<h4><a class="anchor" href="#schema" id="schema" name="schema"><i class="anchor-icon"></i></a>Schema</h4>
<div><pre><code><a href="/constructor/messagePeerReaction">messagePeerReaction</a>#8c79b63c flags:<a href="/type/%23">#</a> big:flags.0?<a href="/constructor/true">true</a> unread:flags.1?<a href="/constructor/true">true</a> peer_id:<a href="/type/Peer">Peer</a> date:<a href="/type/int">int</a> reaction:<a href="/type/Reaction">Reaction</a> = <a href="/type/MessagePeerReaction">MessagePeerReaction</a>;<br></code></pre></div>
<h3><a class="anchor" href="#layer-154" id="layer-154" name="layer-154"><i class="anchor-icon"></i></a><a href="/schema?layer=154">Layer 154</a></h3>
<p>Added support for <a href="/api/bots/webapps#named-mini-apps">named Mini Apps</a>, which can be opened from a <a href="/api/links#named-mini-app-links">named Mini App deep link</a>.<br>
<p>Added support for <a href="/api/bots/webapps#named-mini-apps">named Mini Apps</a>, which can be opened from a <a href="/api/links#direct-mini-app-links">Direct Mini App link</a>.<br>
<a href="/api/bots/webapps#inline-mode-mini-apps">Web apps</a> can now be opened by clicking on a <code>switch_webview</code> inline result, similar to <code>switch_pm</code> inline results.<br>
Bots can now edit and localize their own about text and description.<br>
The current <a href="/api/auth#future-auth-tokens">future auth token</a> is now directly returned in the <a href="/constructor/config">config</a> constructor, which was also cleaned up to remove redundant information already contained in the <a href="/api/config#client-configuration">appConfig configuration</a>.<br>
@ -1078,8 +1078,8 @@ The current <a href="/api/auth#future-auth-tokens">future auth token</a> is now
<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>
<ul>
<li>Added <a href="/method/messages.getBotApp">messages.getBotApp</a> - Obtain information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a></li>
<li>Added <a href="/method/messages.requestAppWebView">messages.requestAppWebView</a> - Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-mini-app-links">named Mini App deep link</a>, sending over user information after user confirmation.</li>
<li>Added <a href="/method/messages.getBotApp">messages.getBotApp</a> - Obtain information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a></li>
<li>Added <a href="/method/messages.requestAppWebView">messages.requestAppWebView</a> - Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#direct-mini-app-links">direct Mini App deep link</a>, sending over user information after user confirmation.</li>
<li>Added <a href="/method/bots.setBotInfo">bots.setBotInfo</a> - Set localized name, about text and description of a bot (or of the current account, if called by a bot).</li>
<li>Added <a href="/method/bots.getBotInfo">bots.getBotInfo</a> - Get localized name, about text and description of a bot (or of the current account, if called by a bot).</li>
</ul>
@ -1091,12 +1091,12 @@ The current <a href="/api/auth#future-auth-tokens">future auth token</a> is now
</ul>
<h5><a class="anchor" href="#new-constructors" id="new-constructors" name="new-constructors"><i class="anchor-icon"></i></a>New Constructors</h5>
<ul>
<li>Added <a href="/constructor/inputBotAppID">inputBotAppID</a> - Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a> by its ID</li>
<li>Added <a href="/constructor/inputBotAppShortName">inputBotAppShortName</a> - Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a> by its short name</li>
<li>Added <a href="/constructor/inputBotAppID">inputBotAppID</a> - Used to fetch information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> by its ID</li>
<li>Added <a href="/constructor/inputBotAppShortName">inputBotAppShortName</a> - Used to fetch information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> by its short name</li>
<li>Added <a href="/constructor/botAppNotModified">botAppNotModified</a> - Bot app info hasn't changed.</li>
<li>Added <a href="/constructor/botApp">botApp</a> - Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</li>
<li>Added <a href="/constructor/messages.botApp">messages.botApp</a> - Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a></li>
<li>Added <a href="/constructor/appWebViewResultUrl">appWebViewResultUrl</a> - Contains the link that must be used to open a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</li>
<li>Added <a href="/constructor/botApp">botApp</a> - Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</li>
<li>Added <a href="/constructor/messages.botApp">messages.botApp</a> - Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a></li>
<li>Added <a href="/constructor/appWebViewResultUrl">appWebViewResultUrl</a> - Contains the link that must be used to open a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</li>
<li>Added <a href="/constructor/inlineBotWebView">inlineBotWebView</a> - Specifies an <a href="/api/bots/webapps#inline-mode-mini-apps">inline mode mini app</a> button, shown on top of the inline query results list.</li>
<li>Added <a href="/constructor/readParticipantDate">readParticipantDate</a> - Contains info about when a certain participant has read a message</li>
<li>Added <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</a> - 0-N updates of this type may be returned only when invoking <a href="/method/messages.addChatUser">messages.addChatUser</a>, <a href="/method/channels.inviteToChannel">channels.inviteToChannel</a> or <a href="/method/messages.createChat">messages.createChat</a>: it indicates we couldn't add a user to a chat because of their privacy settings; if required, an <a href="/api/invites">invite link</a> can be shared with the user, instead.</li>

View file

@ -1168,7 +1168,7 @@ Clients should first <a href="/api/bots/attach">install the associated bot attac
<p><code>t.me</code> syntax:</p>
<pre><code>t.me/&lt;bot_username&gt;?startapp
t.me/&lt;bot_username&gt;?startapp=&lt;start_parameter&gt;</code></pre>
<p>Note that <a href="#named-mini-app-links">named Mini App links</a> have a similar syntax, with an additional <code>short_name</code> parameter to identify a specific Mini App owned by the bot. </p>
<p>Note that <a href="#direct-mini-app-links">Direct Mini App links</a> have a similar syntax, with an additional <code>short_name</code> parameter to identify a specific Mini App owned by the bot. </p>
<p><code>tg:</code> syntax:</p>
<pre><code>tg://resolve?domain=&lt;bot_username&gt;&amp;startapp
tg://resolve?domain=&lt;bot_username&gt;&amp;startapp=&lt;start_parameter&gt;</code></pre>
@ -1194,10 +1194,10 @@ tg://resolve?domain=&lt;bot_username&gt;&amp;startapp=&lt;start_parameter&gt;</c
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#named-mini-app-links" id="named-mini-app-links" name="named-mini-app-links"><i class="anchor-icon"></i></a>Named mini app links</h3>
<p>Used to share <a href="/api/bots/webapps#named-mini-apps">named mini apps</a>. </p>
<h3><a class="anchor" href="#direct-mini-app-links" id="direct-mini-app-links" name="direct-mini-app-links"><i class="anchor-icon"></i></a>Direct mini app links</h3>
<p>Used to share <a href="/api/bots/webapps#direct-link-mini-apps">Direct link Mini apps</a>. </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-mini-apps">named Mini App documentation »</a>. </p>
<p>These links should be handled as specified in the <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini Apps documentation »</a>. </p>
<p><code>t.me</code> syntax:</p>
<pre><code>t.me/&lt;bot_username&gt;/&lt;short_name&gt;?startapp=&lt;start_parameter&gt;</code></pre>
<p><code>tg:</code> syntax:</p>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>appWebViewResultUrl</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Contains the link that must be used to open a named Mini App.">
<meta property="description" content="Contains the link that must be used to open a direct link Mini App.">
<meta property="og:title" content="appWebViewResultUrl">
<meta property="og:image" content="">
<meta property="og:description" content="Contains the link that must be used to open a named Mini App.">
<meta property="og:description" content="Contains the link that must be used to open a direct link Mini App.">
<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,7 @@
<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/appWebViewResultUrl" >appWebViewResultUrl</a></li></ul></div>
<h1 id="dev_page_title">appWebViewResultUrl</h1>
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</p>
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">

View file

@ -84,7 +84,7 @@
<tr>
<td><strong>short_name</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>bot mini app short name, used to generate <a href="/api/links#named-mini-app-links">named Mini App deep links</a>.</td>
<td>bot mini app short name, used to generate <a href="/api/links#direct-mini-app-links">Direct Mini App deep links</a>.</td>
</tr>
<tr>
<td><strong>title</strong></td>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>inputBotAppID</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Used to fetch information about a named Mini App by its ID">
<meta property="description" content="Used to fetch information about a direct link Mini App by its ID">
<meta property="og:title" content="inputBotAppID">
<meta property="og:image" content="">
<meta property="og:description" content="Used to fetch information about a named Mini App by its ID">
<meta property="og:description" content="Used to fetch information about a direct link Mini App by its ID">
<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,7 @@
<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/inputBotAppID" >inputBotAppID</a></li></ul></div>
<h1 id="dev_page_title">inputBotAppID</h1>
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a> by its ID</p>
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> by its ID</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -69,7 +69,7 @@
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td><a href="/api/bots/webapps#named-mini-apps">named Mini App</a> ID.</td>
<td><a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> ID.</td>
</tr>
<tr>
<td><strong>access_hash</strong></td>
@ -84,7 +84,7 @@
<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="#botapp" id="botapp" name="botapp"><i class="anchor-icon"></i></a><a href="/constructor/botApp">botApp</a></h4>
<p>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</p></div>
<p>Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</p></div>
</div>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>inputBotAppShortName</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Used to fetch information about a named Mini App by its short name">
<meta property="description" content="Used to fetch information about a direct link Mini App by its short name">
<meta property="og:title" content="inputBotAppShortName">
<meta property="og:image" content="">
<meta property="og:description" content="Used to fetch information about a named Mini App by its short name">
<meta property="og:description" content="Used to fetch information about a direct link Mini App by its short name">
<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,7 @@
<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/inputBotAppShortName" >inputBotAppShortName</a></li></ul></div>
<h1 id="dev_page_title">inputBotAppShortName</h1>
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a> by its short name</p>
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> by its short name</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -74,7 +74,7 @@
<tr>
<td><strong>short_name</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Short name, obtained from a <a href="/api/links#named-mini-app-links">named Mini App deep link</a></td>
<td>Short name, obtained from a <a href="/api/links#direct-mini-app-links">Direct Mini App deep link</a></td>
</tr>
</tbody>
</table>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>messages.botApp</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Contains information about a named Mini App">
<meta property="description" content="Contains information about a direct link Mini App">
<meta property="og:title" content="messages.botApp">
<meta property="og:image" content="">
<meta property="og:description" content="Contains information about a named Mini App">
<meta property="og:description" content="Contains information about a direct link Mini App">
<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,7 @@
<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/messages.botApp" >messages.botApp</a></li></ul></div>
<h1 id="dev_page_title">messages.botApp</h1>
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a></p>
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a></p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -97,7 +97,7 @@
<p><a href="/type/messages.BotApp">messages.BotApp</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="#messagesrequestappwebview" id="messagesrequestappwebview" name="messagesrequestappwebview"><i class="anchor-icon"></i></a><a href="/method/messages.requestAppWebView">messages.requestAppWebView</a></h4>
<p>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-mini-app-links">named Mini App deep link</a>, sending over user information after user confirmation.</p>
<p>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#direct-mini-app-links">direct Mini App deep link</a>, sending over user information after user confirmation.</p>
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</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></div>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>messages.getBotApp</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Obtain information about a named Mini App">
<meta property="description" content="Obtain information about a direct link Mini App">
<meta property="og:title" content="messages.getBotApp">
<meta property="og:image" content="">
<meta property="og:description" content="Obtain information about a named Mini App">
<meta property="og:description" content="Obtain information about a direct link Mini App">
<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,7 @@
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.getBotApp" >messages.getBotApp</a></li></ul></div>
<h1 id="dev_page_title">messages.getBotApp</h1>
<div id="dev_page_content"><p>Obtain information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a></p>
<div id="dev_page_content"><p>Obtain information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a></p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -71,7 +71,7 @@
<tr>
<td><strong>app</strong></td>
<td style="text-align: center;"><a href="/type/InputBotApp">InputBotApp</a></td>
<td>Bot app information obtained from a <a href="/api/links#named-mini-app-links">named Mini App deep link »</a>.</td>
<td>Bot app information obtained from a <a href="/api/links#direct-mini-app-links">Direct Mini App deep link »</a>.</td>
</tr>
<tr>
<td><strong>hash</strong></td>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>messages.requestAppWebView</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Open a bot mini app from a named Mini App deep link, sending over user information after user confirmation. After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.">
<meta property="description" content="Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation. After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.">
<meta property="og:title" content="messages.requestAppWebView">
<meta property="og:image" content="">
<meta property="og:description" content="Open a bot mini app from a named Mini App deep link, sending over user information after user confirmation. After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.">
<meta property="og:description" content="Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation. After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.">
<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,7 @@
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.requestAppWebView" >messages.requestAppWebView</a></li></ul></div>
<h1 id="dev_page_title">messages.requestAppWebView</h1>
<div id="dev_page_content"><p>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-mini-app-links">named Mini App deep link</a>, sending over user information after user confirmation.</p>
<div id="dev_page_content"><p>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#direct-mini-app-links">direct Mini App deep link</a>, sending over user information after user confirmation.</p>
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
@ -77,7 +77,7 @@
<tr>
<td><strong>write_allowed</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>Set this flag if the bot is asking permission to send messages to the user as specified in the <a href="/api/links#named-mini-app-links">named Mini App deep link</a> docs, and the user agreed.</td>
<td>Set this flag if the bot is asking permission to send messages to the user as specified in the <a href="/api/links#direct-mini-app-links">direct Mini App deep link</a> docs, and the user agreed.</td>
</tr>
<tr>
<td><strong>peer</strong></td>
@ -87,12 +87,12 @@
<tr>
<td><strong>app</strong></td>
<td style="text-align: center;"><a href="/type/InputBotApp">InputBotApp</a></td>
<td>The app obtained by invoking <a href="/method/messages.getBotApp">messages.getBotApp</a> as specified in the <a href="/api/links#named-mini-app-links">named Mini App deep link</a> docs.</td>
<td>The app obtained by invoking <a href="/method/messages.getBotApp">messages.getBotApp</a> as specified in the <a href="/api/links#direct-mini-app-links">direct Mini App deep link</a> docs.</td>
</tr>
<tr>
<td><strong>start_param</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/string">string</a></td>
<td>If the <code>startapp</code> query string parameter is present in the <a href="/api/links#named-mini-app-links">named Mini App deep link</a>, pass it to <code>start_param</code>.</td>
<td>If the <code>startapp</code> query string parameter is present in the <a href="/api/links#direct-mini-app-links">direct Mini App deep link</a>, pass it to <code>start_param</code>.</td>
</tr>
<tr>
<td><strong>theme_params</strong></td>
@ -134,7 +134,7 @@
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
<p>Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.</p>
<h4><a class="anchor" href="#messagesgetbotapp" id="messagesgetbotapp" name="messagesgetbotapp"><i class="anchor-icon"></i></a><a href="/method/messages.getBotApp">messages.getBotApp</a></h4>
<p>Obtain information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a></p>
<p>Obtain information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</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="#telegram-mini-apps" id="telegram-mini-apps" name="telegram-mini-apps"><i class="anchor-icon"></i></a><a href="/bots/webapps">Telegram Mini Apps</a></h4>

View file

@ -1385,7 +1385,7 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
<tr>
<td><a href="/method/messages.requestAppWebView">messages.requestAppWebView</a></td>
<td>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-mini-app-links">named Mini App deep link</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
<td>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#direct-mini-app-links">direct Mini App deep link</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
</tr>
<tr>
<td><a href="/method/messages.getBotApp">messages.getBotApp</a></td>
@ -2098,7 +2098,7 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
<tr>
<td><a href="/method/contacts.getStatuses">contacts.getStatuses</a></td>
<td>Use this method to obtain the online statuses of all contacts with an accessible associated Telegram account.</td>
<td>Use this method to obtain the online statuses of all contacts with an accessible Telegram account.</td>
</tr>
<tr>
<td><a href="/method/contacts.getTopPeers">contacts.getTopPeers</a></td>

View file

@ -53,9 +53,9 @@
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
<!-- start req_pq_multi -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 D4 BF 07 00 F0 F6 BF 65
0010 | 14 00 00 00 F1 8E 7E BE A0 24 D4 6F CE 98 CC 73
0020 | F5 2F 67 88 C0 39 34 50</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 9C FB 05 00 87 23 C5 65
0010 | 14 00 00 00 F1 8E 7E BE 88 17 8D BF 34 91 B5 EF
0020 | 33 6C A9 7A D0 15 59 A5</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>D4BF0700F0F6BF65</code></td>
<td><code>9CFB05008723C565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -95,7 +95,7 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>A024D46FCE98CC73F52F6788C0393450</code></td>
<td><code>88178DBF3491B5EF336CA97AD01559A5</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 D8 0C 06 F1 F6 BF 65
0010 | 78 00 00 00 63 24 16 05 A0 24 D4 6F CE 98 CC 73
0020 | F5 2F 67 88 C0 39 34 50 65 85 87 BB D3 7A 4B F1
0030 | 58 AA EB B0 FB 23 DF E8 08 1B B4 C2 99 3E E2 0C
0040 | 17 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 10 36 84 87 23 C5 65
0010 | BC 00 00 00 63 24 16 05 88 17 8D BF 34 91 B5 EF
0020 | 33 6C A9 7A D0 15 59 A5 CE 81 B5 5B 3C 2D D3 D0
0030 | 6D 0B AD C8 A6 5C 3C C6 08 2A B7 41 DD 0E FE 88
0040 | 29 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>01D80C06F1F6BF65</code></td>
<td><code>011036848723C565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>78000000</code> (120 in decimal)</td>
<td><code>BC000000</code> (188 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>A024D46FCE98CC73F52F6788C0393450</code></td>
<td><code>88178DBF3491B5EF336CA97AD01559A5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>658587BBD37A4BF158AAEBB0FB23DFE8</code></td>
<td><code>CE81B55B3C2DD3D06D0BADC8A65C3CC6</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>081BB4C2993EE20C17000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1996434498272758807</td>
<td><code>082AB741DD0EFE8829000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 3078001288026163241</td>
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
</tr>
<tr>
@ -208,22 +208,22 @@
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p &lt; q.</h5>
<!-- start pq -->
<pre><code>pq = 1996434498272758807</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1996434498272758807 = 1348293407 * 1480712201</code></p>
<pre><code>p = 1348293407
q = 1480712201</code></pre>
<pre><code>pq = 3078001288026163241</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>3078001288026163241 = 1727368561 * 1781901881</code></p>
<pre><code>p = 1727368561
q = 1781901881</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 1B B4 C2 99 3E E2 0C 17 00 00 00
0010 | 04 50 5D 53 1F 00 00 00 04 58 41 E0 09 00 00 00
0020 | A0 24 D4 6F CE 98 CC 73 F5 2F 67 88 C0 39 34 50
0030 | 65 85 87 BB D3 7A 4B F1 58 AA EB B0 FB 23 DF E8
0040 | 36 A6 25 7B 45 32 62 E3 AE 2D 4B 3F D7 F2 9C 45
0050 | A7 8C 9E CD 57 6F 2D 32 B5 67 8D 39 65 A6 21 3C
<pre><code>0000 | 95 5F F5 A9 08 2A B7 41 DD 0E FE 88 29 00 00 00
0010 | 04 66 F5 8D 71 00 00 00 04 6A 35 AA 39 00 00 00
0020 | 88 17 8D BF 34 91 B5 EF 33 6C A9 7A D0 15 59 A5
0030 | CE 81 B5 5B 3C 2D D3 D0 6D 0B AD C8 A6 5C 3C C6
0040 | 0A 93 AF A7 83 90 90 A4 41 25 EB FC F5 14 AB 92
0050 | 41 4D 43 79 21 52 96 BC 53 EB D7 6B 4B 21 5A CF
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 = 1480712201</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>081BB4C2993EE20C17000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1996434498272758807</td>
<td><code>082AB741DD0EFE8829000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 3078001288026163241</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>04505D531F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1348293407</td>
<td><code>0466F58D71000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1727368561</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>045841E009000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1480712201</td>
<td><code>046A35AA39000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1781901881</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>A024D46FCE98CC73F52F6788C0393450</code></td>
<td><code>88178DBF3491B5EF336CA97AD01559A5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>658587BBD37A4BF158AAEBB0FB23DFE8</code></td>
<td><code>CE81B55B3C2DD3D06D0BADC8A65C3CC6</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>36A6257B453262E3AE2D4B3FD7F29C45</code> <code>A78C9ECD576F2D32B5678D3965A6213C</code></td>
<td><code>0A93AFA7839090A44125EBFCF514AB92</code> <code>414D4379215296BC53EBD76B4B215ACF</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1480712201</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 = 955FF5A9081BB4C2993EE20C1700000004505D531F000000045841E009000000A024D46FCE98CC73F52F6788C0393450658587BBD37A4BF158AAEBB0FB23DFE836A6257B453262E3AE2D4B3FD7F29C45A78C9ECD576F2D32B5678D3965A6213C02000000
random_padding_bytes = 11E5A0AC9234FD26AD551D548148021F735B999ADD2FC1532D17C2641D6A12C841B91B9BBB4AE98FF97733FCA430F7768C8EC687E59E5E7B0AD75BABFF8132511B2BCFDA6E4C81305521946D6DBD1AED1DD82E158C94C003AEAF0AAA</code></pre>
<pre><code>data = 955FF5A9082AB741DD0EFE88290000000466F58D71000000046A35AA3900000088178DBF3491B5EF336CA97AD01559A5CE81B55B3C2DD3D06D0BADC8A65C3CC60A93AFA7839090A44125EBFCF514AB92414D4379215296BC53EBD76B4B215ACF02000000
random_padding_bytes = F20E5907A1BD38A0160B10126B6D33DDE54D5E3429F5F4EC0B330BB26873B6E71E0CDC82B1B6E14BE6873D472EA33D5D9311DD90E47751BB9F3A5C15A79303F79EE584D675C54D146406ADE7AFE8B05020160E15D0ECDAA4F6F6F23D</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 = A49E2B4D1CC6BDFD745B3C515371EEB23B6259ABE4126A53537542EFAD18CE1C8505B69665A295C7EB93BE1667AAC2A0A4501816920D2573D06C04982AC09300F985CC05462C4888D4F965F1BC0ED70E34A256BC8FE4BF8D94C326F122C2943472B2176E620199BB2E4D1A74DB0CA809C789BD5D5C30E1E42D2470D4ED9B72ECDCB1684316E5DE9979AC97F8F9CB6D5460F7FAF14B8BA68BC143B19ACF35204DC16599F4089BF6915AD801DD91960D4E1E066B4D363F9E0928DC3789FD29970A33F00BFF53D187C107522FE286A33859E5400C24585916A9652B1FCB29780308A085A3CC72D4F7AD02D6DC73FC071755AD7792AC9857864C97C78CA076AEBFB1</code></pre>
<pre><code>encrypted_data = 2D434C69CBCAE40058A897EA17656E224D6D2C4AB402D858AAE6BD86AB536277F22ABFF4527B0ABD692ECAF36F82FD4D38A3B750FACFF2CD263FC467A92EDEFDB03728D7807F54FDBE3E01922E70142301BF5A924281597EDB4CB63EFB7100ECB4384D316A2D0358E76B7A06B5CF90CDFACD970740A54510FB76078E75E2057CAFFE4DFF1DEA366F3338ABF49747CA2869448B54FED6F559E2904179905BF91997CEFA3E39DE8803B5FCB3D7C7B5FF9934A54FAB5E96DFD4E7CD176AE366DC9D172BC6BE5599C224104BB0C86757DE10ECDCBC6986FC4755CC4F30D0B82D3762935E556B8D70192038F9DA955FAE22FF19E7A92281604191B301918BBAEA6E54</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 E4 15 04 00 F1 F6 BF 65
0010 | 40 01 00 00 BE E4 12 D7 A0 24 D4 6F CE 98 CC 73
0020 | F5 2F 67 88 C0 39 34 50 65 85 87 BB D3 7A 4B F1
0030 | 58 AA EB B0 FB 23 DF E8 04 50 5D 53 1F 00 00 00
0040 | 04 58 41 E0 09 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 A4 9E 2B 4D 1C C6 BD FD 74 5B 3C 51
0060 | 53 71 EE B2 3B 62 59 AB E4 12 6A 53 53 75 42 EF
0070 | AD 18 CE 1C 85 05 B6 96 65 A2 95 C7 EB 93 BE 16
0080 | 67 AA C2 A0 A4 50 18 16 92 0D 25 73 D0 6C 04 98
0090 | 2A C0 93 00 F9 85 CC 05 46 2C 48 88 D4 F9 65 F1
00A0 | BC 0E D7 0E 34 A2 56 BC 8F E4 BF 8D 94 C3 26 F1
00B0 | 22 C2 94 34 72 B2 17 6E 62 01 99 BB 2E 4D 1A 74
00C0 | DB 0C A8 09 C7 89 BD 5D 5C 30 E1 E4 2D 24 70 D4
00D0 | ED 9B 72 EC DC B1 68 43 16 E5 DE 99 79 AC 97 F8
00E0 | F9 CB 6D 54 60 F7 FA F1 4B 8B A6 8B C1 43 B1 9A
00F0 | CF 35 20 4D C1 65 99 F4 08 9B F6 91 5A D8 01 DD
0100 | 91 96 0D 4E 1E 06 6B 4D 36 3F 9E 09 28 DC 37 89
0110 | FD 29 97 0A 33 F0 0B FF 53 D1 87 C1 07 52 2F E2
0120 | 86 A3 38 59 E5 40 0C 24 58 59 16 A9 65 2B 1F CB
0130 | 29 78 03 08 A0 85 A3 CC 72 D4 F7 AD 02 D6 DC 73
0140 | FC 07 17 55 AD 77 92 AC 98 57 86 4C 97 C7 8C A0
0150 | 76 AE BF B1</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 F4 6A 0A 00 87 23 C5 65
0010 | 40 01 00 00 BE E4 12 D7 88 17 8D BF 34 91 B5 EF
0020 | 33 6C A9 7A D0 15 59 A5 CE 81 B5 5B 3C 2D D3 D0
0030 | 6D 0B AD C8 A6 5C 3C C6 04 66 F5 8D 71 00 00 00
0040 | 04 6A 35 AA 39 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 2D 43 4C 69 CB CA E4 00 58 A8 97 EA
0060 | 17 65 6E 22 4D 6D 2C 4A B4 02 D8 58 AA E6 BD 86
0070 | AB 53 62 77 F2 2A BF F4 52 7B 0A BD 69 2E CA F3
0080 | 6F 82 FD 4D 38 A3 B7 50 FA CF F2 CD 26 3F C4 67
0090 | A9 2E DE FD B0 37 28 D7 80 7F 54 FD BE 3E 01 92
00A0 | 2E 70 14 23 01 BF 5A 92 42 81 59 7E DB 4C B6 3E
00B0 | FB 71 00 EC B4 38 4D 31 6A 2D 03 58 E7 6B 7A 06
00C0 | B5 CF 90 CD FA CD 97 07 40 A5 45 10 FB 76 07 8E
00D0 | 75 E2 05 7C AF FE 4D FF 1D EA 36 6F 33 38 AB F4
00E0 | 97 47 CA 28 69 44 8B 54 FE D6 F5 59 E2 90 41 79
00F0 | 90 5B F9 19 97 CE FA 3E 39 DE 88 03 B5 FC B3 D7
0100 | C7 B5 FF 99 34 A5 4F AB 5E 96 DF D4 E7 CD 17 6A
0110 | E3 66 DC 9D 17 2B C6 BE 55 99 C2 24 10 4B B0 C8
0120 | 67 57 DE 10 EC DC BC 69 86 FC 47 55 CC 4F 30 D0
0130 | B8 2D 37 62 93 5E 55 6B 8D 70 19 20 38 F9 DA 95
0140 | 5F AE 22 FF 19 E7 A9 22 81 60 41 91 B3 01 91 8B
0150 | BA EA 6E 54</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 = 11E5A0AC9234FD26AD551D548148021F735B999ADD2FC1532D17C2641
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>E4150400F1F6BF65</code></td>
<td><code>F46A0A008723C565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -363,25 +363,25 @@ random_padding_bytes = 11E5A0AC9234FD26AD551D548148021F735B999ADD2FC1532D17C2641
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>A024D46FCE98CC73F52F6788C0393450</code></td>
<td><code>88178DBF3491B5EF336CA97AD01559A5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>658587BBD37A4BF158AAEBB0FB23DFE8</code></td>
<td><code>CE81B55B3C2DD3D06D0BADC8A65C3CC6</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>04505D531F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1348293407</td>
<td><code>0466F58D71000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1727368561</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>045841E009000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1480712201</td>
<td><code>046A35AA39000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1781901881</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 = 11E5A0AC9234FD26AD551D548148021F735B999ADD2FC1532D17C2641
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE000100A49E2B4D1CC6BDFD745B3C51</code> <code>5371EEB23B6259ABE4126A53537542EF</code> <code>AD18CE1C8505B69665A295C7EB93BE16</code> <code>67AAC2A0A4501816920D2573D06C0498</code> <code>2AC09300F985CC05462C4888D4F965F1</code> <code>BC0ED70E34A256BC8FE4BF8D94C326F1</code> <code>22C2943472B2176E620199BB2E4D1A74</code> <code>DB0CA809C789BD5D5C30E1E42D2470D4</code> <code>ED9B72ECDCB1684316E5DE9979AC97F8</code> <code>F9CB6D5460F7FAF14B8BA68BC143B19A</code> <code>CF35204DC16599F4089BF6915AD801DD</code> <code>91960D4E1E066B4D363F9E0928DC3789</code> <code>FD29970A33F00BFF53D187C107522FE2</code> <code>86A33859E5400C24585916A9652B1FCB</code> <code>29780308A085A3CC72D4F7AD02D6DC73</code> <code>FC071755AD7792AC9857864C97C78CA0</code><br> <code>76AEBFB1</code></td>
<td><code>FE0001002D434C69CBCAE40058A897EA</code> <code>17656E224D6D2C4AB402D858AAE6BD86</code> <code>AB536277F22ABFF4527B0ABD692ECAF3</code> <code>6F82FD4D38A3B750FACFF2CD263FC467</code> <code>A92EDEFDB03728D7807F54FDBE3E0192</code> <code>2E70142301BF5A924281597EDB4CB63E</code> <code>FB7100ECB4384D316A2D0358E76B7A06</code> <code>B5CF90CDFACD970740A54510FB76078E</code> <code>75E2057CAFFE4DFF1DEA366F3338ABF4</code> <code>9747CA2869448B54FED6F559E2904179</code> <code>905BF91997CEFA3E39DE8803B5FCB3D7</code> <code>C7B5FF9934A54FAB5E96DFD4E7CD176A</code> <code>E366DC9D172BC6BE5599C224104BB0C8</code> <code>6757DE10ECDCBC6986FC4755CC4F30D0</code> <code>B82D3762935E556B8D70192038F9DA95</code> <code>5FAE22FF19E7A92281604191B301918B</code><br> <code>BAEA6E54</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 11E5A0AC9234FD26AD551D548148021F735B999ADD2FC1532D17C2641
<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 B8 BA CF F1 F6 BF 65
0010 | A8 02 00 00 5C 07 E8 D0 A0 24 D4 6F CE 98 CC 73
0020 | F5 2F 67 88 C0 39 34 50 65 85 87 BB D3 7A 4B F1
0030 | 58 AA EB B0 FB 23 DF E8 FE 50 02 00 4A 61 1E 31
0040 | 23 31 E6 03 13 27 B9 7E BF 97 5B 17 56 DB EB 40
0050 | 73 74 94 DE CB E8 D2 FB EE E1 1F 40 FC FC A0 0B
0060 | 2F 6A 10 05 BC 73 EF 1E E2 E9 3D 73 CB EA 1B 93
0070 | 64 8C 29 C9 94 4D 08 54 A0 46 33 91 0D F3 1F F5
0080 | A5 B5 2B 2B EF 4A D3 14 91 8A 51 42 A5 0A 6F 47
0090 | 91 26 9B E8 43 84 68 F6 58 D2 E3 A4 95 ED E5 04
00A0 | B1 B9 EA 0C 20 89 5B 3B 0E 05 22 C5 C1 29 4A 59
00B0 | 29 D6 75 BE 7F B3 4C 0B 63 91 EC 25 AB EA 61 80
00C0 | 57 0F 7D 98 78 AB 97 14 CC 31 62 9E 20 FC D2 4F
00D0 | D1 C1 C8 D9 AD BC E0 34 73 49 3E E1 D5 03 96 26
00E0 | 52 07 3F 5A A0 2E 52 FA CB FE EC 11 7A 70 DB 01
00F0 | 29 76 9B C5 E8 9E 4B C9 D8 5B 36 C8 FF 68 F2 D0
0100 | CE 71 52 80 6F C1 7E 3D 8F 3B AC BB 78 28 A1 BB
0110 | 93 9D ED FA 22 1A C3 55 FD FF 7A 22 78 DC 5E 77
0120 | 83 B4 0E E8 A3 3F A4 98 6C 9F 7D 49 F6 9D 35 B6
0130 | 66 B7 26 EA C2 18 4E 00 72 51 D7 9F 34 7F A9 78
0140 | 04 CA A1 A8 9D C5 41 21 39 8F 28 7D 5A E5 2F BD
0150 | 89 67 63 DF 1E 78 34 72 1D 0E EE 79 57 EA 69 60
0160 | 04 36 23 16 EC 1D B6 1A 33 67 59 83 29 73 4B 09
0170 | C2 4A 15 20 C6 5E 92 FB BA 67 20 FA 7A F5 12 60
0180 | 3C 77 0B 6A A3 EC 20 4B DF F3 D2 6B BF 0A 0F 76
0190 | 93 55 4E 32 9B 0D 04 34 CC 94 31 86 71 E9 1A 13
01A0 | E5 E1 C9 08 B9 C4 4D 1C 25 9E 26 00 A3 B8 38 30
01B0 | 55 3D BE FA 12 7C 5E 4D FA 8D ED E0 42 9C 5C 79
01C0 | FD 3C 37 62 63 A0 25 2D 37 48 CD 74 9B CF D3 61
01D0 | F2 BF A4 33 A2 1A A0 42 B3 9E 84 62 FC CF 6C 44
01E0 | 05 79 2B C2 3F A6 87 53 33 85 F4 24 91 62 31 19
01F0 | E7 19 B9 6C CF 53 4D EF 4E 75 E7 2F FD 9B 9A BE
0200 | 08 A8 D2 F2 D9 F1 F3 B9 E7 0B 17 AB 1A 36 64 8A
0210 | B2 D0 12 E7 80 06 50 29 51 87 7C 1F 25 FE 42 5C
0220 | 8F 82 B5 AD F0 5A 56 C9 E5 81 D9 53 D7 9D 99 70
0230 | 3A 52 66 F9 5F F8 6C 22 67 6F 3B 42 DB A1 D9 E8
0240 | F3 CE B4 63 A9 DC 90 DE 4C A4 15 8D CA 06 EE 2C
0250 | 27 A7 D3 F4 8C 18 ED AE A5 E2 44 73 97 EF D8 46
0260 | AC 58 6A DB BA 62 D7 B3 46 20 F0 C7 13 B1 91 17
0270 | DF 73 A0 BD 95 F3 02 9C FF 2A 8E 37 0A D2 DB 75
0280 | 88 70 CE BA 2C 8F 9F F4 AB 37 DC B9</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 08 75 3C 88 23 C5 65
0010 | A8 02 00 00 5C 07 E8 D0 88 17 8D BF 34 91 B5 EF
0020 | 33 6C A9 7A D0 15 59 A5 CE 81 B5 5B 3C 2D D3 D0
0030 | 6D 0B AD C8 A6 5C 3C C6 FE 50 02 00 9F F8 6B 91
0040 | 99 F1 DB 37 43 29 20 81 24 F1 0A 1C FB 5D 3A 17
0050 | E3 7D 6D 4C 78 CE 80 9C A3 A5 69 10 61 CC 78 6E
0060 | AB 81 00 71 B1 F6 62 56 E3 2A 1A 86 AB DA 50 F3
0070 | 5A C6 DF D2 3E 80 C2 CF 5E 41 7E 38 8E DF 0F D9
0080 | 4F 66 7E 1F 5B 17 32 D5 BF 73 16 87 1B 71 4A 03
0090 | 21 53 9B DC 6E 24 A6 54 DE B6 71 D1 2B 45 E9 89
00A0 | 15 21 DC 81 CE 38 C6 12 E9 15 74 2E 95 D3 8C 95
00B0 | 6D 64 49 C2 17 75 AB 38 57 4C 2A 98 76 82 72 68
00C0 | 42 AF B2 52 CD 14 FC B7 F5 17 00 0A C9 BF 03 10
00D0 | DA 2E E4 00 10 29 C3 E0 84 D4 F2 48 C0 C4 8B 75
00E0 | 7D 97 BD 36 C3 B4 9D 10 B4 BE 93 8E 86 DE CF 2F
00F0 | BD A9 52 D4 84 70 52 AE D2 46 70 D1 EA F9 73 CE
0100 | 14 98 05 42 D3 09 4D 4E 72 F0 07 DE 19 B5 48 13
0110 | F9 B0 69 11 81 ED 49 E1 D6 73 63 FD 30 54 CE 5D
0120 | E6 37 D4 5E 8D 3E 43 2E CE 8A A0 B0 CF A2 03 7C
0130 | E1 5E 92 96 34 BC FE 31 B8 52 8C 37 2B E6 3C CA
0140 | 64 33 81 43 6F C7 B8 15 99 14 C0 EA F5 3D CA 06
0150 | D1 68 6C A6 89 F5 EE 20 CE AA 85 7D 4A 4B C9 AF
0160 | FE 35 FA 9B 0D D8 7C 12 13 82 B9 CC 8D 27 FD 2B
0170 | 49 54 F7 81 A6 60 BF 2A BA E4 5E 09 92 33 7E 94
0180 | 95 3A 19 B5 19 DE 08 A0 A5 95 F2 80 0F AD C1 70
0190 | 2B B5 D4 1D 3E 82 35 9D D4 23 BF FC F3 02 AF 09
01A0 | C0 DB 14 83 F1 CA 10 7D 14 9C F7 72 08 CE 49 4C
01B0 | 27 61 09 7F 12 4A 6C 36 48 19 82 B7 98 65 28 68
01C0 | C0 29 EF F8 1C 83 CF 5A E7 B1 FB AC 85 86 0D D0
01D0 | F9 ED B3 3B E6 12 5B 09 CE 8A 81 2C 12 33 58 0F
01E0 | 76 C7 9D 13 49 92 8F 63 38 7F E0 73 8A 08 22 8E
01F0 | 98 83 3F 85 F1 96 6A A1 8D EE CF 49 9E 54 A9 3C
0200 | 43 81 FD 63 00 77 5F A0 2E B9 3E 06 E0 8D 8C B7
0210 | 5D 0A 97 D5 91 3A 82 77 17 8D 29 39 2A 84 BC B9
0220 | 56 12 8F F5 0A C2 0E DC 6B DA 87 C0 13 9C 3E A0
0230 | E5 42 18 7B 8A F6 B3 AB DA 0B 27 1F 21 57 CE 3F
0240 | 01 F7 74 C9 E9 63 A0 FA 3B DB 9A 7D 44 7E 87 F2
0250 | FF DF 57 C9 00 20 94 05 5C 53 91 93 AE 14 02 3D
0260 | 48 98 D5 E2 8A 8A 85 A1 53 54 DE 3B C2 2B 53 E7
0270 | 17 57 AD 38 12 4C A1 F6 B6 34 8B E6 EE 6E 9F 87
0280 | E1 C8 78 8C 7D 90 3A BC 53 23 AC 88</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,7 +464,7 @@ random_padding_bytes = 11E5A0AC9234FD26AD551D548148021F735B999ADD2FC1532D17C2641
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01B8BACFF1F6BF65</code></td>
<td><code>0108753C8823C565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 11E5A0AC9234FD26AD551D548148021F735B999ADD2FC1532D17C2641
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>A024D46FCE98CC73F52F6788C0393450</code></td>
<td><code>88178DBF3491B5EF336CA97AD01559A5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>658587BBD37A4BF158AAEBB0FB23DFE8</code></td>
<td><code>CE81B55B3C2DD3D06D0BADC8A65C3CC6</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE5002004A611E312331E6031327B97E</code> <code>BF975B1756DBEB40737494DECBE8D2FB</code> <code>EEE11F40FCFCA00B2F6A1005BC73EF1E</code> <code>E2E93D73CBEA1B93648C29C9944D0854</code> <code>A04633910DF31FF5A5B52B2BEF4AD314</code> <code>918A5142A50A6F4791269BE8438468F6</code> <code>58D2E3A495EDE504B1B9EA0C20895B3B</code> <code>0E0522C5C1294A5929D675BE7FB34C0B</code> <code>6391EC25ABEA6180570F7D9878AB9714</code> <code>CC31629E20FCD24FD1C1C8D9ADBCE034</code> <code>73493EE1D503962652073F5AA02E52FA</code> <code>CBFEEC117A70DB0129769BC5E89E4BC9</code> <code>D85B36C8FF68F2D0CE7152806FC17E3D</code> <code>8F3BACBB7828A1BB939DEDFA221AC355</code> <code>FDFF7A2278DC5E7783B40EE8A33FA498</code> <code>6C9F7D49F69D35B666B726EAC2184E00</code> <code>7251D79F347FA97804CAA1A89DC54121</code> <code>398F287D5AE52FBD896763DF1E783472</code> <code>1D0EEE7957EA696004362316EC1DB61A</code> <code>3367598329734B09C24A1520C65E92FB</code> <code>BA6720FA7AF512603C770B6AA3EC204B</code> <code>DFF3D26BBF0A0F7693554E329B0D0434</code> <code>CC94318671E91A13E5E1C908B9C44D1C</code> <code>259E2600A3B83830553DBEFA127C5E4D</code> <code>FA8DEDE0429C5C79FD3C376263A0252D</code> <code>3748CD749BCFD361F2BFA433A21AA042</code> <code>B39E8462FCCF6C4405792BC23FA68753</code> <code>3385F42491623119E719B96CCF534DEF</code> <code>4E75E72FFD9B9ABE08A8D2F2D9F1F3B9</code> <code>E70B17AB1A36648AB2D012E780065029</code> <code>51877C1F25FE425C8F82B5ADF05A56C9</code> <code>E581D953D79D99703A5266F95FF86C22</code> <code>676F3B42DBA1D9E8F3CEB463A9DC90DE</code> <code>4CA4158DCA06EE2C27A7D3F48C18EDAE</code> <code>A5E2447397EFD846AC586ADBBA62D7B3</code> <code>4620F0C713B19117DF73A0BD95F3029C</code> <code>FF2A8E370AD2DB758870CEBA2C8F9FF4</code><br> <code>AB37DCB9</code></td>
<td><code>FE5002009FF86B9199F1DB3743292081</code> <code>24F10A1CFB5D3A17E37D6D4C78CE809C</code> <code>A3A5691061CC786EAB810071B1F66256</code> <code>E32A1A86ABDA50F35AC6DFD23E80C2CF</code> <code>5E417E388EDF0FD94F667E1F5B1732D5</code> <code>BF7316871B714A0321539BDC6E24A654</code> <code>DEB671D12B45E9891521DC81CE38C612</code> <code>E915742E95D38C956D6449C21775AB38</code> <code>574C2A987682726842AFB252CD14FCB7</code> <code>F517000AC9BF0310DA2EE4001029C3E0</code> <code>84D4F248C0C48B757D97BD36C3B49D10</code> <code>B4BE938E86DECF2FBDA952D4847052AE</code> <code>D24670D1EAF973CE14980542D3094D4E</code> <code>72F007DE19B54813F9B0691181ED49E1</code> <code>D67363FD3054CE5DE637D45E8D3E432E</code> <code>CE8AA0B0CFA2037CE15E929634BCFE31</code> <code>B8528C372BE63CCA643381436FC7B815</code> <code>9914C0EAF53DCA06D1686CA689F5EE20</code> <code>CEAA857D4A4BC9AFFE35FA9B0DD87C12</code> <code>1382B9CC8D27FD2B4954F781A660BF2A</code> <code>BAE45E0992337E94953A19B519DE08A0</code> <code>A595F2800FADC1702BB5D41D3E82359D</code> <code>D423BFFCF302AF09C0DB1483F1CA107D</code> <code>149CF77208CE494C2761097F124A6C36</code> <code>481982B798652868C029EFF81C83CF5A</code> <code>E7B1FBAC85860DD0F9EDB33BE6125B09</code> <code>CE8A812C1233580F76C79D1349928F63</code> <code>387FE0738A08228E98833F85F1966AA1</code> <code>8DEECF499E54A93C4381FD6300775FA0</code> <code>2EB93E06E08D8CB75D0A97D5913A8277</code> <code>178D29392A84BCB956128FF50AC20EDC</code> <code>6BDA87C0139C3EA0E542187B8AF6B3AB</code> <code>DA0B271F2157CE3F01F774C9E963A0FA</code> <code>3BDB9A7D447E87F2FFDF57C900209405</code> <code>5C539193AE14023D4898D5E28A8A85A1</code> <code>5354DE3BC22B53E71757AD38124CA1F6</code> <code>B6348BE6EE6E9F87E1C8788C7D903ABC</code><br> <code>5323AC88</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 11E5A0AC9234FD26AD551D548148021F735B999ADD2FC1532D17C2641
<!-- 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 = 4A611E312331E6031327B97EBF975B1756DBEB40737494DECBE8D2FBEEE11F40FCFCA00B2F6A1005BC73EF1EE2E93D73CBEA1B93648C29C9944D0854A04633910DF31FF5A5B52B2BEF4AD314918A5142A50A6F4791269BE8438468F658D2E3A495EDE504B1B9EA0C20895B3B0E0522C5C1294A5929D675BE7FB34C0B6391EC25ABEA6180570F7D9878AB9714CC31629E20FCD24FD1C1C8D9ADBCE03473493EE1D503962652073F5AA02E52FACBFEEC117A70DB0129769BC5E89E4BC9D85B36C8FF68F2D0CE7152806FC17E3D8F3BACBB7828A1BB939DEDFA221AC355FDFF7A2278DC5E7783B40EE8A33FA4986C9F7D49F69D35B666B726EAC2184E007251D79F347FA97804CAA1A89DC54121398F287D5AE52FBD896763DF1E7834721D0EEE7957EA696004362316EC1DB61A3367598329734B09C24A1520C65E92FBBA6720FA7AF512603C770B6AA3EC204BDFF3D26BBF0A0F7693554E329B0D0434CC94318671E91A13E5E1C908B9C44D1C259E2600A3B83830553DBEFA127C5E4DFA8DEDE0429C5C79FD3C376263A0252D3748CD749BCFD361F2BFA433A21AA042B39E8462FCCF6C4405792BC23FA687533385F42491623119E719B96CCF534DEF4E75E72FFD9B9ABE08A8D2F2D9F1F3B9E70B17AB1A36648AB2D012E78006502951877C1F25FE425C8F82B5ADF05A56C9E581D953D79D99703A5266F95FF86C22676F3B42DBA1D9E8F3CEB463A9DC90DE4CA4158DCA06EE2C27A7D3F48C18EDAEA5E2447397EFD846AC586ADBBA62D7B34620F0C713B19117DF73A0BD95F3029CFF2A8E370AD2DB758870CEBA2C8F9FF4AB37DCB9
tmp_aes_key = A06762A725302D99E8973CAB4EC75AC2EBC3692B50DB264CE012BEA7A3F95F9D
tmp_aes_iv = 987E517AE8B10519D6FB7DC24B6A4A3295EEE74E909C38E19E4459FF36A6257B</code></pre>
<pre><code>encrypted_answer = 9FF86B9199F1DB374329208124F10A1CFB5D3A17E37D6D4C78CE809CA3A5691061CC786EAB810071B1F66256E32A1A86ABDA50F35AC6DFD23E80C2CF5E417E388EDF0FD94F667E1F5B1732D5BF7316871B714A0321539BDC6E24A654DEB671D12B45E9891521DC81CE38C612E915742E95D38C956D6449C21775AB38574C2A987682726842AFB252CD14FCB7F517000AC9BF0310DA2EE4001029C3E084D4F248C0C48B757D97BD36C3B49D10B4BE938E86DECF2FBDA952D4847052AED24670D1EAF973CE14980542D3094D4E72F007DE19B54813F9B0691181ED49E1D67363FD3054CE5DE637D45E8D3E432ECE8AA0B0CFA2037CE15E929634BCFE31B8528C372BE63CCA643381436FC7B8159914C0EAF53DCA06D1686CA689F5EE20CEAA857D4A4BC9AFFE35FA9B0DD87C121382B9CC8D27FD2B4954F781A660BF2ABAE45E0992337E94953A19B519DE08A0A595F2800FADC1702BB5D41D3E82359DD423BFFCF302AF09C0DB1483F1CA107D149CF77208CE494C2761097F124A6C36481982B798652868C029EFF81C83CF5AE7B1FBAC85860DD0F9EDB33BE6125B09CE8A812C1233580F76C79D1349928F63387FE0738A08228E98833F85F1966AA18DEECF499E54A93C4381FD6300775FA02EB93E06E08D8CB75D0A97D5913A8277178D29392A84BCB956128FF50AC20EDC6BDA87C0139C3EA0E542187B8AF6B3ABDA0B271F2157CE3F01F774C9E963A0FA3BDB9A7D447E87F2FFDF57C9002094055C539193AE14023D4898D5E28A8A85A15354DE3BC22B53E71757AD38124CA1F6B6348BE6EE6E9F87E1C8788C7D903ABC5323AC88
tmp_aes_key = C2907E6720FE2B8205E13C16DF12389B14205FB7A299054E3571FE78F50B0789
tmp_aes_iv = 741D3A5C7F5DFE38E585586FE2CDEAD6EBF8E319A0EEAF466F8D756B0A93AFA7</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = CA016A36E48F18BCB800692EFEF9365DD2472543BA0D89B5A024D46FCE98CC73F52F6788C0393450658587BBD37A4BF158AAEBB0FB23DFE803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001001B3A4680F7FCAB6E9C3DC3A57E358CEF2F439A92488C56A79BD4B6C52B89290637BB4C74AD73E280F1D41B4CE702C509A90093757EB8DBB702526571C04405E57243EFB72898110600E81A703EB79C14F704B93C05896584B3FC485FA3BEDD23BE3397F9A71196661BAD2C945A64FC779E4594A9D97D8BA5EF6EA755CF7504E81D4B106518DE9D56365DC6F4FFE7725116FFC523DAC4A8D253DF02798E1290F01FE1BA541094DB28A1CC3AE6D008F26C9273FBFDA8E627FCADDDB002C41D47D537F04778D6C9A687D564EA848991287C1E24BC56BD40B26F466A69801B87E74E555EFD7EC9DEFE3FDF175F71EFCF1901445B99EDBAB467B0796335A3DA48DEC9F1F6BF652E2B1B378A180884
answer = BA0D89B5A024D46FCE98CC73F52F6788C0393450658587BBD37A4BF158AAEBB0FB23DFE803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001001B3A4680F7FCAB6E9C3DC3A57E358CEF2F439A92488C56A79BD4B6C52B89290637BB4C74AD73E280F1D41B4CE702C509A90093757EB8DBB702526571C04405E57243EFB72898110600E81A703EB79C14F704B93C05896584B3FC485FA3BEDD23BE3397F9A71196661BAD2C945A64FC779E4594A9D97D8BA5EF6EA755CF7504E81D4B106518DE9D56365DC6F4FFE7725116FFC523DAC4A8D253DF02798E1290F01FE1BA541094DB28A1CC3AE6D008F26C9273FBFDA8E627FCADDDB002C41D47D537F04778D6C9A687D564EA848991287C1E24BC56BD40B26F466A69801B87E74E555EFD7EC9DEFE3FDF175F71EFCF1901445B99EDBAB467B0796335A3DA48DEC9F1F6BF652E2B1B378A180884</code></pre>
<pre><code>answer_with_hash = C25C8C57AB8ABA31334006F94D3E0F7ACA3D2D15BA0D89B588178DBF3491B5EF336CA97AD01559A5CE81B55B3C2DD3D06D0BADC8A65C3CC603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001004CF9D005AA6C3E3DD92042E554580A9550F2CC424C0CD756F51A7CD087BD6AF21EA69B6F99C24C3B032B20F1286E633EC6C6B40F1C806E1FD096BF08BFF21FEB3C216DA17C629AA96D22AC672C73167B243BB264318DEC206D89FCC504B2F00802176B97B3B2679119631953165A09061BCD1B46632CE995D7A294E60D2E8D89F507BEB3BE89E52DF6A0A24DE7DC8E1CF57E817679CCFDD13D032AC05AE030D1F46298BE0EA4BBB82945D2016A83092A2E60CA6E4B1ADC2F0A186047B499A1A29B8E1BD4D33F34127EF7D87292F4FBC85DB27197435532ED7DCECF1BF9A7EB44A25E55CA3EB3E045CF20EB43E787BF27002CED9E7CA3236F7069FB9A7ACA776C8823C56508B2AB383B33FBF5
answer = BA0D89B588178DBF3491B5EF336CA97AD01559A5CE81B55B3C2DD3D06D0BADC8A65C3CC603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001004CF9D005AA6C3E3DD92042E554580A9550F2CC424C0CD756F51A7CD087BD6AF21EA69B6F99C24C3B032B20F1286E633EC6C6B40F1C806E1FD096BF08BFF21FEB3C216DA17C629AA96D22AC672C73167B243BB264318DEC206D89FCC504B2F00802176B97B3B2679119631953165A09061BCD1B46632CE995D7A294E60D2E8D89F507BEB3BE89E52DF6A0A24DE7DC8E1CF57E817679CCFDD13D032AC05AE030D1F46298BE0EA4BBB82945D2016A83092A2E60CA6E4B1ADC2F0A186047B499A1A29B8E1BD4D33F34127EF7D87292F4FBC85DB27197435532ED7DCECF1BF9A7EB44A25E55CA3EB3E045CF20EB43E787BF27002CED9E7CA3236F7069FB9A7ACA776C8823C56508B2AB383B33FBF5</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 A0 24 D4 6F CE 98 CC 73 F5 2F 67 88
0010 | C0 39 34 50 65 85 87 BB D3 7A 4B F1 58 AA EB B0
0020 | FB 23 DF E8 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 88 17 8D BF 34 91 B5 EF 33 6C A9 7A
0010 | D0 15 59 A5 CE 81 B5 5B 3C 2D D3 D0 6D 0B AD C8
0020 | A6 5C 3C C6 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 = BA0D89B5A024D46FCE98CC73F52F6788C0393450658587BBD37A4BF158AAEBB0FB23DFE
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 | 1B 3A 46 80 F7 FC AB 6E 9C 3D C3 A5 7E 35 8C EF
0140 | 2F 43 9A 92 48 8C 56 A7 9B D4 B6 C5 2B 89 29 06
0150 | 37 BB 4C 74 AD 73 E2 80 F1 D4 1B 4C E7 02 C5 09
0160 | A9 00 93 75 7E B8 DB B7 02 52 65 71 C0 44 05 E5
0170 | 72 43 EF B7 28 98 11 06 00 E8 1A 70 3E B7 9C 14
0180 | F7 04 B9 3C 05 89 65 84 B3 FC 48 5F A3 BE DD 23
0190 | BE 33 97 F9 A7 11 96 66 1B AD 2C 94 5A 64 FC 77
01A0 | 9E 45 94 A9 D9 7D 8B A5 EF 6E A7 55 CF 75 04 E8
01B0 | 1D 4B 10 65 18 DE 9D 56 36 5D C6 F4 FF E7 72 51
01C0 | 16 FF C5 23 DA C4 A8 D2 53 DF 02 79 8E 12 90 F0
01D0 | 1F E1 BA 54 10 94 DB 28 A1 CC 3A E6 D0 08 F2 6C
01E0 | 92 73 FB FD A8 E6 27 FC AD DD B0 02 C4 1D 47 D5
01F0 | 37 F0 47 78 D6 C9 A6 87 D5 64 EA 84 89 91 28 7C
0200 | 1E 24 BC 56 BD 40 B2 6F 46 6A 69 80 1B 87 E7 4E
0210 | 55 5E FD 7E C9 DE FE 3F DF 17 5F 71 EF CF 19 01
0220 | 44 5B 99 ED BA B4 67 B0 79 63 35 A3 DA 48 DE C9
0230 | F1 F6 BF 65</code></pre>
0130 | 4C F9 D0 05 AA 6C 3E 3D D9 20 42 E5 54 58 0A 95
0140 | 50 F2 CC 42 4C 0C D7 56 F5 1A 7C D0 87 BD 6A F2
0150 | 1E A6 9B 6F 99 C2 4C 3B 03 2B 20 F1 28 6E 63 3E
0160 | C6 C6 B4 0F 1C 80 6E 1F D0 96 BF 08 BF F2 1F EB
0170 | 3C 21 6D A1 7C 62 9A A9 6D 22 AC 67 2C 73 16 7B
0180 | 24 3B B2 64 31 8D EC 20 6D 89 FC C5 04 B2 F0 08
0190 | 02 17 6B 97 B3 B2 67 91 19 63 19 53 16 5A 09 06
01A0 | 1B CD 1B 46 63 2C E9 95 D7 A2 94 E6 0D 2E 8D 89
01B0 | F5 07 BE B3 BE 89 E5 2D F6 A0 A2 4D E7 DC 8E 1C
01C0 | F5 7E 81 76 79 CC FD D1 3D 03 2A C0 5A E0 30 D1
01D0 | F4 62 98 BE 0E A4 BB B8 29 45 D2 01 6A 83 09 2A
01E0 | 2E 60 CA 6E 4B 1A DC 2F 0A 18 60 47 B4 99 A1 A2
01F0 | 9B 8E 1B D4 D3 3F 34 12 7E F7 D8 72 92 F4 FB C8
0200 | 5D B2 71 97 43 55 32 ED 7D CE CF 1B F9 A7 EB 44
0210 | A2 5E 55 CA 3E B3 E0 45 CF 20 EB 43 E7 87 BF 27
0220 | 00 2C ED 9E 7C A3 23 6F 70 69 FB 9A 7A CA 77 6C
0230 | 88 23 C5 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 = BA0D89B5A024D46FCE98CC73F52F6788C0393450658587BBD37A4BF158AAEBB0FB23DFE
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>A024D46FCE98CC73F52F6788C0393450</code></td>
<td><code>88178DBF3491B5EF336CA97AD01559A5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>658587BBD37A4BF158AAEBB0FB23DFE8</code></td>
<td><code>CE81B55B3C2DD3D06D0BADC8A65C3CC6</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B5A024D46FCE98CC73F52F6788C0393450658587BBD37A4BF158AAEBB0FB23DFE
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE0001001B3A4680F7FCAB6E9C3DC3A5</code> <code>7E358CEF2F439A92488C56A79BD4B6C5</code> <code>2B89290637BB4C74AD73E280F1D41B4C</code> <code>E702C509A90093757EB8DBB702526571</code> <code>C04405E57243EFB72898110600E81A70</code> <code>3EB79C14F704B93C05896584B3FC485F</code> <code>A3BEDD23BE3397F9A71196661BAD2C94</code> <code>5A64FC779E4594A9D97D8BA5EF6EA755</code> <code>CF7504E81D4B106518DE9D56365DC6F4</code> <code>FFE7725116FFC523DAC4A8D253DF0279</code> <code>8E1290F01FE1BA541094DB28A1CC3AE6</code> <code>D008F26C9273FBFDA8E627FCADDDB002</code> <code>C41D47D537F04778D6C9A687D564EA84</code> <code>8991287C1E24BC56BD40B26F466A6980</code> <code>1B87E74E555EFD7EC9DEFE3FDF175F71</code> <code>EFCF1901445B99EDBAB467B0796335A3</code><br> <code>DA48DEC9</code></td>
<td><code>FE0001004CF9D005AA6C3E3DD92042E5</code> <code>54580A9550F2CC424C0CD756F51A7CD0</code> <code>87BD6AF21EA69B6F99C24C3B032B20F1</code> <code>286E633EC6C6B40F1C806E1FD096BF08</code> <code>BFF21FEB3C216DA17C629AA96D22AC67</code> <code>2C73167B243BB264318DEC206D89FCC5</code> <code>04B2F00802176B97B3B2679119631953</code> <code>165A09061BCD1B46632CE995D7A294E6</code> <code>0D2E8D89F507BEB3BE89E52DF6A0A24D</code> <code>E7DC8E1CF57E817679CCFDD13D032AC0</code> <code>5AE030D1F46298BE0EA4BBB82945D201</code> <code>6A83092A2E60CA6E4B1ADC2F0A186047</code> <code>B499A1A29B8E1BD4D33F34127EF7D872</code> <code>92F4FBC85DB27197435532ED7DCECF1B</code> <code>F9A7EB44A25E55CA3EB3E045CF20EB43</code> <code>E787BF27002CED9E7CA3236F7069FB9A</code><br> <code>7ACA776C</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>F1F6BF65</code> (1707079409 in decimal)</td>
<td><code>8823C565</code> (1707418504 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B5A024D46FCE98CC73F52F6788C0393450658587BBD37A4BF158AAEBB0FB23DFE
<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 = 82E0B3EB6404BAE3AB3486499542EC2799F098552F1205DB20FF8A7F20BAFE1570E854519B6B57640AD207AE912EB1489C685C3874AD7DDE0EC1EB9D839973956799DD4CB31DEF2E13B31E206C13DB905D87AE0E3C4D0607BCA3F0E2A038E26DA8ABBBC6EB5B9E9552F07D48D81BDD590ABDA029DEFF554DB1CFEBC9302BDBCFD56F2F3A581A2D733047D5CE5D37CDC8DFB304CA04A2BDD5C72130C72F644DD005977C7487B5EC78FDEC2E3BD81B9588A35ED5F064BFF47B730B24912ECF831FC0B6BEE298D6E2F5896EE7AD456AAE0004AF6F093BEAF447BF5B4657BC6EA94E97622256C73F7EDE3FCD75D072665C6DD12C3C6FCC207133787C3076AD3C6FDC</code></pre>
<pre><code>b = 1B560BDB1C57F4409E421A508D61543589BD5AAE5B9AB960B183983993752FAA4FD9F10EE63EFCA5ACF942ACF224CF725132B1368F2037D152A1EF956FE6FFA5DEEA80448EC68D010C6D15F1F056B6BC2A1D4DF2B5AA26852544D4B0F23E2DACE57D7BA89D1802D32F04EBE8488E680783F9B8E2253A20D13C831E14DFA2729FC5B5200C8D4A6562AD03DD7C1DC352E9D97F241D18895D16863AC50789F368D8C6531FF7650ABE9B52D63B99CA529803638E5E21DB23780F61458BB28E90EE375861144A78B4B1BBBC2F5477E35ADADDD4A36169751C932434E287346C60B45A1DB8F1BE234B60F9ACCFC901E90D025C7A45627D9FBDE835090CE62BAD8C564B</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 = 676F45610D9363395B198F7E2AB595CB12B21D86774E10B7449AB978EEF291322F7B0EF49E7F1D7F7832A84ADD795E3D4F0BBABDAAD4EE9BF646C41B8D94DD2D025C6D5DB07F08826215BB8E16731EC4354D4A0713B0B9EC2F8CFC8940397A6BF5C6B19B8C9BCF54FE374A534B07CC1043F178BE4B41D5CB389E1D2B68FC22F2601CFB4CBD044535A6EE2C244C2A7808ECBDD725FC8BF6A16F192D65C0DF2711F12BECA6E9072BC5909B941DFF574237FE2D039E020D3583A9B65A11C2E85D2A7C93FB50BBFE27EC730FFD3B9BD734A38A30F9455349E1A80DFD42EC6298DA385129ED6FCC591DE05C09E46A1FED65CDE535B347B09AF883E8F35A7515A4AB41</code></pre>
<pre><code>g_b = 24DBA6A1F7C7A543B9CDBFB7B1C4637D74F227528DDEF003A43CA74F0EB2D7C84F109B792115DFD993C2C9113AC7C4F46221E64080C54E1873F2AF83CB690B04796218C26548055B9D1AE83ABF417FEEA58A8BC3C22787580FB34568EDECE3BA8EA20529845E51D373B9BE6CF71353E4A074CDC4E7CE5D510A6B0D6F0B6FF4832928B42BAAE151F5E21CDC77ABBD2E5824825E4A72D6A8996ABEC76B54501F6213EDA9AF819806624FA800505929B14DAC951011E071A19D0766291D3D3AC22FCC040E0CAA52E1B753B9AE07F867112224CFF7F9F44EB1148B60AFFB3197155BE7F4B9D8DA5503F7E989F703CC7F70677055F21F89AB5C226352F76F976137B6</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 A0 24 D4 6F CE 98 CC 73 F5 2F 67 88
0010 | C0 39 34 50 65 85 87 BB D3 7A 4B F1 58 AA EB B0
0020 | FB 23 DF E8 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 67 6F 45 61 0D 93 63 39 5B 19 8F 7E 2A B5 95 CB
0040 | 12 B2 1D 86 77 4E 10 B7 44 9A B9 78 EE F2 91 32
0050 | 2F 7B 0E F4 9E 7F 1D 7F 78 32 A8 4A DD 79 5E 3D
0060 | 4F 0B BA BD AA D4 EE 9B F6 46 C4 1B 8D 94 DD 2D
0070 | 02 5C 6D 5D B0 7F 08 82 62 15 BB 8E 16 73 1E C4
0080 | 35 4D 4A 07 13 B0 B9 EC 2F 8C FC 89 40 39 7A 6B
0090 | F5 C6 B1 9B 8C 9B CF 54 FE 37 4A 53 4B 07 CC 10
00A0 | 43 F1 78 BE 4B 41 D5 CB 38 9E 1D 2B 68 FC 22 F2
00B0 | 60 1C FB 4C BD 04 45 35 A6 EE 2C 24 4C 2A 78 08
00C0 | EC BD D7 25 FC 8B F6 A1 6F 19 2D 65 C0 DF 27 11
00D0 | F1 2B EC A6 E9 07 2B C5 90 9B 94 1D FF 57 42 37
00E0 | FE 2D 03 9E 02 0D 35 83 A9 B6 5A 11 C2 E8 5D 2A
00F0 | 7C 93 FB 50 BB FE 27 EC 73 0F FD 3B 9B D7 34 A3
0100 | 8A 30 F9 45 53 49 E1 A8 0D FD 42 EC 62 98 DA 38
0110 | 51 29 ED 6F CC 59 1D E0 5C 09 E4 6A 1F ED 65 CD
0120 | E5 35 B3 47 B0 9A F8 83 E8 F3 5A 75 15 A4 AB 41</code></pre>
<pre><code>0000 | 54 B6 43 66 88 17 8D BF 34 91 B5 EF 33 6C A9 7A
0010 | D0 15 59 A5 CE 81 B5 5B 3C 2D D3 D0 6D 0B AD C8
0020 | A6 5C 3C C6 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 24 DB A6 A1 F7 C7 A5 43 B9 CD BF B7 B1 C4 63 7D
0040 | 74 F2 27 52 8D DE F0 03 A4 3C A7 4F 0E B2 D7 C8
0050 | 4F 10 9B 79 21 15 DF D9 93 C2 C9 11 3A C7 C4 F4
0060 | 62 21 E6 40 80 C5 4E 18 73 F2 AF 83 CB 69 0B 04
0070 | 79 62 18 C2 65 48 05 5B 9D 1A E8 3A BF 41 7F EE
0080 | A5 8A 8B C3 C2 27 87 58 0F B3 45 68 ED EC E3 BA
0090 | 8E A2 05 29 84 5E 51 D3 73 B9 BE 6C F7 13 53 E4
00A0 | A0 74 CD C4 E7 CE 5D 51 0A 6B 0D 6F 0B 6F F4 83
00B0 | 29 28 B4 2B AA E1 51 F5 E2 1C DC 77 AB BD 2E 58
00C0 | 24 82 5E 4A 72 D6 A8 99 6A BE C7 6B 54 50 1F 62
00D0 | 13 ED A9 AF 81 98 06 62 4F A8 00 50 59 29 B1 4D
00E0 | AC 95 10 11 E0 71 A1 9D 07 66 29 1D 3D 3A C2 2F
00F0 | CC 04 0E 0C AA 52 E1 B7 53 B9 AE 07 F8 67 11 22
0100 | 24 CF F7 F9 F4 4E B1 14 8B 60 AF FB 31 97 15 5B
0110 | E7 F4 B9 D8 DA 55 03 F7 E9 89 F7 03 CC 7F 70 67
0120 | 70 55 F2 1F 89 AB 5C 22 63 52 F7 6F 97 61 37 B6</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 = BA0D89B5A024D46FCE98CC73F52F6788C0393450658587BBD37A4BF158AAEBB0FB23DFE
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>A024D46FCE98CC73F52F6788C0393450</code></td>
<td><code>88178DBF3491B5EF336CA97AD01559A5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>658587BBD37A4BF158AAEBB0FB23DFE8</code></td>
<td><code>CE81B55B3C2DD3D06D0BADC8A65C3CC6</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE000100676F45610D9363395B198F7E</code> <code>2AB595CB12B21D86774E10B7449AB978</code> <code>EEF291322F7B0EF49E7F1D7F7832A84A</code> <code>DD795E3D4F0BBABDAAD4EE9BF646C41B</code> <code>8D94DD2D025C6D5DB07F08826215BB8E</code> <code>16731EC4354D4A0713B0B9EC2F8CFC89</code> <code>40397A6BF5C6B19B8C9BCF54FE374A53</code> <code>4B07CC1043F178BE4B41D5CB389E1D2B</code> <code>68FC22F2601CFB4CBD044535A6EE2C24</code> <code>4C2A7808ECBDD725FC8BF6A16F192D65</code> <code>C0DF2711F12BECA6E9072BC5909B941D</code> <code>FF574237FE2D039E020D3583A9B65A11</code> <code>C2E85D2A7C93FB50BBFE27EC730FFD3B</code> <code>9BD734A38A30F9455349E1A80DFD42EC</code> <code>6298DA385129ED6FCC591DE05C09E46A</code> <code>1FED65CDE535B347B09AF883E8F35A75</code><br> <code>15A4AB41</code></td>
<td><code>FE00010024DBA6A1F7C7A543B9CDBFB7</code> <code>B1C4637D74F227528DDEF003A43CA74F</code> <code>0EB2D7C84F109B792115DFD993C2C911</code> <code>3AC7C4F46221E64080C54E1873F2AF83</code> <code>CB690B04796218C26548055B9D1AE83A</code> <code>BF417FEEA58A8BC3C22787580FB34568</code> <code>EDECE3BA8EA20529845E51D373B9BE6C</code> <code>F71353E4A074CDC4E7CE5D510A6B0D6F</code> <code>0B6FF4832928B42BAAE151F5E21CDC77</code> <code>ABBD2E5824825E4A72D6A8996ABEC76B</code> <code>54501F6213EDA9AF819806624FA80050</code> <code>5929B14DAC951011E071A19D0766291D</code> <code>3D3AC22FCC040E0CAA52E1B753B9AE07</code> <code>F867112224CFF7F9F44EB1148B60AFFB</code> <code>3197155BE7F4B9D8DA5503F7E989F703</code> <code>CC7F70677055F21F89AB5C226352F76F</code><br> <code>976137B6</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 = BA0D89B5A024D46FCE98CC73F52F6788C0393450658587BBD37A4BF158AAEBB0FB23DFE
<!-- 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 = 54B64366A024D46FCE98CC73F52F6788C0393450658587BBD37A4BF158AAEBB0FB23DFE80000000000000000FE000100676F45610D9363395B198F7E2AB595CB12B21D86774E10B7449AB978EEF291322F7B0EF49E7F1D7F7832A84ADD795E3D4F0BBABDAAD4EE9BF646C41B8D94DD2D025C6D5DB07F08826215BB8E16731EC4354D4A0713B0B9EC2F8CFC8940397A6BF5C6B19B8C9BCF54FE374A534B07CC1043F178BE4B41D5CB389E1D2B68FC22F2601CFB4CBD044535A6EE2C244C2A7808ECBDD725FC8BF6A16F192D65C0DF2711F12BECA6E9072BC5909B941DFF574237FE2D039E020D3583A9B65A11C2E85D2A7C93FB50BBFE27EC730FFD3B9BD734A38A30F9455349E1A80DFD42EC6298DA385129ED6FCC591DE05C09E46A1FED65CDE535B347B09AF883E8F35A7515A4AB41
padding = 08BECE26CBD31F7F5FEAAF3F
tmp_aes_key = A06762A725302D99E8973CAB4EC75AC2EBC3692B50DB264CE012BEA7A3F95F9D
tmp_aes_iv = 987E517AE8B10519D6FB7DC24B6A4A3295EEE74E909C38E19E4459FF36A6257B</code></pre>
<pre><code>data = 54B6436688178DBF3491B5EF336CA97AD01559A5CE81B55B3C2DD3D06D0BADC8A65C3CC60000000000000000FE00010024DBA6A1F7C7A543B9CDBFB7B1C4637D74F227528DDEF003A43CA74F0EB2D7C84F109B792115DFD993C2C9113AC7C4F46221E64080C54E1873F2AF83CB690B04796218C26548055B9D1AE83ABF417FEEA58A8BC3C22787580FB34568EDECE3BA8EA20529845E51D373B9BE6CF71353E4A074CDC4E7CE5D510A6B0D6F0B6FF4832928B42BAAE151F5E21CDC77ABBD2E5824825E4A72D6A8996ABEC76B54501F6213EDA9AF819806624FA800505929B14DAC951011E071A19D0766291D3D3AC22FCC040E0CAA52E1B753B9AE07F867112224CFF7F9F44EB1148B60AFFB3197155BE7F4B9D8DA5503F7E989F703CC7F70677055F21F89AB5C226352F76F976137B6
padding = 9C0C4B827AD131FCCFD78CE6
tmp_aes_key = C2907E6720FE2B8205E13C16DF12389B14205FB7A299054E3571FE78F50B0789
tmp_aes_iv = 741D3A5C7F5DFE38E585586FE2CDEAD6EBF8E319A0EEAF466F8D756B0A93AFA7</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 = FF329E64761066526C03CB794781ADE181016BA9B95E745EC6C86E83BF5899CEEB3E980AAC72F8D2232947B785D93887A24DB940F07E65C2B1DEFAC813790B837766787ADBB6B53A7268329222DE6E834B1B520FF871E7EA84C98A9D4C24DA61558EE6C683957AC6BA176611ED98A04EDD0869F19B07C8FDAC17A9565778C38B903FC48A64F0A17DA2362BEE57E6F89D33EB764583503D781DEFB23346D60E284ACD6E5B1F940FE4C706147BF059E3743BF88D1FDBAEA8D20610F4738AF027451306298C033C5C77F0F024E879467A5F13ADA426F9E2AF34415E2111879F77DDF61E92E2315A88B742C17ED12BE816E92FF8B198B29768227A24B78813C227713037B1BB63551A4E5127B60F496740C5D079567DDF542A6A1733902AE60C75C659DD6489DA5654072442C3BD4DA370847CE3E8F9CB29309296AF38F57815552D0BDB431B13BEAA86F11C453456F23EE6</code></pre>
<pre><code>encrypted_data = C0883D31A85D90E91C3E16094C7D2D269EF5EEADACDA3C2AC0157DD8FCF8C276F82D3A1A507547B7AAF038179B3E421662E8A7BBA0EE0722C819B8FB616D836E295CE6CDE6062536995C817D1E7B4EC90823F094CF393A6E5EA2E9DE23FC8BB1A5787F8219B0FBEE904AE5531FF031EB6D21C67FF5882E41F58DB75663D5D489D948D2A182635966EC7C468BA8F9975C6FB1612067D82EC60F92767542974418683A226A70D6494AAC6A21ADA4DDBF10E200E6ABE3FE13C08713EA9540BA41A0337CC31DFB0D866BACB1AD146F5FC78E23091893AD3DE5705800864F95E555BECA0D45A0A5AD07DE51FFF059727FFC993BA0EF501C9077FB633E83CA5DEBC7448E3BE504107020B122656FE42ABB26455AFE38930AD091DA0F6037B599034A1CC6ADE286C2890987012F303C21DB4C741B732F3230E24BED549831964639FEB095411176850077F297C52EB65CD5087B</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 7C 43 09 00 F1 F6 BF 65
0010 | 78 01 00 00 1F 5F 04 F5 A0 24 D4 6F CE 98 CC 73
0020 | F5 2F 67 88 C0 39 34 50 65 85 87 BB D3 7A 4B F1
0030 | 58 AA EB B0 FB 23 DF E8 FE 50 01 00 FF 32 9E 64
0040 | 76 10 66 52 6C 03 CB 79 47 81 AD E1 81 01 6B A9
0050 | B9 5E 74 5E C6 C8 6E 83 BF 58 99 CE EB 3E 98 0A
0060 | AC 72 F8 D2 23 29 47 B7 85 D9 38 87 A2 4D B9 40
0070 | F0 7E 65 C2 B1 DE FA C8 13 79 0B 83 77 66 78 7A
0080 | DB B6 B5 3A 72 68 32 92 22 DE 6E 83 4B 1B 52 0F
0090 | F8 71 E7 EA 84 C9 8A 9D 4C 24 DA 61 55 8E E6 C6
00A0 | 83 95 7A C6 BA 17 66 11 ED 98 A0 4E DD 08 69 F1
00B0 | 9B 07 C8 FD AC 17 A9 56 57 78 C3 8B 90 3F C4 8A
00C0 | 64 F0 A1 7D A2 36 2B EE 57 E6 F8 9D 33 EB 76 45
00D0 | 83 50 3D 78 1D EF B2 33 46 D6 0E 28 4A CD 6E 5B
00E0 | 1F 94 0F E4 C7 06 14 7B F0 59 E3 74 3B F8 8D 1F
00F0 | DB AE A8 D2 06 10 F4 73 8A F0 27 45 13 06 29 8C
0100 | 03 3C 5C 77 F0 F0 24 E8 79 46 7A 5F 13 AD A4 26
0110 | F9 E2 AF 34 41 5E 21 11 87 9F 77 DD F6 1E 92 E2
0120 | 31 5A 88 B7 42 C1 7E D1 2B E8 16 E9 2F F8 B1 98
0130 | B2 97 68 22 7A 24 B7 88 13 C2 27 71 30 37 B1 BB
0140 | 63 55 1A 4E 51 27 B6 0F 49 67 40 C5 D0 79 56 7D
0150 | DF 54 2A 6A 17 33 90 2A E6 0C 75 C6 59 DD 64 89
0160 | DA 56 54 07 24 42 C3 BD 4D A3 70 84 7C E3 E8 F9
0170 | CB 29 30 92 96 AF 38 F5 78 15 55 2D 0B DB 43 1B
0180 | 13 BE AA 86 F1 1C 45 34 56 F2 3E E6</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 70 84 07 00 88 23 C5 65
0010 | 78 01 00 00 1F 5F 04 F5 88 17 8D BF 34 91 B5 EF
0020 | 33 6C A9 7A D0 15 59 A5 CE 81 B5 5B 3C 2D D3 D0
0030 | 6D 0B AD C8 A6 5C 3C C6 FE 50 01 00 C0 88 3D 31
0040 | A8 5D 90 E9 1C 3E 16 09 4C 7D 2D 26 9E F5 EE AD
0050 | AC DA 3C 2A C0 15 7D D8 FC F8 C2 76 F8 2D 3A 1A
0060 | 50 75 47 B7 AA F0 38 17 9B 3E 42 16 62 E8 A7 BB
0070 | A0 EE 07 22 C8 19 B8 FB 61 6D 83 6E 29 5C E6 CD
0080 | E6 06 25 36 99 5C 81 7D 1E 7B 4E C9 08 23 F0 94
0090 | CF 39 3A 6E 5E A2 E9 DE 23 FC 8B B1 A5 78 7F 82
00A0 | 19 B0 FB EE 90 4A E5 53 1F F0 31 EB 6D 21 C6 7F
00B0 | F5 88 2E 41 F5 8D B7 56 63 D5 D4 89 D9 48 D2 A1
00C0 | 82 63 59 66 EC 7C 46 8B A8 F9 97 5C 6F B1 61 20
00D0 | 67 D8 2E C6 0F 92 76 75 42 97 44 18 68 3A 22 6A
00E0 | 70 D6 49 4A AC 6A 21 AD A4 DD BF 10 E2 00 E6 AB
00F0 | E3 FE 13 C0 87 13 EA 95 40 BA 41 A0 33 7C C3 1D
0100 | FB 0D 86 6B AC B1 AD 14 6F 5F C7 8E 23 09 18 93
0110 | AD 3D E5 70 58 00 86 4F 95 E5 55 BE CA 0D 45 A0
0120 | A5 AD 07 DE 51 FF F0 59 72 7F FC 99 3B A0 EF 50
0130 | 1C 90 77 FB 63 3E 83 CA 5D EB C7 44 8E 3B E5 04
0140 | 10 70 20 B1 22 65 6F E4 2A BB 26 45 5A FE 38 93
0150 | 0A D0 91 DA 0F 60 37 B5 99 03 4A 1C C6 AD E2 86
0160 | C2 89 09 87 01 2F 30 3C 21 DB 4C 74 1B 73 2F 32
0170 | 30 E2 4B ED 54 98 31 96 46 39 FE B0 95 41 11 76
0180 | 85 00 77 F2 97 C5 2E B6 5C D5 08 7B</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>7C430900F1F6BF65</code></td>
<td><code>708407008823C565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>A024D46FCE98CC73F52F6788C0393450</code></td>
<td><code>88178DBF3491B5EF336CA97AD01559A5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>658587BBD37A4BF158AAEBB0FB23DFE8</code></td>
<td><code>CE81B55B3C2DD3D06D0BADC8A65C3CC6</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100FF329E64761066526C03CB79</code> <code>4781ADE181016BA9B95E745EC6C86E83</code> <code>BF5899CEEB3E980AAC72F8D2232947B7</code> <code>85D93887A24DB940F07E65C2B1DEFAC8</code> <code>13790B837766787ADBB6B53A72683292</code> <code>22DE6E834B1B520FF871E7EA84C98A9D</code> <code>4C24DA61558EE6C683957AC6BA176611</code> <code>ED98A04EDD0869F19B07C8FDAC17A956</code> <code>5778C38B903FC48A64F0A17DA2362BEE</code> <code>57E6F89D33EB764583503D781DEFB233</code> <code>46D60E284ACD6E5B1F940FE4C706147B</code> <code>F059E3743BF88D1FDBAEA8D20610F473</code> <code>8AF027451306298C033C5C77F0F024E8</code> <code>79467A5F13ADA426F9E2AF34415E2111</code> <code>879F77DDF61E92E2315A88B742C17ED1</code> <code>2BE816E92FF8B198B29768227A24B788</code> <code>13C227713037B1BB63551A4E5127B60F</code> <code>496740C5D079567DDF542A6A1733902A</code> <code>E60C75C659DD6489DA5654072442C3BD</code> <code>4DA370847CE3E8F9CB29309296AF38F5</code> <code>7815552D0BDB431B13BEAA86F11C4534</code><br> <code>56F23EE6</code></td>
<td><code>FE500100C0883D31A85D90E91C3E1609</code> <code>4C7D2D269EF5EEADACDA3C2AC0157DD8</code> <code>FCF8C276F82D3A1A507547B7AAF03817</code> <code>9B3E421662E8A7BBA0EE0722C819B8FB</code> <code>616D836E295CE6CDE6062536995C817D</code> <code>1E7B4EC90823F094CF393A6E5EA2E9DE</code> <code>23FC8BB1A5787F8219B0FBEE904AE553</code> <code>1FF031EB6D21C67FF5882E41F58DB756</code> <code>63D5D489D948D2A182635966EC7C468B</code> <code>A8F9975C6FB1612067D82EC60F927675</code> <code>42974418683A226A70D6494AAC6A21AD</code> <code>A4DDBF10E200E6ABE3FE13C08713EA95</code> <code>40BA41A0337CC31DFB0D866BACB1AD14</code> <code>6F5FC78E23091893AD3DE5705800864F</code> <code>95E555BECA0D45A0A5AD07DE51FFF059</code> <code>727FFC993BA0EF501C9077FB633E83CA</code> <code>5DEBC7448E3BE504107020B122656FE4</code> <code>2ABB26455AFE38930AD091DA0F6037B5</code> <code>99034A1CC6ADE286C2890987012F303C</code> <code>21DB4C741B732F3230E24BED54983196</code> <code>4639FEB095411176850077F297C52EB6</code><br> <code>5CD5087B</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 = 45D092B57C6E3895EE9E5C0B35EFD26DDD0270DA8D3594E004051616A78977CF4BEFE019590B934DC7DC1EBE5DDC442F5B8B67D20293E26A6862412D45C10A36207F1673D4111669F86C1B83E2C771E6F431736C5A6FF53406B2C19FB8711D42B0E94FD04D4597AB056DE54C9EC4501978E2E9C700539DEE17B2F0FE3562DF6EF60AC9348B02FADA16028ADF05BBBED111C5B2E663A02CBA2762C8CDFC33E14A71501874A14A8EC13C8364E1E761813FDA4F131C0FCD1C7D9621C84DB6EEF0D16F8F3A42E842BAC3E9FC03D9422E522A61C9F418EE1631B05A39B4E00059ADCE28C851264B0DED8216E28C40340BF215958BD5751279E56AF51BCE6F3DAABDD4</code></pre>
<pre><code>auth_key = C26C68C4DBC6B6D461F6E47FAE6E1842224FF9394593358A9C7BA38A3E195FD8C30A1DE7C722B98B6BE6C80777C5C191D527E1479D4677FB596001E24C87DD7FC61193AB75B7573252084338DBB7480FE06790E1ADE2286097DD34776A321729AE7861991C8E97BBCD6FC92F326D3FB0C3DC02F72D20769859E03FC91260C2949A16102FADB1D91654E9D90EB1293BC0552A6C68680C27A879AE59651E2F89A1C6F77527A7E0E69A763856C662D262E9DA7CD40D88CA088B2E0C64BCE219C9D5A04118DA1BD8FEAC29F57863AF9DE1F12C15BD7CD0B2196A0FAB89C3E3F6AFD438464123DAB53330CF03684F9A082B3DF5C8A79D86700449959F3A4C0D3999D9</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 00 70 AE F2 F6 BF 65
0010 | 90 00 00 00 34 F7 CB 3B A0 24 D4 6F CE 98 CC 73
0020 | F5 2F 67 88 C0 39 34 50 65 85 87 BB D3 7A 4B F1
0030 | 58 AA EB B0 FB 23 DF E8 68 C8 B6 BA A1 86 28 30
0040 | F6 41 B1 28 20 5F AA 12</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 1C 00 7F 89 23 C5 65
0010 | B0 00 00 00 34 F7 CB 3B 88 17 8D BF 34 91 B5 EF
0020 | 33 6C A9 7A D0 15 59 A5 CE 81 B5 5B 3C 2D D3 D0
0030 | 6D 0B AD C8 A6 5C 3C C6 7E B8 AA 90 63 95 AF FD
0040 | 89 7D 77 46 1A 67 77 5C</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>010070AEF2F6BF65</code></td>
<td><code>011C007F8923C565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>90000000</code> (144 in decimal)</td>
<td><code>B0000000</code> (176 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>A024D46FCE98CC73F52F6788C0393450</code></td>
<td><code>88178DBF3491B5EF336CA97AD01559A5</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>658587BBD37A4BF158AAEBB0FB23DFE8</code></td>
<td><code>CE81B55B3C2DD3D06D0BADC8A65C3CC6</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>68C8B6BAA1862830F641B128205FAA12</code></td>
<td><code>7EB8AA906395AFFD897D77461A67775C</code></td>
<td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td>
</tr>
</tbody>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>AppWebViewResult</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Contains the link that must be used to open a named Mini App.">
<meta property="description" content="Contains the link that must be used to open a direct link Mini App.">
<meta property="og:title" content="AppWebViewResult">
<meta property="og:image" content="">
<meta property="og:description" content="Contains the link that must be used to open a named Mini App.">
<meta property="og:description" content="Contains the link that must be used to open a direct link Mini App.">
<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,7 @@
<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="/type/AppWebViewResult" >AppWebViewResult</a></li></ul></div>
<h1 id="dev_page_title">AppWebViewResult</h1>
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</p>
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -71,7 +71,7 @@
<tbody>
<tr>
<td><a href="/constructor/appWebViewResultUrl">appWebViewResultUrl</a></td>
<td>Contains the link that must be used to open a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</td>
<td>Contains the link that must be used to open a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</td>
</tr>
</tbody>
</table>
@ -86,7 +86,7 @@
<tbody>
<tr>
<td><a href="/method/messages.requestAppWebView">messages.requestAppWebView</a></td>
<td>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-mini-app-links">named Mini App deep link</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
<td>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#direct-mini-app-links">direct Mini App deep link</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
</tr>
</tbody>
</table>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>BotApp</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Contains information about a named Mini App.">
<meta property="description" content="Contains information about a direct link Mini App.">
<meta property="og:title" content="BotApp">
<meta property="og:image" content="">
<meta property="og:description" content="Contains information about a named Mini App.">
<meta property="og:description" content="Contains information about a direct link Mini App.">
<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,7 @@
<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="/type/BotApp" >BotApp</a></li></ul></div>
<h1 id="dev_page_title">BotApp</h1>
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</p>
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -72,7 +72,7 @@
</tr>
<tr>
<td><a href="/constructor/botApp">botApp</a></td>
<td>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</td>
<td>Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</td>
</tr>
</tbody>
</table>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>InputBotApp</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Used to fetch information about a named Mini App">
<meta property="description" content="Used to fetch information about a direct link Mini App">
<meta property="og:title" content="InputBotApp">
<meta property="og:image" content="">
<meta property="og:description" content="Used to fetch information about a named Mini App">
<meta property="og:description" content="Used to fetch information about a direct link Mini App">
<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,7 @@
<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="/type/InputBotApp" >InputBotApp</a></li></ul></div>
<h1 id="dev_page_title">InputBotApp</h1>
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a></p>
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a></p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -68,11 +68,11 @@
<tbody>
<tr>
<td><a href="/constructor/inputBotAppID">inputBotAppID</a></td>
<td>Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a> by its ID</td>
<td>Used to fetch information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> by its ID</td>
</tr>
<tr>
<td><a href="/constructor/inputBotAppShortName">inputBotAppShortName</a></td>
<td>Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a> by its short name</td>
<td>Used to fetch information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> by its short name</td>
</tr>
</tbody>
</table>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>messages.BotApp</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Contains information about a named Mini App">
<meta property="description" content="Contains information about a direct link Mini App">
<meta property="og:title" content="messages.BotApp">
<meta property="og:image" content="">
<meta property="og:description" content="Contains information about a named Mini App">
<meta property="og:description" content="Contains information about a direct link Mini App">
<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,7 @@
<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="/type/messages.BotApp" >messages.BotApp</a></li></ul></div>
<h1 id="dev_page_title">messages.BotApp</h1>
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a></p>
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a></p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -71,7 +71,7 @@
<tbody>
<tr>
<td><a href="/constructor/messages.botApp">messages.botApp</a></td>
<td>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a></td>
<td>Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a></td>
</tr>
</tbody>
</table>
@ -86,7 +86,7 @@
<tbody>
<tr>
<td><a href="/method/messages.getBotApp">messages.getBotApp</a></td>
<td>Obtain information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a></td>
<td>Obtain information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a></td>
</tr>
</tbody>
</table>