Update content of files

This commit is contained in:
GitHub Action 2023-12-11 19:18:33 +00:00
parent b75c98dc4d
commit 3ae5a300d6
5 changed files with 261 additions and 223 deletions

View file

@ -2,12 +2,12 @@
<html class=""> <html class="">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Page not found</title> <title>Accent colors</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content=""> <meta property="description" content="Telegram users and channels can change the accent color and background pattern of their profile page and their messages&#33;">
<meta property="og:title" content="Page not found"> <meta property="og:title" content="Accent colors">
<meta property="og:image" content=""> <meta property="og:image" content="">
<meta property="og:description" content=""> <meta property="og:description" content="Telegram users and channels can change the accent color and background pattern of their profile page and their messages&#33;">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4"> <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="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -39,10 +39,50 @@
<div class="container clearfix"> <div class="container clearfix">
<div class="dev_page"> <div class="dev_page">
<div id="dev_page_content_wrap" class=" "> <div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li></li></ul></div> <div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/colors" >Accent colors</a></li></ul></div>
<h1 id="dev_page_title">Page not found</h1> <h1 id="dev_page_title">Accent colors</h1>
<div id="dev_page_content">The page has not been saved</div> <div id="dev_page_content"><!-- scroll_nav -->
<p>Telegram users and channels can change the accent color and background pattern of their profile page and their messages!</p>
<p>Schema:</p>
<pre><code><a href='/constructor/peerColor'>peerColor</a>#b54b5acf flags:<a href='/type/%23'>#</a> color:flags.0?<a href='/type/int'>int</a> background_emoji_id:flags.1?<a href='/type/long'>long</a> = <a href='/type/PeerColor'>PeerColor</a>;
<a href='/constructor/help.peerColorSet'>help.peerColorSet</a>#26219a58 colors:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; = <a href='/type/help.PeerColorSet'>help.PeerColorSet</a>;
<a href='/constructor/help.peerColorProfileSet'>help.peerColorProfileSet</a>#767d61eb palette_colors:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; bg_colors:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; story_colors:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; = <a href='/type/help.PeerColorSet'>help.PeerColorSet</a>;
<a href='/constructor/help.peerColorOption'>help.peerColorOption</a>#135bd42f flags:<a href='/type/%23'>#</a> hidden:flags.0?<a href='/constructor/true'>true</a> color_id:<a href='/type/int'>int</a> colors:flags.1?<a href='/type/help.PeerColorSet'>help.PeerColorSet</a> dark_colors:flags.2?<a href='/type/help.PeerColorSet'>help.PeerColorSet</a> = <a href='/type/help.PeerColorOption'>help.PeerColorOption</a>;
<a href='/constructor/help.peerColorsNotModified'>help.peerColorsNotModified</a>#2ba1f5ce = <a href='/type/help.PeerColors'>help.PeerColors</a>;
<a href='/constructor/help.peerColors'>help.peerColors</a>#00f8ed08 hash:<a href='/type/int'>int</a> colors:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/help.PeerColorOption'>help.PeerColorOption</a>&gt; = <a href='/type/help.PeerColors'>help.PeerColors</a>;
<a href='/constructor/stickerSet'>stickerSet</a>#2dd14edc flags:<a href='/type/%23'>#</a> archived:flags.1?<a href='/constructor/true'>true</a> official:flags.2?<a href='/constructor/true'>true</a> masks:flags.3?<a href='/constructor/true'>true</a> animated:flags.5?<a href='/constructor/true'>true</a> videos:flags.6?<a href='/constructor/true'>true</a> emojis:flags.7?<a href='/constructor/true'>true</a> text_color:flags.9?<a href='/constructor/true'>true</a> installed_date:flags.0?<a href='/type/int'>int</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> title:<a href='/type/string'>string</a> short_name:<a href='/type/string'>string</a> thumbs:flags.4?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; thumb_dc_id:flags.4?<a href='/type/int'>int</a> thumb_version:flags.4?<a href='/type/int'>int</a> thumb_document_id:flags.8?<a href='/type/long'>long</a> count:<a href='/type/int'>int</a> hash:<a href='/type/int'>int</a> = <a href='/type/StickerSet'>StickerSet</a>;
<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> 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/channel'>channel</a>#8e87ccd8 flags:<a href='/type/%23'>#</a> creator:flags.0?<a href='/constructor/true'>true</a> left:flags.2?<a href='/constructor/true'>true</a> broadcast:flags.5?<a href='/constructor/true'>true</a> verified:flags.7?<a href='/constructor/true'>true</a> megagroup:flags.8?<a href='/constructor/true'>true</a> restricted:flags.9?<a href='/constructor/true'>true</a> signatures:flags.11?<a href='/constructor/true'>true</a> min:flags.12?<a href='/constructor/true'>true</a> scam:flags.19?<a href='/constructor/true'>true</a> has_link:flags.20?<a href='/constructor/true'>true</a> has_geo:flags.21?<a href='/constructor/true'>true</a> slowmode_enabled:flags.22?<a href='/constructor/true'>true</a> call_active:flags.23?<a href='/constructor/true'>true</a> call_not_empty:flags.24?<a href='/constructor/true'>true</a> fake:flags.25?<a href='/constructor/true'>true</a> gigagroup:flags.26?<a href='/constructor/true'>true</a> noforwards:flags.27?<a href='/constructor/true'>true</a> join_to_send:flags.28?<a href='/constructor/true'>true</a> join_request:flags.29?<a href='/constructor/true'>true</a> forum:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> stories_hidden:flags2.1?<a href='/constructor/true'>true</a> stories_hidden_min:flags2.2?<a href='/constructor/true'>true</a> stories_unavailable:flags2.3?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.13?<a href='/type/long'>long</a> title:<a href='/type/string'>string</a> username:flags.6?<a href='/type/string'>string</a> photo:<a href='/type/ChatPhoto'>ChatPhoto</a> date:<a href='/type/int'>int</a> restriction_reason:flags.9?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; admin_rights:flags.14?<a href='/type/ChatAdminRights'>ChatAdminRights</a> banned_rights:flags.15?<a href='/type/ChatBannedRights'>ChatBannedRights</a> default_banned_rights:flags.18?<a href='/type/ChatBannedRights'>ChatBannedRights</a> participants_count:flags.17?<a href='/type/int'>int</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Username'>Username</a>&gt; stories_max_id:flags2.4?<a href='/type/int'>int</a> color:flags2.7?<a href='/type/PeerColor'>PeerColor</a> = <a href='/type/Chat'>Chat</a>;
---functions---
<a href='/method/help.getPeerColors'>help.getPeerColors</a>#da80f42f hash:<a href='/type/int'>int</a> = <a href='/type/help.PeerColors'>help.PeerColors</a>;
<a href='/method/help.getPeerProfileColors'>help.getPeerProfileColors</a>#abcfa9fd hash:<a href='/type/int'>int</a> = <a href='/type/help.PeerColors'>help.PeerColors</a>;
<a href='/method/account.getDefaultBackgroundEmojis'>account.getDefaultBackgroundEmojis</a>#a60ab9ce hash:<a href='/type/long'>long</a> = <a href='/type/EmojiList'>EmojiList</a>;
<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>;
<a href='/method/channels.updateColor'>channels.updateColor</a>#621a201f flags:<a href='/type/%23'>#</a> channel:<a href='/type/InputChannel'>InputChannel</a> color:<a href='/type/int'>int</a> background_emoji_id:flags.0?<a href='/type/long'>long</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>A <a href="/constructor/peerColor">peerColor</a> constructor contains a color palette ID (<code>id</code>) and a <a href="/api/custom-emoji">custom emoji sticker »</a> (<code>background_emoji</code>) to be re-colored using the colors in the palette and spread out throughout the palette, generating a background that can be used in the profile page of a user, and in other places throughout the UI, namely in in webpage preview message frames and message accent colors when quoting or replying to messages sent by a channel or user that enabled a custom message accents. </p>
<p>The color palettes is identified by an <code>id</code> (not by an RGB24 color); use <a href="/method/help.getPeerProfileColors">help.getPeerProfileColors</a> to obtain all color palettes (represented by <a href="/constructor/help.peerColorOption">help.peerColorOption</a> constructors) that can be used in the background of a profile page, and use <a href="/method/help.getPeerColors">help.getPeerColors</a> to obtain all color palettes that can be used in message accents. </p>
<p>A color palette is represented by a <a href="/constructor/help.peerColorOption">help.peerColorOption</a> constructor: the palette ID is contained in <code>color_id</code>; the palette for light mode is contained in the <code>colors</code> field, the palette for dark mode is contained in the <code>dark_colors</code> field.<br>
If the <code>hidden</code> flag is set it should not be displayed as an option to the user when choosing a palette to use in the profile page or in message accents. </p>
<p>The actual colors that should be used are contained either in a <a href="/constructor/help.peerColorSet">help.peerColorSet</a> or in a <a href="/constructor/help.peerColorProfileSet">help.peerColorProfileSet</a>, see the relative constructor pages for more info. </p>
<p>Use <a href="/method/account.getDefaultBackgroundEmojis">account.getDefaultBackgroundEmojis</a> to obtain a list of IDs of <a href="/api/custom-emoji">custom emojis</a> that can be used in a palette background. </p>
<p>All custom emojis in <a href="/api/custom-emoji">custom emoji stickersets »</a> with <code>text_color</code> flag set can also be used for the same purpose. </p>
<p>Use <a href="/method/account.updateColor">account.updateColor</a> to update the color palette of the current account's message accents and/or profile page; note that the current account must be subscribed to <a href="/api/premium">Telegram Premium</a> in order to call the method.<br>
Use <a href="/method/channels.updateColor">channels.updateColor</a> to update the color palette of a channel's message accents; note that channels have to be <a href="/api/boost">boosted »</a> at least to level <a href="/api/config#channel-color-level-min">channel_color_level_min »</a> in order to use this method. </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>User profile palettes will be visible in the <a href="/constructor/user">user</a>.<code>profile_color</code> field.</p></div>
</div> </div>
@ -109,8 +149,11 @@
</div> </div>
</div> </div>
<script src="/js/main.js?47"></script> <script src="/js/main.js?47"></script>
<script src="/js/jquery.min.js?1"></script>
<script>backToTopInit("Go up"); <script src="/js/bootstrap.min.js?1"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit(); removePreloadInit();
</script> </script>
</body> </body>

View file

@ -114,10 +114,6 @@
<li>Added <a href="/api/push-updates#possible-notifications">PINNED_GIVEAWAY</a> - <code>{1} pinned a giveaway</code></li> <li>Added <a href="/api/push-updates#possible-notifications">PINNED_GIVEAWAY</a> - <code>{1} pinned a giveaway</code></li>
<li>Added <a href="/api/push-updates#possible-notifications">REACT_GIVEAWAY</a> - <code>{1} reacted {2} to your giveaway</code></li> <li>Added <a href="/api/push-updates#possible-notifications">REACT_GIVEAWAY</a> - <code>{1} reacted {2} to your giveaway</code></li>
</ul> </ul>
<h5><a class="anchor" href="#changed-push-notifications" id="changed-push-notifications" name="changed-push-notifications"><i class="anchor-icon"></i></a>Changed PUSH notifications</h5>
<ul>
<li>Changed template from <code>{1} is calling you!</code> to <code>posted a story</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GIF</a></li>
</ul>
<h4><a class="anchor" href="#schema" id="schema" name="schema"><i class="anchor-icon"></i></a>Schema</h4> <h4><a class="anchor" href="#schema" id="schema" name="schema"><i class="anchor-icon"></i></a>Schema</h4>
<div><pre><code><a href="/constructor/userFull">userFull</a>#b9b12c6c 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> 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> = <a href="/type/UserFull">UserFull</a>; <div><pre><code><a href="/constructor/userFull">userFull</a>#b9b12c6c 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> 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> = <a href="/type/UserFull">UserFull</a>;
<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> 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>;<br> <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> 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>;<br>
@ -484,7 +480,7 @@
<li>Changed template from <code>{1}: {3} to your game in {2}</code> to <code>{3} to your game in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GAME</a></li> <li>Changed template from <code>{1}: {3} to your game in {2}</code> to <code>{3} to your game in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GAME</a></li>
<li>Changed template from <code>{1}: {3} to your map in {2}</code> to <code>{3} to your map in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GEO</a></li> <li>Changed template from <code>{1}: {3} to your map in {2}</code> to <code>{3} to your map in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GEO</a></li>
<li>Changed template from <code>{1}: {3} to your live location in {2}</code> to <code>{3} to your live location in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GEOLIVE</a></li> <li>Changed template from <code>{1}: {3} to your live location in {2}</code> to <code>{3} to your live location in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GEOLIVE</a></li>
<li>Changed template from <code>{1}: {3} to your GIF in {2}</code> to <code>{1} is calling you!</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GIF</a></li> <li>Changed template from <code>{1}: {3} to your GIF in {2}</code> to <code>{3} to your GIF in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_GIF</a></li>
<li>Changed template from <code>{1}: {3} to your invoice in {2}</code> to <code>{3} to your invoice in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_INVOICE</a></li> <li>Changed template from <code>{1}: {3} to your invoice in {2}</code> to <code>{3} to your invoice in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_INVOICE</a></li>
<li>Changed template from <code>{1}: {3} to your message in {2}</code> to <code>{3} to your message in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_NOTEXT</a></li> <li>Changed template from <code>{1}: {3} to your message in {2}</code> to <code>{3} to your message in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_NOTEXT</a></li>
<li>Changed template from <code>{1}: {3} to your photo in {2}</code> to <code>{3} to your photo in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_PHOTO</a></li> <li>Changed template from <code>{1}: {3} to your photo in {2}</code> to <code>{3} to your photo in {2}</code> in <a href="/api/push-updates#possible-notifications">CHAT_REACT_PHOTO</a></li>

View file

@ -511,8 +511,8 @@ Simple push works by sending a simple PUT request with a <code>version=number</c
</tr> </tr>
<tr> <tr>
<td>CHAT_REACT_GIF</td> <td>CHAT_REACT_GIF</td>
<td>posted a story</td> <td>{3} to your GIF in {2}</td>
<td> </td> <td>2. Group name<br>3. Reaction</td>
</tr> </tr>
<tr> <tr>
<td>CHAT_REACT_GIVEAWAY</td> <td>CHAT_REACT_GIVEAWAY</td>

View file

@ -391,7 +391,6 @@ width=44% /></a>
<p>Telegram also offers a dedicated <strong>test environment</strong> suitable for more advanced testing. Bots and users in this environment generally have more flexible restrictions for example:</p> <p>Telegram also offers a dedicated <strong>test environment</strong> suitable for more advanced testing. Bots and users in this environment generally have more flexible restrictions for example:</p>
<ul> <ul>
<li>When working with the test environment, you may use HTTP links without TLS to test your <a href="https://core.telegram.org/bots/features#web-apps">Web Apps</a> or <a href="https://core.telegram.org/bots/features#web-login">Web Login</a>.</li> <li>When working with the test environment, you may use HTTP links without TLS to test your <a href="https://core.telegram.org/bots/features#web-apps">Web Apps</a> or <a href="https://core.telegram.org/bots/features#web-login">Web Login</a>.</li>
<li>You can test <a href="https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups">topics</a> without needing 200 users in your group.</li>
</ul> </ul>
<blockquote> <blockquote>
<p><strong>Flood limits</strong> are not raised in the test environment, and may at times be stricter. To minimize how this impacts your bot, you should make sure that it handles errors with retry policies and does not depend on hardcoded limit values.</p> <p><strong>Flood limits</strong> are not raised in the test environment, and may at times be stricter. To minimize how this impacts your bot, you should make sure that it handles errors with retry policies and does not depend on hardcoded limit values.</p>

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> <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 --> <!-- start req_pq_multi -->
<p>Sent payload (excluding transport headers/trailers):</p> <p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C0 B8 08 00 D5 CF 74 65 <pre><code>0000 | 00 00 00 00 00 00 00 00 D4 4F 0D 00 E1 5A 77 65
0010 | 14 00 00 00 F1 8E 7E BE 8A 1A 2C 01 1E 54 29 F6 0010 | 14 00 00 00 F1 8E 7E BE 83 FE 4F A7 D6 AD 1B 8A
0020 | 92 F6 46 62 87 3D EE AB</code></pre> 0020 | C7 63 8A 36 AD AB 7A 9A</code></pre>
<p>Payload (de)serialization:</p> <p>Payload (de)serialization:</p>
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre> <pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
<table class="table"> <table class="table">
@ -77,7 +77,7 @@
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>C0B80800D5CF7465</code></td> <td><code>D44F0D00E15A7765</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> <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>
<tr> <tr>
@ -95,7 +95,7 @@
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td> <td><code>83FE4FA7D6AD1B8AC7638A36ADAB7A9A</code></td>
<td>Random number</td> <td>Random number</td>
</tr> </tr>
</tbody> </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> <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 --> <!-- start resPQ -->
<p>Received payload (excluding transport headers/trailers):</p> <p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 E8 EB 0F D6 CF 74 65 <pre><code>0000 | 00 00 00 00 00 00 00 00 01 48 2B A5 E1 5A 77 65
0010 | 74 00 00 00 63 24 16 05 8A 1A 2C 01 1E 54 29 F6 0010 | 50 00 00 00 63 24 16 05 83 FE 4F A7 D6 AD 1B 8A
0020 | 92 F6 46 62 87 3D EE AB 6A C0 DB C7 98 A5 05 E5 0020 | C7 63 8A 36 AD AB 7A 9A 65 D6 6D 4E 1C C2 16 5A
0030 | 94 81 5E 49 FA E5 76 47 08 21 26 B9 EF E9 DB D1 0030 | 23 E8 D1 8C 4D 3B 8A B7 08 20 CF 44 AD 25 51 F1
0040 | 91 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09 0040 | A5 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 0050 | 35 5F C3 0B 21 6B E8 6C 02 2B B4 C3 85 FD 64 DE
0060 | 85 1D 9D D0</code></pre> 0060 | 85 1D 9D D0</code></pre>
<p>Payload (de)serialization:</p> <p>Payload (de)serialization:</p>
@ -132,13 +132,13 @@
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>01E8EB0FD6CF7465</code></td> <td><code>01482BA5E15A7765</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> <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>
<tr> <tr>
<td>message_length</td> <td>message_length</td>
<td>16, 4</td> <td>16, 4</td>
<td><code>74000000</code> (116 in decimal)</td> <td><code>50000000</code> (80 in decimal)</td>
<td>Message body length</td> <td>Message body length</td>
</tr> </tr>
<tr> <tr>
@ -150,19 +150,19 @@
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td> <td><code>83FE4FA7D6AD1B8AC7638A36ADAB7A9A</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>40, 16</td> <td>40, 16</td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td> <td><code>65D66D4E1CC2165A23E8D18C4D3B8AB7</code></td>
<td>Server-generated random number</td> <td>Server-generated random number</td>
</tr> </tr>
<tr> <tr>
<td>pq</td> <td>pq</td>
<td>56, 12</td> <td>56, 12</td>
<td><code>082126B9EFE9DBD191000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2388801092438446481</td> <td><code>0820CF44AD2551F1A5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2364183839838957989</td>
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td> <td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
</tr> </tr>
<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> <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> <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 --> <!-- start pq -->
<pre><code>pq = 2388801092438446481</code></pre> <pre><code>pq = 2364183839838957989</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2388801092438446481 = 1343244269 * 1778381749</code></p> <p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2364183839838957989 = 1537378891 * 1537801679</code></p>
<pre><code>p = 1343244269 <pre><code>p = 1537378891
q = 1778381749</code></pre> q = 1537801679</code></pre>
<!-- end pq --> <!-- 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> <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> <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> <p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
<!-- start p_q_inner_data_dc --> <!-- start p_q_inner_data_dc -->
<p>Generated payload (excluding transport headers/trailers):</p> <p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 95 5F F5 A9 08 21 26 B9 EF E9 DB D1 91 00 00 00 <pre><code>0000 | 95 5F F5 A9 08 20 CF 44 AD 25 51 F1 A5 00 00 00
0010 | 04 50 10 47 ED 00 00 00 04 69 FF F3 B5 00 00 00 0010 | 04 5B A2 8A 4B 00 00 00 04 5B A8 FD CF 00 00 00
0020 | 8A 1A 2C 01 1E 54 29 F6 92 F6 46 62 87 3D EE AB 0020 | 83 FE 4F A7 D6 AD 1B 8A C7 63 8A 36 AD AB 7A 9A
0030 | 6A C0 DB C7 98 A5 05 E5 94 81 5E 49 FA E5 76 47 0030 | 65 D6 6D 4E 1C C2 16 5A 23 E8 D1 8C 4D 3B 8A B7
0040 | 4A DF 3F 67 BB 21 90 71 31 4F 16 E9 FB B4 A2 93 0040 | 31 44 7E EA FB 1F D5 B6 FF 81 2A 79 EA 09 64 82
0050 | 5E C0 DC DD 27 4E 2D B5 32 05 1B 40 A0 CB F3 DE 0050 | C4 D8 2B 69 5B 78 4E 95 AE 15 F1 FD 4D 3B 3B 27
0060 | 02 00 00 00</code></pre> 0060 | 02 00 00 00</code></pre>
<p>Payload (de)serialization:</p> <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> <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 = 1778381749</code></pre>
<tr> <tr>
<td>pq</td> <td>pq</td>
<td>4, 12</td> <td>4, 12</td>
<td><code>082126B9EFE9DBD191000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2388801092438446481</td> <td><code>0820CF44AD2551F1A5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2364183839838957989</td>
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td> <td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
</tr> </tr>
<tr> <tr>
<td>p</td> <td>p</td>
<td>16, 8</td> <td>16, 8</td>
<td><code>04501047ED000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1343244269</td> <td><code>045BA28A4B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1537378891</td>
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td> <td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr> </tr>
<tr> <tr>
<td>q</td> <td>q</td>
<td>24, 8</td> <td>24, 8</td>
<td><code>0469FFF3B5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1778381749</td> <td><code>045BA8FDCF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1537801679</td>
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td> <td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr> </tr>
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>32, 16</td> <td>32, 16</td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td> <td><code>83FE4FA7D6AD1B8AC7638A36ADAB7A9A</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>48, 16</td> <td>48, 16</td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td> <td><code>65D66D4E1CC2165A23E8D18C4D3B8AB7</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>new_nonce</td> <td>new_nonce</td>
<td>64, 32</td> <td>64, 32</td>
<td><code>4ADF3F67BB219071314F16E9FBB4A293</code> <code>5EC0DCDD274E2DB532051B40A0CBF3DE</code></td> <td><code>31447EEAFB1FD5B6FF812A79EA096482</code> <code>C4D82B695B784E95AE15F1FD4D3B3B27</code></td>
<td>Client-generated random number</td> <td>Client-generated random number</td>
</tr> </tr>
<tr> <tr>
@ -291,39 +291,39 @@ q = 1778381749</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> <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> 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 --> <!-- start p_q_inner_data_input -->
<pre><code>data = 955FF5A9082126B9EFE9DBD19100000004501047ED0000000469FFF3B50000008A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE576474ADF3F67BB219071314F16E9FBB4A2935EC0DCDD274E2DB532051B40A0CBF3DE02000000 <pre><code>data = 955FF5A90820CF44AD2551F1A5000000045BA28A4B000000045BA8FDCF00000083FE4FA7D6AD1B8AC7638A36ADAB7A9A65D66D4E1CC2165A23E8D18C4D3B8AB731447EEAFB1FD5B6FF812A79EA096482C4D82B695B784E95AE15F1FD4D3B3B2702000000
random_padding_bytes = 7D4A606F265527494A39B92866DD6F044805CCB671235F4686E6737ADD18B798BC9BB488EE3B04226C50040177FDF7EB7B6AC9C0C35BD41B6A34C063039FE2E04DF12BED8CA0513879BFA1D6D2D3D054CFD3C828B866F5582AE97B69</code></pre> random_padding_bytes = 5C1FC0512F2CBE5890F34A0389768EC59F8D369EA3FB98795CF7624BBF2ADC6CF0758829E4F76B167D4EAEF4495D095CE9E3819F7ACB4E02326B1CD2FE68A23F853CD6B5464497B80CEC4373ABBA570278A4D86EA92C49BC65975D55</code></pre>
<!-- end p_q_inner_data_input --> <!-- end p_q_inner_data_input -->
<p>And this is the output:</p> <p>And this is the output:</p>
<!-- start p_q_inner_data_output --> <!-- start p_q_inner_data_output -->
<pre><code>encrypted_data = 0322414A15A43AE2003E8477D3912F949D301B60D75A636D048EFF3C9A6EC5BE49B27CA4589CF503A4687AA4424348756AC550B3A8E41F2E52484E75A86D83733D313334A3DA3957F707D06CEA5C56ED0F85BD3790F983250CA3A5D5523695AF64261B7118AFAD7D6DB61482A379D4F59A85BFEE88EDB376C1FF65D481B7C8819E4EC1665E29DB44446E8E2128CF0F4A43D5C98375BE4CCB9B4E8B6CC93CECDF480AA9D94D88EF7B7054934D99CDB3A359E1002BEA64A3D0BD48009F25648362F4611610CB04E27AC7DF11451C342EEC533212D48B7CE11AE8D6ED1D1F255A14445000AAF6D10ACA942BD4729E38DFE7E9DC40417D3C1F9C8788663DA39E55D0</code></pre> <pre><code>encrypted_data = 45EF3882B8D866441F9099FDC19285855319042329013E110DCF0C325DE077A434D7D49F0CE10453D313CD034D26E7B1531DBE1B266578B1EB39993C9F4F4A41120C2FC41C78961AD6D35315F51E1FAC62836E08B3422D8CC5179DF4947B6E66F9F6F6836A985CE87D2C27FEEF33B4101281BEB2E9E45EBC026F4EFF3A47EC2EE2AF310D63579575C85D24A0CBE8B95D1AA03DA954C319B8A369FA8D4C057875C87317C016D43A4F6F4B631B15900D6AE7A8138712B4234694C18B8F4CA381D6E123262DBE51793B81771F70B74983F1FEDD5A57296EA575C78B08026E116CC32B5F1A7E3F6C44E03F342689682386B6E61D2A9DEAA5BC5E8C074EE3450D8847</code></pre>
<!-- end p_q_inner_data_output --> <!-- end p_q_inner_data_output -->
<p>The length of the final string is 256 bytes.</p> <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> <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 --> <!-- start req_DH_params -->
<p>Sent payload (excluding transport headers/trailers):</p> <p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 00 13 07 00 D6 CF 74 65 <pre><code>0000 | 00 00 00 00 00 00 00 00 D8 4F 0D 00 E1 5A 77 65
0010 | 40 01 00 00 BE E4 12 D7 8A 1A 2C 01 1E 54 29 F6 0010 | 40 01 00 00 BE E4 12 D7 83 FE 4F A7 D6 AD 1B 8A
0020 | 92 F6 46 62 87 3D EE AB 6A C0 DB C7 98 A5 05 E5 0020 | C7 63 8A 36 AD AB 7A 9A 65 D6 6D 4E 1C C2 16 5A
0030 | 94 81 5E 49 FA E5 76 47 04 50 10 47 ED 00 00 00 0030 | 23 E8 D1 8C 4D 3B 8A B7 04 5B A2 8A 4B 00 00 00
0040 | 04 69 FF F3 B5 00 00 00 85 FD 64 DE 85 1D 9D D0 0040 | 04 5B A8 FD CF 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 03 22 41 4A 15 A4 3A E2 00 3E 84 77 0050 | FE 00 01 00 45 EF 38 82 B8 D8 66 44 1F 90 99 FD
0060 | D3 91 2F 94 9D 30 1B 60 D7 5A 63 6D 04 8E FF 3C 0060 | C1 92 85 85 53 19 04 23 29 01 3E 11 0D CF 0C 32
0070 | 9A 6E C5 BE 49 B2 7C A4 58 9C F5 03 A4 68 7A A4 0070 | 5D E0 77 A4 34 D7 D4 9F 0C E1 04 53 D3 13 CD 03
0080 | 42 43 48 75 6A C5 50 B3 A8 E4 1F 2E 52 48 4E 75 0080 | 4D 26 E7 B1 53 1D BE 1B 26 65 78 B1 EB 39 99 3C
0090 | A8 6D 83 73 3D 31 33 34 A3 DA 39 57 F7 07 D0 6C 0090 | 9F 4F 4A 41 12 0C 2F C4 1C 78 96 1A D6 D3 53 15
00A0 | EA 5C 56 ED 0F 85 BD 37 90 F9 83 25 0C A3 A5 D5 00A0 | F5 1E 1F AC 62 83 6E 08 B3 42 2D 8C C5 17 9D F4
00B0 | 52 36 95 AF 64 26 1B 71 18 AF AD 7D 6D B6 14 82 00B0 | 94 7B 6E 66 F9 F6 F6 83 6A 98 5C E8 7D 2C 27 FE
00C0 | A3 79 D4 F5 9A 85 BF EE 88 ED B3 76 C1 FF 65 D4 00C0 | EF 33 B4 10 12 81 BE B2 E9 E4 5E BC 02 6F 4E FF
00D0 | 81 B7 C8 81 9E 4E C1 66 5E 29 DB 44 44 6E 8E 21 00D0 | 3A 47 EC 2E E2 AF 31 0D 63 57 95 75 C8 5D 24 A0
00E0 | 28 CF 0F 4A 43 D5 C9 83 75 BE 4C CB 9B 4E 8B 6C 00E0 | CB E8 B9 5D 1A A0 3D A9 54 C3 19 B8 A3 69 FA 8D
00F0 | C9 3C EC DF 48 0A A9 D9 4D 88 EF 7B 70 54 93 4D 00F0 | 4C 05 78 75 C8 73 17 C0 16 D4 3A 4F 6F 4B 63 1B
0100 | 99 CD B3 A3 59 E1 00 2B EA 64 A3 D0 BD 48 00 9F 0100 | 15 90 0D 6A E7 A8 13 87 12 B4 23 46 94 C1 8B 8F
0110 | 25 64 83 62 F4 61 16 10 CB 04 E2 7A C7 DF 11 45 0110 | 4C A3 81 D6 E1 23 26 2D BE 51 79 3B 81 77 1F 70
0120 | 1C 34 2E EC 53 32 12 D4 8B 7C E1 1A E8 D6 ED 1D 0120 | B7 49 83 F1 FE DD 5A 57 29 6E A5 75 C7 8B 08 02
0130 | 1F 25 5A 14 44 50 00 AA F6 D1 0A CA 94 2B D4 72 0130 | 6E 11 6C C3 2B 5F 1A 7E 3F 6C 44 E0 3F 34 26 89
0140 | 9E 38 DF E7 E9 DC 40 41 7D 3C 1F 9C 87 88 66 3D 0140 | 68 23 86 B6 E6 1D 2A 9D EA A5 BC 5E 8C 07 4E E3
0150 | A3 9E 55 D0</code></pre> 0150 | 45 0D 88 47</code></pre>
<p>Payload (de)serialization:</p> <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> <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"> <table class="table">
@ -345,7 +345,7 @@ random_padding_bytes = 7D4A606F265527494A39B92866DD6F044805CCB671235F4686E6737AD
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>00130700D6CF7465</code></td> <td><code>D84F0D00E15A7765</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> <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>
<tr> <tr>
@ -363,25 +363,25 @@ random_padding_bytes = 7D4A606F265527494A39B92866DD6F044805CCB671235F4686E6737AD
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td> <td><code>83FE4FA7D6AD1B8AC7638A36ADAB7A9A</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>40, 16</td> <td>40, 16</td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td> <td><code>65D66D4E1CC2165A23E8D18C4D3B8AB7</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>p</td> <td>p</td>
<td>56, 8</td> <td>56, 8</td>
<td><code>04501047ED000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1343244269</td> <td><code>045BA28A4B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1537378891</td>
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td> <td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr> </tr>
<tr> <tr>
<td>q</td> <td>q</td>
<td>64, 8</td> <td>64, 8</td>
<td><code>0469FFF3B5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1778381749</td> <td><code>045BA8FDCF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1537801679</td>
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td> <td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr> </tr>
<tr> <tr>
@ -393,7 +393,7 @@ random_padding_bytes = 7D4A606F265527494A39B92866DD6F044805CCB671235F4686E6737AD
<tr> <tr>
<td>encrypted_data</td> <td>encrypted_data</td>
<td>80, 260</td> <td>80, 260</td>
<td><code>FE0001000322414A15A43AE2003E8477</code> <code>D3912F949D301B60D75A636D048EFF3C</code> <code>9A6EC5BE49B27CA4589CF503A4687AA4</code> <code>424348756AC550B3A8E41F2E52484E75</code> <code>A86D83733D313334A3DA3957F707D06C</code> <code>EA5C56ED0F85BD3790F983250CA3A5D5</code> <code>523695AF64261B7118AFAD7D6DB61482</code> <code>A379D4F59A85BFEE88EDB376C1FF65D4</code> <code>81B7C8819E4EC1665E29DB44446E8E21</code> <code>28CF0F4A43D5C98375BE4CCB9B4E8B6C</code> <code>C93CECDF480AA9D94D88EF7B7054934D</code> <code>99CDB3A359E1002BEA64A3D0BD48009F</code> <code>25648362F4611610CB04E27AC7DF1145</code> <code>1C342EEC533212D48B7CE11AE8D6ED1D</code> <code>1F255A14445000AAF6D10ACA942BD472</code> <code>9E38DFE7E9DC40417D3C1F9C8788663D</code><br> <code>A39E55D0</code></td> <td><code>FE00010045EF3882B8D866441F9099FD</code> <code>C19285855319042329013E110DCF0C32</code> <code>5DE077A434D7D49F0CE10453D313CD03</code> <code>4D26E7B1531DBE1B266578B1EB39993C</code> <code>9F4F4A41120C2FC41C78961AD6D35315</code> <code>F51E1FAC62836E08B3422D8CC5179DF4</code> <code>947B6E66F9F6F6836A985CE87D2C27FE</code> <code>EF33B4101281BEB2E9E45EBC026F4EFF</code> <code>3A47EC2EE2AF310D63579575C85D24A0</code> <code>CBE8B95D1AA03DA954C319B8A369FA8D</code> <code>4C057875C87317C016D43A4F6F4B631B</code> <code>15900D6AE7A8138712B4234694C18B8F</code> <code>4CA381D6E123262DBE51793B81771F70</code> <code>B74983F1FEDD5A57296EA575C78B0802</code> <code>6E116CC32B5F1A7E3F6C44E03F342689</code> <code>682386B6E61D2A9DEAA5BC5E8C074EE3</code><br> <code>450D8847</code></td>
<td>Value generated above</td> <td>Value generated above</td>
</tr> </tr>
</tbody> </tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 7D4A606F265527494A39B92866DD6F044805CCB671235F4686E6737AD
<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> <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 --> <!-- start server_DH_params_ok -->
<p>Received payload (excluding transport headers/trailers):</p> <p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 48 0E C8 D6 CF 74 65 <pre><code>0000 | 00 00 00 00 00 00 00 00 01 08 20 3C E2 5A 77 65
0010 | D8 02 00 00 5C 07 E8 D0 8A 1A 2C 01 1E 54 29 F6 0010 | 7C 02 00 00 5C 07 E8 D0 83 FE 4F A7 D6 AD 1B 8A
0020 | 92 F6 46 62 87 3D EE AB 6A C0 DB C7 98 A5 05 E5 0020 | C7 63 8A 36 AD AB 7A 9A 65 D6 6D 4E 1C C2 16 5A
0030 | 94 81 5E 49 FA E5 76 47 FE 50 02 00 B0 2D 72 B5 0030 | 23 E8 D1 8C 4D 3B 8A B7 FE 50 02 00 1B 41 8E 98
0040 | 18 76 E0 99 A2 D4 B1 7B F6 F7 D3 6D F4 64 C3 20 0040 | EC D0 FD 3F D2 EF 59 07 95 5A 6B A0 9F EE BE BD
0050 | 96 E7 81 98 AE CA A6 82 83 C1 82 4D 72 FB C5 44 0050 | 4D 57 93 DB 90 D1 81 71 0B FD 5A 3A E1 22 7C D4
0060 | C1 F1 61 8A 56 C0 6C B7 B5 A1 92 F3 15 6A F1 5E 0060 | 68 DF 74 2E C1 C8 52 57 B5 6F 50 36 4F FE E2 EF
0070 | 21 2F 1A FF 12 C8 76 D7 9E 93 79 7B 27 8A 34 59 0070 | F1 50 F7 8A EE 2B 71 FC AD 2F CB 68 4A 8C D3 88
0080 | 32 41 7F 21 F6 76 FB B6 C7 BC FE FE C9 CC 06 FC 0080 | 71 44 A1 E4 26 D8 86 A0 31 42 D2 88 69 FA 5B 5E
0090 | 91 2D 8D D5 D4 33 F9 83 0D 4B 83 86 6F 23 6D BF 0090 | 01 C8 98 49 43 75 AB 2B 68 55 71 A7 5D 98 81 AA
00A0 | 48 04 BC B5 93 70 45 9C B5 11 D1 65 E7 0C 69 97 00A0 | 39 5B C9 89 E7 CF 09 AF FE E9 B5 EA E4 2A 9C C1
00B0 | 77 41 7D 7D 53 2F E2 01 B2 5E 6F 97 2F 79 0F C6 00B0 | DF 8C 15 FD C3 70 85 9E FA CF 1D 86 3A EA DD A1
00C0 | E3 E3 6C 51 18 3C 1D 66 F9 1C 56 14 1A E7 3C B2 00C0 | A0 F8 3A C2 94 2B EB 91 57 A4 9A 70 69 2B 28 4E
00D0 | 3C 87 5A FB 48 65 5C 65 AF 63 32 F6 BB 8E A2 2A 00D0 | 4B 45 B8 BF 7B 3B B4 09 58 88 C6 A1 7A 11 04 B7
00E0 | 49 19 02 9E 9B 63 AB AA 51 A6 C0 20 ED EE 8C C8 00E0 | 72 43 91 10 A0 FB B5 5F 89 47 A6 6A 1A B2 30 E8
00F0 | 24 EF 53 58 01 29 16 66 78 77 D6 D9 21 D7 3F C2 00F0 | F2 52 51 41 62 0F E3 5D AC 0A 4F 21 16 F0 0B 11
0100 | 56 8C AC D5 32 DD 7E 31 B0 43 81 30 62 B7 F5 98 0100 | CF 1F DF 9D 2A C1 74 3F E6 BF 55 66 F9 0B 7D C4
0110 | 42 59 A4 BB EC 4D B0 28 C5 6D 1E 75 0E 85 0E 4B 0110 | 86 95 BE EF 87 60 C4 E6 9E 4B AD D2 F6 B9 FA ED
0120 | E9 44 0F AA A8 24 A8 9B F8 F7 DC E0 D4 A9 01 41 0120 | 26 51 92 F2 92 56 BB BA 9B D2 AA 52 72 1C 76 0D
0130 | 90 B1 7D 21 48 92 70 19 67 9D 5A 69 F9 06 17 3F 0130 | BA 91 7B C1 DC 33 BF 7C FD 2B C0 EE 0B 9E 78 9B
0140 | A7 52 A4 16 18 65 2F D2 62 DE B1 B9 32 A6 F1 4F 0140 | DB 96 DA 36 62 00 D7 27 96 80 7A FF CE 87 09 12
0150 | 98 55 96 31 F6 16 1A A8 44 AA 25 F9 AF 8D 41 F2 0150 | 1E A4 60 AD 44 CD 21 20 2A 84 34 7B B8 F9 D5 81
0160 | EC 4F AE 9D C7 EF 5E D6 87 91 DA D8 3D C2 4D 88 0160 | DA 1D A0 03 1B AB 51 23 8B 17 3A 66 0D DF 1A 25
0170 | D2 4B CE 8E 70 FA 9D 56 49 FB 8C 29 01 D0 63 A3 0170 | DB 4C D5 1C 6F 77 2E 59 8D E6 B6 27 EB FE 69 32
0180 | 92 17 FE E8 04 13 DB 14 23 F1 07 BC BE 68 E8 3E 0180 | 1C B8 BC 00 09 B4 87 A0 6C 0C 18 0B 5C 82 32 B9
0190 | 63 50 DC A8 01 76 5B 72 89 1C 80 D1 EC 7D EC 4B 0190 | 16 B5 17 AA 63 6A 1F 14 53 14 E4 F8 39 84 47 08
01A0 | 41 93 39 98 70 CA 8B F0 85 05 D6 5D C3 2B FA F2 01A0 | E6 11 43 62 BD FC 4B D3 22 6F 21 B5 9C AA 01 AC
01B0 | 05 C3 96 8D E9 AF 1D EF B5 6C 72 4D E3 96 63 D2 01B0 | FE 2D 76 03 71 96 BC F5 E2 94 DC D6 4E 80 90 A1
01C0 | EA 86 09 95 0A A5 61 53 21 70 A9 40 70 EA 92 D0 01C0 | 2D D6 8F 6E 23 A1 04 79 0D F8 0D EA 65 31 3A 15
01D0 | 35 CB CF F5 16 DA 6E DB BE 78 6B B3 B2 45 70 3C 01D0 | 6F 45 C3 18 49 0F 5F EF 40 74 B8 E0 4B 0B C3 C5
01E0 | D8 43 45 E0 7C 25 D5 4B 9A 05 0D 09 59 A6 DF 68 01E0 | F9 FB FF 6A 0B F4 BC 6E 7C 81 86 EF C3 E3 31 AB
01F0 | 39 56 62 BE FA A6 A4 4F 0C 7D 85 64 73 81 9A B0 01F0 | 3C 3F 29 4D F2 6D 91 A4 00 57 74 A5 E2 DB E4 49
0200 | 62 E1 34 43 22 99 DA 17 55 57 92 F6 2B 7E A6 7E 0200 | 75 A2 7F 9E 23 F1 24 71 FE DF DF A5 75 89 3C B4
0210 | CD 2A 26 A2 96 9A BD EB 87 C1 02 EA 23 26 5F 26 0210 | 26 31 71 F6 B3 DE 8E 6D C7 C8 BE 0D 93 6B 2E 21
0220 | 69 F6 ED 50 1E B1 CC 50 8B 73 08 7D 3F FE B1 29 0220 | 2E 79 EA 90 8A EC 26 B6 B9 88 12 5B 47 63 07 DE
0230 | 46 71 74 CC 7F FE 17 BE 82 E7 18 09 5B E8 90 80 0230 | 4C B5 50 19 24 11 2E 49 B0 42 35 F3 87 34 CD FF
0240 | 73 46 53 DA 2A DE 40 8E 0F 37 3A 89 E8 AD 5E 3C 0240 | B5 11 D3 D8 B0 C7 CA 21 A7 89 BC 86 D4 37 77 BF
0250 | E1 06 6C 49 14 2E C3 EB 5F E4 2B E7 8B F5 5C F5 0250 | 20 5E B8 82 95 1C 4E 5C 82 20 E6 62 1F CA 6E 1A
0260 | F9 76 5B 52 94 99 CE F2 2B E7 31 C3 1B DB 03 A9 0260 | BF 02 7B B9 C3 DF 35 6A 78 50 16 E4 A9 F4 C9 C5
0270 | 6F 63 37 19 C2 AB 26 46 7F 11 DF F1 E3 79 30 F7 0270 | 42 2E 08 81 EF F3 DC F6 16 78 5E EE E5 E8 F3 6E
0280 | 47 A7 03 D7 D0 98 94 67 51 19 C4 F2</code></pre> 0280 | 8A C8 3A D6 1A 51 35 22 9F C0 66 A7</code></pre>
<p>Payload (de)serialization:</p> <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> <pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
<table class="table"> <table class="table">
@ -464,13 +464,13 @@ random_padding_bytes = 7D4A606F265527494A39B92866DD6F044805CCB671235F4686E6737AD
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>01480EC8D6CF7465</code></td> <td><code>0108203CE25A7765</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> <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>
<tr> <tr>
<td>message_length</td> <td>message_length</td>
<td>16, 4</td> <td>16, 4</td>
<td><code>D8020000</code> (728 in decimal)</td> <td><code>7C020000</code> (636 in decimal)</td>
<td>Message body length</td> <td>Message body length</td>
</tr> </tr>
<tr> <tr>
@ -482,19 +482,19 @@ random_padding_bytes = 7D4A606F265527494A39B92866DD6F044805CCB671235F4686E6737AD
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td> <td><code>83FE4FA7D6AD1B8AC7638A36ADAB7A9A</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>40, 16</td> <td>40, 16</td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td> <td><code>65D66D4E1CC2165A23E8D18C4D3B8AB7</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>encrypted_answer</td> <td>encrypted_answer</td>
<td>56, 596</td> <td>56, 596</td>
<td><code>FE500200B02D72B51876E099A2D4B17B</code> <code>F6F7D36DF464C32096E78198AECAA682</code> <code>83C1824D72FBC544C1F1618A56C06CB7</code> <code>B5A192F3156AF15E212F1AFF12C876D7</code> <code>9E93797B278A345932417F21F676FBB6</code> <code>C7BCFEFEC9CC06FC912D8DD5D433F983</code> <code>0D4B83866F236DBF4804BCB59370459C</code> <code>B511D165E70C699777417D7D532FE201</code> <code>B25E6F972F790FC6E3E36C51183C1D66</code> <code>F91C56141AE73CB23C875AFB48655C65</code> <code>AF6332F6BB8EA22A4919029E9B63ABAA</code> <code>51A6C020EDEE8CC824EF535801291666</code> <code>7877D6D921D73FC2568CACD532DD7E31</code> <code>B043813062B7F5984259A4BBEC4DB028</code> <code>C56D1E750E850E4BE9440FAAA824A89B</code> <code>F8F7DCE0D4A9014190B17D2148927019</code> <code>679D5A69F906173FA752A41618652FD2</code> <code>62DEB1B932A6F14F98559631F6161AA8</code> <code>44AA25F9AF8D41F2EC4FAE9DC7EF5ED6</code> <code>8791DAD83DC24D88D24BCE8E70FA9D56</code> <code>49FB8C2901D063A39217FEE80413DB14</code> <code>23F107BCBE68E83E6350DCA801765B72</code> <code>891C80D1EC7DEC4B4193399870CA8BF0</code> <code>8505D65DC32BFAF205C3968DE9AF1DEF</code> <code>B56C724DE39663D2EA8609950AA56153</code> <code>2170A94070EA92D035CBCFF516DA6EDB</code> <code>BE786BB3B245703CD84345E07C25D54B</code> <code>9A050D0959A6DF68395662BEFAA6A44F</code> <code>0C7D856473819AB062E134432299DA17</code> <code>555792F62B7EA67ECD2A26A2969ABDEB</code> <code>87C102EA23265F2669F6ED501EB1CC50</code> <code>8B73087D3FFEB129467174CC7FFE17BE</code> <code>82E718095BE89080734653DA2ADE408E</code> <code>0F373A89E8AD5E3CE1066C49142EC3EB</code> <code>5FE42BE78BF55CF5F9765B529499CEF2</code> <code>2BE731C31BDB03A96F633719C2AB2646</code> <code>7F11DFF1E37930F747A703D7D0989467</code><br> <code>5119C4F2</code></td> <td><code>FE5002001B418E98ECD0FD3FD2EF5907</code> <code>955A6BA09FEEBEBD4D5793DB90D18171</code> <code>0BFD5A3AE1227CD468DF742EC1C85257</code> <code>B56F50364FFEE2EFF150F78AEE2B71FC</code> <code>AD2FCB684A8CD3887144A1E426D886A0</code> <code>3142D28869FA5B5E01C898494375AB2B</code> <code>685571A75D9881AA395BC989E7CF09AF</code> <code>FEE9B5EAE42A9CC1DF8C15FDC370859E</code> <code>FACF1D863AEADDA1A0F83AC2942BEB91</code> <code>57A49A70692B284E4B45B8BF7B3BB409</code> <code>5888C6A17A1104B772439110A0FBB55F</code> <code>8947A66A1AB230E8F2525141620FE35D</code> <code>AC0A4F2116F00B11CF1FDF9D2AC1743F</code> <code>E6BF5566F90B7DC48695BEEF8760C4E6</code> <code>9E4BADD2F6B9FAED265192F29256BBBA</code> <code>9BD2AA52721C760DBA917BC1DC33BF7C</code> <code>FD2BC0EE0B9E789BDB96DA366200D727</code> <code>96807AFFCE8709121EA460AD44CD2120</code> <code>2A84347BB8F9D581DA1DA0031BAB5123</code> <code>8B173A660DDF1A25DB4CD51C6F772E59</code> <code>8DE6B627EBFE69321CB8BC0009B487A0</code> <code>6C0C180B5C8232B916B517AA636A1F14</code> <code>5314E4F839844708E6114362BDFC4BD3</code> <code>226F21B59CAA01ACFE2D76037196BCF5</code> <code>E294DCD64E8090A12DD68F6E23A10479</code> <code>0DF80DEA65313A156F45C318490F5FEF</code> <code>4074B8E04B0BC3C5F9FBFF6A0BF4BC6E</code> <code>7C8186EFC3E331AB3C3F294DF26D91A4</code> <code>005774A5E2DBE44975A27F9E23F12471</code> <code>FEDFDFA575893CB4263171F6B3DE8E6D</code> <code>C7C8BE0D936B2E212E79EA908AEC26B6</code> <code>B988125B476307DE4CB5501924112E49</code> <code>B04235F38734CDFFB511D3D8B0C7CA21</code> <code>A789BC86D43777BF205EB882951C4E5C</code> <code>8220E6621FCA6E1ABF027BB9C3DF356A</code> <code>785016E4A9F4C9C5422E0881EFF3DCF6</code> <code>16785EEEE5E8F36E8AC83AD61A513522</code><br> <code>9FC066A7</code></td>
<td>See below</td> <td>See below</td>
</tr> </tr>
</tbody> </tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 7D4A606F265527494A39B92866DD6F044805CCB671235F4686E6737AD
<!-- end server_DH_params_ok --> <!-- 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> <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 --> <!-- start server_DH_inner_data_input -->
<pre><code>encrypted_answer = B02D72B51876E099A2D4B17BF6F7D36DF464C32096E78198AECAA68283C1824D72FBC544C1F1618A56C06CB7B5A192F3156AF15E212F1AFF12C876D79E93797B278A345932417F21F676FBB6C7BCFEFEC9CC06FC912D8DD5D433F9830D4B83866F236DBF4804BCB59370459CB511D165E70C699777417D7D532FE201B25E6F972F790FC6E3E36C51183C1D66F91C56141AE73CB23C875AFB48655C65AF6332F6BB8EA22A4919029E9B63ABAA51A6C020EDEE8CC824EF5358012916667877D6D921D73FC2568CACD532DD7E31B043813062B7F5984259A4BBEC4DB028C56D1E750E850E4BE9440FAAA824A89BF8F7DCE0D4A9014190B17D2148927019679D5A69F906173FA752A41618652FD262DEB1B932A6F14F98559631F6161AA844AA25F9AF8D41F2EC4FAE9DC7EF5ED68791DAD83DC24D88D24BCE8E70FA9D5649FB8C2901D063A39217FEE80413DB1423F107BCBE68E83E6350DCA801765B72891C80D1EC7DEC4B4193399870CA8BF08505D65DC32BFAF205C3968DE9AF1DEFB56C724DE39663D2EA8609950AA561532170A94070EA92D035CBCFF516DA6EDBBE786BB3B245703CD84345E07C25D54B9A050D0959A6DF68395662BEFAA6A44F0C7D856473819AB062E134432299DA17555792F62B7EA67ECD2A26A2969ABDEB87C102EA23265F2669F6ED501EB1CC508B73087D3FFEB129467174CC7FFE17BE82E718095BE89080734653DA2ADE408E0F373A89E8AD5E3CE1066C49142EC3EB5FE42BE78BF55CF5F9765B529499CEF22BE731C31BDB03A96F633719C2AB26467F11DFF1E37930F747A703D7D09894675119C4F2 <pre><code>encrypted_answer = 1B418E98ECD0FD3FD2EF5907955A6BA09FEEBEBD4D5793DB90D181710BFD5A3AE1227CD468DF742EC1C85257B56F50364FFEE2EFF150F78AEE2B71FCAD2FCB684A8CD3887144A1E426D886A03142D28869FA5B5E01C898494375AB2B685571A75D9881AA395BC989E7CF09AFFEE9B5EAE42A9CC1DF8C15FDC370859EFACF1D863AEADDA1A0F83AC2942BEB9157A49A70692B284E4B45B8BF7B3BB4095888C6A17A1104B772439110A0FBB55F8947A66A1AB230E8F2525141620FE35DAC0A4F2116F00B11CF1FDF9D2AC1743FE6BF5566F90B7DC48695BEEF8760C4E69E4BADD2F6B9FAED265192F29256BBBA9BD2AA52721C760DBA917BC1DC33BF7CFD2BC0EE0B9E789BDB96DA366200D72796807AFFCE8709121EA460AD44CD21202A84347BB8F9D581DA1DA0031BAB51238B173A660DDF1A25DB4CD51C6F772E598DE6B627EBFE69321CB8BC0009B487A06C0C180B5C8232B916B517AA636A1F145314E4F839844708E6114362BDFC4BD3226F21B59CAA01ACFE2D76037196BCF5E294DCD64E8090A12DD68F6E23A104790DF80DEA65313A156F45C318490F5FEF4074B8E04B0BC3C5F9FBFF6A0BF4BC6E7C8186EFC3E331AB3C3F294DF26D91A4005774A5E2DBE44975A27F9E23F12471FEDFDFA575893CB4263171F6B3DE8E6DC7C8BE0D936B2E212E79EA908AEC26B6B988125B476307DE4CB5501924112E49B04235F38734CDFFB511D3D8B0C7CA21A789BC86D43777BF205EB882951C4E5C8220E6621FCA6E1ABF027BB9C3DF356A785016E4A9F4C9C5422E0881EFF3DCF616785EEEE5E8F36E8AC83AD61A5135229FC066A7
tmp_aes_key = 78576E1A30E6B0940A9D9738D8A08F0902EE0C9B9DF2F4CA62703CDE732E4D9A tmp_aes_key = 77956CAD707C98DD3C0873D0AF3F3388D352E8EF9E3A478719F1F8FD0A1946A3
tmp_aes_iv = 7D469F9CC0DFA9F67BCC38FE9DD1E77B0EC6D30C040208B306BDB7684ADF3F67</code></pre> tmp_aes_iv = 37D0003B77E9B64CC8CB4DF0E64D69CB4A3520877049D1AE1843149831447EEA</code></pre>
<!-- end server_DH_inner_data_input --> <!-- end server_DH_inner_data_input -->
<p>Yielding:</p> <p>Yielding:</p>
<!-- start server_DH_inner_data_output --> <!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 12271379349EDC31E311D0B9BC0B42E3EFB80C46BA0D89B58A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE5764703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100C5ED610DA5C0EFD8EC3E79DEA7EACFC9ACF3E18028737BE4E5D17A49C887A6430D9B369E166A20F84F326163AEF6C89189FB051359158455EF4746E528090406312C95871E92CADFF28F9054D5B3AF183FB7227CB68309110A68D3A57C57C067E5B3BAF41FF51D6E777713F67EC7481EEE76842DDBC830E1A2383A0C94A7DE6218337378EFA5D961E483FD36F4B5614B50CC8691D5B9E644DDF3F756EDB24099A3E0607F561E0FDBDEB41606D18EA643F2C50CC33BA4A4E8D57D940AFB474DE732B5746681E52592968C679FEF109EA8ABFB1167BAA904D705D09CAA6966FC2E7B40EB4109EF58020B7451FB43851B5DC28F5AF7FB9AF5723C383C115A7D85C5D6CF746585C7531A5463B73A <pre><code>answer_with_hash = 6AE107D87B0AC6EF18785CB308A21F0D961516CBBA0D89B583FE4FA7D6AD1B8AC7638A36ADAB7A9A65D66D4E1CC2165A23E8D18C4D3B8AB703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100BC15179B7B777707A4BC1DD6EFEB86AE7266F68F792CEB76DE1F052FB95BC4C3C8FC438496ED2AAE99DE6E31D49027448A5C7FF6695600E2F368B3E4437EAC9CFA9E21E7AEBCFCAE28A506D6B30A187163A01905EDE179B80DF01BBBC224FBEBB6CF0BE21C4057A71FB57D9664E3458893ED3F88C4A980FC0C0A225E52F7AF4791E91AE862279B9A998A462A759630C5F15DCDC4E1DA9473326E86AD62441805D14C0E8AF75AC36B41418AB0C42BEE3DA18530F891509AA43B9AE8915EFAA45BC2D27B8A69FC1061E1AE2573891B3ADB21E306594347BB09407D41760D8E3DEA1948909A4D8CAE0EA61B4C32FE4E0D11F48D8ED82C1D3BEA6FD5B42EA962251CE25A7765495A203E6B0661AC
answer = BA0D89B58A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE5764703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100C5ED610DA5C0EFD8EC3E79DEA7EACFC9ACF3E18028737BE4E5D17A49C887A6430D9B369E166A20F84F326163AEF6C89189FB051359158455EF4746E528090406312C95871E92CADFF28F9054D5B3AF183FB7227CB68309110A68D3A57C57C067E5B3BAF41FF51D6E777713F67EC7481EEE76842DDBC830E1A2383A0C94A7DE6218337378EFA5D961E483FD36F4B5614B50CC8691D5B9E644DDF3F756EDB24099A3E0607F561E0FDBDEB41606D18EA643F2C50CC33BA4A4E8D57D940AFB474DE732B5746681E52592968C679FEF109EA8ABFB1167BAA904D705D09CAA6966FC2E7B40EB4109EF58020B7451FB43851B5DC28F5AF7FB9AF5723C383C115A7D85C5D6CF746585C7531A5463B73A</code></pre> answer = BA0D89B583FE4FA7D6AD1B8AC7638A36ADAB7A9A65D66D4E1CC2165A23E8D18C4D3B8AB703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100BC15179B7B777707A4BC1DD6EFEB86AE7266F68F792CEB76DE1F052FB95BC4C3C8FC438496ED2AAE99DE6E31D49027448A5C7FF6695600E2F368B3E4437EAC9CFA9E21E7AEBCFCAE28A506D6B30A187163A01905EDE179B80DF01BBBC224FBEBB6CF0BE21C4057A71FB57D9664E3458893ED3F88C4A980FC0C0A225E52F7AF4791E91AE862279B9A998A462A759630C5F15DCDC4E1DA9473326E86AD62441805D14C0E8AF75AC36B41418AB0C42BEE3DA18530F891509AA43B9AE8915EFAA45BC2D27B8A69FC1061E1AE2573891B3ADB21E306594347BB09407D41760D8E3DEA1948909A4D8CAE0EA61B4C32FE4E0D11F48D8ED82C1D3BEA6FD5B42EA962251CE25A7765495A203E6B0661AC</code></pre>
<!-- end server_DH_inner_data_output --> <!-- end server_DH_inner_data_output -->
<!-- start server_DH_inner_data --> <!-- start server_DH_inner_data -->
<p>Generated payload (excluding transport headers/trailers):</p> <p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | BA 0D 89 B5 8A 1A 2C 01 1E 54 29 F6 92 F6 46 62 <pre><code>0000 | BA 0D 89 B5 83 FE 4F A7 D6 AD 1B 8A C7 63 8A 36
0010 | 87 3D EE AB 6A C0 DB C7 98 A5 05 E5 94 81 5E 49 0010 | AD AB 7A 9A 65 D6 6D 4E 1C C2 16 5A 23 E8 D1 8C
0020 | FA E5 76 47 03 00 00 00 FE 00 01 00 C7 1C AE B9 0020 | 4D 3B 8A B7 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 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 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 0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E
@ -532,23 +532,23 @@ answer = BA0D89B58A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE5764
0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6 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 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 0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
0130 | C5 ED 61 0D A5 C0 EF D8 EC 3E 79 DE A7 EA CF C9 0130 | BC 15 17 9B 7B 77 77 07 A4 BC 1D D6 EF EB 86 AE
0140 | AC F3 E1 80 28 73 7B E4 E5 D1 7A 49 C8 87 A6 43 0140 | 72 66 F6 8F 79 2C EB 76 DE 1F 05 2F B9 5B C4 C3
0150 | 0D 9B 36 9E 16 6A 20 F8 4F 32 61 63 AE F6 C8 91 0150 | C8 FC 43 84 96 ED 2A AE 99 DE 6E 31 D4 90 27 44
0160 | 89 FB 05 13 59 15 84 55 EF 47 46 E5 28 09 04 06 0160 | 8A 5C 7F F6 69 56 00 E2 F3 68 B3 E4 43 7E AC 9C
0170 | 31 2C 95 87 1E 92 CA DF F2 8F 90 54 D5 B3 AF 18 0170 | FA 9E 21 E7 AE BC FC AE 28 A5 06 D6 B3 0A 18 71
0180 | 3F B7 22 7C B6 83 09 11 0A 68 D3 A5 7C 57 C0 67 0180 | 63 A0 19 05 ED E1 79 B8 0D F0 1B BB C2 24 FB EB
0190 | E5 B3 BA F4 1F F5 1D 6E 77 77 13 F6 7E C7 48 1E 0190 | B6 CF 0B E2 1C 40 57 A7 1F B5 7D 96 64 E3 45 88
01A0 | EE 76 84 2D DB C8 30 E1 A2 38 3A 0C 94 A7 DE 62 01A0 | 93 ED 3F 88 C4 A9 80 FC 0C 0A 22 5E 52 F7 AF 47
01B0 | 18 33 73 78 EF A5 D9 61 E4 83 FD 36 F4 B5 61 4B 01B0 | 91 E9 1A E8 62 27 9B 9A 99 8A 46 2A 75 96 30 C5
01C0 | 50 CC 86 91 D5 B9 E6 44 DD F3 F7 56 ED B2 40 99 01C0 | F1 5D CD C4 E1 DA 94 73 32 6E 86 AD 62 44 18 05
01D0 | A3 E0 60 7F 56 1E 0F DB DE B4 16 06 D1 8E A6 43 01D0 | D1 4C 0E 8A F7 5A C3 6B 41 41 8A B0 C4 2B EE 3D
01E0 | F2 C5 0C C3 3B A4 A4 E8 D5 7D 94 0A FB 47 4D E7 01E0 | A1 85 30 F8 91 50 9A A4 3B 9A E8 91 5E FA A4 5B
01F0 | 32 B5 74 66 81 E5 25 92 96 8C 67 9F EF 10 9E A8 01F0 | C2 D2 7B 8A 69 FC 10 61 E1 AE 25 73 89 1B 3A DB
0200 | AB FB 11 67 BA A9 04 D7 05 D0 9C AA 69 66 FC 2E 0200 | 21 E3 06 59 43 47 BB 09 40 7D 41 76 0D 8E 3D EA
0210 | 7B 40 EB 41 09 EF 58 02 0B 74 51 FB 43 85 1B 5D 0210 | 19 48 90 9A 4D 8C AE 0E A6 1B 4C 32 FE 4E 0D 11
0220 | C2 8F 5A F7 FB 9A F5 72 3C 38 3C 11 5A 7D 85 C5 0220 | F4 8D 8E D8 2C 1D 3B EA 6F D5 B4 2E A9 62 25 1C
0230 | D6 CF 74 65</code></pre> 0230 | E2 5A 77 65</code></pre>
<p>Payload (de)serialization:</p> <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> <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"> <table class="table">
@ -570,13 +570,13 @@ answer = BA0D89B58A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE5764
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>4, 16</td> <td>4, 16</td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td> <td><code>83FE4FA7D6AD1B8AC7638A36ADAB7A9A</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>20, 16</td> <td>20, 16</td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td> <td><code>65D66D4E1CC2165A23E8D18C4D3B8AB7</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
@ -594,13 +594,13 @@ answer = BA0D89B58A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE5764
<tr> <tr>
<td>g_a</td> <td>g_a</td>
<td>300, 260</td> <td>300, 260</td>
<td><code>FE000100C5ED610DA5C0EFD8EC3E79DE</code> <code>A7EACFC9ACF3E18028737BE4E5D17A49</code> <code>C887A6430D9B369E166A20F84F326163</code> <code>AEF6C89189FB051359158455EF4746E5</code> <code>28090406312C95871E92CADFF28F9054</code> <code>D5B3AF183FB7227CB68309110A68D3A5</code> <code>7C57C067E5B3BAF41FF51D6E777713F6</code> <code>7EC7481EEE76842DDBC830E1A2383A0C</code> <code>94A7DE6218337378EFA5D961E483FD36</code> <code>F4B5614B50CC8691D5B9E644DDF3F756</code> <code>EDB24099A3E0607F561E0FDBDEB41606</code> <code>D18EA643F2C50CC33BA4A4E8D57D940A</code> <code>FB474DE732B5746681E52592968C679F</code> <code>EF109EA8ABFB1167BAA904D705D09CAA</code> <code>6966FC2E7B40EB4109EF58020B7451FB</code> <code>43851B5DC28F5AF7FB9AF5723C383C11</code><br> <code>5A7D85C5</code></td> <td><code>FE000100BC15179B7B777707A4BC1DD6</code> <code>EFEB86AE7266F68F792CEB76DE1F052F</code> <code>B95BC4C3C8FC438496ED2AAE99DE6E31</code> <code>D49027448A5C7FF6695600E2F368B3E4</code> <code>437EAC9CFA9E21E7AEBCFCAE28A506D6</code> <code>B30A187163A01905EDE179B80DF01BBB</code> <code>C224FBEBB6CF0BE21C4057A71FB57D96</code> <code>64E3458893ED3F88C4A980FC0C0A225E</code> <code>52F7AF4791E91AE862279B9A998A462A</code> <code>759630C5F15DCDC4E1DA9473326E86AD</code> <code>62441805D14C0E8AF75AC36B41418AB0</code> <code>C42BEE3DA18530F891509AA43B9AE891</code> <code>5EFAA45BC2D27B8A69FC1061E1AE2573</code> <code>891B3ADB21E306594347BB09407D4176</code> <code>0D8E3DEA1948909A4D8CAE0EA61B4C32</code> <code>FE4E0D11F48D8ED82C1D3BEA6FD5B42E</code><br> <code>A962251C</code></td>
<td><code>g_a</code> diffie-hellman parameter</td> <td><code>g_a</code> diffie-hellman parameter</td>
</tr> </tr>
<tr> <tr>
<td>server_time</td> <td>server_time</td>
<td>560, 4</td> <td>560, 4</td>
<td><code>D6CF7465</code> (1702154198 in decimal)</td> <td><code>E25A7765</code> (1702320866 in decimal)</td>
<td>Server time</td> <td>Server time</td>
</tr> </tr>
</tbody> </tbody>
@ -609,34 +609,34 @@ answer = BA0D89B58A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE5764
<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> <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> <p>First, generate a secure random 2048-bit number b:</p>
<!-- start b --> <!-- start b -->
<pre><code>b = 5DC51D8C155FDDE99C5E4D472A278409BAAF528266CD33AF0259FFAF68D4E7AA558EAE663ED8D29A9FE68E8DA7519163446FFB3CE549A75ED66AD37BE580F66C1306BA4EFE9A14CACA87A900A79968F50E57288B06DD6AEBA49C803C3F50D9BBE53E2074EBD49E145BB84B3DC6D502C03E2D58E7BC271CC3EF93A04433846F126D4951BF6E405870EF9BE01812FB44F10A9EC3C95B266AA0D843436F167178A49F9750A7F0FDCF287D57656A804C191C14BE9D719F9ECF9412EF17AC0AD4501876E19F640239EC75EC6F3567CB7B9FE48DA3C671980891F18D17B89622FDF265FC70EDC226A500981987D296073E693E1EC51A39C166CA5E464E1297E5AD368E</code></pre> <pre><code>b = D03EB9F7EAE9C226883F2EDF3E567C95B46E967B896EE5B3B4809F553AE78643827F179D03F886CD10A5953B855CCE619227A18BEB308E85312A3CD092213A9B6FE79FE1F6C3E69A76AC0B42A27C14F71277ED22895E5B46ED82DD91D1A0823A65E1C2911EC15674448137A3AC724E47B4C75A8FC4700AC2A87A23DC5D018C9CB3C4E8AC6A4B88C2D4A534858F906287823A847CDE105C5071704675648D26539E457B0D2918B431736962A437EA25B1693DD8309A622FD2B4A69E8E8A7BA8AD258ABCCE4257A32161A0C81EFC90A41B504462D7272E25E611509C211A6E1B3E27E61691E050662F3EEA9BB93844FA41CBC9850BA93AFAD3AB71F6118BA27631</code></pre>
<!-- end b --> <!-- end b -->
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p> <p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
<!-- start g_b --> <!-- start g_b -->
<pre><code>g_b = 9E8684FCBA2B2D5015BE8FCB61DD37975DD1FF1C8DEC0D50F802B55DCD0EC328F0116C23ACE6E839D5B0BC278823D6D790F3ED28D52E0790D32AAB7A37EB3622021D28878CA2FFA7F8AC3683DBD5AA47C2D716CADD9EE216055095798F253174E445CC594B1D953B1AA5305B1463C96A85307F1B0184CEF0792515B7A85BFA5C4647C452AC4BD7CC8E710F5B590659A86E6230473026273F71549A684069DC3E369D7D8D8CE13F734557C2AB042D9C36718B012C38AE64DF7F006B71BF3FA1C273ED08B30207C41172A6B8D46F829E2C9E47EACA8200A3FFC5F37B9D53CC421153E51BA9136474689358CA50D72AAA457632596E966F15962C0DC49971C8F2C8</code></pre> <pre><code>g_b = 7FC2C58B9603B3D75A35AFA493AE2D14DCAA0B5E5D8BF64521ABC28CB1FA7E0850C01F3D50A91722E39655632710D583822751C84AF1629B0E47C6DC5394A0AA1D51392C22CBCF87BD5A5C333438CE292AE3B1CCF58339A436CE0EAD46CDD80C7AF9CA32F52DA53693741C79EE2A209150194C04B407291B81A897D8817CAD435594C2BA944A4D326C8CB91EF417182922D7B5F0DF85F8DD8FCCC84834E6BFFF6C4A36BD6C7C316A7A0729F22ED3FFD2EA3AEF2071BA8D7BBEC13DC2BE08F1A36F203DB03130E04CE226188CABE6AC90F9D1038DE6A7D99A4400E8669F8910D22849C6B00A2B10A1E6AA7B7B2BFF59279574EE2286E4EE45E64152AFE9990899</code></pre>
<!-- end g_b --> <!-- end g_b -->
<h6>7.1) generation of encrypted_data</h6> <h6>7.1) generation of encrypted_data</h6>
<!-- start client_DH_inner_data --> <!-- start client_DH_inner_data -->
<p>Generated payload (excluding transport headers/trailers):</p> <p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 54 B6 43 66 8A 1A 2C 01 1E 54 29 F6 92 F6 46 62 <pre><code>0000 | 54 B6 43 66 83 FE 4F A7 D6 AD 1B 8A C7 63 8A 36
0010 | 87 3D EE AB 6A C0 DB C7 98 A5 05 E5 94 81 5E 49 0010 | AD AB 7A 9A 65 D6 6D 4E 1C C2 16 5A 23 E8 D1 8C
0020 | FA E5 76 47 00 00 00 00 00 00 00 00 FE 00 01 00 0020 | 4D 3B 8A B7 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 9E 86 84 FC BA 2B 2D 50 15 BE 8F CB 61 DD 37 97 0030 | 7F C2 C5 8B 96 03 B3 D7 5A 35 AF A4 93 AE 2D 14
0040 | 5D D1 FF 1C 8D EC 0D 50 F8 02 B5 5D CD 0E C3 28 0040 | DC AA 0B 5E 5D 8B F6 45 21 AB C2 8C B1 FA 7E 08
0050 | F0 11 6C 23 AC E6 E8 39 D5 B0 BC 27 88 23 D6 D7 0050 | 50 C0 1F 3D 50 A9 17 22 E3 96 55 63 27 10 D5 83
0060 | 90 F3 ED 28 D5 2E 07 90 D3 2A AB 7A 37 EB 36 22 0060 | 82 27 51 C8 4A F1 62 9B 0E 47 C6 DC 53 94 A0 AA
0070 | 02 1D 28 87 8C A2 FF A7 F8 AC 36 83 DB D5 AA 47 0070 | 1D 51 39 2C 22 CB CF 87 BD 5A 5C 33 34 38 CE 29
0080 | C2 D7 16 CA DD 9E E2 16 05 50 95 79 8F 25 31 74 0080 | 2A E3 B1 CC F5 83 39 A4 36 CE 0E AD 46 CD D8 0C
0090 | E4 45 CC 59 4B 1D 95 3B 1A A5 30 5B 14 63 C9 6A 0090 | 7A F9 CA 32 F5 2D A5 36 93 74 1C 79 EE 2A 20 91
00A0 | 85 30 7F 1B 01 84 CE F0 79 25 15 B7 A8 5B FA 5C 00A0 | 50 19 4C 04 B4 07 29 1B 81 A8 97 D8 81 7C AD 43
00B0 | 46 47 C4 52 AC 4B D7 CC 8E 71 0F 5B 59 06 59 A8 00B0 | 55 94 C2 BA 94 4A 4D 32 6C 8C B9 1E F4 17 18 29
00C0 | 6E 62 30 47 30 26 27 3F 71 54 9A 68 40 69 DC 3E 00C0 | 22 D7 B5 F0 DF 85 F8 DD 8F CC C8 48 34 E6 BF FF
00D0 | 36 9D 7D 8D 8C E1 3F 73 45 57 C2 AB 04 2D 9C 36 00D0 | 6C 4A 36 BD 6C 7C 31 6A 7A 07 29 F2 2E D3 FF D2
00E0 | 71 8B 01 2C 38 AE 64 DF 7F 00 6B 71 BF 3F A1 C2 00E0 | EA 3A EF 20 71 BA 8D 7B BE C1 3D C2 BE 08 F1 A3
00F0 | 73 ED 08 B3 02 07 C4 11 72 A6 B8 D4 6F 82 9E 2C 00F0 | 6F 20 3D B0 31 30 E0 4C E2 26 18 8C AB E6 AC 90
0100 | 9E 47 EA CA 82 00 A3 FF C5 F3 7B 9D 53 CC 42 11 0100 | F9 D1 03 8D E6 A7 D9 9A 44 00 E8 66 9F 89 10 D2
0110 | 53 E5 1B A9 13 64 74 68 93 58 CA 50 D7 2A AA 45 0110 | 28 49 C6 B0 0A 2B 10 A1 E6 AA 7B 7B 2B FF 59 27
0120 | 76 32 59 6E 96 6F 15 96 2C 0D C4 99 71 C8 F2 C8</code></pre> 0120 | 95 74 EE 22 86 E4 EE 45 E6 41 52 AF E9 99 08 99</code></pre>
<p>Payload (de)serialization:</p> <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> <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"> <table class="table">
@ -658,19 +658,19 @@ answer = BA0D89B58A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE5764
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>4, 16</td> <td>4, 16</td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td> <td><code>83FE4FA7D6AD1B8AC7638A36ADAB7A9A</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>20, 16</td> <td>20, 16</td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td> <td><code>65D66D4E1CC2165A23E8D18C4D3B8AB7</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>g_b</td> <td>g_b</td>
<td>36, 260</td> <td>36, 260</td>
<td><code>FE0001009E8684FCBA2B2D5015BE8FCB</code> <code>61DD37975DD1FF1C8DEC0D50F802B55D</code> <code>CD0EC328F0116C23ACE6E839D5B0BC27</code> <code>8823D6D790F3ED28D52E0790D32AAB7A</code> <code>37EB3622021D28878CA2FFA7F8AC3683</code> <code>DBD5AA47C2D716CADD9EE21605509579</code> <code>8F253174E445CC594B1D953B1AA5305B</code> <code>1463C96A85307F1B0184CEF0792515B7</code> <code>A85BFA5C4647C452AC4BD7CC8E710F5B</code> <code>590659A86E6230473026273F71549A68</code> <code>4069DC3E369D7D8D8CE13F734557C2AB</code> <code>042D9C36718B012C38AE64DF7F006B71</code> <code>BF3FA1C273ED08B30207C41172A6B8D4</code> <code>6F829E2C9E47EACA8200A3FFC5F37B9D</code> <code>53CC421153E51BA9136474689358CA50</code> <code>D72AAA457632596E966F15962C0DC499</code><br> <code>71C8F2C8</code></td> <td><code>FE0001007FC2C58B9603B3D75A35AFA4</code> <code>93AE2D14DCAA0B5E5D8BF64521ABC28C</code> <code>B1FA7E0850C01F3D50A91722E3965563</code> <code>2710D583822751C84AF1629B0E47C6DC</code> <code>5394A0AA1D51392C22CBCF87BD5A5C33</code> <code>3438CE292AE3B1CCF58339A436CE0EAD</code> <code>46CDD80C7AF9CA32F52DA53693741C79</code> <code>EE2A209150194C04B407291B81A897D8</code> <code>817CAD435594C2BA944A4D326C8CB91E</code> <code>F417182922D7B5F0DF85F8DD8FCCC848</code> <code>34E6BFFF6C4A36BD6C7C316A7A0729F2</code> <code>2ED3FFD2EA3AEF2071BA8D7BBEC13DC2</code> <code>BE08F1A36F203DB03130E04CE226188C</code> <code>ABE6AC90F9D1038DE6A7D99A4400E866</code> <code>9F8910D22849C6B00A2B10A1E6AA7B7B</code> <code>2BFF59279574EE2286E4EE45E64152AF</code><br> <code>E9990899</code></td>
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td> <td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
</tr> </tr>
<tr> <tr>
@ -684,47 +684,47 @@ answer = BA0D89B58A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE5764
<!-- end client_DH_inner_data --> <!-- 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> <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 --> <!-- start client_DH_inner_data_input -->
<pre><code>data = 54B643668A1A2C011E5429F692F64662873DEEAB6AC0DBC798A505E594815E49FAE576470000000000000000FE0001009E8684FCBA2B2D5015BE8FCB61DD37975DD1FF1C8DEC0D50F802B55DCD0EC328F0116C23ACE6E839D5B0BC278823D6D790F3ED28D52E0790D32AAB7A37EB3622021D28878CA2FFA7F8AC3683DBD5AA47C2D716CADD9EE216055095798F253174E445CC594B1D953B1AA5305B1463C96A85307F1B0184CEF0792515B7A85BFA5C4647C452AC4BD7CC8E710F5B590659A86E6230473026273F71549A684069DC3E369D7D8D8CE13F734557C2AB042D9C36718B012C38AE64DF7F006B71BF3FA1C273ED08B30207C41172A6B8D46F829E2C9E47EACA8200A3FFC5F37B9D53CC421153E51BA9136474689358CA50D72AAA457632596E966F15962C0DC49971C8F2C8 <pre><code>data = 54B6436683FE4FA7D6AD1B8AC7638A36ADAB7A9A65D66D4E1CC2165A23E8D18C4D3B8AB70000000000000000FE0001007FC2C58B9603B3D75A35AFA493AE2D14DCAA0B5E5D8BF64521ABC28CB1FA7E0850C01F3D50A91722E39655632710D583822751C84AF1629B0E47C6DC5394A0AA1D51392C22CBCF87BD5A5C333438CE292AE3B1CCF58339A436CE0EAD46CDD80C7AF9CA32F52DA53693741C79EE2A209150194C04B407291B81A897D8817CAD435594C2BA944A4D326C8CB91EF417182922D7B5F0DF85F8DD8FCCC84834E6BFFF6C4A36BD6C7C316A7A0729F22ED3FFD2EA3AEF2071BA8D7BBEC13DC2BE08F1A36F203DB03130E04CE226188CABE6AC90F9D1038DE6A7D99A4400E8669F8910D22849C6B00A2B10A1E6AA7B7B2BFF59279574EE2286E4EE45E64152AFE9990899
padding = 468F095460FF0C3DAB7F600C padding = 0BA27B8C75CCDFCFB67AAB25
tmp_aes_key = 78576E1A30E6B0940A9D9738D8A08F0902EE0C9B9DF2F4CA62703CDE732E4D9A tmp_aes_key = 77956CAD707C98DD3C0873D0AF3F3388D352E8EF9E3A478719F1F8FD0A1946A3
tmp_aes_iv = 7D469F9CC0DFA9F67BCC38FE9DD1E77B0EC6D30C040208B306BDB7684ADF3F67</code></pre> tmp_aes_iv = 37D0003B77E9B64CC8CB4DF0E64D69CB4A3520877049D1AE1843149831447EEA</code></pre>
<!-- end client_DH_inner_data_input --> <!-- end client_DH_inner_data_input -->
<p>Process:</p> <p>Process:</p>
<pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16) <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> encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre>
<p>Output:</p> <p>Output:</p>
<!-- start client_DH_inner_data_output --> <!-- start client_DH_inner_data_output -->
<pre><code>encrypted_data = 43F7500A87615A4615C7A2F4C6C7C3AE2ADF91ECFD33FD9962D381E8E71D9FA33B78B2A176343890A4295B101CCAFF29801CCDEA284222064388DC4B3EAC94F4FD60A73F930B42EEC19A31138E42CCF9C84BEDD9BF3CADEAB539C904916D1EAAB70112F7546CE2C4E40B053C10322BAC88920F3E4626B10DFD6E14C0C849FC7E5F222839DC5D43C8E73D4E09B2700B389AB6C2736A6F59DC2FCEA44457C6EF668C78D9E7882421A11EF86E23E034AF28D6F52AFF562AAADF26762894286A83F4065887AC666BB79C24E8C1255AE02A26B3996CEF685D680C76C9672C5D61DF4F3F79BF5460A8E74538E39D32A5BFAF0F385323952C0D97FEA2947F5E3CEE2BD2F9F1038A9C875C6858B8761E2BC80F39BA5ECC87A4CD0BC0494556BC695B505500B1CFD96BBDAC0CA9D3483C752B5381AC82767BA272C755F954412816504C60BC04E90E4A07984172113ADC915B7C0A</code></pre> <pre><code>encrypted_data = 3E0AB10AD2B21A9DF4A4FE1D48F23232F6154DFAEDBFC85DD7D7DEF84DACCD7214E21C8E48BE56BEBBBCD8E892A5F0FA02C512708285F45D5A9B8CAE8AA28D800BC4468FA801B95F7A1E5695ABA9B5D5E87D72EA3A27B91CE1AB09DE038249C2E49A12B85C4772701C71468643C5F88DCB5CFFC95662C94F927DB65B3027CCEA8C98D46CE8E8944A520CC148AB5C1A705960BBA9855E040AA88C933103518883398C9AFDAF782DBB6394337A5ED0A2E6D68A04D02CFDC53DE5D93238908C8735C0BD1AC6406D8327D71D1E81E51EAD160CB29AFF53D381100096EE29900C194B3395DF8C89EF566BF2EFF4E9E2FE2E56640580437037E4309965D11C2291BB95CF9E8DDE4B5F172553FB61AD43EDB40BCC44CF76D4245F88E03C0C2699576301F6B1A8164F67EBA98ED2E87D9D15364747C8CA7EA6C6FC55873C5DD0C41E5014165253359DCFDB2BB955C3AD3CA97D4C</code></pre>
<!-- end client_DH_inner_data_output --> <!-- end client_DH_inner_data_output -->
<p>The length of the final string is 336 bytes.</p> <p>The length of the final string is 336 bytes.</p>
<h6>7.2) set_client_DH_params query</h6> <h6>7.2) set_client_DH_params query</h6>
<!-- start set_client_DH_params --> <!-- start set_client_DH_params -->
<p>Sent payload (excluding transport headers/trailers):</p> <p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 04 13 07 00 D6 CF 74 65 <pre><code>0000 | 00 00 00 00 00 00 00 00 AC 24 0D 00 E2 5A 77 65
0010 | 78 01 00 00 1F 5F 04 F5 8A 1A 2C 01 1E 54 29 F6 0010 | 78 01 00 00 1F 5F 04 F5 83 FE 4F A7 D6 AD 1B 8A
0020 | 92 F6 46 62 87 3D EE AB 6A C0 DB C7 98 A5 05 E5 0020 | C7 63 8A 36 AD AB 7A 9A 65 D6 6D 4E 1C C2 16 5A
0030 | 94 81 5E 49 FA E5 76 47 FE 50 01 00 43 F7 50 0A 0030 | 23 E8 D1 8C 4D 3B 8A B7 FE 50 01 00 3E 0A B1 0A
0040 | 87 61 5A 46 15 C7 A2 F4 C6 C7 C3 AE 2A DF 91 EC 0040 | D2 B2 1A 9D F4 A4 FE 1D 48 F2 32 32 F6 15 4D FA
0050 | FD 33 FD 99 62 D3 81 E8 E7 1D 9F A3 3B 78 B2 A1 0050 | ED BF C8 5D D7 D7 DE F8 4D AC CD 72 14 E2 1C 8E
0060 | 76 34 38 90 A4 29 5B 10 1C CA FF 29 80 1C CD EA 0060 | 48 BE 56 BE BB BC D8 E8 92 A5 F0 FA 02 C5 12 70
0070 | 28 42 22 06 43 88 DC 4B 3E AC 94 F4 FD 60 A7 3F 0070 | 82 85 F4 5D 5A 9B 8C AE 8A A2 8D 80 0B C4 46 8F
0080 | 93 0B 42 EE C1 9A 31 13 8E 42 CC F9 C8 4B ED D9 0080 | A8 01 B9 5F 7A 1E 56 95 AB A9 B5 D5 E8 7D 72 EA
0090 | BF 3C AD EA B5 39 C9 04 91 6D 1E AA B7 01 12 F7 0090 | 3A 27 B9 1C E1 AB 09 DE 03 82 49 C2 E4 9A 12 B8
00A0 | 54 6C E2 C4 E4 0B 05 3C 10 32 2B AC 88 92 0F 3E 00A0 | 5C 47 72 70 1C 71 46 86 43 C5 F8 8D CB 5C FF C9
00B0 | 46 26 B1 0D FD 6E 14 C0 C8 49 FC 7E 5F 22 28 39 00B0 | 56 62 C9 4F 92 7D B6 5B 30 27 CC EA 8C 98 D4 6C
00C0 | DC 5D 43 C8 E7 3D 4E 09 B2 70 0B 38 9A B6 C2 73 00C0 | E8 E8 94 4A 52 0C C1 48 AB 5C 1A 70 59 60 BB A9
00D0 | 6A 6F 59 DC 2F CE A4 44 57 C6 EF 66 8C 78 D9 E7 00D0 | 85 5E 04 0A A8 8C 93 31 03 51 88 83 39 8C 9A FD
00E0 | 88 24 21 A1 1E F8 6E 23 E0 34 AF 28 D6 F5 2A FF 00E0 | AF 78 2D BB 63 94 33 7A 5E D0 A2 E6 D6 8A 04 D0
00F0 | 56 2A AA DF 26 76 28 94 28 6A 83 F4 06 58 87 AC 00F0 | 2C FD C5 3D E5 D9 32 38 90 8C 87 35 C0 BD 1A C6
0100 | 66 6B B7 9C 24 E8 C1 25 5A E0 2A 26 B3 99 6C EF 0100 | 40 6D 83 27 D7 1D 1E 81 E5 1E AD 16 0C B2 9A FF
0110 | 68 5D 68 0C 76 C9 67 2C 5D 61 DF 4F 3F 79 BF 54 0110 | 53 D3 81 10 00 96 EE 29 90 0C 19 4B 33 95 DF 8C
0120 | 60 A8 E7 45 38 E3 9D 32 A5 BF AF 0F 38 53 23 95 0120 | 89 EF 56 6B F2 EF F4 E9 E2 FE 2E 56 64 05 80 43
0130 | 2C 0D 97 FE A2 94 7F 5E 3C EE 2B D2 F9 F1 03 8A 0130 | 70 37 E4 30 99 65 D1 1C 22 91 BB 95 CF 9E 8D DE
0140 | 9C 87 5C 68 58 B8 76 1E 2B C8 0F 39 BA 5E CC 87 0140 | 4B 5F 17 25 53 FB 61 AD 43 ED B4 0B CC 44 CF 76
0150 | A4 CD 0B C0 49 45 56 BC 69 5B 50 55 00 B1 CF D9 0150 | D4 24 5F 88 E0 3C 0C 26 99 57 63 01 F6 B1 A8 16
0160 | 6B BD AC 0C A9 D3 48 3C 75 2B 53 81 AC 82 76 7B 0160 | 4F 67 EB A9 8E D2 E8 7D 9D 15 36 47 47 C8 CA 7E
0170 | A2 72 C7 55 F9 54 41 28 16 50 4C 60 BC 04 E9 0E 0170 | A6 C6 FC 55 87 3C 5D D0 C4 1E 50 14 16 52 53 35
0180 | 4A 07 98 41 72 11 3A DC 91 5B 7C 0A</code></pre> 0180 | 9D CF DB 2B B9 55 C3 AD 3C A9 7D 4C</code></pre>
<p>Payload (de)serialization:</p> <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> <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"> <table class="table">
@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>04130700D6CF7465</code></td> <td><code>AC240D00E25A7765</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> <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>
<tr> <tr>
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td> <td><code>83FE4FA7D6AD1B8AC7638A36ADAB7A9A</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>40, 16</td> <td>40, 16</td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td> <td><code>65D66D4E1CC2165A23E8D18C4D3B8AB7</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>encrypted_data</td> <td>encrypted_data</td>
<td>56, 340</td> <td>56, 340</td>
<td><code>FE50010043F7500A87615A4615C7A2F4</code> <code>C6C7C3AE2ADF91ECFD33FD9962D381E8</code> <code>E71D9FA33B78B2A176343890A4295B10</code> <code>1CCAFF29801CCDEA284222064388DC4B</code> <code>3EAC94F4FD60A73F930B42EEC19A3113</code> <code>8E42CCF9C84BEDD9BF3CADEAB539C904</code> <code>916D1EAAB70112F7546CE2C4E40B053C</code> <code>10322BAC88920F3E4626B10DFD6E14C0</code> <code>C849FC7E5F222839DC5D43C8E73D4E09</code> <code>B2700B389AB6C2736A6F59DC2FCEA444</code> <code>57C6EF668C78D9E7882421A11EF86E23</code> <code>E034AF28D6F52AFF562AAADF26762894</code> <code>286A83F4065887AC666BB79C24E8C125</code> <code>5AE02A26B3996CEF685D680C76C9672C</code> <code>5D61DF4F3F79BF5460A8E74538E39D32</code> <code>A5BFAF0F385323952C0D97FEA2947F5E</code> <code>3CEE2BD2F9F1038A9C875C6858B8761E</code> <code>2BC80F39BA5ECC87A4CD0BC0494556BC</code> <code>695B505500B1CFD96BBDAC0CA9D3483C</code> <code>752B5381AC82767BA272C755F9544128</code> <code>16504C60BC04E90E4A07984172113ADC</code><br> <code>915B7C0A</code></td> <td><code>FE5001003E0AB10AD2B21A9DF4A4FE1D</code> <code>48F23232F6154DFAEDBFC85DD7D7DEF8</code> <code>4DACCD7214E21C8E48BE56BEBBBCD8E8</code> <code>92A5F0FA02C512708285F45D5A9B8CAE</code> <code>8AA28D800BC4468FA801B95F7A1E5695</code> <code>ABA9B5D5E87D72EA3A27B91CE1AB09DE</code> <code>038249C2E49A12B85C4772701C714686</code> <code>43C5F88DCB5CFFC95662C94F927DB65B</code> <code>3027CCEA8C98D46CE8E8944A520CC148</code> <code>AB5C1A705960BBA9855E040AA88C9331</code> <code>03518883398C9AFDAF782DBB6394337A</code> <code>5ED0A2E6D68A04D02CFDC53DE5D93238</code> <code>908C8735C0BD1AC6406D8327D71D1E81</code> <code>E51EAD160CB29AFF53D381100096EE29</code> <code>900C194B3395DF8C89EF566BF2EFF4E9</code> <code>E2FE2E56640580437037E4309965D11C</code> <code>2291BB95CF9E8DDE4B5F172553FB61AD</code> <code>43EDB40BCC44CF76D4245F88E03C0C26</code> <code>99576301F6B1A8164F67EBA98ED2E87D</code> <code>9D15364747C8CA7EA6C6FC55873C5DD0</code> <code>C41E5014165253359DCFDB2BB955C3AD</code><br> <code>3CA97D4C</code></td>
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td> <td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
</tr> </tr>
</tbody> </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> <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> <p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p>
<!-- start auth_key --> <!-- start auth_key -->
<pre><code>auth_key = 1B60A767BDFA34AA71F26A012F2EE980B2AD0F0E1FD2266D8AA1D048A6C751DD8074B8CA6E0BE46AB8CE544223D0F288FB4B2F6B85920A0A0BE9F4162E833A8A7A362FBA3EB0E6CF99DD0D603386D28DDE90BE6FB9B197C5E6B9EF616D32797EE025564E0765E5A155FA6E006A1FF2D557418ADE516D1DFC7B76762A75BC32780070DC4508BEF40D593E7BDA46F76521474B0CBF510F9F728490EA691C09E0F05D43798C703B6E9655619359EAC828B28B98B16C51B7B264D09A66226C725043BF182C0A06C5E59DB1D13CAA2D3416E9FB259DDA37B8DCDA021CCC3F3604C6E3F37C164754579A11909C524E2EFEEC5792AA89BAFD9B700B14B950252B283605</code></pre> <pre><code>auth_key = 5A4BCAAF3EAEFA5842187B2DA426AF63241C8E476F50D8AA9AF636F9E36324830AC9E2ACEA926D9FB31B74A0AB107A2A2FF2B555F389A0084C44DE425A45D8F335513DD84E0442E7264A1CDB67FE324D325892FA3869087B2D452CE4386A8C11651E5356FA4E68F06B9D2DE5D49E561EBF9778AE4AA591B00EA4EB305A6FB3F2A8CCC3BC84F0E72F5342DA05D4614B669DD88145D61B6B7515719F3120E06C3BFCE06293428C762166CC0AF8E474BF4E5DBCDF1FEB0CA75FAF63571F131A30A15B81B70B71D5365DA5A711A4F890E4A0305D5D0152E916D66D6E9FC0D207B526B0939D2225D6CF851EA402C67D4A1F90D4D975A81C0D7D0E3AF4D3218C96D60E</code></pre>
<!-- end auth_key --> <!-- 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> <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> <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 --> <!-- start dh_gen_ok -->
<p>Received payload (excluding transport headers/trailers):</p> <p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 18 C9 11 D7 CF 74 65 <pre><code>0000 | 00 00 00 00 00 00 00 00 01 24 A2 00 E3 5A 77 65
0010 | A8 00 00 00 34 F7 CB 3B 8A 1A 2C 01 1E 54 29 F6 0010 | 98 00 00 00 34 F7 CB 3B 83 FE 4F A7 D6 AD 1B 8A
0020 | 92 F6 46 62 87 3D EE AB 6A C0 DB C7 98 A5 05 E5 0020 | C7 63 8A 36 AD AB 7A 9A 65 D6 6D 4E 1C C2 16 5A
0030 | 94 81 5E 49 FA E5 76 47 EC E7 ED D1 82 82 44 6F 0030 | 23 E8 D1 8C 4D 3B 8A B7 ED C5 AF E1 45 3C E4 5A
0040 | AB A0 88 3A 32 51 71 1D</code></pre> 0040 | 47 37 F5 F4 C7 01 2B A9</code></pre>
<p>Payload (de)serialization:</p> <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> <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"> <table class="table">
@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>0118C911D7CF7465</code></td> <td><code>0124A200E35A7765</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> <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>
<tr> <tr>
<td>message_length</td> <td>message_length</td>
<td>16, 4</td> <td>16, 4</td>
<td><code>A8000000</code> (168 in decimal)</td> <td><code>98000000</code> (152 in decimal)</td>
<td>Message body length</td> <td>Message body length</td>
</tr> </tr>
<tr> <tr>
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>8A1A2C011E5429F692F64662873DEEAB</code></td> <td><code>83FE4FA7D6AD1B8AC7638A36ADAB7A9A</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>40, 16</td> <td>40, 16</td>
<td><code>6AC0DBC798A505E594815E49FAE57647</code></td> <td><code>65D66D4E1CC2165A23E8D18C4D3B8AB7</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>new_nonce_hash1</td> <td>new_nonce_hash1</td>
<td>56, 16</td> <td>56, 16</td>
<td><code>ECE7EDD18282446FABA0883A3251711D</code></td> <td><code>EDC5AFE1453CE45A4737F5F4C7012BA9</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> <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> </tr>
</tbody> </tbody>