Update content of files

This commit is contained in:
GitHub Action 2024-07-02 16:40:24 +00:00
parent e3c664a2e8
commit 70888dc24c
15 changed files with 290 additions and 380 deletions

View file

@ -315,6 +315,8 @@ This will also emit an <a href="/constructor/updateDeleteQuickReply">updateDelet
<a href='/method/account.toggleConnectedBotPaused'>account.toggleConnectedBotPaused</a>#646e1097 peer:<a href='/type/InputPeer'>InputPeer</a> paused:<a href='/type/Bool'>Bool</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/account.disablePeerConnectedBot'>account.disablePeerConnectedBot</a>#5e437ed9 peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/account.getBotBusinessConnection'>account.getBotBusinessConnection</a>#76a86270 connection_id:<a href='/type/string'>string</a> = <a href='/type/Updates'>Updates</a>;
invokeWithBusinessConnection#dd289f8e {X:Type} connection_id:string query:!X = X;</code></pre>
<p>Business users can connect Telegram bots that will process and answer messages <strong>on their behalf</strong>. This allows businesses to <strong>seamlessly integrate</strong> any existing tools and workflows, or add <strong>AI assistants</strong> that manage their chats. </p>
<p>Currently just one business bot may be connected to a user account.<br>
@ -327,6 +329,10 @@ Use <a href="/method/account.toggleConnectedBotPaused">account.disablePeerConnec
<p>The above two methods should be invoked when pressing the appropriate buttons in the <a href="/api/action-bar#manage-a-connected-business-bot">action bar, see here »</a> for more info on the business bot action bar that should be displayed on all peers currently managed by the bot, according to the <a href="/api/action-bar#manage-a-connected-business-bot">action bar flags »</a>. </p>
<p>Connecting or disconnecting a business bot or changing the connection settings will emit an <a href="/constructor/updateBotBusinessConnect">updateBotBusinessConnect</a> update to the bot, with the new settings and a <code>connection_id</code> that will be used by the bot to handle updates from and send messages as the user. </p>
<p>According to the specified settings, the bot will start receiving <a href="/constructor/updateBotNewBusinessMessage">updateBotNewBusinessMessage</a>, <a href="/constructor/updateBotEditBusinessMessage">updateBotEditBusinessMessage</a>, <a href="/constructor/updateBotDeleteBusinessMessage">updateBotDeleteBusinessMessage</a> updates containing messages sent to the connected user via the business connection. </p>
<p>Bots may invoke <a href="/method/account.getBotBusinessConnection">account.getBotBusinessConnection</a> to re-fetch the <a href="/constructor/updateBotBusinessConnect">updateBotBusinessConnect</a> constructor associated with a specific <code>connection_id</code>.<br>
This is needed for example for freshly logged in bots that are receiving some <a href="/constructor/updateBotNewBusinessMessage">updateBotNewBusinessMessage</a>, etc. updates because some users have already connected to the bot before it could login.<br>
In this case, the bot is receiving messages from the business connection, but it hasn't cached the associated <a href="/constructor/updateBotBusinessConnect">updateBotBusinessConnect</a> with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet.<br>
This method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new <a href="/constructor/updateBotBusinessConnect">updateBotBusinessConnect</a> updates to the bot, using the usual <a href="/api/updates">update delivery methods »</a>.</p>
<p>If the <code>can_reply</code> flag was set when connecting the bot, the bot will also be able to invoke the following methods on behalf of the user to interact with messages received via the business connection, by wrapping the query in a <a href="/constructor/invokeWithBusinessConnection">invokeWithBusinessConnection »</a>, passing the connection ID: </p>
<ul>
<li><a href="/method/messages.sendMessage">messages.sendMessage</a></li>

View file

@ -142,7 +142,26 @@ Use <a href="/method/messages.deleteExportedChatInvite">messages.deleteExportedC
<p>Bot administrators will receive a <a href="/constructor/updateBotChatInviteRequester">updateBotChatInviteRequester</a> update for each separate join request.<br>
User administrators will receive an <a href="/constructor/updatePendingJoinRequests">updatePendingJoinRequests</a>, and should invoke <a href="/method/messages.getChatInviteImporters">messages.getChatInviteImporters</a> with the <code>requested</code> flag set to obtain a list of users waiting to be admitted into the group. </p>
<p>Administrators can then use <a href="/method/messages.hideChatJoinRequest">messages.hideChatJoinRequest</a> to approve or dismiss a join request, and <a href="/method/messages.hideAllChatJoinRequests">messages.hideAllChatJoinRequests</a> to approve or dismiss in bulk multiple join requests. </p>
<p>Administrators can also choose to send a message to the user before admitting them into the group: in this case, graphical clients <em>on the user side</em> should display a message on the dialog bar of the chat with the admin, indicating that the chat was initiated by the admin of a chat/channel they have recently requested to join, see the <a href="/api/action-bar#an-admin-from-a-recent-join-request-is-contacting-you">action bar documentation »</a> for more info.</p></div>
<p>Administrators can also choose to send a message to the user before admitting them into the group: in this case, graphical clients <em>on the user side</em> should display a message on the dialog bar of the chat with the admin, indicating that the chat was initiated by the admin of a chat/channel they have recently requested to join, see the <a href="/api/action-bar#an-admin-from-a-recent-join-request-is-contacting-you">action bar documentation »</a> for more info. </p>
<h3><a class="anchor" href="#direct-invites" id="direct-invites" name="direct-invites"><i class="anchor-icon"></i></a>Direct invites</h3>
<pre><code><a href='/constructor/missingInvitee'>missingInvitee</a>#628c9224 flags:<a href='/type/%23'>#</a> premium_would_allow_invite:flags.0?<a href='/constructor/true'>true</a> premium_required_for_pm:flags.1?<a href='/constructor/true'>true</a> user_id:<a href='/type/long'>long</a> = <a href='/type/MissingInvitee'>MissingInvitee</a>;
<a href='/constructor/messages.invitedUsers'>messages.invitedUsers</a>#7f5defa6 updates:<a href='/type/Updates'>Updates</a> missing_invitees:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MissingInvitee'>MissingInvitee</a>&gt; = <a href='/type/messages.InvitedUsers'>messages.InvitedUsers</a>;
---functions---
<a href='/method/messages.addChatUser'>messages.addChatUser</a>#cbc6d107 chat_id:<a href='/type/long'>long</a> user_id:<a href='/type/InputUser'>InputUser</a> fwd_limit:<a href='/type/int'>int</a> = <a href='/type/messages.InvitedUsers'>messages.InvitedUsers</a>;
<a href='/method/messages.createChat'>messages.createChat</a>#92ceddd4 flags:<a href='/type/%23'>#</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputUser'>InputUser</a>&gt; title:<a href='/type/string'>string</a> ttl_period:flags.0?<a href='/type/int'>int</a> = <a href='/type/messages.InvitedUsers'>messages.InvitedUsers</a>;
<a href='/method/channels.inviteToChannel'>channels.inviteToChannel</a>#c9e33d54 channel:<a href='/type/InputChannel'>InputChannel</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputUser'>InputUser</a>&gt; = <a href='/type/messages.InvitedUsers'>messages.InvitedUsers</a>;</code></pre>
<p>Users may also be directly invited to groups and channels during their creation (<a href="/api/channel">basic groups</a> via <a href="/method/messages.createChat">messages.createChat</a>) or afterwards (<a href="/api/channel">basic groups</a> via <a href="/method/messages.addChatUser">messages.addChatUser</a>, <a href="/api/channel">supergroups and channels</a> via <a href="/method/channels.inviteToChannel">channels.inviteToChannel</a>). </p>
<p>The methods will return a <a href="/constructor/messages.invitedUsers">messages.invitedUsers</a> constructor, containing a list of <a href="/api/updates">updates</a> about successfully invited users (and eventually info about the created group), and a list of <a href="/constructor/missingInvitee">missingInvitee</a>, with a list of users that could not be invited for some reason. </p>
<p>Specifically:</p>
<ul>
<li>If none of the <a href="/constructor/missingInvitee">missingInvitee</a> flags are set, we could not add the user because of their privacy settings, and we can create and directly share an <a href="#invite-links">invite link</a> with them using a normal message, instead. </li>
<li>If the <a href="/constructor/missingInvitee">missingInvitee</a>.<code>premium_would_allow_invite</code> flag is set, we could not add the user <em>only because</em> the current account needs to purchase a <a href="/api/premium">Telegram Premium</a> subscription to complete the operation. </li>
<li>If the <a href="/constructor/missingInvitee">missingInvitee</a>.<code>premium_required_for_pm</code> flag is set, we could not add the user because of their privacy settings, and additionally, the current account needs to purchase a <a href="/api/premium">Telegram Premium</a> subscription to directly share an invite link with the user via a private message.</li>
</ul></div>
</div>

View file

@ -254,7 +254,7 @@
<li>Added <a href="/method/messages.getMyStickers">messages.getMyStickers</a> - </li>
<li>Added <a href="/method/fragment.getCollectibleInfo">fragment.getCollectibleInfo</a> - </li>
<li>Added <a href="/method/account.toggleConnectedBotPaused">account.toggleConnectedBotPaused</a> - </li>
<li>Added <a href="/method/account.disablePeerConnectedBot">account.disablePeerConnectedBot</a> - </li>
<li>Added <a href="/method/account.disablePeerConnectedBot">account.disablePeerConnectedBot</a> - Permanently disconnect a specific chat from all <a href="/api/business#connected-bots">business bots »</a> (equivalent to specifying it in <code>recipients.exclude_users</code> during initial configuration with <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>. </li>
<li>Added <a href="/method/account.updateBirthday">account.updateBirthday</a> - </li>
<li>Added <a href="/method/contacts.getBirthdays">contacts.getBirthdays</a> - </li>
<li>Added <a href="/method/account.createBusinessChatLink">account.createBusinessChatLink</a> - </li>

View file

@ -78,13 +78,10 @@
<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="#messagesaddchatuser" id="messagesaddchatuser" name="messagesaddchatuser"><i class="anchor-icon"></i></a><a href="/method/messages.addChatUser">messages.addChatUser</a></h4>
<p>Adds a user to a chat and sends a service message on it.</p>
<p>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</p>
<h4><a class="anchor" href="#channelsinvitetochannel" id="channelsinvitetochannel" name="channelsinvitetochannel"><i class="anchor-icon"></i></a><a href="/method/channels.inviteToChannel">channels.inviteToChannel</a></h4>
<p>Invite users to a channel/supergroup</p>
<p>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</p>
<h4><a class="anchor" href="#messagescreatechat" id="messagescreatechat" name="messagescreatechat"><i class="anchor-icon"></i></a><a href="/method/messages.createChat">messages.createChat</a></h4>
<p>Creates a new chat.</p>
<p>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</p>
<h4><a class="anchor" href="#invites" id="invites" name="invites"><i class="anchor-icon"></i></a><a href="/api/invites">Invites</a></h4>
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p></div>

View file

@ -4,38 +4,10 @@
<meta charset="utf-8">
<title>account.disablePeerConnectedBot</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
peer
InputPeer
 
Result
Bool
Possible errors
Code
Type
Description
400
PEER_ID_INVALID…">
<meta property="description" content="Permanently disconnect a specific chat from all business bots &amp;raquo; (equivalent to specifying it in recipients.exclude_users during initial configuration with account.updateConnectedBot &amp;raquo;); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking account.updateConnectedBot &amp;raquo;.">
<meta property="og:title" content="account.disablePeerConnectedBot">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
peer
InputPeer
 
Result
Bool
Possible errors
Code
Type
Description
400
PEER_ID_INVALID…">
<meta property="og:description" content="Permanently disconnect a specific chat from all business bots &amp;raquo; (equivalent to specifying it in recipients.exclude_users during initial configuration with account.updateConnectedBot &amp;raquo;); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking account.updateConnectedBot &amp;raquo;.">
<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">
@ -70,7 +42,8 @@ PEER_ID_INVALID…">
<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/account.disablePeerConnectedBot" >account.disablePeerConnectedBot</a></li></ul></div>
<h1 id="dev_page_title">account.disablePeerConnectedBot</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Permanently disconnect a specific chat from all <a href="/api/business#connected-bots">business bots »</a> (equivalent to specifying it in <code>recipients.exclude_users</code> during initial configuration with <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>. </p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -99,7 +72,7 @@ PEER_ID_INVALID…">
<tr>
<td><strong>peer</strong></td>
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
<td> </td>
<td>The chat to disconnect</td>
</tr>
</tbody>
</table>
@ -121,7 +94,11 @@ PEER_ID_INVALID…">
<td>The provided peer id is invalid.</td>
</tr>
</tbody>
</table></div>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p>
<h4><a class="anchor" href="#accountupdateconnectedbot" id="accountupdateconnectedbot" name="accountupdateconnectedbot"><i class="anchor-icon"></i></a><a href="/method/account.updateConnectedBot">account.updateConnectedBot</a></h4></div>
</div>

View file

@ -4,38 +4,10 @@
<meta charset="utf-8">
<title>account.getBotBusinessConnection</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
connection_id
string
 
Result
Updates
Possible errors
Code
Type
Description
400
CONNE…">
<meta property="description" content="Bots may invoke this method to re-fetch the updateBotBusinessConnect constructor associated with a specific business connection_id…">
<meta property="og:title" content="account.getBotBusinessConnection">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
connection_id
string
 
Result
Updates
Possible errors
Code
Type
Description
400
CONNE…">
<meta property="og:description" content="Bots may invoke this method to re-fetch the updateBotBusinessConnect constructor associated with a specific business connection_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">
@ -70,7 +42,11 @@ CONNE…">
<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/account.getBotBusinessConnection" >account.getBotBusinessConnection</a></li></ul></div>
<h1 id="dev_page_title">account.getBotBusinessConnection</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Bots may invoke this method to re-fetch the <a href="/constructor/updateBotBusinessConnect">updateBotBusinessConnect</a> constructor associated with a specific <a href="/api/business#connected-bots">business <code>connection_id</code>, see here »</a> for more info on connected business bots.<br>
This is needed for example for freshly logged in bots that are receiving some <a href="/constructor/updateBotNewBusinessMessage">updateBotNewBusinessMessage</a>, etc. updates because some users have already connected to the bot before it could login.<br>
In this case, the bot is receiving messages from the business connection, but it hasn't cached the associated <a href="/constructor/updateBotBusinessConnect">updateBotBusinessConnect</a> with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet.<br>
This method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new <a href="/constructor/updateBotBusinessConnect">updateBotBusinessConnect</a> updates to the bot using the usual <a href="/api/updates">update delivery methods »</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -104,7 +80,7 @@ CONNE…">
<tr>
<td><strong>connection_id</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td> </td>
<td><a href="/api/business#connected-bots">Business connection ID »</a>.</td>
</tr>
</tbody>
</table>

View file

@ -4,44 +4,10 @@
<meta charset="utf-8">
<title>account.toggleConnectedBotPaused</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
peer
InputPeer
 
paused
Bool
 
Result
Bool
Possible errors
Code
Type
Description
400
PEER_ID_INVALID…">
<meta property="description" content="Pause or unpause a specific chat, temporarily disconnecting it from all business bots &amp;raquo;.">
<meta property="og:title" content="account.toggleConnectedBotPaused">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
peer
InputPeer
 
paused
Bool
 
Result
Bool
Possible errors
Code
Type
Description
400
PEER_ID_INVALID…">
<meta property="og:description" content="Pause or unpause a specific chat, temporarily disconnecting it from all business bots &amp;raquo;.">
<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">
@ -76,7 +42,8 @@ PEER_ID_INVALID…">
<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/account.toggleConnectedBotPaused" >account.toggleConnectedBotPaused</a></li></ul></div>
<h1 id="dev_page_title">account.toggleConnectedBotPaused</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Pause or unpause a specific chat, temporarily disconnecting it from all <a href="/api/business#connected-bots">business bots »</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -105,12 +72,12 @@ PEER_ID_INVALID…">
<tr>
<td><strong>peer</strong></td>
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
<td> </td>
<td>The chat to pause</td>
</tr>
<tr>
<td><strong>paused</strong></td>
<td style="text-align: center;"><a href="/type/Bool">Bool</a></td>
<td> </td>
<td>Whether to pause or unpause the chat</td>
</tr>
</tbody>
</table>
@ -132,7 +99,10 @@ PEER_ID_INVALID…">
<td>The provided peer id is invalid.</td>
</tr>
</tbody>
</table></div>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
</div>

View file

@ -4,32 +4,10 @@
<meta charset="utf-8">
<title>account.updateConnectedBot</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
can_reply
flags.0?true
 
deleted
flags.1?true…">
<meta property="description" content="Connect a business bot &amp;raquo; to the current account, or to change the current connection settings.">
<meta property="og:title" content="account.updateConnectedBot">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
can_reply
flags.0?true
 
deleted
flags.1?true…">
<meta property="og:description" content="Connect a business bot &amp;raquo; to the current account, or to change the current connection settings.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -64,7 +42,8 @@ flags.1?true…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/account.updateConnectedBot" >account.updateConnectedBot</a></li></ul></div>
<h1 id="dev_page_title">account.updateConnectedBot</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Connect a <a href="/api/business#connected-bots">business bot »</a> to the current account, or to change the current connection settings. </p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -103,27 +82,30 @@ flags.1?true…">
<tr>
<td><strong>can_reply</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td> </td>
<td>Whether the bot can reply to messages it receives from us, on behalf of us using the <a href="/api/business#connected-bots">business connection</a>.</td>
</tr>
<tr>
<td><strong>deleted</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
<td> </td>
<td>Whether to fully disconnect the bot from the current account.</td>
</tr>
<tr>
<td><strong>bot</strong></td>
<td style="text-align: center;"><a href="/type/InputUser">InputUser</a></td>
<td> </td>
<td>The bot to connect or disconnect</td>
</tr>
<tr>
<td><strong>recipients</strong></td>
<td style="text-align: center;"><a href="/type/InputBusinessBotRecipients">InputBusinessBotRecipients</a></td>
<td> </td>
<td>Configuration for the business connection</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
<p><a href="/type/Updates">Updates</a></p></div>
<p><a href="/type/Updates">Updates</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
</div>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>channels.inviteToChannel</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Invite users to a channel/supergroup May also return 0-N updates of type updateGroupInvitePrivacyForbidden: it indicates we couldn&#39;t add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.">
<meta property="description" content="Invite users to a channel/supergroup">
<meta property="og:title" content="channels.inviteToChannel">
<meta property="og:image" content="">
<meta property="og:description" content="Invite users to a channel/supergroup May also return 0-N updates of type updateGroupInvitePrivacyForbidden: it indicates we couldn&#39;t add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.">
<meta property="og:description" content="Invite users to a channel/supergroup">
<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">
@ -43,7 +43,6 @@
<h1 id="dev_page_title">channels.inviteToChannel</h1>
<div id="dev_page_content"><p>Invite users to a channel/supergroup</p>
<p>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -184,12 +183,7 @@
<td>The user's privacy settings do not allow you to do this.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#updategroupinviteprivacyforbidden" id="updategroupinviteprivacyforbidden" name="updategroupinviteprivacyforbidden"><i class="anchor-icon"></i></a><a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</a></h4>
<p>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.</p>
<h4><a class="anchor" href="#invites" id="invites" name="invites"><i class="anchor-icon"></i></a><a href="/api/invites">Invites</a></h4>
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p></div>
</table></div>
</div>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>messages.addChatUser</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Adds a user to a chat and sends a service message on it. May also return 0-N updates of type updateGroupInvitePrivacyForbidden: it indicates we couldn&#39;t add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.">
<meta property="description" content="Adds a user to a chat and sends a service message on it.">
<meta property="og:title" content="messages.addChatUser">
<meta property="og:image" content="">
<meta property="og:description" content="Adds a user to a chat and sends a service message on it. May also return 0-N updates of type updateGroupInvitePrivacyForbidden: it indicates we couldn&#39;t add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.">
<meta property="og:description" content="Adds a user to a chat and sends a service message on it.">
<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">
@ -43,7 +43,6 @@
<h1 id="dev_page_title">messages.addChatUser</h1>
<div id="dev_page_content"><p>Adds a user to a chat and sends a service message on it.</p>
<p>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -169,12 +168,7 @@
<td>You blocked this user.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#updategroupinviteprivacyforbidden" id="updategroupinviteprivacyforbidden" name="updategroupinviteprivacyforbidden"><i class="anchor-icon"></i></a><a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</a></h4>
<p>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.</p>
<h4><a class="anchor" href="#invites" id="invites" name="invites"><i class="anchor-icon"></i></a><a href="/api/invites">Invites</a></h4>
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p></div>
</table></div>
</div>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>messages.createChat</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Creates a new chat. May also return 0-N updates of type updateGroupInvitePrivacyForbidden: it indicates we couldn&#39;t add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.">
<meta property="description" content="Creates a new chat.">
<meta property="og:title" content="messages.createChat">
<meta property="og:image" content="">
<meta property="og:description" content="Creates a new chat. May also return 0-N updates of type updateGroupInvitePrivacyForbidden: it indicates we couldn&#39;t add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.">
<meta property="og:description" content="Creates a new chat.">
<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">
@ -43,7 +43,6 @@
<h1 id="dev_page_title">messages.createChat</h1>
<div id="dev_page_content"><p>Creates a new chat.</p>
<p>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -142,11 +141,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#messagessetdefaulthistoryttl" id="messagessetdefaulthistoryttl" name="messagessetdefaulthistoryttl"><i class="anchor-icon"></i></a><a href="/method/messages.setDefaultHistoryTTL">messages.setDefaultHistoryTTL</a></h4>
<p>Changes the default value of the Time-To-Live setting, applied to all new chats.</p>
<h4><a class="anchor" href="#updategroupinviteprivacyforbidden" id="updategroupinviteprivacyforbidden" name="updategroupinviteprivacyforbidden"><i class="anchor-icon"></i></a><a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</a></h4>
<p>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.</p>
<h4><a class="anchor" href="#invites" id="invites" name="invites"><i class="anchor-icon"></i></a><a href="/api/invites">Invites</a></h4>
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p></div>
<p>Changes the default value of the Time-To-Live setting, applied to all new chats.</p></div>
</div>

View file

@ -701,7 +701,7 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
<tr>
<td><a href="/method/channels.inviteToChannel">channels.inviteToChannel</a></td>
<td>Invite users to a channel/supergroup<br><br>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</td>
<td>Invite users to a channel/supergroup</td>
</tr>
<tr>
<td><a href="/method/channels.joinChannel">channels.joinChannel</a></td>
@ -827,11 +827,11 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
<tr>
<td><a href="/method/messages.addChatUser">messages.addChatUser</a></td>
<td>Adds a user to a chat and sends a service message on it.<br><br>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</td>
<td>Adds a user to a chat and sends a service message on it.</td>
</tr>
<tr>
<td><a href="/method/messages.createChat">messages.createChat</a></td>
<td>Creates a new chat.<br><br>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</td>
<td>Creates a new chat.</td>
</tr>
<tr>
<td><a href="/method/messages.deleteChatUser">messages.deleteChatUser</a></td>
@ -3310,7 +3310,7 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
<tr>
<td><a href="/method/account.disablePeerConnectedBot">account.disablePeerConnectedBot</a></td>
<td> </td>
<td>Permanently disconnect a specific chat from all <a href="/api/business#connected-bots">business bots »</a> (equivalent to specifying it in <code>recipients.exclude_users</code> during initial configuration with <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.updateBirthday">account.updateBirthday</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 E0 F4 09 00 D2 83 81 66
0010 | 14 00 00 00 F1 8E 7E BE B6 C5 39 69 CA C2 3B 76
0020 | 7D BD E0 BA 50 4C D1 B3</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 28 A6 0A 00 39 2D 84 66
0010 | 14 00 00 00 F1 8E 7E BE 1A 94 A9 17 FE BC 44 54
0020 | 8A E7 C4 3D 89 59 88 62</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>E0F40900D2838166</code></td>
<td><code>28A60A00392D8466</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>B6C53969CAC23B767DBDE0BA504CD1B3</code></td>
<td><code>1A94A917FEBC44548AE7C43D89598862</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 C8 6D 87 D2 83 81 66
0010 | C0 00 00 00 63 24 16 05 B6 C5 39 69 CA C2 3B 76
0020 | 7D BD E0 BA 50 4C D1 B3 AB 86 38 EB 10 E1 A3 9A
0030 | 34 AB 3F E5 D7 D3 EF 4E 08 27 A5 39 34 C5 8E 97
0040 | D1 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 F8 D0 D3 39 2D 84 66
0010 | AC 00 00 00 63 24 16 05 1A 94 A9 17 FE BC 44 54
0020 | 8A E7 C4 3D 89 59 88 62 43 F0 01 27 70 6C 84 C2
0030 | D5 A5 4D 2F F3 BB 47 F9 08 23 1B 8A 9B F4 50 30
0040 | 61 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>01C86D87D2838166</code></td>
<td><code>01F8D0D3392D8466</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>C0000000</code> (192 in decimal)</td>
<td><code>AC000000</code> (172 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>B6C53969CAC23B767DBDE0BA504CD1B3</code></td>
<td><code>1A94A917FEBC44548AE7C43D89598862</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>AB8638EB10E1A39A34AB3FE5D7D3EF4E</code></td>
<td><code>43F00127706C84C2D5A54D2FF3BB47F9</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>0827A53934C58E97D1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2856752437451986897</td>
<td><code>08231B8A9BF4503061000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2529768018122125409</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 = 2856752437451986897</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2856752437451986897 = 1496152109 * 1909399733</code></p>
<pre><code>p = 1496152109
q = 1909399733</code></pre>
<pre><code>pq = 2529768018122125409</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2529768018122125409 = 1309951991 * 1931191399</code></p>
<pre><code>p = 1309951991
q = 1931191399</code></pre>
<!-- end pq -->
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
<!-- start p_q_inner_data_dc -->
<p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 95 5F F5 A9 08 27 A5 39 34 C5 8E 97 D1 00 00 00
0010 | 04 59 2D 78 2D 00 00 00 04 71 CF 20 B5 00 00 00
0020 | B6 C5 39 69 CA C2 3B 76 7D BD E0 BA 50 4C D1 B3
0030 | AB 86 38 EB 10 E1 A3 9A 34 AB 3F E5 D7 D3 EF 4E
0040 | C1 9F D5 3B 4E 07 D7 BB 06 72 A5 AE 55 5E 9A D5
0050 | CF A0 2F F3 03 9D 5A 20 FD 70 3A C6 07 57 F0 45
<pre><code>0000 | 95 5F F5 A9 08 23 1B 8A 9B F4 50 30 61 00 00 00
0010 | 04 4E 14 47 F7 00 00 00 04 73 1B A4 67 00 00 00
0020 | 1A 94 A9 17 FE BC 44 54 8A E7 C4 3D 89 59 88 62
0030 | 43 F0 01 27 70 6C 84 C2 D5 A5 4D 2F F3 BB 47 F9
0040 | 24 10 9E 24 CC 01 BA D5 6D 46 9C 89 21 0C 92 F6
0050 | 5B 41 FF D5 75 B2 E2 4C 07 50 CE C3 6A 2E D1 FF
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 = 1909399733</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>0827A53934C58E97D1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2856752437451986897</td>
<td><code>08231B8A9BF4503061000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2529768018122125409</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>04592D782D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1496152109</td>
<td><code>044E1447F7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1309951991</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>0471CF20B5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1909399733</td>
<td><code>04731BA467000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1931191399</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>B6C53969CAC23B767DBDE0BA504CD1B3</code></td>
<td><code>1A94A917FEBC44548AE7C43D89598862</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>AB8638EB10E1A39A34AB3FE5D7D3EF4E</code></td>
<td><code>43F00127706C84C2D5A54D2FF3BB47F9</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>C19FD53B4E07D7BB0672A5AE555E9AD5</code> <code>CFA02FF3039D5A20FD703AC60757F045</code></td>
<td><code>24109E24CC01BAD56D469C89210C92F6</code> <code>5B41FFD575B2E24C0750CEC36A2ED1FF</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1909399733</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 = 955FF5A90827A53934C58E97D100000004592D782D0000000471CF20B5000000B6C53969CAC23B767DBDE0BA504CD1B3AB8638EB10E1A39A34AB3FE5D7D3EF4EC19FD53B4E07D7BB0672A5AE555E9AD5CFA02FF3039D5A20FD703AC60757F04502000000
random_padding_bytes = BE1E7AF322DC5469119552CDAAC4E19E0BA6D3A0924C30F0AF570911F3BD1FF1C3CDB4C3BA58DD8FAEDE241DF8AE221AB87EF198B950FD861547F698BE71D54F64EF14828BC107BE1E3D89D174301B74009E48F3E1F77E0C008FEB1E</code></pre>
<pre><code>data = 955FF5A908231B8A9BF4503061000000044E1447F700000004731BA4670000001A94A917FEBC44548AE7C43D8959886243F00127706C84C2D5A54D2FF3BB47F924109E24CC01BAD56D469C89210C92F65B41FFD575B2E24C0750CEC36A2ED1FF02000000
random_padding_bytes = EB75C8EC89B1B09FBD2F085C17CBAC8B52ABCDC87D39C69A505DA6B761905C030CB6DF24A3A1E4779B10189B9347EFBC4F6E4C736409DC806D333DAEABF5D98CD2E7FD62779A8CDC70CEB823F5FCAFD619CFE92CFDC20A53D7CFBDCE</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 = 6E930E1C34E9B89F64DCB8CC6A93D47454ABB0E257C02B8093FD8D2C93C5958C8B524FCDB2F2B72A01644BA64FFDA8A259377183AC2BAAB64E9710C15905E00F66E81A06BD4F7F0B2AAF4B819BC88967F8F206089E4E4CFE75B2D1C2A8319173CF2E75BB7F058AC7FB59419C84D706CC62F18D958707BF8D87F88B7F6D06EEF0FBC8317AE5E34A8AE6E38659B1022D5F7B0BEBC0DF6EF1C337A3FAAE75B7C65DFF8853538009D7C3AB94CB5C81382EBAD637170144933371769707C3B007961E3555DD86834A8E82D74E0E7031173779D1F1D2D817FBC66DBD730E191A8133BBD6839AC6EC64B613A184AFC2CEE463269CBE30D270C4639CECCEC8BB9972B2C1</code></pre>
<pre><code>encrypted_data = E4314C927C9FE8E26B5DB8BD33991DE57EF45E33AEC796366252DCA56BB52B3867B6927BD13442D82AE24F396AD5EE8CC7E13B27375BCA2A687434D0782B88C7B248594EF88B04C6D3EAAEF897B1F1CC768015593EA88157BCE78D18639CC64541C297CA67553C0751B6AA833F2A0619F058FCA0B53FA1ADC71D854F24F4AD12364887F3E113826788909864470E117B55F57C033B2F7037D87E860599654AFFA19B14EE009DF832D93D174E9668B687857373BCB22D12524C1C9245C9032DF1EFC89D7C919EE417D1764D2D248E1E8B4A4307E943669B24841F7AE9FD95621CF2DFE3CBEEECB585FF02B0583BD12920F056B778797D0231802D27D73E4FEA4E</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 EC 0C 0E 00 D2 83 81 66
0010 | 40 01 00 00 BE E4 12 D7 B6 C5 39 69 CA C2 3B 76
0020 | 7D BD E0 BA 50 4C D1 B3 AB 86 38 EB 10 E1 A3 9A
0030 | 34 AB 3F E5 D7 D3 EF 4E 04 59 2D 78 2D 00 00 00
0040 | 04 71 CF 20 B5 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 6E 93 0E 1C 34 E9 B8 9F 64 DC B8 CC
0060 | 6A 93 D4 74 54 AB B0 E2 57 C0 2B 80 93 FD 8D 2C
0070 | 93 C5 95 8C 8B 52 4F CD B2 F2 B7 2A 01 64 4B A6
0080 | 4F FD A8 A2 59 37 71 83 AC 2B AA B6 4E 97 10 C1
0090 | 59 05 E0 0F 66 E8 1A 06 BD 4F 7F 0B 2A AF 4B 81
00A0 | 9B C8 89 67 F8 F2 06 08 9E 4E 4C FE 75 B2 D1 C2
00B0 | A8 31 91 73 CF 2E 75 BB 7F 05 8A C7 FB 59 41 9C
00C0 | 84 D7 06 CC 62 F1 8D 95 87 07 BF 8D 87 F8 8B 7F
00D0 | 6D 06 EE F0 FB C8 31 7A E5 E3 4A 8A E6 E3 86 59
00E0 | B1 02 2D 5F 7B 0B EB C0 DF 6E F1 C3 37 A3 FA AE
00F0 | 75 B7 C6 5D FF 88 53 53 80 09 D7 C3 AB 94 CB 5C
0100 | 81 38 2E BA D6 37 17 01 44 93 33 71 76 97 07 C3
0110 | B0 07 96 1E 35 55 DD 86 83 4A 8E 82 D7 4E 0E 70
0120 | 31 17 37 79 D1 F1 D2 D8 17 FB C6 6D BD 73 0E 19
0130 | 1A 81 33 BB D6 83 9A C6 EC 64 B6 13 A1 84 AF C2
0140 | CE E4 63 26 9C BE 30 D2 70 C4 63 9C EC CE C8 BB
0150 | 99 72 B2 C1</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C4 EE 0B 00 3A 2D 84 66
0010 | 40 01 00 00 BE E4 12 D7 1A 94 A9 17 FE BC 44 54
0020 | 8A E7 C4 3D 89 59 88 62 43 F0 01 27 70 6C 84 C2
0030 | D5 A5 4D 2F F3 BB 47 F9 04 4E 14 47 F7 00 00 00
0040 | 04 73 1B A4 67 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 E4 31 4C 92 7C 9F E8 E2 6B 5D B8 BD
0060 | 33 99 1D E5 7E F4 5E 33 AE C7 96 36 62 52 DC A5
0070 | 6B B5 2B 38 67 B6 92 7B D1 34 42 D8 2A E2 4F 39
0080 | 6A D5 EE 8C C7 E1 3B 27 37 5B CA 2A 68 74 34 D0
0090 | 78 2B 88 C7 B2 48 59 4E F8 8B 04 C6 D3 EA AE F8
00A0 | 97 B1 F1 CC 76 80 15 59 3E A8 81 57 BC E7 8D 18
00B0 | 63 9C C6 45 41 C2 97 CA 67 55 3C 07 51 B6 AA 83
00C0 | 3F 2A 06 19 F0 58 FC A0 B5 3F A1 AD C7 1D 85 4F
00D0 | 24 F4 AD 12 36 48 87 F3 E1 13 82 67 88 90 98 64
00E0 | 47 0E 11 7B 55 F5 7C 03 3B 2F 70 37 D8 7E 86 05
00F0 | 99 65 4A FF A1 9B 14 EE 00 9D F8 32 D9 3D 17 4E
0100 | 96 68 B6 87 85 73 73 BC B2 2D 12 52 4C 1C 92 45
0110 | C9 03 2D F1 EF C8 9D 7C 91 9E E4 17 D1 76 4D 2D
0120 | 24 8E 1E 8B 4A 43 07 E9 43 66 9B 24 84 1F 7A E9
0130 | FD 95 62 1C F2 DF E3 CB EE EC B5 85 FF 02 B0 58
0140 | 3B D1 29 20 F0 56 B7 78 79 7D 02 31 80 2D 27 D7
0150 | 3E 4F EA 4E</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 = BE1E7AF322DC5469119552CDAAC4E19E0BA6D3A0924C30F0AF570911F
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>EC0C0E00D2838166</code></td>
<td><code>C4EE0B003A2D8466</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 = BE1E7AF322DC5469119552CDAAC4E19E0BA6D3A0924C30F0AF570911F
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>B6C53969CAC23B767DBDE0BA504CD1B3</code></td>
<td><code>1A94A917FEBC44548AE7C43D89598862</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>AB8638EB10E1A39A34AB3FE5D7D3EF4E</code></td>
<td><code>43F00127706C84C2D5A54D2FF3BB47F9</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>04592D782D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1496152109</td>
<td><code>044E1447F7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1309951991</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>0471CF20B5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1909399733</td>
<td><code>04731BA467000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1931191399</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 = BE1E7AF322DC5469119552CDAAC4E19E0BA6D3A0924C30F0AF570911F
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001006E930E1C34E9B89F64DCB8CC</code> <code>6A93D47454ABB0E257C02B8093FD8D2C</code> <code>93C5958C8B524FCDB2F2B72A01644BA6</code> <code>4FFDA8A259377183AC2BAAB64E9710C1</code> <code>5905E00F66E81A06BD4F7F0B2AAF4B81</code> <code>9BC88967F8F206089E4E4CFE75B2D1C2</code> <code>A8319173CF2E75BB7F058AC7FB59419C</code> <code>84D706CC62F18D958707BF8D87F88B7F</code> <code>6D06EEF0FBC8317AE5E34A8AE6E38659</code> <code>B1022D5F7B0BEBC0DF6EF1C337A3FAAE</code> <code>75B7C65DFF8853538009D7C3AB94CB5C</code> <code>81382EBAD637170144933371769707C3</code> <code>B007961E3555DD86834A8E82D74E0E70</code> <code>31173779D1F1D2D817FBC66DBD730E19</code> <code>1A8133BBD6839AC6EC64B613A184AFC2</code> <code>CEE463269CBE30D270C4639CECCEC8BB</code><br> <code>9972B2C1</code></td>
<td><code>FE000100E4314C927C9FE8E26B5DB8BD</code> <code>33991DE57EF45E33AEC796366252DCA5</code> <code>6BB52B3867B6927BD13442D82AE24F39</code> <code>6AD5EE8CC7E13B27375BCA2A687434D0</code> <code>782B88C7B248594EF88B04C6D3EAAEF8</code> <code>97B1F1CC768015593EA88157BCE78D18</code> <code>639CC64541C297CA67553C0751B6AA83</code> <code>3F2A0619F058FCA0B53FA1ADC71D854F</code> <code>24F4AD12364887F3E113826788909864</code> <code>470E117B55F57C033B2F7037D87E8605</code> <code>99654AFFA19B14EE009DF832D93D174E</code> <code>9668B687857373BCB22D12524C1C9245</code> <code>C9032DF1EFC89D7C919EE417D1764D2D</code> <code>248E1E8B4A4307E943669B24841F7AE9</code> <code>FD95621CF2DFE3CBEEECB585FF02B058</code> <code>3BD12920F056B778797D0231802D27D7</code><br> <code>3E4FEA4E</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = BE1E7AF322DC5469119552CDAAC4E19E0BA6D3A0924C30F0AF570911F
<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 54 DB 5E D3 83 81 66
0010 | A4 02 00 00 5C 07 E8 D0 B6 C5 39 69 CA C2 3B 76
0020 | 7D BD E0 BA 50 4C D1 B3 AB 86 38 EB 10 E1 A3 9A
0030 | 34 AB 3F E5 D7 D3 EF 4E FE 50 02 00 F2 FC 6F D6
0040 | 49 63 14 8B 36 26 C5 50 95 48 46 1A 12 6C 54 9F
0050 | 4D 63 21 CA C1 21 46 65 26 0A EB D4 A9 DF B1 AF
0060 | 89 26 62 7A 97 43 3B E7 B4 EB 62 0C 2B 22 23 37
0070 | 4B 72 BE 5E BB 5F AE 6C 6A 30 30 D0 A0 9F 80 B6
0080 | E3 58 C9 F5 AB D0 15 9B 61 77 BF AC BC B7 58 E8
0090 | 87 7E E4 6E 8B 16 DA BF 6E 35 EA 41 B4 A7 46 2C
00A0 | 34 BD 7E 8D 2C 5A D6 61 74 DC 0A 87 DF E3 20 6F
00B0 | 3F CD 5D C8 FB 98 D6 7B 54 0B B3 AC F9 0E 64 72
00C0 | C7 E1 01 0E A0 83 BD E7 0B E9 DA 62 D5 F5 3C 20
00D0 | E4 87 91 B3 11 8B 4D D1 4A 70 AA EF 82 1D 08 C6
00E0 | D4 D6 E7 8B 4D 29 5F B1 9A AC 7E 62 AF 0F 02 A1
00F0 | ED 53 03 91 BB 53 DC 68 AF 7D 1F F0 0E 22 24 7F
0100 | D0 34 5F 99 DF F2 FC 9C B5 8F A4 D0 CF 7A 54 99
0110 | 98 7C 9A 70 1E 3F C1 0E 56 05 F6 49 F3 A7 C9 6B
0120 | 86 E9 5E 72 4A 3C 5D 46 81 C2 B9 97 8E A1 67 2D
0130 | 1B 71 DD 69 CC E9 55 98 B8 FD 28 97 F0 4C 12 C9
0140 | D7 87 14 7A A2 73 85 51 DC 54 CF 78 AB 75 8D 57
0150 | D3 CA 61 8A AA B7 E3 A3 A1 EA AD 40 FB 05 30 B7
0160 | 0F 91 8F 4D 15 52 B0 31 1C 54 DE 5C 85 B3 56 ED
0170 | 30 C3 99 FA 03 7F 09 8D AB C2 1E EB A6 9F 5C 8D
0180 | F5 DB 77 74 07 51 99 F7 7D 19 BF 74 D7 32 EE 6D
0190 | 4E 63 A0 26 40 C3 6B 16 26 B4 39 58 E8 67 A3 02
01A0 | 20 37 45 ED 10 FB 7B E8 68 85 32 FE 22 CD 98 C0
01B0 | 2E 76 42 48 50 C6 68 77 5A 3C FD 11 84 29 71 4C
01C0 | 28 3F 83 06 3D 36 88 26 5C AE 04 0E 4A 6C F3 53
01D0 | 77 8E 94 5E A0 EA E7 4B 6C 3D F4 91 B5 DC A8 4A
01E0 | 43 39 44 E3 04 CF 70 D3 5C CC DD E5 9F F2 88 4D
01F0 | C6 21 35 BF 5B 8F 89 98 16 17 2B 44 BD DD 98 77
0200 | 74 D7 56 1F D3 36 FB 11 96 DD AD 6C BB 8D D5 B5
0210 | 4C 7B 84 B4 14 7B 59 73 FD F4 05 09 19 9E 89 69
0220 | 00 A6 01 8C A5 74 AF CD 18 DA EA 8E AD EC C9 3E
0230 | 1A 52 24 FE 99 84 8C 6B 2C CC 45 52 8C 17 FF 25
0240 | 7F B8 B1 F2 74 ED 17 7B B1 73 44 DD 6D EB D6 0D
0250 | 3E C2 9A EC 9F D9 F0 E5 F6 7B 8E FD F1 C5 38 21
0260 | 5E 96 A8 9A 93 CE 70 15 BE F5 15 77 72 D2 69 5E
0270 | 30 8B 06 67 BA 25 90 14 26 DA A9 71 FE F8 0D D8
0280 | 62 E0 42 60 21 70 19 C3 D9 B2 05 14</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 04 79 93 3A 2D 84 66
0010 | C8 02 00 00 5C 07 E8 D0 1A 94 A9 17 FE BC 44 54
0020 | 8A E7 C4 3D 89 59 88 62 43 F0 01 27 70 6C 84 C2
0030 | D5 A5 4D 2F F3 BB 47 F9 FE 50 02 00 9F 71 96 CC
0040 | 99 47 24 2B 88 D5 63 D4 73 59 25 5E A9 4B D7 6A
0050 | 39 86 8C CC 18 CA 61 31 93 F9 AE 1A 24 45 2A 51
0060 | 8E 16 6F ED 71 99 C7 96 BF 9F 87 6A 50 FD 02 A3
0070 | 18 1F 50 46 09 9D 5F E6 10 6A FB AC CB 27 F3 0F
0080 | 3D B7 05 6C D3 27 95 DE 32 49 1C 4C 91 E4 DE 5A
0090 | C9 D1 89 8E CC DA 48 14 8C E5 91 D7 81 61 E7 58
00A0 | 64 59 7A 07 E6 C6 88 57 8C 84 4E 40 FE 33 2C 5C
00B0 | 9B AE 43 85 80 0A E9 B8 59 5A AD 19 C5 2E 7F 1E
00C0 | 1F A1 2E C1 0F E8 D0 47 F8 39 C2 7D 88 36 29 47
00D0 | 63 96 45 F0 5D C1 67 7A BB 34 97 97 2E 82 45 49
00E0 | ED CB 4B 92 3B 00 67 FA 07 AF E4 74 BC B0 30 AE
00F0 | D0 F2 62 C9 03 FB B4 6F 9D BE F0 71 74 0B B2 16
0100 | 2B A1 C3 A1 CB CA BD 6D FC 61 03 ED 36 BA C2 30
0110 | 09 82 C6 54 07 E0 7F 38 EF 98 EC AA 94 A7 30 EA
0120 | 3A 31 61 5C F5 17 B8 C9 90 F0 86 B4 1B 6F 0C B4
0130 | 7A 7C 62 47 E3 EB AB 01 5C 7E F3 3E E4 C8 D6 FD
0140 | D4 42 F5 7F 55 BB 53 AC 3E 29 C0 31 C3 25 6E 03
0150 | 82 21 0E 5D A2 D6 1A 29 93 33 1F DC 5E E9 EB 1E
0160 | 55 21 09 AE 6D 25 5A 0E C8 47 5D 62 B4 20 57 B3
0170 | 21 7C 14 F1 C5 78 37 B2 95 A7 44 51 37 AF 56 12
0180 | 76 03 23 2F BA 95 CF 6B D4 60 36 FE F1 B8 F7 45
0190 | 38 BE CE 9A AC 28 7E 17 C8 47 B0 75 DC D7 41 D6
01A0 | 4A 82 34 A1 88 36 8D 67 2C 61 69 30 13 24 A9 A3
01B0 | B4 40 05 74 8E 50 51 34 6E 72 AE E2 1D 04 CD 64
01C0 | DD EB 50 A0 7A 99 48 35 68 02 6D 17 44 DF 21 C5
01D0 | 1A BC 3F 12 F9 20 5A E2 65 C5 61 DA A3 96 A2 46
01E0 | 6D C8 B0 FB FF D2 49 F2 10 60 C2 E1 2E D0 64 C8
01F0 | 9B 63 0E F6 60 57 CA 1A 1E 01 26 7A 19 8A 74 CE
0200 | B6 22 96 F1 A7 8C C5 CC 8F A0 E0 A3 45 C8 E0 86
0210 | 43 F6 2C 46 EC A8 14 3C 40 7F 31 3E 28 A0 8B 96
0220 | 79 11 B6 A4 72 47 8C F1 A9 D2 28 2F BB E2 91 CB
0230 | A8 E9 72 5D 01 0F 52 69 B3 42 F6 82 98 9F D5 3A
0240 | F8 0F D9 B0 4E F7 4C 54 7F 2B 0B 26 A3 6D C1 98
0250 | 99 E6 61 C3 51 FB 53 2E 23 A0 BE DB 3E 30 8B 82
0260 | EF 16 FF 39 56 63 86 8E 94 28 4C AF 55 E7 72 4F
0270 | BC 2A AB 12 91 C8 10 82 F4 C7 35 C8 23 F3 56 47
0280 | 11 EB 65 3E 57 88 9A AF 9A 41 B3 02</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
<table class="table">
@ -464,13 +464,13 @@ random_padding_bytes = BE1E7AF322DC5469119552CDAAC4E19E0BA6D3A0924C30F0AF570911F
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>0154DB5ED3838166</code></td>
<td><code>010479933A2D8466</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>A4020000</code> (676 in decimal)</td>
<td><code>C8020000</code> (712 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = BE1E7AF322DC5469119552CDAAC4E19E0BA6D3A0924C30F0AF570911F
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>B6C53969CAC23B767DBDE0BA504CD1B3</code></td>
<td><code>1A94A917FEBC44548AE7C43D89598862</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>AB8638EB10E1A39A34AB3FE5D7D3EF4E</code></td>
<td><code>43F00127706C84C2D5A54D2FF3BB47F9</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200F2FC6FD64963148B3626C550</code> <code>9548461A126C549F4D6321CAC1214665</code> <code>260AEBD4A9DFB1AF8926627A97433BE7</code> <code>B4EB620C2B2223374B72BE5EBB5FAE6C</code> <code>6A3030D0A09F80B6E358C9F5ABD0159B</code> <code>6177BFACBCB758E8877EE46E8B16DABF</code> <code>6E35EA41B4A7462C34BD7E8D2C5AD661</code> <code>74DC0A87DFE3206F3FCD5DC8FB98D67B</code> <code>540BB3ACF90E6472C7E1010EA083BDE7</code> <code>0BE9DA62D5F53C20E48791B3118B4DD1</code> <code>4A70AAEF821D08C6D4D6E78B4D295FB1</code> <code>9AAC7E62AF0F02A1ED530391BB53DC68</code> <code>AF7D1FF00E22247FD0345F99DFF2FC9C</code> <code>B58FA4D0CF7A5499987C9A701E3FC10E</code> <code>5605F649F3A7C96B86E95E724A3C5D46</code> <code>81C2B9978EA1672D1B71DD69CCE95598</code> <code>B8FD2897F04C12C9D787147AA2738551</code> <code>DC54CF78AB758D57D3CA618AAAB7E3A3</code> <code>A1EAAD40FB0530B70F918F4D1552B031</code> <code>1C54DE5C85B356ED30C399FA037F098D</code> <code>ABC21EEBA69F5C8DF5DB7774075199F7</code> <code>7D19BF74D732EE6D4E63A02640C36B16</code> <code>26B43958E867A302203745ED10FB7BE8</code> <code>688532FE22CD98C02E76424850C66877</code> <code>5A3CFD118429714C283F83063D368826</code> <code>5CAE040E4A6CF353778E945EA0EAE74B</code> <code>6C3DF491B5DCA84A433944E304CF70D3</code> <code>5CCCDDE59FF2884DC62135BF5B8F8998</code> <code>16172B44BDDD987774D7561FD336FB11</code> <code>96DDAD6CBB8DD5B54C7B84B4147B5973</code> <code>FDF40509199E896900A6018CA574AFCD</code> <code>18DAEA8EADECC93E1A5224FE99848C6B</code> <code>2CCC45528C17FF257FB8B1F274ED177B</code> <code>B17344DD6DEBD60D3EC29AEC9FD9F0E5</code> <code>F67B8EFDF1C538215E96A89A93CE7015</code> <code>BEF5157772D2695E308B0667BA259014</code> <code>26DAA971FEF80DD862E04260217019C3</code><br> <code>D9B20514</code></td>
<td><code>FE5002009F7196CC9947242B88D563D4</code> <code>7359255EA94BD76A39868CCC18CA6131</code> <code>93F9AE1A24452A518E166FED7199C796</code> <code>BF9F876A50FD02A3181F5046099D5FE6</code> <code>106AFBACCB27F30F3DB7056CD32795DE</code> <code>32491C4C91E4DE5AC9D1898ECCDA4814</code> <code>8CE591D78161E75864597A07E6C68857</code> <code>8C844E40FE332C5C9BAE4385800AE9B8</code> <code>595AAD19C52E7F1E1FA12EC10FE8D047</code> <code>F839C27D88362947639645F05DC1677A</code> <code>BB3497972E824549EDCB4B923B0067FA</code> <code>07AFE474BCB030AED0F262C903FBB46F</code> <code>9DBEF071740BB2162BA1C3A1CBCABD6D</code> <code>FC6103ED36BAC2300982C65407E07F38</code> <code>EF98ECAA94A730EA3A31615CF517B8C9</code> <code>90F086B41B6F0CB47A7C6247E3EBAB01</code> <code>5C7EF33EE4C8D6FDD442F57F55BB53AC</code> <code>3E29C031C3256E0382210E5DA2D61A29</code> <code>93331FDC5EE9EB1E552109AE6D255A0E</code> <code>C8475D62B42057B3217C14F1C57837B2</code> <code>95A7445137AF56127603232FBA95CF6B</code> <code>D46036FEF1B8F74538BECE9AAC287E17</code> <code>C847B075DCD741D64A8234A188368D67</code> <code>2C6169301324A9A3B44005748E505134</code> <code>6E72AEE21D04CD64DDEB50A07A994835</code> <code>68026D1744DF21C51ABC3F12F9205AE2</code> <code>65C561DAA396A2466DC8B0FBFFD249F2</code> <code>1060C2E12ED064C89B630EF66057CA1A</code> <code>1E01267A198A74CEB62296F1A78CC5CC</code> <code>8FA0E0A345C8E08643F62C46ECA8143C</code> <code>407F313E28A08B967911B6A472478CF1</code> <code>A9D2282FBBE291CBA8E9725D010F5269</code> <code>B342F682989FD53AF80FD9B04EF74C54</code> <code>7F2B0B26A36DC19899E661C351FB532E</code> <code>23A0BEDB3E308B82EF16FF395663868E</code> <code>94284CAF55E7724FBC2AAB1291C81082</code> <code>F4C735C823F3564711EB653E57889AAF</code><br> <code>9A41B302</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = BE1E7AF322DC5469119552CDAAC4E19E0BA6D3A0924C30F0AF570911F
<!-- 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 = F2FC6FD64963148B3626C5509548461A126C549F4D6321CAC1214665260AEBD4A9DFB1AF8926627A97433BE7B4EB620C2B2223374B72BE5EBB5FAE6C6A3030D0A09F80B6E358C9F5ABD0159B6177BFACBCB758E8877EE46E8B16DABF6E35EA41B4A7462C34BD7E8D2C5AD66174DC0A87DFE3206F3FCD5DC8FB98D67B540BB3ACF90E6472C7E1010EA083BDE70BE9DA62D5F53C20E48791B3118B4DD14A70AAEF821D08C6D4D6E78B4D295FB19AAC7E62AF0F02A1ED530391BB53DC68AF7D1FF00E22247FD0345F99DFF2FC9CB58FA4D0CF7A5499987C9A701E3FC10E5605F649F3A7C96B86E95E724A3C5D4681C2B9978EA1672D1B71DD69CCE95598B8FD2897F04C12C9D787147AA2738551DC54CF78AB758D57D3CA618AAAB7E3A3A1EAAD40FB0530B70F918F4D1552B0311C54DE5C85B356ED30C399FA037F098DABC21EEBA69F5C8DF5DB7774075199F77D19BF74D732EE6D4E63A02640C36B1626B43958E867A302203745ED10FB7BE8688532FE22CD98C02E76424850C668775A3CFD118429714C283F83063D3688265CAE040E4A6CF353778E945EA0EAE74B6C3DF491B5DCA84A433944E304CF70D35CCCDDE59FF2884DC62135BF5B8F899816172B44BDDD987774D7561FD336FB1196DDAD6CBB8DD5B54C7B84B4147B5973FDF40509199E896900A6018CA574AFCD18DAEA8EADECC93E1A5224FE99848C6B2CCC45528C17FF257FB8B1F274ED177BB17344DD6DEBD60D3EC29AEC9FD9F0E5F67B8EFDF1C538215E96A89A93CE7015BEF5157772D2695E308B0667BA25901426DAA971FEF80DD862E04260217019C3D9B20514
tmp_aes_key = EE0B1BD660F6EEC2DDC586D82362C0FD7DC598459F48B24931FA129EBE69429E
tmp_aes_iv = BDECCAD167829B48F905346F28C1AE3636996022E0B714CDBCEEDA32C19FD53B</code></pre>
<pre><code>encrypted_answer = 9F7196CC9947242B88D563D47359255EA94BD76A39868CCC18CA613193F9AE1A24452A518E166FED7199C796BF9F876A50FD02A3181F5046099D5FE6106AFBACCB27F30F3DB7056CD32795DE32491C4C91E4DE5AC9D1898ECCDA48148CE591D78161E75864597A07E6C688578C844E40FE332C5C9BAE4385800AE9B8595AAD19C52E7F1E1FA12EC10FE8D047F839C27D88362947639645F05DC1677ABB3497972E824549EDCB4B923B0067FA07AFE474BCB030AED0F262C903FBB46F9DBEF071740BB2162BA1C3A1CBCABD6DFC6103ED36BAC2300982C65407E07F38EF98ECAA94A730EA3A31615CF517B8C990F086B41B6F0CB47A7C6247E3EBAB015C7EF33EE4C8D6FDD442F57F55BB53AC3E29C031C3256E0382210E5DA2D61A2993331FDC5EE9EB1E552109AE6D255A0EC8475D62B42057B3217C14F1C57837B295A7445137AF56127603232FBA95CF6BD46036FEF1B8F74538BECE9AAC287E17C847B075DCD741D64A8234A188368D672C6169301324A9A3B44005748E5051346E72AEE21D04CD64DDEB50A07A99483568026D1744DF21C51ABC3F12F9205AE265C561DAA396A2466DC8B0FBFFD249F21060C2E12ED064C89B630EF66057CA1A1E01267A198A74CEB62296F1A78CC5CC8FA0E0A345C8E08643F62C46ECA8143C407F313E28A08B967911B6A472478CF1A9D2282FBBE291CBA8E9725D010F5269B342F682989FD53AF80FD9B04EF74C547F2B0B26A36DC19899E661C351FB532E23A0BEDB3E308B82EF16FF395663868E94284CAF55E7724FBC2AAB1291C81082F4C735C823F3564711EB653E57889AAF9A41B302
tmp_aes_key = 7DA5236D64FC809C96A324DBD616FB2BD5EBFFC083EABEC2415AE73F9B3EF9A4
tmp_aes_iv = A8E1F607C11E6CAEB30BBDE6BC938A9A7755FA364D555B86DEFBB4FE24109E24</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 3701B963DDC954F1CAB7BFC17CCFF76294EFE32FBA0D89B5B6C53969CAC23B767DBDE0BA504CD1B3AB8638EB10E1A39A34AB3FE5D7D3EF4E03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002B9DBCA4375B06E03343525C47C6151CB6469D3326724882ABA76D9D435D898CAA7A8180D5D7EF45D3726096628265A89C949C46FF2E103DD43F742805CB66C12770C91CFD2D8BAF22CD6B57E753E3994142B71AD7155767D040B978337BB762D11519ECEE84CBF9B8790F1E1387B0BE8FEAB2D657D28CE562782238CD33D549275D41B6F2B514454BF1E7B9E0145238D92D3F0B51E59A4ED72B11E47B593D0644D7AFF00D493A6F92308AD8A2C891EDD028F363207CE4090F0521C291DB43E86AE304A6B482546366A227D2B951B4DDDDDC3CEABDA0C489C53AE6B5A10D57C9EC646E4E2A4A8D4AD05C738E94A473EC09C73055A2094A098BACCDF037E00A0CD3838166DECEA70BF529E8AF
answer = BA0D89B5B6C53969CAC23B767DBDE0BA504CD1B3AB8638EB10E1A39A34AB3FE5D7D3EF4E03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002B9DBCA4375B06E03343525C47C6151CB6469D3326724882ABA76D9D435D898CAA7A8180D5D7EF45D3726096628265A89C949C46FF2E103DD43F742805CB66C12770C91CFD2D8BAF22CD6B57E753E3994142B71AD7155767D040B978337BB762D11519ECEE84CBF9B8790F1E1387B0BE8FEAB2D657D28CE562782238CD33D549275D41B6F2B514454BF1E7B9E0145238D92D3F0B51E59A4ED72B11E47B593D0644D7AFF00D493A6F92308AD8A2C891EDD028F363207CE4090F0521C291DB43E86AE304A6B482546366A227D2B951B4DDDDDC3CEABDA0C489C53AE6B5A10D57C9EC646E4E2A4A8D4AD05C738E94A473EC09C73055A2094A098BACCDF037E00A0CD3838166DECEA70BF529E8AF</code></pre>
<pre><code>answer_with_hash = E7AC77ACCFDC82ACC3A81FCB9FC21975056BA4EBBA0D89B51A94A917FEBC44548AE7C43D8959886243F00127706C84C2D5A54D2FF3BB47F903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100A2597E432B73B4A3E13B8A814F27102C5ABE4AA8F4718DFC2D7E18DAA6896B0D9FAB2B044BC2F8DA7EFFC108DF28F7F4AF1420637E89482EF240D4D4C2EB7F2DD3BD05BEA485AD6AB942E5B6DEFF63897B4056305422B8F5BCD55FC1676E6A6FC033F8A9538F910351ED3432F2C6515A659AB26F9BBF3672C38C6B910D9CE00F501491BA029C15F95C9E84348EE386B788F104F6BB25F74DAA6CDE5FA7D49FCB656B9E921B84834C6A45AA9CF1C35A3C3C5A3093F80FD736711834D960C3207C7C87999AA4691F112A62F832FA57A9AAF43C2F8AACC7CC34A12E6EA88C30ECA08BA730D9C3E59E121892FE3B6B40F999304B5A8E27A0C0690F5F47DCD9D768913A2D84665A4105EA72EFC5EF
answer = BA0D89B51A94A917FEBC44548AE7C43D8959886243F00127706C84C2D5A54D2FF3BB47F903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100A2597E432B73B4A3E13B8A814F27102C5ABE4AA8F4718DFC2D7E18DAA6896B0D9FAB2B044BC2F8DA7EFFC108DF28F7F4AF1420637E89482EF240D4D4C2EB7F2DD3BD05BEA485AD6AB942E5B6DEFF63897B4056305422B8F5BCD55FC1676E6A6FC033F8A9538F910351ED3432F2C6515A659AB26F9BBF3672C38C6B910D9CE00F501491BA029C15F95C9E84348EE386B788F104F6BB25F74DAA6CDE5FA7D49FCB656B9E921B84834C6A45AA9CF1C35A3C3C5A3093F80FD736711834D960C3207C7C87999AA4691F112A62F832FA57A9AAF43C2F8AACC7CC34A12E6EA88C30ECA08BA730D9C3E59E121892FE3B6B40F999304B5A8E27A0C0690F5F47DCD9D768913A2D84665A4105EA72EFC5EF</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 B6 C5 39 69 CA C2 3B 76 7D BD E0 BA
0010 | 50 4C D1 B3 AB 86 38 EB 10 E1 A3 9A 34 AB 3F E5
0020 | D7 D3 EF 4E 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 1A 94 A9 17 FE BC 44 54 8A E7 C4 3D
0010 | 89 59 88 62 43 F0 01 27 70 6C 84 C2 D5 A5 4D 2F
0020 | F3 BB 47 F9 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 = BA0D89B5B6C53969CAC23B767DBDE0BA504CD1B3AB8638EB10E1A39A34AB3FE5D7D3EF4
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 | 2B 9D BC A4 37 5B 06 E0 33 43 52 5C 47 C6 15 1C
0140 | B6 46 9D 33 26 72 48 82 AB A7 6D 9D 43 5D 89 8C
0150 | AA 7A 81 80 D5 D7 EF 45 D3 72 60 96 62 82 65 A8
0160 | 9C 94 9C 46 FF 2E 10 3D D4 3F 74 28 05 CB 66 C1
0170 | 27 70 C9 1C FD 2D 8B AF 22 CD 6B 57 E7 53 E3 99
0180 | 41 42 B7 1A D7 15 57 67 D0 40 B9 78 33 7B B7 62
0190 | D1 15 19 EC EE 84 CB F9 B8 79 0F 1E 13 87 B0 BE
01A0 | 8F EA B2 D6 57 D2 8C E5 62 78 22 38 CD 33 D5 49
01B0 | 27 5D 41 B6 F2 B5 14 45 4B F1 E7 B9 E0 14 52 38
01C0 | D9 2D 3F 0B 51 E5 9A 4E D7 2B 11 E4 7B 59 3D 06
01D0 | 44 D7 AF F0 0D 49 3A 6F 92 30 8A D8 A2 C8 91 ED
01E0 | D0 28 F3 63 20 7C E4 09 0F 05 21 C2 91 DB 43 E8
01F0 | 6A E3 04 A6 B4 82 54 63 66 A2 27 D2 B9 51 B4 DD
0200 | DD DC 3C EA BD A0 C4 89 C5 3A E6 B5 A1 0D 57 C9
0210 | EC 64 6E 4E 2A 4A 8D 4A D0 5C 73 8E 94 A4 73 EC
0220 | 09 C7 30 55 A2 09 4A 09 8B AC CD F0 37 E0 0A 0C
0230 | D3 83 81 66</code></pre>
0130 | A2 59 7E 43 2B 73 B4 A3 E1 3B 8A 81 4F 27 10 2C
0140 | 5A BE 4A A8 F4 71 8D FC 2D 7E 18 DA A6 89 6B 0D
0150 | 9F AB 2B 04 4B C2 F8 DA 7E FF C1 08 DF 28 F7 F4
0160 | AF 14 20 63 7E 89 48 2E F2 40 D4 D4 C2 EB 7F 2D
0170 | D3 BD 05 BE A4 85 AD 6A B9 42 E5 B6 DE FF 63 89
0180 | 7B 40 56 30 54 22 B8 F5 BC D5 5F C1 67 6E 6A 6F
0190 | C0 33 F8 A9 53 8F 91 03 51 ED 34 32 F2 C6 51 5A
01A0 | 65 9A B2 6F 9B BF 36 72 C3 8C 6B 91 0D 9C E0 0F
01B0 | 50 14 91 BA 02 9C 15 F9 5C 9E 84 34 8E E3 86 B7
01C0 | 88 F1 04 F6 BB 25 F7 4D AA 6C DE 5F A7 D4 9F CB
01D0 | 65 6B 9E 92 1B 84 83 4C 6A 45 AA 9C F1 C3 5A 3C
01E0 | 3C 5A 30 93 F8 0F D7 36 71 18 34 D9 60 C3 20 7C
01F0 | 7C 87 99 9A A4 69 1F 11 2A 62 F8 32 FA 57 A9 AA
0200 | F4 3C 2F 8A AC C7 CC 34 A1 2E 6E A8 8C 30 EC A0
0210 | 8B A7 30 D9 C3 E5 9E 12 18 92 FE 3B 6B 40 F9 99
0220 | 30 4B 5A 8E 27 A0 C0 69 0F 5F 47 DC D9 D7 68 91
0230 | 3A 2D 84 66</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
<table class="table">
@ -570,13 +570,13 @@ answer = BA0D89B5B6C53969CAC23B767DBDE0BA504CD1B3AB8638EB10E1A39A34AB3FE5D7D3EF4
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>B6C53969CAC23B767DBDE0BA504CD1B3</code></td>
<td><code>1A94A917FEBC44548AE7C43D89598862</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>AB8638EB10E1A39A34AB3FE5D7D3EF4E</code></td>
<td><code>43F00127706C84C2D5A54D2FF3BB47F9</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B5B6C53969CAC23B767DBDE0BA504CD1B3AB8638EB10E1A39A34AB3FE5D7D3EF4
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE0001002B9DBCA4375B06E03343525C</code> <code>47C6151CB6469D3326724882ABA76D9D</code> <code>435D898CAA7A8180D5D7EF45D3726096</code> <code>628265A89C949C46FF2E103DD43F7428</code> <code>05CB66C12770C91CFD2D8BAF22CD6B57</code> <code>E753E3994142B71AD7155767D040B978</code> <code>337BB762D11519ECEE84CBF9B8790F1E</code> <code>1387B0BE8FEAB2D657D28CE562782238</code> <code>CD33D549275D41B6F2B514454BF1E7B9</code> <code>E0145238D92D3F0B51E59A4ED72B11E4</code> <code>7B593D0644D7AFF00D493A6F92308AD8</code> <code>A2C891EDD028F363207CE4090F0521C2</code> <code>91DB43E86AE304A6B482546366A227D2</code> <code>B951B4DDDDDC3CEABDA0C489C53AE6B5</code> <code>A10D57C9EC646E4E2A4A8D4AD05C738E</code> <code>94A473EC09C73055A2094A098BACCDF0</code><br> <code>37E00A0C</code></td>
<td><code>FE000100A2597E432B73B4A3E13B8A81</code> <code>4F27102C5ABE4AA8F4718DFC2D7E18DA</code> <code>A6896B0D9FAB2B044BC2F8DA7EFFC108</code> <code>DF28F7F4AF1420637E89482EF240D4D4</code> <code>C2EB7F2DD3BD05BEA485AD6AB942E5B6</code> <code>DEFF63897B4056305422B8F5BCD55FC1</code> <code>676E6A6FC033F8A9538F910351ED3432</code> <code>F2C6515A659AB26F9BBF3672C38C6B91</code> <code>0D9CE00F501491BA029C15F95C9E8434</code> <code>8EE386B788F104F6BB25F74DAA6CDE5F</code> <code>A7D49FCB656B9E921B84834C6A45AA9C</code> <code>F1C35A3C3C5A3093F80FD736711834D9</code> <code>60C3207C7C87999AA4691F112A62F832</code> <code>FA57A9AAF43C2F8AACC7CC34A12E6EA8</code> <code>8C30ECA08BA730D9C3E59E121892FE3B</code> <code>6B40F999304B5A8E27A0C0690F5F47DC</code><br> <code>D9D76891</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>D3838166</code> (1719763923 in decimal)</td>
<td><code>3A2D8466</code> (1719938362 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B5B6C53969CAC23B767DBDE0BA504CD1B3AB8638EB10E1A39A34AB3FE5D7D3EF4
<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 = C9FCFDFE9D9289E4D4AD596917D2EDAA96AEC88BC5F488F3D9F4F237AADAC8C951F21932BAFFE120911339CBC01D3954E71286033A349AF751DD06EA4A80F69D55385B800CB0526646237CAF05460DF2D78F85FCF3ABA7D19F04E48BB53FB9EB5802A2F7A8C961703710AEF5763B02D88BFC05BB8FE54EF8950665B2C93BD7F597115515F45015DA55C4F35B436E8B4AB065D02D9DE191EB6C717D47BA77D837DA6D03F36B5779CF013CB8FDC48475C8444B55FFC7B646025E325386332170EF2DA12B2882974CF78DFB369C207F77FBD9EE533D57EFE4FB94E706484D516FACFC22A0492E3C0D7F760F5C96CBF0628CF8662C0E56CB4B842682C9F0CB12484B</code></pre>
<pre><code>b = 7DC544D6B5C32ABEC8936F702B6E4D6C4458248958BE0089F1D291414048A473D369164ECCEB0F9B2B534BA9715CBCAA9B82E405CA177BF8881F0C87EECBA33DC996731703516C220067852E68518AD2A9EFE1BA1BA60FB7C2D4B42A3EBF26DA55F5ADF49AEE670E91A509EA2D46E8F71CACE8F8153D363943F9F0D6641B449B5E3419F9D3188DC4D4CF21C5240D417ACE861476CBAC4D4A0A22F08D0F07632EACD20AAB7C9570840ECCD9A36433573E7B5488FE4712076CFB3E85D3E59C0BA89E5CB61FE99656B74A613DC3B160AF55EF86371C372068815984A823116C92A431B0200F4A27471847D6BE99006EBF0F08A46DB382C9DEB4A54F6354051236AB</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 = 8C9BD983F0D20BE8511591C6D3A8AB9E6F808CCF3F5B4B07E8CAB290199F53A9CAFAC31CC49E7E57656BF1C29388984E086FDFC0BD94C6D77087C82569FA8AAA0E4FB4744C271B9C10CBAAF27EC018CDA3AFA09A2AEE0054D29CA399C76A5713E23A9C76A02F1F7215457D09C4251CBF19822977AB9F3E5C8EB660C9D9B2DA155B2F55AFE25DACF5D3E0680EB800F950E6493CFA85D92EEC0A614E0CFC2159107FDA61D287B018241BD55A625286E28CC70735A4B2C201E92D70DD627FC7528BD5ABB9D9E2D5CBA99171A47E1E21F9B1F7605EC1A62513ED1D7D3DE2CFD2D7206403F0E1B99864F59B3033FE15C74B4FC9673515043A0F9BB1178D8CCE4257DB</code></pre>
<pre><code>g_b = 85E5D61553B37EE260427F6761ECBAB0825DDA15C55F56EEEA25A466A35350EFFAB4A7C94D6584B04E205E7E73D8D3B6C1485DF7A8794F34134E6D2330A1A6C6703B1BEABEA84CF906CBE81A14AD727220F47A103636911C26F53405D6C9B017C86413DBFEE8E0B77A3D5A7E487396A90837D39AB2E9F6D3CF93AC9E5A1AC4BB836636D3F7F4629A1BCA297D019FD15D5090807AB408D82DD86612AEEBCA3C4FC4E4C51D77FB2C674D614E92F773C239FA9B792B995DFBA3D0F86713F1BCA9532D964AFBBA3282DF95E39BB68D149398100CD79330046161990E46453618840947E6D304BA138461C9398028049CF3C81374B89C540A48AE97F07EE8419CA1AA</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 B6 C5 39 69 CA C2 3B 76 7D BD E0 BA
0010 | 50 4C D1 B3 AB 86 38 EB 10 E1 A3 9A 34 AB 3F E5
0020 | D7 D3 EF 4E 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 8C 9B D9 83 F0 D2 0B E8 51 15 91 C6 D3 A8 AB 9E
0040 | 6F 80 8C CF 3F 5B 4B 07 E8 CA B2 90 19 9F 53 A9
0050 | CA FA C3 1C C4 9E 7E 57 65 6B F1 C2 93 88 98 4E
0060 | 08 6F DF C0 BD 94 C6 D7 70 87 C8 25 69 FA 8A AA
0070 | 0E 4F B4 74 4C 27 1B 9C 10 CB AA F2 7E C0 18 CD
0080 | A3 AF A0 9A 2A EE 00 54 D2 9C A3 99 C7 6A 57 13
0090 | E2 3A 9C 76 A0 2F 1F 72 15 45 7D 09 C4 25 1C BF
00A0 | 19 82 29 77 AB 9F 3E 5C 8E B6 60 C9 D9 B2 DA 15
00B0 | 5B 2F 55 AF E2 5D AC F5 D3 E0 68 0E B8 00 F9 50
00C0 | E6 49 3C FA 85 D9 2E EC 0A 61 4E 0C FC 21 59 10
00D0 | 7F DA 61 D2 87 B0 18 24 1B D5 5A 62 52 86 E2 8C
00E0 | C7 07 35 A4 B2 C2 01 E9 2D 70 DD 62 7F C7 52 8B
00F0 | D5 AB B9 D9 E2 D5 CB A9 91 71 A4 7E 1E 21 F9 B1
0100 | F7 60 5E C1 A6 25 13 ED 1D 7D 3D E2 CF D2 D7 20
0110 | 64 03 F0 E1 B9 98 64 F5 9B 30 33 FE 15 C7 4B 4F
0120 | C9 67 35 15 04 3A 0F 9B B1 17 8D 8C CE 42 57 DB</code></pre>
<pre><code>0000 | 54 B6 43 66 1A 94 A9 17 FE BC 44 54 8A E7 C4 3D
0010 | 89 59 88 62 43 F0 01 27 70 6C 84 C2 D5 A5 4D 2F
0020 | F3 BB 47 F9 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 85 E5 D6 15 53 B3 7E E2 60 42 7F 67 61 EC BA B0
0040 | 82 5D DA 15 C5 5F 56 EE EA 25 A4 66 A3 53 50 EF
0050 | FA B4 A7 C9 4D 65 84 B0 4E 20 5E 7E 73 D8 D3 B6
0060 | C1 48 5D F7 A8 79 4F 34 13 4E 6D 23 30 A1 A6 C6
0070 | 70 3B 1B EA BE A8 4C F9 06 CB E8 1A 14 AD 72 72
0080 | 20 F4 7A 10 36 36 91 1C 26 F5 34 05 D6 C9 B0 17
0090 | C8 64 13 DB FE E8 E0 B7 7A 3D 5A 7E 48 73 96 A9
00A0 | 08 37 D3 9A B2 E9 F6 D3 CF 93 AC 9E 5A 1A C4 BB
00B0 | 83 66 36 D3 F7 F4 62 9A 1B CA 29 7D 01 9F D1 5D
00C0 | 50 90 80 7A B4 08 D8 2D D8 66 12 AE EB CA 3C 4F
00D0 | C4 E4 C5 1D 77 FB 2C 67 4D 61 4E 92 F7 73 C2 39
00E0 | FA 9B 79 2B 99 5D FB A3 D0 F8 67 13 F1 BC A9 53
00F0 | 2D 96 4A FB BA 32 82 DF 95 E3 9B B6 8D 14 93 98
0100 | 10 0C D7 93 30 04 61 61 99 0E 46 45 36 18 84 09
0110 | 47 E6 D3 04 BA 13 84 61 C9 39 80 28 04 9C F3 C8
0120 | 13 74 B8 9C 54 0A 48 AE 97 F0 7E E8 41 9C A1 AA</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 = BA0D89B5B6C53969CAC23B767DBDE0BA504CD1B3AB8638EB10E1A39A34AB3FE5D7D3EF4
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>B6C53969CAC23B767DBDE0BA504CD1B3</code></td>
<td><code>1A94A917FEBC44548AE7C43D89598862</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>AB8638EB10E1A39A34AB3FE5D7D3EF4E</code></td>
<td><code>43F00127706C84C2D5A54D2FF3BB47F9</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE0001008C9BD983F0D20BE8511591C6</code> <code>D3A8AB9E6F808CCF3F5B4B07E8CAB290</code> <code>199F53A9CAFAC31CC49E7E57656BF1C2</code> <code>9388984E086FDFC0BD94C6D77087C825</code> <code>69FA8AAA0E4FB4744C271B9C10CBAAF2</code> <code>7EC018CDA3AFA09A2AEE0054D29CA399</code> <code>C76A5713E23A9C76A02F1F7215457D09</code> <code>C4251CBF19822977AB9F3E5C8EB660C9</code> <code>D9B2DA155B2F55AFE25DACF5D3E0680E</code> <code>B800F950E6493CFA85D92EEC0A614E0C</code> <code>FC2159107FDA61D287B018241BD55A62</code> <code>5286E28CC70735A4B2C201E92D70DD62</code> <code>7FC7528BD5ABB9D9E2D5CBA99171A47E</code> <code>1E21F9B1F7605EC1A62513ED1D7D3DE2</code> <code>CFD2D7206403F0E1B99864F59B3033FE</code> <code>15C74B4FC9673515043A0F9BB1178D8C</code><br> <code>CE4257DB</code></td>
<td><code>FE00010085E5D61553B37EE260427F67</code> <code>61ECBAB0825DDA15C55F56EEEA25A466</code> <code>A35350EFFAB4A7C94D6584B04E205E7E</code> <code>73D8D3B6C1485DF7A8794F34134E6D23</code> <code>30A1A6C6703B1BEABEA84CF906CBE81A</code> <code>14AD727220F47A103636911C26F53405</code> <code>D6C9B017C86413DBFEE8E0B77A3D5A7E</code> <code>487396A90837D39AB2E9F6D3CF93AC9E</code> <code>5A1AC4BB836636D3F7F4629A1BCA297D</code> <code>019FD15D5090807AB408D82DD86612AE</code> <code>EBCA3C4FC4E4C51D77FB2C674D614E92</code> <code>F773C239FA9B792B995DFBA3D0F86713</code> <code>F1BCA9532D964AFBBA3282DF95E39BB6</code> <code>8D149398100CD79330046161990E4645</code> <code>3618840947E6D304BA138461C9398028</code> <code>049CF3C81374B89C540A48AE97F07EE8</code><br> <code>419CA1AA</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 = BA0D89B5B6C53969CAC23B767DBDE0BA504CD1B3AB8638EB10E1A39A34AB3FE5D7D3EF4
<!-- 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 = 54B64366B6C53969CAC23B767DBDE0BA504CD1B3AB8638EB10E1A39A34AB3FE5D7D3EF4E0000000000000000FE0001008C9BD983F0D20BE8511591C6D3A8AB9E6F808CCF3F5B4B07E8CAB290199F53A9CAFAC31CC49E7E57656BF1C29388984E086FDFC0BD94C6D77087C82569FA8AAA0E4FB4744C271B9C10CBAAF27EC018CDA3AFA09A2AEE0054D29CA399C76A5713E23A9C76A02F1F7215457D09C4251CBF19822977AB9F3E5C8EB660C9D9B2DA155B2F55AFE25DACF5D3E0680EB800F950E6493CFA85D92EEC0A614E0CFC2159107FDA61D287B018241BD55A625286E28CC70735A4B2C201E92D70DD627FC7528BD5ABB9D9E2D5CBA99171A47E1E21F9B1F7605EC1A62513ED1D7D3DE2CFD2D7206403F0E1B99864F59B3033FE15C74B4FC9673515043A0F9BB1178D8CCE4257DB
padding = 7FEB2EFE54922BEF9F0010B6
tmp_aes_key = EE0B1BD660F6EEC2DDC586D82362C0FD7DC598459F48B24931FA129EBE69429E
tmp_aes_iv = BDECCAD167829B48F905346F28C1AE3636996022E0B714CDBCEEDA32C19FD53B</code></pre>
<pre><code>data = 54B643661A94A917FEBC44548AE7C43D8959886243F00127706C84C2D5A54D2FF3BB47F90000000000000000FE00010085E5D61553B37EE260427F6761ECBAB0825DDA15C55F56EEEA25A466A35350EFFAB4A7C94D6584B04E205E7E73D8D3B6C1485DF7A8794F34134E6D2330A1A6C6703B1BEABEA84CF906CBE81A14AD727220F47A103636911C26F53405D6C9B017C86413DBFEE8E0B77A3D5A7E487396A90837D39AB2E9F6D3CF93AC9E5A1AC4BB836636D3F7F4629A1BCA297D019FD15D5090807AB408D82DD86612AEEBCA3C4FC4E4C51D77FB2C674D614E92F773C239FA9B792B995DFBA3D0F86713F1BCA9532D964AFBBA3282DF95E39BB68D149398100CD79330046161990E46453618840947E6D304BA138461C9398028049CF3C81374B89C540A48AE97F07EE8419CA1AA
padding = 23D9CED845AD58F83C312CDF
tmp_aes_key = 7DA5236D64FC809C96A324DBD616FB2BD5EBFFC083EABEC2415AE73F9B3EF9A4
tmp_aes_iv = A8E1F607C11E6CAEB30BBDE6BC938A9A7755FA364D555B86DEFBB4FE24109E24</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 = 508C0B1918E1A7A9CF80029CE804FD1B040C6A3446A2A7A85E37ED36E8630B2B42A44853E5DE04D602C80BEFA017FABD5DB169B16DC10AF0FAA52D8BC1EECE56604457D18D2ECAB44C7D36C86480CF76BDA15BCEAE6E4AB0C079860F634DB779EFBA4369B61979E92D61DCC5AA3F9EB782739A8E8468AC722EF90B0C1EE5F5F77751CCF81C5B52BC276F95954B64B434A452EDE1C0390777006C9F1143B0863FE1496DD6B6C4063DD8E6AAC4708F94122801B5546F274D2C66A3BB7927F4DECE2AFA93ED9C23D72E452A4477DF95941BE5E41DED17D0993A90C64DF39C8991BEC2837018DF5976A7A95FC58696F1CF95356AF8FD837C8BA05961B2AA7B49DE6FE60FC6444D57EFCC14E6C67A1AD3F08A707B521E9991ADF501EAD0CED37BA2F48CDEAFCB72A7B95A6440955B8057BE5EABFC5635EF08F48801D04552DF979098F707E7449E760AFA58BF32D773710EF6</code></pre>
<pre><code>encrypted_data = C37CEF5A60678B6CF63BF90D4CCE31176C464A1D496F03F9FB1551F4F8B8F59E7202647593C3F1AFA548D08F248BC4BA06DC7DFF7FD1433D5110076B805D0FD43D3DF5B7872BED15ECB100B6C17F85EF7293B23E7F734F581695D547561E94703F61E7E094817135D0A9772D7E9911B78B64556066EFC57E3A4E02975A9ADB468DCC8EB0D094E825CFFF1379EA57C89A195A3F4879BAA2E1EBAB38DE74D1B65D902CD6F0A0D03013D90D227DA51402304A1A2577D1D0EB48166C5C9382E2999261C3ACDFD1C04F470A043BDE07365D41381F81D514D5FC6AD77C816D09B8A3777C495938BF2ED70C63A818CC399D8BA47208FEA5668FD99ED42A7074E87D8A2DA48527F1D5746B44D46182656D353D0EC47B2F034ED1CEAC1E3E05D793098B878D95701A2A2432BBFDF5DAFD2C166DE39B6E9B19AD60B71CA47D66D5AD6712A9431A6AECA4880C82D937B869EE5DA26A</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 A8 23 09 00 D3 83 81 66
0010 | 78 01 00 00 1F 5F 04 F5 B6 C5 39 69 CA C2 3B 76
0020 | 7D BD E0 BA 50 4C D1 B3 AB 86 38 EB 10 E1 A3 9A
0030 | 34 AB 3F E5 D7 D3 EF 4E FE 50 01 00 50 8C 0B 19
0040 | 18 E1 A7 A9 CF 80 02 9C E8 04 FD 1B 04 0C 6A 34
0050 | 46 A2 A7 A8 5E 37 ED 36 E8 63 0B 2B 42 A4 48 53
0060 | E5 DE 04 D6 02 C8 0B EF A0 17 FA BD 5D B1 69 B1
0070 | 6D C1 0A F0 FA A5 2D 8B C1 EE CE 56 60 44 57 D1
0080 | 8D 2E CA B4 4C 7D 36 C8 64 80 CF 76 BD A1 5B CE
0090 | AE 6E 4A B0 C0 79 86 0F 63 4D B7 79 EF BA 43 69
00A0 | B6 19 79 E9 2D 61 DC C5 AA 3F 9E B7 82 73 9A 8E
00B0 | 84 68 AC 72 2E F9 0B 0C 1E E5 F5 F7 77 51 CC F8
00C0 | 1C 5B 52 BC 27 6F 95 95 4B 64 B4 34 A4 52 ED E1
00D0 | C0 39 07 77 00 6C 9F 11 43 B0 86 3F E1 49 6D D6
00E0 | B6 C4 06 3D D8 E6 AA C4 70 8F 94 12 28 01 B5 54
00F0 | 6F 27 4D 2C 66 A3 BB 79 27 F4 DE CE 2A FA 93 ED
0100 | 9C 23 D7 2E 45 2A 44 77 DF 95 94 1B E5 E4 1D ED
0110 | 17 D0 99 3A 90 C6 4D F3 9C 89 91 BE C2 83 70 18
0120 | DF 59 76 A7 A9 5F C5 86 96 F1 CF 95 35 6A F8 FD
0130 | 83 7C 8B A0 59 61 B2 AA 7B 49 DE 6F E6 0F C6 44
0140 | 4D 57 EF CC 14 E6 C6 7A 1A D3 F0 8A 70 7B 52 1E
0150 | 99 91 AD F5 01 EA D0 CE D3 7B A2 F4 8C DE AF CB
0160 | 72 A7 B9 5A 64 40 95 5B 80 57 BE 5E AB FC 56 35
0170 | EF 08 F4 88 01 D0 45 52 DF 97 90 98 F7 07 E7 44
0180 | 9E 76 0A FA 58 BF 32 D7 73 71 0E F6</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C8 EE 0B 00 3A 2D 84 66
0010 | 78 01 00 00 1F 5F 04 F5 1A 94 A9 17 FE BC 44 54
0020 | 8A E7 C4 3D 89 59 88 62 43 F0 01 27 70 6C 84 C2
0030 | D5 A5 4D 2F F3 BB 47 F9 FE 50 01 00 C3 7C EF 5A
0040 | 60 67 8B 6C F6 3B F9 0D 4C CE 31 17 6C 46 4A 1D
0050 | 49 6F 03 F9 FB 15 51 F4 F8 B8 F5 9E 72 02 64 75
0060 | 93 C3 F1 AF A5 48 D0 8F 24 8B C4 BA 06 DC 7D FF
0070 | 7F D1 43 3D 51 10 07 6B 80 5D 0F D4 3D 3D F5 B7
0080 | 87 2B ED 15 EC B1 00 B6 C1 7F 85 EF 72 93 B2 3E
0090 | 7F 73 4F 58 16 95 D5 47 56 1E 94 70 3F 61 E7 E0
00A0 | 94 81 71 35 D0 A9 77 2D 7E 99 11 B7 8B 64 55 60
00B0 | 66 EF C5 7E 3A 4E 02 97 5A 9A DB 46 8D CC 8E B0
00C0 | D0 94 E8 25 CF FF 13 79 EA 57 C8 9A 19 5A 3F 48
00D0 | 79 BA A2 E1 EB AB 38 DE 74 D1 B6 5D 90 2C D6 F0
00E0 | A0 D0 30 13 D9 0D 22 7D A5 14 02 30 4A 1A 25 77
00F0 | D1 D0 EB 48 16 6C 5C 93 82 E2 99 92 61 C3 AC DF
0100 | D1 C0 4F 47 0A 04 3B DE 07 36 5D 41 38 1F 81 D5
0110 | 14 D5 FC 6A D7 7C 81 6D 09 B8 A3 77 7C 49 59 38
0120 | BF 2E D7 0C 63 A8 18 CC 39 9D 8B A4 72 08 FE A5
0130 | 66 8F D9 9E D4 2A 70 74 E8 7D 8A 2D A4 85 27 F1
0140 | D5 74 6B 44 D4 61 82 65 6D 35 3D 0E C4 7B 2F 03
0150 | 4E D1 CE AC 1E 3E 05 D7 93 09 8B 87 8D 95 70 1A
0160 | 2A 24 32 BB FD F5 DA FD 2C 16 6D E3 9B 6E 9B 19
0170 | AD 60 B7 1C A4 7D 66 D5 AD 67 12 A9 43 1A 6A EC
0180 | A4 88 0C 82 D9 37 B8 69 EE 5D A2 6A</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>A8230900D3838166</code></td>
<td><code>C8EE0B003A2D8466</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>B6C53969CAC23B767DBDE0BA504CD1B3</code></td>
<td><code>1A94A917FEBC44548AE7C43D89598862</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>AB8638EB10E1A39A34AB3FE5D7D3EF4E</code></td>
<td><code>43F00127706C84C2D5A54D2FF3BB47F9</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100508C0B1918E1A7A9CF80029C</code> <code>E804FD1B040C6A3446A2A7A85E37ED36</code> <code>E8630B2B42A44853E5DE04D602C80BEF</code> <code>A017FABD5DB169B16DC10AF0FAA52D8B</code> <code>C1EECE56604457D18D2ECAB44C7D36C8</code> <code>6480CF76BDA15BCEAE6E4AB0C079860F</code> <code>634DB779EFBA4369B61979E92D61DCC5</code> <code>AA3F9EB782739A8E8468AC722EF90B0C</code> <code>1EE5F5F77751CCF81C5B52BC276F9595</code> <code>4B64B434A452EDE1C0390777006C9F11</code> <code>43B0863FE1496DD6B6C4063DD8E6AAC4</code> <code>708F94122801B5546F274D2C66A3BB79</code> <code>27F4DECE2AFA93ED9C23D72E452A4477</code> <code>DF95941BE5E41DED17D0993A90C64DF3</code> <code>9C8991BEC2837018DF5976A7A95FC586</code> <code>96F1CF95356AF8FD837C8BA05961B2AA</code> <code>7B49DE6FE60FC6444D57EFCC14E6C67A</code> <code>1AD3F08A707B521E9991ADF501EAD0CE</code> <code>D37BA2F48CDEAFCB72A7B95A6440955B</code> <code>8057BE5EABFC5635EF08F48801D04552</code> <code>DF979098F707E7449E760AFA58BF32D7</code><br> <code>73710EF6</code></td>
<td><code>FE500100C37CEF5A60678B6CF63BF90D</code> <code>4CCE31176C464A1D496F03F9FB1551F4</code> <code>F8B8F59E7202647593C3F1AFA548D08F</code> <code>248BC4BA06DC7DFF7FD1433D5110076B</code> <code>805D0FD43D3DF5B7872BED15ECB100B6</code> <code>C17F85EF7293B23E7F734F581695D547</code> <code>561E94703F61E7E094817135D0A9772D</code> <code>7E9911B78B64556066EFC57E3A4E0297</code> <code>5A9ADB468DCC8EB0D094E825CFFF1379</code> <code>EA57C89A195A3F4879BAA2E1EBAB38DE</code> <code>74D1B65D902CD6F0A0D03013D90D227D</code> <code>A51402304A1A2577D1D0EB48166C5C93</code> <code>82E2999261C3ACDFD1C04F470A043BDE</code> <code>07365D41381F81D514D5FC6AD77C816D</code> <code>09B8A3777C495938BF2ED70C63A818CC</code> <code>399D8BA47208FEA5668FD99ED42A7074</code> <code>E87D8A2DA48527F1D5746B44D4618265</code> <code>6D353D0EC47B2F034ED1CEAC1E3E05D7</code> <code>93098B878D95701A2A2432BBFDF5DAFD</code> <code>2C166DE39B6E9B19AD60B71CA47D66D5</code> <code>AD6712A9431A6AECA4880C82D937B869</code><br> <code>EE5DA26A</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 = 8068CC1E5D3E489121075007C26FE0218AC05C2A9D3161AC3EDE53B0E9C3FEC3029FCDDD9DF3339C726789035EA50E58D059B851C2933627274B833242B00E02E9DEA5B58BB70BF059120C748CB32C091E216DE2844A3F90E8709CFA3A7978B06BAB9C252472273F0E7B355721B43A614B7C8E99DC120D66FAE1206A4489F660ECB071BD9D64656FA595593201C423EA4360DFED5BC773689F7013ED5EF0EEEE11953E1F765B61F133AA8E42D8E08590338AEF0A44B7B91DAE017384C768EBB8C4FF747100959AEC231DF914CEDAD848AB3640AD28782C8C1F7A7867630B424612FDAD2F7FF5089C676B90935BE95AF90140E035B9CBBD51854E545A0F1EDC33</code></pre>
<pre><code>auth_key = 3012C0DC69550576E606CEE1E158B0FD048BA9B8887F763EDE7E9F3EE723C4976AAA60265B790724E80447DB3717A7C4E54E36F41F0BC122F64E4A3E84F8F7CE43DE304DD8843B33AF5963A7A227C334A992EF20FA2D859D486685A9CCB2A0365B315319C4723441E47A592E0A6D61AD3C697FE1431B9AB28DD4FD247A812CF8F46C684B53C72237E8A8B27BBD101FBFE5693BF956396405A8AE2A480952F651755E5927076B61043172B49868E5F6DA563A3C6A0E160F2FDB6EB43740B30C8A609A8655CE11495D496651944A6E2712208945D781708C1A5CCE8ED36A2D67A19D459A2A9197DFE53ED00C121C849CE265A95584B25832948B86E5520BB39E01</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 40 F6 56 D4 83 81 66
0010 | A4 00 00 00 34 F7 CB 3B B6 C5 39 69 CA C2 3B 76
0020 | 7D BD E0 BA 50 4C D1 B3 AB 86 38 EB 10 E1 A3 9A
0030 | 34 AB 3F E5 D7 D3 EF 4E 17 46 D9 F1 6E 61 FB 81
0040 | 93 77 10 E9 AB 36 BE 09</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 98 5E E7 3B 2D 84 66
0010 | 54 00 00 00 34 F7 CB 3B 1A 94 A9 17 FE BC 44 54
0020 | 8A E7 C4 3D 89 59 88 62 43 F0 01 27 70 6C 84 C2
0030 | D5 A5 4D 2F F3 BB 47 F9 70 43 69 20 E2 CA 04 8F
0040 | 3B 30 63 BF 54 29 2E 89</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>0140F656D4838166</code></td>
<td><code>01985EE73B2D8466</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>A4000000</code> (164 in decimal)</td>
<td><code>54000000</code> (84 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>B6C53969CAC23B767DBDE0BA504CD1B3</code></td>
<td><code>1A94A917FEBC44548AE7C43D89598862</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>AB8638EB10E1A39A34AB3FE5D7D3EF4E</code></td>
<td><code>43F00127706C84C2D5A54D2FF3BB47F9</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>1746D9F16E61FB81937710E9AB36BE09</code></td>
<td><code>70436920E2CA048F3B3063BF54292E89</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

@ -956,7 +956,7 @@
</tr>
<tr>
<td><a href="/method/account.disablePeerConnectedBot">account.disablePeerConnectedBot</a></td>
<td> </td>
<td>Permanently disconnect a specific chat from all <a href="/api/business#connected-bots">business bots »</a> (equivalent to specifying it in <code>recipients.exclude_users</code> during initial configuration with <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.updateBirthday">account.updateBirthday</a></td>

View file

@ -106,15 +106,15 @@ Adds a user…">
<tbody>
<tr>
<td><a href="/method/messages.addChatUser">messages.addChatUser</a></td>
<td>Adds a user to a chat and sends a service message on it.<br><br>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</td>
<td>Adds a user to a chat and sends a service message on it.</td>
</tr>
<tr>
<td><a href="/method/messages.createChat">messages.createChat</a></td>
<td>Creates a new chat.<br><br>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</td>
<td>Creates a new chat.</td>
</tr>
<tr>
<td><a href="/method/channels.inviteToChannel">channels.inviteToChannel</a></td>
<td>Invite users to a channel/supergroup<br><br>May also return 0-N updates of type <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</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.</td>
<td>Invite users to a channel/supergroup</td>
</tr>
</tbody>
</table></div>