Update content of files

This commit is contained in:
GitHub Action 2023-12-22 20:41:15 +00:00
parent 27a24a42a8
commit 09a6121857
10 changed files with 269 additions and 315 deletions

View file

@ -47,6 +47,7 @@
<p><a href="/api/premium">Telegram Premium</a> users can grant their favorite channels additional features like the ability to post <a href="/api/stories">stories</a> by giving them <strong>boosts</strong>. </p>
<p>Channels level up as they gain more boosts and for each level, they gain additional features. </p>
<p>Additionally, channel admins may gain even more boosts by starting <a href="/api/giveaways">giveaways »</a>. </p>
<p>The maximum possible boost level for a channel is specified in the <a href="/api/config#boosts-channel-level-max">boosts_channel_level_max</a> config key.</p>
<p>Schema:</p>
<pre><code><a href='/constructor/myBoost'>myBoost</a>#c448415c flags:<a href='/type/%23'>#</a> slot:<a href='/type/int'>int</a> peer:flags.0?<a href='/type/Peer'>Peer</a> date:<a href='/type/int'>int</a> expires:<a href='/type/int'>int</a> cooldown_until_date:flags.1?<a href='/type/int'>int</a> = <a href='/type/MyBoost'>MyBoost</a>;

View file

@ -530,9 +530,9 @@ Note that the stickerset can be fetched using <a href="/constructor/inputSticker
<h4><a class="anchor" href="#giveaway-period-max" id="giveaway-period-max" name="giveaway-period-max"><i class="anchor-icon"></i></a><code>giveaway_period_max</code></h4>
<p>The maximum duration in seconds of a <a href="/api/giveaways">giveaway</a>. (integer)</p>
<h4><a class="anchor" href="#boosts-channel-level-max" id="boosts-channel-level-max" name="boosts-channel-level-max"><i class="anchor-icon"></i></a><code>boosts_channel_level_max</code></h4>
<p>Maximum <a href="/api/boost">boost level</a> for channels. (integer)</p>
<h4><a class="anchor" href="#boosts-per-sent-gift" id="boosts-per-sent-gift" name="boosts-per-sent-gift"><i class="anchor-icon"></i></a><code>boosts_per_sent_gift</code></h4>
<p>The number of additional <a href="/api/boost">boost slots</a> that the current user will receive when <a href="/api/premium#gifting-telegram-premium">gifting a Telegram Premium subscription</a>. </p>
<h4><a class="anchor" href="#quote-length-max" id="quote-length-max" name="quote-length-max"><i class="anchor-icon"></i></a><code>quote_length_max</code></h4>
<h4><a class="anchor" href="#transcribe-audio-trial-weekly-number" id="transcribe-audio-trial-weekly-number" name="transcribe-audio-trial-weekly-number"><i class="anchor-icon"></i></a><code>transcribe_audio_trial_weekly_number</code></h4>
<p>The maximum number of <a href="/api/transcribe">speech recognition »</a> calls per week for non-<a href="/api/premium">Premium</a> users. (integer)</p>
<h4><a class="anchor" href="#transcribe-audio-trial-duration-max" id="transcribe-audio-trial-duration-max" name="transcribe-audio-trial-duration-max"><i class="anchor-icon"></i></a><code>transcribe_audio_trial_duration_max</code></h4>
@ -541,6 +541,8 @@ Note that the stickerset can be fetched using <a href="/constructor/inputSticker
<p>The maximum number of similar channels that can be recommended by <a href="/method/channels.getChannelRecommendations">channels.getChannelRecommendations»</a> to non-<a href="/api/premium">Premium</a> users. (integer)</p>
<h4><a class="anchor" href="#recommended-channels-limit-premium" id="recommended-channels-limit-premium" name="recommended-channels-limit-premium"><i class="anchor-icon"></i></a><code>recommended_channels_limit_premium</code></h4>
<p>The maximum number of similar channels that can be recommended by <a href="/method/channels.getChannelRecommendations">channels.getChannelRecommendations»</a> to <a href="/api/premium">Premium</a> users. (integer)</p>
<h4><a class="anchor" href="#quote-length-max" id="quote-length-max" name="quote-length-max"><i class="anchor-icon"></i></a><code>quote_length_max</code></h4>
<p> </p>
<h3><a class="anchor" href="#suggestions" id="suggestions" name="suggestions"><i class="anchor-icon"></i></a>Suggestions</h3>
<p>The API can return a set of useful suggestions for users of graphical clients. </p>
<h4><a class="anchor" href="#basic-suggestions" id="basic-suggestions" name="basic-suggestions"><i class="anchor-icon"></i></a>Basic suggestions</h4>

View file

@ -88,6 +88,7 @@
<li>Added <strong>wallpaper_overridden</strong> parameter in <a href="/constructor/userFull">userFull</a></li>
<li>Added <strong>profile_color</strong> parameter, removed <strong>background_emoji_id</strong> parameter, changed type of <strong>color</strong> from <strong>flags2.7?int</strong> to <strong>flags2.8?PeerColor</strong> in <a href="/constructor/user">user</a></li>
<li>Removed <strong>background_emoji_id</strong> parameter, changed type of <strong>color</strong> from <strong>flags2.6?int</strong> to <strong>flags2.7?PeerColor</strong> in <a href="/constructor/channel">channel</a></li>
<li>Added <strong>view_forum_as_messages</strong> parameter in <a href="/constructor/channelFull">channelFull</a></li>
<li>Added <strong>reactions_per_post</strong>, <strong>views_per_story</strong>, <strong>shares_per_story</strong>, <strong>reactions_per_story</strong>, <strong>reactions_by_emotion_graph</strong>, <strong>story_interactions_graph</strong>, <strong>story_reactions_by_emotion_graph</strong>, <strong>recent_posts_interactions</strong> parameters, removed <strong>recent_message_interactions</strong> parameter in <a href="/constructor/stats.broadcastStats">stats.broadcastStats</a></li>
<li>Added <strong>quote_offset</strong> parameter in <a href="/constructor/messageReplyHeader">messageReplyHeader</a></li>
<li>Added <strong>reactions_by_emotion_graph</strong> parameter in <a href="/constructor/stats.messageStats">stats.messageStats</a></li>
@ -119,7 +120,8 @@
<div><pre><code><a href="/constructor/dialog">dialog</a>#d58a08c6 flags:<a href="/type/%23">#</a> pinned:flags.2?<a href="/constructor/true">true</a> unread_mark:flags.3?<a href="/constructor/true">true</a> view_forum_as_messages:flags.6?<a href="/constructor/true">true</a> peer:<a href="/type/Peer">Peer</a> top_message:<a href="/type/int">int</a> read_inbox_max_id:<a href="/type/int">int</a> read_outbox_max_id:<a href="/type/int">int</a> unread_count:<a href="/type/int">int</a> unread_mentions_count:<a href="/type/int">int</a> unread_reactions_count:<a href="/type/int">int</a> notify_settings:<a href="/type/PeerNotifySettings">PeerNotifySettings</a> pts:flags.0?<a href="/type/int">int</a> draft:flags.1?<a href="/type/DraftMessage">DraftMessage</a> folder_id:flags.4?<a href="/type/int">int</a> ttl_period:flags.5?<a href="/type/int">int</a> = <a href="/type/Dialog">Dialog</a>;<br>
<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/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>;<br>
<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>;
<a href="/constructor/channelFull">channelFull</a>#723027bd flags:<a href="/type/%23">#</a> can_view_participants:flags.3?<a href="/constructor/true">true</a> can_set_username:flags.6?<a href="/constructor/true">true</a> can_set_stickers:flags.7?<a href="/constructor/true">true</a> hidden_prehistory:flags.10?<a href="/constructor/true">true</a> can_set_location:flags.16?<a href="/constructor/true">true</a> has_scheduled:flags.19?<a href="/constructor/true">true</a> can_view_stats:flags.20?<a href="/constructor/true">true</a> blocked:flags.22?<a href="/constructor/true">true</a> flags2:<a href="/type/%23">#</a> can_delete_channel:flags2.0?<a href="/constructor/true">true</a> antispam:flags2.1?<a href="/constructor/true">true</a> participants_hidden:flags2.2?<a href="/constructor/true">true</a> translations_disabled:flags2.3?<a href="/constructor/true">true</a> stories_pinned_available:flags2.5?<a href="/constructor/true">true</a> view_forum_as_messages:flags2.6?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> about:<a href="/type/string">string</a> participants_count:flags.0?<a href="/type/int">int</a> admins_count:flags.1?<a href="/type/int">int</a> kicked_count:flags.2?<a href="/type/int">int</a> banned_count:flags.2?<a href="/type/int">int</a> online_count:flags.13?<a href="/type/int">int</a> read_inbox_max_id:<a href="/type/int">int</a> read_outbox_max_id:<a href="/type/int">int</a> unread_count:<a href="/type/int">int</a> chat_photo:<a href="/type/Photo">Photo</a> notify_settings:<a href="/type/PeerNotifySettings">PeerNotifySettings</a> exported_invite:flags.23?<a href="/type/ExportedChatInvite">ExportedChatInvite</a> bot_info:<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/BotInfo">BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href="/type/long">long</a> migrated_from_max_id:flags.4?<a href="/type/int">int</a> pinned_msg_id:flags.5?<a href="/type/int">int</a> stickerset:flags.8?<a href="/type/StickerSet">StickerSet</a> available_min_id:flags.9?<a href="/type/int">int</a> folder_id:flags.11?<a href="/type/int">int</a> linked_chat_id:flags.14?<a href="/type/long">long</a> location:flags.15?<a href="/type/ChannelLocation">ChannelLocation</a> slowmode_seconds:flags.17?<a href="/type/int">int</a> slowmode_next_send_date:flags.18?<a href="/type/int">int</a> stats_dc:flags.12?<a href="/type/int">int</a> pts:<a href="/type/int">int</a> call:flags.21?<a href="/type/InputGroupCall">InputGroupCall</a> ttl_period:flags.24?<a href="/type/int">int</a> pending_suggestions:flags.25?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/string">string</a>&gt; groupcall_default_join_as:flags.26?<a href="/type/Peer">Peer</a> theme_emoticon:flags.27?<a href="/type/string">string</a> requests_pending:flags.28?<a href="/type/int">int</a> recent_requesters:flags.28?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/long">long</a>&gt; default_send_as:flags.29?<a href="/type/Peer">Peer</a> available_reactions:flags.30?<a href="/type/ChatReactions">ChatReactions</a> stories:flags2.4?<a href="/type/PeerStories">PeerStories</a> = <a href="/type/ChatFull">ChatFull</a>;<br>
<a href="/constructor/stats.broadcastStats">stats.broadcastStats</a>#396ca5fc period:<a href="/type/StatsDateRangeDays">StatsDateRangeDays</a> followers:<a href="/type/StatsAbsValueAndPrev">StatsAbsValueAndPrev</a> views_per_post:<a href="/type/StatsAbsValueAndPrev">StatsAbsValueAndPrev</a> shares_per_post:<a href="/type/StatsAbsValueAndPrev">StatsAbsValueAndPrev</a> reactions_per_post:<a href="/type/StatsAbsValueAndPrev">StatsAbsValueAndPrev</a> views_per_story:<a href="/type/StatsAbsValueAndPrev">StatsAbsValueAndPrev</a> shares_per_story:<a href="/type/StatsAbsValueAndPrev">StatsAbsValueAndPrev</a> reactions_per_story:<a href="/type/StatsAbsValueAndPrev">StatsAbsValueAndPrev</a> enabled_notifications:<a href="/type/StatsPercentValue">StatsPercentValue</a> growth_graph:<a href="/type/StatsGraph">StatsGraph</a> followers_graph:<a href="/type/StatsGraph">StatsGraph</a> mute_graph:<a href="/type/StatsGraph">StatsGraph</a> top_hours_graph:<a href="/type/StatsGraph">StatsGraph</a> interactions_graph:<a href="/type/StatsGraph">StatsGraph</a> iv_interactions_graph:<a href="/type/StatsGraph">StatsGraph</a> views_by_source_graph:<a href="/type/StatsGraph">StatsGraph</a> new_followers_by_source_graph:<a href="/type/StatsGraph">StatsGraph</a> languages_graph:<a href="/type/StatsGraph">StatsGraph</a> reactions_by_emotion_graph:<a href="/type/StatsGraph">StatsGraph</a> story_interactions_graph:<a href="/type/StatsGraph">StatsGraph</a> story_reactions_by_emotion_graph:<a href="/type/StatsGraph">StatsGraph</a> recent_posts_interactions:<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/PostInteractionCounters">PostInteractionCounters</a>&gt; = <a href="/type/stats.BroadcastStats">stats.BroadcastStats</a>;<br>
<a href="/constructor/messageReplyHeader">messageReplyHeader</a>#afbc09db flags:<a href="/type/%23">#</a> reply_to_scheduled:flags.2?<a href="/constructor/true">true</a> forum_topic:flags.3?<a href="/constructor/true">true</a> quote:flags.9?<a href="/constructor/true">true</a> reply_to_msg_id:flags.4?<a href="/type/int">int</a> reply_to_peer_id:flags.0?<a href="/type/Peer">Peer</a> reply_from:flags.5?<a href="/type/MessageFwdHeader">MessageFwdHeader</a> reply_media:flags.8?<a href="/type/MessageMedia">MessageMedia</a> reply_to_top_id:flags.1?<a href="/type/int">int</a> quote_text:flags.6?<a href="/type/string">string</a> quote_entities:flags.7?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/MessageEntity">MessageEntity</a>&gt; quote_offset:flags.10?<a href="/type/int">int</a> = <a href="/type/MessageReplyHeader">MessageReplyHeader</a>;<br>
<a href="/constructor/stats.messageStats">stats.messageStats</a>#7fe91c14 views_graph:<a href="/type/StatsGraph">StatsGraph</a> reactions_by_emotion_graph:<a href="/type/StatsGraph">StatsGraph</a> = <a href="/type/stats.MessageStats">stats.MessageStats</a>;
@ -196,13 +198,13 @@
<li>Added <a href="/constructor/inputStorePaymentPremiumGiftCode">inputStorePaymentPremiumGiftCode</a> - Used to gift <a href="/api/premium">Telegram Premium</a> subscriptions only to some specific subscribers of a channel or to some of our contacts, see <a href="/api/giveaways">here »</a> for more info on giveaways and gifts.</li>
<li>Added <a href="/constructor/inputStorePaymentPremiumGiveaway">inputStorePaymentPremiumGiveaway</a> - Used to pay for a <a href="/api/giveaways">giveaway, see here »</a> for more info.</li>
<li>Added <a href="/constructor/inputInvoicePremiumGiftCode">inputInvoicePremiumGiftCode</a> - Used if the user wishes to start a channel <a href="/api/giveaways">giveaway</a> or send some <a href="/api/giveaways">giftcodes</a> to members of a channel, in exchange for <a href="/api/boost">boosts</a>.</li>
<li>Added <a href="/constructor/premiumGiftCodeOption">premiumGiftCodeOption</a> - </li>
<li>Added <a href="/constructor/premiumGiftCodeOption">premiumGiftCodeOption</a> - Contains info about a <a href="/api/giveaways">giveaway/gift</a> option.</li>
<li>Added <a href="/constructor/payments.checkedGiftCode">payments.checkedGiftCode</a> - Contains info about a <a href="/api/links#premium-giftcode-links">Telegram Premium giftcode link</a>.</li>
<li>Added <a href="/constructor/messageMediaGiveaway">messageMediaGiveaway</a> - Contains info about a <a href="/api/giveaways">giveaway, see here »</a> for more info.</li>
<li>Added <a href="/constructor/messageActionGiftCode">messageActionGiftCode</a> - Contains a <a href="/api/links#premium-giftcode-links">Telegram Premium giftcode link</a>.</li>
<li>Added <a href="/constructor/messageActionGiveawayLaunch">messageActionGiveawayLaunch</a> - A <a href="/api/giveaways">giveaway</a> was started.</li>
<li>Added <a href="/constructor/payments.giveawayInfo">payments.giveawayInfo</a> - </li>
<li>Added <a href="/constructor/payments.giveawayInfoResults">payments.giveawayInfoResults</a> - </li>
<li>Added <a href="/constructor/payments.giveawayInfo">payments.giveawayInfo</a> - Contains info about an ongoing <a href="/api/giveaways">giveaway</a>.</li>
<li>Added <a href="/constructor/payments.giveawayInfoResults">payments.giveawayInfoResults</a> - A <a href="/api/giveaways">giveaway</a> has ended.</li>
<li>Added <a href="/constructor/messageEntityBlockquote">messageEntityBlockquote</a> - Message entity representing a block quote.</li>
<li>Added <a href="/constructor/prepaidGiveaway">prepaidGiveaway</a> - Contains info about a <a href="/api/giveaways">prepaid giveaway »</a>.</li>
<li>Added <a href="/constructor/inputMediaWebPage">inputMediaWebPage</a> - Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message.</li>
@ -449,7 +451,7 @@
<li>Added <strong>flags</strong>, <strong>date</strong> parameters in <a href="/constructor/updateReadMessagesContents">updateReadMessagesContents</a></li>
<li>Added <strong>close_friend</strong>, <strong>stories_hidden</strong>, <strong>stories_unavailable</strong>, <strong>stories_max_id</strong> parameters in <a href="/constructor/user">user</a></li>
<li>Added <strong>stories_hidden</strong>, <strong>stories_hidden_min</strong>, <strong>stories_unavailable</strong>, <strong>stories_max_id</strong> parameters in <a href="/constructor/channel">channel</a></li>
<li>Added <strong>stories_pinned_available</strong>, <strong>view_forum_as_messages</strong>, <strong>stories</strong> parameters in <a href="/constructor/channelFull">channelFull</a></li>
<li>Added <strong>stories_pinned_available</strong>, <strong>stories</strong> parameters in <a href="/constructor/channelFull">channelFull</a></li>
<li>Added <strong>terms_url</strong> parameter, removed <strong>recurring_terms_url</strong> parameter in <a href="/constructor/invoice">invoice</a></li>
<li>Added <strong>from_request</strong> parameter in <a href="/constructor/messageActionBotAllowed">messageActionBotAllowed</a></li>
<li>Added <strong>post_stories</strong>, <strong>edit_stories</strong>, <strong>delete_stories</strong> parameters in <a href="/constructor/chatAdminRights">chatAdminRights</a></li>
@ -520,7 +522,7 @@
<a href="/constructor/updateReadMessagesContents">updateReadMessagesContents</a>#f8227181 flags:<a href="/type/%23">#</a> messages:<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/int">int</a>&gt; pts:<a href="/type/int">int</a> pts_count:<a href="/type/int">int</a> date:flags.0?<a href="/type/int">int</a> = <a href="/type/Update">Update</a>;
<a href="/constructor/user">user</a>#abb5f120 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> = <a href="/type/User">User</a>;<br>
<a href="/constructor/channel">channel</a>#94f592db 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> = <a href="/type/Chat">Chat</a>;
<a href="/constructor/channelFull">channelFull</a>#723027bd flags:<a href="/type/%23">#</a> can_view_participants:flags.3?<a href="/constructor/true">true</a> can_set_username:flags.6?<a href="/constructor/true">true</a> can_set_stickers:flags.7?<a href="/constructor/true">true</a> hidden_prehistory:flags.10?<a href="/constructor/true">true</a> can_set_location:flags.16?<a href="/constructor/true">true</a> has_scheduled:flags.19?<a href="/constructor/true">true</a> can_view_stats:flags.20?<a href="/constructor/true">true</a> blocked:flags.22?<a href="/constructor/true">true</a> flags2:<a href="/type/%23">#</a> can_delete_channel:flags2.0?<a href="/constructor/true">true</a> antispam:flags2.1?<a href="/constructor/true">true</a> participants_hidden:flags2.2?<a href="/constructor/true">true</a> translations_disabled:flags2.3?<a href="/constructor/true">true</a> stories_pinned_available:flags2.5?<a href="/constructor/true">true</a> view_forum_as_messages:flags2.6?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> about:<a href="/type/string">string</a> participants_count:flags.0?<a href="/type/int">int</a> admins_count:flags.1?<a href="/type/int">int</a> kicked_count:flags.2?<a href="/type/int">int</a> banned_count:flags.2?<a href="/type/int">int</a> online_count:flags.13?<a href="/type/int">int</a> read_inbox_max_id:<a href="/type/int">int</a> read_outbox_max_id:<a href="/type/int">int</a> unread_count:<a href="/type/int">int</a> chat_photo:<a href="/type/Photo">Photo</a> notify_settings:<a href="/type/PeerNotifySettings">PeerNotifySettings</a> exported_invite:flags.23?<a href="/type/ExportedChatInvite">ExportedChatInvite</a> bot_info:<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/BotInfo">BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href="/type/long">long</a> migrated_from_max_id:flags.4?<a href="/type/int">int</a> pinned_msg_id:flags.5?<a href="/type/int">int</a> stickerset:flags.8?<a href="/type/StickerSet">StickerSet</a> available_min_id:flags.9?<a href="/type/int">int</a> folder_id:flags.11?<a href="/type/int">int</a> linked_chat_id:flags.14?<a href="/type/long">long</a> location:flags.15?<a href="/type/ChannelLocation">ChannelLocation</a> slowmode_seconds:flags.17?<a href="/type/int">int</a> slowmode_next_send_date:flags.18?<a href="/type/int">int</a> stats_dc:flags.12?<a href="/type/int">int</a> pts:<a href="/type/int">int</a> call:flags.21?<a href="/type/InputGroupCall">InputGroupCall</a> ttl_period:flags.24?<a href="/type/int">int</a> pending_suggestions:flags.25?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/string">string</a>&gt; groupcall_default_join_as:flags.26?<a href="/type/Peer">Peer</a> theme_emoticon:flags.27?<a href="/type/string">string</a> requests_pending:flags.28?<a href="/type/int">int</a> recent_requesters:flags.28?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/long">long</a>&gt; default_send_as:flags.29?<a href="/type/Peer">Peer</a> available_reactions:flags.30?<a href="/type/ChatReactions">ChatReactions</a> stories:flags2.4?<a href="/type/PeerStories">PeerStories</a> = <a href="/type/ChatFull">ChatFull</a>;<br>
<a href="/constructor/channelFull">channelFull</a>#723027bd flags:<a href="/type/%23">#</a> can_view_participants:flags.3?<a href="/constructor/true">true</a> can_set_username:flags.6?<a href="/constructor/true">true</a> can_set_stickers:flags.7?<a href="/constructor/true">true</a> hidden_prehistory:flags.10?<a href="/constructor/true">true</a> can_set_location:flags.16?<a href="/constructor/true">true</a> has_scheduled:flags.19?<a href="/constructor/true">true</a> can_view_stats:flags.20?<a href="/constructor/true">true</a> blocked:flags.22?<a href="/constructor/true">true</a> flags2:<a href="/type/%23">#</a> can_delete_channel:flags2.0?<a href="/constructor/true">true</a> antispam:flags2.1?<a href="/constructor/true">true</a> participants_hidden:flags2.2?<a href="/constructor/true">true</a> translations_disabled:flags2.3?<a href="/constructor/true">true</a> stories_pinned_available:flags2.5?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> about:<a href="/type/string">string</a> participants_count:flags.0?<a href="/type/int">int</a> admins_count:flags.1?<a href="/type/int">int</a> kicked_count:flags.2?<a href="/type/int">int</a> banned_count:flags.2?<a href="/type/int">int</a> online_count:flags.13?<a href="/type/int">int</a> read_inbox_max_id:<a href="/type/int">int</a> read_outbox_max_id:<a href="/type/int">int</a> unread_count:<a href="/type/int">int</a> chat_photo:<a href="/type/Photo">Photo</a> notify_settings:<a href="/type/PeerNotifySettings">PeerNotifySettings</a> exported_invite:flags.23?<a href="/type/ExportedChatInvite">ExportedChatInvite</a> bot_info:<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/BotInfo">BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href="/type/long">long</a> migrated_from_max_id:flags.4?<a href="/type/int">int</a> pinned_msg_id:flags.5?<a href="/type/int">int</a> stickerset:flags.8?<a href="/type/StickerSet">StickerSet</a> available_min_id:flags.9?<a href="/type/int">int</a> folder_id:flags.11?<a href="/type/int">int</a> linked_chat_id:flags.14?<a href="/type/long">long</a> location:flags.15?<a href="/type/ChannelLocation">ChannelLocation</a> slowmode_seconds:flags.17?<a href="/type/int">int</a> slowmode_next_send_date:flags.18?<a href="/type/int">int</a> stats_dc:flags.12?<a href="/type/int">int</a> pts:<a href="/type/int">int</a> call:flags.21?<a href="/type/InputGroupCall">InputGroupCall</a> ttl_period:flags.24?<a href="/type/int">int</a> pending_suggestions:flags.25?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/string">string</a>&gt; groupcall_default_join_as:flags.26?<a href="/type/Peer">Peer</a> theme_emoticon:flags.27?<a href="/type/string">string</a> requests_pending:flags.28?<a href="/type/int">int</a> recent_requesters:flags.28?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/long">long</a>&gt; default_send_as:flags.29?<a href="/type/Peer">Peer</a> available_reactions:flags.30?<a href="/type/ChatReactions">ChatReactions</a> stories:flags2.4?<a href="/type/PeerStories">PeerStories</a> = <a href="/type/ChatFull">ChatFull</a>;<br>
<a href="/constructor/invoice">invoice</a>#5db95a15 flags:<a href="/type/%23">#</a> test:flags.0?<a href="/constructor/true">true</a> name_requested:flags.1?<a href="/constructor/true">true</a> phone_requested:flags.2?<a href="/constructor/true">true</a> email_requested:flags.3?<a href="/constructor/true">true</a> shipping_address_requested:flags.4?<a href="/constructor/true">true</a> flexible:flags.5?<a href="/constructor/true">true</a> phone_to_provider:flags.6?<a href="/constructor/true">true</a> email_to_provider:flags.7?<a href="/constructor/true">true</a> recurring:flags.9?<a href="/constructor/true">true</a> currency:<a href="/type/string">string</a> prices:<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/LabeledPrice">LabeledPrice</a>&gt; max_tip_amount:flags.8?<a href="/type/long">long</a> suggested_tip_amounts:flags.8?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/long">long</a>&gt; terms_url:flags.10?<a href="/type/string">string</a> = <a href="/type/Invoice">Invoice</a>;<br>
<a href="/constructor/messageActionBotAllowed">messageActionBotAllowed</a>#c516d679 flags:<a href="/type/%23">#</a> attach_menu:flags.1?<a href="/constructor/true">true</a> from_request:flags.3?<a href="/constructor/true">true</a> domain:flags.0?<a href="/type/string">string</a> app:flags.2?<a href="/type/BotApp">BotApp</a> = <a href="/type/MessageAction">MessageAction</a>;<br>
<a href="/constructor/chatAdminRights">chatAdminRights</a>#5fb224d5 flags:<a href="/type/%23">#</a> change_info:flags.0?<a href="/constructor/true">true</a> post_messages:flags.1?<a href="/constructor/true">true</a> edit_messages:flags.2?<a href="/constructor/true">true</a> delete_messages:flags.3?<a href="/constructor/true">true</a> ban_users:flags.4?<a href="/constructor/true">true</a> invite_users:flags.5?<a href="/constructor/true">true</a> pin_messages:flags.7?<a href="/constructor/true">true</a> add_admins:flags.9?<a href="/constructor/true">true</a> anonymous:flags.10?<a href="/constructor/true">true</a> manage_call:flags.11?<a href="/constructor/true">true</a> other:flags.12?<a href="/constructor/true">true</a> manage_topics:flags.13?<a href="/constructor/true">true</a> post_stories:flags.14?<a href="/constructor/true">true</a> edit_stories:flags.15?<a href="/constructor/true">true</a> delete_stories:flags.16?<a href="/constructor/true">true</a> = <a href="/type/ChatAdminRights">ChatAdminRights</a>;<br>

View file

@ -205,7 +205,7 @@ Clients should display this message, along with a sticker from the <a href="/con
<p>Note that if the <code>premium_gift_attach_menu_icon</code> <a href="/api/config#client-configuration">app configuration parameter</a> is <code>true</code>, a gift icon should be shown in the attachment menu in private chats with users, offering the current user to gift a <a href="/api/premium">Telegram Premium</a> subscription to the other user in the chat. </p>
<p>If the <code>premium_gift_text_field_icon</code> parameter is also set, a gift icon should be shown in the text bar in private chats with users (ie like the <code>/</code> icon in chats with bots), offering the current user to gift a <a href="/api/premium">Telegram Premium</a> subscription to the other user in the chat. Can only be true if <code>premium_gift_attach_menu_icon</code> is also true.</p>
<p>Note that even if the <code>premium_gifts</code> field is not set, we can still gift one (or more!) Premium subscriptions using the alternative payment flow <a href="/api/giveaways">described here »</a> (<a href="/constructor/inputStorePaymentPremiumGiftCode">inputStorePaymentPremiumGiftCode</a> without setting <code>boost_peer</code>). </p>
<p>Gifting a <a href="/api/premium">Telegram Premium</a> subscription to another user will create <a href="/api/config#boosts-per-send-gift">boosts_per_sent_gift</a> <a href="/api/boost">boost slots »</a> for us, and one boost slot for the destination user. </p>
<p>Gifting a <a href="/api/premium">Telegram Premium</a> subscription to another user will create <a href="/api/config#boosts-per-sent-gift">boosts_per_sent_gift</a> <a href="/api/boost">boost slots »</a> for us, and one boost slot for the destination user. </p>
<h3><a class="anchor" href="#blocked-telegram-premium" id="blocked-telegram-premium" name="blocked-telegram-premium"><i class="anchor-icon"></i></a>Blocked Telegram Premium</h3>
<p>If the <code>premium_purchase_blocked</code> <a href="/api/config#client-configuration">app configuration parameter</a> is set, the user can't purchase a Premium account, and all Telegram Premium features must be hidden (like the <a href="#badge">badges</a> of Premium users, Telegram Premium purchase buttons, and so on).</p></div>

View file

@ -4,30 +4,10 @@
<meta charset="utf-8">
<title>payments.giveawayInfo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
participating
flags.0?true
 
preparing_results…">
<meta property="description" content="Contains info about an ongoing giveaway. If neither the participating, joined_too_early_date, admin_disallowed_chat_id or disallowed_country flags are set, the user is not currently participating in the giveaway but could participate by joining all the channels specified in the messageMediaGiveaway.channels field.">
<meta property="og:title" content="payments.giveawayInfo">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
participating
flags.0?true
 
preparing_results…">
<meta property="og:description" content="Contains info about an ongoing giveaway. If neither the participating, joined_too_early_date, admin_disallowed_chat_id or disallowed_country flags are set, the user is not currently participating in the giveaway but could participate by joining all the channels specified in the messageMediaGiveaway.channels field.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -62,7 +42,9 @@ preparing_results…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/payments.giveawayInfo" >payments.giveawayInfo</a></li></ul></div>
<h1 id="dev_page_title">payments.giveawayInfo</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Contains info about an ongoing <a href="/api/giveaways">giveaway</a>.</p>
<p>If neither the <code>participating</code>, <code>joined_too_early_date</code>, <code>admin_disallowed_chat_id</code> or <code>disallowed_country</code> flags are set, the user is not currently participating in the giveaway but could participate by joining all the channels specified in the <a href="/constructor/messageMediaGiveaway">messageMediaGiveaway</a>.<code>channels</code> field.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 167 <b class="caret"></b></a>
@ -93,37 +75,42 @@ preparing_results…">
<tr>
<td><strong>participating</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td> </td>
<td>The current user is participating in the giveaway.</td>
</tr>
<tr>
<td><strong>preparing_results</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/constructor/true">true</a></td>
<td> </td>
<td>If set, the giveaway has ended and the results are being prepared.</td>
</tr>
<tr>
<td><strong>start_date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>When was the giveaway started</td>
</tr>
<tr>
<td><strong>joined_too_early_date</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
<td> </td>
<td>The current user can't participate in the giveaway, because they were already a member of the channel when the giveaway started, and the <code>only_new_subscribers</code> was set when starting the giveaway.</td>
</tr>
<tr>
<td><strong>admin_disallowed_chat_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/long">long</a></td>
<td> </td>
<td>If set, the current user can't participate in the giveaway, because they are an administrator in one of the channels (ID specified in this flag) that created the giveaway.</td>
</tr>
<tr>
<td><strong>disallowed_country</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/string">string</a></td>
<td> </td>
<td>If set, the current user can't participate in this giveaway, because their phone number is from the specified disallowed country (specified as a two-letter ISO 3166-1 alpha-2 country code).</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/payments.GiveawayInfo">payments.GiveawayInfo</a></p></div>
<p><a href="/type/payments.GiveawayInfo">payments.GiveawayInfo</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#giveaways" id="giveaways" name="giveaways"><i class="anchor-icon"></i></a><a href="/api/giveaways">Giveaways</a></h4>
<p>Telegram <a href="/api/channel">channel</a> administrators may launch giveaways to randomly distribute <a href="/api/premium">Telegram Premium</a> subscriptions and other gifts among their followers, in exchange for <a href="/api/boost">boosts</a>.</p>
<h4><a class="anchor" href="#messagemediagiveaway" id="messagemediagiveaway" name="messagemediagiveaway"><i class="anchor-icon"></i></a><a href="/constructor/messageMediaGiveaway">messageMediaGiveaway</a></h4>
<p>Contains info about a <a href="/api/giveaways">giveaway, see here »</a> for more info.</p></div>
</div>

View file

@ -4,32 +4,10 @@
<meta charset="utf-8">
<title>payments.giveawayInfoResults</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A giveaway has ended.
Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
winner
flags.0?true
 
refunded…">
<meta property="description" content="A giveaway has ended.">
<meta property="og:title" content="payments.giveawayInfoResults">
<meta property="og:image" content="">
<meta property="og:description" content="A giveaway has ended.
Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
winner
flags.0?true
 
refunded…">
<meta property="og:description" content="A giveaway has ended.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -96,12 +74,12 @@ refunded…">
<tr>
<td><strong>winner</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td> </td>
<td>Whether we're one of the winners of this giveaway.</td>
</tr>
<tr>
<td><strong>refunded</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
<td> </td>
<td>Whether the giveaway was canceled and was fully refunded.</td>
</tr>
<tr>
<td><strong>start_date</strong></td>
@ -111,7 +89,7 @@ refunded…">
<tr>
<td><strong>gift_code_slug</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
<td> </td>
<td>If we're one of the winners of this giveaway, contains the <a href="/api/links#premium-giftcode-links">Premium gift code</a>, see <a href="/api/giveaways">here »</a> for more info on the full giveaway flow.</td>
</tr>
<tr>
<td><strong>finish_date</strong></td>
@ -121,17 +99,22 @@ refunded…">
<tr>
<td><strong>winners_count</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Number of winners in the giveaway</td>
</tr>
<tr>
<td><strong>activated_count</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Number of winners, which activated their <a href="/api/links#premium-giftcode-links">gift codes</a>.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/payments.GiveawayInfo">payments.GiveawayInfo</a></p></div>
<p><a href="/type/payments.GiveawayInfo">payments.GiveawayInfo</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
<p>Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.</p>
<h4><a class="anchor" href="#giveaways" id="giveaways" name="giveaways"><i class="anchor-icon"></i></a><a href="/api/giveaways">Giveaways</a></h4>
<p>Telegram <a href="/api/channel">channel</a> administrators may launch giveaways to randomly distribute <a href="/api/premium">Telegram Premium</a> subscriptions and other gifts among their followers, in exchange for <a href="/api/boost">boosts</a>.</p></div>
</div>

View file

@ -4,38 +4,10 @@
<meta charset="utf-8">
<title>premiumGiftCodeOption</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
users
int
 
months
int
 
store_product
flags.0?string…">
<meta property="description" content="Contains info about a giveaway/gift option.">
<meta property="og:title" content="premiumGiftCodeOption">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
users
int
 
months
int
 
store_product
flags.0?string…">
<meta property="og:description" content="Contains info about a giveaway/gift option.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -70,7 +42,8 @@ flags.0?string…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/premiumGiftCodeOption" >premiumGiftCodeOption</a></li></ul></div>
<h1 id="dev_page_title">premiumGiftCodeOption</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Contains info about a <a href="/api/giveaways">giveaway/gift</a> option.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 167 <b class="caret"></b></a>
@ -101,37 +74,43 @@ flags.0?string…">
<tr>
<td><strong>users</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Number of users which will be able to activate the gift codes.</td>
</tr>
<tr>
<td><strong>months</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Duration in months of each gifted <a href="/api/premium">Telegram Premium</a> subscription.</td>
</tr>
<tr>
<td><strong>store_product</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
<td> </td>
<td>Identifier of the store product associated with the option, official apps only.</td>
</tr>
<tr>
<td><strong>store_quantity</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
<td> </td>
<td>Number of times the store product must be paid</td>
</tr>
<tr>
<td><strong>currency</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td> </td>
<td>Three-letter ISO 4217 <a href="/bots/payments#supported-currencies">currency</a> code</td>
</tr>
<tr>
<td><strong>amount</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td> </td>
<td>Total price in the smallest units of the currency (integer, not float/double). For example, for a price of <code>US$ 1.45</code> pass <code>amount = 145</code>. See the exp parameter in <a href="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/PremiumGiftCodeOption">PremiumGiftCodeOption</a></p></div>
<p><a href="/type/PremiumGiftCodeOption">PremiumGiftCodeOption</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p>
<h4><a class="anchor" href="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</a></h4>
<h4><a class="anchor" href="#giveaways" id="giveaways" name="giveaways"><i class="anchor-icon"></i></a><a href="/api/giveaways">Giveaways</a></h4>
<p>Telegram <a href="/api/channel">channel</a> administrators may launch giveaways to randomly distribute <a href="/api/premium">Telegram Premium</a> subscriptions and other gifts among their followers, in exchange for <a href="/api/boost">boosts</a>.</p></div>
</div>

View file

@ -53,9 +53,9 @@
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
<!-- start req_pq_multi -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 08 DD 00 00 FC E9 85 65
0010 | 14 00 00 00 F1 8E 7E BE 18 9E 5D FD 0E 6A C8 14
0020 | 5A E0 53 B6 B0 B0 FE AD</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C0 B0 04 00 CD F2 85 65
0010 | 14 00 00 00 F1 8E 7E BE 9C 5D B4 46 2C 82 8D AA
0020 | DD 7A 65 6B AE F3 09 74</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
<table class="table">
@ -77,7 +77,7 @@
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>08DD0000FCE98565</code></td>
<td><code>C0B00400CDF28565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -95,7 +95,7 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>189E5DFD0E6AC8145AE053B6B0B0FEAD</code></td>
<td><code>9C5DB4462C828DAADD7A656BAEF30974</code></td>
<td>Random number</td>
</tr>
</tbody>
@ -104,11 +104,11 @@
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
<!-- start resPQ -->
<p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 14 54 F4 FC E9 85 65
0010 | B0 00 00 00 63 24 16 05 18 9E 5D FD 0E 6A C8 14
0020 | 5A E0 53 B6 B0 B0 FE AD 53 D8 C9 E6 C3 EE C9 29
0030 | BC 82 84 C2 00 37 4D 19 08 19 E2 B1 2F F3 F5 6D
0040 | DB 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 08 03 0A CE F2 85 65
0010 | A8 00 00 00 63 24 16 05 9C 5D B4 46 2C 82 8D AA
0020 | DD 7A 65 6B AE F3 09 74 4A CE B6 44 30 A5 23 BE
0030 | ED 33 B3 50 0F E8 9D 16 08 24 BC D1 82 BA 69 7B
0040 | 7D 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
0050 | 35 5F C3 0B 21 6B E8 6C 02 2B B4 C3 85 FD 64 DE
0060 | 85 1D 9D D0</code></pre>
<p>Payload (de)serialization:</p>
@ -132,13 +132,13 @@
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>011454F4FCE98565</code></td>
<td><code>0108030ACEF28565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>B0000000</code> (176 in decimal)</td>
<td><code>A8000000</code> (168 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>189E5DFD0E6AC8145AE053B6B0B0FEAD</code></td>
<td><code>9C5DB4462C828DAADD7A656BAEF30974</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>53D8C9E6C3EEC929BC8284C200374D19</code></td>
<td><code>4ACEB64430A523BEED33B3500FE89D16</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>0819E2B12FF3F56DDB000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1865248015199333851</td>
<td><code>0824BCD182BA697B7D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2647221040390437757</td>
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
</tr>
<tr>
@ -208,22 +208,22 @@
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p &lt; q.</h5>
<!-- start pq -->
<pre><code>pq = 1865248015199333851</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1865248015199333851 = 1360104203 * 1371400817</code></p>
<pre><code>p = 1360104203
q = 1371400817</code></pre>
<pre><code>pq = 2647221040390437757</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2647221040390437757 = 1501394959 * 1763174323</code></p>
<pre><code>p = 1501394959
q = 1763174323</code></pre>
<!-- end pq -->
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
<!-- start p_q_inner_data_dc -->
<p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 95 5F F5 A9 08 19 E2 B1 2F F3 F5 6D DB 00 00 00
0010 | 04 51 11 8B 0B 00 00 00 04 51 BD EA 71 00 00 00
0020 | 18 9E 5D FD 0E 6A C8 14 5A E0 53 B6 B0 B0 FE AD
0030 | 53 D8 C9 E6 C3 EE C9 29 BC 82 84 C2 00 37 4D 19
0040 | 98 09 E1 28 A2 07 99 22 A3 4A D1 63 6C 13 EC 96
0050 | 27 A4 14 39 27 CF 85 6F F4 BC B4 80 F7 65 DC 87
<pre><code>0000 | 95 5F F5 A9 08 24 BC D1 82 BA 69 7B 7D 00 00 00
0010 | 04 59 7D 78 0F 00 00 00 04 69 17 E7 B3 00 00 00
0020 | 9C 5D B4 46 2C 82 8D AA DD 7A 65 6B AE F3 09 74
0030 | 4A CE B6 44 30 A5 23 BE ED 33 B3 50 0F E8 9D 16
0040 | D7 9F B4 2D 36 4B EB 1A D2 A7 96 B0 27 6D 68 86
0050 | 35 60 34 A7 99 A8 FE 9C EB CF F4 0D 69 7C A5 C8
0060 | 02 00 00 00</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>p_q_inner_data_dc#a9f55f95 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data;</code></pre>
@ -246,37 +246,37 @@ q = 1371400817</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>0819E2B12FF3F56DDB000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1865248015199333851</td>
<td><code>0824BCD182BA697B7D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2647221040390437757</td>
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>p</td>
<td>16, 8</td>
<td><code>0451118B0B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1360104203</td>
<td><code>04597D780F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1501394959</td>
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>q</td>
<td>24, 8</td>
<td><code>0451BDEA71000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1371400817</td>
<td><code>046917E7B3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1763174323</td>
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>nonce</td>
<td>32, 16</td>
<td><code>189E5DFD0E6AC8145AE053B6B0B0FEAD</code></td>
<td><code>9C5DB4462C828DAADD7A656BAEF30974</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>53D8C9E6C3EEC929BC8284C200374D19</code></td>
<td><code>4ACEB64430A523BEED33B3500FE89D16</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>9809E128A2079922A34AD1636C13EC96</code> <code>27A4143927CF856FF4BCB480F765DC87</code></td>
<td><code>D79FB42D364BEB1AD2A796B0276D6886</code> <code>356034A799A8FE9CEBCFF40D697CA5C8</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1371400817</code></pre>
<p>The serialization of <em>P_Q_inner_data</em> produces <strong>data</strong>, which is used to generate <strong>encrypted_data</strong> as specified in <a href="/mtproto/auth_key">step 4.1</a>.<br>
These are the inputs to the algorithm specified in <a href="/mtproto/auth_key">step 4.1</a>:</p>
<!-- start p_q_inner_data_input -->
<pre><code>data = 955FF5A90819E2B12FF3F56DDB0000000451118B0B0000000451BDEA71000000189E5DFD0E6AC8145AE053B6B0B0FEAD53D8C9E6C3EEC929BC8284C200374D199809E128A2079922A34AD1636C13EC9627A4143927CF856FF4BCB480F765DC8702000000
random_padding_bytes = F1B99B993826203137EE714326EB604212EFAF4B4A4CEEBDB438E83BD6A9F4E1F67F4B90DF9DCDE98B728F05077D43EC959CA6156EF6170DDC99C66D99FE280D8218B0246E58524151003DDABEDD0BE2D2A40253B9DDB386B4DDE84D</code></pre>
<pre><code>data = 955FF5A90824BCD182BA697B7D00000004597D780F000000046917E7B30000009C5DB4462C828DAADD7A656BAEF309744ACEB64430A523BEED33B3500FE89D16D79FB42D364BEB1AD2A796B0276D6886356034A799A8FE9CEBCFF40D697CA5C802000000
random_padding_bytes = 0F245EB7D07E5BAEE500AE3342A1DBAA2A700F1D97D2687815F935723260EF853598345DB9C4C9EF77DAC58E584495F1D017A6023C39DFA5E2FD691FBF40317B81F4AB9057BBE0BC675239CF52BFD9CB8172F925754F7A9C70D6A008</code></pre>
<!-- end p_q_inner_data_input -->
<p>And this is the output:</p>
<!-- start p_q_inner_data_output -->
<pre><code>encrypted_data = 1F64F729F5C625295B90ED89A2814938FAD946F39E8DF77A0227524711C12E40F0796785D680C88326299B17421C2DBBDA9A9A9236A5F3510792DA02CDEC51E8F0AF64A81EB189BFE0F1EDDB5336EE023EA44D451E79422B13045000E7262813AF0829535CD09112651D652DE8B814876D6F44FD8056E25DA0CB9F253FFE43D448C16680DD07317AD5FCC696FCFA9E2EF0A0682BCBD16D5A166683E083D71483E2C9E596C9F9A2FA217EB9036CAC4DD603ACF9A90A79363E62D0A85AC980A90719B297DCD5B8414C0F4BF1EACEFBA4FBDBA3B1A293FAD696DBC46A6D9E26D891EBD50DA2D1CB3168EA0864FE7B85EDF555CB9CC78DABBA727F40893CD6E0C523</code></pre>
<pre><code>encrypted_data = 0C46CFFDF971091E85FB5DA6DB2F01F56301650805A0DBA8CC1CC5074BF40978A3813BCB5130F691A6D11561DCE21BD858F1FC45C294FA8DCE26C42C240CE6888A067539D6FF1A2F671029011B10288A9DE2569F3181F0D9C7BE15565E40A565B3BB8640861E6E7F7FF7DC878E2DFF5D53431C3C2333F65C32843EE004935AE0CC2BE9DAC48BF9879566E91961879AB8FD59F5593BFD12BF6869B33801127FB2124DEA7D1646D9F3204D088F94579E5007BC4BEFEC552E844275B7111EB4F5CA90785B9B7885BA1BBA9CC5264D41E34D1F07C14E53596EE3CF4A50FF3F0E22D1BEFE98511B5DAA766DA8642257A7A2262AE072DA5CA270701F2C11ED9957B69E</code></pre>
<!-- end p_q_inner_data_output -->
<p>The length of the final string is 256 bytes.</p>
<h5><a class="anchor" href="#5-send-req-dh-params-query-with-generated-encrypted-data" id="5-send-req-dh-params-query-with-generated-encrypted-data" name="5-send-req-dh-params-query-with-generated-encrypted-data"><i class="anchor-icon"></i></a>5) Send req_DH_params query with generated <code>encrypted_data</code></h5>
<!-- start req_DH_params -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 0C D0 0C 00 FD E9 85 65
0010 | 40 01 00 00 BE E4 12 D7 18 9E 5D FD 0E 6A C8 14
0020 | 5A E0 53 B6 B0 B0 FE AD 53 D8 C9 E6 C3 EE C9 29
0030 | BC 82 84 C2 00 37 4D 19 04 51 11 8B 0B 00 00 00
0040 | 04 51 BD EA 71 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 1F 64 F7 29 F5 C6 25 29 5B 90 ED 89
0060 | A2 81 49 38 FA D9 46 F3 9E 8D F7 7A 02 27 52 47
0070 | 11 C1 2E 40 F0 79 67 85 D6 80 C8 83 26 29 9B 17
0080 | 42 1C 2D BB DA 9A 9A 92 36 A5 F3 51 07 92 DA 02
0090 | CD EC 51 E8 F0 AF 64 A8 1E B1 89 BF E0 F1 ED DB
00A0 | 53 36 EE 02 3E A4 4D 45 1E 79 42 2B 13 04 50 00
00B0 | E7 26 28 13 AF 08 29 53 5C D0 91 12 65 1D 65 2D
00C0 | E8 B8 14 87 6D 6F 44 FD 80 56 E2 5D A0 CB 9F 25
00D0 | 3F FE 43 D4 48 C1 66 80 DD 07 31 7A D5 FC C6 96
00E0 | FC FA 9E 2E F0 A0 68 2B CB D1 6D 5A 16 66 83 E0
00F0 | 83 D7 14 83 E2 C9 E5 96 C9 F9 A2 FA 21 7E B9 03
0100 | 6C AC 4D D6 03 AC F9 A9 0A 79 36 3E 62 D0 A8 5A
0110 | C9 80 A9 07 19 B2 97 DC D5 B8 41 4C 0F 4B F1 EA
0120 | CE FB A4 FB DB A3 B1 A2 93 FA D6 96 DB C4 6A 6D
0130 | 9E 26 D8 91 EB D5 0D A2 D1 CB 31 68 EA 08 64 FE
0140 | 7B 85 ED F5 55 CB 9C C7 8D AB BA 72 7F 40 89 3C
0150 | D6 E0 C5 23</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 AC F7 01 00 CE F2 85 65
0010 | 40 01 00 00 BE E4 12 D7 9C 5D B4 46 2C 82 8D AA
0020 | DD 7A 65 6B AE F3 09 74 4A CE B6 44 30 A5 23 BE
0030 | ED 33 B3 50 0F E8 9D 16 04 59 7D 78 0F 00 00 00
0040 | 04 69 17 E7 B3 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 0C 46 CF FD F9 71 09 1E 85 FB 5D A6
0060 | DB 2F 01 F5 63 01 65 08 05 A0 DB A8 CC 1C C5 07
0070 | 4B F4 09 78 A3 81 3B CB 51 30 F6 91 A6 D1 15 61
0080 | DC E2 1B D8 58 F1 FC 45 C2 94 FA 8D CE 26 C4 2C
0090 | 24 0C E6 88 8A 06 75 39 D6 FF 1A 2F 67 10 29 01
00A0 | 1B 10 28 8A 9D E2 56 9F 31 81 F0 D9 C7 BE 15 56
00B0 | 5E 40 A5 65 B3 BB 86 40 86 1E 6E 7F 7F F7 DC 87
00C0 | 8E 2D FF 5D 53 43 1C 3C 23 33 F6 5C 32 84 3E E0
00D0 | 04 93 5A E0 CC 2B E9 DA C4 8B F9 87 95 66 E9 19
00E0 | 61 87 9A B8 FD 59 F5 59 3B FD 12 BF 68 69 B3 38
00F0 | 01 12 7F B2 12 4D EA 7D 16 46 D9 F3 20 4D 08 8F
0100 | 94 57 9E 50 07 BC 4B EF EC 55 2E 84 42 75 B7 11
0110 | 1E B4 F5 CA 90 78 5B 9B 78 85 BA 1B BA 9C C5 26
0120 | 4D 41 E3 4D 1F 07 C1 4E 53 59 6E E3 CF 4A 50 FF
0130 | 3F 0E 22 D1 BE FE 98 51 1B 5D AA 76 6D A8 64 22
0140 | 57 A7 A2 26 2A E0 72 DA 5C A2 70 70 1F 2C 11 ED
0150 | 99 57 B6 9E</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;</code></pre>
<table class="table">
@ -345,7 +345,7 @@ random_padding_bytes = F1B99B993826203137EE714326EB604212EFAF4B4A4CEEBDB438E83BD
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>0CD00C00FDE98565</code></td>
<td><code>ACF70100CEF28565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -363,25 +363,25 @@ random_padding_bytes = F1B99B993826203137EE714326EB604212EFAF4B4A4CEEBDB438E83BD
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>189E5DFD0E6AC8145AE053B6B0B0FEAD</code></td>
<td><code>9C5DB4462C828DAADD7A656BAEF30974</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>53D8C9E6C3EEC929BC8284C200374D19</code></td>
<td><code>4ACEB64430A523BEED33B3500FE89D16</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>0451118B0B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1360104203</td>
<td><code>04597D780F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1501394959</td>
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>q</td>
<td>64, 8</td>
<td><code>0451BDEA71000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1371400817</td>
<td><code>046917E7B3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1763174323</td>
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
@ -393,7 +393,7 @@ random_padding_bytes = F1B99B993826203137EE714326EB604212EFAF4B4A4CEEBDB438E83BD
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001001F64F729F5C625295B90ED89</code> <code>A2814938FAD946F39E8DF77A02275247</code> <code>11C12E40F0796785D680C88326299B17</code> <code>421C2DBBDA9A9A9236A5F3510792DA02</code> <code>CDEC51E8F0AF64A81EB189BFE0F1EDDB</code> <code>5336EE023EA44D451E79422B13045000</code> <code>E7262813AF0829535CD09112651D652D</code> <code>E8B814876D6F44FD8056E25DA0CB9F25</code> <code>3FFE43D448C16680DD07317AD5FCC696</code> <code>FCFA9E2EF0A0682BCBD16D5A166683E0</code> <code>83D71483E2C9E596C9F9A2FA217EB903</code> <code>6CAC4DD603ACF9A90A79363E62D0A85A</code> <code>C980A90719B297DCD5B8414C0F4BF1EA</code> <code>CEFBA4FBDBA3B1A293FAD696DBC46A6D</code> <code>9E26D891EBD50DA2D1CB3168EA0864FE</code> <code>7B85EDF555CB9CC78DABBA727F40893C</code><br> <code>D6E0C523</code></td>
<td><code>FE0001000C46CFFDF971091E85FB5DA6</code> <code>DB2F01F56301650805A0DBA8CC1CC507</code> <code>4BF40978A3813BCB5130F691A6D11561</code> <code>DCE21BD858F1FC45C294FA8DCE26C42C</code> <code>240CE6888A067539D6FF1A2F67102901</code> <code>1B10288A9DE2569F3181F0D9C7BE1556</code> <code>5E40A565B3BB8640861E6E7F7FF7DC87</code> <code>8E2DFF5D53431C3C2333F65C32843EE0</code> <code>04935AE0CC2BE9DAC48BF9879566E919</code> <code>61879AB8FD59F5593BFD12BF6869B338</code> <code>01127FB2124DEA7D1646D9F3204D088F</code> <code>94579E5007BC4BEFEC552E844275B711</code> <code>1EB4F5CA90785B9B7885BA1BBA9CC526</code> <code>4D41E34D1F07C14E53596EE3CF4A50FF</code> <code>3F0E22D1BEFE98511B5DAA766DA86422</code> <code>57A7A2262AE072DA5CA270701F2C11ED</code><br> <code>9957B69E</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = F1B99B993826203137EE714326EB604212EFAF4B4A4CEEBDB438E83BD
<h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5>
<!-- start server_DH_params_ok -->
<p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C4 ED BC FD E9 85 65
0010 | F0 02 00 00 5C 07 E8 D0 18 9E 5D FD 0E 6A C8 14
0020 | 5A E0 53 B6 B0 B0 FE AD 53 D8 C9 E6 C3 EE C9 29
0030 | BC 82 84 C2 00 37 4D 19 FE 50 02 00 49 90 94 4E
0040 | 5D F7 F7 1E 3A DF 19 44 8A 7C 01 AE 8B 58 77 64
0050 | 45 B7 78 84 4A 7A 4C 2B FD F9 60 CC A6 A7 C2 23
0060 | A2 1D 65 B3 E4 90 EC 38 D1 6E 47 CA 68 B1 A3 15
0070 | 91 D8 F7 33 0A 82 EF 64 D1 21 B2 5D E6 E4 11 56
0080 | 5F C7 13 F0 24 10 45 89 F7 33 AA 30 F7 4A D9 86
0090 | 99 05 74 DB 20 C3 24 2E E8 96 F9 68 23 3D 97 D8
00A0 | 83 FB 20 96 6F C8 D9 72 CD 3F 28 E3 B1 45 1B 9A
00B0 | 11 43 53 81 59 86 5A 1E 3A 00 5C 36 DA 95 97 DA
00C0 | 16 79 2E AC A0 D8 0E ED 34 2A 8E 96 E9 D3 C9 8E
00D0 | B2 A5 15 20 DC 51 67 7A C4 5F 76 8A 5C 7E 87 9A
00E0 | 67 8A 87 3D 61 AD 3A 5E 74 95 D2 AA 05 1B 56 09
00F0 | 4E 45 BB D9 AA 03 D8 EB 25 32 B8 85 C3 2A E5 65
0100 | 7A E0 16 2C 3E 0A 47 80 96 1D 3B D5 A1 7D 67 E8
0110 | A6 FA BB 2A 86 FA B6 12 8A D9 EC 1F 05 2E 72 CF
0120 | BF 9B 40 C3 15 1D 4C 40 2F DD 5E FA 7B 69 EF 25
0130 | B4 FF 73 C1 19 D9 12 89 6A 90 B7 3C 81 00 91 EE
0140 | A4 47 57 51 D2 AB 51 9A FA AA 21 AB B2 DD CE 35
0150 | 3F C8 84 F3 10 24 7E 06 30 7F 13 49 34 A9 FF D3
0160 | BC 03 12 5B B2 29 7A 5C 46 7B 2F 13 EC 2E AF E7
0170 | 35 DE 0E 07 28 98 EF 6C AB E5 7D D6 51 6C F8 87
0180 | 3E 8F 5D 1B 64 D9 52 72 4B D0 C4 6F B3 C3 12 07
0190 | DE 30 DB 90 04 19 0A 00 60 28 00 7B 22 10 D1 7E
01A0 | 7F 10 2D 07 D3 12 8D C4 FB 21 DA E6 6C 6C FC 1A
01B0 | 07 53 94 16 4B 4A FE 5E E4 C4 7F 44 DC 62 91 3D
01C0 | 35 42 88 26 97 0D 0E 01 7D CF 93 04 C9 F3 78 3D
01D0 | 76 28 05 73 BB EC EC 3D 1B 5E CD D3 F5 16 BA 5D
01E0 | 96 3C 05 EE 87 FA C8 1E A5 82 4A C4 6A 67 55 C1
01F0 | 08 12 58 23 08 94 9E F7 45 2E 62 87 49 07 A5 26
0200 | A3 D4 02 4C A8 8F 2F 06 4B 36 AB F9 D8 F3 C4 EA
0210 | 3F 5B 5D 4B 3A C2 33 C1 93 AA 24 62 0F DE 7B BC
0220 | 1A 6C 4D B6 F5 11 A3 F0 2D BE E6 AB CF B3 89 B9
0230 | 66 2F 4C 68 D4 86 01 9E 57 34 F1 83 63 4B DA C0
0240 | 24 C0 88 DA 08 29 79 32 AC 85 87 69 AB B2 C9 35
0250 | 10 A4 0F 73 C3 07 60 62 0D 63 12 26 3A A0 BF 29
0260 | AA C0 41 E4 6E F9 C0 2A AB 1B 80 23 4F 42 F8 E0
0270 | 53 CE 04 64 6B 4D AC 98 8A 17 24 E9 E0 E7 A2 4F
0280 | 51 1D 44 41 E0 E7 BE AC 8C A0 94 AB</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 AC 54 C7 CE F2 85 65
0010 | DC 02 00 00 5C 07 E8 D0 9C 5D B4 46 2C 82 8D AA
0020 | DD 7A 65 6B AE F3 09 74 4A CE B6 44 30 A5 23 BE
0030 | ED 33 B3 50 0F E8 9D 16 FE 50 02 00 F4 74 95 52
0040 | B8 2F C1 25 08 C1 60 11 4A 3F 57 77 0D 20 14 D1
0050 | 44 A6 AC 37 46 30 A3 03 6D 21 84 DA 8C AA D5 38
0060 | D2 54 7E 77 A0 5F 59 A1 AB 4B B1 80 BD 37 BD 9E
0070 | 0A 7A E4 F9 B5 DB 88 59 5C 7B 6F A6 39 8D 4A 94
0080 | EF 58 6F BE 28 9B 9D 87 3A 06 74 08 13 73 C2 87
0090 | 63 F8 91 86 0A 8C 91 68 25 FF 0E 0F 5C 99 C3 FB
00A0 | AF 45 4B EF 9C F2 BD C6 2F DD B8 4B 63 02 B3 51
00B0 | 2E 77 38 A7 E5 67 75 59 21 9F 9A 23 2B 8E 98 07
00C0 | 35 32 F5 47 E4 3E DA CA 37 DF 9D 8B B6 A0 90 54
00D0 | F3 33 44 75 F1 02 FF 37 82 E7 C6 5A 46 A8 F9 C6
00E0 | 1A D4 94 D1 C6 12 C3 C9 FA 57 DE 42 6C B1 E5 EC
00F0 | E5 8A 92 E1 1E 58 8A 5B 2F 07 0E 8D 65 B7 4D 25
0100 | C8 A5 35 C0 21 DA 4A FF 44 30 8E 4C AB 7A 6E 93
0110 | 1F 8A C5 99 A3 B4 7C 11 C5 09 EB 89 76 A7 9F 33
0120 | 64 7B 25 C1 25 60 04 BC 00 FE FE 95 EC AB D0 FC
0130 | 75 1E 66 BA E7 7C 88 DE 40 46 C8 36 E0 78 58 4C
0140 | 0B 63 95 D7 A0 62 F5 B5 06 36 A5 0B 3D 6D 61 9B
0150 | B5 23 EC 71 97 F0 10 53 67 83 18 3F 6C CB 56 02
0160 | 2B 46 12 AC BD CC 30 B3 F8 17 B0 2E CD 26 2A 5A
0170 | 43 5E D9 B0 7A 9B D2 ED D6 46 1F C9 06 20 F3 E2
0180 | 59 FC FE 08 95 64 F0 9F 21 66 38 05 89 7E 43 83
0190 | 7B 1A 8D FE 65 E9 DE 55 63 85 15 EF 3C B7 B2 27
01A0 | 29 93 67 5B C7 7D 9E EC 08 26 5F A3 BA EA 7A 86
01B0 | 30 67 9D F1 FD 56 79 4F D7 9A 13 70 34 32 86 E2
01C0 | 10 91 27 A8 90 B7 07 0E A2 42 BB 9A 88 7C CC 7E
01D0 | 16 E4 54 2A 61 90 23 F6 8C F9 B7 F2 5D 6E 3E EC
01E0 | 6C CD 44 FF 8D 90 80 7D BD 2C 78 04 F6 1F EF EF
01F0 | E0 A8 FF 85 09 CE BC 1C 3F 54 CE 1D 7A 1E C6 D9
0200 | 09 B5 39 89 20 DE 35 A0 18 22 F7 FE C0 E3 55 DF
0210 | E6 B7 97 89 F4 C2 98 D5 02 0E 91 35 EE ED 5D B8
0220 | D7 43 53 4B 2D C9 86 D7 0C 59 A6 36 94 E6 10 1B
0230 | 71 63 6A DC F3 4E DA 44 19 43 53 8A 88 AD 1F ED
0240 | 9A F2 19 94 1D 57 44 2E E9 B9 D9 79 45 DB 59 4D
0250 | A1 38 F1 27 95 B9 41 2E F9 BD D0 51 5B 9F 7B DE
0260 | DC 9F B8 26 6A 55 74 35 BB D3 45 45 63 A1 79 53
0270 | 5E DB 48 DD 0F 0B 22 6D EE 93 87 E1 63 A2 4B F7
0280 | 03 E3 6D A1 D9 60 52 9A 41 1A D4 3E</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
<table class="table">
@ -464,13 +464,13 @@ random_padding_bytes = F1B99B993826203137EE714326EB604212EFAF4B4A4CEEBDB438E83BD
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01C4EDBCFDE98565</code></td>
<td><code>01AC54C7CEF28565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>F0020000</code> (752 in decimal)</td>
<td><code>DC020000</code> (732 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = F1B99B993826203137EE714326EB604212EFAF4B4A4CEEBDB438E83BD
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>189E5DFD0E6AC8145AE053B6B0B0FEAD</code></td>
<td><code>9C5DB4462C828DAADD7A656BAEF30974</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>53D8C9E6C3EEC929BC8284C200374D19</code></td>
<td><code>4ACEB64430A523BEED33B3500FE89D16</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE5002004990944E5DF7F71E3ADF1944</code> <code>8A7C01AE8B58776445B778844A7A4C2B</code> <code>FDF960CCA6A7C223A21D65B3E490EC38</code> <code>D16E47CA68B1A31591D8F7330A82EF64</code> <code>D121B25DE6E411565FC713F024104589</code> <code>F733AA30F74AD986990574DB20C3242E</code> <code>E896F968233D97D883FB20966FC8D972</code> <code>CD3F28E3B1451B9A1143538159865A1E</code> <code>3A005C36DA9597DA16792EACA0D80EED</code> <code>342A8E96E9D3C98EB2A51520DC51677A</code> <code>C45F768A5C7E879A678A873D61AD3A5E</code> <code>7495D2AA051B56094E45BBD9AA03D8EB</code> <code>2532B885C32AE5657AE0162C3E0A4780</code> <code>961D3BD5A17D67E8A6FABB2A86FAB612</code> <code>8AD9EC1F052E72CFBF9B40C3151D4C40</code> <code>2FDD5EFA7B69EF25B4FF73C119D91289</code> <code>6A90B73C810091EEA4475751D2AB519A</code> <code>FAAA21ABB2DDCE353FC884F310247E06</code> <code>307F134934A9FFD3BC03125BB2297A5C</code> <code>467B2F13EC2EAFE735DE0E072898EF6C</code> <code>ABE57DD6516CF8873E8F5D1B64D95272</code> <code>4BD0C46FB3C31207DE30DB9004190A00</code> <code>6028007B2210D17E7F102D07D3128DC4</code> <code>FB21DAE66C6CFC1A075394164B4AFE5E</code> <code>E4C47F44DC62913D35428826970D0E01</code> <code>7DCF9304C9F3783D76280573BBECEC3D</code> <code>1B5ECDD3F516BA5D963C05EE87FAC81E</code> <code>A5824AC46A6755C10812582308949EF7</code> <code>452E62874907A526A3D4024CA88F2F06</code> <code>4B36ABF9D8F3C4EA3F5B5D4B3AC233C1</code> <code>93AA24620FDE7BBC1A6C4DB6F511A3F0</code> <code>2DBEE6ABCFB389B9662F4C68D486019E</code> <code>5734F183634BDAC024C088DA08297932</code> <code>AC858769ABB2C93510A40F73C3076062</code> <code>0D6312263AA0BF29AAC041E46EF9C02A</code> <code>AB1B80234F42F8E053CE04646B4DAC98</code> <code>8A1724E9E0E7A24F511D4441E0E7BEAC</code><br> <code>8CA094AB</code></td>
<td><code>FE500200F4749552B82FC12508C16011</code> <code>4A3F57770D2014D144A6AC374630A303</code> <code>6D2184DA8CAAD538D2547E77A05F59A1</code> <code>AB4BB180BD37BD9E0A7AE4F9B5DB8859</code> <code>5C7B6FA6398D4A94EF586FBE289B9D87</code> <code>3A0674081373C28763F891860A8C9168</code> <code>25FF0E0F5C99C3FBAF454BEF9CF2BDC6</code> <code>2FDDB84B6302B3512E7738A7E5677559</code> <code>219F9A232B8E98073532F547E43EDACA</code> <code>37DF9D8BB6A09054F3334475F102FF37</code> <code>82E7C65A46A8F9C61AD494D1C612C3C9</code> <code>FA57DE426CB1E5ECE58A92E11E588A5B</code> <code>2F070E8D65B74D25C8A535C021DA4AFF</code> <code>44308E4CAB7A6E931F8AC599A3B47C11</code> <code>C509EB8976A79F33647B25C1256004BC</code> <code>00FEFE95ECABD0FC751E66BAE77C88DE</code> <code>4046C836E078584C0B6395D7A062F5B5</code> <code>0636A50B3D6D619BB523EC7197F01053</code> <code>6783183F6CCB56022B4612ACBDCC30B3</code> <code>F817B02ECD262A5A435ED9B07A9BD2ED</code> <code>D6461FC90620F3E259FCFE089564F09F</code> <code>21663805897E43837B1A8DFE65E9DE55</code> <code>638515EF3CB7B2272993675BC77D9EEC</code> <code>08265FA3BAEA7A8630679DF1FD56794F</code> <code>D79A1370343286E2109127A890B7070E</code> <code>A242BB9A887CCC7E16E4542A619023F6</code> <code>8CF9B7F25D6E3EEC6CCD44FF8D90807D</code> <code>BD2C7804F61FEFEFE0A8FF8509CEBC1C</code> <code>3F54CE1D7A1EC6D909B5398920DE35A0</code> <code>1822F7FEC0E355DFE6B79789F4C298D5</code> <code>020E9135EEED5DB8D743534B2DC986D7</code> <code>0C59A63694E6101B71636ADCF34EDA44</code> <code>1943538A88AD1FED9AF219941D57442E</code> <code>E9B9D97945DB594DA138F12795B9412E</code> <code>F9BDD0515B9F7BDEDC9FB8266A557435</code> <code>BBD3454563A179535EDB48DD0F0B226D</code> <code>EE9387E163A24BF703E36DA1D960529A</code><br> <code>411AD43E</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = F1B99B993826203137EE714326EB604212EFAF4B4A4CEEBDB438E83BD
<!-- end server_DH_params_ok -->
<p>Decrypt <code>encrypted_answer</code> using the reverse of the process specified in <a href="/mtproto/auth_key#6-server-responds-with">step 6</a>:</p>
<!-- start server_DH_inner_data_input -->
<pre><code>encrypted_answer = 4990944E5DF7F71E3ADF19448A7C01AE8B58776445B778844A7A4C2BFDF960CCA6A7C223A21D65B3E490EC38D16E47CA68B1A31591D8F7330A82EF64D121B25DE6E411565FC713F024104589F733AA30F74AD986990574DB20C3242EE896F968233D97D883FB20966FC8D972CD3F28E3B1451B9A1143538159865A1E3A005C36DA9597DA16792EACA0D80EED342A8E96E9D3C98EB2A51520DC51677AC45F768A5C7E879A678A873D61AD3A5E7495D2AA051B56094E45BBD9AA03D8EB2532B885C32AE5657AE0162C3E0A4780961D3BD5A17D67E8A6FABB2A86FAB6128AD9EC1F052E72CFBF9B40C3151D4C402FDD5EFA7B69EF25B4FF73C119D912896A90B73C810091EEA4475751D2AB519AFAAA21ABB2DDCE353FC884F310247E06307F134934A9FFD3BC03125BB2297A5C467B2F13EC2EAFE735DE0E072898EF6CABE57DD6516CF8873E8F5D1B64D952724BD0C46FB3C31207DE30DB9004190A006028007B2210D17E7F102D07D3128DC4FB21DAE66C6CFC1A075394164B4AFE5EE4C47F44DC62913D35428826970D0E017DCF9304C9F3783D76280573BBECEC3D1B5ECDD3F516BA5D963C05EE87FAC81EA5824AC46A6755C10812582308949EF7452E62874907A526A3D4024CA88F2F064B36ABF9D8F3C4EA3F5B5D4B3AC233C193AA24620FDE7BBC1A6C4DB6F511A3F02DBEE6ABCFB389B9662F4C68D486019E5734F183634BDAC024C088DA08297932AC858769ABB2C93510A40F73C30760620D6312263AA0BF29AAC041E46EF9C02AAB1B80234F42F8E053CE04646B4DAC988A1724E9E0E7A24F511D4441E0E7BEAC8CA094AB
tmp_aes_key = CF537FDF9879314FFB2E219E429CB37756678D2AEB597079226589C313999341
tmp_aes_iv = 8E954BAA06C039F427BA6C8E77E1DA643CFBA6CBA2129FE6EEEDFD2A9809E128</code></pre>
<pre><code>encrypted_answer = F4749552B82FC12508C160114A3F57770D2014D144A6AC374630A3036D2184DA8CAAD538D2547E77A05F59A1AB4BB180BD37BD9E0A7AE4F9B5DB88595C7B6FA6398D4A94EF586FBE289B9D873A0674081373C28763F891860A8C916825FF0E0F5C99C3FBAF454BEF9CF2BDC62FDDB84B6302B3512E7738A7E5677559219F9A232B8E98073532F547E43EDACA37DF9D8BB6A09054F3334475F102FF3782E7C65A46A8F9C61AD494D1C612C3C9FA57DE426CB1E5ECE58A92E11E588A5B2F070E8D65B74D25C8A535C021DA4AFF44308E4CAB7A6E931F8AC599A3B47C11C509EB8976A79F33647B25C1256004BC00FEFE95ECABD0FC751E66BAE77C88DE4046C836E078584C0B6395D7A062F5B50636A50B3D6D619BB523EC7197F010536783183F6CCB56022B4612ACBDCC30B3F817B02ECD262A5A435ED9B07A9BD2EDD6461FC90620F3E259FCFE089564F09F21663805897E43837B1A8DFE65E9DE55638515EF3CB7B2272993675BC77D9EEC08265FA3BAEA7A8630679DF1FD56794FD79A1370343286E2109127A890B7070EA242BB9A887CCC7E16E4542A619023F68CF9B7F25D6E3EEC6CCD44FF8D90807DBD2C7804F61FEFEFE0A8FF8509CEBC1C3F54CE1D7A1EC6D909B5398920DE35A01822F7FEC0E355DFE6B79789F4C298D5020E9135EEED5DB8D743534B2DC986D70C59A63694E6101B71636ADCF34EDA441943538A88AD1FED9AF219941D57442EE9B9D97945DB594DA138F12795B9412EF9BDD0515B9F7BDEDC9FB8266A557435BBD3454563A179535EDB48DD0F0B226DEE9387E163A24BF703E36DA1D960529A411AD43E
tmp_aes_key = 5CAB113F1EDBB162419D290DC70DBB2623F09D0008371C0FA8F41D64A06042A8
tmp_aes_iv = CE463E10E70C3E8A3161858645E25D6482E420F9B8A7C7ED1225E3D3D79FB42D</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 2E1091F67B717BFE1238DFB01549A0059899F8E0BA0D89B5189E5DFD0E6AC8145AE053B6B0B0FEAD53D8C9E6C3EEC929BC8284C200374D1903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010024CD49B6D8668347B8F4FA18D3671B54F83CDE7D5F21C601EDA62AE9802120613779E02ED620C76D6A96C782031725EB5168FCA81D8FFC2ABA304B41470C3E5114D5A5A7A2AA53A5CBAA26B40ABAE18E9A04009627CD1A74A7A10ED4ECE9BFE8BFF975DACF64130821B767B36F169BF27167EBD7647CC100458879DC784AE18DB3CB4FF9862F0F3F88A1515434E0A716F75B972BD57C9AD082A640D096A6481412051DF94BBD1B68D4356655153D6666F5B1008094BB2DADC262F15C92C89733363CD524916B49E6E381F7C38CDD361D77FA59A136F19785EC744A002AE803D4A984B04B8EE975A45F148B53CE8743C41252F8D43DA2F98BEA692F7F3A3A8AB4FDE98565DD0DD30FDDB9F187
answer = BA0D89B5189E5DFD0E6AC8145AE053B6B0B0FEAD53D8C9E6C3EEC929BC8284C200374D1903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010024CD49B6D8668347B8F4FA18D3671B54F83CDE7D5F21C601EDA62AE9802120613779E02ED620C76D6A96C782031725EB5168FCA81D8FFC2ABA304B41470C3E5114D5A5A7A2AA53A5CBAA26B40ABAE18E9A04009627CD1A74A7A10ED4ECE9BFE8BFF975DACF64130821B767B36F169BF27167EBD7647CC100458879DC784AE18DB3CB4FF9862F0F3F88A1515434E0A716F75B972BD57C9AD082A640D096A6481412051DF94BBD1B68D4356655153D6666F5B1008094BB2DADC262F15C92C89733363CD524916B49E6E381F7C38CDD361D77FA59A136F19785EC744A002AE803D4A984B04B8EE975A45F148B53CE8743C41252F8D43DA2F98BEA692F7F3A3A8AB4FDE98565DD0DD30FDDB9F187</code></pre>
<pre><code>answer_with_hash = D1A1EC49DA7D0B6EE2015B74488278FD3488A08BBA0D89B59C5DB4462C828DAADD7A656BAEF309744ACEB64430A523BEED33B3500FE89D1603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001001BE5A94663F1D6C71CA2DE2EEA59BF06F2203E7F18EF6B79F3629C4629B7B167E71D96144945BB3C785906120A82F47578134A3B29181A17C0794662B429C70B1B81444BC8BF768C1D370F9A887481D35BA3A9FCABAECF98624B69BF52235D714E64F91DF56FEE32C7CFA33E3E12F9AB1AB4BAFB20ED0D39D2363BE67CBCB712A67CF967B0CAF2A597BBEC08CD4720F9A896E5888386C6ED92F6CE9CF94F753D8B5FB6AFFA0977C3B734E9DBB9399DF1F481415636676B9A3113AF23D6C694F17E73519445D97A16A1A9AB071F198E1F6892D4F7416CBB98D2F33A1B85254AC94E4F304065FD866B36DFA935177FA5E96C943A14440F9DC7CD854D379D3B29D9CEF28565DC44C36FAEB08A0B
answer = BA0D89B59C5DB4462C828DAADD7A656BAEF309744ACEB64430A523BEED33B3500FE89D1603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001001BE5A94663F1D6C71CA2DE2EEA59BF06F2203E7F18EF6B79F3629C4629B7B167E71D96144945BB3C785906120A82F47578134A3B29181A17C0794662B429C70B1B81444BC8BF768C1D370F9A887481D35BA3A9FCABAECF98624B69BF52235D714E64F91DF56FEE32C7CFA33E3E12F9AB1AB4BAFB20ED0D39D2363BE67CBCB712A67CF967B0CAF2A597BBEC08CD4720F9A896E5888386C6ED92F6CE9CF94F753D8B5FB6AFFA0977C3B734E9DBB9399DF1F481415636676B9A3113AF23D6C694F17E73519445D97A16A1A9AB071F198E1F6892D4F7416CBB98D2F33A1B85254AC94E4F304065FD866B36DFA935177FA5E96C943A14440F9DC7CD854D379D3B29D9CEF28565DC44C36FAEB08A0B</code></pre>
<!-- end server_DH_inner_data_output -->
<!-- start server_DH_inner_data -->
<p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | BA 0D 89 B5 18 9E 5D FD 0E 6A C8 14 5A E0 53 B6
0010 | B0 B0 FE AD 53 D8 C9 E6 C3 EE C9 29 BC 82 84 C2
0020 | 00 37 4D 19 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 9C 5D B4 46 2C 82 8D AA DD 7A 65 6B
0010 | AE F3 09 74 4A CE B6 44 30 A5 23 BE ED 33 B3 50
0020 | 0F E8 9D 16 03 00 00 00 FE 00 01 00 C7 1C AE B9
0030 | C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23
0040 | 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A
0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E
@ -532,23 +532,23 @@ answer = BA0D89B5189E5DFD0E6AC8145AE053B6B0B0FEAD53D8C9E6C3EEC929BC8284C200374D1
0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6
0110 | 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0
0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
0130 | 24 CD 49 B6 D8 66 83 47 B8 F4 FA 18 D3 67 1B 54
0140 | F8 3C DE 7D 5F 21 C6 01 ED A6 2A E9 80 21 20 61
0150 | 37 79 E0 2E D6 20 C7 6D 6A 96 C7 82 03 17 25 EB
0160 | 51 68 FC A8 1D 8F FC 2A BA 30 4B 41 47 0C 3E 51
0170 | 14 D5 A5 A7 A2 AA 53 A5 CB AA 26 B4 0A BA E1 8E
0180 | 9A 04 00 96 27 CD 1A 74 A7 A1 0E D4 EC E9 BF E8
0190 | BF F9 75 DA CF 64 13 08 21 B7 67 B3 6F 16 9B F2
01A0 | 71 67 EB D7 64 7C C1 00 45 88 79 DC 78 4A E1 8D
01B0 | B3 CB 4F F9 86 2F 0F 3F 88 A1 51 54 34 E0 A7 16
01C0 | F7 5B 97 2B D5 7C 9A D0 82 A6 40 D0 96 A6 48 14
01D0 | 12 05 1D F9 4B BD 1B 68 D4 35 66 55 15 3D 66 66
01E0 | F5 B1 00 80 94 BB 2D AD C2 62 F1 5C 92 C8 97 33
01F0 | 36 3C D5 24 91 6B 49 E6 E3 81 F7 C3 8C DD 36 1D
0200 | 77 FA 59 A1 36 F1 97 85 EC 74 4A 00 2A E8 03 D4
0210 | A9 84 B0 4B 8E E9 75 A4 5F 14 8B 53 CE 87 43 C4
0220 | 12 52 F8 D4 3D A2 F9 8B EA 69 2F 7F 3A 3A 8A B4
0230 | FD E9 85 65</code></pre>
0130 | 1B E5 A9 46 63 F1 D6 C7 1C A2 DE 2E EA 59 BF 06
0140 | F2 20 3E 7F 18 EF 6B 79 F3 62 9C 46 29 B7 B1 67
0150 | E7 1D 96 14 49 45 BB 3C 78 59 06 12 0A 82 F4 75
0160 | 78 13 4A 3B 29 18 1A 17 C0 79 46 62 B4 29 C7 0B
0170 | 1B 81 44 4B C8 BF 76 8C 1D 37 0F 9A 88 74 81 D3
0180 | 5B A3 A9 FC AB AE CF 98 62 4B 69 BF 52 23 5D 71
0190 | 4E 64 F9 1D F5 6F EE 32 C7 CF A3 3E 3E 12 F9 AB
01A0 | 1A B4 BA FB 20 ED 0D 39 D2 36 3B E6 7C BC B7 12
01B0 | A6 7C F9 67 B0 CA F2 A5 97 BB EC 08 CD 47 20 F9
01C0 | A8 96 E5 88 83 86 C6 ED 92 F6 CE 9C F9 4F 75 3D
01D0 | 8B 5F B6 AF FA 09 77 C3 B7 34 E9 DB B9 39 9D F1
01E0 | F4 81 41 56 36 67 6B 9A 31 13 AF 23 D6 C6 94 F1
01F0 | 7E 73 51 94 45 D9 7A 16 A1 A9 AB 07 1F 19 8E 1F
0200 | 68 92 D4 F7 41 6C BB 98 D2 F3 3A 1B 85 25 4A C9
0210 | 4E 4F 30 40 65 FD 86 6B 36 DF A9 35 17 7F A5 E9
0220 | 6C 94 3A 14 44 0F 9D C7 CD 85 4D 37 9D 3B 29 D9
0230 | CE F2 85 65</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
<table class="table">
@ -570,13 +570,13 @@ answer = BA0D89B5189E5DFD0E6AC8145AE053B6B0B0FEAD53D8C9E6C3EEC929BC8284C200374D1
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>189E5DFD0E6AC8145AE053B6B0B0FEAD</code></td>
<td><code>9C5DB4462C828DAADD7A656BAEF30974</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>53D8C9E6C3EEC929BC8284C200374D19</code></td>
<td><code>4ACEB64430A523BEED33B3500FE89D16</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B5189E5DFD0E6AC8145AE053B6B0B0FEAD53D8C9E6C3EEC929BC8284C200374D1
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE00010024CD49B6D8668347B8F4FA18</code> <code>D3671B54F83CDE7D5F21C601EDA62AE9</code> <code>802120613779E02ED620C76D6A96C782</code> <code>031725EB5168FCA81D8FFC2ABA304B41</code> <code>470C3E5114D5A5A7A2AA53A5CBAA26B4</code> <code>0ABAE18E9A04009627CD1A74A7A10ED4</code> <code>ECE9BFE8BFF975DACF64130821B767B3</code> <code>6F169BF27167EBD7647CC100458879DC</code> <code>784AE18DB3CB4FF9862F0F3F88A15154</code> <code>34E0A716F75B972BD57C9AD082A640D0</code> <code>96A6481412051DF94BBD1B68D4356655</code> <code>153D6666F5B1008094BB2DADC262F15C</code> <code>92C89733363CD524916B49E6E381F7C3</code> <code>8CDD361D77FA59A136F19785EC744A00</code> <code>2AE803D4A984B04B8EE975A45F148B53</code> <code>CE8743C41252F8D43DA2F98BEA692F7F</code><br> <code>3A3A8AB4</code></td>
<td><code>FE0001001BE5A94663F1D6C71CA2DE2E</code> <code>EA59BF06F2203E7F18EF6B79F3629C46</code> <code>29B7B167E71D96144945BB3C78590612</code> <code>0A82F47578134A3B29181A17C0794662</code> <code>B429C70B1B81444BC8BF768C1D370F9A</code> <code>887481D35BA3A9FCABAECF98624B69BF</code> <code>52235D714E64F91DF56FEE32C7CFA33E</code> <code>3E12F9AB1AB4BAFB20ED0D39D2363BE6</code> <code>7CBCB712A67CF967B0CAF2A597BBEC08</code> <code>CD4720F9A896E5888386C6ED92F6CE9C</code> <code>F94F753D8B5FB6AFFA0977C3B734E9DB</code> <code>B9399DF1F481415636676B9A3113AF23</code> <code>D6C694F17E73519445D97A16A1A9AB07</code> <code>1F198E1F6892D4F7416CBB98D2F33A1B</code> <code>85254AC94E4F304065FD866B36DFA935</code> <code>177FA5E96C943A14440F9DC7CD854D37</code><br> <code>9D3B29D9</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>FDE98565</code> (1703275005 in decimal)</td>
<td><code>CEF28565</code> (1703277262 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B5189E5DFD0E6AC8145AE053B6B0B0FEAD53D8C9E6C3EEC929BC8284C200374D1
<h5><a class="anchor" href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" id="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" name="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message"><i class="anchor-icon"></i></a>7) Client computes random 2048-bit number <em>b</em> (using a sufficient amount of entropy) and sends the server a message</h5>
<p>First, generate a secure random 2048-bit number b:</p>
<!-- start b -->
<pre><code>b = 80C01C6C35246EEE787F9FEA25B1FA1836E71B6EC710FE2080D0581FEEA7C3DA14B40A9787FDDE368250AD6459B482A61C5EC80EB69E45157443F11AC12606251079FCB2EAFEC2A4550759B8A1240A6D43AD853F8C02E1C29783DBE5FEE22F42DF61D12A29271A2597CA404AE11329EE0714DCBAEE2BEBDACC9200D773D9F6E6639F5B9BED0FBE8FE919842934971F591060BE5AC5C5E3864839872734AB8179D9BEB281F87E3047ED04DDF40A158017B22536BF2BBCD2759495CF1FA23C757EE02F2C7EEE9F04CA6CE1D6841EE004C3EAF2E2A18AE66B1E0FCE2C8FDB4A8DD3ABFD740E3B755D9B719D0DEA741782252922C576DCFC4F6D1184313BA28C3EE9</code></pre>
<pre><code>b = 1BBF3F304316CC3A5D73F8D6DB0052806F9A956D8F6E62845024A774C685A9B0A23F25BFF1ED9411D1B27F44D30F38F2BD590E31E172AE146F6FFD07EE4DBAF9DB1DA82835EE6282F19D4D0C25D5E0EBE30E2E8B1AD1064BBE97B1F0C82F70D8A8E78C03792496049B54EAD2DE2E988D87D4167D00DCFF2DEDD0D6E930D401F65EE15DECF29C99EDD08A587E865FAA3E3DEA7A79327859A461A6D42EF2F6B73F558CC7A007F803BE66EC6256327E0FCFEA6CBBC41E83B5C8E7D55ACAA3E789BCC002CC4ED0FFAD4478CFE9C4FEE04B939885C8F599A079D00B5212F5C95EDF4A521C13462DF851433B4276A112EF4F175C72D5DA63392C60ED4F4848480E6337</code></pre>
<!-- end b -->
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
<!-- start g_b -->
<pre><code>g_b = 0B6BAF090D24DE7CD22B6F4C1F9AC06AED68D3EF23DC60DC9BFDAF3A5EB1870F4E8DEC6AE2AD832904F3C3185FE2160347C4EBBEAD18DAB0CEFA78C7E13B17E8A2377FE54A2F9FFDEA51FF3953D309FC618E034FDCC300120DB9A75E2F62D68AF288164A38E2206EDCE2AB74D76886D0D5CA742F3C825AAE199AB606EBA20966C7BCB3811FB51988A9281428E46D00017D6C05A34DB9FB444181229BE40639BB964DD109DEC9998A83AD5D634B799F0ED323BB310BA0D2E4F76363418A3666655C086B6CFC71B9890D7ADFEB87B0B592C4A3506FEBF7730C9BE1DACE3E41B006870F41E9A4E89B4CFA672BC459D31BD34B1A18592B639DF2FFB4679C46559114</code></pre>
<pre><code>g_b = 86CF8091DA0A274BA7E1F79421E3C6F28BFFD4B0C099BACFDE680C53E47279039BB1E529E48CCBCC55E93CFF9E9698B52ED3D7B497022EAB231CD183E72DC5EAD6EBD23F7472902F004A5D6B8549BF8315F30B5DE3A3A7F5050811CADD186DE11BA26FB586959FE10CB553281AE97C5AE1FD180A9CEA6C54AC7F87E880B645B1D2BA3ABD6926E32077245189C38C870B3A03309CE3E4510B71B92B69B58811BD365931EEE8A78AFD64AC130B86A85584320575C6D45D9CEB043AA8D536E646B237F0C9E7F0459BA8FD0B93FD666F8A5A8F608F88C96A82A87CC7E0A25843CA4704E9572267CE44B37558FB86FD6C881AE541CCEDCB11392550B0933499D2EBFC</code></pre>
<!-- end g_b -->
<h6>7.1) generation of encrypted_data</h6>
<!-- start client_DH_inner_data -->
<p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 54 B6 43 66 18 9E 5D FD 0E 6A C8 14 5A E0 53 B6
0010 | B0 B0 FE AD 53 D8 C9 E6 C3 EE C9 29 BC 82 84 C2
0020 | 00 37 4D 19 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 0B 6B AF 09 0D 24 DE 7C D2 2B 6F 4C 1F 9A C0 6A
0040 | ED 68 D3 EF 23 DC 60 DC 9B FD AF 3A 5E B1 87 0F
0050 | 4E 8D EC 6A E2 AD 83 29 04 F3 C3 18 5F E2 16 03
0060 | 47 C4 EB BE AD 18 DA B0 CE FA 78 C7 E1 3B 17 E8
0070 | A2 37 7F E5 4A 2F 9F FD EA 51 FF 39 53 D3 09 FC
0080 | 61 8E 03 4F DC C3 00 12 0D B9 A7 5E 2F 62 D6 8A
0090 | F2 88 16 4A 38 E2 20 6E DC E2 AB 74 D7 68 86 D0
00A0 | D5 CA 74 2F 3C 82 5A AE 19 9A B6 06 EB A2 09 66
00B0 | C7 BC B3 81 1F B5 19 88 A9 28 14 28 E4 6D 00 01
00C0 | 7D 6C 05 A3 4D B9 FB 44 41 81 22 9B E4 06 39 BB
00D0 | 96 4D D1 09 DE C9 99 8A 83 AD 5D 63 4B 79 9F 0E
00E0 | D3 23 BB 31 0B A0 D2 E4 F7 63 63 41 8A 36 66 65
00F0 | 5C 08 6B 6C FC 71 B9 89 0D 7A DF EB 87 B0 B5 92
0100 | C4 A3 50 6F EB F7 73 0C 9B E1 DA CE 3E 41 B0 06
0110 | 87 0F 41 E9 A4 E8 9B 4C FA 67 2B C4 59 D3 1B D3
0120 | 4B 1A 18 59 2B 63 9D F2 FF B4 67 9C 46 55 91 14</code></pre>
<pre><code>0000 | 54 B6 43 66 9C 5D B4 46 2C 82 8D AA DD 7A 65 6B
0010 | AE F3 09 74 4A CE B6 44 30 A5 23 BE ED 33 B3 50
0020 | 0F E8 9D 16 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 86 CF 80 91 DA 0A 27 4B A7 E1 F7 94 21 E3 C6 F2
0040 | 8B FF D4 B0 C0 99 BA CF DE 68 0C 53 E4 72 79 03
0050 | 9B B1 E5 29 E4 8C CB CC 55 E9 3C FF 9E 96 98 B5
0060 | 2E D3 D7 B4 97 02 2E AB 23 1C D1 83 E7 2D C5 EA
0070 | D6 EB D2 3F 74 72 90 2F 00 4A 5D 6B 85 49 BF 83
0080 | 15 F3 0B 5D E3 A3 A7 F5 05 08 11 CA DD 18 6D E1
0090 | 1B A2 6F B5 86 95 9F E1 0C B5 53 28 1A E9 7C 5A
00A0 | E1 FD 18 0A 9C EA 6C 54 AC 7F 87 E8 80 B6 45 B1
00B0 | D2 BA 3A BD 69 26 E3 20 77 24 51 89 C3 8C 87 0B
00C0 | 3A 03 30 9C E3 E4 51 0B 71 B9 2B 69 B5 88 11 BD
00D0 | 36 59 31 EE E8 A7 8A FD 64 AC 13 0B 86 A8 55 84
00E0 | 32 05 75 C6 D4 5D 9C EB 04 3A A8 D5 36 E6 46 B2
00F0 | 37 F0 C9 E7 F0 45 9B A8 FD 0B 93 FD 66 6F 8A 5A
0100 | 8F 60 8F 88 C9 6A 82 A8 7C C7 E0 A2 58 43 CA 47
0110 | 04 E9 57 22 67 CE 44 B3 75 58 FB 86 FD 6C 88 1A
0120 | E5 41 CC ED CB 11 39 25 50 B0 93 34 99 D2 EB FC</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;</code></pre>
<table class="table">
@ -658,19 +658,19 @@ answer = BA0D89B5189E5DFD0E6AC8145AE053B6B0B0FEAD53D8C9E6C3EEC929BC8284C200374D1
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>189E5DFD0E6AC8145AE053B6B0B0FEAD</code></td>
<td><code>9C5DB4462C828DAADD7A656BAEF30974</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>53D8C9E6C3EEC929BC8284C200374D19</code></td>
<td><code>4ACEB64430A523BEED33B3500FE89D16</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE0001000B6BAF090D24DE7CD22B6F4C</code> <code>1F9AC06AED68D3EF23DC60DC9BFDAF3A</code> <code>5EB1870F4E8DEC6AE2AD832904F3C318</code> <code>5FE2160347C4EBBEAD18DAB0CEFA78C7</code> <code>E13B17E8A2377FE54A2F9FFDEA51FF39</code> <code>53D309FC618E034FDCC300120DB9A75E</code> <code>2F62D68AF288164A38E2206EDCE2AB74</code> <code>D76886D0D5CA742F3C825AAE199AB606</code> <code>EBA20966C7BCB3811FB51988A9281428</code> <code>E46D00017D6C05A34DB9FB444181229B</code> <code>E40639BB964DD109DEC9998A83AD5D63</code> <code>4B799F0ED323BB310BA0D2E4F7636341</code> <code>8A3666655C086B6CFC71B9890D7ADFEB</code> <code>87B0B592C4A3506FEBF7730C9BE1DACE</code> <code>3E41B006870F41E9A4E89B4CFA672BC4</code> <code>59D31BD34B1A18592B639DF2FFB4679C</code><br> <code>46559114</code></td>
<td><code>FE00010086CF8091DA0A274BA7E1F794</code> <code>21E3C6F28BFFD4B0C099BACFDE680C53</code> <code>E47279039BB1E529E48CCBCC55E93CFF</code> <code>9E9698B52ED3D7B497022EAB231CD183</code> <code>E72DC5EAD6EBD23F7472902F004A5D6B</code> <code>8549BF8315F30B5DE3A3A7F5050811CA</code> <code>DD186DE11BA26FB586959FE10CB55328</code> <code>1AE97C5AE1FD180A9CEA6C54AC7F87E8</code> <code>80B645B1D2BA3ABD6926E32077245189</code> <code>C38C870B3A03309CE3E4510B71B92B69</code> <code>B58811BD365931EEE8A78AFD64AC130B</code> <code>86A85584320575C6D45D9CEB043AA8D5</code> <code>36E646B237F0C9E7F0459BA8FD0B93FD</code> <code>666F8A5A8F608F88C96A82A87CC7E0A2</code> <code>5843CA4704E9572267CE44B37558FB86</code> <code>FD6C881AE541CCEDCB11392550B09334</code><br> <code>99D2EBFC</code></td>
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
</tr>
<tr>
@ -684,47 +684,47 @@ answer = BA0D89B5189E5DFD0E6AC8145AE053B6B0B0FEAD53D8C9E6C3EEC929BC8284C200374D1
<!-- end client_DH_inner_data -->
<p>The serialization of <em>Client_DH_Inner_Data</em> produces a string <strong>data</strong>. This is used to generate <strong>encrypted_data</strong> as specified in <a href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message">step 6</a>, using the following inputs:</p>
<!-- start client_DH_inner_data_input -->
<pre><code>data = 54B64366189E5DFD0E6AC8145AE053B6B0B0FEAD53D8C9E6C3EEC929BC8284C200374D190000000000000000FE0001000B6BAF090D24DE7CD22B6F4C1F9AC06AED68D3EF23DC60DC9BFDAF3A5EB1870F4E8DEC6AE2AD832904F3C3185FE2160347C4EBBEAD18DAB0CEFA78C7E13B17E8A2377FE54A2F9FFDEA51FF3953D309FC618E034FDCC300120DB9A75E2F62D68AF288164A38E2206EDCE2AB74D76886D0D5CA742F3C825AAE199AB606EBA20966C7BCB3811FB51988A9281428E46D00017D6C05A34DB9FB444181229BE40639BB964DD109DEC9998A83AD5D634B799F0ED323BB310BA0D2E4F76363418A3666655C086B6CFC71B9890D7ADFEB87B0B592C4A3506FEBF7730C9BE1DACE3E41B006870F41E9A4E89B4CFA672BC459D31BD34B1A18592B639DF2FFB4679C46559114
padding = 9F846C85D3C7DD330FECD76D
tmp_aes_key = CF537FDF9879314FFB2E219E429CB37756678D2AEB597079226589C313999341
tmp_aes_iv = 8E954BAA06C039F427BA6C8E77E1DA643CFBA6CBA2129FE6EEEDFD2A9809E128</code></pre>
<pre><code>data = 54B643669C5DB4462C828DAADD7A656BAEF309744ACEB64430A523BEED33B3500FE89D160000000000000000FE00010086CF8091DA0A274BA7E1F79421E3C6F28BFFD4B0C099BACFDE680C53E47279039BB1E529E48CCBCC55E93CFF9E9698B52ED3D7B497022EAB231CD183E72DC5EAD6EBD23F7472902F004A5D6B8549BF8315F30B5DE3A3A7F5050811CADD186DE11BA26FB586959FE10CB553281AE97C5AE1FD180A9CEA6C54AC7F87E880B645B1D2BA3ABD6926E32077245189C38C870B3A03309CE3E4510B71B92B69B58811BD365931EEE8A78AFD64AC130B86A85584320575C6D45D9CEB043AA8D536E646B237F0C9E7F0459BA8FD0B93FD666F8A5A8F608F88C96A82A87CC7E0A25843CA4704E9572267CE44B37558FB86FD6C881AE541CCEDCB11392550B0933499D2EBFC
padding = 53830E06631296991A05FD9C
tmp_aes_key = 5CAB113F1EDBB162419D290DC70DBB2623F09D0008371C0FA8F41D64A06042A8
tmp_aes_iv = CE463E10E70C3E8A3161858645E25D6482E420F9B8A7C7ED1225E3D3D79FB42D</code></pre>
<!-- end client_DH_inner_data_input -->
<p>Process:</p>
<pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16)
encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre>
<p>Output:</p>
<!-- start client_DH_inner_data_output -->
<pre><code>encrypted_data = 9F28C26255696EB825338D79912369103C7784D8C0B31EDA9EBD4962CBBEC508F3BAF2B1BDE659282DB2E16EA6C94DC6E7C42FDEB51004CEAB3812269A14D4C584E03D0D6DDBC19D900A469B11DDC9879235F2F74EB124C3D365C96F5B6B4B92729A760F724996129DD9202225B0F63B05690B3889D60FF553FD28EA57EFBDEB3E5EE6780CEC17503623FFD466DF8E2D4B74143501839B3E3E14005E7627EDA5D2D39872B600D324BF7C4804355D52ECD700B509524EB5C2DA2E791D2983A240F8908394985F78D0855BFBFF58C0961FED41B5FBBB4D2865EF58C62FBA6BE1F119B36FAA8481248C35266DE83D6388F777736A0731FF7C557464580DAF234532AEBA9A13BD8F7E3B6F6BD581BC9D16174016CBD141298210FC60B294129FA0F8D795FE6095BDDE307C212E5E95090EFDC7958CEEFD05DF8122714753B4642FD04A2981DE3A54DDB9B3FE4698C0093EA0</code></pre>
<pre><code>encrypted_data = FC0076BBF55CBF3D594C2106156CD12114ED5AFE9B6E1341105088404A5A467CA52A7395C1496DF78511E2170251B32321D6CE31CFD8762D16C9D85E43BFBBE89069ABBA6BDD742160FDAEE2A72BA51024A3E414D6356A2DEB3F1ADA8FEBF261CC510C9B5BAF0CAD5295C356746521EDBCD512F4A5DD62C61D27E4126D760FD85D0A1FC0A71F53162325FF09A0332B0820C6AC5266A1BEEFD36842BBA04926280C0E141FBA281D35A3B2677DB78AF8CCCF555434EE2409E323BBBC3CA4CA6D2AC6317ADED0E5956CB6C0B39B81221C0D747577CC508A835D378AFC716384720EFABC2BEABC2058B4081E3A37C3BE860D88FC656E3BAADF9A834DC895AA0E428AD9FB23693E0B886553ED3A828A1C9600958C84477A0A4598104E4539747775BDDD2692F7DF38A72EBC309886D38A3EDA99D0C2F3F11852B3533A49C6F2AEF50EC4BDDA11AD5F3D4792EDFFCBFDDA81C3</code></pre>
<!-- end client_DH_inner_data_output -->
<p>The length of the final string is 336 bytes.</p>
<h6>7.2) set_client_DH_params query</h6>
<!-- start set_client_DH_params -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 10 D0 0C 00 FD E9 85 65
0010 | 78 01 00 00 1F 5F 04 F5 18 9E 5D FD 0E 6A C8 14
0020 | 5A E0 53 B6 B0 B0 FE AD 53 D8 C9 E6 C3 EE C9 29
0030 | BC 82 84 C2 00 37 4D 19 FE 50 01 00 9F 28 C2 62
0040 | 55 69 6E B8 25 33 8D 79 91 23 69 10 3C 77 84 D8
0050 | C0 B3 1E DA 9E BD 49 62 CB BE C5 08 F3 BA F2 B1
0060 | BD E6 59 28 2D B2 E1 6E A6 C9 4D C6 E7 C4 2F DE
0070 | B5 10 04 CE AB 38 12 26 9A 14 D4 C5 84 E0 3D 0D
0080 | 6D DB C1 9D 90 0A 46 9B 11 DD C9 87 92 35 F2 F7
0090 | 4E B1 24 C3 D3 65 C9 6F 5B 6B 4B 92 72 9A 76 0F
00A0 | 72 49 96 12 9D D9 20 22 25 B0 F6 3B 05 69 0B 38
00B0 | 89 D6 0F F5 53 FD 28 EA 57 EF BD EB 3E 5E E6 78
00C0 | 0C EC 17 50 36 23 FF D4 66 DF 8E 2D 4B 74 14 35
00D0 | 01 83 9B 3E 3E 14 00 5E 76 27 ED A5 D2 D3 98 72
00E0 | B6 00 D3 24 BF 7C 48 04 35 5D 52 EC D7 00 B5 09
00F0 | 52 4E B5 C2 DA 2E 79 1D 29 83 A2 40 F8 90 83 94
0100 | 98 5F 78 D0 85 5B FB FF 58 C0 96 1F ED 41 B5 FB
0110 | BB 4D 28 65 EF 58 C6 2F BA 6B E1 F1 19 B3 6F AA
0120 | 84 81 24 8C 35 26 6D E8 3D 63 88 F7 77 73 6A 07
0130 | 31 FF 7C 55 74 64 58 0D AF 23 45 32 AE BA 9A 13
0140 | BD 8F 7E 3B 6F 6B D5 81 BC 9D 16 17 40 16 CB D1
0150 | 41 29 82 10 FC 60 B2 94 12 9F A0 F8 D7 95 FE 60
0160 | 95 BD DE 30 7C 21 2E 5E 95 09 0E FD C7 95 8C EE
0170 | FD 05 DF 81 22 71 47 53 B4 64 2F D0 4A 29 81 DE
0180 | 3A 54 DD B9 B3 FE 46 98 C0 09 3E A0</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 90 FE 0A 00 CE F2 85 65
0010 | 78 01 00 00 1F 5F 04 F5 9C 5D B4 46 2C 82 8D AA
0020 | DD 7A 65 6B AE F3 09 74 4A CE B6 44 30 A5 23 BE
0030 | ED 33 B3 50 0F E8 9D 16 FE 50 01 00 FC 00 76 BB
0040 | F5 5C BF 3D 59 4C 21 06 15 6C D1 21 14 ED 5A FE
0050 | 9B 6E 13 41 10 50 88 40 4A 5A 46 7C A5 2A 73 95
0060 | C1 49 6D F7 85 11 E2 17 02 51 B3 23 21 D6 CE 31
0070 | CF D8 76 2D 16 C9 D8 5E 43 BF BB E8 90 69 AB BA
0080 | 6B DD 74 21 60 FD AE E2 A7 2B A5 10 24 A3 E4 14
0090 | D6 35 6A 2D EB 3F 1A DA 8F EB F2 61 CC 51 0C 9B
00A0 | 5B AF 0C AD 52 95 C3 56 74 65 21 ED BC D5 12 F4
00B0 | A5 DD 62 C6 1D 27 E4 12 6D 76 0F D8 5D 0A 1F C0
00C0 | A7 1F 53 16 23 25 FF 09 A0 33 2B 08 20 C6 AC 52
00D0 | 66 A1 BE EF D3 68 42 BB A0 49 26 28 0C 0E 14 1F
00E0 | BA 28 1D 35 A3 B2 67 7D B7 8A F8 CC CF 55 54 34
00F0 | EE 24 09 E3 23 BB BC 3C A4 CA 6D 2A C6 31 7A DE
0100 | D0 E5 95 6C B6 C0 B3 9B 81 22 1C 0D 74 75 77 CC
0110 | 50 8A 83 5D 37 8A FC 71 63 84 72 0E FA BC 2B EA
0120 | BC 20 58 B4 08 1E 3A 37 C3 BE 86 0D 88 FC 65 6E
0130 | 3B AA DF 9A 83 4D C8 95 AA 0E 42 8A D9 FB 23 69
0140 | 3E 0B 88 65 53 ED 3A 82 8A 1C 96 00 95 8C 84 47
0150 | 7A 0A 45 98 10 4E 45 39 74 77 75 BD DD 26 92 F7
0160 | DF 38 A7 2E BC 30 98 86 D3 8A 3E DA 99 D0 C2 F3
0170 | F1 18 52 B3 53 3A 49 C6 F2 AE F5 0E C4 BD DA 11
0180 | AD 5F 3D 47 92 ED FF CB FD DA 81 C3</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;</code></pre>
<table class="table">
@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>10D00C00FDE98565</code></td>
<td><code>90FE0A00CEF28565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>189E5DFD0E6AC8145AE053B6B0B0FEAD</code></td>
<td><code>9C5DB4462C828DAADD7A656BAEF30974</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>53D8C9E6C3EEC929BC8284C200374D19</code></td>
<td><code>4ACEB64430A523BEED33B3500FE89D16</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE5001009F28C26255696EB825338D79</code> <code>912369103C7784D8C0B31EDA9EBD4962</code> <code>CBBEC508F3BAF2B1BDE659282DB2E16E</code> <code>A6C94DC6E7C42FDEB51004CEAB381226</code> <code>9A14D4C584E03D0D6DDBC19D900A469B</code> <code>11DDC9879235F2F74EB124C3D365C96F</code> <code>5B6B4B92729A760F724996129DD92022</code> <code>25B0F63B05690B3889D60FF553FD28EA</code> <code>57EFBDEB3E5EE6780CEC17503623FFD4</code> <code>66DF8E2D4B74143501839B3E3E14005E</code> <code>7627EDA5D2D39872B600D324BF7C4804</code> <code>355D52ECD700B509524EB5C2DA2E791D</code> <code>2983A240F8908394985F78D0855BFBFF</code> <code>58C0961FED41B5FBBB4D2865EF58C62F</code> <code>BA6BE1F119B36FAA8481248C35266DE8</code> <code>3D6388F777736A0731FF7C557464580D</code> <code>AF234532AEBA9A13BD8F7E3B6F6BD581</code> <code>BC9D16174016CBD141298210FC60B294</code> <code>129FA0F8D795FE6095BDDE307C212E5E</code> <code>95090EFDC7958CEEFD05DF8122714753</code> <code>B4642FD04A2981DE3A54DDB9B3FE4698</code><br> <code>C0093EA0</code></td>
<td><code>FE500100FC0076BBF55CBF3D594C2106</code> <code>156CD12114ED5AFE9B6E134110508840</code> <code>4A5A467CA52A7395C1496DF78511E217</code> <code>0251B32321D6CE31CFD8762D16C9D85E</code> <code>43BFBBE89069ABBA6BDD742160FDAEE2</code> <code>A72BA51024A3E414D6356A2DEB3F1ADA</code> <code>8FEBF261CC510C9B5BAF0CAD5295C356</code> <code>746521EDBCD512F4A5DD62C61D27E412</code> <code>6D760FD85D0A1FC0A71F53162325FF09</code> <code>A0332B0820C6AC5266A1BEEFD36842BB</code> <code>A04926280C0E141FBA281D35A3B2677D</code> <code>B78AF8CCCF555434EE2409E323BBBC3C</code> <code>A4CA6D2AC6317ADED0E5956CB6C0B39B</code> <code>81221C0D747577CC508A835D378AFC71</code> <code>6384720EFABC2BEABC2058B4081E3A37</code> <code>C3BE860D88FC656E3BAADF9A834DC895</code> <code>AA0E428AD9FB23693E0B886553ED3A82</code> <code>8A1C9600958C84477A0A4598104E4539</code> <code>747775BDDD2692F7DF38A72EBC309886</code> <code>D38A3EDA99D0C2F3F11852B3533A49C6</code> <code>F2AEF50EC4BDDA11AD5F3D4792EDFFCB</code><br> <code>FDDA81C3</code></td>
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
</tr>
</tbody>
@ -785,17 +785,17 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<h5><a class="anchor" href="#8-auth-key-generation" id="8-auth-key-generation" name="8-auth-key-generation"><i class="anchor-icon"></i></a>8) Auth key generation</h5>
<p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p>
<!-- start auth_key -->
<pre><code>auth_key = 86E125594578BDE4CBCB496A8F0DAF54B10C16893A48C9E92D340734CF0052DAD976AD808ADB14AB8C34A32D0D85E18588C43E5A859337792CC7729640230D367D60FFD71BCEB4A810FF8FD0EF0597A6DE4E71E0A487C1BDF1765BC7F5C9F78C8EF66E49291838021A522C3686772DA45F40760C7E3F371A6F47F48AE9AE5AFD93BFE63C156FC8651691AD40BCDB41D5A7C0A1596AD707C34BF61C8D5723F367FCEB198F321869E3E1D44A9EB433E8DD44625FA0511913FB74AFA6ACA6CC6A8842A9EB2032D6DE5822564F74F75B32972231932240C68EF463AD123DD93A34096010989213784A5F15DCA9B5D3CB25CF3AED9BEBDAB25271B9520C9EEA5B86EC</code></pre>
<pre><code>auth_key = 6A2F70B26798A4323CD53A9168827E05C0B239F1FBA8D760FDDC5CCD87C4D155E711ADA123FC71180E098F4DAFF3CFCA2B688B8A9451422FBA978F7AF034C69CC3EAA76EFB89400C81023E9F693D1B46751A86045B1E2C1F4AFDCCB28FA0E11351B8C90C140DB46D01D737598413FE71D9CC234D147D098D697A8A413D5CF767FEF491B14F16E70E201CE0FA3A2D841E20722250724DB947087676DE121A232E57063541E97826B18C81336546A99064EEA39A0C9D6F66645E1C58BE3D4C608B943D912E681E2BD5968AA1A0CEB91C523469B4ED9B76DD7171887117469D4EA8A73DF8504408CF9B81CF39B5EB6E23618CD13AF11719E47C82C8CBD45BC1AE5A</code></pre>
<!-- end auth_key -->
<h5><a class="anchor" href="#9-final-server-reply" id="9-final-server-reply" name="9-final-server-reply"><i class="anchor-icon"></i></a>9) Final server reply</h5>
<p>The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:</p>
<!-- start dh_gen_ok -->
<p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 6C 55 0F FE E9 85 65
0010 | AC 00 00 00 34 F7 CB 3B 18 9E 5D FD 0E 6A C8 14
0020 | 5A E0 53 B6 B0 B0 FE AD 53 D8 C9 E6 C3 EE C9 29
0030 | BC 82 84 C2 00 37 4D 19 EE DD 05 3D B1 27 BC 7C
0040 | 83 B0 CA 44 80 25 EA A9</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C8 99 17 CF F2 85 65
0010 | 44 00 00 00 34 F7 CB 3B 9C 5D B4 46 2C 82 8D AA
0020 | DD 7A 65 6B AE F3 09 74 4A CE B6 44 30 A5 23 BE
0030 | ED 33 B3 50 0F E8 9D 16 0A 98 EF F2 D3 F6 A6 BA
0040 | AE 59 DB BF C1 D5 EF 45</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;</code></pre>
<table class="table">
@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>016C550FFEE98565</code></td>
<td><code>01C89917CFF28565</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>AC000000</code> (172 in decimal)</td>
<td><code>44000000</code> (68 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>189E5DFD0E6AC8145AE053B6B0B0FEAD</code></td>
<td><code>9C5DB4462C828DAADD7A656BAEF30974</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>53D8C9E6C3EEC929BC8284C200374D19</code></td>
<td><code>4ACEB64430A523BEED33B3500FE89D16</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>EEDD053DB127BC7C83B0CA448025EAA9</code></td>
<td><code>0A98EFF2D3F6A6BAAE59DBBFC1D5EF45</code></td>
<td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td>
</tr>
</tbody>

View file

@ -67,7 +67,7 @@
<tbody>
<tr>
<td><a href="/constructor/premiumGiftCodeOption">premiumGiftCodeOption</a></td>
<td> </td>
<td>Contains info about a <a href="/api/giveaways">giveaway/gift</a> option.</td>
</tr>
</tbody>
</table>

View file

@ -72,11 +72,11 @@
<tbody>
<tr>
<td><a href="/constructor/payments.giveawayInfo">payments.giveawayInfo</a></td>
<td> </td>
<td>Contains info about an ongoing <a href="/api/giveaways">giveaway</a>.<br><br>If neither the <code>participating</code>, <code>joined_too_early_date</code>, <code>admin_disallowed_chat_id</code> or <code>disallowed_country</code> flags are set, the user is not currently participating in the giveaway but could participate by joining all the channels specified in the <a href="/constructor/messageMediaGiveaway">messageMediaGiveaway</a>.<code>channels</code> field.</td>
</tr>
<tr>
<td><a href="/constructor/payments.giveawayInfoResults">payments.giveawayInfoResults</a></td>
<td> </td>
<td>A <a href="/api/giveaways">giveaway</a> has ended.</td>
</tr>
</tbody>
</table>