mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-05 02:32:23 +01:00
Update content of files
This commit is contained in:
parent
f57eed7841
commit
5afcfb4142
13 changed files with 267 additions and 235 deletions
|
@ -497,12 +497,14 @@
|
|||
<ul>
|
||||
<li>Added <strong>quick_reply_shortcut_id</strong> parameter in <a href="/constructor/message">message</a></li>
|
||||
<li>Added <strong>flags2</strong>, <strong>business_work_hours</strong>, <strong>business_location</strong>, <strong>business_greeting_message</strong>, <strong>business_away_message</strong> parameters in <a href="/constructor/userFull">userFull</a></li>
|
||||
<li>Added <strong>bot_business</strong> parameter in <a href="/constructor/user">user</a></li>
|
||||
<li>Added <strong>color</strong> parameter in <a href="/constructor/dialogFilter">dialogFilter</a></li>
|
||||
<li>Added <strong>color</strong> parameter in <a href="/constructor/dialogFilterChatlist">dialogFilterChatlist</a></li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#schema" id="schema" name="schema"><i class="anchor-icon"></i></a>Schema</h4>
|
||||
<div><pre><code><a href="/constructor/message">message</a>#a66c7efc flags:<a href="/type/%23">#</a> out:flags.1?<a href="/constructor/true">true</a> mentioned:flags.4?<a href="/constructor/true">true</a> media_unread:flags.5?<a href="/constructor/true">true</a> silent:flags.13?<a href="/constructor/true">true</a> post:flags.14?<a href="/constructor/true">true</a> from_scheduled:flags.18?<a href="/constructor/true">true</a> legacy:flags.19?<a href="/constructor/true">true</a> edit_hide:flags.21?<a href="/constructor/true">true</a> pinned:flags.24?<a href="/constructor/true">true</a> noforwards:flags.26?<a href="/constructor/true">true</a> invert_media:flags.27?<a href="/constructor/true">true</a> id:<a href="/type/int">int</a> from_id:flags.8?<a href="/type/Peer">Peer</a> from_boosts_applied:flags.29?<a href="/type/int">int</a> peer_id:<a href="/type/Peer">Peer</a> saved_peer_id:flags.28?<a href="/type/Peer">Peer</a> fwd_from:flags.2?<a href="/type/MessageFwdHeader">MessageFwdHeader</a> via_bot_id:flags.11?<a href="/type/long">long</a> reply_to:flags.3?<a href="/type/MessageReplyHeader">MessageReplyHeader</a> date:<a href="/type/int">int</a> message:<a href="/type/string">string</a> media:flags.9?<a href="/type/MessageMedia">MessageMedia</a> reply_markup:flags.6?<a href="/type/ReplyMarkup">ReplyMarkup</a> entities:flags.7?<a href="/type/Vector%20t">Vector</a><<a href="/type/MessageEntity">MessageEntity</a>> views:flags.10?<a href="/type/int">int</a> forwards:flags.10?<a href="/type/int">int</a> replies:flags.23?<a href="/type/MessageReplies">MessageReplies</a> edit_date:flags.15?<a href="/type/int">int</a> post_author:flags.16?<a href="/type/string">string</a> grouped_id:flags.17?<a href="/type/long">long</a> reactions:flags.20?<a href="/type/MessageReactions">MessageReactions</a> restriction_reason:flags.22?<a href="/type/Vector%20t">Vector</a><<a href="/type/RestrictionReason">RestrictionReason</a>> ttl_period:flags.25?<a href="/type/int">int</a> quick_reply_shortcut_id:flags.30?<a href="/type/int">int</a> = <a href="/type/Message">Message</a>;<br>
|
||||
<a href="/constructor/userFull">userFull</a>#22ff3e85 flags:<a href="/type/%23">#</a> blocked:flags.0?<a href="/constructor/true">true</a> phone_calls_available:flags.4?<a href="/constructor/true">true</a> phone_calls_private:flags.5?<a href="/constructor/true">true</a> can_pin_message:flags.7?<a href="/constructor/true">true</a> has_scheduled:flags.12?<a href="/constructor/true">true</a> video_calls_available:flags.13?<a href="/constructor/true">true</a> voice_messages_forbidden:flags.20?<a href="/constructor/true">true</a> translations_disabled:flags.23?<a href="/constructor/true">true</a> stories_pinned_available:flags.26?<a href="/constructor/true">true</a> blocked_my_stories_from:flags.27?<a href="/constructor/true">true</a> wallpaper_overridden:flags.28?<a href="/constructor/true">true</a> contact_require_premium:flags.29?<a href="/constructor/true">true</a> read_dates_private:flags.30?<a href="/constructor/true">true</a> flags2:<a href="/type/%23">#</a> 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><<a href="/type/PremiumGiftOption">PremiumGiftOption</a>> wallpaper:flags.24?<a href="/type/WallPaper">WallPaper</a> stories:flags.25?<a href="/type/PeerStories">PeerStories</a> business_work_hours:flags2.0?<a href="/type/BusinessWorkHours">BusinessWorkHours</a> business_location:flags2.1?<a href="/type/BusinessLocation">BusinessLocation</a> business_greeting_message:flags2.2?<a href="/type/BusinessGreetingMessage">BusinessGreetingMessage</a> business_away_message:flags2.3?<a href="/type/BusinessAwayMessage">BusinessAwayMessage</a> = <a href="/type/UserFull">UserFull</a>;<br>
|
||||
<a href="/constructor/userFull">userFull</a>#22ff3e85 flags:<a href="/type/%23">#</a> blocked:flags.0?<a href="/constructor/true">true</a> phone_calls_available:flags.4?<a href="/constructor/true">true</a> phone_calls_private:flags.5?<a href="/constructor/true">true</a> can_pin_message:flags.7?<a href="/constructor/true">true</a> has_scheduled:flags.12?<a href="/constructor/true">true</a> video_calls_available:flags.13?<a href="/constructor/true">true</a> voice_messages_forbidden:flags.20?<a href="/constructor/true">true</a> translations_disabled:flags.23?<a href="/constructor/true">true</a> stories_pinned_available:flags.26?<a href="/constructor/true">true</a> blocked_my_stories_from:flags.27?<a href="/constructor/true">true</a> wallpaper_overridden:flags.28?<a href="/constructor/true">true</a> contact_require_premium:flags.29?<a href="/constructor/true">true</a> read_dates_private:flags.30?<a href="/constructor/true">true</a> flags2:<a href="/type/%23">#</a> 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><<a href="/type/PremiumGiftOption">PremiumGiftOption</a>> wallpaper:flags.24?<a href="/type/WallPaper">WallPaper</a> stories:flags.25?<a href="/type/PeerStories">PeerStories</a> business_work_hours:flags2.0?<a href="/type/BusinessWorkHours">BusinessWorkHours</a> business_location:flags2.1?<a href="/type/BusinessLocation">BusinessLocation</a> business_greeting_message:flags2.2?<a href="/type/BusinessGreetingMessage">BusinessGreetingMessage</a> business_away_message:flags2.3?<a href="/type/BusinessAwayMessage">BusinessAwayMessage</a> = <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> contact_require_premium:flags2.10?<a href="/constructor/true">true</a> bot_business:flags2.11?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> access_hash:flags.0?<a href="/type/long">long</a> first_name:flags.1?<a href="/type/string">string</a> last_name:flags.2?<a href="/type/string">string</a> username:flags.3?<a href="/type/string">string</a> phone:flags.4?<a href="/type/string">string</a> photo:flags.5?<a href="/type/UserProfilePhoto">UserProfilePhoto</a> status:flags.6?<a href="/type/UserStatus">UserStatus</a> bot_info_version:flags.14?<a href="/type/int">int</a> restriction_reason:flags.18?<a href="/type/Vector%20t">Vector</a><<a href="/type/RestrictionReason">RestrictionReason</a>> 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><<a href="/type/Username">Username</a>> 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/dialogFilter">dialogFilter</a>#5fb5523b flags:<a href="/type/%23">#</a> contacts:flags.0?<a href="/constructor/true">true</a> non_contacts:flags.1?<a href="/constructor/true">true</a> groups:flags.2?<a href="/constructor/true">true</a> broadcasts:flags.3?<a href="/constructor/true">true</a> bots:flags.4?<a href="/constructor/true">true</a> exclude_muted:flags.11?<a href="/constructor/true">true</a> exclude_read:flags.12?<a href="/constructor/true">true</a> exclude_archived:flags.13?<a href="/constructor/true">true</a> id:<a href="/type/int">int</a> title:<a href="/type/string">string</a> emoticon:flags.25?<a href="/type/string">string</a> color:flags.27?<a href="/type/int">int</a> pinned_peers:<a href="/type/Vector%20t">Vector</a><<a href="/type/InputPeer">InputPeer</a>> include_peers:<a href="/type/Vector%20t">Vector</a><<a href="/type/InputPeer">InputPeer</a>> exclude_peers:<a href="/type/Vector%20t">Vector</a><<a href="/type/InputPeer">InputPeer</a>> = <a href="/type/DialogFilter">DialogFilter</a>;
|
||||
<a href="/constructor/dialogFilterChatlist">dialogFilterChatlist</a>#9fe28ea4 flags:<a href="/type/%23">#</a> has_my_invites:flags.26?<a href="/constructor/true">true</a> id:<a href="/type/int">int</a> title:<a href="/type/string">string</a> emoticon:flags.25?<a href="/type/string">string</a> color:flags.27?<a href="/type/int">int</a> pinned_peers:<a href="/type/Vector%20t">Vector</a><<a href="/type/InputPeer">InputPeer</a>> include_peers:<a href="/type/Vector%20t">Vector</a><<a href="/type/InputPeer">InputPeer</a>> = <a href="/type/DialogFilter">DialogFilter</a>;<br>
|
||||
<a href="/constructor/smsjobs.eligibleToJoin">smsjobs.eligibleToJoin</a>#dc8b44cf terms_url:<a href="/type/string">string</a> monthly_sent_sms:<a href="/type/int">int</a> = <a href="/type/smsjobs.EligibilityToJoin">smsjobs.EligibilityToJoin</a>;
|
||||
|
@ -595,7 +597,7 @@
|
|||
<li>Added <strong>flags</strong>, <strong>by_me</strong> parameters in <a href="/constructor/userStatusRecently">userStatusRecently</a></li>
|
||||
<li>Added <strong>flags</strong>, <strong>by_me</strong> parameters in <a href="/constructor/userStatusLastWeek">userStatusLastWeek</a></li>
|
||||
<li>Added <strong>flags</strong>, <strong>by_me</strong> parameters in <a href="/constructor/userStatusLastMonth">userStatusLastMonth</a></li>
|
||||
<li>Added <strong>contact_require_premium</strong>, <strong>bot_business</strong> parameters in <a href="/constructor/user">user</a></li>
|
||||
<li>Added <strong>contact_require_premium</strong> parameter in <a href="/constructor/user">user</a></li>
|
||||
<li>Added <strong>boosts_applied</strong>, <strong>boosts_unrestrict</strong>, <strong>emojiset</strong> parameters in <a href="/constructor/channelFull">channelFull</a></li>
|
||||
<li>Added <strong>hide_read_marks</strong>, <strong>new_noncontact_peers_require_premium</strong> parameters in <a href="/constructor/globalPrivacySettings">globalPrivacySettings</a></li>
|
||||
<li>Added <strong>from_id</strong> parameter in <a href="/constructor/storyItem">storyItem</a></li>
|
||||
|
@ -609,7 +611,7 @@
|
|||
<a href="/constructor/userStatusRecently">userStatusRecently</a>#7b197dc8 flags:<a href="/type/%23">#</a> by_me:flags.0?<a href="/constructor/true">true</a> = <a href="/type/UserStatus">UserStatus</a>;
|
||||
<a href="/constructor/userStatusLastWeek">userStatusLastWeek</a>#541a1d1a flags:<a href="/type/%23">#</a> by_me:flags.0?<a href="/constructor/true">true</a> = <a href="/type/UserStatus">UserStatus</a>;
|
||||
<a href="/constructor/userStatusLastMonth">userStatusLastMonth</a>#65899777 flags:<a href="/type/%23">#</a> by_me:flags.0?<a href="/constructor/true">true</a> = <a href="/type/UserStatus">UserStatus</a>;
|
||||
<a href="/constructor/user">user</a>#215c4438 flags:<a href="/type/%23">#</a> self:flags.10?<a href="/constructor/true">true</a> contact:flags.11?<a href="/constructor/true">true</a> mutual_contact:flags.12?<a href="/constructor/true">true</a> deleted:flags.13?<a href="/constructor/true">true</a> bot:flags.14?<a href="/constructor/true">true</a> bot_chat_history:flags.15?<a href="/constructor/true">true</a> bot_nochats:flags.16?<a href="/constructor/true">true</a> verified:flags.17?<a href="/constructor/true">true</a> restricted:flags.18?<a href="/constructor/true">true</a> min:flags.20?<a href="/constructor/true">true</a> bot_inline_geo:flags.21?<a href="/constructor/true">true</a> support:flags.23?<a href="/constructor/true">true</a> scam:flags.24?<a href="/constructor/true">true</a> apply_min_photo:flags.25?<a href="/constructor/true">true</a> fake:flags.26?<a href="/constructor/true">true</a> bot_attach_menu:flags.27?<a href="/constructor/true">true</a> premium:flags.28?<a href="/constructor/true">true</a> attach_menu_enabled:flags.29?<a href="/constructor/true">true</a> flags2:<a href="/type/%23">#</a> bot_can_edit:flags2.1?<a href="/constructor/true">true</a> close_friend:flags2.2?<a href="/constructor/true">true</a> stories_hidden:flags2.3?<a href="/constructor/true">true</a> stories_unavailable:flags2.4?<a href="/constructor/true">true</a> contact_require_premium:flags2.10?<a href="/constructor/true">true</a> bot_business:flags2.11?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> access_hash:flags.0?<a href="/type/long">long</a> first_name:flags.1?<a href="/type/string">string</a> last_name:flags.2?<a href="/type/string">string</a> username:flags.3?<a href="/type/string">string</a> phone:flags.4?<a href="/type/string">string</a> photo:flags.5?<a href="/type/UserProfilePhoto">UserProfilePhoto</a> status:flags.6?<a href="/type/UserStatus">UserStatus</a> bot_info_version:flags.14?<a href="/type/int">int</a> restriction_reason:flags.18?<a href="/type/Vector%20t">Vector</a><<a href="/type/RestrictionReason">RestrictionReason</a>> 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><<a href="/type/Username">Username</a>> stories_max_id:flags2.5?<a href="/type/int">int</a> color:flags2.8?<a href="/type/PeerColor">PeerColor</a> profile_color:flags2.9?<a href="/type/PeerColor">PeerColor</a> = <a href="/type/User">User</a>;<br>
|
||||
<a href="/constructor/user">user</a>#215c4438 flags:<a href="/type/%23">#</a> self:flags.10?<a href="/constructor/true">true</a> contact:flags.11?<a href="/constructor/true">true</a> mutual_contact:flags.12?<a href="/constructor/true">true</a> deleted:flags.13?<a href="/constructor/true">true</a> bot:flags.14?<a href="/constructor/true">true</a> bot_chat_history:flags.15?<a href="/constructor/true">true</a> bot_nochats:flags.16?<a href="/constructor/true">true</a> verified:flags.17?<a href="/constructor/true">true</a> restricted:flags.18?<a href="/constructor/true">true</a> min:flags.20?<a href="/constructor/true">true</a> bot_inline_geo:flags.21?<a href="/constructor/true">true</a> support:flags.23?<a href="/constructor/true">true</a> scam:flags.24?<a href="/constructor/true">true</a> apply_min_photo:flags.25?<a href="/constructor/true">true</a> fake:flags.26?<a href="/constructor/true">true</a> bot_attach_menu:flags.27?<a href="/constructor/true">true</a> premium:flags.28?<a href="/constructor/true">true</a> attach_menu_enabled:flags.29?<a href="/constructor/true">true</a> flags2:<a href="/type/%23">#</a> bot_can_edit:flags2.1?<a href="/constructor/true">true</a> close_friend:flags2.2?<a href="/constructor/true">true</a> stories_hidden:flags2.3?<a href="/constructor/true">true</a> stories_unavailable:flags2.4?<a href="/constructor/true">true</a> contact_require_premium:flags2.10?<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><<a href="/type/RestrictionReason">RestrictionReason</a>> 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><<a href="/type/Username">Username</a>> 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/channelFull">channelFull</a>#44c054a7 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><<a href="/type/BotInfo">BotInfo</a>> 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><<a href="/type/string">string</a>> 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><<a href="/type/long">long</a>> 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> wallpaper:flags2.7?<a href="/type/WallPaper">WallPaper</a> boosts_applied:flags2.8?<a href="/type/int">int</a> boosts_unrestrict:flags2.9?<a href="/type/int">int</a> emojiset:flags2.10?<a href="/type/StickerSet">StickerSet</a> = <a href="/type/ChatFull">ChatFull</a>;<br>
|
||||
<a href="/constructor/globalPrivacySettings">globalPrivacySettings</a>#734c4ccb flags:<a href="/type/%23">#</a> archive_and_mute_new_noncontact_peers:flags.0?<a href="/constructor/true">true</a> keep_archived_unmuted:flags.1?<a href="/constructor/true">true</a> keep_archived_folders:flags.2?<a href="/constructor/true">true</a> hide_read_marks:flags.3?<a href="/constructor/true">true</a> new_noncontact_peers_require_premium:flags.4?<a href="/constructor/true">true</a> = <a href="/type/GlobalPrivacySettings">GlobalPrivacySettings</a>;<br>
|
||||
<a href="/constructor/storyItem">storyItem</a>#79b26a24 flags:<a href="/type/%23">#</a> pinned:flags.5?<a href="/constructor/true">true</a> public:flags.7?<a href="/constructor/true">true</a> close_friends:flags.8?<a href="/constructor/true">true</a> min:flags.9?<a href="/constructor/true">true</a> noforwards:flags.10?<a href="/constructor/true">true</a> edited:flags.11?<a href="/constructor/true">true</a> contacts:flags.12?<a href="/constructor/true">true</a> selected_contacts:flags.13?<a href="/constructor/true">true</a> out:flags.16?<a href="/constructor/true">true</a> id:<a href="/type/int">int</a> date:<a href="/type/int">int</a> from_id:flags.18?<a href="/type/Peer">Peer</a> fwd_from:flags.17?<a href="/type/StoryFwdHeader">StoryFwdHeader</a> expire_date:<a href="/type/int">int</a> caption:flags.0?<a href="/type/string">string</a> entities:flags.1?<a href="/type/Vector%20t">Vector</a><<a href="/type/MessageEntity">MessageEntity</a>> media:<a href="/type/MessageMedia">MessageMedia</a> media_areas:flags.14?<a href="/type/Vector%20t">Vector</a><<a href="/type/MediaArea">MediaArea</a>> privacy:flags.2?<a href="/type/Vector%20t">Vector</a><<a href="/type/PrivacyRule">PrivacyRule</a>> views:flags.3?<a href="/type/StoryViews">StoryViews</a> sent_reaction:flags.15?<a href="/type/Reaction">Reaction</a> = <a href="/type/StoryItem">StoryItem</a>;<br>
|
||||
|
@ -627,7 +629,7 @@
|
|||
<a href="/method/channels.setBoostsToUnblockRestrictions">channels.setBoostsToUnblockRestrictions</a>#ad399cee channel:<a href="/type/InputChannel">InputChannel</a> boosts:<a href="/type/int">int</a> = <a href="/type/Updates">Updates</a>;
|
||||
<a href="/method/channels.setEmojiStickers">channels.setEmojiStickers</a>#3cd930b7 channel:<a href="/type/InputChannel">InputChannel</a> stickerset:<a href="/type/InputStickerSet">InputStickerSet</a> = <a href="/type/Bool">Bool</a>;<br></code></pre></div>
|
||||
<h3><a class="anchor" href="#layer-171" id="layer-171" name="layer-171"><i class="anchor-icon"></i></a><a href="/schema?layer=171">Layer 171</a></h3>
|
||||
<p>This layer introduces <a href="/api/saved-messages#tags">saved message tags »</a> and adds support for the "Channels" tab in the <a href="/api/search#global-search">global search view »</a>. </p>
|
||||
<p>This layer introduces <a href="/api/saved-messages#tags">saved message tags »</a> and adds support for the "Channels" tab in the <a href="/api/search#global-search">global search view »</a>.</p>
|
||||
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
|
||||
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
|
||||
<ul>
|
||||
|
|
|
@ -299,6 +299,8 @@
|
|||
<p>Telegram users and channels can easily post and view stories through the API.</p>
|
||||
<h4><a class="anchor" href="#channelsgetchannels" id="channelsgetchannels" name="channelsgetchannels"><i class="anchor-icon"></i></a><a href="/method/channels.getChannels">channels.getChannels</a></h4>
|
||||
<p>Get info about <a href="/api/channel">channels/supergroups</a></p>
|
||||
<h4><a class="anchor" href="#peer-database" id="peer-database" name="peer-database"><i class="anchor-icon"></i></a><a href="/api/peers">Peer database</a></h4>
|
||||
<p>Many constructors in the API need to be stored in a local database upon reception and should only ever be updated reactively (passively) when received via updates or by other means (as specified in the documentation), to avoid overloading the server by continuously requesting changes for the same unchanged information.</p>
|
||||
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>
|
||||
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p>
|
||||
<h4><a class="anchor" href="#accent-colors" id="accent-colors" name="accent-colors"><i class="anchor-icon"></i></a><a href="/api/colors">Accent colors</a></h4>
|
||||
|
|
|
@ -153,6 +153,8 @@
|
|||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>
|
||||
<p>How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.</p>
|
||||
<h4><a class="anchor" href="#peer-database" id="peer-database" name="peer-database"><i class="anchor-icon"></i></a><a href="/api/peers">Peer database</a></h4>
|
||||
<p>Many constructors in the API need to be stored in a local database upon reception and should only ever be updated reactively (passively) when received via updates or by other means (as specified in the documentation), to avoid overloading the server by continuously requesting changes for the same unchanged information.</p>
|
||||
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>
|
||||
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p></div>
|
||||
|
||||
|
|
|
@ -82,7 +82,9 @@
|
|||
<p><a href="/type/InputPeer">InputPeer</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="#user" id="user" name="user"><i class="anchor-icon"></i></a><a href="/constructor/user">user</a></h4>
|
||||
<p>Indicates info about a certain user</p></div>
|
||||
<p>Indicates info about a certain user.</p>
|
||||
<p>Unless specified otherwise, when updating the <a href="/api/peers">local peer database</a>, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).</p>
|
||||
<p>See <a href="https://github.com/tdlib/td/blob/cb164927417f22811c74cd8678ed4a5ab7cb80ba/td/telegram/UserManager.cpp#L2267">here »</a> for an implementation of the logic to use when updating the <a href="/api/peers">local user peer database</a>.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -82,7 +82,9 @@
|
|||
<p><a href="/type/InputUser">InputUser</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="#user" id="user" name="user"><i class="anchor-icon"></i></a><a href="/constructor/user">user</a></h4>
|
||||
<p>Indicates info about a certain user</p></div>
|
||||
<p>Indicates info about a certain user.</p>
|
||||
<p>Unless specified otherwise, when updating the <a href="/api/peers">local peer database</a>, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).</p>
|
||||
<p>See <a href="https://github.com/tdlib/td/blob/cb164927417f22811c74cd8678ed4a5ab7cb80ba/td/telegram/UserManager.cpp#L2267">here »</a> for an implementation of the logic to use when updating the <a href="/api/peers">local user peer database</a>.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -91,7 +91,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/Update">Update</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#peers" id="peers" name="peers"><i class="anchor-icon"></i></a><a href="/api/peers">Peers</a></h4>
|
||||
<h4><a class="anchor" href="#peer-database" id="peer-database" name="peer-database"><i class="anchor-icon"></i></a><a href="/api/peers">Peer database</a></h4>
|
||||
<p>Many constructors in the API need to be stored in a local database upon reception and should only ever be updated reactively (passively) when received via updates or by other means (as specified in the documentation), to avoid overloading the server by continuously requesting changes for the same unchanged information.</p>
|
||||
<h4><a class="anchor" href="#working-with-updates" id="working-with-updates" name="working-with-updates"><i class="anchor-icon"></i></a><a href="/api/updates">Working with Updates</a></h4>
|
||||
<p>How to subscribe to updates and handle them properly.</p>
|
||||
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
|
||||
|
|
|
@ -77,7 +77,9 @@
|
|||
<p><a href="/type/Update">Update</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#user" id="user" name="user"><i class="anchor-icon"></i></a><a href="/constructor/user">user</a></h4>
|
||||
<p>Indicates info about a certain user</p>
|
||||
<p>Indicates info about a certain user.</p>
|
||||
<p>Unless specified otherwise, when updating the <a href="/api/peers">local peer database</a>, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).</p>
|
||||
<p>See <a href="https://github.com/tdlib/td/blob/cb164927417f22811c74cd8678ed4a5ab7cb80ba/td/telegram/UserManager.cpp#L2267">here »</a> for an implementation of the logic to use when updating the <a href="/api/peers">local user peer database</a>.</p>
|
||||
<h4><a class="anchor" href="#userfull" id="userfull" name="userfull"><i class="anchor-icon"></i></a><a href="/constructor/userFull">userFull</a></h4>
|
||||
<p>Extended user info</p>
|
||||
<h4><a class="anchor" href="#usersgetfulluser" id="usersgetfulluser" name="usersgetfulluser"><i class="anchor-icon"></i></a><a href="/method/users.getFullUser">users.getFullUser</a></h4>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>user</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Indicates info about a certain user">
|
||||
<meta property="description" content="Indicates info about a certain user. Unless specified otherwise, when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor). See here » for an implementation of the logic to use when updating the local user peer database.">
|
||||
<meta property="og:title" content="user">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Indicates info about a certain user">
|
||||
<meta property="og:description" content="Indicates info about a certain user. Unless specified otherwise, when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor). See here » for an implementation of the logic to use when updating the local user peer database.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -43,8 +43,8 @@
|
|||
<h1 id="dev_page_title">user</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Indicates info about a certain user.</p>
|
||||
<p>Unless specified otherwise, when updating the <a href="/api/peers">local peer database</a>, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor). </p>
|
||||
<p>See <a href="https://github.com/tdlib/td/blob/cb164927417f22811c74cd8678ed4a5ab7cb80ba/td/telegram/UserManager.cpp#L2267">here »</a> for an implementation of the logic to use when updating the <a href="/api/peers">local user peer database</a>. </p>
|
||||
<p>Unless specified otherwise, when updating the <a href="/api/peers">local peer database</a>, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).</p>
|
||||
<p>See <a href="https://github.com/tdlib/td/blob/cb164927417f22811c74cd8678ed4a5ab7cb80ba/td/telegram/UserManager.cpp#L2267">here »</a> for an implementation of the logic to use when updating the <a href="/api/peers">local user peer database</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -141,7 +141,7 @@
|
|||
<tr>
|
||||
<td><strong>apply_min_photo</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.25?<a href="/constructor/true">true</a></td>
|
||||
<td>If set and <code>min</code> is set, the value of <code>photo</code> <strong>can</strong> be used to update the local database, see the documentation of that flag for more info.</td>
|
||||
<td>If set and <code>min</code> is set, the value of <code>photo</code> <strong>can</strong> be used to update the local database, see the documentation of that flag for more info.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>fake</strong></td>
|
||||
|
@ -156,7 +156,7 @@
|
|||
<tr>
|
||||
<td><strong>premium</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.28?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether this user is a Telegram Premium user <br>Changes to this flag should invalidate the local <a href="/constructor/userFull">userFull</a> cache for this user ID. <br>Changes to this flag if the <code>self</code> flag is set should also trigger the following calls, to refresh the respective caches: <br>- <a href="/method/help.getConfig">help.getConfig</a> <br>- <a href="/method/messages.getTopReactions">messages.getTopReactions</a> if the <code>bot</code> flag is <strong>not</strong> set</td>
|
||||
<td>Whether this user is a Telegram Premium user <br>Changes to this flag should invalidate the local <a href="/constructor/userFull">userFull</a> cache for this user ID. <br>Changes to this flag if the <code>self</code> flag is set should also trigger the following calls, to refresh the respective caches: <br>- <a href="/method/help.getConfig">help.getConfig</a> <br>- <a href="/method/messages.getTopReactions">messages.getTopReactions</a> if the <code>bot</code> flag is <strong>not</strong> set</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>attach_menu_enabled</strong></td>
|
||||
|
@ -206,37 +206,37 @@
|
|||
<tr>
|
||||
<td><strong>access_hash</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/long">long</a></td>
|
||||
<td>Access hash of the user, see <a href="/api/peers#access-hash">here »</a> for more info. <br>If this flag is set, when updating the <a href="/api/peers">local peer database</a>, generate a virtual flag called <code>min_access_hash</code>, which is: <br>- Set to <code>true</code> if <code>min</code> is set AND <br> - The <code>phone</code> <em>flag</em> is <strong>not</strong> set OR <br> - The <code>phone</code> <em>flag</em> is set and the associated phone number string is <strong>non-empty</strong> <br>- Set to <code>false</code> otherwise. <br><br>Then, apply both <code>access_hash</code> and <code>min_access_hash</code> to the local database if: <br>- <code>min_access_hash</code> is false OR <br>- <code>min_access_hash</code> is true AND <br> - There is no locally cached object for this user OR <br> - There is no <code>access_hash</code> in the local cache OR <br> - The cached object's <code>min_access_hash</code> is also true <br>If the final merged object stored to the database has the <code>min_access_hash</code> field set to true, the related <code>access_hash</code> is <strong>only</strong> suitable to use in <a href="/constructor/inputPeerPhotoFileLocation"><code>inputPeerPhotoFileLocation</code> »</a>, to directly <a href="/api/files">download the profile pictures</a> of users, everywhere else a <code>inputPeer*FromMessage</code> constructor will have to be generated as specified <a href="/api/min">here »</a>. <br>Bots can also use min access hashes in some conditions, by passing <code>0</code> instead of the min access hash.</td>
|
||||
<td>Access hash of the user, see <a href="/api/peers#access-hash">here »</a> for more info. <br>If this flag is set, when updating the <a href="/api/peers">local peer database</a>, generate a virtual flag called <code>min_access_hash</code>, which is: <br>- Set to <code>true</code> if <code>min</code> is set AND <br>- The <code>phone</code> <em>flag</em> is <strong>not</strong> set OR <br>- The <code>phone</code> <em>flag</em> is set and the associated phone number string is <strong>non-empty</strong> <br>- Set to <code>false</code> otherwise. <br><br>Then, apply both <code>access_hash</code> and <code>min_access_hash</code> to the local database if: <br>- <code>min_access_hash</code> is false OR <br>- <code>min_access_hash</code> is true AND <br>- There is no locally cached object for this user OR <br>- There is no <code>access_hash</code> in the local cache OR <br>- The cached object's <code>min_access_hash</code> is also true <br>If the final merged object stored to the database has the <code>min_access_hash</code> field set to true, the related <code>access_hash</code> is <strong>only</strong> suitable to use in <a href="/constructor/inputPeerPhotoFileLocation"><code>inputPeerPhotoFileLocation</code> »</a>, to directly <a href="/api/files">download the profile pictures</a> of users, everywhere else a <code>inputPeer*FromMessage</code> constructor will have to be generated as specified <a href="/api/min">here »</a>. <br>Bots can also use min access hashes in some conditions, by passing <code>0</code> instead of the min access hash.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>first_name</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/string">string</a></td>
|
||||
<td>First name. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br> - The <code>min</code> flag of the locally cached user entry is set.</td>
|
||||
<td>First name. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br>- The <code>min</code> flag of the locally cached user entry is set.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>last_name</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/string">string</a></td>
|
||||
<td>Last name. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br> - The <code>min</code> flag of the locally cached user entry is set.</td>
|
||||
<td>Last name. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br>- The <code>min</code> flag of the locally cached user entry is set.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>username</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/string">string</a></td>
|
||||
<td>Main active username. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br> - The <code>min</code> flag of the locally cached user entry is set.</td>
|
||||
<td>Main active username. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br>- The <code>min</code> flag of the locally cached user entry is set.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>phone</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>Phone number. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br> - The <code>min</code> flag of the locally cached user entry is set.</td>
|
||||
<td>Phone number. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br>- The <code>min</code> flag of the locally cached user entry is set.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>photo</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.5?<a href="/type/UserProfilePhoto">UserProfilePhoto</a></td>
|
||||
<td>Profile picture of user. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br> - The <code>apply_min_photo</code> flag is set OR <br> - The <code>min</code> flag of the locally cached user entry is set.</td>
|
||||
<td>Profile picture of user. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br>- The <code>apply_min_photo</code> flag is set OR <br>- The <code>min</code> flag of the locally cached user entry is set.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>status</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.6?<a href="/type/UserStatus">UserStatus</a></td>
|
||||
<td>Online status of user. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br> - The <code>min</code> flag of the locally cached user entry is set OR <br> - The locally cached user entry is equal to <a href="/constructor/userStatusEmpty">userStatusEmpty</a>.</td>
|
||||
<td>Online status of user. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br>- The <code>min</code> flag of the locally cached user entry is set OR <br>- The locally cached user entry is equal to <a href="/constructor/userStatusEmpty">userStatusEmpty</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>bot_info_version</strong></td>
|
||||
|
@ -266,7 +266,7 @@
|
|||
<tr>
|
||||
<td><strong>usernames</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.0?<a href="/type/Vector%20t">Vector</a><<a href="/type/Username">Username</a>></td>
|
||||
<td>Additional usernames. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br> - The <code>min</code> flag of the locally cached user entry is set. <br>Changes to this flag (if the above conditions are respected) should invalidate the local <a href="/constructor/userFull">userFull</a> cache for this user ID.</td>
|
||||
<td>Additional usernames. <br>When updating the <a href="/api/peers">local peer database</a>, apply changes to this field only if: <br>- The <code>min</code> flag is not set OR <br>- The <code>min</code> flag is set AND <br>- The <code>min</code> flag of the locally cached user entry is set. <br>Changes to this flag (if the above conditions are respected) should invalidate the local <a href="/constructor/userFull">userFull</a> cache for this user ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>stories_max_id</strong></td>
|
||||
|
@ -288,10 +288,18 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/User">User</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="#peer-database" id="peer-database" name="peer-database"><i class="anchor-icon"></i></a><a href="/api/peers">Peer database</a></h4>
|
||||
<p>Many constructors in the API need to be stored in a local database upon reception and should only ever be updated reactively (passively) when received via updates or by other means (as specified in the documentation), to avoid overloading the server by continuously requesting changes for the same unchanged information.</p>
|
||||
<h4><a class="anchor" href="#userfull" id="userfull" name="userfull"><i class="anchor-icon"></i></a><a href="/constructor/userFull">userFull</a></h4>
|
||||
<p>Extended user info</p>
|
||||
<h4><a class="anchor" href="#min-constructors" id="min-constructors" name="min-constructors"><i class="anchor-icon"></i></a><a href="/api/min">Min constructors</a></h4>
|
||||
<p>In some situations user and channel constructors have reduced set of fields present (although id is always there) and min flag set.</p>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#helpgetconfig" id="helpgetconfig" name="helpgetconfig"><i class="anchor-icon"></i></a><a href="/method/help.getConfig">help.getConfig</a></h4>
|
||||
<p>Returns current configuration, including data center configuration.</p>
|
||||
<h4><a class="anchor" href="#messagesgettopreactions" id="messagesgettopreactions" name="messagesgettopreactions"><i class="anchor-icon"></i></a><a href="/method/messages.getTopReactions">messages.getTopReactions</a></h4>
|
||||
<p>Got popular <a href="/api/reactions">message reactions</a></p>
|
||||
<h4><a class="anchor" href="#privacy" id="privacy" name="privacy"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy</a></h4>
|
||||
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p>
|
||||
<h4><a class="anchor" href="#stories" id="stories" name="stories"><i class="anchor-icon"></i></a><a href="/api/stories">Stories</a></h4>
|
||||
|
@ -299,15 +307,21 @@
|
|||
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
|
||||
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p>
|
||||
<h4><a class="anchor" href="#user" id="user" name="user"><i class="anchor-icon"></i></a><a href="/constructor/user">user</a></h4>
|
||||
<p>Indicates info about a certain user</p>
|
||||
<p>Indicates info about a certain user.</p>
|
||||
<p>Unless specified otherwise, when updating the <a href="/api/peers">local peer database</a>, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).</p>
|
||||
<p>See <a href="https://github.com/tdlib/td/blob/cb164927417f22811c74cd8678ed4a5ab7cb80ba/td/telegram/UserManager.cpp#L2267">here »</a> for an implementation of the logic to use when updating the <a href="/api/peers">local user peer database</a>.</p>
|
||||
<h4><a class="anchor" href="#usersgetispremiumrequiredtocontact" id="usersgetispremiumrequiredtocontact" name="usersgetispremiumrequiredtocontact"><i class="anchor-icon"></i></a><a href="/method/users.getIsPremiumRequiredToContact">users.getIsPremiumRequiredToContact</a></h4>
|
||||
<p>Check whether we can write to the specified user (non-<a href="/api/premium">Premium</a> users only), see <a href="/api/privacy#require-premium-for-new-non-contact-users">here »</a> for more info on the full flow.</p>
|
||||
<h4><a class="anchor" href="#accountsetglobalprivacysettings" id="accountsetglobalprivacysettings" name="accountsetglobalprivacysettings"><i class="anchor-icon"></i></a><a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a></h4>
|
||||
<p>Set global privacy settings</p>
|
||||
<h4><a class="anchor" href="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
|
||||
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.</p>
|
||||
<h4><a class="anchor" href="#userfull" id="userfull" name="userfull"><i class="anchor-icon"></i></a><a href="/constructor/userFull">userFull</a></h4>
|
||||
<p>Extended user info</p>
|
||||
<h4><a class="anchor" href="#inputpeerphotofilelocation" id="inputpeerphotofilelocation" name="inputpeerphotofilelocation"><i class="anchor-icon"></i></a><a href="/constructor/inputPeerPhotoFileLocation">inputPeerPhotoFileLocation</a></h4>
|
||||
<p>Location of profile photo of channel/group/supergroup/user</p>
|
||||
<h4><a class="anchor" href="#uploading-and-downloading-files" id="uploading-and-downloading-files" name="uploading-and-downloading-files"><i class="anchor-icon"></i></a><a href="/api/files">Uploading and Downloading Files</a></h4>
|
||||
<p>How to transfer large data batches correctly.</p>
|
||||
<h4><a class="anchor" href="#userstatusempty" id="userstatusempty" name="userstatusempty"><i class="anchor-icon"></i></a><a href="/constructor/userStatusEmpty">userStatusEmpty</a></h4>
|
||||
<p>User status has not been set yet.</p>
|
||||
<h4><a class="anchor" href="#emoji-status" id="emoji-status" name="emoji-status"><i class="anchor-icon"></i></a><a href="/api/emoji-status">Emoji status</a></h4>
|
||||
<p>Telegram allows users to set an emoticon or a custom emoji as status, to show next to their name in chats and profiles.</p>
|
||||
<h4><a class="anchor" href="#accent-colors" id="accent-colors" name="accent-colors"><i class="anchor-icon"></i></a><a href="/api/colors">Accent colors</a></h4>
|
||||
|
|
|
@ -301,7 +301,9 @@
|
|||
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
|
||||
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p>
|
||||
<h4><a class="anchor" href="#user" id="user" name="user"><i class="anchor-icon"></i></a><a href="/constructor/user">user</a></h4>
|
||||
<p>Indicates info about a certain user</p>
|
||||
<p>Indicates info about a certain user.</p>
|
||||
<p>Unless specified otherwise, when updating the <a href="/api/peers">local peer database</a>, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).</p>
|
||||
<p>See <a href="https://github.com/tdlib/td/blob/cb164927417f22811c74cd8678ed4a5ab7cb80ba/td/telegram/UserManager.cpp#L2267">here »</a> for an implementation of the logic to use when updating the <a href="/api/peers">local user peer database</a>.</p>
|
||||
<h4><a class="anchor" href="#usersgetispremiumrequiredtocontact" id="usersgetispremiumrequiredtocontact" name="usersgetispremiumrequiredtocontact"><i class="anchor-icon"></i></a><a href="/method/users.getIsPremiumRequiredToContact">users.getIsPremiumRequiredToContact</a></h4>
|
||||
<p>Check whether we can write to the specified user (non-<a href="/api/premium">Premium</a> users only), see <a href="/api/privacy#require-premium-for-new-non-contact-users">here »</a> for more info on the full flow.</p>
|
||||
<h4><a class="anchor" href="#accountsetglobalprivacysettings" id="accountsetglobalprivacysettings" name="accountsetglobalprivacysettings"><i class="anchor-icon"></i></a><a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a></h4>
|
||||
|
|
|
@ -65,7 +65,9 @@
|
|||
<p><a href="/type/contacts.ContactBirthdays">contacts.ContactBirthdays</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="#user" id="user" name="user"><i class="anchor-icon"></i></a><a href="/constructor/user">user</a></h4>
|
||||
<p>Indicates info about a certain user</p>
|
||||
<p>Indicates info about a certain user.</p>
|
||||
<p>Unless specified otherwise, when updating the <a href="/api/peers">local peer database</a>, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).</p>
|
||||
<p>See <a href="https://github.com/tdlib/td/blob/cb164927417f22811c74cd8678ed4a5ab7cb80ba/td/telegram/UserManager.cpp#L2267">here »</a> for an implementation of the logic to use when updating the <a href="/api/peers">local user peer database</a>.</p>
|
||||
<h4><a class="anchor" href="#profile" id="profile" name="profile"><i class="anchor-icon"></i></a><a href="/api/profile">Profile</a></h4>
|
||||
<p>Telegram offers many customization options for your profile!</p></div>
|
||||
|
||||
|
|
|
@ -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 C0 62 0C 00 0F 09 9E 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE FE 7E E3 8C 9F B2 A0 E1
|
||||
0020 | 5D 1A BB 74 C2 E1 33 D2</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 08 CF 03 00 8D 3C A1 66
|
||||
0010 | 14 00 00 00 F1 8E 7E BE F6 08 5A 66 81 25 75 E2
|
||||
0020 | 81 12 E1 29 9D 0F 62 6E</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>C0620C000F099E66</code></td>
|
||||
<td><code>08CF03008D3CA166</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FE7EE38C9FB2A0E15D1ABB74C2E133D2</code></td>
|
||||
<td><code>F6085A66812575E28112E1299D0F626E</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 5C F7 B5 0F 09 9E 66
|
||||
0010 | 54 00 00 00 63 24 16 05 FE 7E E3 8C 9F B2 A0 E1
|
||||
0020 | 5D 1A BB 74 C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB
|
||||
0030 | BC DC 58 F8 8E 1E 3A E8 08 21 F7 74 9A 09 EA 98
|
||||
0040 | A3 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 A8 63 1A 8D 3C A1 66
|
||||
0010 | 9C 00 00 00 63 24 16 05 F6 08 5A 66 81 25 75 E2
|
||||
0020 | 81 12 E1 29 9D 0F 62 6E 0E 48 CD 96 A1 86 60 61
|
||||
0030 | 97 46 58 A4 30 BD 77 33 08 1B 0A AA EA F9 D1 22
|
||||
0040 | 31 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>015CF7B50F099E66</code></td>
|
||||
<td><code>01A8631A8D3CA166</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>54000000</code> (84 in decimal)</td>
|
||||
<td><code>9C000000</code> (156 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FE7EE38C9FB2A0E15D1ABB74C2E133D2</code></td>
|
||||
<td><code>F6085A66812575E28112E1299D0F626E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>B11B0686D343E5FBBCDC58F88E1E3AE8</code></td>
|
||||
<td><code>0E48CD96A1866061974658A430BD7733</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>0821F7749A09EA98A3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2447553127439308963</td>
|
||||
<td><code>081B0AAAEAF9D12231000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1948557714981462577</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 < q.</h5>
|
||||
<!-- start pq -->
|
||||
<pre><code>pq = 2447553127439308963</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2447553127439308963 = 1284150331 * 1905970873</code></p>
|
||||
<pre><code>p = 1284150331
|
||||
q = 1905970873</code></pre>
|
||||
<pre><code>pq = 1948557714981462577</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1948557714981462577 = 1002516773 * 1943665949</code></p>
|
||||
<pre><code>p = 1002516773
|
||||
q = 1943665949</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 21 F7 74 9A 09 EA 98 A3 00 00 00
|
||||
0010 | 04 4C 8A 94 3B 00 00 00 04 71 9A CE B9 00 00 00
|
||||
0020 | FE 7E E3 8C 9F B2 A0 E1 5D 1A BB 74 C2 E1 33 D2
|
||||
0030 | B1 1B 06 86 D3 43 E5 FB BC DC 58 F8 8E 1E 3A E8
|
||||
0040 | 2E 2D 46 44 8E CC BF CD E4 D0 55 64 EA 29 5F 70
|
||||
0050 | A8 27 B4 1B 52 A7 88 64 78 21 FA 22 80 5B 01 79
|
||||
<pre><code>0000 | 95 5F F5 A9 08 1B 0A AA EA F9 D1 22 31 00 00 00
|
||||
0010 | 04 3B C1 31 25 00 00 00 04 73 D9 FD 1D 00 00 00
|
||||
0020 | F6 08 5A 66 81 25 75 E2 81 12 E1 29 9D 0F 62 6E
|
||||
0030 | 0E 48 CD 96 A1 86 60 61 97 46 58 A4 30 BD 77 33
|
||||
0040 | 81 EC 6A 3B 1F 98 EB 9B 15 EF E5 F4 6D AE 0A 5E
|
||||
0050 | 82 55 3C DE 98 C6 8B E6 45 CA 91 19 8C F2 C1 0A
|
||||
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 = 1905970873</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>0821F7749A09EA98A3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2447553127439308963</td>
|
||||
<td><code>081B0AAAEAF9D12231000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1948557714981462577</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>044C8A943B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1284150331</td>
|
||||
<td><code>043BC13125000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1002516773</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>04719ACEB9000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1905970873</td>
|
||||
<td><code>0473D9FD1D000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1943665949</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>FE7EE38C9FB2A0E15D1ABB74C2E133D2</code></td>
|
||||
<td><code>F6085A66812575E28112E1299D0F626E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>B11B0686D343E5FBBCDC58F88E1E3AE8</code></td>
|
||||
<td><code>0E48CD96A1866061974658A430BD7733</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>2E2D46448ECCBFCDE4D05564EA295F70</code> <code>A827B41B52A788647821FA22805B0179</code></td>
|
||||
<td><code>81EC6A3B1F98EB9B15EFE5F46DAE0A5E</code> <code>82553CDE98C68BE645CA91198CF2C10A</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1905970873</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 = 955FF5A90821F7749A09EA98A3000000044C8A943B00000004719ACEB9000000FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE82E2D46448ECCBFCDE4D05564EA295F70A827B41B52A788647821FA22805B017902000000
|
||||
random_padding_bytes = CD8C4EDA27DA91F03C9F8CF051671783BD56D31E5B19B9CFA703A84F0E9DBE62D2E45EA494E1BAF3D8D9A331D758DB115263DE35EB87D32EE526D4AB2F78169F9E6D1EDC3D5B6F16EF5976040CE69FCEF80F0E8B5E75E89419B3D7B8</code></pre>
|
||||
<pre><code>data = 955FF5A9081B0AAAEAF9D12231000000043BC131250000000473D9FD1D000000F6085A66812575E28112E1299D0F626E0E48CD96A1866061974658A430BD773381EC6A3B1F98EB9B15EFE5F46DAE0A5E82553CDE98C68BE645CA91198CF2C10A02000000
|
||||
random_padding_bytes = 9974885E29BF30E5A7A603D93DD9B75472468573892E3F78AF14233B04CDE84B1246870EC2FEEF7D78ADE2660AD534FE3D95957C2011A03BAB201C309E9A67E0A123A4770D4BF5E8756566390431834AB836DB3EDB7E6D81140D21BD</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 = E29368A6A56B647710525E2591AE29AE3AE8D35FB014BE046AE77F2FFB3F1123835032E4406A6C8344EF019536CA43D4ABB07809464ED1994415E0C34708C96CF35B05C8F8248AD3B3263D68E20D070B2ADB55FA160EF76A9571C841E5EB57BDEAC205C6049CFFF01C0552D5B9DFCD1A4A01CF79BAF2E42CE19927C76E38B060D7260AA263AB5309B55685AAF330E161666F25CAF03EEDF8EE77646C2B2A052B272CF7ADEDD326EB12E905A5F4AF56FA6820416E568CC476D847E3AAA5EF7EE1455F73405F28C83D81655246ED94176385DAD0B19F985E0073B4ABC6A232EBFEA03AE1B43BD662C587167668D3D5678ECBB65461D0A46E67A574933037F90109</code></pre>
|
||||
<pre><code>encrypted_data = 51DD24B756C4BDC6DFBF81F1F6A1B2F38562AC8DC7F6C32C624AE8FA7856C8D1A5756B2D10BFB8B1E2C702F69907CECA6B161C1575E4CE4E85A9BA48C4B63B678B62A1D56027D39C92C37D6656C771F761BC4ED1073B43EC07064B9D0173143711E34189C24AAD72128FF9D4E688E807CBC555A76B830E30313D209991A860D1392436F471A761D8566EE2A357A2EF9CAD8AA3A741EEAA29431B263F5CC00C4C5AB00F45AB4BA1938C1F198D4A69225BE94554CB7F84C428535F79206C876DF2FC84EA7AB21D26DEF3C26BAFC01EFB17CA2C39D29050821D0FF05AAC653794F0B3D916E978A4FD077C63F268F6ADFDFF2980D42E3D5C5F86954A123AC2D3067B</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 C4 62 0C 00 0F 09 9E 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 FE 7E E3 8C 9F B2 A0 E1
|
||||
0020 | 5D 1A BB 74 C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB
|
||||
0030 | BC DC 58 F8 8E 1E 3A E8 04 4C 8A 94 3B 00 00 00
|
||||
0040 | 04 71 9A CE B9 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 E2 93 68 A6 A5 6B 64 77 10 52 5E 25
|
||||
0060 | 91 AE 29 AE 3A E8 D3 5F B0 14 BE 04 6A E7 7F 2F
|
||||
0070 | FB 3F 11 23 83 50 32 E4 40 6A 6C 83 44 EF 01 95
|
||||
0080 | 36 CA 43 D4 AB B0 78 09 46 4E D1 99 44 15 E0 C3
|
||||
0090 | 47 08 C9 6C F3 5B 05 C8 F8 24 8A D3 B3 26 3D 68
|
||||
00A0 | E2 0D 07 0B 2A DB 55 FA 16 0E F7 6A 95 71 C8 41
|
||||
00B0 | E5 EB 57 BD EA C2 05 C6 04 9C FF F0 1C 05 52 D5
|
||||
00C0 | B9 DF CD 1A 4A 01 CF 79 BA F2 E4 2C E1 99 27 C7
|
||||
00D0 | 6E 38 B0 60 D7 26 0A A2 63 AB 53 09 B5 56 85 AA
|
||||
00E0 | F3 30 E1 61 66 6F 25 CA F0 3E ED F8 EE 77 64 6C
|
||||
00F0 | 2B 2A 05 2B 27 2C F7 AD ED D3 26 EB 12 E9 05 A5
|
||||
0100 | F4 AF 56 FA 68 20 41 6E 56 8C C4 76 D8 47 E3 AA
|
||||
0110 | A5 EF 7E E1 45 5F 73 40 5F 28 C8 3D 81 65 52 46
|
||||
0120 | ED 94 17 63 85 DA D0 B1 9F 98 5E 00 73 B4 AB C6
|
||||
0130 | A2 32 EB FE A0 3A E1 B4 3B D6 62 C5 87 16 76 68
|
||||
0140 | D3 D5 67 8E CB B6 54 61 D0 A4 6E 67 A5 74 93 30
|
||||
0150 | 37 F9 01 09</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 9C 10 07 00 8D 3C A1 66
|
||||
0010 | 40 01 00 00 BE E4 12 D7 F6 08 5A 66 81 25 75 E2
|
||||
0020 | 81 12 E1 29 9D 0F 62 6E 0E 48 CD 96 A1 86 60 61
|
||||
0030 | 97 46 58 A4 30 BD 77 33 04 3B C1 31 25 00 00 00
|
||||
0040 | 04 73 D9 FD 1D 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 51 DD 24 B7 56 C4 BD C6 DF BF 81 F1
|
||||
0060 | F6 A1 B2 F3 85 62 AC 8D C7 F6 C3 2C 62 4A E8 FA
|
||||
0070 | 78 56 C8 D1 A5 75 6B 2D 10 BF B8 B1 E2 C7 02 F6
|
||||
0080 | 99 07 CE CA 6B 16 1C 15 75 E4 CE 4E 85 A9 BA 48
|
||||
0090 | C4 B6 3B 67 8B 62 A1 D5 60 27 D3 9C 92 C3 7D 66
|
||||
00A0 | 56 C7 71 F7 61 BC 4E D1 07 3B 43 EC 07 06 4B 9D
|
||||
00B0 | 01 73 14 37 11 E3 41 89 C2 4A AD 72 12 8F F9 D4
|
||||
00C0 | E6 88 E8 07 CB C5 55 A7 6B 83 0E 30 31 3D 20 99
|
||||
00D0 | 91 A8 60 D1 39 24 36 F4 71 A7 61 D8 56 6E E2 A3
|
||||
00E0 | 57 A2 EF 9C AD 8A A3 A7 41 EE AA 29 43 1B 26 3F
|
||||
00F0 | 5C C0 0C 4C 5A B0 0F 45 AB 4B A1 93 8C 1F 19 8D
|
||||
0100 | 4A 69 22 5B E9 45 54 CB 7F 84 C4 28 53 5F 79 20
|
||||
0110 | 6C 87 6D F2 FC 84 EA 7A B2 1D 26 DE F3 C2 6B AF
|
||||
0120 | C0 1E FB 17 CA 2C 39 D2 90 50 82 1D 0F F0 5A AC
|
||||
0130 | 65 37 94 F0 B3 D9 16 E9 78 A4 FD 07 7C 63 F2 68
|
||||
0140 | F6 AD FD FF 29 80 D4 2E 3D 5C 5F 86 95 4A 12 3A
|
||||
0150 | C2 D3 06 7B</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 = CD8C4EDA27DA91F03C9F8CF051671783BD56D31E5B19B9CFA703A84F0
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>C4620C000F099E66</code></td>
|
||||
<td><code>9C1007008D3CA166</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -363,25 +363,25 @@ random_padding_bytes = CD8C4EDA27DA91F03C9F8CF051671783BD56D31E5B19B9CFA703A84F0
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FE7EE38C9FB2A0E15D1ABB74C2E133D2</code></td>
|
||||
<td><code>F6085A66812575E28112E1299D0F626E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>B11B0686D343E5FBBCDC58F88E1E3AE8</code></td>
|
||||
<td><code>0E48CD96A1866061974658A430BD7733</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>044C8A943B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1284150331</td>
|
||||
<td><code>043BC13125000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1002516773</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>04719ACEB9000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1905970873</td>
|
||||
<td><code>0473D9FD1D000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1943665949</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 = CD8C4EDA27DA91F03C9F8CF051671783BD56D31E5B19B9CFA703A84F0
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE000100E29368A6A56B647710525E25</code> <code>91AE29AE3AE8D35FB014BE046AE77F2F</code> <code>FB3F1123835032E4406A6C8344EF0195</code> <code>36CA43D4ABB07809464ED1994415E0C3</code> <code>4708C96CF35B05C8F8248AD3B3263D68</code> <code>E20D070B2ADB55FA160EF76A9571C841</code> <code>E5EB57BDEAC205C6049CFFF01C0552D5</code> <code>B9DFCD1A4A01CF79BAF2E42CE19927C7</code> <code>6E38B060D7260AA263AB5309B55685AA</code> <code>F330E161666F25CAF03EEDF8EE77646C</code> <code>2B2A052B272CF7ADEDD326EB12E905A5</code> <code>F4AF56FA6820416E568CC476D847E3AA</code> <code>A5EF7EE1455F73405F28C83D81655246</code> <code>ED94176385DAD0B19F985E0073B4ABC6</code> <code>A232EBFEA03AE1B43BD662C587167668</code> <code>D3D5678ECBB65461D0A46E67A5749330</code><br> <code>37F90109</code></td>
|
||||
<td><code>FE00010051DD24B756C4BDC6DFBF81F1</code> <code>F6A1B2F38562AC8DC7F6C32C624AE8FA</code> <code>7856C8D1A5756B2D10BFB8B1E2C702F6</code> <code>9907CECA6B161C1575E4CE4E85A9BA48</code> <code>C4B63B678B62A1D56027D39C92C37D66</code> <code>56C771F761BC4ED1073B43EC07064B9D</code> <code>0173143711E34189C24AAD72128FF9D4</code> <code>E688E807CBC555A76B830E30313D2099</code> <code>91A860D1392436F471A761D8566EE2A3</code> <code>57A2EF9CAD8AA3A741EEAA29431B263F</code> <code>5CC00C4C5AB00F45AB4BA1938C1F198D</code> <code>4A69225BE94554CB7F84C428535F7920</code> <code>6C876DF2FC84EA7AB21D26DEF3C26BAF</code> <code>C01EFB17CA2C39D29050821D0FF05AAC</code> <code>653794F0B3D916E978A4FD077C63F268</code> <code>F6ADFDFF2980D42E3D5C5F86954A123A</code><br> <code>C2D3067B</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = CD8C4EDA27DA91F03C9F8CF051671783BD56D31E5B19B9CFA703A84F0
|
|||
<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 B8 EC 79 10 09 9E 66
|
||||
0010 | D4 02 00 00 5C 07 E8 D0 FE 7E E3 8C 9F B2 A0 E1
|
||||
0020 | 5D 1A BB 74 C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB
|
||||
0030 | BC DC 58 F8 8E 1E 3A E8 FE 50 02 00 84 40 93 D5
|
||||
0040 | 80 3E 05 63 86 D8 C8 9B 88 80 04 03 45 18 3F FB
|
||||
0050 | 82 DD 62 1D DA 6D 88 DA 41 A4 8D 86 E9 E3 AD F2
|
||||
0060 | 48 53 5B 80 4E 72 44 A0 71 33 47 6C 01 E1 B0 00
|
||||
0070 | CE C8 15 C5 F7 B8 8E 4D 0D 05 F6 C9 42 10 EA 34
|
||||
0080 | D5 FC 6A DD 2D B9 87 63 0A 01 84 86 7C 7D E2 C1
|
||||
0090 | EB 45 78 E5 91 F0 88 47 B8 C4 0F 82 85 D4 6C C2
|
||||
00A0 | 51 37 17 75 F3 79 28 96 55 9A BF 0C 8F 16 8C 4D
|
||||
00B0 | E1 D6 0B 4C AA A1 81 F8 2F ED DC 3C FB 6C BC 4A
|
||||
00C0 | 7D B1 2B F8 79 8C 10 2A 83 9E 9D C5 1E 6F 7F 97
|
||||
00D0 | 80 27 A3 B0 A2 47 68 5A 3C 0F 1D CB 12 CE 0D 29
|
||||
00E0 | 20 37 EA 78 C7 B1 50 F3 A6 FD 31 82 9D 10 EF 21
|
||||
00F0 | 22 4F 10 BE B9 A7 3D E7 2B 3B 87 E2 8E 47 78 EE
|
||||
0100 | D0 DA 4C 19 31 05 D4 36 C4 E6 FD 4A C1 60 8D 01
|
||||
0110 | CB D3 E7 E1 D7 8E 96 B9 D8 DC 3C 37 F1 2B 72 05
|
||||
0120 | 5F 88 DA 9B EA E2 26 BA 60 1D EC FE 20 D5 D9 72
|
||||
0130 | 2F E5 34 B8 45 74 5F BF A0 B2 AE 46 7F 9A 42 5A
|
||||
0140 | 6F CE 0A 4E 58 B9 AA 51 6A BC C6 8B 78 C6 4E 63
|
||||
0150 | 4C DE A3 53 21 C3 79 99 D4 74 DB 0B 38 02 57 5A
|
||||
0160 | 08 65 69 19 9E 14 27 B7 D9 F2 D6 D4 62 4C 48 83
|
||||
0170 | AC 6C 7F 37 F8 37 12 E2 3D F8 D5 67 F7 56 DC 00
|
||||
0180 | 2A 59 94 E6 65 7E 63 4F CD 0F B3 29 AD B2 89 54
|
||||
0190 | E5 CD EB C8 8B A8 10 19 A2 3C A9 2B 49 D1 39 2D
|
||||
01A0 | A1 6B D9 81 7F 27 47 87 03 F1 65 FD 8D 1D 07 7B
|
||||
01B0 | 8C 44 C9 25 AD 3A 11 95 2E A5 CC 20 F9 4B 2C C6
|
||||
01C0 | 4D B6 5B 11 EC DA 51 18 69 5F 8D FD E1 F4 CA B2
|
||||
01D0 | D4 4D 0E 57 07 89 D4 A1 FA E6 5C EB D4 57 3C A4
|
||||
01E0 | D5 5A 5C E9 9C E3 5D 3E 2F D5 CC 60 74 A2 D7 46
|
||||
01F0 | 65 69 7D D1 AB D8 9C 24 F0 39 2F 07 9E FB 4A A8
|
||||
0200 | AB 93 BE C6 CE 8A 7C 1A 94 D4 15 25 18 9F 9C DC
|
||||
0210 | 86 29 77 7A 8F C5 E2 A8 09 AC A8 01 F5 69 5A BC
|
||||
0220 | FC A4 2C BA F4 E7 78 63 46 74 9C B8 93 7A B5 F4
|
||||
0230 | 76 C7 F2 04 3C 8D F9 91 60 0F AB 01 CD A7 CC 4C
|
||||
0240 | 3B AA 38 A7 56 B4 15 B6 59 2A 47 E4 10 82 76 66
|
||||
0250 | 33 4C EF 01 F6 9F 68 15 24 9E 0E EA 4C DF D7 C7
|
||||
0260 | A3 E0 9C B4 C0 D3 16 96 A8 0D 52 78 7B E0 B6 47
|
||||
0270 | CC 71 69 12 26 55 B0 3F 72 BA A3 00 34 F8 12 62
|
||||
0280 | DA 9E 2F 53 1B DE FB 57 56 C3 21 8F</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C4 CD D4 8D 3C A1 66
|
||||
0010 | BC 02 00 00 5C 07 E8 D0 F6 08 5A 66 81 25 75 E2
|
||||
0020 | 81 12 E1 29 9D 0F 62 6E 0E 48 CD 96 A1 86 60 61
|
||||
0030 | 97 46 58 A4 30 BD 77 33 FE 50 02 00 5A CB 29 7F
|
||||
0040 | 7F AB E4 AE A1 B0 28 32 EB D4 11 B0 E5 42 3E EC
|
||||
0050 | 0E E4 40 B9 43 1E 23 F7 76 34 7E 2E 33 32 0F 46
|
||||
0060 | 0F 0B 0F B4 29 67 8B 42 3A 82 AF 8C 4D 8F AC 05
|
||||
0070 | 0C 30 0C 50 15 42 79 D6 84 1D DC 1B 5F 91 AE 00
|
||||
0080 | 40 C3 80 A1 12 69 C4 68 4A 66 F0 46 75 EA 25 7B
|
||||
0090 | F6 34 60 BF 27 26 EE E7 3B 68 8F B3 0B D0 C5 7E
|
||||
00A0 | F7 AA F3 8B D6 46 12 9C 6B DE 80 B3 D0 3B CD C6
|
||||
00B0 | 7B 94 7A E4 D3 D0 75 22 C1 1A D2 BE A8 E9 54 9F
|
||||
00C0 | D5 F4 14 0F C9 6D B6 62 50 DA B8 36 83 9C 89 F3
|
||||
00D0 | 38 3E 1C CA BC 27 61 54 87 93 09 FD 6E 50 8B EA
|
||||
00E0 | D4 7C 21 0E A7 49 AD D4 9E 82 E2 3B 08 51 36 F3
|
||||
00F0 | 1A 7A 14 4D 6B F1 C7 FC E2 6E 47 9D CB 0A 5A 3F
|
||||
0100 | DD 79 61 DC CF 34 E0 72 2E 89 81 03 F7 27 73 4D
|
||||
0110 | E3 B1 8D 76 44 99 65 80 1F 0F 91 2B D6 0F 1C AE
|
||||
0120 | 66 4C FC 8B 52 D8 65 F9 33 07 53 5A 5D A9 9A 36
|
||||
0130 | DF 2A F6 48 8F EB D3 E8 68 FA 2E 84 2C 54 35 D7
|
||||
0140 | 1C 4F BE B1 0E 07 F4 40 B1 39 7B 46 E3 EB F7 71
|
||||
0150 | 95 68 97 76 40 B2 94 47 43 89 C8 AD 1F 2C 54 B5
|
||||
0160 | 55 98 20 F1 3F E0 3D AE 8D D1 9A 09 E3 C0 EA 97
|
||||
0170 | 7B 98 D2 2F 6F E9 C9 9C 22 EB 98 F6 A6 87 BA 0C
|
||||
0180 | 16 66 48 3F AD 6A 71 22 87 32 28 05 20 0A 93 B8
|
||||
0190 | 70 ED 19 DE 0C D5 7F A4 B8 78 68 A3 B0 A7 41 A5
|
||||
01A0 | A9 28 52 DF 2E 60 4F E8 91 9C DC 2D F0 A3 80 02
|
||||
01B0 | CA FA 7A 50 1F 1B D6 83 70 B9 BF DB A8 E9 8B FC
|
||||
01C0 | B2 17 4B 35 29 43 D4 A8 2E 3E 9F C3 AF 3A F7 B0
|
||||
01D0 | 59 72 10 35 D7 21 13 96 7A 2E D6 4D EE 0E 78 A0
|
||||
01E0 | 0A AD 09 72 58 65 03 32 A9 65 FC 48 9A 3F ED 2D
|
||||
01F0 | B3 AA 9A F4 8D D3 2A C3 69 B5 7C A0 DB 0D 5B 54
|
||||
0200 | 8F A0 C2 F6 96 5D 2C 5B 46 22 DC 97 72 86 B6 E0
|
||||
0210 | 30 5F D9 F0 7C BC 59 83 82 BF 3C AB 0D 70 F2 CD
|
||||
0220 | 59 AA 5F CB 37 0C FF CF FF A8 A8 CA E2 35 9F E9
|
||||
0230 | BE 35 86 2A F2 45 FD 30 D6 44 1A 6B 89 91 DD 1B
|
||||
0240 | 8B F8 1C 14 9C 31 7F D6 55 B3 C6 7B EC EF 93 82
|
||||
0250 | 65 55 ED 07 E8 7A 96 18 47 A1 42 05 9C 42 E3 26
|
||||
0260 | 85 27 9D 15 A0 71 DF BA D5 C5 9B C2 46 28 76 9C
|
||||
0270 | 16 91 D7 7A EC 24 DA FA 76 B2 FE B5 1C 40 EE 1A
|
||||
0280 | B3 1A 7E 0A 39 24 1A 6B 23 08 9C CB</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 = CD8C4EDA27DA91F03C9F8CF051671783BD56D31E5B19B9CFA703A84F0
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01B8EC7910099E66</code></td>
|
||||
<td><code>01C4CDD48D3CA166</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>D4020000</code> (724 in decimal)</td>
|
||||
<td><code>BC020000</code> (700 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = CD8C4EDA27DA91F03C9F8CF051671783BD56D31E5B19B9CFA703A84F0
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>FE7EE38C9FB2A0E15D1ABB74C2E133D2</code></td>
|
||||
<td><code>F6085A66812575E28112E1299D0F626E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>B11B0686D343E5FBBCDC58F88E1E3AE8</code></td>
|
||||
<td><code>0E48CD96A1866061974658A430BD7733</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE500200844093D5803E056386D8C89B</code> <code>8880040345183FFB82DD621DDA6D88DA</code> <code>41A48D86E9E3ADF248535B804E7244A0</code> <code>7133476C01E1B000CEC815C5F7B88E4D</code> <code>0D05F6C94210EA34D5FC6ADD2DB98763</code> <code>0A0184867C7DE2C1EB4578E591F08847</code> <code>B8C40F8285D46CC251371775F3792896</code> <code>559ABF0C8F168C4DE1D60B4CAAA181F8</code> <code>2FEDDC3CFB6CBC4A7DB12BF8798C102A</code> <code>839E9DC51E6F7F978027A3B0A247685A</code> <code>3C0F1DCB12CE0D292037EA78C7B150F3</code> <code>A6FD31829D10EF21224F10BEB9A73DE7</code> <code>2B3B87E28E4778EED0DA4C193105D436</code> <code>C4E6FD4AC1608D01CBD3E7E1D78E96B9</code> <code>D8DC3C37F12B72055F88DA9BEAE226BA</code> <code>601DECFE20D5D9722FE534B845745FBF</code> <code>A0B2AE467F9A425A6FCE0A4E58B9AA51</code> <code>6ABCC68B78C64E634CDEA35321C37999</code> <code>D474DB0B3802575A086569199E1427B7</code> <code>D9F2D6D4624C4883AC6C7F37F83712E2</code> <code>3DF8D567F756DC002A5994E6657E634F</code> <code>CD0FB329ADB28954E5CDEBC88BA81019</code> <code>A23CA92B49D1392DA16BD9817F274787</code> <code>03F165FD8D1D077B8C44C925AD3A1195</code> <code>2EA5CC20F94B2CC64DB65B11ECDA5118</code> <code>695F8DFDE1F4CAB2D44D0E570789D4A1</code> <code>FAE65CEBD4573CA4D55A5CE99CE35D3E</code> <code>2FD5CC6074A2D74665697DD1ABD89C24</code> <code>F0392F079EFB4AA8AB93BEC6CE8A7C1A</code> <code>94D41525189F9CDC8629777A8FC5E2A8</code> <code>09ACA801F5695ABCFCA42CBAF4E77863</code> <code>46749CB8937AB5F476C7F2043C8DF991</code> <code>600FAB01CDA7CC4C3BAA38A756B415B6</code> <code>592A47E410827666334CEF01F69F6815</code> <code>249E0EEA4CDFD7C7A3E09CB4C0D31696</code> <code>A80D52787BE0B647CC7169122655B03F</code> <code>72BAA30034F81262DA9E2F531BDEFB57</code><br> <code>56C3218F</code></td>
|
||||
<td><code>FE5002005ACB297F7FABE4AEA1B02832</code> <code>EBD411B0E5423EEC0EE440B9431E23F7</code> <code>76347E2E33320F460F0B0FB429678B42</code> <code>3A82AF8C4D8FAC050C300C50154279D6</code> <code>841DDC1B5F91AE0040C380A11269C468</code> <code>4A66F04675EA257BF63460BF2726EEE7</code> <code>3B688FB30BD0C57EF7AAF38BD646129C</code> <code>6BDE80B3D03BCDC67B947AE4D3D07522</code> <code>C11AD2BEA8E9549FD5F4140FC96DB662</code> <code>50DAB836839C89F3383E1CCABC276154</code> <code>879309FD6E508BEAD47C210EA749ADD4</code> <code>9E82E23B085136F31A7A144D6BF1C7FC</code> <code>E26E479DCB0A5A3FDD7961DCCF34E072</code> <code>2E898103F727734DE3B18D7644996580</code> <code>1F0F912BD60F1CAE664CFC8B52D865F9</code> <code>3307535A5DA99A36DF2AF6488FEBD3E8</code> <code>68FA2E842C5435D71C4FBEB10E07F440</code> <code>B1397B46E3EBF7719568977640B29447</code> <code>4389C8AD1F2C54B5559820F13FE03DAE</code> <code>8DD19A09E3C0EA977B98D22F6FE9C99C</code> <code>22EB98F6A687BA0C1666483FAD6A7122</code> <code>87322805200A93B870ED19DE0CD57FA4</code> <code>B87868A3B0A741A5A92852DF2E604FE8</code> <code>919CDC2DF0A38002CAFA7A501F1BD683</code> <code>70B9BFDBA8E98BFCB2174B352943D4A8</code> <code>2E3E9FC3AF3AF7B059721035D7211396</code> <code>7A2ED64DEE0E78A00AAD097258650332</code> <code>A965FC489A3FED2DB3AA9AF48DD32AC3</code> <code>69B57CA0DB0D5B548FA0C2F6965D2C5B</code> <code>4622DC977286B6E0305FD9F07CBC5983</code> <code>82BF3CAB0D70F2CD59AA5FCB370CFFCF</code> <code>FFA8A8CAE2359FE9BE35862AF245FD30</code> <code>D6441A6B8991DD1B8BF81C149C317FD6</code> <code>55B3C67BECEF93826555ED07E87A9618</code> <code>47A142059C42E32685279D15A071DFBA</code> <code>D5C59BC24628769C1691D77AEC24DAFA</code> <code>76B2FEB51C40EE1AB31A7E0A39241A6B</code><br> <code>23089CCB</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = CD8C4EDA27DA91F03C9F8CF051671783BD56D31E5B19B9CFA703A84F0
|
|||
<!-- 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 = 844093D5803E056386D8C89B8880040345183FFB82DD621DDA6D88DA41A48D86E9E3ADF248535B804E7244A07133476C01E1B000CEC815C5F7B88E4D0D05F6C94210EA34D5FC6ADD2DB987630A0184867C7DE2C1EB4578E591F08847B8C40F8285D46CC251371775F3792896559ABF0C8F168C4DE1D60B4CAAA181F82FEDDC3CFB6CBC4A7DB12BF8798C102A839E9DC51E6F7F978027A3B0A247685A3C0F1DCB12CE0D292037EA78C7B150F3A6FD31829D10EF21224F10BEB9A73DE72B3B87E28E4778EED0DA4C193105D436C4E6FD4AC1608D01CBD3E7E1D78E96B9D8DC3C37F12B72055F88DA9BEAE226BA601DECFE20D5D9722FE534B845745FBFA0B2AE467F9A425A6FCE0A4E58B9AA516ABCC68B78C64E634CDEA35321C37999D474DB0B3802575A086569199E1427B7D9F2D6D4624C4883AC6C7F37F83712E23DF8D567F756DC002A5994E6657E634FCD0FB329ADB28954E5CDEBC88BA81019A23CA92B49D1392DA16BD9817F27478703F165FD8D1D077B8C44C925AD3A11952EA5CC20F94B2CC64DB65B11ECDA5118695F8DFDE1F4CAB2D44D0E570789D4A1FAE65CEBD4573CA4D55A5CE99CE35D3E2FD5CC6074A2D74665697DD1ABD89C24F0392F079EFB4AA8AB93BEC6CE8A7C1A94D41525189F9CDC8629777A8FC5E2A809ACA801F5695ABCFCA42CBAF4E7786346749CB8937AB5F476C7F2043C8DF991600FAB01CDA7CC4C3BAA38A756B415B6592A47E410827666334CEF01F69F6815249E0EEA4CDFD7C7A3E09CB4C0D31696A80D52787BE0B647CC7169122655B03F72BAA30034F81262DA9E2F531BDEFB5756C3218F
|
||||
tmp_aes_key = 3EA165C07C78DAE58DC98DCEEB5C450C0486C84A89912B7C61FC3DE69B22C462
|
||||
tmp_aes_iv = 26C2647D816DD787E49CD1779D8972657E8C20954468B1B623AF61492E2D4644</code></pre>
|
||||
<pre><code>encrypted_answer = 5ACB297F7FABE4AEA1B02832EBD411B0E5423EEC0EE440B9431E23F776347E2E33320F460F0B0FB429678B423A82AF8C4D8FAC050C300C50154279D6841DDC1B5F91AE0040C380A11269C4684A66F04675EA257BF63460BF2726EEE73B688FB30BD0C57EF7AAF38BD646129C6BDE80B3D03BCDC67B947AE4D3D07522C11AD2BEA8E9549FD5F4140FC96DB66250DAB836839C89F3383E1CCABC276154879309FD6E508BEAD47C210EA749ADD49E82E23B085136F31A7A144D6BF1C7FCE26E479DCB0A5A3FDD7961DCCF34E0722E898103F727734DE3B18D76449965801F0F912BD60F1CAE664CFC8B52D865F93307535A5DA99A36DF2AF6488FEBD3E868FA2E842C5435D71C4FBEB10E07F440B1397B46E3EBF7719568977640B294474389C8AD1F2C54B5559820F13FE03DAE8DD19A09E3C0EA977B98D22F6FE9C99C22EB98F6A687BA0C1666483FAD6A712287322805200A93B870ED19DE0CD57FA4B87868A3B0A741A5A92852DF2E604FE8919CDC2DF0A38002CAFA7A501F1BD68370B9BFDBA8E98BFCB2174B352943D4A82E3E9FC3AF3AF7B059721035D72113967A2ED64DEE0E78A00AAD097258650332A965FC489A3FED2DB3AA9AF48DD32AC369B57CA0DB0D5B548FA0C2F6965D2C5B4622DC977286B6E0305FD9F07CBC598382BF3CAB0D70F2CD59AA5FCB370CFFCFFFA8A8CAE2359FE9BE35862AF245FD30D6441A6B8991DD1B8BF81C149C317FD655B3C67BECEF93826555ED07E87A961847A142059C42E32685279D15A071DFBAD5C59BC24628769C1691D77AEC24DAFA76B2FEB51C40EE1AB31A7E0A39241A6B23089CCB
|
||||
tmp_aes_key = 174BB7DE1552D7E4A81205A0A423C492A6935F82DF6DC6334CAE2C306CD60137
|
||||
tmp_aes_iv = 44C5026626D067174BA9CDFDCF7D7091E4F40F256F7FE12A8C857F3581EC6A3B</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = 7735F1F3FCCAA9D818D6EA08ED253E7FB917F099BA0D89B5FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010046E70BFCC5BAE4B1679086DC059F413F9DD08E5CF0FA1A4983B4348D73304421E92F886B56DD9F94039383507A4F09B313647F2D425C07C3A2E27A5F48D06F26FC447A23613BB4E3D9727A7A708DA10AB432A3B840BAEBAECDA42C1E37EF15C6DB83144175D2683AF991642C0BE636C4F2E9E442FEA9C2CF5A73FAB7D0BDB15542AD7526A7380ED146B9BE36D37CA71EEE89CF3CEAF190BF2C60ED42670A8C2F330E8A2EDB3F6A066BF01C2C5C3C17AC294616E80C5DEC7DD7F5A615C01EFF233ABEFAC6D3D2DC04DB2BF72E36C2BF844C85BC74C5BDFB0F5841DC65F83AD060DF3A6941D80B05019D79FC73D761D342B172ABBD0283F56F1097B565A8AB7AD610099E66DCA7B3C9DC376E81
|
||||
answer = BA0D89B5FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010046E70BFCC5BAE4B1679086DC059F413F9DD08E5CF0FA1A4983B4348D73304421E92F886B56DD9F94039383507A4F09B313647F2D425C07C3A2E27A5F48D06F26FC447A23613BB4E3D9727A7A708DA10AB432A3B840BAEBAECDA42C1E37EF15C6DB83144175D2683AF991642C0BE636C4F2E9E442FEA9C2CF5A73FAB7D0BDB15542AD7526A7380ED146B9BE36D37CA71EEE89CF3CEAF190BF2C60ED42670A8C2F330E8A2EDB3F6A066BF01C2C5C3C17AC294616E80C5DEC7DD7F5A615C01EFF233ABEFAC6D3D2DC04DB2BF72E36C2BF844C85BC74C5BDFB0F5841DC65F83AD060DF3A6941D80B05019D79FC73D761D342B172ABBD0283F56F1097B565A8AB7AD610099E66DCA7B3C9DC376E81</code></pre>
|
||||
<pre><code>answer_with_hash = 7335E0952695FE66EF25E4DDE351725C35C310D6BA0D89B5F6085A66812575E28112E1299D0F626E0E48CD96A1866061974658A430BD773303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010032F36F957997386EAF11A538C81CFBAA3BEF08528257C8D1E2BD9BE5359D00A6D20C56E74DE8E9E245451B2CB4A16CD58BA711F076848CB61779AFE8760D2F60BC99886887ABE04E8EB616E23EA0015467E98E35D6EC3D2A01E6523EC0CB5D75E9F6EBAC67C9131EE89BD91828F7C1A727D0AB19888E826E4A08B121D3AC3D8450FC53FE9C35C389081279297D5912B7878E071F7BD14D7916BFFFD8C402C106CD8784C12EFC79ECF20F65ABAEF8E72C8878BF8BC21418CB406775CEA752671EAF6DAB7ABCB0692A93180A93906A911FFF6AD161433630897F18CC5A7D4CBEAF20793336756FDE2098F001CFE820A6D0FB863E873DAA54E95269F50CFF9922638D3CA1660493879370953445
|
||||
answer = BA0D89B5F6085A66812575E28112E1299D0F626E0E48CD96A1866061974658A430BD773303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010032F36F957997386EAF11A538C81CFBAA3BEF08528257C8D1E2BD9BE5359D00A6D20C56E74DE8E9E245451B2CB4A16CD58BA711F076848CB61779AFE8760D2F60BC99886887ABE04E8EB616E23EA0015467E98E35D6EC3D2A01E6523EC0CB5D75E9F6EBAC67C9131EE89BD91828F7C1A727D0AB19888E826E4A08B121D3AC3D8450FC53FE9C35C389081279297D5912B7878E071F7BD14D7916BFFFD8C402C106CD8784C12EFC79ECF20F65ABAEF8E72C8878BF8BC21418CB406775CEA752671EAF6DAB7ABCB0692A93180A93906A911FFF6AD161433630897F18CC5A7D4CBEAF20793336756FDE2098F001CFE820A6D0FB863E873DAA54E95269F50CFF9922638D3CA1660493879370953445</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 FE 7E E3 8C 9F B2 A0 E1 5D 1A BB 74
|
||||
0010 | C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB BC DC 58 F8
|
||||
0020 | 8E 1E 3A E8 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 F6 08 5A 66 81 25 75 E2 81 12 E1 29
|
||||
0010 | 9D 0F 62 6E 0E 48 CD 96 A1 86 60 61 97 46 58 A4
|
||||
0020 | 30 BD 77 33 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 = BA0D89B5FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE
|
|||
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 | 46 E7 0B FC C5 BA E4 B1 67 90 86 DC 05 9F 41 3F
|
||||
0140 | 9D D0 8E 5C F0 FA 1A 49 83 B4 34 8D 73 30 44 21
|
||||
0150 | E9 2F 88 6B 56 DD 9F 94 03 93 83 50 7A 4F 09 B3
|
||||
0160 | 13 64 7F 2D 42 5C 07 C3 A2 E2 7A 5F 48 D0 6F 26
|
||||
0170 | FC 44 7A 23 61 3B B4 E3 D9 72 7A 7A 70 8D A1 0A
|
||||
0180 | B4 32 A3 B8 40 BA EB AE CD A4 2C 1E 37 EF 15 C6
|
||||
0190 | DB 83 14 41 75 D2 68 3A F9 91 64 2C 0B E6 36 C4
|
||||
01A0 | F2 E9 E4 42 FE A9 C2 CF 5A 73 FA B7 D0 BD B1 55
|
||||
01B0 | 42 AD 75 26 A7 38 0E D1 46 B9 BE 36 D3 7C A7 1E
|
||||
01C0 | EE 89 CF 3C EA F1 90 BF 2C 60 ED 42 67 0A 8C 2F
|
||||
01D0 | 33 0E 8A 2E DB 3F 6A 06 6B F0 1C 2C 5C 3C 17 AC
|
||||
01E0 | 29 46 16 E8 0C 5D EC 7D D7 F5 A6 15 C0 1E FF 23
|
||||
01F0 | 3A BE FA C6 D3 D2 DC 04 DB 2B F7 2E 36 C2 BF 84
|
||||
0200 | 4C 85 BC 74 C5 BD FB 0F 58 41 DC 65 F8 3A D0 60
|
||||
0210 | DF 3A 69 41 D8 0B 05 01 9D 79 FC 73 D7 61 D3 42
|
||||
0220 | B1 72 AB BD 02 83 F5 6F 10 97 B5 65 A8 AB 7A D6
|
||||
0230 | 10 09 9E 66</code></pre>
|
||||
0130 | 32 F3 6F 95 79 97 38 6E AF 11 A5 38 C8 1C FB AA
|
||||
0140 | 3B EF 08 52 82 57 C8 D1 E2 BD 9B E5 35 9D 00 A6
|
||||
0150 | D2 0C 56 E7 4D E8 E9 E2 45 45 1B 2C B4 A1 6C D5
|
||||
0160 | 8B A7 11 F0 76 84 8C B6 17 79 AF E8 76 0D 2F 60
|
||||
0170 | BC 99 88 68 87 AB E0 4E 8E B6 16 E2 3E A0 01 54
|
||||
0180 | 67 E9 8E 35 D6 EC 3D 2A 01 E6 52 3E C0 CB 5D 75
|
||||
0190 | E9 F6 EB AC 67 C9 13 1E E8 9B D9 18 28 F7 C1 A7
|
||||
01A0 | 27 D0 AB 19 88 8E 82 6E 4A 08 B1 21 D3 AC 3D 84
|
||||
01B0 | 50 FC 53 FE 9C 35 C3 89 08 12 79 29 7D 59 12 B7
|
||||
01C0 | 87 8E 07 1F 7B D1 4D 79 16 BF FF D8 C4 02 C1 06
|
||||
01D0 | CD 87 84 C1 2E FC 79 EC F2 0F 65 AB AE F8 E7 2C
|
||||
01E0 | 88 78 BF 8B C2 14 18 CB 40 67 75 CE A7 52 67 1E
|
||||
01F0 | AF 6D AB 7A BC B0 69 2A 93 18 0A 93 90 6A 91 1F
|
||||
0200 | FF 6A D1 61 43 36 30 89 7F 18 CC 5A 7D 4C BE AF
|
||||
0210 | 20 79 33 36 75 6F DE 20 98 F0 01 CF E8 20 A6 D0
|
||||
0220 | FB 86 3E 87 3D AA 54 E9 52 69 F5 0C FF 99 22 63
|
||||
0230 | 8D 3C A1 66</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -570,13 +570,13 @@ answer = BA0D89B5FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>FE7EE38C9FB2A0E15D1ABB74C2E133D2</code></td>
|
||||
<td><code>F6085A66812575E28112E1299D0F626E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>B11B0686D343E5FBBCDC58F88E1E3AE8</code></td>
|
||||
<td><code>0E48CD96A1866061974658A430BD7733</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B5FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE00010046E70BFCC5BAE4B1679086DC</code> <code>059F413F9DD08E5CF0FA1A4983B4348D</code> <code>73304421E92F886B56DD9F9403938350</code> <code>7A4F09B313647F2D425C07C3A2E27A5F</code> <code>48D06F26FC447A23613BB4E3D9727A7A</code> <code>708DA10AB432A3B840BAEBAECDA42C1E</code> <code>37EF15C6DB83144175D2683AF991642C</code> <code>0BE636C4F2E9E442FEA9C2CF5A73FAB7</code> <code>D0BDB15542AD7526A7380ED146B9BE36</code> <code>D37CA71EEE89CF3CEAF190BF2C60ED42</code> <code>670A8C2F330E8A2EDB3F6A066BF01C2C</code> <code>5C3C17AC294616E80C5DEC7DD7F5A615</code> <code>C01EFF233ABEFAC6D3D2DC04DB2BF72E</code> <code>36C2BF844C85BC74C5BDFB0F5841DC65</code> <code>F83AD060DF3A6941D80B05019D79FC73</code> <code>D761D342B172ABBD0283F56F1097B565</code><br> <code>A8AB7AD6</code></td>
|
||||
<td><code>FE00010032F36F957997386EAF11A538</code> <code>C81CFBAA3BEF08528257C8D1E2BD9BE5</code> <code>359D00A6D20C56E74DE8E9E245451B2C</code> <code>B4A16CD58BA711F076848CB61779AFE8</code> <code>760D2F60BC99886887ABE04E8EB616E2</code> <code>3EA0015467E98E35D6EC3D2A01E6523E</code> <code>C0CB5D75E9F6EBAC67C9131EE89BD918</code> <code>28F7C1A727D0AB19888E826E4A08B121</code> <code>D3AC3D8450FC53FE9C35C38908127929</code> <code>7D5912B7878E071F7BD14D7916BFFFD8</code> <code>C402C106CD8784C12EFC79ECF20F65AB</code> <code>AEF8E72C8878BF8BC21418CB406775CE</code> <code>A752671EAF6DAB7ABCB0692A93180A93</code> <code>906A911FFF6AD161433630897F18CC5A</code> <code>7D4CBEAF20793336756FDE2098F001CF</code> <code>E820A6D0FB863E873DAA54E95269F50C</code><br> <code>FF992263</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>10099E66</code> (1721633040 in decimal)</td>
|
||||
<td><code>8D3CA166</code> (1721842829 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B5FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE
|
|||
<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 = F88FE91EE7603AD761249BA53321D1F06CA7165D5B1356B848B8455C10F77523B3612E2030E82483C2C3AD1749751F67CF8CE5C4CF31CECB085B378660B4F3B495EB8130451A7E0F502643542AD5CF81A142A88E6AD4DA0553FAB0E92C88DDB8FF8D857CA1085C097502CF5B302C0BF972025FC3AA16BD727AA1960D99EEBC34CE36D915BA9CEFF39C979FF5DE214C9AC2DBA788B68796B406CBDCD34F15F0CA7A8D5C3BA480F818AC9D443AA0CBE1012E2CAA99369861ADFB2B117D01B091EBE08EBABAF704EECD97FBC4B64FC0A371D6A821148E8C6E62E34ADC5FDFF9998D32A0914F29635EE83E639273368EA59CC90140A52D55324B4DD092715CF23438</code></pre>
|
||||
<pre><code>b = 47C6293E96DCA931575A926C2BA7DB887F7463B4E5A5C54AAE9D693B1359D618B40F264DF4AC47F2CC6EFBC6DA31EDA8779E4B9654898ADF0632BBB707709C5395B6930F4076EFB7FBF09F47AA0E89D784C81161F1AC13FE051E996631586C3C50688C90B00A549F129DF9F42472E4F596A9F3547B9C4B94C0D7BA9CDBA8A006E1F4965BAB3841CA6B77CF7BC1107B8DADCA5BBBA8B913B57F1B2C87298E2B3F4C3D83F76514447739A58311C18356B57A3793CBD57812386D32961ECBF32DCD574A202106E18E41D24F75EDC80D66795FB4B4825D34CD16E5F02578613593751BB2BA05FE48FE6048F68CE9D28E91C6BA686B7F3E6F7E09B661FC54809DA290</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 = 570CD13FAE7E98F38DC9F976653674A6B9D88176BFB9DDA0A044A7B6D297640AA7EC2338DA3C7934FA7615BC92E9B11F691B753327B06D245398D59C0581BEDE54D1164CE22C20626380C3BE23A9E117A347A81C6D60DFD86FEFD3FC9DF00F15D62F15A6809B6A616411A8AC950C2470ABF61FE7D5812209003D821DFD8FB75E2D90491EFD374511366C5ADF51EFB9E95148C8D0027B9D803B3471B6D9D53E7CEC3502C5D2896BB4D255C96DF2215F296E131E1EEC7EC4A12431ED6DB95097FE36BFA720CD9340866C437A312A5E8FE2BE14B7FDDB37F5891887BB054FCBC59774E805DEDA23F0DC8D17C763626922369F3646021A9A85123EB40DAE5B912465</code></pre>
|
||||
<pre><code>g_b = BC6AF6A9EFC35949F0F6695B7148242A282D45E2F28BCE2184414F0E1210C9179ADCB715964979BDE3101270BBF8FDB8EF17DE5ADC25386293668D13580CB275A7F56A14140E9110EAD1D5C22F02159CFFBCF8C113E57A48E4F8C2368B282133043B92E9817C967BB4F562AABEBD0FEF8DB3E87D1653BD3835C2906A593EF384F209A564C0BFBCB7E036141C8F9F1A48F42FBFE2A5090BBD95E32E0C6990C7BE974BD9A9C1EB983917A602EA6ADBA03582899F8DA52F2E588B91AF45D1703AEADE35232DA9A0BAC3EE8DD7A8BE5FAECC1AC0A2C24C951A717A8E07A1793995644B60F96F769FD08655D6154F472D74B176834D656C48FC3F30C9A1820729CD5B</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 FE 7E E3 8C 9F B2 A0 E1 5D 1A BB 74
|
||||
0010 | C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB BC DC 58 F8
|
||||
0020 | 8E 1E 3A E8 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 57 0C D1 3F AE 7E 98 F3 8D C9 F9 76 65 36 74 A6
|
||||
0040 | B9 D8 81 76 BF B9 DD A0 A0 44 A7 B6 D2 97 64 0A
|
||||
0050 | A7 EC 23 38 DA 3C 79 34 FA 76 15 BC 92 E9 B1 1F
|
||||
0060 | 69 1B 75 33 27 B0 6D 24 53 98 D5 9C 05 81 BE DE
|
||||
0070 | 54 D1 16 4C E2 2C 20 62 63 80 C3 BE 23 A9 E1 17
|
||||
0080 | A3 47 A8 1C 6D 60 DF D8 6F EF D3 FC 9D F0 0F 15
|
||||
0090 | D6 2F 15 A6 80 9B 6A 61 64 11 A8 AC 95 0C 24 70
|
||||
00A0 | AB F6 1F E7 D5 81 22 09 00 3D 82 1D FD 8F B7 5E
|
||||
00B0 | 2D 90 49 1E FD 37 45 11 36 6C 5A DF 51 EF B9 E9
|
||||
00C0 | 51 48 C8 D0 02 7B 9D 80 3B 34 71 B6 D9 D5 3E 7C
|
||||
00D0 | EC 35 02 C5 D2 89 6B B4 D2 55 C9 6D F2 21 5F 29
|
||||
00E0 | 6E 13 1E 1E EC 7E C4 A1 24 31 ED 6D B9 50 97 FE
|
||||
00F0 | 36 BF A7 20 CD 93 40 86 6C 43 7A 31 2A 5E 8F E2
|
||||
0100 | BE 14 B7 FD DB 37 F5 89 18 87 BB 05 4F CB C5 97
|
||||
0110 | 74 E8 05 DE DA 23 F0 DC 8D 17 C7 63 62 69 22 36
|
||||
0120 | 9F 36 46 02 1A 9A 85 12 3E B4 0D AE 5B 91 24 65</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 F6 08 5A 66 81 25 75 E2 81 12 E1 29
|
||||
0010 | 9D 0F 62 6E 0E 48 CD 96 A1 86 60 61 97 46 58 A4
|
||||
0020 | 30 BD 77 33 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | BC 6A F6 A9 EF C3 59 49 F0 F6 69 5B 71 48 24 2A
|
||||
0040 | 28 2D 45 E2 F2 8B CE 21 84 41 4F 0E 12 10 C9 17
|
||||
0050 | 9A DC B7 15 96 49 79 BD E3 10 12 70 BB F8 FD B8
|
||||
0060 | EF 17 DE 5A DC 25 38 62 93 66 8D 13 58 0C B2 75
|
||||
0070 | A7 F5 6A 14 14 0E 91 10 EA D1 D5 C2 2F 02 15 9C
|
||||
0080 | FF BC F8 C1 13 E5 7A 48 E4 F8 C2 36 8B 28 21 33
|
||||
0090 | 04 3B 92 E9 81 7C 96 7B B4 F5 62 AA BE BD 0F EF
|
||||
00A0 | 8D B3 E8 7D 16 53 BD 38 35 C2 90 6A 59 3E F3 84
|
||||
00B0 | F2 09 A5 64 C0 BF BC B7 E0 36 14 1C 8F 9F 1A 48
|
||||
00C0 | F4 2F BF E2 A5 09 0B BD 95 E3 2E 0C 69 90 C7 BE
|
||||
00D0 | 97 4B D9 A9 C1 EB 98 39 17 A6 02 EA 6A DB A0 35
|
||||
00E0 | 82 89 9F 8D A5 2F 2E 58 8B 91 AF 45 D1 70 3A EA
|
||||
00F0 | DE 35 23 2D A9 A0 BA C3 EE 8D D7 A8 BE 5F AE CC
|
||||
0100 | 1A C0 A2 C2 4C 95 1A 71 7A 8E 07 A1 79 39 95 64
|
||||
0110 | 4B 60 F9 6F 76 9F D0 86 55 D6 15 4F 47 2D 74 B1
|
||||
0120 | 76 83 4D 65 6C 48 FC 3F 30 C9 A1 82 07 29 CD 5B</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 = BA0D89B5FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>FE7EE38C9FB2A0E15D1ABB74C2E133D2</code></td>
|
||||
<td><code>F6085A66812575E28112E1299D0F626E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>B11B0686D343E5FBBCDC58F88E1E3AE8</code></td>
|
||||
<td><code>0E48CD96A1866061974658A430BD7733</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE000100570CD13FAE7E98F38DC9F976</code> <code>653674A6B9D88176BFB9DDA0A044A7B6</code> <code>D297640AA7EC2338DA3C7934FA7615BC</code> <code>92E9B11F691B753327B06D245398D59C</code> <code>0581BEDE54D1164CE22C20626380C3BE</code> <code>23A9E117A347A81C6D60DFD86FEFD3FC</code> <code>9DF00F15D62F15A6809B6A616411A8AC</code> <code>950C2470ABF61FE7D5812209003D821D</code> <code>FD8FB75E2D90491EFD374511366C5ADF</code> <code>51EFB9E95148C8D0027B9D803B3471B6</code> <code>D9D53E7CEC3502C5D2896BB4D255C96D</code> <code>F2215F296E131E1EEC7EC4A12431ED6D</code> <code>B95097FE36BFA720CD9340866C437A31</code> <code>2A5E8FE2BE14B7FDDB37F5891887BB05</code> <code>4FCBC59774E805DEDA23F0DC8D17C763</code> <code>626922369F3646021A9A85123EB40DAE</code><br> <code>5B912465</code></td>
|
||||
<td><code>FE000100BC6AF6A9EFC35949F0F6695B</code> <code>7148242A282D45E2F28BCE2184414F0E</code> <code>1210C9179ADCB715964979BDE3101270</code> <code>BBF8FDB8EF17DE5ADC25386293668D13</code> <code>580CB275A7F56A14140E9110EAD1D5C2</code> <code>2F02159CFFBCF8C113E57A48E4F8C236</code> <code>8B282133043B92E9817C967BB4F562AA</code> <code>BEBD0FEF8DB3E87D1653BD3835C2906A</code> <code>593EF384F209A564C0BFBCB7E036141C</code> <code>8F9F1A48F42FBFE2A5090BBD95E32E0C</code> <code>6990C7BE974BD9A9C1EB983917A602EA</code> <code>6ADBA03582899F8DA52F2E588B91AF45</code> <code>D1703AEADE35232DA9A0BAC3EE8DD7A8</code> <code>BE5FAECC1AC0A2C24C951A717A8E07A1</code> <code>793995644B60F96F769FD08655D6154F</code> <code>472D74B176834D656C48FC3F30C9A182</code><br> <code>0729CD5B</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 = BA0D89B5FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE
|
|||
<!-- 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 = 54B64366FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE80000000000000000FE000100570CD13FAE7E98F38DC9F976653674A6B9D88176BFB9DDA0A044A7B6D297640AA7EC2338DA3C7934FA7615BC92E9B11F691B753327B06D245398D59C0581BEDE54D1164CE22C20626380C3BE23A9E117A347A81C6D60DFD86FEFD3FC9DF00F15D62F15A6809B6A616411A8AC950C2470ABF61FE7D5812209003D821DFD8FB75E2D90491EFD374511366C5ADF51EFB9E95148C8D0027B9D803B3471B6D9D53E7CEC3502C5D2896BB4D255C96DF2215F296E131E1EEC7EC4A12431ED6DB95097FE36BFA720CD9340866C437A312A5E8FE2BE14B7FDDB37F5891887BB054FCBC59774E805DEDA23F0DC8D17C763626922369F3646021A9A85123EB40DAE5B912465
|
||||
padding = 93A82B4F98CCB78C36ECC67C
|
||||
tmp_aes_key = 3EA165C07C78DAE58DC98DCEEB5C450C0486C84A89912B7C61FC3DE69B22C462
|
||||
tmp_aes_iv = 26C2647D816DD787E49CD1779D8972657E8C20954468B1B623AF61492E2D4644</code></pre>
|
||||
<pre><code>data = 54B64366F6085A66812575E28112E1299D0F626E0E48CD96A1866061974658A430BD77330000000000000000FE000100BC6AF6A9EFC35949F0F6695B7148242A282D45E2F28BCE2184414F0E1210C9179ADCB715964979BDE3101270BBF8FDB8EF17DE5ADC25386293668D13580CB275A7F56A14140E9110EAD1D5C22F02159CFFBCF8C113E57A48E4F8C2368B282133043B92E9817C967BB4F562AABEBD0FEF8DB3E87D1653BD3835C2906A593EF384F209A564C0BFBCB7E036141C8F9F1A48F42FBFE2A5090BBD95E32E0C6990C7BE974BD9A9C1EB983917A602EA6ADBA03582899F8DA52F2E588B91AF45D1703AEADE35232DA9A0BAC3EE8DD7A8BE5FAECC1AC0A2C24C951A717A8E07A1793995644B60F96F769FD08655D6154F472D74B176834D656C48FC3F30C9A1820729CD5B
|
||||
padding = DAE32D43BBB2AF152A9A7456
|
||||
tmp_aes_key = 174BB7DE1552D7E4A81205A0A423C492A6935F82DF6DC6334CAE2C306CD60137
|
||||
tmp_aes_iv = 44C5026626D067174BA9CDFDCF7D7091E4F40F256F7FE12A8C857F3581EC6A3B</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 = 0FADE83C081F2D935766DBFA33666AEF249C17339F5AE8BC952D2FD58765672E2DAE53C6885DF337B19B023CEB3BA974905EE6293D85E5061DB24DF7F8DB5A2FE7EF5CD8459AFA74C2CE1D53348073EF99F5FBCD08E3E963FB037D18832C34A0AFBE5C90E420CED585D883DD3538C93C11CB8110560964FE12C51696DDBCBD18A469FBA72B42D57CFA54F6E50D6EC476AF328E70A6213C49A9566A946845E6627EB360EBA89F1AF20E4704792A033DC09C5DDC94070B04D031BE8149A4B720AFC13868DF13144FA299882422DA45EF6B0AC7B09338CFDD4B656D27CBD20AE301D4D160233EB69A9AD6A19F2854C3E5BE0D4AC635FA1CD15540440E9B8A3CBD8E8B3A602057197E78038E988BB0671694E778F531750A5A5DE5BEF31AAB97CAD542048E2C940A1F146F1B6BF030500B6AB67A87B89F57B207A2F6B0053C6ADD8E0AD1728E5DC80280AEFACD9FC7323F2B</code></pre>
|
||||
<pre><code>encrypted_data = DBC5D7D540BD682F97D3F0E7A4807759E7EF315D17972BBB694B9A7A857EDDF9B937312FAA6CA829F8FAE60FBBAD1ADFD03643DCB9591A1A3E73AE09DC2692DCD9E505D055EEACC482C8636058745323BCB1F2934D8D6DAFB8C1FABE02B55B6F65113F29B7B5FC1C66E7CC9426803AD2706820DF20B7E150C3E60A1521067106E8D79842186ABDCE37055658FF056FA02A332611C31A8BC501D8E10986E24DE9D27EE31E57B40E1B9841B1B52734CDDD2227B7DD144AC7C0EC8917160092AC385C122E2CD9D7CD728DF982B12B2619DA7871302BE67C877490FF798A7FAD49FCABFF72B56991C6BB4CC23B04AC3A3E3689DD76940152D717AAE842916FD174451809CCE5B30FEFE196DC0D2E839CE55653B206D7EE292C609F2A94CB171AB953751ABEA675BC5BD148358E68E780291C79840DBC609B09D2AF1684012DB2564839E3ED2CCE13E25E506C4BE5E1A25C29</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 40 0F 05 00 11 09 9E 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 FE 7E E3 8C 9F B2 A0 E1
|
||||
0020 | 5D 1A BB 74 C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB
|
||||
0030 | BC DC 58 F8 8E 1E 3A E8 FE 50 01 00 0F AD E8 3C
|
||||
0040 | 08 1F 2D 93 57 66 DB FA 33 66 6A EF 24 9C 17 33
|
||||
0050 | 9F 5A E8 BC 95 2D 2F D5 87 65 67 2E 2D AE 53 C6
|
||||
0060 | 88 5D F3 37 B1 9B 02 3C EB 3B A9 74 90 5E E6 29
|
||||
0070 | 3D 85 E5 06 1D B2 4D F7 F8 DB 5A 2F E7 EF 5C D8
|
||||
0080 | 45 9A FA 74 C2 CE 1D 53 34 80 73 EF 99 F5 FB CD
|
||||
0090 | 08 E3 E9 63 FB 03 7D 18 83 2C 34 A0 AF BE 5C 90
|
||||
00A0 | E4 20 CE D5 85 D8 83 DD 35 38 C9 3C 11 CB 81 10
|
||||
00B0 | 56 09 64 FE 12 C5 16 96 DD BC BD 18 A4 69 FB A7
|
||||
00C0 | 2B 42 D5 7C FA 54 F6 E5 0D 6E C4 76 AF 32 8E 70
|
||||
00D0 | A6 21 3C 49 A9 56 6A 94 68 45 E6 62 7E B3 60 EB
|
||||
00E0 | A8 9F 1A F2 0E 47 04 79 2A 03 3D C0 9C 5D DC 94
|
||||
00F0 | 07 0B 04 D0 31 BE 81 49 A4 B7 20 AF C1 38 68 DF
|
||||
0100 | 13 14 4F A2 99 88 24 22 DA 45 EF 6B 0A C7 B0 93
|
||||
0110 | 38 CF DD 4B 65 6D 27 CB D2 0A E3 01 D4 D1 60 23
|
||||
0120 | 3E B6 9A 9A D6 A1 9F 28 54 C3 E5 BE 0D 4A C6 35
|
||||
0130 | FA 1C D1 55 40 44 0E 9B 8A 3C BD 8E 8B 3A 60 20
|
||||
0140 | 57 19 7E 78 03 8E 98 8B B0 67 16 94 E7 78 F5 31
|
||||
0150 | 75 0A 5A 5D E5 BE F3 1A AB 97 CA D5 42 04 8E 2C
|
||||
0160 | 94 0A 1F 14 6F 1B 6B F0 30 50 0B 6A B6 7A 87 B8
|
||||
0170 | 9F 57 B2 07 A2 F6 B0 05 3C 6A DD 8E 0A D1 72 8E
|
||||
0180 | 5D C8 02 80 AE FA CD 9F C7 32 3F 2B</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 A0 10 07 00 8D 3C A1 66
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 F6 08 5A 66 81 25 75 E2
|
||||
0020 | 81 12 E1 29 9D 0F 62 6E 0E 48 CD 96 A1 86 60 61
|
||||
0030 | 97 46 58 A4 30 BD 77 33 FE 50 01 00 DB C5 D7 D5
|
||||
0040 | 40 BD 68 2F 97 D3 F0 E7 A4 80 77 59 E7 EF 31 5D
|
||||
0050 | 17 97 2B BB 69 4B 9A 7A 85 7E DD F9 B9 37 31 2F
|
||||
0060 | AA 6C A8 29 F8 FA E6 0F BB AD 1A DF D0 36 43 DC
|
||||
0070 | B9 59 1A 1A 3E 73 AE 09 DC 26 92 DC D9 E5 05 D0
|
||||
0080 | 55 EE AC C4 82 C8 63 60 58 74 53 23 BC B1 F2 93
|
||||
0090 | 4D 8D 6D AF B8 C1 FA BE 02 B5 5B 6F 65 11 3F 29
|
||||
00A0 | B7 B5 FC 1C 66 E7 CC 94 26 80 3A D2 70 68 20 DF
|
||||
00B0 | 20 B7 E1 50 C3 E6 0A 15 21 06 71 06 E8 D7 98 42
|
||||
00C0 | 18 6A BD CE 37 05 56 58 FF 05 6F A0 2A 33 26 11
|
||||
00D0 | C3 1A 8B C5 01 D8 E1 09 86 E2 4D E9 D2 7E E3 1E
|
||||
00E0 | 57 B4 0E 1B 98 41 B1 B5 27 34 CD DD 22 27 B7 DD
|
||||
00F0 | 14 4A C7 C0 EC 89 17 16 00 92 AC 38 5C 12 2E 2C
|
||||
0100 | D9 D7 CD 72 8D F9 82 B1 2B 26 19 DA 78 71 30 2B
|
||||
0110 | E6 7C 87 74 90 FF 79 8A 7F AD 49 FC AB FF 72 B5
|
||||
0120 | 69 91 C6 BB 4C C2 3B 04 AC 3A 3E 36 89 DD 76 94
|
||||
0130 | 01 52 D7 17 AA E8 42 91 6F D1 74 45 18 09 CC E5
|
||||
0140 | B3 0F EF E1 96 DC 0D 2E 83 9C E5 56 53 B2 06 D7
|
||||
0150 | EE 29 2C 60 9F 2A 94 CB 17 1A B9 53 75 1A BE A6
|
||||
0160 | 75 BC 5B D1 48 35 8E 68 E7 80 29 1C 79 84 0D BC
|
||||
0170 | 60 9B 09 D2 AF 16 84 01 2D B2 56 48 39 E3 ED 2C
|
||||
0180 | CE 13 E2 5E 50 6C 4B E5 E1 A2 5C 29</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>400F050011099E66</code></td>
|
||||
<td><code>A01007008D3CA166</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 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>FE7EE38C9FB2A0E15D1ABB74C2E133D2</code></td>
|
||||
<td><code>F6085A66812575E28112E1299D0F626E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>B11B0686D343E5FBBCDC58F88E1E3AE8</code></td>
|
||||
<td><code>0E48CD96A1866061974658A430BD7733</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE5001000FADE83C081F2D935766DBFA</code> <code>33666AEF249C17339F5AE8BC952D2FD5</code> <code>8765672E2DAE53C6885DF337B19B023C</code> <code>EB3BA974905EE6293D85E5061DB24DF7</code> <code>F8DB5A2FE7EF5CD8459AFA74C2CE1D53</code> <code>348073EF99F5FBCD08E3E963FB037D18</code> <code>832C34A0AFBE5C90E420CED585D883DD</code> <code>3538C93C11CB8110560964FE12C51696</code> <code>DDBCBD18A469FBA72B42D57CFA54F6E5</code> <code>0D6EC476AF328E70A6213C49A9566A94</code> <code>6845E6627EB360EBA89F1AF20E470479</code> <code>2A033DC09C5DDC94070B04D031BE8149</code> <code>A4B720AFC13868DF13144FA299882422</code> <code>DA45EF6B0AC7B09338CFDD4B656D27CB</code> <code>D20AE301D4D160233EB69A9AD6A19F28</code> <code>54C3E5BE0D4AC635FA1CD15540440E9B</code> <code>8A3CBD8E8B3A602057197E78038E988B</code> <code>B0671694E778F531750A5A5DE5BEF31A</code> <code>AB97CAD542048E2C940A1F146F1B6BF0</code> <code>30500B6AB67A87B89F57B207A2F6B005</code> <code>3C6ADD8E0AD1728E5DC80280AEFACD9F</code><br> <code>C7323F2B</code></td>
|
||||
<td><code>FE500100DBC5D7D540BD682F97D3F0E7</code> <code>A4807759E7EF315D17972BBB694B9A7A</code> <code>857EDDF9B937312FAA6CA829F8FAE60F</code> <code>BBAD1ADFD03643DCB9591A1A3E73AE09</code> <code>DC2692DCD9E505D055EEACC482C86360</code> <code>58745323BCB1F2934D8D6DAFB8C1FABE</code> <code>02B55B6F65113F29B7B5FC1C66E7CC94</code> <code>26803AD2706820DF20B7E150C3E60A15</code> <code>21067106E8D79842186ABDCE37055658</code> <code>FF056FA02A332611C31A8BC501D8E109</code> <code>86E24DE9D27EE31E57B40E1B9841B1B5</code> <code>2734CDDD2227B7DD144AC7C0EC891716</code> <code>0092AC385C122E2CD9D7CD728DF982B1</code> <code>2B2619DA7871302BE67C877490FF798A</code> <code>7FAD49FCABFF72B56991C6BB4CC23B04</code> <code>AC3A3E3689DD76940152D717AAE84291</code> <code>6FD174451809CCE5B30FEFE196DC0D2E</code> <code>839CE55653B206D7EE292C609F2A94CB</code> <code>171AB953751ABEA675BC5BD148358E68</code> <code>E780291C79840DBC609B09D2AF168401</code> <code>2DB2564839E3ED2CCE13E25E506C4BE5</code><br> <code>E1A25C29</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 = 47021B73ADFFD25A3A726B4A56A8A17908D109EC0FB09A3D953460A20A9B53D6B0C3372C293DCCA0C1BBB73A3A7B00262AC3C662269CC10B85142B32A73CF9D35130A28D9839AF7A5FE159CB569F8EB41D8D101AD98A704086F5CF389DC351ED1A12A1D339F0E65955B085FE20444CDD41F9304EC13869AAA53313124079DFD5FBC72C0CF410982D8717B85D7A3709B4754F9D93BFCD125AF08331AE3980E46E0DC181BB65C533FFE79D80B2FA33406549BED2EEF887ABF034D6606271B7C508DE6E72F9F800A326FCC44192476FC6F8ACE5BC27D7B0D3FBEC3D3BF7E606B688246AD3490CB19376416DEC17DC6FEEAF732266229F6E098FF35921652F87C31C</code></pre>
|
||||
<pre><code>auth_key = B21BC86B00EFACE4D700F53D8D9B9C30831CEF75BAED9A3CD1A2CEA3929D9359DF321456E5734F9E45B2136A82621DC20666DCF1261992CF69F94CF8A4C9897FBA6F3D31FDBD370327ECD661BAF577774F3908A12C1A5ABAABB6ED2A3B32B97AD0EB32F0AD57E9A33711B565864D92A9D8455B667FAEA42885C4E66BE527662892C5C9CC657156CEF4CC798E2EEF98BB0BF2E1671FC083C35F9E813848EE01967CEDF40877D5233F16E63EAB044F0099FCD251D5930DF83D6EAB15682B44069C399368FF21BD99377C4921C8BDB35E4640AD071AD28D6E0C891364122654D6116945B9C050119DAAA055D1AE61D52709713DD9B6D894548402F6A05578DCD5F7</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 30 B9 9E 11 09 9E 66
|
||||
0010 | 88 00 00 00 34 F7 CB 3B FE 7E E3 8C 9F B2 A0 E1
|
||||
0020 | 5D 1A BB 74 C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB
|
||||
0030 | BC DC 58 F8 8E 1E 3A E8 40 89 8F 25 3A 28 2A 6C
|
||||
0040 | 52 F2 6E 65 CB CA 59 DC</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 48 34 6A 8E 3C A1 66
|
||||
0010 | 38 00 00 00 34 F7 CB 3B F6 08 5A 66 81 25 75 E2
|
||||
0020 | 81 12 E1 29 9D 0F 62 6E 0E 48 CD 96 A1 86 60 61
|
||||
0030 | 97 46 58 A4 30 BD 77 33 62 45 C2 E2 B1 61 A5 D3
|
||||
0040 | 38 1A 77 0D 75 66 6C 2E</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>0130B99E11099E66</code></td>
|
||||
<td><code>0148346A8E3CA166</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>88000000</code> (136 in decimal)</td>
|
||||
<td><code>38000000</code> (56 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>FE7EE38C9FB2A0E15D1ABB74C2E133D2</code></td>
|
||||
<td><code>F6085A66812575E28112E1299D0F626E</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>B11B0686D343E5FBBCDC58F88E1E3AE8</code></td>
|
||||
<td><code>0E48CD96A1866061974658A430BD7733</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>40898F253A282A6C52F26E65CBCA59DC</code></td>
|
||||
<td><code>6245C2E2B161A5D3381A770D75666C2E</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>
|
||||
|
|
|
@ -82,7 +82,8 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#peers" id="peers" name="peers"><i class="anchor-icon"></i></a><a href="/api/peers">Peers</a></h4></div>
|
||||
<h4><a class="anchor" href="#peer-database" id="peer-database" name="peer-database"><i class="anchor-icon"></i></a><a href="/api/peers">Peer database</a></h4>
|
||||
<p>Many constructors in the API need to be stored in a local database upon reception and should only ever be updated reactively (passively) when received via updates or by other means (as specified in the documentation), to avoid overloading the server by continuously requesting changes for the same unchanged information.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/user">user</a></td>
|
||||
<td>Indicates info about a certain user</td>
|
||||
<td>Indicates info about a certain user.<br><br>Unless specified otherwise, when updating the <a href="/api/peers">local peer database</a>, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).<br><br>See <a href="https://github.com/tdlib/td/blob/cb164927417f22811c74cd8678ed4a5ab7cb80ba/td/telegram/UserManager.cpp#L2267">here »</a> for an implementation of the logic to use when updating the <a href="/api/peers">local user peer database</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue