Update content of files

This commit is contained in:
GitHub Action 2023-10-26 15:20:11 +00:00
parent a155ee0386
commit 2e370c95da
27 changed files with 267 additions and 264 deletions

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>Action-bar</title>
<title>Action bar</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Sometimes, when interacting with Telegram users via private or secret chats, an action bar must be shown on top of the">
<meta property="og:title" content="Action-bar">
<meta property="description" content="Sometimes, when interacting with Telegram users via private or secret chats, an action bar must be shown on top of the chat, offering convenient action buttons or notices regarding the user.">
<meta property="og:title" content="Action bar">
<meta property="og:image" content="">
<meta property="og:description" content="Sometimes, when interacting with Telegram users via private or secret chats, an action bar must be shown on top of the">
<meta property="og:description" content="Sometimes, when interacting with Telegram users via private or secret chats, an action bar must be shown on top of the chat, offering convenient action buttons or notices regarding the user.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -39,8 +39,8 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/action-bar" >Action-bar</a></li></ul></div>
<h1 id="dev_page_title">Action-bar</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/action-bar" >Action bar</a></li></ul></div>
<h1 id="dev_page_title">Action bar</h1>
<div id="dev_page_content"><!-- scroll_nav -->
@ -92,7 +92,6 @@ Optionally, the <a href="/constructor/peerSettings">peerSettings</a>.<code>need_
<p><strong>Condition</strong>: the <a href="/constructor/peerSettings">peerSettings</a>.<code>report_spam</code> flag must be set, and the <a href="/constructor/peerSettings">peerSettings</a>.<code>add_contact</code>, <a href="/constructor/peerSettings">peerSettings</a>.<code>block_contact</code> flags must <strong>not</strong> be set.</p>
<p>Additionally, if the chat was automatically <a href="/api/folders#peer-folders">archived »</a> (according to <a href="/constructor/peerSettings">peerSettings</a>.<code>autoarchived</code>), an extra button can be shown to unarchive the chat <a href="/api/folders#peer-folders">as specified here »</a> instead of reporting it.</p>
<h2><a class="anchor" href="#add-contact" id="add-contact" name="add-contact"><i class="anchor-icon"></i></a>Add contact</h2>
<p>Schema:</p>
<pre><code>---functions---
<a href='/method/contacts.addContact'>contacts.addContact</a>#e8f463d0 flags:<a href='/type/%23'>#</a> add_phone_privacy_exception:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/InputUser'>InputUser</a> first_name:<a href='/type/string'>string</a> last_name:<a href='/type/string'>string</a> phone:<a href='/type/string'>string</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
@ -104,7 +103,6 @@ Optionally, the <a href="/constructor/peerSettings">peerSettings</a>.<code>need_
</ul>
<p>Optionally, the <a href="/constructor/peerSettings">peerSettings</a>.<code>need_contacts_exception</code> flag may also be set: if so, the <code>add_phone_privacy_exception</code> flag <strong>must</strong> be set if the user clicks on the add contact button, invoking <a href="/method/contacts.addContact">contacts.addContact</a>. </p>
<h2><a class="anchor" href="#share-phone-number" id="share-phone-number" name="share-phone-number"><i class="anchor-icon"></i></a>Share phone number</h2>
<p>Schema:</p>
<pre><code>---functions---
<a href='/method/contacts.acceptContact'>contacts.acceptContact</a>#f831a20f id:<a href='/type/InputUser'>InputUser</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
@ -120,7 +118,6 @@ Optionally, the <a href="/constructor/peerSettings">peerSettings</a>.<code>need_
<p>This bar indicates that the associated location-based supergroup can be reported for having an unrelated location using a bar button that invokes <a href="/method/account.reportPeer">account.reportPeer</a> with <code>reason</code> <a href="/constructor/inputReportReasonGeoIrrelevant">inputReportReasonGeoIrrelevant</a>. </p>
<p><strong>Condition</strong>: the <a href="/constructor/peerSettings">peerSettings</a>.<code>report_geo</code> flag must be set.</p>
<h2><a class="anchor" href="#invite-new-members" id="invite-new-members" name="invite-new-members"><i class="anchor-icon"></i></a>Invite new members</h2>
<p>Schema:</p>
<pre><code>---functions---
<a href='/method/messages.addChatUser'>messages.addChatUser</a>#f24753e3 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/Updates'>Updates</a>;

View file

@ -2,18 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>Block</title>
<title>Blocklist</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Working with the blocklist.
Scheme:
peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked;
contacts.blocked#ade1591…">
<meta property="og:title" content="Block">
<meta property="description" content="Working with the blocklist.">
<meta property="og:title" content="Blocklist">
<meta property="og:image" content="">
<meta property="og:description" content="Working with the blocklist.
Scheme:
peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked;
contacts.blocked#ade1591…">
<meta property="og:description" content="Working with the blocklist.">
<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">
@ -45,8 +39,8 @@ contacts.blocked#ade1591…">
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/block" >Block</a></li></ul></div>
<h1 id="dev_page_title">Block</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/block" >Blocklist</a></li></ul></div>
<h1 id="dev_page_title">Blocklist</h1>
<div id="dev_page_content"><!-- scroll_nav -->

View file

@ -142,7 +142,7 @@ 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, according to the information contained in the <a href="/constructor/peerSettings">peerSettings »</a>.</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></div>
</div>

View file

@ -366,7 +366,7 @@ tg://addemoji?set=&lt;slug&gt;</code></pre>
</table>
<h3><a class="anchor" href="#boost-links" id="boost-links" name="boost-links"><i class="anchor-icon"></i></a>Boost links</h3>
<p>Used by users to <a href="/api/stories#boosts">boost channels »</a>, granting them the ability to post stories.</p>
<p>Use the channel information to boost the channel as describere <a href="/api/stories#boosts">here »</a>. </p>
<p>Use the channel information to boost the channel as described <a href="/api/stories#boosts">here »</a>. </p>
<p><code>t.me</code> syntax (public channels):</p>
<pre><code>t.me/&lt;username&gt;?boost</code></pre>
<p><code>t.me</code> syntax (private channels):</p>

View file

@ -2,14 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>Nearby</title>
<title>Nearby users&amp;chats</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to work with geolocation-based features like geochats and the nearby users feature.
Fetching nearby users &amp; geogroups…">
<meta property="og:title" content="Nearby">
<meta property="description" content="How to work with geolocation-based features like geochats and the nearby users feature.">
<meta property="og:title" content="Nearby users&amp;chats">
<meta property="og:image" content="">
<meta property="og:description" content="How to work with geolocation-based features like geochats and the nearby users feature.
Fetching nearby users &amp; geogroups…">
<meta property="og:description" content="How to work with geolocation-based features like geochats and the nearby users feature.">
<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">
@ -41,8 +39,8 @@ Fetching nearby users &amp; geogroups…">
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/nearby" >Nearby</a></li></ul></div>
<h1 id="dev_page_title">Nearby</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/nearby" >Nearby users&amp;chats</a></li></ul></div>
<h1 id="dev_page_title">Nearby users&amp;chats</h1>
<div id="dev_page_content"><!-- scroll_nav -->
@ -54,7 +52,7 @@ Fetching nearby users &amp; geogroups…">
<a href='/method/contacts.getLocated'>contacts.getLocated</a>#d348bc44 flags:<a href='/type/%23'>#</a> background:flags.1?<a href='/constructor/true'>true</a> geo_point:<a href='/type/InputGeoPoint'>InputGeoPoint</a> self_expires:flags.0?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>Use <a href="/method/contacts.getLocated">contacts.getLocated</a> to fetch a list of nearby users and groups. </p>
<p>Do <strong>not</strong> set any of the <code>background</code>, <code>self_expires</code> flags: only populate <code>geo_point</code> with the current geolocation of the user: a list of users and geochats located nearby will be returned. </p>
<p>Do <strong>not</strong> set any of the <code>background</code>, <code>self_expires</code> flags: only populate <code>geo_point</code> with the current geolocation of the user: a list of users and geochats located nearby will be returned (<strong>without</strong> publishing the current location of the user). </p>
<p>This functionality is useful for example to <a href="/api/contacts#adding-telegram-users-as-contacts">exchange contacts</a> with a nearby Telegram user, or <a href="/method/channels.joinChannel">join</a> a location-based group chat, see <a href="https://telegram.org/blog/contacts-local-groups">here »</a> for more usecases. </p>
<p>See <a href="#creating-a-geogroup">here »</a> for more info on how to create a geogroup, and <a href="#advertising-our-current-location">here »</a> for more info on how to advertise our current location to other users. </p>
<h2><a class="anchor" href="#creating-a-geogroup" id="creating-a-geogroup" name="creating-a-geogroup"><i class="anchor-icon"></i></a>Creating a geogroup</h2>
@ -78,8 +76,7 @@ Fetching nearby users &amp; geogroups…">
<p>This flag is used to specify the expiration TTL of the passed geolocation (i.e. the geolocation will expire after <code>self_expires</code> seconds); pass `0x7fffffff`` to disable expiry, 0 to make the current geolocation private. </p>
<p>The method will also return a list of nearby users and chats, but only if the passed expiration TTL is not equal to zero.<br>
Users may still fetch nearby users and chats without making their geolocation public by simply not setting the flag, see <a href="#fetching-nearby-users--geogroups">here »</a> for more info. </p>
<p>While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so (or in any case before the expiration date specified with <code>self_expires</code>), while setting this flag. </p>
<p>If the new location is more than 1 KM away from the previous one, or if the previous location is unknown, the <code>background</code> flag should be set when invoking <a href="/method/contacts.getLocated">contacts.getLocated</a>.</p></div>
<p>While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so (or in any case before the expiration date specified with <code>self_expires</code>), while setting this flag: if the new location is more than 1 KM away from the previous one, or if the previous location is unknown, the <code>background</code> flag should be set.</p></div>
</div>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>Telegram Premium</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features">
<meta property="description" content="Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.">
<meta property="og:title" content="Telegram Premium">
<meta property="og:image" content="">
<meta property="og:description" content="Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features">
<meta property="og:description" content="Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>Privacy</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Telegram allows users to specify granular privacy settings, choosing which users can or can&#39;t interact with them in certain">
<meta property="description" content="Telegram allows users to specify granular privacy settings, choosing which users can or can&#39;t interact with them in certain ways.">
<meta property="og:title" content="Privacy">
<meta property="og:image" content="">
<meta property="og:description" content="Telegram allows users to specify granular privacy settings, choosing which users can or can&#39;t interact with them in certain">
<meta property="og:description" content="Telegram allows users to specify granular privacy settings, choosing which users can or can&#39;t interact with them in certain ways.">
<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">

View file

@ -4,12 +4,10 @@
<meta charset="utf-8">
<title>Takeout</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Telegram&#39;s API allows users to export all of their information through the takeout API.
account.takeout#4dba4501 id:long…">
<meta property="description" content="Telegram&#39;s API allows users to export all of their information through the takeout API.">
<meta property="og:title" content="Takeout">
<meta property="og:image" content="">
<meta property="og:description" content="Telegram&#39;s API allows users to export all of their information through the takeout API.
account.takeout#4dba4501 id:long…">
<meta property="og:description" content="Telegram&#39;s API allows users to export all of their information through the takeout API.">
<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">

View file

@ -111,6 +111,7 @@
<h4><a class="anchor" href="#authresetloginemail" id="authresetloginemail" name="authresetloginemail"><i class="anchor-icon"></i></a><a href="/method/auth.resetLoginEmail">auth.resetLoginEmail</a></h4>
<p>Reset the <a href="https://core.telegram.org/api/auth#email-verification">login email »</a>.</p>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p>
<h4><a class="anchor" href="#user-authorization" id="user-authorization" name="user-authorization"><i class="anchor-icon"></i></a><a href="/api/auth">User Authorization</a></h4>
<p>How to register a user's phone to start using the API.</p></div>

View file

@ -106,7 +106,8 @@ The keys in <code>video_sections</code> correspond to a specific feature identif
<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="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
<p>How to create styled text with message entities</p>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4></div>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p></div>
</div>

View file

@ -86,7 +86,8 @@
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/RequestPeerType">RequestPeerType</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="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4></div>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p></div>
</div>

View file

@ -91,7 +91,8 @@
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Update">Update</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#block" id="block" name="block"><i class="anchor-icon"></i></a><a href="/api/block">Block</a></h4></div>
<h4><a class="anchor" href="#blocklist" id="blocklist" name="blocklist"><i class="anchor-icon"></i></a><a href="/api/block">Blocklist</a></h4>
<p>Working with the blocklist.</p></div>
</div>

View file

@ -152,6 +152,7 @@
<h4><a class="anchor" href="#custom-emojis" id="custom-emojis" name="custom-emojis"><i class="anchor-icon"></i></a><a href="/api/custom-emoji">Custom emojis</a></h4>
<p>Telegram allows including animated and static custom emojis inside of messages.</p>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p>
<h4><a class="anchor" href="#inputstickersetemojidefaulttopicicons" id="inputstickersetemojidefaulttopicicons" name="inputstickersetemojidefaulttopicicons"><i class="anchor-icon"></i></a><a href="/constructor/inputStickerSetEmojiDefaultTopicIcons">inputStickerSetEmojiDefaultTopicIcons</a></h4>
<p>Default <a href="/api/custom-emoji">custom emoji</a> stickerset for <a href="/api/forum#forum-topics">forum topic icons</a></p>
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>

View file

@ -165,6 +165,7 @@
<h4><a class="anchor" href="#custom-emojis" id="custom-emojis" name="custom-emojis"><i class="anchor-icon"></i></a><a href="/api/custom-emoji">Custom emojis</a></h4>
<p>Telegram allows including animated and static custom emojis inside of messages.</p>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p>
<h4><a class="anchor" href="#inputstickersetemojidefaulttopicicons" id="inputstickersetemojidefaulttopicicons" name="inputstickersetemojidefaulttopicicons"><i class="anchor-icon"></i></a><a href="/constructor/inputStickerSetEmojiDefaultTopicIcons">inputStickerSetEmojiDefaultTopicIcons</a></h4>
<p>Default <a href="/api/custom-emoji">custom emoji</a> stickerset for <a href="/api/forum#forum-topics">forum topic icons</a></p>
<h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>contacts.acceptContact</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="If the peer settings of a new user allow us to add them as contact, add that user as contact">
<meta property="description" content="If the add contact action bar is active, add that user as contact">
<meta property="og:title" content="contacts.acceptContact">
<meta property="og:image" content="">
<meta property="og:description" content="If the peer settings of a new user allow us to add them as contact, add that user as contact">
<meta property="og:description" content="If the add contact action bar is active, add that user as contact">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -42,7 +42,7 @@
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/contacts.acceptContact" >contacts.acceptContact</a></li></ul></div>
<h1 id="dev_page_title">contacts.acceptContact</h1>
<div id="dev_page_content"><p>If the <a href="/constructor/peerSettings">peer settings</a> of a new user allow us to add them as contact, add that user as contact</p>
<div id="dev_page_content"><p>If the <a href="/api/action-bar#add-contact">add contact action bar is active</a>, add that user as contact</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -116,8 +116,8 @@
</tbody>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#peersettings" id="peersettings" name="peersettings"><i class="anchor-icon"></i></a><a href="/constructor/peerSettings">peerSettings</a></h4>
<p>List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat bar</p></div>
<h4><a class="anchor" href="#action-bar" id="action-bar" name="action-bar"><i class="anchor-icon"></i></a><a href="/api/action-bar">Action bar</a></h4>
<p>Sometimes, when interacting with Telegram users via private or secret chats, an action bar must be shown on top of the chat, offering convenient action buttons or notices regarding the user.</p></div>
</div>

View file

@ -126,7 +126,8 @@
</tbody>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#block" id="block" name="block"><i class="anchor-icon"></i></a><a href="/api/block">Block</a></h4></div>
<h4><a class="anchor" href="#blocklist" id="blocklist" name="blocklist"><i class="anchor-icon"></i></a><a href="/api/block">Blocklist</a></h4>
<p>Working with the blocklist.</p></div>
</div>

View file

@ -121,7 +121,8 @@
</tbody>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#block" id="block" name="block"><i class="anchor-icon"></i></a><a href="/api/block">Block</a></h4></div>
<h4><a class="anchor" href="#blocklist" id="blocklist" name="blocklist"><i class="anchor-icon"></i></a><a href="/api/block">Blocklist</a></h4>
<p>Working with the blocklist.</p></div>
</div>

View file

@ -133,7 +133,8 @@
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
<p>How to create styled text with message entities</p>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4></div>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p></div>
</div>

View file

@ -130,7 +130,8 @@
<p>Telegram users and channels can easily post and view stories through the API.</p>
<h4><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.</p>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4></div>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p></div>
</div>

View file

@ -162,7 +162,8 @@ Peer where the story was posted.…">
<p>Telegram users and channels can easily post and view stories through the API.</p>
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
<p>How to create styled text with message entities</p>
<h4><a class="anchor" href="#privacy" id="privacy" name="privacy"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy</a></h4></div>
<h4><a class="anchor" href="#privacy" id="privacy" name="privacy"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy</a></h4>
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p></div>
</div>

View file

@ -201,9 +201,11 @@
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
<p>How to create styled text with message entities</p>
<h4><a class="anchor" href="#privacy" id="privacy" name="privacy"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy</a></h4>
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p>
<h4><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.</p>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4></div>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p></div>
</div>

View file

@ -53,9 +53,9 @@
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
<!-- start req_pq_multi -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 CC CE 0A 00 F7 1E 38 65
0010 | 14 00 00 00 F1 8E 7E BE 80 79 E1 6E 86 7B C4 82
0020 | F9 B4 8E 24 88 E9 54 B3</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 44 24 09 00 B2 81 3A 65
0010 | 14 00 00 00 F1 8E 7E BE 5B C4 75 40 D7 80 0C F2
0020 | 57 0E 01 B2 0E 7A C4 96</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>CCCE0A00F71E3865</code></td>
<td><code>44240900B2813A65</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>8079E16E867BC482F9B48E2488E954B3</code></td>
<td><code>5BC47540D7800CF2570E01B20E7AC496</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 A8 36 D7 F2 1E 38 65
0010 | 58 00 00 00 63 24 16 05 80 79 E1 6E 86 7B C4 82
0020 | F9 B4 8E 24 88 E9 54 B3 AF 73 D5 1E 13 D1 A9 25
0030 | 59 21 3C 56 96 1D 02 F8 08 27 CD 14 EF 69 B2 A0
0040 | 97 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 9C 32 E1 AE 81 3A 65
0010 | 74 00 00 00 63 24 16 05 5B C4 75 40 D7 80 0C F2
0020 | 57 0E 01 B2 0E 7A C4 96 A3 5B C5 BC D1 78 47 75
0030 | 79 57 68 32 EF F8 E6 3F 08 28 27 1F 2A AC 25 46
0040 | ED 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>01A836D7F21E3865</code></td>
<td><code>019C32E1AE813A65</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>58000000</code> (88 in decimal)</td>
<td><code>74000000</code> (116 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>8079E16E867BC482F9B48E2488E954B3</code></td>
<td><code>5BC47540D7800CF2570E01B20E7AC496</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>AF73D51E13D1A92559213C56961D02F8</code></td>
<td><code>A35BC5BCD178477579576832EFF8E63F</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>0827CD14EF69B2A097000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2867971556207927447</td>
<td><code>0828271F2AAC2546ED000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2893315553746044653</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--q" id="3-client-decomposes-pq-into-prime-factors-such-that-p--q" name="3-client-decomposes-pq-into-prime-factors-such-that-p--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 = 2867971556207927447</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2867971556207927447 = 1536892391 * 1866084817</code></p>
<pre><code>p = 1536892391
q = 1866084817</code></pre>
<pre><code>pq = 2893315553746044653</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2893315553746044653 = 1546123877 * 1871334889</code></p>
<pre><code>p = 1546123877
q = 1871334889</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 CD 14 EF 69 B2 A0 97 00 00 00
0010 | 04 5B 9B 1D E7 00 00 00 04 6F 3A 31 D1 00 00 00
0020 | 80 79 E1 6E 86 7B C4 82 F9 B4 8E 24 88 E9 54 B3
0030 | AF 73 D5 1E 13 D1 A9 25 59 21 3C 56 96 1D 02 F8
0040 | 12 93 82 9C F9 BA 13 56 3D 7D 8B B1 30 85 16 0F
0050 | 12 F8 9F BB 40 A1 DB 01 81 54 D5 FB 0F 49 E1 C0
<pre><code>0000 | 95 5F F5 A9 08 28 27 1F 2A AC 25 46 ED 00 00 00
0010 | 04 5C 27 FA 65 00 00 00 04 6F 8A 4D E9 00 00 00
0020 | 5B C4 75 40 D7 80 0C F2 57 0E 01 B2 0E 7A C4 96
0030 | A3 5B C5 BC D1 78 47 75 79 57 68 32 EF F8 E6 3F
0040 | CA 93 8B A9 ED 98 8E D7 58 30 62 8A 66 F0 94 34
0050 | 72 82 4E 42 D5 D5 D6 72 9B CA 1B B2 07 6A 45 D2
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 = 1866084817</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>0827CD14EF69B2A097000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2867971556207927447</td>
<td><code>0828271F2AAC2546ED000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2893315553746044653</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>045B9B1DE7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1536892391</td>
<td><code>045C27FA65000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1546123877</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>046F3A31D1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1866084817</td>
<td><code>046F8A4DE9000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1871334889</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>8079E16E867BC482F9B48E2488E954B3</code></td>
<td><code>5BC47540D7800CF2570E01B20E7AC496</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>AF73D51E13D1A92559213C56961D02F8</code></td>
<td><code>A35BC5BCD178477579576832EFF8E63F</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>1293829CF9BA13563D7D8BB13085160F</code> <code>12F89FBB40A1DB018154D5FB0F49E1C0</code></td>
<td><code>CA938BA9ED988ED75830628A66F09434</code> <code>72824E42D5D5D6729BCA1BB2076A45D2</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1866084817</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 = 955FF5A90827CD14EF69B2A097000000045B9B1DE7000000046F3A31D10000008079E16E867BC482F9B48E2488E954B3AF73D51E13D1A92559213C56961D02F81293829CF9BA13563D7D8BB13085160F12F89FBB40A1DB018154D5FB0F49E1C002000000
random_padding_bytes = 4152FDA2C238E2874D9E0FADFE547195489786640FDCBF7AEC9AEFD1856B522A66588C59C98F6EE1DDA6957F8245529139DDD320D3E0BCA8AF412B97C4D50B4352D83BD3D57DCE3C81B6716E32EB46CD47696FAAAD1B345D4F275B70</code></pre>
<pre><code>data = 955FF5A90828271F2AAC2546ED000000045C27FA65000000046F8A4DE90000005BC47540D7800CF2570E01B20E7AC496A35BC5BCD178477579576832EFF8E63FCA938BA9ED988ED75830628A66F0943472824E42D5D5D6729BCA1BB2076A45D202000000
random_padding_bytes = 870F8330DC0083AD325B066CAEAF9131E9D692B19576290095EDBD0097D22103BBE1B169A4E52E96B5A58F47B9F9254B7E100C5C672A11012B6A1869E6978174BE3A9E93E723F5E92B68C668E84F3799966F2783FB8EF22F6B29B12B</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 = 82173D59A38D252E539A2D5AD472A3844B56759CD56D4DC6BC4F8F9CD99E9E82BA5E15B9D2BFAAFCEFAB14F7C11A1095FB38069983B436C7BA43F7A3CFB9726FFF3D7A42D6053D8EF484DDEB7960498CBDAE44E31D460D02356C4334072D174A28CD00353C0C5BE53C615CBC5E780CD3DC370AA987E71AE44F9406C0F1CC1782CD4B5C10CD96A67D3B0A414C2DA4DE0BBED3660A94C854D917ABB942D0F512E0A7DB2874761637FA7F25181E6E931F3A0FD2F45C68B5602EBD50FA2319D7F4841A76BE3808555D40ED962B1F0E7B7BC5D13107A64883B6654EAD1DED778BECDF5BCC89036F5175C886281A00F2A3E959EBB9C8ED42DF93713098AC2A80AC400C</code></pre>
<pre><code>encrypted_data = C06B72C499F627197E6B852125A4AA546767EC843715E479C400F9FD2B6709358593715B6ECCF7E12C996E7C60F2F998C448750613CC5F6BF8E8524B368AE8AAE6A60F00A88C5D85D6298D16B7C098BF0C4068FD7D4976DCEF2C605F7BE6B42F0D666BD451345D1E2B6A4A5B3614CA9BF9BA2BBDC9452C517342831E01073B57B7D113DAF10DF7C3851F5CA00891EAA8EAD81182D35ADFA8FCAB7B935A5B16F1DA1FC199F68C7A32FCC85154A0C6CD6C68511596D9EFC278066D1D0C60A8DF0B586E35823E428522DB314116770D69582C120F69624CE6D74029E0EC57B88F3B6ABBD613E294715D5E664322ABCC5E351AB396CCFA8B180AE31F831857C13439</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 D0 CE 0A 00 F7 1E 38 65
0010 | 40 01 00 00 BE E4 12 D7 80 79 E1 6E 86 7B C4 82
0020 | F9 B4 8E 24 88 E9 54 B3 AF 73 D5 1E 13 D1 A9 25
0030 | 59 21 3C 56 96 1D 02 F8 04 5B 9B 1D E7 00 00 00
0040 | 04 6F 3A 31 D1 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 82 17 3D 59 A3 8D 25 2E 53 9A 2D 5A
0060 | D4 72 A3 84 4B 56 75 9C D5 6D 4D C6 BC 4F 8F 9C
0070 | D9 9E 9E 82 BA 5E 15 B9 D2 BF AA FC EF AB 14 F7
0080 | C1 1A 10 95 FB 38 06 99 83 B4 36 C7 BA 43 F7 A3
0090 | CF B9 72 6F FF 3D 7A 42 D6 05 3D 8E F4 84 DD EB
00A0 | 79 60 49 8C BD AE 44 E3 1D 46 0D 02 35 6C 43 34
00B0 | 07 2D 17 4A 28 CD 00 35 3C 0C 5B E5 3C 61 5C BC
00C0 | 5E 78 0C D3 DC 37 0A A9 87 E7 1A E4 4F 94 06 C0
00D0 | F1 CC 17 82 CD 4B 5C 10 CD 96 A6 7D 3B 0A 41 4C
00E0 | 2D A4 DE 0B BE D3 66 0A 94 C8 54 D9 17 AB B9 42
00F0 | D0 F5 12 E0 A7 DB 28 74 76 16 37 FA 7F 25 18 1E
0100 | 6E 93 1F 3A 0F D2 F4 5C 68 B5 60 2E BD 50 FA 23
0110 | 19 D7 F4 84 1A 76 BE 38 08 55 5D 40 ED 96 2B 1F
0120 | 0E 7B 7B C5 D1 31 07 A6 48 83 B6 65 4E AD 1D ED
0130 | 77 8B EC DF 5B CC 89 03 6F 51 75 C8 86 28 1A 00
0140 | F2 A3 E9 59 EB B9 C8 ED 42 DF 93 71 30 98 AC 2A
0150 | 80 AC 40 0C</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 78 AC 0E 00 B3 81 3A 65
0010 | 40 01 00 00 BE E4 12 D7 5B C4 75 40 D7 80 0C F2
0020 | 57 0E 01 B2 0E 7A C4 96 A3 5B C5 BC D1 78 47 75
0030 | 79 57 68 32 EF F8 E6 3F 04 5C 27 FA 65 00 00 00
0040 | 04 6F 8A 4D E9 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 C0 6B 72 C4 99 F6 27 19 7E 6B 85 21
0060 | 25 A4 AA 54 67 67 EC 84 37 15 E4 79 C4 00 F9 FD
0070 | 2B 67 09 35 85 93 71 5B 6E CC F7 E1 2C 99 6E 7C
0080 | 60 F2 F9 98 C4 48 75 06 13 CC 5F 6B F8 E8 52 4B
0090 | 36 8A E8 AA E6 A6 0F 00 A8 8C 5D 85 D6 29 8D 16
00A0 | B7 C0 98 BF 0C 40 68 FD 7D 49 76 DC EF 2C 60 5F
00B0 | 7B E6 B4 2F 0D 66 6B D4 51 34 5D 1E 2B 6A 4A 5B
00C0 | 36 14 CA 9B F9 BA 2B BD C9 45 2C 51 73 42 83 1E
00D0 | 01 07 3B 57 B7 D1 13 DA F1 0D F7 C3 85 1F 5C A0
00E0 | 08 91 EA A8 EA D8 11 82 D3 5A DF A8 FC AB 7B 93
00F0 | 5A 5B 16 F1 DA 1F C1 99 F6 8C 7A 32 FC C8 51 54
0100 | A0 C6 CD 6C 68 51 15 96 D9 EF C2 78 06 6D 1D 0C
0110 | 60 A8 DF 0B 58 6E 35 82 3E 42 85 22 DB 31 41 16
0120 | 77 0D 69 58 2C 12 0F 69 62 4C E6 D7 40 29 E0 EC
0130 | 57 B8 8F 3B 6A BB D6 13 E2 94 71 5D 5E 66 43 22
0140 | AB CC 5E 35 1A B3 96 CC FA 8B 18 0A E3 1F 83 18
0150 | 57 C1 34 39</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 = 4152FDA2C238E2874D9E0FADFE547195489786640FDCBF7AEC9AEFD18
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>D0CE0A00F71E3865</code></td>
<td><code>78AC0E00B3813A65</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 = 4152FDA2C238E2874D9E0FADFE547195489786640FDCBF7AEC9AEFD18
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>8079E16E867BC482F9B48E2488E954B3</code></td>
<td><code>5BC47540D7800CF2570E01B20E7AC496</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>AF73D51E13D1A92559213C56961D02F8</code></td>
<td><code>A35BC5BCD178477579576832EFF8E63F</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>045B9B1DE7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1536892391</td>
<td><code>045C27FA65000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1546123877</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>046F3A31D1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1866084817</td>
<td><code>046F8A4DE9000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1871334889</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 = 4152FDA2C238E2874D9E0FADFE547195489786640FDCBF7AEC9AEFD18
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE00010082173D59A38D252E539A2D5A</code> <code>D472A3844B56759CD56D4DC6BC4F8F9C</code> <code>D99E9E82BA5E15B9D2BFAAFCEFAB14F7</code> <code>C11A1095FB38069983B436C7BA43F7A3</code> <code>CFB9726FFF3D7A42D6053D8EF484DDEB</code> <code>7960498CBDAE44E31D460D02356C4334</code> <code>072D174A28CD00353C0C5BE53C615CBC</code> <code>5E780CD3DC370AA987E71AE44F9406C0</code> <code>F1CC1782CD4B5C10CD96A67D3B0A414C</code> <code>2DA4DE0BBED3660A94C854D917ABB942</code> <code>D0F512E0A7DB2874761637FA7F25181E</code> <code>6E931F3A0FD2F45C68B5602EBD50FA23</code> <code>19D7F4841A76BE3808555D40ED962B1F</code> <code>0E7B7BC5D13107A64883B6654EAD1DED</code> <code>778BECDF5BCC89036F5175C886281A00</code> <code>F2A3E959EBB9C8ED42DF93713098AC2A</code><br> <code>80AC400C</code></td>
<td><code>FE000100C06B72C499F627197E6B8521</code> <code>25A4AA546767EC843715E479C400F9FD</code> <code>2B6709358593715B6ECCF7E12C996E7C</code> <code>60F2F998C448750613CC5F6BF8E8524B</code> <code>368AE8AAE6A60F00A88C5D85D6298D16</code> <code>B7C098BF0C4068FD7D4976DCEF2C605F</code> <code>7BE6B42F0D666BD451345D1E2B6A4A5B</code> <code>3614CA9BF9BA2BBDC9452C517342831E</code> <code>01073B57B7D113DAF10DF7C3851F5CA0</code> <code>0891EAA8EAD81182D35ADFA8FCAB7B93</code> <code>5A5B16F1DA1FC199F68C7A32FCC85154</code> <code>A0C6CD6C68511596D9EFC278066D1D0C</code> <code>60A8DF0B586E35823E428522DB314116</code> <code>770D69582C120F69624CE6D74029E0EC</code> <code>57B88F3B6ABBD613E294715D5E664322</code> <code>ABCC5E351AB396CCFA8B180AE31F8318</code><br> <code>57C13439</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 4152FDA2C238E2874D9E0FADFE547195489786640FDCBF7AEC9AEFD18
<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 00 89 71 F3 1E 38 65
0010 | C4 02 00 00 5C 07 E8 D0 80 79 E1 6E 86 7B C4 82
0020 | F9 B4 8E 24 88 E9 54 B3 AF 73 D5 1E 13 D1 A9 25
0030 | 59 21 3C 56 96 1D 02 F8 FE 50 02 00 EF EE F8 03
0040 | D6 35 27 21 2D 15 4C 9D 65 7B 4A C4 2D 06 88 AC
0050 | 04 06 4D B1 08 5B 51 F2 F3 0A F6 B4 D1 F9 20 9D
0060 | E8 19 A5 AD 70 0F 1C 9F DD 0B 77 CC 40 A0 43 5C
0070 | A5 39 E5 25 50 53 16 82 00 02 10 B8 94 DB D8 35
0080 | CD D4 5F A3 18 DF 68 67 B3 07 8A 24 99 D2 E0 A7
0090 | 7C 6D ED D0 F1 72 E8 D5 34 92 90 94 6C 89 57 12
00A0 | 5F D8 B9 FF E6 85 90 1B 28 96 27 5D F8 6A DF 8A
00B0 | 0B C4 0D EC 76 4C E9 95 92 32 A2 7A 7A 5D 34 EB
00C0 | 0C 31 B6 87 6A 5E 2E 7B 7F 0C 73 02 65 EE F0 87
00D0 | 7A C1 B7 32 D6 7E 57 9A CF A1 E4 F0 27 21 02 E9
00E0 | 49 16 D5 FA D8 3F A2 12 A7 7B 74 1B CC 2B C2 F1
00F0 | 82 52 33 73 C9 1A CF 85 D3 09 23 F2 FA FF 5C 08
0100 | 5E 93 30 6B 51 3C B7 F9 DF F9 85 2F 68 77 24 04
0110 | 6F DD F2 13 CB 28 6B 2E 9E 55 61 6D B4 81 AB 6A
0120 | C0 EF 75 81 F6 7B F1 80 38 FB 19 26 3E 5D 39 53
0130 | 67 D5 AE EB 30 C6 98 F0 EF 1E A0 BB 44 9B 08 CD
0140 | F4 33 99 8A FC 89 63 B3 BC 08 88 B9 B2 A4 18 C7
0150 | E3 25 E1 6A 9B 53 B8 B2 09 44 15 AA 1A EF FA 3E
0160 | 5E 6F 2B CA B1 A5 11 45 F5 FC B2 C7 A0 40 74 22
0170 | 4D C3 6B A5 A5 8D AB 01 DB 6D 32 4E 6B 69 14 DE
0180 | 69 40 B2 E8 A4 2E 77 BE EB 60 63 8B 7E D0 1C 61
0190 | 2E 4E 76 B9 7E 46 C1 60 F0 23 D6 B9 C0 19 D4 83
01A0 | 99 34 A4 44 A3 2C DC 2A 0D D8 9F EB D8 FD 4D C8
01B0 | BD 44 02 B6 09 F2 81 72 C5 0B 0E 8E A6 85 7C BA
01C0 | EA C7 5D C0 50 64 AD CE D0 F5 E1 F0 57 69 40 F9
01D0 | 01 06 A8 A6 4D 4B 34 EF EA 6B A2 61 44 F6 1B FE
01E0 | 27 00 78 64 8B 08 74 4D 00 87 A3 B0 F9 F9 FF F5
01F0 | 00 27 19 B7 79 3A 9B FA 7D E8 40 F4 30 49 99 09
0200 | 61 F4 86 A2 38 90 CB 0E 5D 9B 9E 2D DE 94 A9 5B
0210 | BE 13 A4 E3 4C D4 A1 90 0A FD E0 E2 90 A9 8A B2
0220 | D3 13 EC AB 03 A1 C0 6D 09 0B E6 62 65 37 2E 7B
0230 | C6 92 DB 91 25 AC 04 F6 58 05 D8 B6 03 60 A0 DB
0240 | E4 CD 5C B8 5A 91 1D AA 29 32 8A 49 03 B6 2F 6F
0250 | 89 8C 59 13 AF 01 75 6F 1C B8 08 C9 D1 71 22 69
0260 | 25 51 1B E9 D6 32 A5 C2 5E D6 7C EC 0D C3 4A 2A
0270 | 3E 45 A0 B8 7D 58 B6 9D 41 08 1F 02 B0 2A C3 20
0280 | 3E EA EA 6B D2 CF 36 F5 71 24 FD CE</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 BC E1 83 AF 81 3A 65
0010 | 78 02 00 00 5C 07 E8 D0 5B C4 75 40 D7 80 0C F2
0020 | 57 0E 01 B2 0E 7A C4 96 A3 5B C5 BC D1 78 47 75
0030 | 79 57 68 32 EF F8 E6 3F FE 50 02 00 6D 38 D0 7A
0040 | A7 A5 E4 47 6D EF 58 94 49 6B 33 1D 11 D2 51 B6
0050 | 04 F9 C1 0C D4 5B E3 78 C3 01 37 7C B2 95 D7 85
0060 | F8 60 7B 6F 70 20 FE 24 DF 66 00 7F BB 81 79 84
0070 | D5 88 12 FF 38 C1 1D 4F FE 59 1B E0 A6 51 AF 4A
0080 | DC 29 19 66 A0 59 56 C7 EB 51 C5 0B D5 7E 26 79
0090 | F2 75 3C 4E 5F 14 87 3A 95 AC C7 96 10 58 19 EB
00A0 | 14 3C FF 3E 4D ED C0 FB 2E 1F 75 A5 65 FA 41 F7
00B0 | C4 4C 75 3F 2D FA 34 4C 40 86 1E F3 C1 EF EC 10
00C0 | 7D 71 99 EA 30 EF F1 23 A7 16 9C 76 87 97 05 F8
00D0 | 1A D6 A9 FD 21 B6 BE 69 99 90 0A CD 62 A2 E6 BB
00E0 | CA 44 DA B4 45 83 8E 48 AC 16 5A AA 09 24 00 29
00F0 | 5E A6 22 E7 4C 19 CE 4D C4 E0 98 4E F2 01 1C B0
0100 | 68 BC F0 AF 5E 7F 5A 4A F0 E5 31 5E 58 A7 79 6E
0110 | F3 4B C3 9E 91 34 64 E0 65 AB 72 83 CC 7A A3 5E
0120 | 18 C0 A5 D2 0A FE 51 C5 A4 13 B5 EC E4 FC 22 E8
0130 | 06 C0 45 99 DF 6E 84 9B A9 F1 A7 EE A7 67 FA FF
0140 | F0 4E B5 D9 87 6C 78 06 5F 61 97 69 CD 4F 73 DF
0150 | EC 43 61 B7 0A 30 5C 77 83 3E 84 DB BA 00 57 3A
0160 | 5C C0 62 ED 1D 75 A6 8F 5C ED 0B 19 29 0B 1D 0F
0170 | 8E 43 4F F5 18 86 A4 31 67 7E B3 2E 02 9A 9B 89
0180 | 9A 05 09 8D 35 9A E5 55 51 EE 61 B0 4E E0 D7 9A
0190 | 23 0C 12 7B 9A 68 2D 3C 4B 49 ED BF 6C 7B 1B 98
01A0 | 12 5F D3 46 66 FC 36 5D 10 B1 AF 3A 67 BC 9E DD
01B0 | 50 E9 77 C4 8C 61 9E 9B 60 4C CC D5 39 E9 5B 7E
01C0 | 0D D6 47 E5 73 D1 61 47 64 E8 E1 D9 A0 17 CD 0C
01D0 | 23 9A 2A A1 68 B2 75 15 20 68 9A 06 98 BE FE C8
01E0 | 54 AC D3 ED 73 74 31 6A 1F 3D 80 C5 0D 18 54 12
01F0 | 6A B7 9B EA DC 91 8C 3F 01 2E 50 80 FA 85 C6 C2
0200 | EA C4 70 9A BC B4 A9 3D EF 99 6C EE 8D F7 B8 B1
0210 | 70 7C 7C 01 D0 B6 18 41 0E 4F D6 AA 2B B8 13 C0
0220 | 12 7C 57 67 E4 F4 95 C2 F0 CA 6C 35 CD F9 D7 B9
0230 | 4E 8F 1D 7B AA 6E 51 0B 34 AF 4E 3E 4C D7 46 E3
0240 | 4D 21 B0 26 75 D9 DC C0 08 EA 88 E2 84 52 20 E6
0250 | E9 8C 2B 24 6A F4 79 CB 93 8C 16 D3 3C E1 5B A6
0260 | 3F 17 E4 CD FF C0 11 CA 98 B2 6F BC A2 74 E3 CA
0270 | D4 D4 2C DE F8 09 1C 0D BA 67 3A 64 5C 0E 79 F0
0280 | DB 08 1C 9A F6 6C 14 EC 18 10 D8 2E</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 = 4152FDA2C238E2874D9E0FADFE547195489786640FDCBF7AEC9AEFD18
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01008971F31E3865</code></td>
<td><code>01BCE183AF813A65</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>C4020000</code> (708 in decimal)</td>
<td><code>78020000</code> (632 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 4152FDA2C238E2874D9E0FADFE547195489786640FDCBF7AEC9AEFD18
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>8079E16E867BC482F9B48E2488E954B3</code></td>
<td><code>5BC47540D7800CF2570E01B20E7AC496</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>AF73D51E13D1A92559213C56961D02F8</code></td>
<td><code>A35BC5BCD178477579576832EFF8E63F</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200EFEEF803D63527212D154C9D</code> <code>657B4AC42D0688AC04064DB1085B51F2</code> <code>F30AF6B4D1F9209DE819A5AD700F1C9F</code> <code>DD0B77CC40A0435CA539E52550531682</code> <code>000210B894DBD835CDD45FA318DF6867</code> <code>B3078A2499D2E0A77C6DEDD0F172E8D5</code> <code>349290946C8957125FD8B9FFE685901B</code> <code>2896275DF86ADF8A0BC40DEC764CE995</code> <code>9232A27A7A5D34EB0C31B6876A5E2E7B</code> <code>7F0C730265EEF0877AC1B732D67E579A</code> <code>CFA1E4F0272102E94916D5FAD83FA212</code> <code>A77B741BCC2BC2F182523373C91ACF85</code> <code>D30923F2FAFF5C085E93306B513CB7F9</code> <code>DFF9852F687724046FDDF213CB286B2E</code> <code>9E55616DB481AB6AC0EF7581F67BF180</code> <code>38FB19263E5D395367D5AEEB30C698F0</code> <code>EF1EA0BB449B08CDF433998AFC8963B3</code> <code>BC0888B9B2A418C7E325E16A9B53B8B2</code> <code>094415AA1AEFFA3E5E6F2BCAB1A51145</code> <code>F5FCB2C7A04074224DC36BA5A58DAB01</code> <code>DB6D324E6B6914DE6940B2E8A42E77BE</code> <code>EB60638B7ED01C612E4E76B97E46C160</code> <code>F023D6B9C019D4839934A444A32CDC2A</code> <code>0DD89FEBD8FD4DC8BD4402B609F28172</code> <code>C50B0E8EA6857CBAEAC75DC05064ADCE</code> <code>D0F5E1F0576940F90106A8A64D4B34EF</code> <code>EA6BA26144F61BFE270078648B08744D</code> <code>0087A3B0F9F9FFF5002719B7793A9BFA</code> <code>7DE840F43049990961F486A23890CB0E</code> <code>5D9B9E2DDE94A95BBE13A4E34CD4A190</code> <code>0AFDE0E290A98AB2D313ECAB03A1C06D</code> <code>090BE66265372E7BC692DB9125AC04F6</code> <code>5805D8B60360A0DBE4CD5CB85A911DAA</code> <code>29328A4903B62F6F898C5913AF01756F</code> <code>1CB808C9D171226925511BE9D632A5C2</code> <code>5ED67CEC0DC34A2A3E45A0B87D58B69D</code> <code>41081F02B02AC3203EEAEA6BD2CF36F5</code><br> <code>7124FDCE</code></td>
<td><code>FE5002006D38D07AA7A5E4476DEF5894</code> <code>496B331D11D251B604F9C10CD45BE378</code> <code>C301377CB295D785F8607B6F7020FE24</code> <code>DF66007FBB817984D58812FF38C11D4F</code> <code>FE591BE0A651AF4ADC291966A05956C7</code> <code>EB51C50BD57E2679F2753C4E5F14873A</code> <code>95ACC796105819EB143CFF3E4DEDC0FB</code> <code>2E1F75A565FA41F7C44C753F2DFA344C</code> <code>40861EF3C1EFEC107D7199EA30EFF123</code> <code>A7169C76879705F81AD6A9FD21B6BE69</code> <code>99900ACD62A2E6BBCA44DAB445838E48</code> <code>AC165AAA092400295EA622E74C19CE4D</code> <code>C4E0984EF2011CB068BCF0AF5E7F5A4A</code> <code>F0E5315E58A7796EF34BC39E913464E0</code> <code>65AB7283CC7AA35E18C0A5D20AFE51C5</code> <code>A413B5ECE4FC22E806C04599DF6E849B</code> <code>A9F1A7EEA767FAFFF04EB5D9876C7806</code> <code>5F619769CD4F73DFEC4361B70A305C77</code> <code>833E84DBBA00573A5CC062ED1D75A68F</code> <code>5CED0B19290B1D0F8E434FF51886A431</code> <code>677EB32E029A9B899A05098D359AE555</code> <code>51EE61B04EE0D79A230C127B9A682D3C</code> <code>4B49EDBF6C7B1B98125FD34666FC365D</code> <code>10B1AF3A67BC9EDD50E977C48C619E9B</code> <code>604CCCD539E95B7E0DD647E573D16147</code> <code>64E8E1D9A017CD0C239A2AA168B27515</code> <code>20689A0698BEFEC854ACD3ED7374316A</code> <code>1F3D80C50D1854126AB79BEADC918C3F</code> <code>012E5080FA85C6C2EAC4709ABCB4A93D</code> <code>EF996CEE8DF7B8B1707C7C01D0B61841</code> <code>0E4FD6AA2BB813C0127C5767E4F495C2</code> <code>F0CA6C35CDF9D7B94E8F1D7BAA6E510B</code> <code>34AF4E3E4CD746E34D21B02675D9DCC0</code> <code>08EA88E2845220E6E98C2B246AF479CB</code> <code>938C16D33CE15BA63F17E4CDFFC011CA</code> <code>98B26FBCA274E3CAD4D42CDEF8091C0D</code> <code>BA673A645C0E79F0DB081C9AF66C14EC</code><br> <code>1810D82E</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 4152FDA2C238E2874D9E0FADFE547195489786640FDCBF7AEC9AEFD18
<!-- 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 = EFEEF803D63527212D154C9D657B4AC42D0688AC04064DB1085B51F2F30AF6B4D1F9209DE819A5AD700F1C9FDD0B77CC40A0435CA539E52550531682000210B894DBD835CDD45FA318DF6867B3078A2499D2E0A77C6DEDD0F172E8D5349290946C8957125FD8B9FFE685901B2896275DF86ADF8A0BC40DEC764CE9959232A27A7A5D34EB0C31B6876A5E2E7B7F0C730265EEF0877AC1B732D67E579ACFA1E4F0272102E94916D5FAD83FA212A77B741BCC2BC2F182523373C91ACF85D30923F2FAFF5C085E93306B513CB7F9DFF9852F687724046FDDF213CB286B2E9E55616DB481AB6AC0EF7581F67BF18038FB19263E5D395367D5AEEB30C698F0EF1EA0BB449B08CDF433998AFC8963B3BC0888B9B2A418C7E325E16A9B53B8B2094415AA1AEFFA3E5E6F2BCAB1A51145F5FCB2C7A04074224DC36BA5A58DAB01DB6D324E6B6914DE6940B2E8A42E77BEEB60638B7ED01C612E4E76B97E46C160F023D6B9C019D4839934A444A32CDC2A0DD89FEBD8FD4DC8BD4402B609F28172C50B0E8EA6857CBAEAC75DC05064ADCED0F5E1F0576940F90106A8A64D4B34EFEA6BA26144F61BFE270078648B08744D0087A3B0F9F9FFF5002719B7793A9BFA7DE840F43049990961F486A23890CB0E5D9B9E2DDE94A95BBE13A4E34CD4A1900AFDE0E290A98AB2D313ECAB03A1C06D090BE66265372E7BC692DB9125AC04F65805D8B60360A0DBE4CD5CB85A911DAA29328A4903B62F6F898C5913AF01756F1CB808C9D171226925511BE9D632A5C25ED67CEC0DC34A2A3E45A0B87D58B69D41081F02B02AC3203EEAEA6BD2CF36F57124FDCE
tmp_aes_key = 080DA9E05172968714AF9C8E91343901A142E5CB189A138DC1C3EE1C63F22B7C
tmp_aes_iv = 495338BB912C906CF13D1E6101F7D81735ABFAE146A2F19A7F2EC16A1293829C</code></pre>
<pre><code>encrypted_answer = 6D38D07AA7A5E4476DEF5894496B331D11D251B604F9C10CD45BE378C301377CB295D785F8607B6F7020FE24DF66007FBB817984D58812FF38C11D4FFE591BE0A651AF4ADC291966A05956C7EB51C50BD57E2679F2753C4E5F14873A95ACC796105819EB143CFF3E4DEDC0FB2E1F75A565FA41F7C44C753F2DFA344C40861EF3C1EFEC107D7199EA30EFF123A7169C76879705F81AD6A9FD21B6BE6999900ACD62A2E6BBCA44DAB445838E48AC165AAA092400295EA622E74C19CE4DC4E0984EF2011CB068BCF0AF5E7F5A4AF0E5315E58A7796EF34BC39E913464E065AB7283CC7AA35E18C0A5D20AFE51C5A413B5ECE4FC22E806C04599DF6E849BA9F1A7EEA767FAFFF04EB5D9876C78065F619769CD4F73DFEC4361B70A305C77833E84DBBA00573A5CC062ED1D75A68F5CED0B19290B1D0F8E434FF51886A431677EB32E029A9B899A05098D359AE55551EE61B04EE0D79A230C127B9A682D3C4B49EDBF6C7B1B98125FD34666FC365D10B1AF3A67BC9EDD50E977C48C619E9B604CCCD539E95B7E0DD647E573D1614764E8E1D9A017CD0C239A2AA168B2751520689A0698BEFEC854ACD3ED7374316A1F3D80C50D1854126AB79BEADC918C3F012E5080FA85C6C2EAC4709ABCB4A93DEF996CEE8DF7B8B1707C7C01D0B618410E4FD6AA2BB813C0127C5767E4F495C2F0CA6C35CDF9D7B94E8F1D7BAA6E510B34AF4E3E4CD746E34D21B02675D9DCC008EA88E2845220E6E98C2B246AF479CB938C16D33CE15BA63F17E4CDFFC011CA98B26FBCA274E3CAD4D42CDEF8091C0DBA673A645C0E79F0DB081C9AF66C14EC1810D82E
tmp_aes_key = 8F1B855F685543EEBC158D37252B4C1609AFBD767149C011C89005DCA2BA9EE4
tmp_aes_iv = D332730E4F33F366440193503837B56ADB3667C4B76F079787BB40D8CA938BA9</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = D8B49B780EE0EFEC0C7CE08F534621D6A03A2BCABA0D89B58079E16E867BC482F9B48E2488E954B3AF73D51E13D1A92559213C56961D02F803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100C5325311ADFFE69972D90622CCA1BEEFC865A493A8AB7ED9C59F9C46DE4455CEFF6369538B6EDB45A2B0463AC2B77FE7DC0B48E8F2C4DF7E7C0CD007A16BD2F44AECF5A1C18FDD65E266B304107843650DCF09B46E0979F23DDB43EBDFF590D0E28675C2BF13081B0E3EF9B09CBE1034B49DBA936ECA4E00C0CCF4F928EBCEE5579EE53ABA0752EC0A8ECEFD96847A32778D49E1DEBFFB4C29101E30AA235BF55D15B6D5198A2912B1810DAB2A97DBA3EF30CD9E6EE108F3B259149CAD84754B1AB7DC8311D9B61C9161A030931FFE046CEE5026E87ECBBA3EDB0763A193639233360E24A78B4076ED6829878414F6D48FCC9E7CAD7F44E257F02DBD9BBB32A6F31E386592A592AEF4E86100
answer = BA0D89B58079E16E867BC482F9B48E2488E954B3AF73D51E13D1A92559213C56961D02F803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100C5325311ADFFE69972D90622CCA1BEEFC865A493A8AB7ED9C59F9C46DE4455CEFF6369538B6EDB45A2B0463AC2B77FE7DC0B48E8F2C4DF7E7C0CD007A16BD2F44AECF5A1C18FDD65E266B304107843650DCF09B46E0979F23DDB43EBDFF590D0E28675C2BF13081B0E3EF9B09CBE1034B49DBA936ECA4E00C0CCF4F928EBCEE5579EE53ABA0752EC0A8ECEFD96847A32778D49E1DEBFFB4C29101E30AA235BF55D15B6D5198A2912B1810DAB2A97DBA3EF30CD9E6EE108F3B259149CAD84754B1AB7DC8311D9B61C9161A030931FFE046CEE5026E87ECBBA3EDB0763A193639233360E24A78B4076ED6829878414F6D48FCC9E7CAD7F44E257F02DBD9BBB32A6F31E386592A592AEF4E86100</code></pre>
<pre><code>answer_with_hash = 328A6890300E40B3594EDC2AF8A58EF65F882214BA0D89B55BC47540D7800CF2570E01B20E7AC496A35BC5BCD178477579576832EFF8E63F03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002C51E6585757AC05CDE65EAA95E45B3990882F39471D8A371C6C2506A3E642FAAEDF28D26A270C6DA89A5B23DAE7D53285907089B0D13BFC9823AB87E5443AE44636F7E2E553E7E70B750FCCFE78AABB50A148DB0F56809E864EF221BF0896E58262DFA8DD07CEB4907613D2221A9BE437753324AB71354F0AA4F0653B57C99B3B042B9512E457766E84C4271C476998F345A9AF97E8D4F3D5B936484354ACE0EF3D05D16907C5AC596274F774544965EEE315E48AFF8DC6766B5F53037EADBDEF5570AB5ED831F517BB5845A6BFB4D57B93ECCEC292328D10018EE45D177273E8E891CD7A3DC0F33EDFA4451C0C7B27959D49E2BCA10CD6AF261B6C0955CA81AF813A652CDC093CF0112680
answer = BA0D89B55BC47540D7800CF2570E01B20E7AC496A35BC5BCD178477579576832EFF8E63F03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002C51E6585757AC05CDE65EAA95E45B3990882F39471D8A371C6C2506A3E642FAAEDF28D26A270C6DA89A5B23DAE7D53285907089B0D13BFC9823AB87E5443AE44636F7E2E553E7E70B750FCCFE78AABB50A148DB0F56809E864EF221BF0896E58262DFA8DD07CEB4907613D2221A9BE437753324AB71354F0AA4F0653B57C99B3B042B9512E457766E84C4271C476998F345A9AF97E8D4F3D5B936484354ACE0EF3D05D16907C5AC596274F774544965EEE315E48AFF8DC6766B5F53037EADBDEF5570AB5ED831F517BB5845A6BFB4D57B93ECCEC292328D10018EE45D177273E8E891CD7A3DC0F33EDFA4451C0C7B27959D49E2BCA10CD6AF261B6C0955CA81AF813A652CDC093CF0112680</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 80 79 E1 6E 86 7B C4 82 F9 B4 8E 24
0010 | 88 E9 54 B3 AF 73 D5 1E 13 D1 A9 25 59 21 3C 56
0020 | 96 1D 02 F8 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 5B C4 75 40 D7 80 0C F2 57 0E 01 B2
0010 | 0E 7A C4 96 A3 5B C5 BC D1 78 47 75 79 57 68 32
0020 | EF F8 E6 3F 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 = BA0D89B58079E16E867BC482F9B48E2488E954B3AF73D51E13D1A92559213C56961D02F
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 | C5 32 53 11 AD FF E6 99 72 D9 06 22 CC A1 BE EF
0140 | C8 65 A4 93 A8 AB 7E D9 C5 9F 9C 46 DE 44 55 CE
0150 | FF 63 69 53 8B 6E DB 45 A2 B0 46 3A C2 B7 7F E7
0160 | DC 0B 48 E8 F2 C4 DF 7E 7C 0C D0 07 A1 6B D2 F4
0170 | 4A EC F5 A1 C1 8F DD 65 E2 66 B3 04 10 78 43 65
0180 | 0D CF 09 B4 6E 09 79 F2 3D DB 43 EB DF F5 90 D0
0190 | E2 86 75 C2 BF 13 08 1B 0E 3E F9 B0 9C BE 10 34
01A0 | B4 9D BA 93 6E CA 4E 00 C0 CC F4 F9 28 EB CE E5
01B0 | 57 9E E5 3A BA 07 52 EC 0A 8E CE FD 96 84 7A 32
01C0 | 77 8D 49 E1 DE BF FB 4C 29 10 1E 30 AA 23 5B F5
01D0 | 5D 15 B6 D5 19 8A 29 12 B1 81 0D AB 2A 97 DB A3
01E0 | EF 30 CD 9E 6E E1 08 F3 B2 59 14 9C AD 84 75 4B
01F0 | 1A B7 DC 83 11 D9 B6 1C 91 61 A0 30 93 1F FE 04
0200 | 6C EE 50 26 E8 7E CB BA 3E DB 07 63 A1 93 63 92
0210 | 33 36 0E 24 A7 8B 40 76 ED 68 29 87 84 14 F6 D4
0220 | 8F CC 9E 7C AD 7F 44 E2 57 F0 2D BD 9B BB 32 A6
0230 | F3 1E 38 65</code></pre>
0130 | 2C 51 E6 58 57 57 AC 05 CD E6 5E AA 95 E4 5B 39
0140 | 90 88 2F 39 47 1D 8A 37 1C 6C 25 06 A3 E6 42 FA
0150 | AE DF 28 D2 6A 27 0C 6D A8 9A 5B 23 DA E7 D5 32
0160 | 85 90 70 89 B0 D1 3B FC 98 23 AB 87 E5 44 3A E4
0170 | 46 36 F7 E2 E5 53 E7 E7 0B 75 0F CC FE 78 AA BB
0180 | 50 A1 48 DB 0F 56 80 9E 86 4E F2 21 BF 08 96 E5
0190 | 82 62 DF A8 DD 07 CE B4 90 76 13 D2 22 1A 9B E4
01A0 | 37 75 33 24 AB 71 35 4F 0A A4 F0 65 3B 57 C9 9B
01B0 | 3B 04 2B 95 12 E4 57 76 6E 84 C4 27 1C 47 69 98
01C0 | F3 45 A9 AF 97 E8 D4 F3 D5 B9 36 48 43 54 AC E0
01D0 | EF 3D 05 D1 69 07 C5 AC 59 62 74 F7 74 54 49 65
01E0 | EE E3 15 E4 8A FF 8D C6 76 6B 5F 53 03 7E AD BD
01F0 | EF 55 70 AB 5E D8 31 F5 17 BB 58 45 A6 BF B4 D5
0200 | 7B 93 EC CE C2 92 32 8D 10 01 8E E4 5D 17 72 73
0210 | E8 E8 91 CD 7A 3D C0 F3 3E DF A4 45 1C 0C 7B 27
0220 | 95 9D 49 E2 BC A1 0C D6 AF 26 1B 6C 09 55 CA 81
0230 | AF 81 3A 65</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
<table class="table">
@ -570,13 +570,13 @@ answer = BA0D89B58079E16E867BC482F9B48E2488E954B3AF73D51E13D1A92559213C56961D02F
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>8079E16E867BC482F9B48E2488E954B3</code></td>
<td><code>5BC47540D7800CF2570E01B20E7AC496</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>AF73D51E13D1A92559213C56961D02F8</code></td>
<td><code>A35BC5BCD178477579576832EFF8E63F</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B58079E16E867BC482F9B48E2488E954B3AF73D51E13D1A92559213C56961D02F
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE000100C5325311ADFFE69972D90622</code> <code>CCA1BEEFC865A493A8AB7ED9C59F9C46</code> <code>DE4455CEFF6369538B6EDB45A2B0463A</code> <code>C2B77FE7DC0B48E8F2C4DF7E7C0CD007</code> <code>A16BD2F44AECF5A1C18FDD65E266B304</code> <code>107843650DCF09B46E0979F23DDB43EB</code> <code>DFF590D0E28675C2BF13081B0E3EF9B0</code> <code>9CBE1034B49DBA936ECA4E00C0CCF4F9</code> <code>28EBCEE5579EE53ABA0752EC0A8ECEFD</code> <code>96847A32778D49E1DEBFFB4C29101E30</code> <code>AA235BF55D15B6D5198A2912B1810DAB</code> <code>2A97DBA3EF30CD9E6EE108F3B259149C</code> <code>AD84754B1AB7DC8311D9B61C9161A030</code> <code>931FFE046CEE5026E87ECBBA3EDB0763</code> <code>A193639233360E24A78B4076ED682987</code> <code>8414F6D48FCC9E7CAD7F44E257F02DBD</code><br> <code>9BBB32A6</code></td>
<td><code>FE0001002C51E6585757AC05CDE65EAA</code> <code>95E45B3990882F39471D8A371C6C2506</code> <code>A3E642FAAEDF28D26A270C6DA89A5B23</code> <code>DAE7D53285907089B0D13BFC9823AB87</code> <code>E5443AE44636F7E2E553E7E70B750FCC</code> <code>FE78AABB50A148DB0F56809E864EF221</code> <code>BF0896E58262DFA8DD07CEB4907613D2</code> <code>221A9BE437753324AB71354F0AA4F065</code> <code>3B57C99B3B042B9512E457766E84C427</code> <code>1C476998F345A9AF97E8D4F3D5B93648</code> <code>4354ACE0EF3D05D16907C5AC596274F7</code> <code>74544965EEE315E48AFF8DC6766B5F53</code> <code>037EADBDEF5570AB5ED831F517BB5845</code> <code>A6BFB4D57B93ECCEC292328D10018EE4</code> <code>5D177273E8E891CD7A3DC0F33EDFA445</code> <code>1C0C7B27959D49E2BCA10CD6AF261B6C</code><br> <code>0955CA81</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>F31E3865</code> (1698176755 in decimal)</td>
<td><code>AF813A65</code> (1698333103 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B58079E16E867BC482F9B48E2488E954B3AF73D51E13D1A92559213C56961D02F
<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 = 6D2A58D0BEE6590111486859CD31894613AB8D54F482D3F6F00B0BB2EF5477D2BAA0C95923DE65F3A377225E21E928D51CE6E172767DA9A61EC7DF5BE8232697D9760F120373E4D7662BACA15172E886872730827946B2BCC4548BC28C788273DF8047B43BB71DBA454C68C5E3764F72B702234ACAD127E09F8E120A928664D5AE424E42B045D48D21600947E2CE1B57CA224D6F3A96435705E777984AFBB3CAC8E1E25D4177769053C6C23E62C231B662789373480B8F77CF60849F21ADE9722850927587B08B664222F652C14F78BE126F24CC22B11792FC2D43E7E6E6285D0AF857A221EBD8C6111773B0A0B6DBC6D34BB7B53D0BD8E685874A108A1F3BFB</code></pre>
<pre><code>b = 22364BC52FE22E197509E17EC88E8EAC8EC6C4A9977437747BCB7615E28F964E8ED7B414617CDD0A892C756DA23376894C0AE7D85C7D6D951535AABB60212A21CB3D7C6C13186DE1D416412B0ACDC53C360F7A08CD032A635AE1AB2B901FE6DF9C5DB62BCDB8226749098824109B4284047463B36582B497CB6408B3D92CB1AA2C578398AB9CB85DFC575F6647C0BBAD892A20C0F73EA564C0B68F48444221AC0E23FB849FC5D294328C7019F251B0373A72A30F44CAE7A45BECC3BC90A978C4AF2F05B3C2A98BC972164054DB153C6DF033B747C42E21A49091705CD6B7614D0A3C132BE3435A04E2FA3A1FD42ED1A5D94E8FC6AC0BFF4552D7453B3BBDF340</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 = 0626BC9CE2117393C48CB279242C068CCDF636D364F38A119E9D551778F62B4E04807A3F604D69464E49B30F60479BB952376D72276D6E87408CA34745A0C35E7E4E505DCA1EEB233C4D4FB00CDC1B1B7414CB50A6A017F3E8F038814CECE50676FBB9CA533E8A23FD69A3AB17DDFD9BE10713214CF6DEE327B005A358697D4D56C3529EDB238C280A6C2D75314E9B49CDAC0FB1D2D22B7BCF6302AE315BE029477F4E01F28E07F825DEB486522788FB0ECFE3D852FFFD4092336E68EBDE6F9908F32694EDD4537384DB149BFAB09321B27362F9DB405D8427584BC02B36F5B735EBE90C8FACB837971C166DF683EB8FD0BC38E96F09504B8161215494B29605</code></pre>
<pre><code>g_b = 962D9EAC96083ADEC9DBD5147CC105C7EBF175FC65DF93DC9AE66BBED609687673ECB29FD81A5150663D1673FB78758E8131B9328C6328750DEC1AF449B7FF15E39D5BA24958204267730E4B8897A7FCC41043B2B748AD22CCA6F67F1D6AC873E9AE4EADD39ADF32705B4BF78D3C250F97A8C80FE03845CB8DE483AB646AF8ADCFCBB554346E4C4ED3F3886DC111787F3271A8A71214F1F89FE45C68F7624B1D62D66950E6AFE3AFAF4601636C81361FC01A397BB606CC54FBC70042870EA521160F509963AE1E90778135B1458980D47C663FF34BDE1666433C33DE04335608305F0E1849107B1A6D733CCB9B951D40477D58B5515E41DEE9D7ECD8785E5927</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 80 79 E1 6E 86 7B C4 82 F9 B4 8E 24
0010 | 88 E9 54 B3 AF 73 D5 1E 13 D1 A9 25 59 21 3C 56
0020 | 96 1D 02 F8 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 06 26 BC 9C E2 11 73 93 C4 8C B2 79 24 2C 06 8C
0040 | CD F6 36 D3 64 F3 8A 11 9E 9D 55 17 78 F6 2B 4E
0050 | 04 80 7A 3F 60 4D 69 46 4E 49 B3 0F 60 47 9B B9
0060 | 52 37 6D 72 27 6D 6E 87 40 8C A3 47 45 A0 C3 5E
0070 | 7E 4E 50 5D CA 1E EB 23 3C 4D 4F B0 0C DC 1B 1B
0080 | 74 14 CB 50 A6 A0 17 F3 E8 F0 38 81 4C EC E5 06
0090 | 76 FB B9 CA 53 3E 8A 23 FD 69 A3 AB 17 DD FD 9B
00A0 | E1 07 13 21 4C F6 DE E3 27 B0 05 A3 58 69 7D 4D
00B0 | 56 C3 52 9E DB 23 8C 28 0A 6C 2D 75 31 4E 9B 49
00C0 | CD AC 0F B1 D2 D2 2B 7B CF 63 02 AE 31 5B E0 29
00D0 | 47 7F 4E 01 F2 8E 07 F8 25 DE B4 86 52 27 88 FB
00E0 | 0E CF E3 D8 52 FF FD 40 92 33 6E 68 EB DE 6F 99
00F0 | 08 F3 26 94 ED D4 53 73 84 DB 14 9B FA B0 93 21
0100 | B2 73 62 F9 DB 40 5D 84 27 58 4B C0 2B 36 F5 B7
0110 | 35 EB E9 0C 8F AC B8 37 97 1C 16 6D F6 83 EB 8F
0120 | D0 BC 38 E9 6F 09 50 4B 81 61 21 54 94 B2 96 05</code></pre>
<pre><code>0000 | 54 B6 43 66 5B C4 75 40 D7 80 0C F2 57 0E 01 B2
0010 | 0E 7A C4 96 A3 5B C5 BC D1 78 47 75 79 57 68 32
0020 | EF F8 E6 3F 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 96 2D 9E AC 96 08 3A DE C9 DB D5 14 7C C1 05 C7
0040 | EB F1 75 FC 65 DF 93 DC 9A E6 6B BE D6 09 68 76
0050 | 73 EC B2 9F D8 1A 51 50 66 3D 16 73 FB 78 75 8E
0060 | 81 31 B9 32 8C 63 28 75 0D EC 1A F4 49 B7 FF 15
0070 | E3 9D 5B A2 49 58 20 42 67 73 0E 4B 88 97 A7 FC
0080 | C4 10 43 B2 B7 48 AD 22 CC A6 F6 7F 1D 6A C8 73
0090 | E9 AE 4E AD D3 9A DF 32 70 5B 4B F7 8D 3C 25 0F
00A0 | 97 A8 C8 0F E0 38 45 CB 8D E4 83 AB 64 6A F8 AD
00B0 | CF CB B5 54 34 6E 4C 4E D3 F3 88 6D C1 11 78 7F
00C0 | 32 71 A8 A7 12 14 F1 F8 9F E4 5C 68 F7 62 4B 1D
00D0 | 62 D6 69 50 E6 AF E3 AF AF 46 01 63 6C 81 36 1F
00E0 | C0 1A 39 7B B6 06 CC 54 FB C7 00 42 87 0E A5 21
00F0 | 16 0F 50 99 63 AE 1E 90 77 81 35 B1 45 89 80 D4
0100 | 7C 66 3F F3 4B DE 16 66 43 3C 33 DE 04 33 56 08
0110 | 30 5F 0E 18 49 10 7B 1A 6D 73 3C CB 9B 95 1D 40
0120 | 47 7D 58 B5 51 5E 41 DE E9 D7 EC D8 78 5E 59 27</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 = BA0D89B58079E16E867BC482F9B48E2488E954B3AF73D51E13D1A92559213C56961D02F
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>8079E16E867BC482F9B48E2488E954B3</code></td>
<td><code>5BC47540D7800CF2570E01B20E7AC496</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>AF73D51E13D1A92559213C56961D02F8</code></td>
<td><code>A35BC5BCD178477579576832EFF8E63F</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE0001000626BC9CE2117393C48CB279</code> <code>242C068CCDF636D364F38A119E9D5517</code> <code>78F62B4E04807A3F604D69464E49B30F</code> <code>60479BB952376D72276D6E87408CA347</code> <code>45A0C35E7E4E505DCA1EEB233C4D4FB0</code> <code>0CDC1B1B7414CB50A6A017F3E8F03881</code> <code>4CECE50676FBB9CA533E8A23FD69A3AB</code> <code>17DDFD9BE10713214CF6DEE327B005A3</code> <code>58697D4D56C3529EDB238C280A6C2D75</code> <code>314E9B49CDAC0FB1D2D22B7BCF6302AE</code> <code>315BE029477F4E01F28E07F825DEB486</code> <code>522788FB0ECFE3D852FFFD4092336E68</code> <code>EBDE6F9908F32694EDD4537384DB149B</code> <code>FAB09321B27362F9DB405D8427584BC0</code> <code>2B36F5B735EBE90C8FACB837971C166D</code> <code>F683EB8FD0BC38E96F09504B81612154</code><br> <code>94B29605</code></td>
<td><code>FE000100962D9EAC96083ADEC9DBD514</code> <code>7CC105C7EBF175FC65DF93DC9AE66BBE</code> <code>D609687673ECB29FD81A5150663D1673</code> <code>FB78758E8131B9328C6328750DEC1AF4</code> <code>49B7FF15E39D5BA24958204267730E4B</code> <code>8897A7FCC41043B2B748AD22CCA6F67F</code> <code>1D6AC873E9AE4EADD39ADF32705B4BF7</code> <code>8D3C250F97A8C80FE03845CB8DE483AB</code> <code>646AF8ADCFCBB554346E4C4ED3F3886D</code> <code>C111787F3271A8A71214F1F89FE45C68</code> <code>F7624B1D62D66950E6AFE3AFAF460163</code> <code>6C81361FC01A397BB606CC54FBC70042</code> <code>870EA521160F509963AE1E90778135B1</code> <code>458980D47C663FF34BDE1666433C33DE</code> <code>04335608305F0E1849107B1A6D733CCB</code> <code>9B951D40477D58B5515E41DEE9D7ECD8</code><br> <code>785E5927</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 = BA0D89B58079E16E867BC482F9B48E2488E954B3AF73D51E13D1A92559213C56961D02F
<!-- 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 = 54B643668079E16E867BC482F9B48E2488E954B3AF73D51E13D1A92559213C56961D02F80000000000000000FE0001000626BC9CE2117393C48CB279242C068CCDF636D364F38A119E9D551778F62B4E04807A3F604D69464E49B30F60479BB952376D72276D6E87408CA34745A0C35E7E4E505DCA1EEB233C4D4FB00CDC1B1B7414CB50A6A017F3E8F038814CECE50676FBB9CA533E8A23FD69A3AB17DDFD9BE10713214CF6DEE327B005A358697D4D56C3529EDB238C280A6C2D75314E9B49CDAC0FB1D2D22B7BCF6302AE315BE029477F4E01F28E07F825DEB486522788FB0ECFE3D852FFFD4092336E68EBDE6F9908F32694EDD4537384DB149BFAB09321B27362F9DB405D8427584BC02B36F5B735EBE90C8FACB837971C166DF683EB8FD0BC38E96F09504B8161215494B29605
padding = 7857EE13181263277AE0ADF9
tmp_aes_key = 080DA9E05172968714AF9C8E91343901A142E5CB189A138DC1C3EE1C63F22B7C
tmp_aes_iv = 495338BB912C906CF13D1E6101F7D81735ABFAE146A2F19A7F2EC16A1293829C</code></pre>
<pre><code>data = 54B643665BC47540D7800CF2570E01B20E7AC496A35BC5BCD178477579576832EFF8E63F0000000000000000FE000100962D9EAC96083ADEC9DBD5147CC105C7EBF175FC65DF93DC9AE66BBED609687673ECB29FD81A5150663D1673FB78758E8131B9328C6328750DEC1AF449B7FF15E39D5BA24958204267730E4B8897A7FCC41043B2B748AD22CCA6F67F1D6AC873E9AE4EADD39ADF32705B4BF78D3C250F97A8C80FE03845CB8DE483AB646AF8ADCFCBB554346E4C4ED3F3886DC111787F3271A8A71214F1F89FE45C68F7624B1D62D66950E6AFE3AFAF4601636C81361FC01A397BB606CC54FBC70042870EA521160F509963AE1E90778135B1458980D47C663FF34BDE1666433C33DE04335608305F0E1849107B1A6D733CCB9B951D40477D58B5515E41DEE9D7ECD8785E5927
padding = F7543DED13D642559C6340C5
tmp_aes_key = 8F1B855F685543EEBC158D37252B4C1609AFBD767149C011C89005DCA2BA9EE4
tmp_aes_iv = D332730E4F33F366440193503837B56ADB3667C4B76F079787BB40D8CA938BA9</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 = 5CD0C82F80942D51715459C037E1458D7C1462F593E011D2AE4760446F37478B954E7096043F465A728D909ED915705D0AFF9A065D41934A3339B39DCC227495593B50AE231623D42ADAF20CA895BECEBF500B840B4B04D68EDA601BFFF53F9B9991B8C355CAA67A4E8C5ED8E4531C7143554CF380C447FB38C5951597186CE04B32779048B0417E5F12757AFF123FD4817999312A7875CC4F6E566B286FE131A41AF4725757762994184796855C9A296BAA2B6364E73037BEE0637C0FD8345EFBD1F572E0B90D130065F8F6CA449D3D0ED1C759C930C803559E4A42C33BA1D046A406AB5E5A8C9A5D5066854AE4B635621C21F84F4CB55D304EC8F3665ADB59FA5A614F03E33835972567009D1CC32A6232E8551B9966E0BDEDF34AC74FE62372E9ABA32FCC5CE234315379598509721BE36A522B3C55DBAE92DD0FEA088E2356FC14960D4A0EDAAFAAFFA70CAE707C</code></pre>
<pre><code>encrypted_data = C4AF8EC9E830FADDE7B443E428C8FC181874C57FA121D51B966C24B5DDDF6BED72756F18F8C4904FD5E30D732D43F0171AB9141C4D04B5B69FA8F78AC247FD458CAA619373DDC95AC4FD8B9C5614298E4B59C3EE63C04B430E836B2122B55937B0702128255C4E5A15D2072A0E1A2C2E05E651C41124DC504818991E11AA115E31E25547574B7596EDC3662013A07DCD01724E28C3D8A5AD31ADFF95C06A60BFBEBB605F0B48A6AB4C312BB6EFA999CE5F704E684E7B47EE06E582495E79DBE8A201FD025ED31C911C61B24FD3811E9D519C3EF64F78E332995B101C86A6647D51EEEFF0FB369B6623A90E12E30C77724A2DB8BFC5E88A8607750FFF28D53BF2A693383DB9A7ABCEA53D07BB97F6EE97B12AB21EE93B0A84BACC25F609972A3D715FC1E05E6300713AF5C46FC158C355045A4AF73C369C11A2ACCB4EEF5A0F32AE003B2C283B387F23D91D1FCEA69FB0</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 D4 CE 0A 00 F7 1E 38 65
0010 | 78 01 00 00 1F 5F 04 F5 80 79 E1 6E 86 7B C4 82
0020 | F9 B4 8E 24 88 E9 54 B3 AF 73 D5 1E 13 D1 A9 25
0030 | 59 21 3C 56 96 1D 02 F8 FE 50 01 00 5C D0 C8 2F
0040 | 80 94 2D 51 71 54 59 C0 37 E1 45 8D 7C 14 62 F5
0050 | 93 E0 11 D2 AE 47 60 44 6F 37 47 8B 95 4E 70 96
0060 | 04 3F 46 5A 72 8D 90 9E D9 15 70 5D 0A FF 9A 06
0070 | 5D 41 93 4A 33 39 B3 9D CC 22 74 95 59 3B 50 AE
0080 | 23 16 23 D4 2A DA F2 0C A8 95 BE CE BF 50 0B 84
0090 | 0B 4B 04 D6 8E DA 60 1B FF F5 3F 9B 99 91 B8 C3
00A0 | 55 CA A6 7A 4E 8C 5E D8 E4 53 1C 71 43 55 4C F3
00B0 | 80 C4 47 FB 38 C5 95 15 97 18 6C E0 4B 32 77 90
00C0 | 48 B0 41 7E 5F 12 75 7A FF 12 3F D4 81 79 99 31
00D0 | 2A 78 75 CC 4F 6E 56 6B 28 6F E1 31 A4 1A F4 72
00E0 | 57 57 76 29 94 18 47 96 85 5C 9A 29 6B AA 2B 63
00F0 | 64 E7 30 37 BE E0 63 7C 0F D8 34 5E FB D1 F5 72
0100 | E0 B9 0D 13 00 65 F8 F6 CA 44 9D 3D 0E D1 C7 59
0110 | C9 30 C8 03 55 9E 4A 42 C3 3B A1 D0 46 A4 06 AB
0120 | 5E 5A 8C 9A 5D 50 66 85 4A E4 B6 35 62 1C 21 F8
0130 | 4F 4C B5 5D 30 4E C8 F3 66 5A DB 59 FA 5A 61 4F
0140 | 03 E3 38 35 97 25 67 00 9D 1C C3 2A 62 32 E8 55
0150 | 1B 99 66 E0 BD ED F3 4A C7 4F E6 23 72 E9 AB A3
0160 | 2F CC 5C E2 34 31 53 79 59 85 09 72 1B E3 6A 52
0170 | 2B 3C 55 DB AE 92 DD 0F EA 08 8E 23 56 FC 14 96
0180 | 0D 4A 0E DA AF AA FF A7 0C AE 70 7C</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 7C AC 0E 00 B3 81 3A 65
0010 | 78 01 00 00 1F 5F 04 F5 5B C4 75 40 D7 80 0C F2
0020 | 57 0E 01 B2 0E 7A C4 96 A3 5B C5 BC D1 78 47 75
0030 | 79 57 68 32 EF F8 E6 3F FE 50 01 00 C4 AF 8E C9
0040 | E8 30 FA DD E7 B4 43 E4 28 C8 FC 18 18 74 C5 7F
0050 | A1 21 D5 1B 96 6C 24 B5 DD DF 6B ED 72 75 6F 18
0060 | F8 C4 90 4F D5 E3 0D 73 2D 43 F0 17 1A B9 14 1C
0070 | 4D 04 B5 B6 9F A8 F7 8A C2 47 FD 45 8C AA 61 93
0080 | 73 DD C9 5A C4 FD 8B 9C 56 14 29 8E 4B 59 C3 EE
0090 | 63 C0 4B 43 0E 83 6B 21 22 B5 59 37 B0 70 21 28
00A0 | 25 5C 4E 5A 15 D2 07 2A 0E 1A 2C 2E 05 E6 51 C4
00B0 | 11 24 DC 50 48 18 99 1E 11 AA 11 5E 31 E2 55 47
00C0 | 57 4B 75 96 ED C3 66 20 13 A0 7D CD 01 72 4E 28
00D0 | C3 D8 A5 AD 31 AD FF 95 C0 6A 60 BF BE BB 60 5F
00E0 | 0B 48 A6 AB 4C 31 2B B6 EF A9 99 CE 5F 70 4E 68
00F0 | 4E 7B 47 EE 06 E5 82 49 5E 79 DB E8 A2 01 FD 02
0100 | 5E D3 1C 91 1C 61 B2 4F D3 81 1E 9D 51 9C 3E F6
0110 | 4F 78 E3 32 99 5B 10 1C 86 A6 64 7D 51 EE EF F0
0120 | FB 36 9B 66 23 A9 0E 12 E3 0C 77 72 4A 2D B8 BF
0130 | C5 E8 8A 86 07 75 0F FF 28 D5 3B F2 A6 93 38 3D
0140 | B9 A7 AB CE A5 3D 07 BB 97 F6 EE 97 B1 2A B2 1E
0150 | E9 3B 0A 84 BA CC 25 F6 09 97 2A 3D 71 5F C1 E0
0160 | 5E 63 00 71 3A F5 C4 6F C1 58 C3 55 04 5A 4A F7
0170 | 3C 36 9C 11 A2 AC CB 4E EF 5A 0F 32 AE 00 3B 2C
0180 | 28 3B 38 7F 23 D9 1D 1F CE A6 9F B0</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>D4CE0A00F71E3865</code></td>
<td><code>7CAC0E00B3813A65</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>8079E16E867BC482F9B48E2488E954B3</code></td>
<td><code>5BC47540D7800CF2570E01B20E7AC496</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>AF73D51E13D1A92559213C56961D02F8</code></td>
<td><code>A35BC5BCD178477579576832EFF8E63F</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE5001005CD0C82F80942D51715459C0</code> <code>37E1458D7C1462F593E011D2AE476044</code> <code>6F37478B954E7096043F465A728D909E</code> <code>D915705D0AFF9A065D41934A3339B39D</code> <code>CC227495593B50AE231623D42ADAF20C</code> <code>A895BECEBF500B840B4B04D68EDA601B</code> <code>FFF53F9B9991B8C355CAA67A4E8C5ED8</code> <code>E4531C7143554CF380C447FB38C59515</code> <code>97186CE04B32779048B0417E5F12757A</code> <code>FF123FD4817999312A7875CC4F6E566B</code> <code>286FE131A41AF4725757762994184796</code> <code>855C9A296BAA2B6364E73037BEE0637C</code> <code>0FD8345EFBD1F572E0B90D130065F8F6</code> <code>CA449D3D0ED1C759C930C803559E4A42</code> <code>C33BA1D046A406AB5E5A8C9A5D506685</code> <code>4AE4B635621C21F84F4CB55D304EC8F3</code> <code>665ADB59FA5A614F03E3383597256700</code> <code>9D1CC32A6232E8551B9966E0BDEDF34A</code> <code>C74FE62372E9ABA32FCC5CE234315379</code> <code>598509721BE36A522B3C55DBAE92DD0F</code> <code>EA088E2356FC14960D4A0EDAAFAAFFA7</code><br> <code>0CAE707C</code></td>
<td><code>FE500100C4AF8EC9E830FADDE7B443E4</code> <code>28C8FC181874C57FA121D51B966C24B5</code> <code>DDDF6BED72756F18F8C4904FD5E30D73</code> <code>2D43F0171AB9141C4D04B5B69FA8F78A</code> <code>C247FD458CAA619373DDC95AC4FD8B9C</code> <code>5614298E4B59C3EE63C04B430E836B21</code> <code>22B55937B0702128255C4E5A15D2072A</code> <code>0E1A2C2E05E651C41124DC504818991E</code> <code>11AA115E31E25547574B7596EDC36620</code> <code>13A07DCD01724E28C3D8A5AD31ADFF95</code> <code>C06A60BFBEBB605F0B48A6AB4C312BB6</code> <code>EFA999CE5F704E684E7B47EE06E58249</code> <code>5E79DBE8A201FD025ED31C911C61B24F</code> <code>D3811E9D519C3EF64F78E332995B101C</code> <code>86A6647D51EEEFF0FB369B6623A90E12</code> <code>E30C77724A2DB8BFC5E88A8607750FFF</code> <code>28D53BF2A693383DB9A7ABCEA53D07BB</code> <code>97F6EE97B12AB21EE93B0A84BACC25F6</code> <code>09972A3D715FC1E05E6300713AF5C46F</code> <code>C158C355045A4AF73C369C11A2ACCB4E</code> <code>EF5A0F32AE003B2C283B387F23D91D1F</code><br> <code>CEA69FB0</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 = 4A8A768A6D38ECD7877A8A5913BABE5F905CEFC4D2B3D280A5878F88A3CE7FA6C38EA436FD2E032B2942B335F4FC58334A7C24D5D76B6DC3A55A46DBA36A26E96F48C078438D1080223EBA143BA47645EF0D62A2F783667EBC2CAC8A0D7D99B65B76D2B174419C39C191F8C112ECA797D45C1FC2F1EF82B97270FCECDA7A940F30049D0E132AEF507FC9003A625CB7037D9EB569A78DFAEB2A9ED5DC3705D0638374587AAF4B566457B0C4BBF2B3B50F6ABBA76B0D13C44C5DD90A29146A98A9D9F260B737403F10381E832DE220DBE37F52A841EE2A3E5B96DF679601CC0681D809BBC1A755C4E0D7663D6315A83E5EC3F6888C008AD60E84C3C99AC25ED7CA</code></pre>
<pre><code>auth_key = 4068B2CF903CC148609AE00C7C2CC189D50B86881C907D1600BBACDC535A8312C59585F2ACAF1922F8368F45C87E2D5331903D462CBBB479509D39FF24CE63FE907855F2A3189B6ACA77D7D9E148F21180D6A0A0A7DA847A90765ECBE1361C7DE1B54901F2839068885F8EE5B04A84EF91B99402BE61D8E816E56040FBEEA9EAD609E02A5ECB2146C92E53FAB2472DB93E556D75780551F37988D2CD42B3FC38EDE50BBDCCD1D8275A92E5B5CA7443FE7994F6DFF2DD8447DD79EF64FA149FAA235EBBF86902879364126BD4F34EBA5C12141C8CFFDAE5498CA1C2C1F59A301E54C726034E24BAA56C94F07AB756DE6DF7C4998F96A20B5F4626773F8CF32C28</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 9C 88 C4 F3 1E 38 65
0010 | 68 00 00 00 34 F7 CB 3B 80 79 E1 6E 86 7B C4 82
0020 | F9 B4 8E 24 88 E9 54 B3 AF 73 D5 1E 13 D1 A9 25
0030 | 59 21 3C 56 96 1D 02 F8 BF 8E 6C 87 59 5D 8B 4F
0040 | B7 CB 2E 57 94 1D 91 CE</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 B0 03 E2 AF 81 3A 65
0010 | 50 00 00 00 34 F7 CB 3B 5B C4 75 40 D7 80 0C F2
0020 | 57 0E 01 B2 0E 7A C4 96 A3 5B C5 BC D1 78 47 75
0030 | 79 57 68 32 EF F8 E6 3F 32 05 65 2D 21 F4 F8 E2
0040 | 8C 0B 5D 34 B5 30 63 1E</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>019C88C4F31E3865</code></td>
<td><code>01B003E2AF813A65</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>68000000</code> (104 in decimal)</td>
<td><code>50000000</code> (80 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>8079E16E867BC482F9B48E2488E954B3</code></td>
<td><code>5BC47540D7800CF2570E01B20E7AC496</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>AF73D51E13D1A92559213C56961D02F8</code></td>
<td><code>A35BC5BCD178477579576832EFF8E63F</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>BF8E6C87595D8B4FB7CB2E57941D91CE</code></td>
<td><code>3205652D21F4F8E28C0B5D34B530631E</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

@ -119,6 +119,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="#privacy" id="privacy" name="privacy"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy</a></h4>
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p>
<h4><a class="anchor" href="#privacykey" id="privacykey" name="privacykey"><i class="anchor-icon"></i></a><a href="/type/PrivacyKey">PrivacyKey</a></h4>
<p>Privacy <strong>keys</strong> together with <a href="/api/privacy#privacy-rules">privacy rules »</a> indicate <em>what</em> can or can't someone do and are specified by a <a href="/type/PrivacyKey">PrivacyKey</a> constructor, and its input counterpart <a href="/type/InputPrivacyKey">InputPrivacyKey</a>.</p>
<p>See the <a href="/api/privacy">privacy documentation »</a> for more info.</p>

View file

@ -119,7 +119,8 @@
<h4><a class="anchor" href="#inputprivacyrule" id="inputprivacyrule" name="inputprivacyrule"><i class="anchor-icon"></i></a><a href="/type/InputPrivacyRule">InputPrivacyRule</a></h4>
<p>Privacy <strong>rules</strong> indicate <em>who</em> can or can't do something and are specified by a <a href="/type/PrivacyRule">PrivacyRule</a>, and its input counterpart <a href="/type/InputPrivacyRule">InputPrivacyRule</a>.</p>
<p>See the <a href="/api/privacy">privacy documentation »</a> for more info.</p>
<h4><a class="anchor" href="#privacy" id="privacy" name="privacy"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy</a></h4></div>
<h4><a class="anchor" href="#privacy" id="privacy" name="privacy"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy</a></h4>
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p></div>
</div>

View file

@ -119,6 +119,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="#privacy" id="privacy" name="privacy"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy</a></h4>
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p>
<h4><a class="anchor" href="#privacykey" id="privacykey" name="privacykey"><i class="anchor-icon"></i></a><a href="/type/PrivacyKey">PrivacyKey</a></h4>
<p>Privacy <strong>keys</strong> together with <a href="/api/privacy#privacy-rules">privacy rules »</a> indicate <em>what</em> can or can't someone do and are specified by a <a href="/type/PrivacyKey">PrivacyKey</a> constructor, and its input counterpart <a href="/type/InputPrivacyKey">InputPrivacyKey</a>.</p>
<p>See the <a href="/api/privacy">privacy documentation »</a> for more info.</p>

View file

@ -114,6 +114,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="#privacy" id="privacy" name="privacy"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy</a></h4>
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p>
<h4><a class="anchor" href="#privacykey" id="privacykey" name="privacykey"><i class="anchor-icon"></i></a><a href="/type/PrivacyKey">PrivacyKey</a></h4>
<p>Privacy <strong>keys</strong> together with <a href="/api/privacy#privacy-rules">privacy rules »</a> indicate <em>what</em> can or can't someone do and are specified by a <a href="/type/PrivacyKey">PrivacyKey</a> constructor, and its input counterpart <a href="/type/InputPrivacyKey">InputPrivacyKey</a>.</p>
<p>See the <a href="/api/privacy">privacy documentation »</a> for more info.</p>

View file

@ -378,7 +378,7 @@
</tr>
<tr>
<td><a href="/method/contacts.acceptContact">contacts.acceptContact</a></td>
<td>If the <a href="/constructor/peerSettings">peer settings</a> of a new user allow us to add them as contact, add that user as contact</td>
<td>If the <a href="/api/action-bar#add-contact">add contact action bar is active</a>, add that user as contact</td>
</tr>
<tr>
<td><a href="/method/channels.editCreator">channels.editCreator</a></td>