Update content of files

This commit is contained in:
GitHub Action 2024-07-06 15:37:40 +00:00
parent 8ad4c11fac
commit 74b3575bc6
11 changed files with 305 additions and 294 deletions

View file

@ -83,8 +83,8 @@ If the <code>hidden</code> flag is set it should not be displayed as an option t
Use <a href="/method/channels.updateColor">channels.updateColor</a> to update the color palette of a channel/supergroup's profile page accents, or a channel's message accent.</p>
<p>Note that channels/supergroups can use a message accent palette or profile palette only after reaching at least the <a href="/api/boost">boost level</a> specified in the <code>channel_min_level</code>/<code>group_min_level</code> field of the <a href="/constructor/help.peerColorOption">help.peerColorOption</a> constructor for the chosen palette. </p>
<p>Additionally, to change <strong>profile</strong> palettes, channels/supergroups must <strong>also</strong> reach at least the <a href="/api/boost">boost level</a> specified in the <a href="/api/config#channel-profile-bg-icon-level-min"><code>channel_profile_bg_icon_level_min</code> »</a>/<a href="/api/config#group-profile-bg-icon-level-min"><code>group_profile_bg_icon_level_min</code> »</a> config parameters. </p>
<p>The chosen message accent palette will be visible to other users in the <a href="/constructor/channel">channel</a>.<code>color</code> and <a href="/constructor/user">user</a>.<code>color</code> fields. </p>
<p>The chosen profile palettes will be visible in the <a href="/constructor/user">user</a>.<code>profile_color</code> and <a href="/constructor/channel">channel</a>.<code>profile_color</code> fields.</p></div>
<p>The chosen message accent palette will be visible to other users in the <a href="/constructor/channel">channel</a>.<code>color</code> and <a href="/constructor/user">user</a>.<code>color</code> fields; changing it will emit an <a href="/constructor/updateChannel">updateChannel</a>/<a href="/constructor/updateUser">updateUser</a> update. </p>
<p>The chosen profile palettes will be visible in the <a href="/constructor/user">user</a>.<code>profile_color</code> and <a href="/constructor/channel">channel</a>.<code>profile_color</code> fields; changing it will emit an <a href="/constructor/updateUser">updateUser</a> update/<a href="/constructor/updateChannel">updateChannel</a> update.</p></div>
</div>

View file

@ -262,7 +262,7 @@
<li>Added <a href="/method/account.deleteBusinessChatLink">account.deleteBusinessChatLink</a> - </li>
<li>Added <a href="/method/account.getBusinessChatLinks">account.getBusinessChatLinks</a> - </li>
<li>Added <a href="/method/account.resolveBusinessChatLink">account.resolveBusinessChatLink</a> - </li>
<li>Added <a href="/method/account.updatePersonalChannel">account.updatePersonalChannel</a> - </li>
<li>Added <a href="/method/account.updatePersonalChannel">account.updatePersonalChannel</a> - Associate (or remove) a personal <a href="/api/channel">channel »</a>, that will be listed on our personal <a href="/api/profile#personal-channel">profile page »</a>.</li>
<li>Added <a href="/method/channels.reportSponsoredMessage">channels.reportSponsoredMessage</a> - </li>
<li>Added <a href="/method/stats.getBroadcastRevenueStats">stats.getBroadcastRevenueStats</a> - </li>
<li>Added <a href="/method/stats.getBroadcastRevenueWithdrawalUrl">stats.getBroadcastRevenueWithdrawalUrl</a> - </li>

View file

@ -89,6 +89,7 @@
<a href='/constructor/inputPrivacyKeyAddedByPhone'>inputPrivacyKeyAddedByPhone</a>#d1219bdd = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
<a href='/constructor/inputPrivacyKeyVoiceMessages'>inputPrivacyKeyVoiceMessages</a>#aee69d68 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
<a href='/constructor/inputPrivacyKeyAbout'>inputPrivacyKeyAbout</a>#3823cc40 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
<a href='/constructor/inputPrivacyKeyBirthday'>inputPrivacyKeyBirthday</a>#d65a11cc = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
<a href='/constructor/privacyKeyStatusTimestamp'>privacyKeyStatusTimestamp</a>#bc2eab30 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
<a href='/constructor/privacyKeyChatInvite'>privacyKeyChatInvite</a>#500e6dfa = <a href='/type/PrivacyKey'>PrivacyKey</a>;

View file

@ -4,14 +4,10 @@
<meta charset="utf-8">
<title>Profile</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Telegram offers many customization options for your profile&#33;
Name and bio
user#215c4438 flags:# self:flags.10?true con…">
<meta property="description" content="Telegram offers many customization options for your profile&#33;">
<meta property="og:title" content="Profile">
<meta property="og:image" content="">
<meta property="og:description" content="Telegram offers many customization options for your profile&#33;
Name and bio
user#215c4438 flags:# self:flags.10?true con…">
<meta property="og:description" content="Telegram offers many customization options for your profile&#33;">
<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">
@ -94,37 +90,80 @@ user#215c4438 flags:# self:flags.10?true con…">
Updating/reordering usernames will emit an <a href="/constructor/updateUserName">updateUserName</a>. </p>
<p>See <a href="/api/links#public-username-links">here »</a> for more info on public username links.</p>
<h3><a class="anchor" href="#accent-colors" id="accent-colors" name="accent-colors"><i class="anchor-icon"></i></a>Accent colors</h3>
<pre><code>account.updateColor#7cefa15d flags:# for_profile:flags.1?true color:flags.2?int background_emoji_id:flags.0?long = Bool;</code></pre>
<p>Use <a href="/method/account.updateColor">account.updateColor</a> to update the accent color and background emoji of the current profile. </p>
<pre><code><a href='/constructor/user'>user</a>#215c4438 flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> fake:flags.26?<a href='/constructor/true'>true</a> bot_attach_menu:flags.27?<a href='/constructor/true'>true</a> premium:flags.28?<a href='/constructor/true'>true</a> attach_menu_enabled:flags.29?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> bot_can_edit:flags2.1?<a href='/constructor/true'>true</a> close_friend:flags2.2?<a href='/constructor/true'>true</a> stories_hidden:flags2.3?<a href='/constructor/true'>true</a> stories_unavailable:flags2.4?<a href='/constructor/true'>true</a> contact_require_premium:flags2.10?<a href='/constructor/true'>true</a> bot_business:flags2.11?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> emoji_status:flags.30?<a href='/type/EmojiStatus'>EmojiStatus</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Username'>Username</a>&gt; stories_max_id:flags2.5?<a href='/type/int'>int</a> color:flags2.8?<a href='/type/PeerColor'>PeerColor</a> profile_color:flags2.9?<a href='/type/PeerColor'>PeerColor</a> = <a href='/type/User'>User</a>;
<a href='/constructor/updateUser'>updateUser</a>#20529438 user_id:<a href='/type/long'>long</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/account.updateColor'>account.updateColor</a>#7cefa15d flags:<a href='/type/%23'>#</a> for_profile:flags.1?<a href='/constructor/true'>true</a> color:flags.2?<a href='/type/int'>int</a> background_emoji_id:flags.0?<a href='/type/long'>long</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Use <a href="/method/account.updateColor">account.updateColor</a> to update the accent color and background emoji of the current profile, present in <a href="/constructor/user">user</a>.<code>color</code>/<a href="/constructor/user">user</a>.<code>profile_color</code>. </p>
<p>Changing it will emit an <a href="/constructor/updateUser">updateUser</a> update. </p>
<p>See <a href="/api/colors">here »</a> for more info on accent colors.</p>
<h3><a class="anchor" href="#birthday" id="birthday" name="birthday"><i class="anchor-icon"></i></a>Birthday</h3>
<pre><code><a href='/constructor/birthday'>birthday</a>#6c8e1e06 flags:<a href='/type/%23'>#</a> day:<a href='/type/int'>int</a> month:<a href='/type/int'>int</a> year:flags.0?<a href='/type/int'>int</a> = <a href='/type/Birthday'>Birthday</a>;
<a href='/constructor/userFull'>userFull</a>#cc997720 flags:<a href='/type/%23'>#</a> blocked:flags.0?<a href='/constructor/true'>true</a> phone_calls_available:flags.4?<a href='/constructor/true'>true</a> phone_calls_private:flags.5?<a href='/constructor/true'>true</a> can_pin_message:flags.7?<a href='/constructor/true'>true</a> has_scheduled:flags.12?<a href='/constructor/true'>true</a> video_calls_available:flags.13?<a href='/constructor/true'>true</a> voice_messages_forbidden:flags.20?<a href='/constructor/true'>true</a> translations_disabled:flags.23?<a href='/constructor/true'>true</a> stories_pinned_available:flags.26?<a href='/constructor/true'>true</a> blocked_my_stories_from:flags.27?<a href='/constructor/true'>true</a> wallpaper_overridden:flags.28?<a href='/constructor/true'>true</a> contact_require_premium:flags.29?<a href='/constructor/true'>true</a> read_dates_private:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> sponsored_enabled:flags2.7?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:flags.1?<a href='/type/string'>string</a> settings:<a href='/type/PeerSettings'>PeerSettings</a> personal_photo:flags.21?<a href='/type/Photo'>Photo</a> profile_photo:flags.2?<a href='/type/Photo'>Photo</a> fallback_photo:flags.22?<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> bot_info:flags.3?<a href='/type/BotInfo'>BotInfo</a> pinned_msg_id:flags.6?<a href='/type/int'>int</a> common_chats_count:<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> ttl_period:flags.14?<a href='/type/int'>int</a> theme_emoticon:flags.15?<a href='/type/string'>string</a> private_forward_name:flags.16?<a href='/type/string'>string</a> bot_group_admin_rights:flags.17?<a href='/type/ChatAdminRights'>ChatAdminRights</a> bot_broadcast_admin_rights:flags.18?<a href='/type/ChatAdminRights'>ChatAdminRights</a> premium_gifts:flags.19?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PremiumGiftOption'>PremiumGiftOption</a>&gt; wallpaper:flags.24?<a href='/type/WallPaper'>WallPaper</a> stories:flags.25?<a href='/type/PeerStories'>PeerStories</a> business_work_hours:flags2.0?<a href='/type/BusinessWorkHours'>BusinessWorkHours</a> business_location:flags2.1?<a href='/type/BusinessLocation'>BusinessLocation</a> business_greeting_message:flags2.2?<a href='/type/BusinessGreetingMessage'>BusinessGreetingMessage</a> business_away_message:flags2.3?<a href='/type/BusinessAwayMessage'>BusinessAwayMessage</a> business_intro:flags2.4?<a href='/type/BusinessIntro'>BusinessIntro</a> birthday:flags2.5?<a href='/type/Birthday'>Birthday</a> personal_channel_id:flags2.6?<a href='/type/long'>long</a> personal_channel_message:flags2.6?<a href='/type/int'>int</a> = <a href='/type/UserFull'>UserFull</a>;
<a href='/constructor/updateUser'>updateUser</a>#20529438 user_id:<a href='/type/long'>long</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/contactBirthday'>contactBirthday</a>#1d998733 contact_id:<a href='/type/long'>long</a> birthday:<a href='/type/Birthday'>Birthday</a> = <a href='/type/ContactBirthday'>ContactBirthday</a>;
<a href='/constructor/contacts.contactBirthdays'>contacts.contactBirthdays</a>#114ff30d contacts:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/ContactBirthday'>ContactBirthday</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/contacts.ContactBirthdays'>contacts.ContactBirthdays</a>;
<a href='/constructor/inputPrivacyKeyBirthday'>inputPrivacyKeyBirthday</a>#d65a11cc = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
<a href='/constructor/privacyKeyBirthday'>privacyKeyBirthday</a>#2000a518 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
---functions---
<a href='/method/account.updateBirthday'>account.updateBirthday</a>#cc6e0c11 flags:<a href='/type/%23'>#</a> birthday:flags.0?<a href='/type/Birthday'>Birthday</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Use <a href="/method/account.updateBirthday">account.updateBirthday</a></p>
<a href='/method/account.updateBirthday'>account.updateBirthday</a>#cc6e0c11 flags:<a href='/type/%23'>#</a> birthday:flags.0?<a href='/type/Birthday'>Birthday</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/contacts.getBirthdays'>contacts.getBirthdays</a>#daeda864 = <a href='/type/contacts.ContactBirthdays'>contacts.ContactBirthdays</a>;</code></pre>
<p>Use <a href="/method/account.updateBirthday">account.updateBirthday</a> to set a birthday date that will be displayed to the users specified in the <a href="/api/privacy">privacy settings »</a>, according to the current privacy setting of <a href="/constructor/inputPrivacyKeyBirthday">inputPrivacyKeyBirthday</a> (only contacts by default). </p>
<p>The birthday (if accessible to the current user) will be present in <a href="/constructor/user">user</a>.<code>birthday</code>, changing it will emit an <a href="/constructor/updateUser">updateUser</a> update. </p>
<p>Setting the actual birth <code>year</code> is optional, and if set, the allowed age range is currently <code>0 &lt;= years &lt;= 150</code> (checked only when updating the birthday); a <code>400 BIRTHDAY_INVALID</code> error will be emitted otherwise. </p>
<p>To remove the birthday, call the method without setting the <code>birthday</code> flag. </p>
<p><a href="/method/contacts.getBirthdays">contacts.getBirthdays</a> returns all users with birthdays that fall within +1/-1 days, relative to the current day: this method should be invoked by clients every 6-8 hours, and if the result is non-empty, it should be used to appropriately update locally cached birthday information in <a href="/constructor/user">user</a>.<code>birthday</code>. </p>
<p>All <em>contacts</em> whose <a href="/constructor/user">user</a>.<code>birthday</code> fields (updated through <a href="/method/contacts.getBirthdays">contacts.getBirthdays</a> and in other ways, i.e. through <a href="/constructor/updateUser">updateUser</a> updates) fall within +1/-1 days relative to today should be always listed in an action bar shown in the global dialog list (<em>not</em> the user-specific <a href="/api/action-bar">action bar »</a>), inviting the user to make a birthday <a href="/api/premium#gifting-telegram-premium">gift to those users, in the form of one or more Telegram Premium subscriptions »</a>. </p>
<p>Additionally, if a user has a birthday falling within the specified time range (+1/-1 days) as specified in <a href="/constructor/user">user</a>.<code>birthday</code>, a gift icon tooltip should be shown in the text input bar in private chats with them, leading to the <a href="/api/premium#gifting-telegram-premium">Telegram Premium gift flow »</a> (this also applies to non-contacts that have allowed us to see their birthday date). </p>
<h3><a class="anchor" href="#personal-channel" id="personal-channel" name="personal-channel"><i class="anchor-icon"></i></a>Personal channel</h3>
<pre><code><a href='/constructor/inputChannelEmpty'>inputChannelEmpty</a>#ee8c1e86 = <a href='/type/InputChannel'>InputChannel</a>;
<a href='/constructor/inputChannel'>inputChannel</a>#f35aec28 channel_id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputChannel'>InputChannel</a>;
<pre><code><a href='/constructor/inputChannel'>inputChannel</a>#f35aec28 channel_id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputChannel'>InputChannel</a>;
<a href='/constructor/inputChannelEmpty'>inputChannelEmpty</a>#ee8c1e86 = <a href='/type/InputChannel'>InputChannel</a>;
<a href='/constructor/userFull'>userFull</a>#cc997720 flags:<a href='/type/%23'>#</a> blocked:flags.0?<a href='/constructor/true'>true</a> phone_calls_available:flags.4?<a href='/constructor/true'>true</a> phone_calls_private:flags.5?<a href='/constructor/true'>true</a> can_pin_message:flags.7?<a href='/constructor/true'>true</a> has_scheduled:flags.12?<a href='/constructor/true'>true</a> video_calls_available:flags.13?<a href='/constructor/true'>true</a> voice_messages_forbidden:flags.20?<a href='/constructor/true'>true</a> translations_disabled:flags.23?<a href='/constructor/true'>true</a> stories_pinned_available:flags.26?<a href='/constructor/true'>true</a> blocked_my_stories_from:flags.27?<a href='/constructor/true'>true</a> wallpaper_overridden:flags.28?<a href='/constructor/true'>true</a> contact_require_premium:flags.29?<a href='/constructor/true'>true</a> read_dates_private:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> sponsored_enabled:flags2.7?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:flags.1?<a href='/type/string'>string</a> settings:<a href='/type/PeerSettings'>PeerSettings</a> personal_photo:flags.21?<a href='/type/Photo'>Photo</a> profile_photo:flags.2?<a href='/type/Photo'>Photo</a> fallback_photo:flags.22?<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> bot_info:flags.3?<a href='/type/BotInfo'>BotInfo</a> pinned_msg_id:flags.6?<a href='/type/int'>int</a> common_chats_count:<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> ttl_period:flags.14?<a href='/type/int'>int</a> theme_emoticon:flags.15?<a href='/type/string'>string</a> private_forward_name:flags.16?<a href='/type/string'>string</a> bot_group_admin_rights:flags.17?<a href='/type/ChatAdminRights'>ChatAdminRights</a> bot_broadcast_admin_rights:flags.18?<a href='/type/ChatAdminRights'>ChatAdminRights</a> premium_gifts:flags.19?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PremiumGiftOption'>PremiumGiftOption</a>&gt; wallpaper:flags.24?<a href='/type/WallPaper'>WallPaper</a> stories:flags.25?<a href='/type/PeerStories'>PeerStories</a> business_work_hours:flags2.0?<a href='/type/BusinessWorkHours'>BusinessWorkHours</a> business_location:flags2.1?<a href='/type/BusinessLocation'>BusinessLocation</a> business_greeting_message:flags2.2?<a href='/type/BusinessGreetingMessage'>BusinessGreetingMessage</a> business_away_message:flags2.3?<a href='/type/BusinessAwayMessage'>BusinessAwayMessage</a> business_intro:flags2.4?<a href='/type/BusinessIntro'>BusinessIntro</a> birthday:flags2.5?<a href='/type/Birthday'>Birthday</a> personal_channel_id:flags2.6?<a href='/type/long'>long</a> personal_channel_message:flags2.6?<a href='/type/int'>int</a> = <a href='/type/UserFull'>UserFull</a>;
<a href='/constructor/updateUser'>updateUser</a>#20529438 user_id:<a href='/type/long'>long</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/account.updatePersonalChannel'>account.updatePersonalChannel</a>#d94305e0 channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Use <a href="/method/account.updatePersonalChannel">account.updatePersonalChannel</a> to associate a </p>
<p>Use <a href="/method/account.updatePersonalChannel">account.updatePersonalChannel</a> to associate (or remove via <a href="/constructor/inputChannelEmpty">inputChannelEmpty</a>) a personal <a href="/api/channel">channel »</a>, that will be listed on our personal profile page. </p>
<p>The ID of the associated channel will be present in <a href="/constructor/user">user</a>.<code>personal_channel_id</code>, and the ID of the latest message that should be shown in the UI preview is contained in <a href="/constructor/user">user</a>.<code>personal_channel_message</code>. </p>
<p>Changing it will emit an <a href="/constructor/updateUser">updateUser</a> update. </p>
<h3><a class="anchor" href="#business-profile" id="business-profile" name="business-profile"><i class="anchor-icon"></i></a>Business profile</h3>
<pre><code>account.updateBusinessWorkHours#4b00e066 flags:# business_work_hours:flags.0?BusinessWorkHours = Bool;
account.updateBusinessLocation#9e6b131a flags:# geo_point:flags.1?InputGeoPoint address:flags.0?string = Bool;
account.updateBusinessGreetingMessage#66cdafc4 flags:# message:flags.0?InputBusinessGreetingMessage = Bool;
account.updateBusinessAwayMessage#a26a7fa5 flags:# message:flags.0?InputBusinessAwayMessage = Bool;
account.updateBusinessIntro#a614d034 flags:# intro:flags.0?InputBusinessIntro = Bool;</code></pre>
<h3><a class="anchor" href="#online-status" id="online-status" name="online-status"><i class="anchor-icon"></i></a>Online status</h3>
<pre><code>---functions---
<a href='/method/account.updateBusinessWorkHours'>account.updateBusinessWorkHours</a>#4b00e066 flags:<a href='/type/%23'>#</a> business_work_hours:flags.0?<a href='/type/BusinessWorkHours'>BusinessWorkHours</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/account.updateBusinessLocation'>account.updateBusinessLocation</a>#9e6b131a flags:<a href='/type/%23'>#</a> geo_point:flags.1?<a href='/type/InputGeoPoint'>InputGeoPoint</a> address:flags.0?<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/account.updateBusinessGreetingMessage'>account.updateBusinessGreetingMessage</a>#66cdafc4 flags:<a href='/type/%23'>#</a> message:flags.0?<a href='/type/InputBusinessGreetingMessage'>InputBusinessGreetingMessage</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/account.updateBusinessAwayMessage'>account.updateBusinessAwayMessage</a>#a26a7fa5 flags:<a href='/type/%23'>#</a> message:flags.0?<a href='/type/InputBusinessAwayMessage'>InputBusinessAwayMessage</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/account.updateBusinessIntro'>account.updateBusinessIntro</a>#a614d034 flags:<a href='/type/%23'>#</a> intro:flags.0?<a href='/type/InputBusinessIntro'>InputBusinessIntro</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<h3><a class="anchor" href="#online-status" id="online-status" name="online-status"><i class="anchor-icon"></i></a>Online status</h3>
<pre><code><a href='/constructor/userStatusEmpty'>userStatusEmpty</a>#9d05049 = <a href='/type/UserStatus'>UserStatus</a>;
<a href='/constructor/userStatusOnline'>userStatusOnline</a>#edb93949 expires:<a href='/type/int'>int</a> = <a href='/type/UserStatus'>UserStatus</a>;
<a href='/constructor/userStatusOffline'>userStatusOffline</a>#8c703f was_online:<a href='/type/int'>int</a> = <a href='/type/UserStatus'>UserStatus</a>;
<a href='/constructor/userStatusRecently'>userStatusRecently</a>#7b197dc8 flags:<a href='/type/%23'>#</a> by_me:flags.0?<a href='/constructor/true'>true</a> = <a href='/type/UserStatus'>UserStatus</a>;
<a href='/constructor/userStatusLastWeek'>userStatusLastWeek</a>#541a1d1a flags:<a href='/type/%23'>#</a> by_me:flags.0?<a href='/constructor/true'>true</a> = <a href='/type/UserStatus'>UserStatus</a>;
<a href='/constructor/userStatusLastMonth'>userStatusLastMonth</a>#65899777 flags:<a href='/type/%23'>#</a> by_me:flags.0?<a href='/constructor/true'>true</a> = <a href='/type/UserStatus'>UserStatus</a>;
<a href='/constructor/updateUserStatus'>updateUserStatus</a>#e5bdf8de user_id:<a href='/type/long'>long</a> status:<a href='/type/UserStatus'>UserStatus</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/account.updateStatus'>account.updateStatus</a>#6628562c offline:<a href='/type/Bool'>Bool</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Use <a href="/method/account.updateStatus">account.updateStatus</a> to change the online status of the current account.</p></div>
<p>Use <a href="/method/account.updateStatus">account.updateStatus</a> to change the online status of the current account.</p>
<p>Changing the online status will emit an <a href="/constructor/updateUserStatus">updateUserStatus</a> update.</p></div>
</div>

View file

@ -4,42 +4,12 @@
<meta charset="utf-8">
<title>birthday</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
day
int
 
month
int
 
year
flags.0?int
 
Type…">
<meta property="description" content="Birthday information for a user.
Also used to invite users to gift Telegram Premium subscriptions » to other users with…">
<meta property="og:title" content="birthday">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
day
int
 
month
int
 
year
flags.0?int
 
Type…">
<meta property="og:description" content="Birthday information for a user.
Also used to invite users to gift Telegram Premium subscriptions » to other users with…">
<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">
@ -74,7 +44,9 @@ Type…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/birthday" >birthday</a></li></ul></div>
<h1 id="dev_page_title">birthday</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p><a href="/api/profile#birthday">Birthday</a> information for a user.</p>
<p>Also used to invite users to gift <a href="/api/premium#gifting-telegram-premium">Telegram Premium subscriptions »</a> to other users with birthdays within a +1/-1 day time range, related to the current day. </p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -105,17 +77,17 @@ Type…">
<tr>
<td><strong>day</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Birth day</td>
</tr>
<tr>
<td><strong>month</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Birth month</td>
</tr>
<tr>
<td><strong>year</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td>
<td> </td>
<td>(Optional) birth year.</td>
</tr>
</tbody>
</table>

View file

@ -69,7 +69,7 @@
<tr>
<td><strong>contact_id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td> </td>
<td>User ID.</td>
</tr>
<tr>
<td><strong>birthday</strong></td>

View file

@ -274,12 +274,12 @@
<tr>
<td><strong>personal_channel_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.6?<a href="/type/long">long</a></td>
<td> </td>
<td>ID of the associated personal <a href="/api/channel">channel »</a>, that should be shown in the <a href="/api/profile#personal-channel">profile page</a>.</td>
</tr>
<tr>
<td><strong>personal_channel_message</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.6?<a href="/type/int">int</a></td>
<td> </td>
<td>ID of the latest message of the associated personal <a href="/api/channel">channel »</a>, that should be previewed in the <a href="/api/profile#personal-channel">profile page</a>.</td>
</tr>
</tbody>
</table>
@ -318,7 +318,11 @@
<h4><a class="anchor" href="#folders" id="folders" name="folders"><i class="anchor-icon"></i></a><a href="/api/folders">Folders</a></h4>
<p>Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.</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>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p></div>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p>
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>
<p>How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.</p>
<h4><a class="anchor" href="#profile" id="profile" name="profile"><i class="anchor-icon"></i></a><a href="/api/profile">Profile</a></h4>
<p>Telegram offers many customization options for your profile!</p></div>
</div>

View file

@ -4,26 +4,10 @@
<meta charset="utf-8">
<title>account.updatePersonalChannel</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
channel
InputChannel
 
Result
Bool">
<meta property="description" content="Associate (or remove) a personal channel », that will be listed on our personal profile page ». Changing it will emit an updateUser update.">
<meta property="og:title" content="account.updatePersonalChannel">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
channel
InputChannel
 
Result
Bool">
<meta property="og:description" content="Associate (or remove) a personal channel », that will be listed on our personal profile page ». Changing it will emit an updateUser update.">
<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">
@ -58,7 +42,9 @@ Bool">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/account.updatePersonalChannel" >account.updatePersonalChannel</a></li></ul></div>
<h1 id="dev_page_title">account.updatePersonalChannel</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Associate (or remove) a personal <a href="/api/channel">channel »</a>, that will be listed on our personal <a href="/api/profile#personal-channel">profile page »</a>.</p>
<p>Changing it will emit an <a href="/constructor/updateUser">updateUser</a> update.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -87,12 +73,21 @@ Bool">
<tr>
<td><strong>channel</strong></td>
<td style="text-align: center;"><a href="/type/InputChannel">InputChannel</a></td>
<td> </td>
<td>The channel, pass <a href="/constructor/inputChannelEmpty">inputChannelEmpty</a> to remove it.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
<p><a href="/type/Bool">Bool</a></p></div>
<p><a href="/type/Bool">Bool</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#inputchannelempty" id="inputchannelempty" name="inputchannelempty"><i class="anchor-icon"></i></a><a href="/constructor/inputChannelEmpty">inputChannelEmpty</a></h4>
<p>Represents the absence of a channel</p>
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>
<p>How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.</p>
<h4><a class="anchor" href="#profile" id="profile" name="profile"><i class="anchor-icon"></i></a><a href="/api/profile">Profile</a></h4>
<p>Telegram offers many customization options for your profile!</p>
<h4><a class="anchor" href="#updateuser" id="updateuser" name="updateuser"><i class="anchor-icon"></i></a><a href="/constructor/updateUser">updateUser</a></h4>
<p>User information was updated, it must be refetched using <a href="/method/users.getFullUser">users.getFullUser</a>.</p></div>
</div>

View file

@ -3342,7 +3342,7 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
<tr>
<td><a href="/method/account.updatePersonalChannel">account.updatePersonalChannel</a></td>
<td> </td>
<td>Associate (or remove) a personal <a href="/api/channel">channel »</a>, that will be listed on our personal <a href="/api/profile#personal-channel">profile page »</a>.<br><br>Changing it will emit an <a href="/constructor/updateUser">updateUser</a> update.</td>
</tr>
<tr>
<td><a href="/method/channels.reportSponsoredMessage">channels.reportSponsoredMessage</a></td>

View file

@ -53,9 +53,9 @@
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
<!-- start req_pq_multi -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 F0 1A 00 00 44 42 88 66
0010 | 14 00 00 00 F1 8E 7E BE 39 8D DB F9 93 7A 80 D8
0020 | 74 6E E6 4E D3 88 0D 2D</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C0 66 04 00 8F 61 89 66
0010 | 14 00 00 00 F1 8E 7E BE 8A 74 6C B5 B5 A8 B2 09
0020 | 60 7A C2 3F 42 38 1C 8D</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>F01A000044428866</code></td>
<td><code>C06604008F618966</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>398DDBF9937A80D8746EE64ED3880D2D</code></td>
<td><code>8A746CB5B5A8B209607AC23F42381C8D</code></td>
<td>Random number</td>
</tr>
</tbody>
@ -104,11 +104,11 @@
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
<!-- start resPQ -->
<p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 A0 DC F6 44 42 88 66
0010 | BC 00 00 00 63 24 16 05 39 8D DB F9 93 7A 80 D8
0020 | 74 6E E6 4E D3 88 0D 2D 8C A2 EC 8F F5 A5 25 3E
0030 | 0D 8B FE 82 57 8B 87 29 08 22 4C D8 2F 93 75 24
0040 | CD 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 44 56 57 8F 61 89 66
0010 | 54 00 00 00 63 24 16 05 8A 74 6C B5 B5 A8 B2 09
0020 | 60 7A C2 3F 42 38 1C 8D 9E 84 14 64 C6 56 0C E5
0030 | 91 60 C5 0C 1F F4 76 17 08 29 F6 69 A5 77 4E A5
0040 | 49 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>01A0DCF644428866</code></td>
<td><code>014456578F618966</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>BC000000</code> (188 in decimal)</td>
<td><code>54000000</code> (84 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>398DDBF9937A80D8746EE64ED3880D2D</code></td>
<td><code>8A746CB5B5A8B209607AC23F42381C8D</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>8CA2EC8FF5A5253E0D8BFE82578B8729</code></td>
<td><code>9E841464C6560CE59160C50C1FF47617</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>08224CD82F937524CD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2471587994368550093</td>
<td><code>0829F669A5774EA549000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 3023720359218029897</td>
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
</tr>
<tr>
@ -208,22 +208,22 @@
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p &lt; q.</h5>
<!-- start pq -->
<pre><code>pq = 2471587994368550093</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2471587994368550093 = 1520934161 * 1625046013</code></p>
<pre><code>p = 1520934161
q = 1625046013</code></pre>
<pre><code>pq = 3023720359218029897</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>3023720359218029897 = 1603108193 * 1886161129</code></p>
<pre><code>p = 1603108193
q = 1886161129</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 22 4C D8 2F 93 75 24 CD 00 00 00
0010 | 04 5A A7 9D 11 00 00 00 04 60 DC 3B FD 00 00 00
0020 | 39 8D DB F9 93 7A 80 D8 74 6E E6 4E D3 88 0D 2D
0030 | 8C A2 EC 8F F5 A5 25 3E 0D 8B FE 82 57 8B 87 29
0040 | 4D 95 A3 EC 01 E4 DF E2 0A 32 9E F3 DB 4E 10 8D
0050 | D0 41 BD AB 38 31 7A E6 D2 6C E0 73 EE FE 88 F3
<pre><code>0000 | 95 5F F5 A9 08 29 F6 69 A5 77 4E A5 49 00 00 00
0010 | 04 5F 8D 7D 61 00 00 00 04 70 6C 88 E9 00 00 00
0020 | 8A 74 6C B5 B5 A8 B2 09 60 7A C2 3F 42 38 1C 8D
0030 | 9E 84 14 64 C6 56 0C E5 91 60 C5 0C 1F F4 76 17
0040 | FB C0 49 04 1D 75 6E 0F C5 05 AA 27 17 62 9C 44
0050 | B4 71 2F 0E B5 7F 1E 08 B9 50 7E 29 14 C1 85 31
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 = 1625046013</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>08224CD82F937524CD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2471587994368550093</td>
<td><code>0829F669A5774EA549000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 3023720359218029897</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>045AA79D11000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1520934161</td>
<td><code>045F8D7D61000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1603108193</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>0460DC3BFD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1625046013</td>
<td><code>04706C88E9000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1886161129</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>398DDBF9937A80D8746EE64ED3880D2D</code></td>
<td><code>8A746CB5B5A8B209607AC23F42381C8D</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>8CA2EC8FF5A5253E0D8BFE82578B8729</code></td>
<td><code>9E841464C6560CE59160C50C1FF47617</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>4D95A3EC01E4DFE20A329EF3DB4E108D</code> <code>D041BDAB38317AE6D26CE073EEFE88F3</code></td>
<td><code>FBC049041D756E0FC505AA2717629C44</code> <code>B4712F0EB57F1E08B9507E2914C18531</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1625046013</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 = 955FF5A908224CD82F937524CD000000045AA79D110000000460DC3BFD000000398DDBF9937A80D8746EE64ED3880D2D8CA2EC8FF5A5253E0D8BFE82578B87294D95A3EC01E4DFE20A329EF3DB4E108DD041BDAB38317AE6D26CE073EEFE88F302000000
random_padding_bytes = F77AF76C95C4825D826A01EA03CC093CA92ABF3EAA0D8157785FD74ADB6F0611265AE58726F4FF0F526DDED5C65109EFC7307D9E7E9A6393204C28071C0D3ADC492F8BF9CA01BA2FD65FFF1573869C2B807F032CE4A1C5720BFFE585</code></pre>
<pre><code>data = 955FF5A90829F669A5774EA549000000045F8D7D6100000004706C88E90000008A746CB5B5A8B209607AC23F42381C8D9E841464C6560CE59160C50C1FF47617FBC049041D756E0FC505AA2717629C44B4712F0EB57F1E08B9507E2914C1853102000000
random_padding_bytes = BC9C93671B69DBE52455F0C7F543141805CAE69A5EF8B26A25C3B971B0702997678141B1079D38FBD1B15F9B30C29DF39F8F7DB2A25C963F808668FCCF33427079D568A45A1E2280472A1563403548155361C412D24C6C85B0A46971</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 = 2B03C37FB170269F14E9E57B92691A6C30F113E3CD92F07E0157F2EDA9A6F1E0F531F8B35E96497C089C6D35A5F94CC80E1BE2235412291063CACF940BD2A1159FB092443C9C75159EE86F94B528F979C85B42E7AB15617078F3F2B9566389BA527346A794898530CC64C5BD96DAE27467612E6EAA57CED8B817D151604EA682F08DB37D517CF16BB45F1D0DCBF542F6E9640C3C58015412656C83BED0733F7DC9EE956C8B7C46A3D170BCBF5425E3EB612D9C4BBCC931F376AE2F3A6D388E254C8ACF9F3F742C5D3032C92657BCCC1103974DF25ECC2AA7A912820687A49A6BE987E8F7420FB20E55D806B9C83598C454741011BCA1023A6945D75076EFF0F3</code></pre>
<pre><code>encrypted_data = 360075AD1A519DBFB16611CD0291CEB0090E7E7076CC2AB2130ACB621A298302004BE8CF6CD8DD0FA9C7F555C6BB3B882132CA14AD8049BA74E23046011DCA9FAF820C1959701D9F4E697ED03DC068454E0CA897CAB18C4BA7BE4A478875869D4229587F42A5E8D400010F3614E3C01654F5982AD6CF3A69EF0C7A3471A4BC195B2EFF6881ABD6AA32520EE59F8D4FEA3D4A98E48EFFC69742A577D86C70F1017B0327E8D5ECCEA8E5216EECBD851225E69FCF09B3CADBFCFF76AA13C3284BF246B26305CBF7F0D850E376238F9C99131B7BCB2E2455DDE96F42073EC4670639605F11A8298CA95FA98E0D0B6ECC64A69540B272CB09B1C7E0B9F8F7B2449F90</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 48 CB 02 00 45 42 88 66
0010 | 40 01 00 00 BE E4 12 D7 39 8D DB F9 93 7A 80 D8
0020 | 74 6E E6 4E D3 88 0D 2D 8C A2 EC 8F F5 A5 25 3E
0030 | 0D 8B FE 82 57 8B 87 29 04 5A A7 9D 11 00 00 00
0040 | 04 60 DC 3B FD 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 2B 03 C3 7F B1 70 26 9F 14 E9 E5 7B
0060 | 92 69 1A 6C 30 F1 13 E3 CD 92 F0 7E 01 57 F2 ED
0070 | A9 A6 F1 E0 F5 31 F8 B3 5E 96 49 7C 08 9C 6D 35
0080 | A5 F9 4C C8 0E 1B E2 23 54 12 29 10 63 CA CF 94
0090 | 0B D2 A1 15 9F B0 92 44 3C 9C 75 15 9E E8 6F 94
00A0 | B5 28 F9 79 C8 5B 42 E7 AB 15 61 70 78 F3 F2 B9
00B0 | 56 63 89 BA 52 73 46 A7 94 89 85 30 CC 64 C5 BD
00C0 | 96 DA E2 74 67 61 2E 6E AA 57 CE D8 B8 17 D1 51
00D0 | 60 4E A6 82 F0 8D B3 7D 51 7C F1 6B B4 5F 1D 0D
00E0 | CB F5 42 F6 E9 64 0C 3C 58 01 54 12 65 6C 83 BE
00F0 | D0 73 3F 7D C9 EE 95 6C 8B 7C 46 A3 D1 70 BC BF
0100 | 54 25 E3 EB 61 2D 9C 4B BC C9 31 F3 76 AE 2F 3A
0110 | 6D 38 8E 25 4C 8A CF 9F 3F 74 2C 5D 30 32 C9 26
0120 | 57 BC CC 11 03 97 4D F2 5E CC 2A A7 A9 12 82 06
0130 | 87 A4 9A 6B E9 87 E8 F7 42 0F B2 0E 55 D8 06 B9
0140 | C8 35 98 C4 54 74 10 11 BC A1 02 3A 69 45 D7 50
0150 | 76 EF F0 F3</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C4 66 04 00 8F 61 89 66
0010 | 40 01 00 00 BE E4 12 D7 8A 74 6C B5 B5 A8 B2 09
0020 | 60 7A C2 3F 42 38 1C 8D 9E 84 14 64 C6 56 0C E5
0030 | 91 60 C5 0C 1F F4 76 17 04 5F 8D 7D 61 00 00 00
0040 | 04 70 6C 88 E9 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 36 00 75 AD 1A 51 9D BF B1 66 11 CD
0060 | 02 91 CE B0 09 0E 7E 70 76 CC 2A B2 13 0A CB 62
0070 | 1A 29 83 02 00 4B E8 CF 6C D8 DD 0F A9 C7 F5 55
0080 | C6 BB 3B 88 21 32 CA 14 AD 80 49 BA 74 E2 30 46
0090 | 01 1D CA 9F AF 82 0C 19 59 70 1D 9F 4E 69 7E D0
00A0 | 3D C0 68 45 4E 0C A8 97 CA B1 8C 4B A7 BE 4A 47
00B0 | 88 75 86 9D 42 29 58 7F 42 A5 E8 D4 00 01 0F 36
00C0 | 14 E3 C0 16 54 F5 98 2A D6 CF 3A 69 EF 0C 7A 34
00D0 | 71 A4 BC 19 5B 2E FF 68 81 AB D6 AA 32 52 0E E5
00E0 | 9F 8D 4F EA 3D 4A 98 E4 8E FF C6 97 42 A5 77 D8
00F0 | 6C 70 F1 01 7B 03 27 E8 D5 EC CE A8 E5 21 6E EC
0100 | BD 85 12 25 E6 9F CF 09 B3 CA DB FC FF 76 AA 13
0110 | C3 28 4B F2 46 B2 63 05 CB F7 F0 D8 50 E3 76 23
0120 | 8F 9C 99 13 1B 7B CB 2E 24 55 DD E9 6F 42 07 3E
0130 | C4 67 06 39 60 5F 11 A8 29 8C A9 5F A9 8E 0D 0B
0140 | 6E CC 64 A6 95 40 B2 72 CB 09 B1 C7 E0 B9 F8 F7
0150 | B2 44 9F 90</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 = F77AF76C95C4825D826A01EA03CC093CA92ABF3EAA0D8157785FD74AD
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>48CB020045428866</code></td>
<td><code>C46604008F618966</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 = F77AF76C95C4825D826A01EA03CC093CA92ABF3EAA0D8157785FD74AD
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>398DDBF9937A80D8746EE64ED3880D2D</code></td>
<td><code>8A746CB5B5A8B209607AC23F42381C8D</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>8CA2EC8FF5A5253E0D8BFE82578B8729</code></td>
<td><code>9E841464C6560CE59160C50C1FF47617</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>045AA79D11000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1520934161</td>
<td><code>045F8D7D61000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1603108193</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>0460DC3BFD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1625046013</td>
<td><code>04706C88E9000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1886161129</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 = F77AF76C95C4825D826A01EA03CC093CA92ABF3EAA0D8157785FD74AD
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001002B03C37FB170269F14E9E57B</code> <code>92691A6C30F113E3CD92F07E0157F2ED</code> <code>A9A6F1E0F531F8B35E96497C089C6D35</code> <code>A5F94CC80E1BE2235412291063CACF94</code> <code>0BD2A1159FB092443C9C75159EE86F94</code> <code>B528F979C85B42E7AB15617078F3F2B9</code> <code>566389BA527346A794898530CC64C5BD</code> <code>96DAE27467612E6EAA57CED8B817D151</code> <code>604EA682F08DB37D517CF16BB45F1D0D</code> <code>CBF542F6E9640C3C58015412656C83BE</code> <code>D0733F7DC9EE956C8B7C46A3D170BCBF</code> <code>5425E3EB612D9C4BBCC931F376AE2F3A</code> <code>6D388E254C8ACF9F3F742C5D3032C926</code> <code>57BCCC1103974DF25ECC2AA7A9128206</code> <code>87A49A6BE987E8F7420FB20E55D806B9</code> <code>C83598C454741011BCA1023A6945D750</code><br> <code>76EFF0F3</code></td>
<td><code>FE000100360075AD1A519DBFB16611CD</code> <code>0291CEB0090E7E7076CC2AB2130ACB62</code> <code>1A298302004BE8CF6CD8DD0FA9C7F555</code> <code>C6BB3B882132CA14AD8049BA74E23046</code> <code>011DCA9FAF820C1959701D9F4E697ED0</code> <code>3DC068454E0CA897CAB18C4BA7BE4A47</code> <code>8875869D4229587F42A5E8D400010F36</code> <code>14E3C01654F5982AD6CF3A69EF0C7A34</code> <code>71A4BC195B2EFF6881ABD6AA32520EE5</code> <code>9F8D4FEA3D4A98E48EFFC69742A577D8</code> <code>6C70F1017B0327E8D5ECCEA8E5216EEC</code> <code>BD851225E69FCF09B3CADBFCFF76AA13</code> <code>C3284BF246B26305CBF7F0D850E37623</code> <code>8F9C99131B7BCB2E2455DDE96F42073E</code> <code>C4670639605F11A8298CA95FA98E0D0B</code> <code>6ECC64A69540B272CB09B1C7E0B9F8F7</code><br> <code>B2449F90</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = F77AF76C95C4825D826A01EA03CC093CA92ABF3EAA0D8157785FD74AD
<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 F0 25 A4 45 42 88 66
0010 | B8 02 00 00 5C 07 E8 D0 39 8D DB F9 93 7A 80 D8
0020 | 74 6E E6 4E D3 88 0D 2D 8C A2 EC 8F F5 A5 25 3E
0030 | 0D 8B FE 82 57 8B 87 29 FE 50 02 00 EC 1E 36 D7
0040 | 8B FB 9C 1E 7E 9E 1A AF 0E D1 5D 8D 9C 1A A1 43
0050 | C0 56 AA 64 92 1D AF FE 75 EA 2B F0 B6 D7 C6 D3
0060 | FF 99 AB B1 55 4C 97 79 BB 33 5F 1A 74 9F C7 3A
0070 | 8F E6 4D 2D 11 D7 62 B3 4C 74 CB D7 82 64 0D E6
0080 | B1 9B C3 AA C0 D4 80 BF 89 52 32 6C 6D C8 A4 C1
0090 | CF 37 85 48 0D AD AD CA 6D 52 46 F4 28 D9 74 05
00A0 | 71 FE 25 00 93 FF 39 11 10 9D 13 90 C0 89 89 91
00B0 | 67 89 4D 6D B9 30 BC 93 3F 48 F8 7C FA 95 75 C9
00C0 | 5F 96 F6 D4 4D E8 26 17 EA C3 5B E2 F6 EC A5 5B
00D0 | 2C 55 59 38 27 9E AF 39 EC 40 13 A5 D4 DD 53 90
00E0 | F6 65 E3 06 15 68 52 9D 98 78 B5 40 6E 58 23 92
00F0 | 65 F7 0D F9 67 12 8D 00 C6 D1 79 A0 50 B1 2A 79
0100 | AA 43 14 4F 45 0C BE 5A E3 C0 A2 75 38 C7 1B AD
0110 | 59 5B 11 A7 E6 66 62 79 03 F1 89 7A FD FC 40 1A
0120 | 36 EF 3B 3E 8E 83 85 49 D7 5F A1 69 85 0F 6F 79
0130 | A1 06 05 06 4F D2 21 D5 E5 98 74 37 7A 42 8E 94
0140 | 93 60 68 BC B2 26 97 8A 81 24 A7 20 9C 6C C9 7D
0150 | 64 30 BE DC 0D 11 3F 34 BB E9 88 FC BD 8C 9E FE
0160 | 3D 20 99 A8 05 2D F6 74 8D 9B 55 EC 3D 6F F9 63
0170 | 6E 55 81 0C 37 E2 77 6A 7C 60 DB B7 6C 3D 14 3E
0180 | B5 E2 6E 0F 67 D2 C1 2F CF FE 6A F1 A5 BC 90 5D
0190 | 64 B3 74 17 55 02 E5 B9 10 9B 26 28 72 30 43 5E
01A0 | 80 9F 17 DF 67 B1 49 59 F5 D2 15 A9 BE 49 18 A3
01B0 | F9 D3 5F 88 01 7C 5D 07 91 63 CA B3 C2 73 A6 18
01C0 | 70 E8 CA 2A CB 81 20 AA D4 97 AA 24 0E 44 BA 59
01D0 | 2E AD 4B B7 6F 9D 74 AB 29 EB 98 3D CD 53 81 AC
01E0 | 09 F6 2F AE 23 25 4C B9 E3 64 B7 00 3C 21 81 7B
01F0 | 81 FA 4E B7 7E FD E9 1F A1 4A EA C8 9C 19 7A AB
0200 | 12 17 78 03 65 53 9D DA 43 6E 86 5F 43 B1 4C 92
0210 | 75 EE 77 E7 67 30 9A 22 AA A0 6D C6 FC FF 9E 1C
0220 | CD 05 13 EF F8 A3 7D 57 1C 28 0D 09 44 5E 78 DA
0230 | 3B 7B 5B 79 A8 7A A6 F6 4F 8E 48 E3 31 02 B6 03
0240 | 06 1C CD CA 7C 57 5F E0 73 BB 94 23 6B 72 36 76
0250 | 03 48 1B 9E A8 B3 1F 79 AF 90 50 FF E4 26 BA 35
0260 | B3 4F A9 16 C1 80 37 16 55 73 48 86 13 8D 44 BA
0270 | 53 CE 77 93 F7 03 08 51 9E F4 E8 4C A1 64 89 E8
0280 | 32 13 E9 9D 08 BE 24 7A D2 11 A7 EA</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 EC 8E 1D 90 61 89 66
0010 | 7C 02 00 00 5C 07 E8 D0 8A 74 6C B5 B5 A8 B2 09
0020 | 60 7A C2 3F 42 38 1C 8D 9E 84 14 64 C6 56 0C E5
0030 | 91 60 C5 0C 1F F4 76 17 FE 50 02 00 6D 5A AD DF
0040 | 81 C7 99 97 17 4E 5F DB A0 37 1A 00 8C 05 88 0D
0050 | BE AA 2C 84 20 5A 4D 2B 14 A3 58 41 9D 2A AC F1
0060 | CF 91 D8 62 CE 3D 8F 18 93 08 7B FF C2 4F 2C DE
0070 | 28 2A A0 CF 50 A9 8C C7 F5 76 ED B0 37 AD B5 45
0080 | CC 15 F9 71 88 BD EE 88 1E 3F 96 37 85 73 91 A5
0090 | E2 75 91 F1 39 4C 81 29 F8 BB 0C 39 E2 8B 81 90
00A0 | DD C1 8F 19 C6 67 A7 35 3F E0 F3 9E F6 05 54 48
00B0 | 83 00 C9 6F CC A2 54 32 36 87 47 B2 F0 D3 2F A1
00C0 | B4 CB D8 CB E9 E8 88 77 A1 B2 EB 4A 53 6C C9 67
00D0 | 17 B5 44 01 FF 29 2B FB 3A E7 D7 0B 0D B9 CE 62
00E0 | 68 46 9E AC 4A 51 C3 DE 5D 60 23 2A 71 18 3B 98
00F0 | 1B AC 7E D9 86 E7 26 CE A8 F9 4D 4A B4 41 01 C4
0100 | F5 70 00 0E 05 52 2F B7 52 7F E9 20 5F 3A AD 12
0110 | 7F 69 81 D7 08 DE 1B 30 E4 0B E2 F6 8A 8B 02 95
0120 | 80 0E 58 96 8F 97 67 28 AD C6 F7 6E 82 6E 9F DA
0130 | 13 9C A4 A8 CE 40 8C 7C B0 CC 29 2D 92 23 84 79
0140 | CB 16 53 62 CA 28 47 6D 73 DB F6 18 B2 49 AD 16
0150 | 6C 5F 8F 42 63 07 28 A0 AB 3F E0 76 EF F8 3C AD
0160 | D8 21 36 77 6E D1 75 C7 3B 2D E1 7A C8 54 DC EB
0170 | FB 44 6A 76 BA 32 9F 5C 99 F7 F0 CD B3 81 DA D5
0180 | D3 66 2E C6 D7 20 C7 25 B7 99 C9 CF 1F 52 C0 21
0190 | 8E 48 36 E4 0D 2C 77 98 F4 F3 97 C3 99 A2 D5 C2
01A0 | 6F 23 5D 46 22 BB 3C DB 40 74 93 DD 89 2F A5 31
01B0 | D6 67 4A 3C C7 49 5C BD 44 A2 EE CC BC 72 C6 9C
01C0 | 42 07 C0 22 0C 99 95 1B 0C 60 BB 03 4D 1E 1C BF
01D0 | 54 D7 17 3F 18 40 F5 C7 E1 92 83 13 9B 12 E8 AB
01E0 | 1D BD 21 7A B2 8A 40 79 87 9C 0D 2C A1 D6 C9 96
01F0 | 55 4B 6D F5 41 29 50 35 FB CA 61 FE CF 25 9D 23
0200 | BD 9C 12 9E 65 88 D0 5A 42 93 96 A3 C1 52 AC 54
0210 | C3 6B CF 31 11 A3 48 C2 F3 62 D0 13 BA 95 45 11
0220 | 8E DB 27 BA 7C FF 61 01 71 EF 1E 34 CB EC 38 A8
0230 | 4A 19 9B 87 DD BD 3F 9E B1 82 2D 39 FA 15 2A 1C
0240 | 78 0C A5 57 57 5D AD 73 11 B9 85 43 B1 99 34 8B
0250 | 89 FA 3B 01 C8 E4 9D 9B 21 C8 F7 97 0D C2 95 A5
0260 | BB 84 DA B0 CF C9 A5 75 E4 3D 5F 68 AF 0D 6E F9
0270 | 4D F8 BC 36 C3 98 B4 94 02 F1 7B 5D 9B 55 39 F5
0280 | 96 17 DD 85 C4 86 20 47 CD F7 64 A7</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 = F77AF76C95C4825D826A01EA03CC093CA92ABF3EAA0D8157785FD74AD
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01F025A445428866</code></td>
<td><code>01EC8E1D90618966</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>B8020000</code> (696 in decimal)</td>
<td><code>7C020000</code> (636 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = F77AF76C95C4825D826A01EA03CC093CA92ABF3EAA0D8157785FD74AD
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>398DDBF9937A80D8746EE64ED3880D2D</code></td>
<td><code>8A746CB5B5A8B209607AC23F42381C8D</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>8CA2EC8FF5A5253E0D8BFE82578B8729</code></td>
<td><code>9E841464C6560CE59160C50C1FF47617</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200EC1E36D78BFB9C1E7E9E1AAF</code> <code>0ED15D8D9C1AA143C056AA64921DAFFE</code> <code>75EA2BF0B6D7C6D3FF99ABB1554C9779</code> <code>BB335F1A749FC73A8FE64D2D11D762B3</code> <code>4C74CBD782640DE6B19BC3AAC0D480BF</code> <code>8952326C6DC8A4C1CF3785480DADADCA</code> <code>6D5246F428D9740571FE250093FF3911</code> <code>109D1390C089899167894D6DB930BC93</code> <code>3F48F87CFA9575C95F96F6D44DE82617</code> <code>EAC35BE2F6ECA55B2C555938279EAF39</code> <code>EC4013A5D4DD5390F665E3061568529D</code> <code>9878B5406E58239265F70DF967128D00</code> <code>C6D179A050B12A79AA43144F450CBE5A</code> <code>E3C0A27538C71BAD595B11A7E6666279</code> <code>03F1897AFDFC401A36EF3B3E8E838549</code> <code>D75FA169850F6F79A10605064FD221D5</code> <code>E59874377A428E94936068BCB226978A</code> <code>8124A7209C6CC97D6430BEDC0D113F34</code> <code>BBE988FCBD8C9EFE3D2099A8052DF674</code> <code>8D9B55EC3D6FF9636E55810C37E2776A</code> <code>7C60DBB76C3D143EB5E26E0F67D2C12F</code> <code>CFFE6AF1A5BC905D64B374175502E5B9</code> <code>109B26287230435E809F17DF67B14959</code> <code>F5D215A9BE4918A3F9D35F88017C5D07</code> <code>9163CAB3C273A61870E8CA2ACB8120AA</code> <code>D497AA240E44BA592EAD4BB76F9D74AB</code> <code>29EB983DCD5381AC09F62FAE23254CB9</code> <code>E364B7003C21817B81FA4EB77EFDE91F</code> <code>A14AEAC89C197AAB1217780365539DDA</code> <code>436E865F43B14C9275EE77E767309A22</code> <code>AAA06DC6FCFF9E1CCD0513EFF8A37D57</code> <code>1C280D09445E78DA3B7B5B79A87AA6F6</code> <code>4F8E48E33102B603061CCDCA7C575FE0</code> <code>73BB94236B72367603481B9EA8B31F79</code> <code>AF9050FFE426BA35B34FA916C1803716</code> <code>55734886138D44BA53CE7793F7030851</code> <code>9EF4E84CA16489E83213E99D08BE247A</code><br> <code>D211A7EA</code></td>
<td><code>FE5002006D5AADDF81C79997174E5FDB</code> <code>A0371A008C05880DBEAA2C84205A4D2B</code> <code>14A358419D2AACF1CF91D862CE3D8F18</code> <code>93087BFFC24F2CDE282AA0CF50A98CC7</code> <code>F576EDB037ADB545CC15F97188BDEE88</code> <code>1E3F9637857391A5E27591F1394C8129</code> <code>F8BB0C39E28B8190DDC18F19C667A735</code> <code>3FE0F39EF60554488300C96FCCA25432</code> <code>368747B2F0D32FA1B4CBD8CBE9E88877</code> <code>A1B2EB4A536CC96717B54401FF292BFB</code> <code>3AE7D70B0DB9CE6268469EAC4A51C3DE</code> <code>5D60232A71183B981BAC7ED986E726CE</code> <code>A8F94D4AB44101C4F570000E05522FB7</code> <code>527FE9205F3AAD127F6981D708DE1B30</code> <code>E40BE2F68A8B0295800E58968F976728</code> <code>ADC6F76E826E9FDA139CA4A8CE408C7C</code> <code>B0CC292D92238479CB165362CA28476D</code> <code>73DBF618B249AD166C5F8F42630728A0</code> <code>AB3FE076EFF83CADD82136776ED175C7</code> <code>3B2DE17AC854DCEBFB446A76BA329F5C</code> <code>99F7F0CDB381DAD5D3662EC6D720C725</code> <code>B799C9CF1F52C0218E4836E40D2C7798</code> <code>F4F397C399A2D5C26F235D4622BB3CDB</code> <code>407493DD892FA531D6674A3CC7495CBD</code> <code>44A2EECCBC72C69C4207C0220C99951B</code> <code>0C60BB034D1E1CBF54D7173F1840F5C7</code> <code>E19283139B12E8AB1DBD217AB28A4079</code> <code>879C0D2CA1D6C996554B6DF541295035</code> <code>FBCA61FECF259D23BD9C129E6588D05A</code> <code>429396A3C152AC54C36BCF3111A348C2</code> <code>F362D013BA9545118EDB27BA7CFF6101</code> <code>71EF1E34CBEC38A84A199B87DDBD3F9E</code> <code>B1822D39FA152A1C780CA557575DAD73</code> <code>11B98543B199348B89FA3B01C8E49D9B</code> <code>21C8F7970DC295A5BB84DAB0CFC9A575</code> <code>E43D5F68AF0D6EF94DF8BC36C398B494</code> <code>02F17B5D9B5539F59617DD85C4862047</code><br> <code>CDF764A7</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = F77AF76C95C4825D826A01EA03CC093CA92ABF3EAA0D8157785FD74AD
<!-- 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 = EC1E36D78BFB9C1E7E9E1AAF0ED15D8D9C1AA143C056AA64921DAFFE75EA2BF0B6D7C6D3FF99ABB1554C9779BB335F1A749FC73A8FE64D2D11D762B34C74CBD782640DE6B19BC3AAC0D480BF8952326C6DC8A4C1CF3785480DADADCA6D5246F428D9740571FE250093FF3911109D1390C089899167894D6DB930BC933F48F87CFA9575C95F96F6D44DE82617EAC35BE2F6ECA55B2C555938279EAF39EC4013A5D4DD5390F665E3061568529D9878B5406E58239265F70DF967128D00C6D179A050B12A79AA43144F450CBE5AE3C0A27538C71BAD595B11A7E666627903F1897AFDFC401A36EF3B3E8E838549D75FA169850F6F79A10605064FD221D5E59874377A428E94936068BCB226978A8124A7209C6CC97D6430BEDC0D113F34BBE988FCBD8C9EFE3D2099A8052DF6748D9B55EC3D6FF9636E55810C37E2776A7C60DBB76C3D143EB5E26E0F67D2C12FCFFE6AF1A5BC905D64B374175502E5B9109B26287230435E809F17DF67B14959F5D215A9BE4918A3F9D35F88017C5D079163CAB3C273A61870E8CA2ACB8120AAD497AA240E44BA592EAD4BB76F9D74AB29EB983DCD5381AC09F62FAE23254CB9E364B7003C21817B81FA4EB77EFDE91FA14AEAC89C197AAB1217780365539DDA436E865F43B14C9275EE77E767309A22AAA06DC6FCFF9E1CCD0513EFF8A37D571C280D09445E78DA3B7B5B79A87AA6F64F8E48E33102B603061CCDCA7C575FE073BB94236B72367603481B9EA8B31F79AF9050FFE426BA35B34FA916C180371655734886138D44BA53CE7793F70308519EF4E84CA16489E83213E99D08BE247AD211A7EA
tmp_aes_key = 8E9BCDF0570238EA68479EC856957F1758D2D464493C1655D577FFBB524DEB9E
tmp_aes_iv = 6048C38AF2E0E70B3B1A24148ED603EB80F8C30743CDE5CC500F84864D95A3EC</code></pre>
<pre><code>encrypted_answer = 6D5AADDF81C79997174E5FDBA0371A008C05880DBEAA2C84205A4D2B14A358419D2AACF1CF91D862CE3D8F1893087BFFC24F2CDE282AA0CF50A98CC7F576EDB037ADB545CC15F97188BDEE881E3F9637857391A5E27591F1394C8129F8BB0C39E28B8190DDC18F19C667A7353FE0F39EF60554488300C96FCCA25432368747B2F0D32FA1B4CBD8CBE9E88877A1B2EB4A536CC96717B54401FF292BFB3AE7D70B0DB9CE6268469EAC4A51C3DE5D60232A71183B981BAC7ED986E726CEA8F94D4AB44101C4F570000E05522FB7527FE9205F3AAD127F6981D708DE1B30E40BE2F68A8B0295800E58968F976728ADC6F76E826E9FDA139CA4A8CE408C7CB0CC292D92238479CB165362CA28476D73DBF618B249AD166C5F8F42630728A0AB3FE076EFF83CADD82136776ED175C73B2DE17AC854DCEBFB446A76BA329F5C99F7F0CDB381DAD5D3662EC6D720C725B799C9CF1F52C0218E4836E40D2C7798F4F397C399A2D5C26F235D4622BB3CDB407493DD892FA531D6674A3CC7495CBD44A2EECCBC72C69C4207C0220C99951B0C60BB034D1E1CBF54D7173F1840F5C7E19283139B12E8AB1DBD217AB28A4079879C0D2CA1D6C996554B6DF541295035FBCA61FECF259D23BD9C129E6588D05A429396A3C152AC54C36BCF3111A348C2F362D013BA9545118EDB27BA7CFF610171EF1E34CBEC38A84A199B87DDBD3F9EB1822D39FA152A1C780CA557575DAD7311B98543B199348B89FA3B01C8E49D9B21C8F7970DC295A5BB84DAB0CFC9A575E43D5F68AF0D6EF94DF8BC36C398B49402F17B5D9B5539F59617DD85C4862047CDF764A7
tmp_aes_key = F6C8B70E28B38F579298486D999B0FCF25918C61A50C6C6E269AD587FB88E194
tmp_aes_iv = 7250DE6AE3E631E6D7AACDF78A312205C83A84A8ECFEFA5B11D67BC9FBC04904</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 2DB08BB8873822F728C4FA96357A707FB0204926BA0D89B5398DDBF9937A80D8746EE64ED3880D2D8CA2EC8FF5A5253E0D8BFE82578B872903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007F563DC14E0FE403C3288CB7112AA9BEE9C9A03DD9B57F443BC66A96276FA6B6794613EAB032F7A564AECF24431742D5FAADB3FD264DD4C994513FCFD5F7A8A16A3852137B43C123934D4173C30D434BB29867F1330872B59DBDB063CF0435CC0A82D2F79E1A6247F8986C6508A852B52058877869D511FEC686F6401799ADCB4C26921F07B136B55C1A065453CEE825F6665706CEF3720FB6EB2F4DD30E1A78985F8F0F0AE81D58C8E2E97C5C16207F46CDE176D33E2C7B066FFEDB36CFE497130D337CFB20FD100DC4ACB143895E3D0CA0E9F66514DA2E2208C6B80357F884A882DA869FAFA1A65B7BD946A47F654015C3C2E5E47A03C660DA6EAE95AFB896454288661FEC3703B3688E94
answer = BA0D89B5398DDBF9937A80D8746EE64ED3880D2D8CA2EC8FF5A5253E0D8BFE82578B872903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007F563DC14E0FE403C3288CB7112AA9BEE9C9A03DD9B57F443BC66A96276FA6B6794613EAB032F7A564AECF24431742D5FAADB3FD264DD4C994513FCFD5F7A8A16A3852137B43C123934D4173C30D434BB29867F1330872B59DBDB063CF0435CC0A82D2F79E1A6247F8986C6508A852B52058877869D511FEC686F6401799ADCB4C26921F07B136B55C1A065453CEE825F6665706CEF3720FB6EB2F4DD30E1A78985F8F0F0AE81D58C8E2E97C5C16207F46CDE176D33E2C7B066FFEDB36CFE497130D337CFB20FD100DC4ACB143895E3D0CA0E9F66514DA2E2208C6B80357F884A882DA869FAFA1A65B7BD946A47F654015C3C2E5E47A03C660DA6EAE95AFB896454288661FEC3703B3688E94</code></pre>
<pre><code>answer_with_hash = 470230E9F0704272DE68166D4484486AFFC514ACBA0D89B58A746CB5B5A8B209607AC23F42381C8D9E841464C6560CE59160C50C1FF4761703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002B06F35519FB9B69A441ACEDD6A8F77A22D90209189A4A22C89FC4D255E9BC5DB1DD4D27E2B41027981B861708465084A0759367DA102A5FEF15C368EB56996AD18255256D59136FDC0E6211B81AE72D27BEA5C444CB9DA38750345C51C06AD34E62E04820F4AF96D580EFE8ED7C5593F5E3BC989EABF8A46AA43FF6881F85A3E8BD654FD078D2DD6A8C7ABBAA899BD68B3142A64516DD356F357ABC4F88CC37EFF4C2A66DCF6DE8C4C110D87142B39FE241E890AF985354DF02ADE13EF0293325F09118A700F8A27C567C75F5B4EC65E6A12E69BEFCD611CBB497650E15E0FD6A1AED0049F40228B5CDBA0BF81934CB9497F33294499AF660CE8980B0017C9890618966FA9FA97CF1B88E97
answer = BA0D89B58A746CB5B5A8B209607AC23F42381C8D9E841464C6560CE59160C50C1FF4761703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001002B06F35519FB9B69A441ACEDD6A8F77A22D90209189A4A22C89FC4D255E9BC5DB1DD4D27E2B41027981B861708465084A0759367DA102A5FEF15C368EB56996AD18255256D59136FDC0E6211B81AE72D27BEA5C444CB9DA38750345C51C06AD34E62E04820F4AF96D580EFE8ED7C5593F5E3BC989EABF8A46AA43FF6881F85A3E8BD654FD078D2DD6A8C7ABBAA899BD68B3142A64516DD356F357ABC4F88CC37EFF4C2A66DCF6DE8C4C110D87142B39FE241E890AF985354DF02ADE13EF0293325F09118A700F8A27C567C75F5B4EC65E6A12E69BEFCD611CBB497650E15E0FD6A1AED0049F40228B5CDBA0BF81934CB9497F33294499AF660CE8980B0017C9890618966FA9FA97CF1B88E97</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 39 8D DB F9 93 7A 80 D8 74 6E E6 4E
0010 | D3 88 0D 2D 8C A2 EC 8F F5 A5 25 3E 0D 8B FE 82
0020 | 57 8B 87 29 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 8A 74 6C B5 B5 A8 B2 09 60 7A C2 3F
0010 | 42 38 1C 8D 9E 84 14 64 C6 56 0C E5 91 60 C5 0C
0020 | 1F F4 76 17 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 = BA0D89B5398DDBF9937A80D8746EE64ED3880D2D8CA2EC8FF5A5253E0D8BFE82578B872
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 | 7F 56 3D C1 4E 0F E4 03 C3 28 8C B7 11 2A A9 BE
0140 | E9 C9 A0 3D D9 B5 7F 44 3B C6 6A 96 27 6F A6 B6
0150 | 79 46 13 EA B0 32 F7 A5 64 AE CF 24 43 17 42 D5
0160 | FA AD B3 FD 26 4D D4 C9 94 51 3F CF D5 F7 A8 A1
0170 | 6A 38 52 13 7B 43 C1 23 93 4D 41 73 C3 0D 43 4B
0180 | B2 98 67 F1 33 08 72 B5 9D BD B0 63 CF 04 35 CC
0190 | 0A 82 D2 F7 9E 1A 62 47 F8 98 6C 65 08 A8 52 B5
01A0 | 20 58 87 78 69 D5 11 FE C6 86 F6 40 17 99 AD CB
01B0 | 4C 26 92 1F 07 B1 36 B5 5C 1A 06 54 53 CE E8 25
01C0 | F6 66 57 06 CE F3 72 0F B6 EB 2F 4D D3 0E 1A 78
01D0 | 98 5F 8F 0F 0A E8 1D 58 C8 E2 E9 7C 5C 16 20 7F
01E0 | 46 CD E1 76 D3 3E 2C 7B 06 6F FE DB 36 CF E4 97
01F0 | 13 0D 33 7C FB 20 FD 10 0D C4 AC B1 43 89 5E 3D
0200 | 0C A0 E9 F6 65 14 DA 2E 22 08 C6 B8 03 57 F8 84
0210 | A8 82 DA 86 9F AF A1 A6 5B 7B D9 46 A4 7F 65 40
0220 | 15 C3 C2 E5 E4 7A 03 C6 60 DA 6E AE 95 AF B8 96
0230 | 45 42 88 66</code></pre>
0130 | 2B 06 F3 55 19 FB 9B 69 A4 41 AC ED D6 A8 F7 7A
0140 | 22 D9 02 09 18 9A 4A 22 C8 9F C4 D2 55 E9 BC 5D
0150 | B1 DD 4D 27 E2 B4 10 27 98 1B 86 17 08 46 50 84
0160 | A0 75 93 67 DA 10 2A 5F EF 15 C3 68 EB 56 99 6A
0170 | D1 82 55 25 6D 59 13 6F DC 0E 62 11 B8 1A E7 2D
0180 | 27 BE A5 C4 44 CB 9D A3 87 50 34 5C 51 C0 6A D3
0190 | 4E 62 E0 48 20 F4 AF 96 D5 80 EF E8 ED 7C 55 93
01A0 | F5 E3 BC 98 9E AB F8 A4 6A A4 3F F6 88 1F 85 A3
01B0 | E8 BD 65 4F D0 78 D2 DD 6A 8C 7A BB AA 89 9B D6
01C0 | 8B 31 42 A6 45 16 DD 35 6F 35 7A BC 4F 88 CC 37
01D0 | EF F4 C2 A6 6D CF 6D E8 C4 C1 10 D8 71 42 B3 9F
01E0 | E2 41 E8 90 AF 98 53 54 DF 02 AD E1 3E F0 29 33
01F0 | 25 F0 91 18 A7 00 F8 A2 7C 56 7C 75 F5 B4 EC 65
0200 | E6 A1 2E 69 BE FC D6 11 CB B4 97 65 0E 15 E0 FD
0210 | 6A 1A ED 00 49 F4 02 28 B5 CD BA 0B F8 19 34 CB
0220 | 94 97 F3 32 94 49 9A F6 60 CE 89 80 B0 01 7C 98
0230 | 90 61 89 66</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
<table class="table">
@ -570,13 +570,13 @@ answer = BA0D89B5398DDBF9937A80D8746EE64ED3880D2D8CA2EC8FF5A5253E0D8BFE82578B872
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>398DDBF9937A80D8746EE64ED3880D2D</code></td>
<td><code>8A746CB5B5A8B209607AC23F42381C8D</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>8CA2EC8FF5A5253E0D8BFE82578B8729</code></td>
<td><code>9E841464C6560CE59160C50C1FF47617</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B5398DDBF9937A80D8746EE64ED3880D2D8CA2EC8FF5A5253E0D8BFE82578B872
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE0001007F563DC14E0FE403C3288CB7</code> <code>112AA9BEE9C9A03DD9B57F443BC66A96</code> <code>276FA6B6794613EAB032F7A564AECF24</code> <code>431742D5FAADB3FD264DD4C994513FCF</code> <code>D5F7A8A16A3852137B43C123934D4173</code> <code>C30D434BB29867F1330872B59DBDB063</code> <code>CF0435CC0A82D2F79E1A6247F8986C65</code> <code>08A852B52058877869D511FEC686F640</code> <code>1799ADCB4C26921F07B136B55C1A0654</code> <code>53CEE825F6665706CEF3720FB6EB2F4D</code> <code>D30E1A78985F8F0F0AE81D58C8E2E97C</code> <code>5C16207F46CDE176D33E2C7B066FFEDB</code> <code>36CFE497130D337CFB20FD100DC4ACB1</code> <code>43895E3D0CA0E9F66514DA2E2208C6B8</code> <code>0357F884A882DA869FAFA1A65B7BD946</code> <code>A47F654015C3C2E5E47A03C660DA6EAE</code><br> <code>95AFB896</code></td>
<td><code>FE0001002B06F35519FB9B69A441ACED</code> <code>D6A8F77A22D90209189A4A22C89FC4D2</code> <code>55E9BC5DB1DD4D27E2B41027981B8617</code> <code>08465084A0759367DA102A5FEF15C368</code> <code>EB56996AD18255256D59136FDC0E6211</code> <code>B81AE72D27BEA5C444CB9DA38750345C</code> <code>51C06AD34E62E04820F4AF96D580EFE8</code> <code>ED7C5593F5E3BC989EABF8A46AA43FF6</code> <code>881F85A3E8BD654FD078D2DD6A8C7ABB</code> <code>AA899BD68B3142A64516DD356F357ABC</code> <code>4F88CC37EFF4C2A66DCF6DE8C4C110D8</code> <code>7142B39FE241E890AF985354DF02ADE1</code> <code>3EF0293325F09118A700F8A27C567C75</code> <code>F5B4EC65E6A12E69BEFCD611CBB49765</code> <code>0E15E0FD6A1AED0049F40228B5CDBA0B</code> <code>F81934CB9497F33294499AF660CE8980</code><br> <code>B0017C98</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>45428866</code> (1720205893 in decimal)</td>
<td><code>90618966</code> (1720279440 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B5398DDBF9937A80D8746EE64ED3880D2D8CA2EC8FF5A5253E0D8BFE82578B872
<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 = 9CF93ACC8B60673E2BD956177B30AA952C03776A38A0F8F40A0A79C4F9B652D8F1DAD9EA226FFB92CFC68C51BF990C9FEA53295E0B33B60ED6B46F752CB27930B5DDBEED273E018CE369C7B7CDCF8CC9740436FF9C29ADA6FF7530B3F0933489EF1E882C68810B523A5F41335260B995CB8300E212F5DC3D34DB4AA0A1AA1FD83ED122EAB72F250414CCD1BC9FA4EB5A20E10CE3FE165A214C78850B1E5D5EA387B5B046E412AC967422A94B7ECEEAFC56038FF7F4CC370633A5C54BC8E1B16CB84BC5F277827A1AC0B67E2C3AD4EDEEEFAFF95ADBF395C148746F7BE4AC55E03E921C83B066A1FD51F2441563A7B6DBB2DC85A32420FD922C76C8F3DBA75382</code></pre>
<pre><code>b = C1330D14BF326E49DCB91171D2CAA83CC5C98562C6D608D9CD48C8A510830AF282D90260DFC0A65266D6A86776F191DC3F798D4B5345BCC163CE8D6D9294076F60396341017C09B6164729F1D859B6161B1277B15F1B60464AD9BED0C6C396D1993347F2BADF8CAB3CB8D7FE784A3C57C2F0229ED2C0E51593D0C76B547D3389E73E42EE30860D039F3D9D533AD2AD34560DAF4BE2EC02C254F77CD660962675667A2196ED485346B42E818B35754ED03EE9FC5F02060D43202D6BD44C7DAA2E94C7551159A3C166B616A10B1E6C3D271E38534C3D33C9B6733309D2229942E5491198BE626CEB4AC8F229C099E4C5F72F43ED9FAE497D4A02CE6F47AF913997</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 = 9B6F1D157BE53750FAD2CF4D35E3BC680EA14D0BF22B1F37D871CAE627537BFE483C12E27D079808235103E3D826C29E66EB79E0EB0B497617FD8797EE98B24325940CDE8C03CBE9ACDA18F7DCC93A1252465816F1AB54252B35BC8F7BCC4459E764432F0A9B351F97BED47A907BFD3913230D1FE3499FC8C31E6B33BCA597724F89C194D342591094B533D978646A68AAC2FFE912C06198CF1A6FDA2A51FE423A9BC784AD2E99FF40C7FC33F69E0A5E3762252B0B97BE75F64977C8A329F986E75FD0266E48D1649DB7017CFEDD58AA1EF8F808D9AF3DB28F9A96ABFAFB43E2473576D29A5DF805525172DDE83E7DEE3EDD01F0B5496E6F5EDA6F992DF6B8DE</code></pre>
<pre><code>g_b = 1C5E3A3FC0740AB61E09EBFE006A990103D77A0877A7B2F11052B12672180BAFC743616A864AC41A91E5EA8AC9CEC9434D9916899DC878FDF8EC4C452C6CACB14EB91FB8EB5153259E05634A46379034993391B0F438FB9417A2787E605D9C41F44BFC0049A34D0FD0F5265E592024CCABECBA1B60E04A9CE960F5FA00D38D23F22F0C013FCCCDB34686160BD09ECB2482DE4D0946D9C9DCE337161366F934186E1D11A06260CDA5E4F85F3298055DDA12EED331AE5E1D0F2B206AB9BD3552D5CC7A85C9C4231BA990949B9B2FB2D7B205FE06B1D482FD21BCF8FE7FEF3D96347FA4F01C46952E84C9B7B40AB35D5177D83A346039AE7843C59012FF1063A60B</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 39 8D DB F9 93 7A 80 D8 74 6E E6 4E
0010 | D3 88 0D 2D 8C A2 EC 8F F5 A5 25 3E 0D 8B FE 82
0020 | 57 8B 87 29 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 9B 6F 1D 15 7B E5 37 50 FA D2 CF 4D 35 E3 BC 68
0040 | 0E A1 4D 0B F2 2B 1F 37 D8 71 CA E6 27 53 7B FE
0050 | 48 3C 12 E2 7D 07 98 08 23 51 03 E3 D8 26 C2 9E
0060 | 66 EB 79 E0 EB 0B 49 76 17 FD 87 97 EE 98 B2 43
0070 | 25 94 0C DE 8C 03 CB E9 AC DA 18 F7 DC C9 3A 12
0080 | 52 46 58 16 F1 AB 54 25 2B 35 BC 8F 7B CC 44 59
0090 | E7 64 43 2F 0A 9B 35 1F 97 BE D4 7A 90 7B FD 39
00A0 | 13 23 0D 1F E3 49 9F C8 C3 1E 6B 33 BC A5 97 72
00B0 | 4F 89 C1 94 D3 42 59 10 94 B5 33 D9 78 64 6A 68
00C0 | AA C2 FF E9 12 C0 61 98 CF 1A 6F DA 2A 51 FE 42
00D0 | 3A 9B C7 84 AD 2E 99 FF 40 C7 FC 33 F6 9E 0A 5E
00E0 | 37 62 25 2B 0B 97 BE 75 F6 49 77 C8 A3 29 F9 86
00F0 | E7 5F D0 26 6E 48 D1 64 9D B7 01 7C FE DD 58 AA
0100 | 1E F8 F8 08 D9 AF 3D B2 8F 9A 96 AB FA FB 43 E2
0110 | 47 35 76 D2 9A 5D F8 05 52 51 72 DD E8 3E 7D EE
0120 | 3E DD 01 F0 B5 49 6E 6F 5E DA 6F 99 2D F6 B8 DE</code></pre>
<pre><code>0000 | 54 B6 43 66 8A 74 6C B5 B5 A8 B2 09 60 7A C2 3F
0010 | 42 38 1C 8D 9E 84 14 64 C6 56 0C E5 91 60 C5 0C
0020 | 1F F4 76 17 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 1C 5E 3A 3F C0 74 0A B6 1E 09 EB FE 00 6A 99 01
0040 | 03 D7 7A 08 77 A7 B2 F1 10 52 B1 26 72 18 0B AF
0050 | C7 43 61 6A 86 4A C4 1A 91 E5 EA 8A C9 CE C9 43
0060 | 4D 99 16 89 9D C8 78 FD F8 EC 4C 45 2C 6C AC B1
0070 | 4E B9 1F B8 EB 51 53 25 9E 05 63 4A 46 37 90 34
0080 | 99 33 91 B0 F4 38 FB 94 17 A2 78 7E 60 5D 9C 41
0090 | F4 4B FC 00 49 A3 4D 0F D0 F5 26 5E 59 20 24 CC
00A0 | AB EC BA 1B 60 E0 4A 9C E9 60 F5 FA 00 D3 8D 23
00B0 | F2 2F 0C 01 3F CC CD B3 46 86 16 0B D0 9E CB 24
00C0 | 82 DE 4D 09 46 D9 C9 DC E3 37 16 13 66 F9 34 18
00D0 | 6E 1D 11 A0 62 60 CD A5 E4 F8 5F 32 98 05 5D DA
00E0 | 12 EE D3 31 AE 5E 1D 0F 2B 20 6A B9 BD 35 52 D5
00F0 | CC 7A 85 C9 C4 23 1B A9 90 94 9B 9B 2F B2 D7 B2
0100 | 05 FE 06 B1 D4 82 FD 21 BC F8 FE 7F EF 3D 96 34
0110 | 7F A4 F0 1C 46 95 2E 84 C9 B7 B4 0A B3 5D 51 77
0120 | D8 3A 34 60 39 AE 78 43 C5 90 12 FF 10 63 A6 0B</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 = BA0D89B5398DDBF9937A80D8746EE64ED3880D2D8CA2EC8FF5A5253E0D8BFE82578B872
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>398DDBF9937A80D8746EE64ED3880D2D</code></td>
<td><code>8A746CB5B5A8B209607AC23F42381C8D</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>8CA2EC8FF5A5253E0D8BFE82578B8729</code></td>
<td><code>9E841464C6560CE59160C50C1FF47617</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE0001009B6F1D157BE53750FAD2CF4D</code> <code>35E3BC680EA14D0BF22B1F37D871CAE6</code> <code>27537BFE483C12E27D079808235103E3</code> <code>D826C29E66EB79E0EB0B497617FD8797</code> <code>EE98B24325940CDE8C03CBE9ACDA18F7</code> <code>DCC93A1252465816F1AB54252B35BC8F</code> <code>7BCC4459E764432F0A9B351F97BED47A</code> <code>907BFD3913230D1FE3499FC8C31E6B33</code> <code>BCA597724F89C194D342591094B533D9</code> <code>78646A68AAC2FFE912C06198CF1A6FDA</code> <code>2A51FE423A9BC784AD2E99FF40C7FC33</code> <code>F69E0A5E3762252B0B97BE75F64977C8</code> <code>A329F986E75FD0266E48D1649DB7017C</code> <code>FEDD58AA1EF8F808D9AF3DB28F9A96AB</code> <code>FAFB43E2473576D29A5DF805525172DD</code> <code>E83E7DEE3EDD01F0B5496E6F5EDA6F99</code><br> <code>2DF6B8DE</code></td>
<td><code>FE0001001C5E3A3FC0740AB61E09EBFE</code> <code>006A990103D77A0877A7B2F11052B126</code> <code>72180BAFC743616A864AC41A91E5EA8A</code> <code>C9CEC9434D9916899DC878FDF8EC4C45</code> <code>2C6CACB14EB91FB8EB5153259E05634A</code> <code>46379034993391B0F438FB9417A2787E</code> <code>605D9C41F44BFC0049A34D0FD0F5265E</code> <code>592024CCABECBA1B60E04A9CE960F5FA</code> <code>00D38D23F22F0C013FCCCDB34686160B</code> <code>D09ECB2482DE4D0946D9C9DCE3371613</code> <code>66F934186E1D11A06260CDA5E4F85F32</code> <code>98055DDA12EED331AE5E1D0F2B206AB9</code> <code>BD3552D5CC7A85C9C4231BA990949B9B</code> <code>2FB2D7B205FE06B1D482FD21BCF8FE7F</code> <code>EF3D96347FA4F01C46952E84C9B7B40A</code> <code>B35D5177D83A346039AE7843C59012FF</code><br> <code>1063A60B</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 = BA0D89B5398DDBF9937A80D8746EE64ED3880D2D8CA2EC8FF5A5253E0D8BFE82578B872
<!-- 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 = 54B64366398DDBF9937A80D8746EE64ED3880D2D8CA2EC8FF5A5253E0D8BFE82578B87290000000000000000FE0001009B6F1D157BE53750FAD2CF4D35E3BC680EA14D0BF22B1F37D871CAE627537BFE483C12E27D079808235103E3D826C29E66EB79E0EB0B497617FD8797EE98B24325940CDE8C03CBE9ACDA18F7DCC93A1252465816F1AB54252B35BC8F7BCC4459E764432F0A9B351F97BED47A907BFD3913230D1FE3499FC8C31E6B33BCA597724F89C194D342591094B533D978646A68AAC2FFE912C06198CF1A6FDA2A51FE423A9BC784AD2E99FF40C7FC33F69E0A5E3762252B0B97BE75F64977C8A329F986E75FD0266E48D1649DB7017CFEDD58AA1EF8F808D9AF3DB28F9A96ABFAFB43E2473576D29A5DF805525172DDE83E7DEE3EDD01F0B5496E6F5EDA6F992DF6B8DE
padding = 0A1EB899A22DE53DA9B39222
tmp_aes_key = 8E9BCDF0570238EA68479EC856957F1758D2D464493C1655D577FFBB524DEB9E
tmp_aes_iv = 6048C38AF2E0E70B3B1A24148ED603EB80F8C30743CDE5CC500F84864D95A3EC</code></pre>
<pre><code>data = 54B643668A746CB5B5A8B209607AC23F42381C8D9E841464C6560CE59160C50C1FF476170000000000000000FE0001001C5E3A3FC0740AB61E09EBFE006A990103D77A0877A7B2F11052B12672180BAFC743616A864AC41A91E5EA8AC9CEC9434D9916899DC878FDF8EC4C452C6CACB14EB91FB8EB5153259E05634A46379034993391B0F438FB9417A2787E605D9C41F44BFC0049A34D0FD0F5265E592024CCABECBA1B60E04A9CE960F5FA00D38D23F22F0C013FCCCDB34686160BD09ECB2482DE4D0946D9C9DCE337161366F934186E1D11A06260CDA5E4F85F3298055DDA12EED331AE5E1D0F2B206AB9BD3552D5CC7A85C9C4231BA990949B9B2FB2D7B205FE06B1D482FD21BCF8FE7FEF3D96347FA4F01C46952E84C9B7B40AB35D5177D83A346039AE7843C59012FF1063A60B
padding = CCC1EFD6BF664FE1B892B41B
tmp_aes_key = F6C8B70E28B38F579298486D999B0FCF25918C61A50C6C6E269AD587FB88E194
tmp_aes_iv = 7250DE6AE3E631E6D7AACDF78A312205C83A84A8ECFEFA5B11D67BC9FBC04904</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 = 55F11A0026B5AD5AC5828AB9829C89CBBD55B813972A35B19BE41D7C650F49409322E718E3D17E19853D107021D4907CB821DE489FC8A282110AE38A523B385446283976B7A05838317543A4098E7E7A62301D93B362DF107B2C22CB22D7C2531C4FCA2D16762CE978C97B5DF3B3E60BE01087E32D7D70BD1B8433B58F01126D0C56F98C9D77777B5E4EB57CE3EE17AF033E81B19E1E281F13CBCE3BA19639A31E0BD9FAC8E24D5ACB2928C8998AB60D95035D439EAECE695E6E278173A8A933587F0E5D09F0BAB18FA1B9A04AEC3BAF3F3EE99E33F69129283E161FA464D9E7A6B35F4BDAE1644C84EBC405165F370FE68EAB5A6FFB99F27BCEF9DD3B6B2EF91FBD76D00C92A8C10B992A07050DE57E4A5523A0C0E3F217D27D7F1B3AD9A5AEA45EC31C89352C0727152E1A8CC99A805ECC6601F8AA6F92613BCF8504588E6B7592F73990E4C456E39680C997EBB396</code></pre>
<pre><code>encrypted_data = 2CFB9E47A412980CD68FAC7CD010727A6F8FEAF131891FFC62462CA3BB17847C39F884DA945EA57DD94A55FEA50CE72D737121CC7DD269C1C0C5D756C3720800AFECB573E89618DA3C7A285474F901D4F73755C0D811BBFBFEA82E9E6DEE71643743046E8FAFF01430F61CCA0CD63E235BFD8EB32D018C3ECEFFCF4A7ACA54A64527D5DB4129B2DD9D58F72124366F385214B59E3DE6CFFCB56D537D2748C23E60BE32C815FDF5DFFA0F042A27ADA968F38E3E3087350B9577B9AB3B6F41D799BC4D8DA8F74620469435A12631FD4CAA7C65713A44230D7B855E55AF2D6890B3947646C623D8875A24D6E271D824CCFECCE8AA24E4E036B4111015B41F7F1CFD3A26982F537BE2BA6CFE87434B612139B0C51A9AE588356264E8B7990C8D7D11E38EEECFC308484752AC91A062BBFA0EBDF674A8A019485FA73B28ED5FAC1555E80BC33DCA107F17BE9DCE453760C3C1</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 B0 0C 0A 00 45 42 88 66
0010 | 78 01 00 00 1F 5F 04 F5 39 8D DB F9 93 7A 80 D8
0020 | 74 6E E6 4E D3 88 0D 2D 8C A2 EC 8F F5 A5 25 3E
0030 | 0D 8B FE 82 57 8B 87 29 FE 50 01 00 55 F1 1A 00
0040 | 26 B5 AD 5A C5 82 8A B9 82 9C 89 CB BD 55 B8 13
0050 | 97 2A 35 B1 9B E4 1D 7C 65 0F 49 40 93 22 E7 18
0060 | E3 D1 7E 19 85 3D 10 70 21 D4 90 7C B8 21 DE 48
0070 | 9F C8 A2 82 11 0A E3 8A 52 3B 38 54 46 28 39 76
0080 | B7 A0 58 38 31 75 43 A4 09 8E 7E 7A 62 30 1D 93
0090 | B3 62 DF 10 7B 2C 22 CB 22 D7 C2 53 1C 4F CA 2D
00A0 | 16 76 2C E9 78 C9 7B 5D F3 B3 E6 0B E0 10 87 E3
00B0 | 2D 7D 70 BD 1B 84 33 B5 8F 01 12 6D 0C 56 F9 8C
00C0 | 9D 77 77 7B 5E 4E B5 7C E3 EE 17 AF 03 3E 81 B1
00D0 | 9E 1E 28 1F 13 CB CE 3B A1 96 39 A3 1E 0B D9 FA
00E0 | C8 E2 4D 5A CB 29 28 C8 99 8A B6 0D 95 03 5D 43
00F0 | 9E AE CE 69 5E 6E 27 81 73 A8 A9 33 58 7F 0E 5D
0100 | 09 F0 BA B1 8F A1 B9 A0 4A EC 3B AF 3F 3E E9 9E
0110 | 33 F6 91 29 28 3E 16 1F A4 64 D9 E7 A6 B3 5F 4B
0120 | DA E1 64 4C 84 EB C4 05 16 5F 37 0F E6 8E AB 5A
0130 | 6F FB 99 F2 7B CE F9 DD 3B 6B 2E F9 1F BD 76 D0
0140 | 0C 92 A8 C1 0B 99 2A 07 05 0D E5 7E 4A 55 23 A0
0150 | C0 E3 F2 17 D2 7D 7F 1B 3A D9 A5 AE A4 5E C3 1C
0160 | 89 35 2C 07 27 15 2E 1A 8C C9 9A 80 5E CC 66 01
0170 | F8 AA 6F 92 61 3B CF 85 04 58 8E 6B 75 92 F7 39
0180 | 90 E4 C4 56 E3 96 80 C9 97 EB B3 96</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 E4 EF 00 00 90 61 89 66
0010 | 78 01 00 00 1F 5F 04 F5 8A 74 6C B5 B5 A8 B2 09
0020 | 60 7A C2 3F 42 38 1C 8D 9E 84 14 64 C6 56 0C E5
0030 | 91 60 C5 0C 1F F4 76 17 FE 50 01 00 2C FB 9E 47
0040 | A4 12 98 0C D6 8F AC 7C D0 10 72 7A 6F 8F EA F1
0050 | 31 89 1F FC 62 46 2C A3 BB 17 84 7C 39 F8 84 DA
0060 | 94 5E A5 7D D9 4A 55 FE A5 0C E7 2D 73 71 21 CC
0070 | 7D D2 69 C1 C0 C5 D7 56 C3 72 08 00 AF EC B5 73
0080 | E8 96 18 DA 3C 7A 28 54 74 F9 01 D4 F7 37 55 C0
0090 | D8 11 BB FB FE A8 2E 9E 6D EE 71 64 37 43 04 6E
00A0 | 8F AF F0 14 30 F6 1C CA 0C D6 3E 23 5B FD 8E B3
00B0 | 2D 01 8C 3E CE FF CF 4A 7A CA 54 A6 45 27 D5 DB
00C0 | 41 29 B2 DD 9D 58 F7 21 24 36 6F 38 52 14 B5 9E
00D0 | 3D E6 CF FC B5 6D 53 7D 27 48 C2 3E 60 BE 32 C8
00E0 | 15 FD F5 DF FA 0F 04 2A 27 AD A9 68 F3 8E 3E 30
00F0 | 87 35 0B 95 77 B9 AB 3B 6F 41 D7 99 BC 4D 8D A8
0100 | F7 46 20 46 94 35 A1 26 31 FD 4C AA 7C 65 71 3A
0110 | 44 23 0D 7B 85 5E 55 AF 2D 68 90 B3 94 76 46 C6
0120 | 23 D8 87 5A 24 D6 E2 71 D8 24 CC FE CC E8 AA 24
0130 | E4 E0 36 B4 11 10 15 B4 1F 7F 1C FD 3A 26 98 2F
0140 | 53 7B E2 BA 6C FE 87 43 4B 61 21 39 B0 C5 1A 9A
0150 | E5 88 35 62 64 E8 B7 99 0C 8D 7D 11 E3 8E EE CF
0160 | C3 08 48 47 52 AC 91 A0 62 BB FA 0E BD F6 74 A8
0170 | A0 19 48 5F A7 3B 28 ED 5F AC 15 55 E8 0B C3 3D
0180 | CA 10 7F 17 BE 9D CE 45 37 60 C3 C1</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>B00C0A0045428866</code></td>
<td><code>E4EF000090618966</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>398DDBF9937A80D8746EE64ED3880D2D</code></td>
<td><code>8A746CB5B5A8B209607AC23F42381C8D</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>8CA2EC8FF5A5253E0D8BFE82578B8729</code></td>
<td><code>9E841464C6560CE59160C50C1FF47617</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE50010055F11A0026B5AD5AC5828AB9</code> <code>829C89CBBD55B813972A35B19BE41D7C</code> <code>650F49409322E718E3D17E19853D1070</code> <code>21D4907CB821DE489FC8A282110AE38A</code> <code>523B385446283976B7A05838317543A4</code> <code>098E7E7A62301D93B362DF107B2C22CB</code> <code>22D7C2531C4FCA2D16762CE978C97B5D</code> <code>F3B3E60BE01087E32D7D70BD1B8433B5</code> <code>8F01126D0C56F98C9D77777B5E4EB57C</code> <code>E3EE17AF033E81B19E1E281F13CBCE3B</code> <code>A19639A31E0BD9FAC8E24D5ACB2928C8</code> <code>998AB60D95035D439EAECE695E6E2781</code> <code>73A8A933587F0E5D09F0BAB18FA1B9A0</code> <code>4AEC3BAF3F3EE99E33F69129283E161F</code> <code>A464D9E7A6B35F4BDAE1644C84EBC405</code> <code>165F370FE68EAB5A6FFB99F27BCEF9DD</code> <code>3B6B2EF91FBD76D00C92A8C10B992A07</code> <code>050DE57E4A5523A0C0E3F217D27D7F1B</code> <code>3AD9A5AEA45EC31C89352C0727152E1A</code> <code>8CC99A805ECC6601F8AA6F92613BCF85</code> <code>04588E6B7592F73990E4C456E39680C9</code><br> <code>97EBB396</code></td>
<td><code>FE5001002CFB9E47A412980CD68FAC7C</code> <code>D010727A6F8FEAF131891FFC62462CA3</code> <code>BB17847C39F884DA945EA57DD94A55FE</code> <code>A50CE72D737121CC7DD269C1C0C5D756</code> <code>C3720800AFECB573E89618DA3C7A2854</code> <code>74F901D4F73755C0D811BBFBFEA82E9E</code> <code>6DEE71643743046E8FAFF01430F61CCA</code> <code>0CD63E235BFD8EB32D018C3ECEFFCF4A</code> <code>7ACA54A64527D5DB4129B2DD9D58F721</code> <code>24366F385214B59E3DE6CFFCB56D537D</code> <code>2748C23E60BE32C815FDF5DFFA0F042A</code> <code>27ADA968F38E3E3087350B9577B9AB3B</code> <code>6F41D799BC4D8DA8F74620469435A126</code> <code>31FD4CAA7C65713A44230D7B855E55AF</code> <code>2D6890B3947646C623D8875A24D6E271</code> <code>D824CCFECCE8AA24E4E036B4111015B4</code> <code>1F7F1CFD3A26982F537BE2BA6CFE8743</code> <code>4B612139B0C51A9AE588356264E8B799</code> <code>0C8D7D11E38EEECFC308484752AC91A0</code> <code>62BBFA0EBDF674A8A019485FA73B28ED</code> <code>5FAC1555E80BC33DCA107F17BE9DCE45</code><br> <code>3760C3C1</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 = 840B908CA64E0FB6225CA44BC886D7BAF8810183920E925BD3DC713A19B6A6D8360B3DCA4653D967036BC7ED84C7EDE32DF633E7A9443EA00905D6E25FA4916A2BBC3A4025A6679A9097E8B208839C220DFCE2A3ACFFA24E84E4F23A57D47DE39AE79D391ECBD8EF3EB7796C9FAC18B4CEDF972AEA3FAC98D33C1A7BA988AB35E0861FA930343244614AD36EB39775999DF7BDEEF3D3DCAC2D7E5A43923ACB87E8201733EF95C1C74F544F2977E8892DDDB5537F16337C41E7F6094827C9F6D04D06167651FF2F63240855C17F9449F88D95F767828C1601D74B170EF6E90DFD6DFF6C462C977B2C5A069D9425427F618D7251C100DEC085C50ABE50366395B5</code></pre>
<pre><code>auth_key = 5BB6C61CF73779D7E23070FB31BB7CFD6D17F016374B8E1CFC0695F5877D591B0685B5B582BF857D77D28A8BABE2D60B230F4286E5CF6B0DE9C237C25213A147C4E2302590FFBE2ECCFE2A15F5317069A5EAF098D218BADB268DACB05E2866356F94A0F1D473277C832F209367505C8088C3AD2DCBEA6880A90BA24D651A3C3B4B845E285AD427622F666FAE6B031A4FDA6FBEC76714026FB286351BE5DBF55C8DD3F6F105E1AB54478FFB4D1EC54DEA76651776D1CF14E899FF5F7847B23FBF7391CA746F4E07811DB2E77F4D46A2AE3A0003998C908A1CAF6F236D8FEC590F4BE5C170BDB7E4508BA6B385DECE62B3EB050DD62E6ED191272270E5AA5D2BE5</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 48 45 29 46 42 88 66
0010 | 7C 00 00 00 34 F7 CB 3B 39 8D DB F9 93 7A 80 D8
0020 | 74 6E E6 4E D3 88 0D 2D 8C A2 EC 8F F5 A5 25 3E
0030 | 0D 8B FE 82 57 8B 87 29 04 58 BD 97 70 9D BD 78
0040 | 01 4D 57 70 9D 79 04 45</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 04 04 A8 90 61 89 66
0010 | 60 00 00 00 34 F7 CB 3B 8A 74 6C B5 B5 A8 B2 09
0020 | 60 7A C2 3F 42 38 1C 8D 9E 84 14 64 C6 56 0C E5
0030 | 91 60 C5 0C 1F F4 76 17 A6 7B B2 FB 91 0E 85 56
0040 | B3 39 BB 23 79 05 17 E0</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>0148452946428866</code></td>
<td><code>010404A890618966</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>7C000000</code> (124 in decimal)</td>
<td><code>60000000</code> (96 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>398DDBF9937A80D8746EE64ED3880D2D</code></td>
<td><code>8A746CB5B5A8B209607AC23F42381C8D</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>8CA2EC8FF5A5253E0D8BFE82578B8729</code></td>
<td><code>9E841464C6560CE59160C50C1FF47617</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>0458BD97709DBD78014D57709D790445</code></td>
<td><code>A67BB2FB910E8556B339BB23790517E0</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

@ -968,7 +968,7 @@
</tr>
<tr>
<td><a href="/method/account.updatePersonalChannel">account.updatePersonalChannel</a></td>
<td> </td>
<td>Associate (or remove) a personal <a href="/api/channel">channel »</a>, that will be listed on our personal <a href="/api/profile#personal-channel">profile page »</a>.<br><br>Changing it will emit an <a href="/constructor/updateUser">updateUser</a> update.</td>
</tr>
<tr>
<td><a href="/method/account.toggleSponsoredMessages">account.toggleSponsoredMessages</a></td>