mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-07 11:15:42 +01:00
Update content of files
This commit is contained in:
parent
283cc5f55d
commit
c773d78913
3 changed files with 208 additions and 208 deletions
|
@ -83,7 +83,6 @@
|
|||
</ul>
|
||||
<h5><a class="anchor" href="#changed-constructors" id="changed-constructors" name="changed-constructors"><i class="anchor-icon"></i></a>Changed Constructors</h5>
|
||||
<ul>
|
||||
<li>Added <strong>video_processing_pending</strong> parameter in <a href="/constructor/message">message</a></li>
|
||||
<li>Added <strong>can_view_revenue</strong> parameter in <a href="/constructor/userFull">userFull</a></li>
|
||||
<li>Added <strong>flags</strong>, <strong>sent_messages</strong> parameters in <a href="/constructor/updateDeleteScheduledMessages">updateDeleteScheduledMessages</a></li>
|
||||
<li>Added <strong>message</strong> parameter in <a href="/constructor/messageActionGiftPremium">messageActionGiftPremium</a></li>
|
||||
|
@ -93,8 +92,7 @@
|
|||
<li>Added <strong>sold_out</strong>, <strong>first_sale_date</strong>, <strong>last_sale_date</strong> parameters in <a href="/constructor/starGift">starGift</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>#94345242 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> flags2:<a href="/type/%23">#</a> offline:flags2.1?<a href="/constructor/true">true</a> video_processing_pending:flags2.4?<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> via_business_bot_id:flags2.0?<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> effect:flags2.2?<a href="/type/long">long</a> factcheck:flags2.3?<a href="/type/FactCheck">FactCheck</a> = <a href="/type/Message">Message</a>;<br>
|
||||
<a href="/constructor/userFull">userFull</a>#1f58e369 flags:<a href="/type/%23">#</a> blocked:flags.0?<a href="/constructor/true">true</a> phone_calls_available:flags.4?<a href="/constructor/true">true</a> phone_calls_private:flags.5?<a href="/constructor/true">true</a> can_pin_message:flags.7?<a href="/constructor/true">true</a> has_scheduled:flags.12?<a href="/constructor/true">true</a> video_calls_available:flags.13?<a href="/constructor/true">true</a> voice_messages_forbidden:flags.20?<a href="/constructor/true">true</a> translations_disabled:flags.23?<a href="/constructor/true">true</a> stories_pinned_available:flags.26?<a href="/constructor/true">true</a> blocked_my_stories_from:flags.27?<a href="/constructor/true">true</a> wallpaper_overridden:flags.28?<a href="/constructor/true">true</a> contact_require_premium:flags.29?<a href="/constructor/true">true</a> read_dates_private:flags.30?<a href="/constructor/true">true</a> flags2:<a href="/type/%23">#</a> sponsored_enabled:flags2.7?<a href="/constructor/true">true</a> can_view_revenue:flags2.9?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> about:flags.1?<a href="/type/string">string</a> settings:<a href="/type/PeerSettings">PeerSettings</a> personal_photo:flags.21?<a href="/type/Photo">Photo</a> profile_photo:flags.2?<a href="/type/Photo">Photo</a> fallback_photo:flags.22?<a href="/type/Photo">Photo</a> notify_settings:<a href="/type/PeerNotifySettings">PeerNotifySettings</a> bot_info:flags.3?<a href="/type/BotInfo">BotInfo</a> pinned_msg_id:flags.6?<a href="/type/int">int</a> common_chats_count:<a href="/type/int">int</a> folder_id:flags.11?<a href="/type/int">int</a> ttl_period:flags.14?<a href="/type/int">int</a> theme_emoticon:flags.15?<a href="/type/string">string</a> private_forward_name:flags.16?<a href="/type/string">string</a> bot_group_admin_rights:flags.17?<a href="/type/ChatAdminRights">ChatAdminRights</a> bot_broadcast_admin_rights:flags.18?<a href="/type/ChatAdminRights">ChatAdminRights</a> premium_gifts:flags.19?<a href="/type/Vector%20t">Vector</a><<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> business_intro:flags2.4?<a href="/type/BusinessIntro">BusinessIntro</a> birthday:flags2.5?<a href="/type/Birthday">Birthday</a> personal_channel_id:flags2.6?<a href="/type/long">long</a> personal_channel_message:flags2.6?<a href="/type/int">int</a> stargifts_count:flags2.8?<a href="/type/int">int</a> = <a href="/type/UserFull">UserFull</a>;
|
||||
<div><pre><code><a href="/constructor/userFull">userFull</a>#1f58e369 flags:<a href="/type/%23">#</a> blocked:flags.0?<a href="/constructor/true">true</a> phone_calls_available:flags.4?<a href="/constructor/true">true</a> phone_calls_private:flags.5?<a href="/constructor/true">true</a> can_pin_message:flags.7?<a href="/constructor/true">true</a> has_scheduled:flags.12?<a href="/constructor/true">true</a> video_calls_available:flags.13?<a href="/constructor/true">true</a> voice_messages_forbidden:flags.20?<a href="/constructor/true">true</a> translations_disabled:flags.23?<a href="/constructor/true">true</a> stories_pinned_available:flags.26?<a href="/constructor/true">true</a> blocked_my_stories_from:flags.27?<a href="/constructor/true">true</a> wallpaper_overridden:flags.28?<a href="/constructor/true">true</a> contact_require_premium:flags.29?<a href="/constructor/true">true</a> read_dates_private:flags.30?<a href="/constructor/true">true</a> flags2:<a href="/type/%23">#</a> sponsored_enabled:flags2.7?<a href="/constructor/true">true</a> can_view_revenue:flags2.9?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> about:flags.1?<a href="/type/string">string</a> settings:<a href="/type/PeerSettings">PeerSettings</a> personal_photo:flags.21?<a href="/type/Photo">Photo</a> profile_photo:flags.2?<a href="/type/Photo">Photo</a> fallback_photo:flags.22?<a href="/type/Photo">Photo</a> notify_settings:<a href="/type/PeerNotifySettings">PeerNotifySettings</a> bot_info:flags.3?<a href="/type/BotInfo">BotInfo</a> pinned_msg_id:flags.6?<a href="/type/int">int</a> common_chats_count:<a href="/type/int">int</a> folder_id:flags.11?<a href="/type/int">int</a> ttl_period:flags.14?<a href="/type/int">int</a> theme_emoticon:flags.15?<a href="/type/string">string</a> private_forward_name:flags.16?<a href="/type/string">string</a> bot_group_admin_rights:flags.17?<a href="/type/ChatAdminRights">ChatAdminRights</a> bot_broadcast_admin_rights:flags.18?<a href="/type/ChatAdminRights">ChatAdminRights</a> premium_gifts:flags.19?<a href="/type/Vector%20t">Vector</a><<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> business_intro:flags2.4?<a href="/type/BusinessIntro">BusinessIntro</a> birthday:flags2.5?<a href="/type/Birthday">Birthday</a> personal_channel_id:flags2.6?<a href="/type/long">long</a> personal_channel_message:flags2.6?<a href="/type/int">int</a> stargifts_count:flags2.8?<a href="/type/int">int</a> = <a href="/type/UserFull">UserFull</a>;
|
||||
<a href="/constructor/updateDeleteScheduledMessages">updateDeleteScheduledMessages</a>#f2a71983 flags:<a href="/type/%23">#</a> peer:<a href="/type/Peer">Peer</a> messages:<a href="/type/Vector%20t">Vector</a><<a href="/type/int">int</a>> sent_messages:flags.0?<a href="/type/Vector%20t">Vector</a><<a href="/type/int">int</a>> = <a href="/type/Update">Update</a>;<br>
|
||||
<a href="/constructor/messageActionGiftPremium">messageActionGiftPremium</a>#6c6274fa flags:<a href="/type/%23">#</a> currency:<a href="/type/string">string</a> amount:<a href="/type/long">long</a> months:<a href="/type/int">int</a> crypto_currency:flags.0?<a href="/type/string">string</a> crypto_amount:flags.0?<a href="/type/long">long</a> message:flags.1?<a href="/type/TextWithEntities">TextWithEntities</a> = <a href="/type/MessageAction">MessageAction</a>;<br>
|
||||
<a href="/constructor/inputStorePaymentPremiumGiftCode">inputStorePaymentPremiumGiftCode</a>#fb790393 flags:<a href="/type/%23">#</a> users:<a href="/type/Vector%20t">Vector</a><<a href="/type/InputUser">InputUser</a>> boost_peer:flags.0?<a href="/type/InputPeer">InputPeer</a> currency:<a href="/type/string">string</a> amount:<a href="/type/long">long</a> message:flags.1?<a href="/type/TextWithEntities">TextWithEntities</a> = <a href="/type/InputStorePaymentPurpose">InputStorePaymentPurpose</a>;<br>
|
||||
|
@ -151,13 +149,15 @@
|
|||
</ul>
|
||||
<h5><a class="anchor" href="#changed-constructors" id="changed-constructors" name="changed-constructors"><i class="anchor-icon"></i></a>Changed Constructors</h5>
|
||||
<ul>
|
||||
<li>Added <strong>video_processing_pending</strong> parameter in <a href="/constructor/message">message</a></li>
|
||||
<li>Added <strong>stargifts_count</strong> parameter in <a href="/constructor/userFull">userFull</a></li>
|
||||
<li>Added <strong>alt_documents</strong> parameter, removed <strong>alt_document</strong> parameter in <a href="/constructor/messageMediaDocument">messageMediaDocument</a></li>
|
||||
<li>Added <strong>video_codec</strong> parameter in <a href="/constructor/documentAttributeVideo">documentAttributeVideo</a></li>
|
||||
<li>Added <strong>stargift</strong> parameter in <a href="/constructor/starsTransaction">starsTransaction</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/userFull">userFull</a>#1f58e369 flags:<a href="/type/%23">#</a> blocked:flags.0?<a href="/constructor/true">true</a> phone_calls_available:flags.4?<a href="/constructor/true">true</a> phone_calls_private:flags.5?<a href="/constructor/true">true</a> can_pin_message:flags.7?<a href="/constructor/true">true</a> has_scheduled:flags.12?<a href="/constructor/true">true</a> video_calls_available:flags.13?<a href="/constructor/true">true</a> voice_messages_forbidden:flags.20?<a href="/constructor/true">true</a> translations_disabled:flags.23?<a href="/constructor/true">true</a> stories_pinned_available:flags.26?<a href="/constructor/true">true</a> blocked_my_stories_from:flags.27?<a href="/constructor/true">true</a> wallpaper_overridden:flags.28?<a href="/constructor/true">true</a> contact_require_premium:flags.29?<a href="/constructor/true">true</a> read_dates_private:flags.30?<a href="/constructor/true">true</a> flags2:<a href="/type/%23">#</a> sponsored_enabled:flags2.7?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> about:flags.1?<a href="/type/string">string</a> settings:<a href="/type/PeerSettings">PeerSettings</a> personal_photo:flags.21?<a href="/type/Photo">Photo</a> profile_photo:flags.2?<a href="/type/Photo">Photo</a> fallback_photo:flags.22?<a href="/type/Photo">Photo</a> notify_settings:<a href="/type/PeerNotifySettings">PeerNotifySettings</a> bot_info:flags.3?<a href="/type/BotInfo">BotInfo</a> pinned_msg_id:flags.6?<a href="/type/int">int</a> common_chats_count:<a href="/type/int">int</a> folder_id:flags.11?<a href="/type/int">int</a> ttl_period:flags.14?<a href="/type/int">int</a> theme_emoticon:flags.15?<a href="/type/string">string</a> private_forward_name:flags.16?<a href="/type/string">string</a> bot_group_admin_rights:flags.17?<a href="/type/ChatAdminRights">ChatAdminRights</a> bot_broadcast_admin_rights:flags.18?<a href="/type/ChatAdminRights">ChatAdminRights</a> premium_gifts:flags.19?<a href="/type/Vector%20t">Vector</a><<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> business_intro:flags2.4?<a href="/type/BusinessIntro">BusinessIntro</a> birthday:flags2.5?<a href="/type/Birthday">Birthday</a> personal_channel_id:flags2.6?<a href="/type/long">long</a> personal_channel_message:flags2.6?<a href="/type/int">int</a> stargifts_count:flags2.8?<a href="/type/int">int</a> = <a href="/type/UserFull">UserFull</a>;<br>
|
||||
<div><pre><code><a href="/constructor/message">message</a>#94345242 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> flags2:<a href="/type/%23">#</a> offline:flags2.1?<a href="/constructor/true">true</a> video_processing_pending:flags2.4?<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> via_business_bot_id:flags2.0?<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> effect:flags2.2?<a href="/type/long">long</a> factcheck:flags2.3?<a href="/type/FactCheck">FactCheck</a> = <a href="/type/Message">Message</a>;<br>
|
||||
<a href="/constructor/userFull">userFull</a>#1f58e369 flags:<a href="/type/%23">#</a> blocked:flags.0?<a href="/constructor/true">true</a> phone_calls_available:flags.4?<a href="/constructor/true">true</a> phone_calls_private:flags.5?<a href="/constructor/true">true</a> can_pin_message:flags.7?<a href="/constructor/true">true</a> has_scheduled:flags.12?<a href="/constructor/true">true</a> video_calls_available:flags.13?<a href="/constructor/true">true</a> voice_messages_forbidden:flags.20?<a href="/constructor/true">true</a> translations_disabled:flags.23?<a href="/constructor/true">true</a> stories_pinned_available:flags.26?<a href="/constructor/true">true</a> blocked_my_stories_from:flags.27?<a href="/constructor/true">true</a> wallpaper_overridden:flags.28?<a href="/constructor/true">true</a> contact_require_premium:flags.29?<a href="/constructor/true">true</a> read_dates_private:flags.30?<a href="/constructor/true">true</a> flags2:<a href="/type/%23">#</a> sponsored_enabled:flags2.7?<a href="/constructor/true">true</a> id:<a href="/type/long">long</a> about:flags.1?<a href="/type/string">string</a> settings:<a href="/type/PeerSettings">PeerSettings</a> personal_photo:flags.21?<a href="/type/Photo">Photo</a> profile_photo:flags.2?<a href="/type/Photo">Photo</a> fallback_photo:flags.22?<a href="/type/Photo">Photo</a> notify_settings:<a href="/type/PeerNotifySettings">PeerNotifySettings</a> bot_info:flags.3?<a href="/type/BotInfo">BotInfo</a> pinned_msg_id:flags.6?<a href="/type/int">int</a> common_chats_count:<a href="/type/int">int</a> folder_id:flags.11?<a href="/type/int">int</a> ttl_period:flags.14?<a href="/type/int">int</a> theme_emoticon:flags.15?<a href="/type/string">string</a> private_forward_name:flags.16?<a href="/type/string">string</a> bot_group_admin_rights:flags.17?<a href="/type/ChatAdminRights">ChatAdminRights</a> bot_broadcast_admin_rights:flags.18?<a href="/type/ChatAdminRights">ChatAdminRights</a> premium_gifts:flags.19?<a href="/type/Vector%20t">Vector</a><<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> business_intro:flags2.4?<a href="/type/BusinessIntro">BusinessIntro</a> birthday:flags2.5?<a href="/type/Birthday">Birthday</a> personal_channel_id:flags2.6?<a href="/type/long">long</a> personal_channel_message:flags2.6?<a href="/type/int">int</a> stargifts_count:flags2.8?<a href="/type/int">int</a> = <a href="/type/UserFull">UserFull</a>;<br>
|
||||
<a href="/constructor/messageMediaDocument">messageMediaDocument</a>#dd570bd5 flags:<a href="/type/%23">#</a> nopremium:flags.3?<a href="/constructor/true">true</a> spoiler:flags.4?<a href="/constructor/true">true</a> video:flags.6?<a href="/constructor/true">true</a> round:flags.7?<a href="/constructor/true">true</a> voice:flags.8?<a href="/constructor/true">true</a> document:flags.0?<a href="/type/Document">Document</a> alt_documents:flags.5?<a href="/type/Vector%20t">Vector</a><<a href="/type/Document">Document</a>> ttl_seconds:flags.2?<a href="/type/int">int</a> = <a href="/type/MessageMedia">MessageMedia</a>;<br>
|
||||
<a href="/constructor/documentAttributeVideo">documentAttributeVideo</a>#43c57c48 flags:<a href="/type/%23">#</a> round_message:flags.0?<a href="/constructor/true">true</a> supports_streaming:flags.1?<a href="/constructor/true">true</a> nosound:flags.3?<a href="/constructor/true">true</a> duration:<a href="/type/double">double</a> w:<a href="/type/int">int</a> h:<a href="/type/int">int</a> preload_prefix_size:flags.2?<a href="/type/int">int</a> video_start_ts:flags.4?<a href="/type/double">double</a> video_codec:flags.5?<a href="/type/string">string</a> = <a href="/type/DocumentAttribute">DocumentAttribute</a>;<br>
|
||||
<a href="/constructor/starsTransaction">starsTransaction</a>#0a9ee4c2 flags:<a href="/type/%23">#</a> refund:flags.3?<a href="/constructor/true">true</a> pending:flags.4?<a href="/constructor/true">true</a> failed:flags.6?<a href="/constructor/true">true</a> gift:flags.10?<a href="/constructor/true">true</a> reaction:flags.11?<a href="/constructor/true">true</a> id:<a href="/type/string">string</a> stars:<a href="/type/long">long</a> date:<a href="/type/int">int</a> peer:<a href="/type/StarsTransactionPeer">StarsTransactionPeer</a> title:flags.0?<a href="/type/string">string</a> description:flags.1?<a href="/type/string">string</a> photo:flags.2?<a href="/type/WebDocument">WebDocument</a> transaction_date:flags.5?<a href="/type/int">int</a> transaction_url:flags.5?<a href="/type/string">string</a> bot_payload:flags.7?<a href="/type/bytes">bytes</a> msg_id:flags.8?<a href="/type/int">int</a> extended_media:flags.9?<a href="/type/Vector%20t">Vector</a><<a href="/type/MessageMedia">MessageMedia</a>> subscription_period:flags.12?<a href="/type/int">int</a> giveaway_post_id:flags.13?<a href="/type/int">int</a> stargift:flags.14?<a href="/type/StarGift">StarGift</a> = <a href="/type/StarsTransaction">StarsTransaction</a>;<br>
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
<tr>
|
||||
<td><strong>privacy_policy_url</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/type/string">string</a></td>
|
||||
<td> </td>
|
||||
<td>The HTTP link to the privacy policy of the bot. If not set, then the <code>/privacy</code> command must be used, if supported by the bot (i.e. if it's present in the <code>commands</code> vector). If it isn't supported, then <a href="https://telegram.org/privacy-tpa">https://telegram.org/privacy-tpa</a> must be opened, instead.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -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 5C E8 04 00 34 F4 34 67
|
||||
0010 | 14 00 00 00 F1 8E 7E BE DB D8 C6 5A 8B 8D D0 75
|
||||
0020 | E7 F9 55 69 3B 65 DD 5D</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 10 85 08 00 3D 30 36 67
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 54 DA A8 B2 DC EB EE E5
|
||||
0020 | 17 AF C9 51 30 15 70 BE</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>5CE8040034F43467</code></td>
|
||||
<td><code>108508003D303667</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>DBD8C65A8B8DD075E7F955693B65DD5D</code></td>
|
||||
<td><code>54DAA8B2DCEBEEE517AFC951301570BE</code></td>
|
||||
<td>Random number</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -104,11 +104,11 @@
|
|||
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
|
||||
<!-- start resPQ -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 14 47 81 34 F4 34 67
|
||||
0010 | 50 00 00 00 63 24 16 05 DB D8 C6 5A 8B 8D D0 75
|
||||
0020 | E7 F9 55 69 3B 65 DD 5D 86 3C 64 43 9D 30 AC 3C
|
||||
0030 | 57 17 3B BC 88 FF 8C C2 08 23 D5 D8 BD CB F4 9F
|
||||
0040 | 53 00 00 00 15 C4 B5 1C 03 00 00 00 85 FD 64 DE
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 60 BD 74 3D 30 36 67
|
||||
0010 | 50 00 00 00 63 24 16 05 54 DA A8 B2 DC EB EE E5
|
||||
0020 | 17 AF C9 51 30 15 70 BE 81 FF 56 11 A6 F0 7A E1
|
||||
0030 | 01 5B D4 18 9E 60 68 7C 08 1F 1F C6 6E 4F BE 17
|
||||
0040 | B3 00 00 00 15 C4 B5 1C 03 00 00 00 85 FD 64 DE
|
||||
0050 | 85 1D 9D D0 A5 B7 F7 09 35 5F C3 0B 21 6B E8 6C
|
||||
0060 | 02 2B B4 C3</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
|
@ -132,7 +132,7 @@
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>0114478134F43467</code></td>
|
||||
<td><code>0160BD743D303667</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>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>DBD8C65A8B8DD075E7F955693B65DD5D</code></td>
|
||||
<td><code>54DAA8B2DCEBEEE517AFC951301570BE</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>863C64439D30AC3C57173BBC88FF8CC2</code></td>
|
||||
<td><code>81FF5611A6F07AE1015BD4189E60687C</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>0823D5D8BDCBF49F53000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2582208271049072467</td>
|
||||
<td><code>081F1FC66E4FBE17B3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2242729316540356531</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 = 2582208271049072467</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2582208271049072467 = 1411293217 * 1829675251</code></p>
|
||||
<pre><code>p = 1411293217
|
||||
q = 1829675251</code></pre>
|
||||
<pre><code>pq = 2242729316540356531</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2242729316540356531 = 1264011563 * 1774294937</code></p>
|
||||
<pre><code>p = 1264011563
|
||||
q = 1774294937</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 23 D5 D8 BD CB F4 9F 53 00 00 00
|
||||
0010 | 04 54 1E A0 21 00 00 00 04 6D 0E A0 F3 00 00 00
|
||||
0020 | DB D8 C6 5A 8B 8D D0 75 E7 F9 55 69 3B 65 DD 5D
|
||||
0030 | 86 3C 64 43 9D 30 AC 3C 57 17 3B BC 88 FF 8C C2
|
||||
0040 | CD 8C AD BC C8 36 4A 72 DA 70 A3 DA BB 76 16 F3
|
||||
0050 | 9A 4B E0 F5 6F 9B E1 0A 24 FB 7D 46 30 E0 C8 FE
|
||||
<pre><code>0000 | 95 5F F5 A9 08 1F 1F C6 6E 4F BE 17 B3 00 00 00
|
||||
0010 | 04 4B 57 49 2B 00 00 00 04 69 C1 97 99 00 00 00
|
||||
0020 | 54 DA A8 B2 DC EB EE E5 17 AF C9 51 30 15 70 BE
|
||||
0030 | 81 FF 56 11 A6 F0 7A E1 01 5B D4 18 9E 60 68 7C
|
||||
0040 | 7A 60 4C AB 45 B4 5B F0 42 7F 21 87 79 75 84 83
|
||||
0050 | AE 46 51 59 68 72 7D 4B 69 3E E7 7D 4F 9E 13 E6
|
||||
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 = 1829675251</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>0823D5D8BDCBF49F53000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2582208271049072467</td>
|
||||
<td><code>081F1FC66E4FBE17B3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2242729316540356531</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>04541EA021000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1411293217</td>
|
||||
<td><code>044B57492B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1264011563</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>046D0EA0F3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1829675251</td>
|
||||
<td><code>0469C19799000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1774294937</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>DBD8C65A8B8DD075E7F955693B65DD5D</code></td>
|
||||
<td><code>54DAA8B2DCEBEEE517AFC951301570BE</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>863C64439D30AC3C57173BBC88FF8CC2</code></td>
|
||||
<td><code>81FF5611A6F07AE1015BD4189E60687C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>CD8CADBCC8364A72DA70A3DABB7616F3</code> <code>9A4BE0F56F9BE10A24FB7D4630E0C8FE</code></td>
|
||||
<td><code>7A604CAB45B45BF0427F218779758483</code> <code>AE46515968727D4B693EE77D4F9E13E6</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1829675251</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 = 955FF5A90823D5D8BDCBF49F5300000004541EA021000000046D0EA0F3000000DBD8C65A8B8DD075E7F955693B65DD5D863C64439D30AC3C57173BBC88FF8CC2CD8CADBCC8364A72DA70A3DABB7616F39A4BE0F56F9BE10A24FB7D4630E0C8FE02000000
|
||||
random_padding_bytes = D1B1051F06A57A7CE3F906D2A94B4FE3B2DD70937BA3F4D0A6CD7E5E777D6B01E055453664A6735F6907CD78D5C6A018BE453BF3905FB9076DCB0A9E2AE4F7DFEA0EFFBF789399381730454F7EF168CC21FD81FC07E85D64839CE962</code></pre>
|
||||
<pre><code>data = 955FF5A9081F1FC66E4FBE17B3000000044B57492B0000000469C1979900000054DAA8B2DCEBEEE517AFC951301570BE81FF5611A6F07AE1015BD4189E60687C7A604CAB45B45BF0427F218779758483AE46515968727D4B693EE77D4F9E13E602000000
|
||||
random_padding_bytes = D503DA1E32E2EBC9631A4D993D1CED6CFB4B2A11B6455D57DD36876CDD95574DCE2A4E86BC68648665AF75884AFB7E2224AAAF47F39AE7682FD5B53C70AB2E89B099B925ED9160F9A65DFA0EF1918F508EAE015BED1DFE8D117A3B52</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 = 6A9F447F40EA940FF774BE57AFC14795417131A8AA8F57122E79C827A2EA708DA73671885DFD8F0662409E87E8BEC813D8E8D080C93129AE0AFC3D00707A176CCAB7E8D02CBC57B8D6A43A1AC96B32605D934844016A90C641F8E96772C94A124AC43B81F73027C9CA9180FF960094CD4F498DA2EA6139FDCB53EB70B0ED4893D30B841CA8A2B4D4CB5AB7E8A7CF2FFC423E0DCC60B29143FD44DFACAE415D18EEC924A0E9F3DF12FAFB4668A71245E82BA53786CA191A26B468FA3EC395B4761BA3ACC92A1472F4949EE1FF5C31E56AD081A70393260438762A6285E142250673D9868452D370C1F48DAAC376904C05A0D5BE32C0CE6CA2717BC28704F69651</code></pre>
|
||||
<pre><code>encrypted_data = A081BF56C2D856A0E357DA4B778979AD521AEBB49C3B3FA282937104F02DFBBA21EE8AE8DE17D9F1A223325244BD232DCA89ECBD1D87C719EA6094827BD42357D03F7797481529516EBC600213B079683EC15FEC36E01ACBFAC69907D47B6947022607D96E2841FB421F4F733CB17F36A1BFC8CEF775B759985435DB9C24F7A5CCE34439CA4A0A5DF1BF1B243DF35B85D6447FE241C2945405686B8A238BA3DA952366568E887956757DF99DA1EB2C668F1A8FB37C3D4D22A8DB2A7BDAE78D7A806D2D32B027C6EB5512FFECCCBBE7D94F4291547679FF559CAE940878EFF411361AD0C6C218ACF1D8E74A8BE6E55F8E569C36E00F14C9733BFBF88D6D377E1A</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 60 E8 04 00 34 F4 34 67
|
||||
0010 | 40 01 00 00 BE E4 12 D7 DB D8 C6 5A 8B 8D D0 75
|
||||
0020 | E7 F9 55 69 3B 65 DD 5D 86 3C 64 43 9D 30 AC 3C
|
||||
0030 | 57 17 3B BC 88 FF 8C C2 04 54 1E A0 21 00 00 00
|
||||
0040 | 04 6D 0E A0 F3 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 6A 9F 44 7F 40 EA 94 0F F7 74 BE 57
|
||||
0060 | AF C1 47 95 41 71 31 A8 AA 8F 57 12 2E 79 C8 27
|
||||
0070 | A2 EA 70 8D A7 36 71 88 5D FD 8F 06 62 40 9E 87
|
||||
0080 | E8 BE C8 13 D8 E8 D0 80 C9 31 29 AE 0A FC 3D 00
|
||||
0090 | 70 7A 17 6C CA B7 E8 D0 2C BC 57 B8 D6 A4 3A 1A
|
||||
00A0 | C9 6B 32 60 5D 93 48 44 01 6A 90 C6 41 F8 E9 67
|
||||
00B0 | 72 C9 4A 12 4A C4 3B 81 F7 30 27 C9 CA 91 80 FF
|
||||
00C0 | 96 00 94 CD 4F 49 8D A2 EA 61 39 FD CB 53 EB 70
|
||||
00D0 | B0 ED 48 93 D3 0B 84 1C A8 A2 B4 D4 CB 5A B7 E8
|
||||
00E0 | A7 CF 2F FC 42 3E 0D CC 60 B2 91 43 FD 44 DF AC
|
||||
00F0 | AE 41 5D 18 EE C9 24 A0 E9 F3 DF 12 FA FB 46 68
|
||||
0100 | A7 12 45 E8 2B A5 37 86 CA 19 1A 26 B4 68 FA 3E
|
||||
0110 | C3 95 B4 76 1B A3 AC C9 2A 14 72 F4 94 9E E1 FF
|
||||
0120 | 5C 31 E5 6A D0 81 A7 03 93 26 04 38 76 2A 62 85
|
||||
0130 | E1 42 25 06 73 D9 86 84 52 D3 70 C1 F4 8D AA C3
|
||||
0140 | 76 90 4C 05 A0 D5 BE 32 C0 CE 6C A2 71 7B C2 87
|
||||
0150 | 04 F6 96 51</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 14 85 08 00 3D 30 36 67
|
||||
0010 | 40 01 00 00 BE E4 12 D7 54 DA A8 B2 DC EB EE E5
|
||||
0020 | 17 AF C9 51 30 15 70 BE 81 FF 56 11 A6 F0 7A E1
|
||||
0030 | 01 5B D4 18 9E 60 68 7C 04 4B 57 49 2B 00 00 00
|
||||
0040 | 04 69 C1 97 99 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 A0 81 BF 56 C2 D8 56 A0 E3 57 DA 4B
|
||||
0060 | 77 89 79 AD 52 1A EB B4 9C 3B 3F A2 82 93 71 04
|
||||
0070 | F0 2D FB BA 21 EE 8A E8 DE 17 D9 F1 A2 23 32 52
|
||||
0080 | 44 BD 23 2D CA 89 EC BD 1D 87 C7 19 EA 60 94 82
|
||||
0090 | 7B D4 23 57 D0 3F 77 97 48 15 29 51 6E BC 60 02
|
||||
00A0 | 13 B0 79 68 3E C1 5F EC 36 E0 1A CB FA C6 99 07
|
||||
00B0 | D4 7B 69 47 02 26 07 D9 6E 28 41 FB 42 1F 4F 73
|
||||
00C0 | 3C B1 7F 36 A1 BF C8 CE F7 75 B7 59 98 54 35 DB
|
||||
00D0 | 9C 24 F7 A5 CC E3 44 39 CA 4A 0A 5D F1 BF 1B 24
|
||||
00E0 | 3D F3 5B 85 D6 44 7F E2 41 C2 94 54 05 68 6B 8A
|
||||
00F0 | 23 8B A3 DA 95 23 66 56 8E 88 79 56 75 7D F9 9D
|
||||
0100 | A1 EB 2C 66 8F 1A 8F B3 7C 3D 4D 22 A8 DB 2A 7B
|
||||
0110 | DA E7 8D 7A 80 6D 2D 32 B0 27 C6 EB 55 12 FF EC
|
||||
0120 | CC BB E7 D9 4F 42 91 54 76 79 FF 55 9C AE 94 08
|
||||
0130 | 78 EF F4 11 36 1A D0 C6 C2 18 AC F1 D8 E7 4A 8B
|
||||
0140 | E6 E5 5F 8E 56 9C 36 E0 0F 14 C9 73 3B FB F8 8D
|
||||
0150 | 6D 37 7E 1A</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 = D1B1051F06A57A7CE3F906D2A94B4FE3B2DD70937BA3F4D0A6CD7E5E7
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>60E8040034F43467</code></td>
|
||||
<td><code>148508003D303667</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 = D1B1051F06A57A7CE3F906D2A94B4FE3B2DD70937BA3F4D0A6CD7E5E7
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>DBD8C65A8B8DD075E7F955693B65DD5D</code></td>
|
||||
<td><code>54DAA8B2DCEBEEE517AFC951301570BE</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>863C64439D30AC3C57173BBC88FF8CC2</code></td>
|
||||
<td><code>81FF5611A6F07AE1015BD4189E60687C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>04541EA021000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1411293217</td>
|
||||
<td><code>044B57492B000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1264011563</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>046D0EA0F3000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1829675251</td>
|
||||
<td><code>0469C19799000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1774294937</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 = D1B1051F06A57A7CE3F906D2A94B4FE3B2DD70937BA3F4D0A6CD7E5E7
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE0001006A9F447F40EA940FF774BE57</code> <code>AFC14795417131A8AA8F57122E79C827</code> <code>A2EA708DA73671885DFD8F0662409E87</code> <code>E8BEC813D8E8D080C93129AE0AFC3D00</code> <code>707A176CCAB7E8D02CBC57B8D6A43A1A</code> <code>C96B32605D934844016A90C641F8E967</code> <code>72C94A124AC43B81F73027C9CA9180FF</code> <code>960094CD4F498DA2EA6139FDCB53EB70</code> <code>B0ED4893D30B841CA8A2B4D4CB5AB7E8</code> <code>A7CF2FFC423E0DCC60B29143FD44DFAC</code> <code>AE415D18EEC924A0E9F3DF12FAFB4668</code> <code>A71245E82BA53786CA191A26B468FA3E</code> <code>C395B4761BA3ACC92A1472F4949EE1FF</code> <code>5C31E56AD081A70393260438762A6285</code> <code>E142250673D9868452D370C1F48DAAC3</code> <code>76904C05A0D5BE32C0CE6CA2717BC287</code><br> <code>04F69651</code></td>
|
||||
<td><code>FE000100A081BF56C2D856A0E357DA4B</code> <code>778979AD521AEBB49C3B3FA282937104</code> <code>F02DFBBA21EE8AE8DE17D9F1A2233252</code> <code>44BD232DCA89ECBD1D87C719EA609482</code> <code>7BD42357D03F7797481529516EBC6002</code> <code>13B079683EC15FEC36E01ACBFAC69907</code> <code>D47B6947022607D96E2841FB421F4F73</code> <code>3CB17F36A1BFC8CEF775B759985435DB</code> <code>9C24F7A5CCE34439CA4A0A5DF1BF1B24</code> <code>3DF35B85D6447FE241C2945405686B8A</code> <code>238BA3DA952366568E887956757DF99D</code> <code>A1EB2C668F1A8FB37C3D4D22A8DB2A7B</code> <code>DAE78D7A806D2D32B027C6EB5512FFEC</code> <code>CCBBE7D94F4291547679FF559CAE9408</code> <code>78EFF411361AD0C6C218ACF1D8E74A8B</code> <code>E6E55F8E569C36E00F14C9733BFBF88D</code><br> <code>6D377E1A</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = D1B1051F06A57A7CE3F906D2A94B4FE3B2DD70937BA3F4D0A6CD7E5E7
|
|||
<h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5>
|
||||
<!-- start server_DH_params_ok -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 00 AC A9 34 F4 34 67
|
||||
0010 | 78 02 00 00 5C 07 E8 D0 DB D8 C6 5A 8B 8D D0 75
|
||||
0020 | E7 F9 55 69 3B 65 DD 5D 86 3C 64 43 9D 30 AC 3C
|
||||
0030 | 57 17 3B BC 88 FF 8C C2 FE 50 02 00 CD C6 D0 97
|
||||
0040 | 67 53 F5 30 1F CB 73 50 55 EB 36 84 50 D0 B6 47
|
||||
0050 | D7 2D F5 49 A8 AA B9 3E 24 B1 66 4F 06 F1 B9 6C
|
||||
0060 | 62 C1 80 5F 3D D1 C6 6F DD CB E7 15 A5 97 AA 78
|
||||
0070 | A0 38 56 05 66 89 48 4F B9 EA F0 DD 73 48 F4 57
|
||||
0080 | B7 EC 98 00 53 DB 7B 10 C9 F9 3E C9 9F F0 37 BE
|
||||
0090 | 0A 76 4E 96 AE 07 C0 42 59 64 EF 09 50 67 CF 09
|
||||
00A0 | 34 0A 9E 81 0C 34 61 7D 4E 71 52 34 4B 65 9D 05
|
||||
00B0 | CB 7F A5 CA 12 89 CC 6E E9 D1 D8 1E 15 AF 1B 39
|
||||
00C0 | DF 6E 7B F1 9F DC EC 62 19 D7 E0 C5 F9 38 F5 61
|
||||
00D0 | FA 3E 96 E8 A4 60 ED D2 B7 3D A9 A6 F8 E1 6F 85
|
||||
00E0 | D4 AF 12 83 51 13 40 E9 FB 73 5F 05 A1 79 3C DA
|
||||
00F0 | 7F D6 B2 44 E7 BC 9B CA F5 EA B0 AA EC 0A 27 AF
|
||||
0100 | 09 44 98 A1 70 FB 06 45 17 AE ED A6 85 F0 83 30
|
||||
0110 | 1D 9A 9D FE DA 28 C0 32 34 B8 0A C7 8A 9B 3C E2
|
||||
0120 | 1B 51 1D 45 3B 2C 2C F7 AE 50 70 10 9B B3 AA 79
|
||||
0130 | 6A 69 39 6F C6 94 A4 C7 14 99 A6 C5 AD 19 87 E5
|
||||
0140 | 8B 95 A6 96 78 B6 A0 A2 E0 5B 68 E8 3C 97 69 B8
|
||||
0150 | 24 A1 D1 C7 1C 0B 68 CA D9 15 E3 D1 50 8D 36 F3
|
||||
0160 | 4D 92 CF 34 6E 7A 2E 81 37 4A 30 15 38 42 A1 ED
|
||||
0170 | CC 32 24 A2 9E C7 E9 94 E2 D4 94 4C 11 C0 4B 33
|
||||
0180 | E5 89 27 8A EF 62 F2 68 B5 BE A4 13 71 98 4E E8
|
||||
0190 | 6D F5 3E F1 48 F5 B0 9B 4B A7 EB 65 43 C8 56 C6
|
||||
01A0 | CD 5E 9C AF FA C7 A7 7E 59 CE 25 31 A4 59 9C 81
|
||||
01B0 | 79 0F 44 D0 7D B0 2A 98 9E 2D E8 B9 21 FA E2 BF
|
||||
01C0 | 59 7D EE 46 3C 53 4D 5E 77 E8 A4 B8 51 0A AD E1
|
||||
01D0 | 15 DA B8 BC 16 BE D9 09 94 77 4A F5 4C 53 DB 3A
|
||||
01E0 | E0 69 A7 60 AC D6 DE 63 65 D3 0F 13 DC 90 53 0F
|
||||
01F0 | 62 C7 77 9F 43 DC 7D 10 1C CF C5 F4 01 D1 12 16
|
||||
0200 | EF BA 97 E0 EA 85 20 FD 51 F6 1D 19 48 78 0D DC
|
||||
0210 | B3 B4 4D E3 91 E6 44 AA 8F 22 2F 8A DD AE 0B 87
|
||||
0220 | D4 94 6F 16 1D 30 F9 F5 25 95 CC 73 14 54 4C 6C
|
||||
0230 | 39 AB 11 3B D4 61 29 C1 D9 AC 03 66 A4 55 8E 49
|
||||
0240 | 66 14 E9 20 9E 36 AD 9D 62 11 63 68 9B 18 5F 71
|
||||
0250 | 19 D1 33 14 15 00 BD 18 28 B5 23 75 D7 60 E9 BE
|
||||
0260 | EB 55 AF 64 29 90 52 5A 74 9B 0A FA CE 1B 35 96
|
||||
0270 | C0 D3 4D 00 3B 4F 75 E6 89 1B 9B 38 77 F3 4E 76
|
||||
0280 | 2E 59 54 E8 0A 53 B3 0D 93 3C 6A EF</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 5C F2 8F 3D 30 36 67
|
||||
0010 | 78 02 00 00 5C 07 E8 D0 54 DA A8 B2 DC EB EE E5
|
||||
0020 | 17 AF C9 51 30 15 70 BE 81 FF 56 11 A6 F0 7A E1
|
||||
0030 | 01 5B D4 18 9E 60 68 7C FE 50 02 00 6B 76 AC D9
|
||||
0040 | 99 18 16 CC 04 EA 66 07 7E 7F 79 93 E3 7C 70 B1
|
||||
0050 | 39 A4 D9 B9 34 79 68 56 E5 E7 7C C3 66 12 2C A5
|
||||
0060 | E7 B0 11 D1 FB 38 9F F7 96 E6 12 57 A9 6E D8 6E
|
||||
0070 | 89 CD 4F 8B 96 C7 7E 0D 83 6D 4A E1 6C 36 D5 DA
|
||||
0080 | E9 FD D8 22 0D E1 F6 CB E4 A4 59 EB 73 D6 AC 1E
|
||||
0090 | A9 07 3A 2A EF 6E 3D 1D 01 9C DB 8E 27 1C D2 1D
|
||||
00A0 | 6E 30 38 61 75 DF 53 16 71 3C EA 47 E0 CA C3 59
|
||||
00B0 | 3C 9C 63 7D BF 1B D4 C3 68 F7 DC 8F 5F 0D 2E 9A
|
||||
00C0 | 47 4F 5B 90 DA EB 22 91 66 61 67 0C A6 20 6C 7E
|
||||
00D0 | 0B 0F 25 72 81 E1 8F EA B5 5B 94 B9 DC B8 90 8D
|
||||
00E0 | 67 56 2B 76 CB 44 47 DF 8F EB 31 CE B3 85 59 AD
|
||||
00F0 | 41 3D 96 48 EC BE 08 2B 87 23 99 5E 01 EF 34 3D
|
||||
0100 | 8C 27 AC EE BB 7B F6 33 04 88 4A 6C 25 7F 93 24
|
||||
0110 | 7A F6 C6 9E C7 F9 4D 2C 91 D0 BC 83 EC B0 9C 98
|
||||
0120 | 63 04 A3 C7 5A FD 54 E7 2F 25 F6 99 3B D2 81 AC
|
||||
0130 | F2 BB 2D 59 15 83 D1 58 28 BE 6C AE 28 25 0E D9
|
||||
0140 | A0 0E 22 4D 1A 9F 88 9D BC 98 7E FD 45 C8 D8 C8
|
||||
0150 | 44 D9 AC 18 F9 E0 E0 44 D8 9F AC 9B 80 BC 09 F3
|
||||
0160 | FE F4 ED B6 EC CB EF 4C 2D 37 FF BB 05 C1 E0 8E
|
||||
0170 | F1 00 1F 7F 22 A4 89 1C C5 FD 0D 10 1E AB 64 6B
|
||||
0180 | F0 23 7B DB 5B 90 F8 87 67 1E 18 2B A1 2C 2A EC
|
||||
0190 | 00 DC BC B4 E9 70 36 11 1D 3E 01 C0 B1 69 E9 46
|
||||
01A0 | 0E 8C 3C 66 06 42 C2 9D 7C 1B 7C 1E 03 2E 2F 11
|
||||
01B0 | B2 E5 0A 6C CC 28 3D 54 92 00 E9 63 55 7B 67 6F
|
||||
01C0 | 42 A6 80 72 A5 5D EE DE 8D BF 08 C0 C1 09 D5 80
|
||||
01D0 | B3 BD DD 34 D5 1F 81 70 38 06 9E D7 48 12 36 A3
|
||||
01E0 | AD CD F9 08 B8 83 1B 32 7E CF E7 AC DA E6 D0 5C
|
||||
01F0 | 6B EE CB 99 F1 15 95 CF 7C 67 B3 A4 90 52 7E B6
|
||||
0200 | EF 31 DD 8A 4D 3E 8B 3B 8A 37 21 DF 6D FD 3A 93
|
||||
0210 | 68 FB EF 4C F8 F0 79 AB 1D C5 D5 5F F9 41 DA 71
|
||||
0220 | E8 0E EB F5 91 4B E9 9A D1 DC 0F CF D8 2D 72 64
|
||||
0230 | 02 37 C7 40 03 5A 4B 6A 4D 22 95 9B BA E2 10 2C
|
||||
0240 | BF 54 C9 18 9F 35 A7 02 A8 B8 3D C2 2A 26 DD 0C
|
||||
0250 | C0 0F 10 84 9B 19 2B 76 1A 5B B8 BC 48 1D 81 D4
|
||||
0260 | 4A 61 B7 36 D0 72 FD 80 39 FF 7D 7E EA 53 67 BB
|
||||
0270 | 58 93 AD 68 5F 7B B4 73 9B 59 8D 54 E6 85 66 FD
|
||||
0280 | E6 13 FC 9E 25 C9 37 EA CE 7F 8B 19</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,7 +464,7 @@ random_padding_bytes = D1B1051F06A57A7CE3F906D2A94B4FE3B2DD70937BA3F4D0A6CD7E5E7
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>0100ACA934F43467</code></td>
|
||||
<td><code>015CF28F3D303667</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>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = D1B1051F06A57A7CE3F906D2A94B4FE3B2DD70937BA3F4D0A6CD7E5E7
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>DBD8C65A8B8DD075E7F955693B65DD5D</code></td>
|
||||
<td><code>54DAA8B2DCEBEEE517AFC951301570BE</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>863C64439D30AC3C57173BBC88FF8CC2</code></td>
|
||||
<td><code>81FF5611A6F07AE1015BD4189E60687C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE500200CDC6D0976753F5301FCB7350</code> <code>55EB368450D0B647D72DF549A8AAB93E</code> <code>24B1664F06F1B96C62C1805F3DD1C66F</code> <code>DDCBE715A597AA78A03856056689484F</code> <code>B9EAF0DD7348F457B7EC980053DB7B10</code> <code>C9F93EC99FF037BE0A764E96AE07C042</code> <code>5964EF095067CF09340A9E810C34617D</code> <code>4E7152344B659D05CB7FA5CA1289CC6E</code> <code>E9D1D81E15AF1B39DF6E7BF19FDCEC62</code> <code>19D7E0C5F938F561FA3E96E8A460EDD2</code> <code>B73DA9A6F8E16F85D4AF1283511340E9</code> <code>FB735F05A1793CDA7FD6B244E7BC9BCA</code> <code>F5EAB0AAEC0A27AF094498A170FB0645</code> <code>17AEEDA685F083301D9A9DFEDA28C032</code> <code>34B80AC78A9B3CE21B511D453B2C2CF7</code> <code>AE5070109BB3AA796A69396FC694A4C7</code> <code>1499A6C5AD1987E58B95A69678B6A0A2</code> <code>E05B68E83C9769B824A1D1C71C0B68CA</code> <code>D915E3D1508D36F34D92CF346E7A2E81</code> <code>374A30153842A1EDCC3224A29EC7E994</code> <code>E2D4944C11C04B33E589278AEF62F268</code> <code>B5BEA41371984EE86DF53EF148F5B09B</code> <code>4BA7EB6543C856C6CD5E9CAFFAC7A77E</code> <code>59CE2531A4599C81790F44D07DB02A98</code> <code>9E2DE8B921FAE2BF597DEE463C534D5E</code> <code>77E8A4B8510AADE115DAB8BC16BED909</code> <code>94774AF54C53DB3AE069A760ACD6DE63</code> <code>65D30F13DC90530F62C7779F43DC7D10</code> <code>1CCFC5F401D11216EFBA97E0EA8520FD</code> <code>51F61D1948780DDCB3B44DE391E644AA</code> <code>8F222F8ADDAE0B87D4946F161D30F9F5</code> <code>2595CC7314544C6C39AB113BD46129C1</code> <code>D9AC0366A4558E496614E9209E36AD9D</code> <code>621163689B185F7119D133141500BD18</code> <code>28B52375D760E9BEEB55AF642990525A</code> <code>749B0AFACE1B3596C0D34D003B4F75E6</code> <code>891B9B3877F34E762E5954E80A53B30D</code><br> <code>933C6AEF</code></td>
|
||||
<td><code>FE5002006B76ACD9991816CC04EA6607</code> <code>7E7F7993E37C70B139A4D9B934796856</code> <code>E5E77CC366122CA5E7B011D1FB389FF7</code> <code>96E61257A96ED86E89CD4F8B96C77E0D</code> <code>836D4AE16C36D5DAE9FDD8220DE1F6CB</code> <code>E4A459EB73D6AC1EA9073A2AEF6E3D1D</code> <code>019CDB8E271CD21D6E30386175DF5316</code> <code>713CEA47E0CAC3593C9C637DBF1BD4C3</code> <code>68F7DC8F5F0D2E9A474F5B90DAEB2291</code> <code>6661670CA6206C7E0B0F257281E18FEA</code> <code>B55B94B9DCB8908D67562B76CB4447DF</code> <code>8FEB31CEB38559AD413D9648ECBE082B</code> <code>8723995E01EF343D8C27ACEEBB7BF633</code> <code>04884A6C257F93247AF6C69EC7F94D2C</code> <code>91D0BC83ECB09C986304A3C75AFD54E7</code> <code>2F25F6993BD281ACF2BB2D591583D158</code> <code>28BE6CAE28250ED9A00E224D1A9F889D</code> <code>BC987EFD45C8D8C844D9AC18F9E0E044</code> <code>D89FAC9B80BC09F3FEF4EDB6ECCBEF4C</code> <code>2D37FFBB05C1E08EF1001F7F22A4891C</code> <code>C5FD0D101EAB646BF0237BDB5B90F887</code> <code>671E182BA12C2AEC00DCBCB4E9703611</code> <code>1D3E01C0B169E9460E8C3C660642C29D</code> <code>7C1B7C1E032E2F11B2E50A6CCC283D54</code> <code>9200E963557B676F42A68072A55DEEDE</code> <code>8DBF08C0C109D580B3BDDD34D51F8170</code> <code>38069ED7481236A3ADCDF908B8831B32</code> <code>7ECFE7ACDAE6D05C6BEECB99F11595CF</code> <code>7C67B3A490527EB6EF31DD8A4D3E8B3B</code> <code>8A3721DF6DFD3A9368FBEF4CF8F079AB</code> <code>1DC5D55FF941DA71E80EEBF5914BE99A</code> <code>D1DC0FCFD82D72640237C740035A4B6A</code> <code>4D22959BBAE2102CBF54C9189F35A702</code> <code>A8B83DC22A26DD0CC00F10849B192B76</code> <code>1A5BB8BC481D81D44A61B736D072FD80</code> <code>39FF7D7EEA5367BB5893AD685F7BB473</code> <code>9B598D54E68566FDE613FC9E25C937EA</code><br> <code>CE7F8B19</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = D1B1051F06A57A7CE3F906D2A94B4FE3B2DD70937BA3F4D0A6CD7E5E7
|
|||
<!-- 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 = CDC6D0976753F5301FCB735055EB368450D0B647D72DF549A8AAB93E24B1664F06F1B96C62C1805F3DD1C66FDDCBE715A597AA78A03856056689484FB9EAF0DD7348F457B7EC980053DB7B10C9F93EC99FF037BE0A764E96AE07C0425964EF095067CF09340A9E810C34617D4E7152344B659D05CB7FA5CA1289CC6EE9D1D81E15AF1B39DF6E7BF19FDCEC6219D7E0C5F938F561FA3E96E8A460EDD2B73DA9A6F8E16F85D4AF1283511340E9FB735F05A1793CDA7FD6B244E7BC9BCAF5EAB0AAEC0A27AF094498A170FB064517AEEDA685F083301D9A9DFEDA28C03234B80AC78A9B3CE21B511D453B2C2CF7AE5070109BB3AA796A69396FC694A4C71499A6C5AD1987E58B95A69678B6A0A2E05B68E83C9769B824A1D1C71C0B68CAD915E3D1508D36F34D92CF346E7A2E81374A30153842A1EDCC3224A29EC7E994E2D4944C11C04B33E589278AEF62F268B5BEA41371984EE86DF53EF148F5B09B4BA7EB6543C856C6CD5E9CAFFAC7A77E59CE2531A4599C81790F44D07DB02A989E2DE8B921FAE2BF597DEE463C534D5E77E8A4B8510AADE115DAB8BC16BED90994774AF54C53DB3AE069A760ACD6DE6365D30F13DC90530F62C7779F43DC7D101CCFC5F401D11216EFBA97E0EA8520FD51F61D1948780DDCB3B44DE391E644AA8F222F8ADDAE0B87D4946F161D30F9F52595CC7314544C6C39AB113BD46129C1D9AC0366A4558E496614E9209E36AD9D621163689B185F7119D133141500BD1828B52375D760E9BEEB55AF642990525A749B0AFACE1B3596C0D34D003B4F75E6891B9B3877F34E762E5954E80A53B30D933C6AEF
|
||||
tmp_aes_key = 8BB0E8A7D11015E61D7F335CE32530072F3C52660F4A6CBA1E4C8EE7536B9D33
|
||||
tmp_aes_iv = BDD73B7CBBC3BECA871EB5272997C64A7C874A04055F525066A94837CD8CADBC</code></pre>
|
||||
<pre><code>encrypted_answer = 6B76ACD9991816CC04EA66077E7F7993E37C70B139A4D9B934796856E5E77CC366122CA5E7B011D1FB389FF796E61257A96ED86E89CD4F8B96C77E0D836D4AE16C36D5DAE9FDD8220DE1F6CBE4A459EB73D6AC1EA9073A2AEF6E3D1D019CDB8E271CD21D6E30386175DF5316713CEA47E0CAC3593C9C637DBF1BD4C368F7DC8F5F0D2E9A474F5B90DAEB22916661670CA6206C7E0B0F257281E18FEAB55B94B9DCB8908D67562B76CB4447DF8FEB31CEB38559AD413D9648ECBE082B8723995E01EF343D8C27ACEEBB7BF63304884A6C257F93247AF6C69EC7F94D2C91D0BC83ECB09C986304A3C75AFD54E72F25F6993BD281ACF2BB2D591583D15828BE6CAE28250ED9A00E224D1A9F889DBC987EFD45C8D8C844D9AC18F9E0E044D89FAC9B80BC09F3FEF4EDB6ECCBEF4C2D37FFBB05C1E08EF1001F7F22A4891CC5FD0D101EAB646BF0237BDB5B90F887671E182BA12C2AEC00DCBCB4E97036111D3E01C0B169E9460E8C3C660642C29D7C1B7C1E032E2F11B2E50A6CCC283D549200E963557B676F42A68072A55DEEDE8DBF08C0C109D580B3BDDD34D51F817038069ED7481236A3ADCDF908B8831B327ECFE7ACDAE6D05C6BEECB99F11595CF7C67B3A490527EB6EF31DD8A4D3E8B3B8A3721DF6DFD3A9368FBEF4CF8F079AB1DC5D55FF941DA71E80EEBF5914BE99AD1DC0FCFD82D72640237C740035A4B6A4D22959BBAE2102CBF54C9189F35A702A8B83DC22A26DD0CC00F10849B192B761A5BB8BC481D81D44A61B736D072FD8039FF7D7EEA5367BB5893AD685F7BB4739B598D54E68566FDE613FC9E25C937EACE7F8B19
|
||||
tmp_aes_key = 3A849EC95DD739CDF5CBB89541EF40A7AC44B6DD578FE0EEFB6F69D6A7F53B0E
|
||||
tmp_aes_iv = 017E0CD56F04427115EB81053316733539313883BBCFDF9868E7952F7A604CAB</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = C10EBED9B82736A8B9160F2ACBFC4BC2B8B92049BA0D89B5DBD8C65A8B8DD075E7F955693B65DD5D863C64439D30AC3C57173BBC88FF8CC203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100083F59BDA49674F3E3F6FEACD421D0DF943E763A610DC046A64E61AA52E9D685A18A30F28507B2570FAC187E5B6D07BDC460F75AE2A71161FEA65F8131D19EDB320455931BB7F04A44E412BCB3192C9BFE2740B969C4F881E10734F520F82673CA4540E2001D9DAA57D3418E2AFFDABD521E90D60DC8D5D9AC824CFD918804BA930917A001778AF0BF7DD0F77A40F0C5FF058CE756EC5F9E098EB6DC436AE0B52F877E236AA71B412B40274DC8713AC42472B9F471A793E483A7432EB6C06BD7E166B2D95A314F5DA5176DBE5A12AFCC4D3857788B95CE7A7937DAC7F37007B75D19F63189E768DC7F90C606053D1155EF4954F97DF37080601AA7934E9CB41234F43467305FE0D56B31BA2A
|
||||
answer = BA0D89B5DBD8C65A8B8DD075E7F955693B65DD5D863C64439D30AC3C57173BBC88FF8CC203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100083F59BDA49674F3E3F6FEACD421D0DF943E763A610DC046A64E61AA52E9D685A18A30F28507B2570FAC187E5B6D07BDC460F75AE2A71161FEA65F8131D19EDB320455931BB7F04A44E412BCB3192C9BFE2740B969C4F881E10734F520F82673CA4540E2001D9DAA57D3418E2AFFDABD521E90D60DC8D5D9AC824CFD918804BA930917A001778AF0BF7DD0F77A40F0C5FF058CE756EC5F9E098EB6DC436AE0B52F877E236AA71B412B40274DC8713AC42472B9F471A793E483A7432EB6C06BD7E166B2D95A314F5DA5176DBE5A12AFCC4D3857788B95CE7A7937DAC7F37007B75D19F63189E768DC7F90C606053D1155EF4954F97DF37080601AA7934E9CB41234F43467305FE0D56B31BA2A</code></pre>
|
||||
<pre><code>answer_with_hash = 84109E5E4B9CB0090396548F852A37C9728ECA4BBA0D89B554DAA8B2DCEBEEE517AFC951301570BE81FF5611A6F07AE1015BD4189E60687C03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001006C2129B293D09F638E9EFBBA9BE6989A9C7791E02A1B74B94ECA7B576A19550C58D97B2AB1D93FAD1F5202F70E3C3EEEF410483CCCE89EDEA24BB163CEFC39222A52A761947F6E79A93F672A934398062EAD653B2CE6FCE627DA0E1A92DD5931BD2FB9220CA95235EF0E3C9CBFA70FF5125BB278E1BA5D3EFCC6AC957C02EA5F5BFA7351C510E39CD272C93E7FF5D10AD38DF3FD54B7088CCB794175A50A604AACC4645B43DEC95C9331C9F7B27273336C31DD7D4300B908AB2CD7B6ECE287F5E6FF7F0AB9A22E1530A53A5460A9723FE50A0625261C23E69C8FB3FEF057C6B97A33111A0DAEF38F15EB5F5DCFC993BC91E43800ACFD1CB660D9E4A49A5CF36D3D303667E4FB5CDE5675AC62
|
||||
answer = BA0D89B554DAA8B2DCEBEEE517AFC951301570BE81FF5611A6F07AE1015BD4189E60687C03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001006C2129B293D09F638E9EFBBA9BE6989A9C7791E02A1B74B94ECA7B576A19550C58D97B2AB1D93FAD1F5202F70E3C3EEEF410483CCCE89EDEA24BB163CEFC39222A52A761947F6E79A93F672A934398062EAD653B2CE6FCE627DA0E1A92DD5931BD2FB9220CA95235EF0E3C9CBFA70FF5125BB278E1BA5D3EFCC6AC957C02EA5F5BFA7351C510E39CD272C93E7FF5D10AD38DF3FD54B7088CCB794175A50A604AACC4645B43DEC95C9331C9F7B27273336C31DD7D4300B908AB2CD7B6ECE287F5E6FF7F0AB9A22E1530A53A5460A9723FE50A0625261C23E69C8FB3FEF057C6B97A33111A0DAEF38F15EB5F5DCFC993BC91E43800ACFD1CB660D9E4A49A5CF36D3D303667E4FB5CDE5675AC62</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 DB D8 C6 5A 8B 8D D0 75 E7 F9 55 69
|
||||
0010 | 3B 65 DD 5D 86 3C 64 43 9D 30 AC 3C 57 17 3B BC
|
||||
0020 | 88 FF 8C C2 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 54 DA A8 B2 DC EB EE E5 17 AF C9 51
|
||||
0010 | 30 15 70 BE 81 FF 56 11 A6 F0 7A E1 01 5B D4 18
|
||||
0020 | 9E 60 68 7C 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 = BA0D89B5DBD8C65A8B8DD075E7F955693B65DD5D863C64439D30AC3C57173BBC88FF8CC
|
|||
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 | 08 3F 59 BD A4 96 74 F3 E3 F6 FE AC D4 21 D0 DF
|
||||
0140 | 94 3E 76 3A 61 0D C0 46 A6 4E 61 AA 52 E9 D6 85
|
||||
0150 | A1 8A 30 F2 85 07 B2 57 0F AC 18 7E 5B 6D 07 BD
|
||||
0160 | C4 60 F7 5A E2 A7 11 61 FE A6 5F 81 31 D1 9E DB
|
||||
0170 | 32 04 55 93 1B B7 F0 4A 44 E4 12 BC B3 19 2C 9B
|
||||
0180 | FE 27 40 B9 69 C4 F8 81 E1 07 34 F5 20 F8 26 73
|
||||
0190 | CA 45 40 E2 00 1D 9D AA 57 D3 41 8E 2A FF DA BD
|
||||
01A0 | 52 1E 90 D6 0D C8 D5 D9 AC 82 4C FD 91 88 04 BA
|
||||
01B0 | 93 09 17 A0 01 77 8A F0 BF 7D D0 F7 7A 40 F0 C5
|
||||
01C0 | FF 05 8C E7 56 EC 5F 9E 09 8E B6 DC 43 6A E0 B5
|
||||
01D0 | 2F 87 7E 23 6A A7 1B 41 2B 40 27 4D C8 71 3A C4
|
||||
01E0 | 24 72 B9 F4 71 A7 93 E4 83 A7 43 2E B6 C0 6B D7
|
||||
01F0 | E1 66 B2 D9 5A 31 4F 5D A5 17 6D BE 5A 12 AF CC
|
||||
0200 | 4D 38 57 78 8B 95 CE 7A 79 37 DA C7 F3 70 07 B7
|
||||
0210 | 5D 19 F6 31 89 E7 68 DC 7F 90 C6 06 05 3D 11 55
|
||||
0220 | EF 49 54 F9 7D F3 70 80 60 1A A7 93 4E 9C B4 12
|
||||
0230 | 34 F4 34 67</code></pre>
|
||||
0130 | 6C 21 29 B2 93 D0 9F 63 8E 9E FB BA 9B E6 98 9A
|
||||
0140 | 9C 77 91 E0 2A 1B 74 B9 4E CA 7B 57 6A 19 55 0C
|
||||
0150 | 58 D9 7B 2A B1 D9 3F AD 1F 52 02 F7 0E 3C 3E EE
|
||||
0160 | F4 10 48 3C CC E8 9E DE A2 4B B1 63 CE FC 39 22
|
||||
0170 | 2A 52 A7 61 94 7F 6E 79 A9 3F 67 2A 93 43 98 06
|
||||
0180 | 2E AD 65 3B 2C E6 FC E6 27 DA 0E 1A 92 DD 59 31
|
||||
0190 | BD 2F B9 22 0C A9 52 35 EF 0E 3C 9C BF A7 0F F5
|
||||
01A0 | 12 5B B2 78 E1 BA 5D 3E FC C6 AC 95 7C 02 EA 5F
|
||||
01B0 | 5B FA 73 51 C5 10 E3 9C D2 72 C9 3E 7F F5 D1 0A
|
||||
01C0 | D3 8D F3 FD 54 B7 08 8C CB 79 41 75 A5 0A 60 4A
|
||||
01D0 | AC C4 64 5B 43 DE C9 5C 93 31 C9 F7 B2 72 73 33
|
||||
01E0 | 6C 31 DD 7D 43 00 B9 08 AB 2C D7 B6 EC E2 87 F5
|
||||
01F0 | E6 FF 7F 0A B9 A2 2E 15 30 A5 3A 54 60 A9 72 3F
|
||||
0200 | E5 0A 06 25 26 1C 23 E6 9C 8F B3 FE F0 57 C6 B9
|
||||
0210 | 7A 33 11 1A 0D AE F3 8F 15 EB 5F 5D CF C9 93 BC
|
||||
0220 | 91 E4 38 00 AC FD 1C B6 60 D9 E4 A4 9A 5C F3 6D
|
||||
0230 | 3D 30 36 67</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 = BA0D89B5DBD8C65A8B8DD075E7F955693B65DD5D863C64439D30AC3C57173BBC88FF8CC
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>DBD8C65A8B8DD075E7F955693B65DD5D</code></td>
|
||||
<td><code>54DAA8B2DCEBEEE517AFC951301570BE</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>863C64439D30AC3C57173BBC88FF8CC2</code></td>
|
||||
<td><code>81FF5611A6F07AE1015BD4189E60687C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B5DBD8C65A8B8DD075E7F955693B65DD5D863C64439D30AC3C57173BBC88FF8CC
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE000100083F59BDA49674F3E3F6FEAC</code> <code>D421D0DF943E763A610DC046A64E61AA</code> <code>52E9D685A18A30F28507B2570FAC187E</code> <code>5B6D07BDC460F75AE2A71161FEA65F81</code> <code>31D19EDB320455931BB7F04A44E412BC</code> <code>B3192C9BFE2740B969C4F881E10734F5</code> <code>20F82673CA4540E2001D9DAA57D3418E</code> <code>2AFFDABD521E90D60DC8D5D9AC824CFD</code> <code>918804BA930917A001778AF0BF7DD0F7</code> <code>7A40F0C5FF058CE756EC5F9E098EB6DC</code> <code>436AE0B52F877E236AA71B412B40274D</code> <code>C8713AC42472B9F471A793E483A7432E</code> <code>B6C06BD7E166B2D95A314F5DA5176DBE</code> <code>5A12AFCC4D3857788B95CE7A7937DAC7</code> <code>F37007B75D19F63189E768DC7F90C606</code> <code>053D1155EF4954F97DF37080601AA793</code><br> <code>4E9CB412</code></td>
|
||||
<td><code>FE0001006C2129B293D09F638E9EFBBA</code> <code>9BE6989A9C7791E02A1B74B94ECA7B57</code> <code>6A19550C58D97B2AB1D93FAD1F5202F7</code> <code>0E3C3EEEF410483CCCE89EDEA24BB163</code> <code>CEFC39222A52A761947F6E79A93F672A</code> <code>934398062EAD653B2CE6FCE627DA0E1A</code> <code>92DD5931BD2FB9220CA95235EF0E3C9C</code> <code>BFA70FF5125BB278E1BA5D3EFCC6AC95</code> <code>7C02EA5F5BFA7351C510E39CD272C93E</code> <code>7FF5D10AD38DF3FD54B7088CCB794175</code> <code>A50A604AACC4645B43DEC95C9331C9F7</code> <code>B27273336C31DD7D4300B908AB2CD7B6</code> <code>ECE287F5E6FF7F0AB9A22E1530A53A54</code> <code>60A9723FE50A0625261C23E69C8FB3FE</code> <code>F057C6B97A33111A0DAEF38F15EB5F5D</code> <code>CFC993BC91E43800ACFD1CB660D9E4A4</code><br> <code>9A5CF36D</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>34F43467</code> (1731523636 in decimal)</td>
|
||||
<td><code>3D303667</code> (1731604541 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B5DBD8C65A8B8DD075E7F955693B65DD5D863C64439D30AC3C57173BBC88FF8CC
|
|||
<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 = 9540E9BEDDAF1FEAAEF6E8DB9626EB0C9D9DDA91409861B6762C60CF39A1CE0EAABA2B08527A1EE27C223C3661FC5753000F704E6307777C115FFCFF652761022686C66100E449F23E5B747B96108B053A9A735D8D21D7C1A1BB47DEB8FBE08AD039D97EDCA4980399ABC3C98337B0BE45C9519AB2E8304A464641EA405E07D8886A7853949C1C24603C077D59E2952108142999964734549FBD8ED0146EC32C945A451A1EEDF58953EF09E13ACC10C17D3EAF784E0FA2436D90E71B510018B7FCBD8CA906CDAB68D38690F14949D9E5B9B7C049873D9C957DC25BD87FB7C4913573E4260D29875FFC21DF3583D1C8B08198AD64F6314EF01895C709F1354B9B</code></pre>
|
||||
<pre><code>b = 353D376BDE44BBA9E1BE09825CFF0863C77359727AC175F07A0E0AC76E6598573F5010DCB20C8DC317E93FA5E22804918B5F2288ED1CEADBA6E90E708CB88D62B58EF9DAAE65B19AC09E8E37CE1ACFDC78DAB097C35DA2789ECFE46A7614374EE66B3FD2564CFCA490A75BA56AE18708110C30C62AF5293D06B6D0B023168FCFE1BD1B2FA54A162B46A4BB6D2CD3E0014025C8C4255AAC034D98790F8864E01C24E4E5696731B018C98B86EACDC73EC98C8232A8E2C103D270BFF30595ECC3F268640F0BF1B427D42C284FF8BC729B574C35BA2E83FDA21C7179508E215091C62DD3F8C7934331E0444A56F9A8BFF17D05BC50E978BC8519F96258A8B0872FCF</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 = 56499B798E003EBF329EB51391E02B948E8A252B1510BCAF70973321F456D578AB570A16BBF2A0075DAF4FA0088647D9CA490C66B93EF960509A72DEDE66DDABABE947A61FB054044FF4C3280FFD632F28C418827B31935863749096B01D92CEC64222DE18E6475B72CA52B9213E7E8A9B754D05A985DF0B857BB71A3D2AB8FF4113776EB77E3062CA3B7DD510CD4C6145D7E436CCB93E46A8D27FB7898D9F7F5DA345C2E46617D0CE5B988D751A47E5697A93CCFC133373EFB38A49746F732EFD4609C37F5C89F0706913F9C096259600125C40FAD9769A059454418CDC0B960E70DC80A2C206DE40D1B74DAF3CAD96E77214996D723998540E294F65C87C8D</code></pre>
|
||||
<pre><code>g_b = 27553384031FA706EB6B3EE06F5C00CBC7EFD7269ABDC21FDFD94C41D1AEE347C4C95BCD509990ED3E7FAE6706D3F8A041006A5EF0A75C4F803A39958E42BC3E46CA9EFF36189277807F74C79FD381B845B25D03D18FA0216469868CB9C007A1BA388D868B9834868C179DF2A07FAA93350B5AACCBD40905265699578A341599F73A35A4A7CF22F1464143472671F929FC11D38E49E3E9D4E19CBEB323479A626121D2F7FE5B20F37D4943E50C146F80AE2189E17A7C3342249B30EA7C4F49E535FBD4F3A39660B2A663315147873F8952E6E15AC48FE1473A7FFF13A21E05244E5435665AA8569B6BF1953007E67839C5B974AFFB3589DFBCB97E84D4C1C845</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 DB D8 C6 5A 8B 8D D0 75 E7 F9 55 69
|
||||
0010 | 3B 65 DD 5D 86 3C 64 43 9D 30 AC 3C 57 17 3B BC
|
||||
0020 | 88 FF 8C C2 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 56 49 9B 79 8E 00 3E BF 32 9E B5 13 91 E0 2B 94
|
||||
0040 | 8E 8A 25 2B 15 10 BC AF 70 97 33 21 F4 56 D5 78
|
||||
0050 | AB 57 0A 16 BB F2 A0 07 5D AF 4F A0 08 86 47 D9
|
||||
0060 | CA 49 0C 66 B9 3E F9 60 50 9A 72 DE DE 66 DD AB
|
||||
0070 | AB E9 47 A6 1F B0 54 04 4F F4 C3 28 0F FD 63 2F
|
||||
0080 | 28 C4 18 82 7B 31 93 58 63 74 90 96 B0 1D 92 CE
|
||||
0090 | C6 42 22 DE 18 E6 47 5B 72 CA 52 B9 21 3E 7E 8A
|
||||
00A0 | 9B 75 4D 05 A9 85 DF 0B 85 7B B7 1A 3D 2A B8 FF
|
||||
00B0 | 41 13 77 6E B7 7E 30 62 CA 3B 7D D5 10 CD 4C 61
|
||||
00C0 | 45 D7 E4 36 CC B9 3E 46 A8 D2 7F B7 89 8D 9F 7F
|
||||
00D0 | 5D A3 45 C2 E4 66 17 D0 CE 5B 98 8D 75 1A 47 E5
|
||||
00E0 | 69 7A 93 CC FC 13 33 73 EF B3 8A 49 74 6F 73 2E
|
||||
00F0 | FD 46 09 C3 7F 5C 89 F0 70 69 13 F9 C0 96 25 96
|
||||
0100 | 00 12 5C 40 FA D9 76 9A 05 94 54 41 8C DC 0B 96
|
||||
0110 | 0E 70 DC 80 A2 C2 06 DE 40 D1 B7 4D AF 3C AD 96
|
||||
0120 | E7 72 14 99 6D 72 39 98 54 0E 29 4F 65 C8 7C 8D</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 54 DA A8 B2 DC EB EE E5 17 AF C9 51
|
||||
0010 | 30 15 70 BE 81 FF 56 11 A6 F0 7A E1 01 5B D4 18
|
||||
0020 | 9E 60 68 7C 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 27 55 33 84 03 1F A7 06 EB 6B 3E E0 6F 5C 00 CB
|
||||
0040 | C7 EF D7 26 9A BD C2 1F DF D9 4C 41 D1 AE E3 47
|
||||
0050 | C4 C9 5B CD 50 99 90 ED 3E 7F AE 67 06 D3 F8 A0
|
||||
0060 | 41 00 6A 5E F0 A7 5C 4F 80 3A 39 95 8E 42 BC 3E
|
||||
0070 | 46 CA 9E FF 36 18 92 77 80 7F 74 C7 9F D3 81 B8
|
||||
0080 | 45 B2 5D 03 D1 8F A0 21 64 69 86 8C B9 C0 07 A1
|
||||
0090 | BA 38 8D 86 8B 98 34 86 8C 17 9D F2 A0 7F AA 93
|
||||
00A0 | 35 0B 5A AC CB D4 09 05 26 56 99 57 8A 34 15 99
|
||||
00B0 | F7 3A 35 A4 A7 CF 22 F1 46 41 43 47 26 71 F9 29
|
||||
00C0 | FC 11 D3 8E 49 E3 E9 D4 E1 9C BE B3 23 47 9A 62
|
||||
00D0 | 61 21 D2 F7 FE 5B 20 F3 7D 49 43 E5 0C 14 6F 80
|
||||
00E0 | AE 21 89 E1 7A 7C 33 42 24 9B 30 EA 7C 4F 49 E5
|
||||
00F0 | 35 FB D4 F3 A3 96 60 B2 A6 63 31 51 47 87 3F 89
|
||||
0100 | 52 E6 E1 5A C4 8F E1 47 3A 7F FF 13 A2 1E 05 24
|
||||
0110 | 4E 54 35 66 5A A8 56 9B 6B F1 95 30 07 E6 78 39
|
||||
0120 | C5 B9 74 AF FB 35 89 DF BC B9 7E 84 D4 C1 C8 45</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 = BA0D89B5DBD8C65A8B8DD075E7F955693B65DD5D863C64439D30AC3C57173BBC88FF8CC
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>DBD8C65A8B8DD075E7F955693B65DD5D</code></td>
|
||||
<td><code>54DAA8B2DCEBEEE517AFC951301570BE</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>863C64439D30AC3C57173BBC88FF8CC2</code></td>
|
||||
<td><code>81FF5611A6F07AE1015BD4189E60687C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE00010056499B798E003EBF329EB513</code> <code>91E02B948E8A252B1510BCAF70973321</code> <code>F456D578AB570A16BBF2A0075DAF4FA0</code> <code>088647D9CA490C66B93EF960509A72DE</code> <code>DE66DDABABE947A61FB054044FF4C328</code> <code>0FFD632F28C418827B31935863749096</code> <code>B01D92CEC64222DE18E6475B72CA52B9</code> <code>213E7E8A9B754D05A985DF0B857BB71A</code> <code>3D2AB8FF4113776EB77E3062CA3B7DD5</code> <code>10CD4C6145D7E436CCB93E46A8D27FB7</code> <code>898D9F7F5DA345C2E46617D0CE5B988D</code> <code>751A47E5697A93CCFC133373EFB38A49</code> <code>746F732EFD4609C37F5C89F0706913F9</code> <code>C096259600125C40FAD9769A05945441</code> <code>8CDC0B960E70DC80A2C206DE40D1B74D</code> <code>AF3CAD96E77214996D723998540E294F</code><br> <code>65C87C8D</code></td>
|
||||
<td><code>FE00010027553384031FA706EB6B3EE0</code> <code>6F5C00CBC7EFD7269ABDC21FDFD94C41</code> <code>D1AEE347C4C95BCD509990ED3E7FAE67</code> <code>06D3F8A041006A5EF0A75C4F803A3995</code> <code>8E42BC3E46CA9EFF36189277807F74C7</code> <code>9FD381B845B25D03D18FA0216469868C</code> <code>B9C007A1BA388D868B9834868C179DF2</code> <code>A07FAA93350B5AACCBD4090526569957</code> <code>8A341599F73A35A4A7CF22F146414347</code> <code>2671F929FC11D38E49E3E9D4E19CBEB3</code> <code>23479A626121D2F7FE5B20F37D4943E5</code> <code>0C146F80AE2189E17A7C3342249B30EA</code> <code>7C4F49E535FBD4F3A39660B2A6633151</code> <code>47873F8952E6E15AC48FE1473A7FFF13</code> <code>A21E05244E5435665AA8569B6BF19530</code> <code>07E67839C5B974AFFB3589DFBCB97E84</code><br> <code>D4C1C845</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 = BA0D89B5DBD8C65A8B8DD075E7F955693B65DD5D863C64439D30AC3C57173BBC88FF8CC
|
|||
<!-- 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 = 54B64366DBD8C65A8B8DD075E7F955693B65DD5D863C64439D30AC3C57173BBC88FF8CC20000000000000000FE00010056499B798E003EBF329EB51391E02B948E8A252B1510BCAF70973321F456D578AB570A16BBF2A0075DAF4FA0088647D9CA490C66B93EF960509A72DEDE66DDABABE947A61FB054044FF4C3280FFD632F28C418827B31935863749096B01D92CEC64222DE18E6475B72CA52B9213E7E8A9B754D05A985DF0B857BB71A3D2AB8FF4113776EB77E3062CA3B7DD510CD4C6145D7E436CCB93E46A8D27FB7898D9F7F5DA345C2E46617D0CE5B988D751A47E5697A93CCFC133373EFB38A49746F732EFD4609C37F5C89F0706913F9C096259600125C40FAD9769A059454418CDC0B960E70DC80A2C206DE40D1B74DAF3CAD96E77214996D723998540E294F65C87C8D
|
||||
padding = F46E273AC7BC0C04F3E10C24
|
||||
tmp_aes_key = 8BB0E8A7D11015E61D7F335CE32530072F3C52660F4A6CBA1E4C8EE7536B9D33
|
||||
tmp_aes_iv = BDD73B7CBBC3BECA871EB5272997C64A7C874A04055F525066A94837CD8CADBC</code></pre>
|
||||
<pre><code>data = 54B6436654DAA8B2DCEBEEE517AFC951301570BE81FF5611A6F07AE1015BD4189E60687C0000000000000000FE00010027553384031FA706EB6B3EE06F5C00CBC7EFD7269ABDC21FDFD94C41D1AEE347C4C95BCD509990ED3E7FAE6706D3F8A041006A5EF0A75C4F803A39958E42BC3E46CA9EFF36189277807F74C79FD381B845B25D03D18FA0216469868CB9C007A1BA388D868B9834868C179DF2A07FAA93350B5AACCBD40905265699578A341599F73A35A4A7CF22F1464143472671F929FC11D38E49E3E9D4E19CBEB323479A626121D2F7FE5B20F37D4943E50C146F80AE2189E17A7C3342249B30EA7C4F49E535FBD4F3A39660B2A663315147873F8952E6E15AC48FE1473A7FFF13A21E05244E5435665AA8569B6BF1953007E67839C5B974AFFB3589DFBCB97E84D4C1C845
|
||||
padding = D8C3647BA78018A7ED0F2093
|
||||
tmp_aes_key = 3A849EC95DD739CDF5CBB89541EF40A7AC44B6DD578FE0EEFB6F69D6A7F53B0E
|
||||
tmp_aes_iv = 017E0CD56F04427115EB81053316733539313883BBCFDF9868E7952F7A604CAB</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 = BD50BC0C2A9ADE0325559B931EA9EEFB8318BB5C088E0F6E1A4450904E8BD27A6A17F47312B89B13675A3D6944B37773412877BC8B2D6D25B91B771CC2E91E3223CA016D136D80572AB44FC99A3FE5E13E3250F653E6DC2C9EAC5CD4DCF32E8A228DC56D81F3CED69EAB4C18D30381AD228D16DB3CFE2F3E8209F914871C5D38862C308554C78FE30032E58259EA93C132463FD13E85549A691700B86DFB8EEEAF06FC41CCE635EC6B702618A620ED0BA9A68494B00DCB60EBFE2BA528A56D167CE9EC05BE306032DB9750B9DE65255503D69F48975F222788CC6591024BBA8A950E976F6CDEBF858C3C8758CBAAC72991B3A05CE55DF50F0AFE3EB95615D2D80A0D21EC74E15FCEF2FA33BE65108D0A79BC9241E2731C99EABE4CECC83BC1CFC98B7F9FDCC20BDC05C6C16E8F32CD347775A8F36D4934350B7BA23C1220659BC5DC36310F5EA559DB87C797F1040395</code></pre>
|
||||
<pre><code>encrypted_data = DBF952AAC6181513561242846EBED486A81A0A97B17E15D691DED01E0868835B193AC47460302F8DC6C69F84F1B255BF4595684AE14A6A07CAD0F4A5139893C07257F2FBF3BD06FAD327A36BCB7FB9642DD1B127FB1B84AF113BB2504914A9E6E5C13ECB25400880DC874C8A775D74F53765CE3403BEE872D5796A5593D8A932F5CF1561F7C4F1D5673D28875BC17411F95CFFAB69980F874B3D73873D716DF168615D2605564412AFAED46620120E5554F698A5CC69954CBA64FECE0AD2837556C3AD7E58B9F8A80B263754E5A46B7FE01D0208770A77243A360523DFF646692013215ED2D92F345AC00CE9CF417B01AB81473F978767DFAD007FB22F94565E80595327AAFE5B008EA0EFCDF3E005A66F201C7D3C84EE88761E9951A64677E5FF9F0CC5F4FF781827886539179BEA68510E7539D94B9DD197F4066463D455F9C9C71358BBEF520018F2B5F68196E625</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 64 E8 04 00 34 F4 34 67
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 DB D8 C6 5A 8B 8D D0 75
|
||||
0020 | E7 F9 55 69 3B 65 DD 5D 86 3C 64 43 9D 30 AC 3C
|
||||
0030 | 57 17 3B BC 88 FF 8C C2 FE 50 01 00 BD 50 BC 0C
|
||||
0040 | 2A 9A DE 03 25 55 9B 93 1E A9 EE FB 83 18 BB 5C
|
||||
0050 | 08 8E 0F 6E 1A 44 50 90 4E 8B D2 7A 6A 17 F4 73
|
||||
0060 | 12 B8 9B 13 67 5A 3D 69 44 B3 77 73 41 28 77 BC
|
||||
0070 | 8B 2D 6D 25 B9 1B 77 1C C2 E9 1E 32 23 CA 01 6D
|
||||
0080 | 13 6D 80 57 2A B4 4F C9 9A 3F E5 E1 3E 32 50 F6
|
||||
0090 | 53 E6 DC 2C 9E AC 5C D4 DC F3 2E 8A 22 8D C5 6D
|
||||
00A0 | 81 F3 CE D6 9E AB 4C 18 D3 03 81 AD 22 8D 16 DB
|
||||
00B0 | 3C FE 2F 3E 82 09 F9 14 87 1C 5D 38 86 2C 30 85
|
||||
00C0 | 54 C7 8F E3 00 32 E5 82 59 EA 93 C1 32 46 3F D1
|
||||
00D0 | 3E 85 54 9A 69 17 00 B8 6D FB 8E EE AF 06 FC 41
|
||||
00E0 | CC E6 35 EC 6B 70 26 18 A6 20 ED 0B A9 A6 84 94
|
||||
00F0 | B0 0D CB 60 EB FE 2B A5 28 A5 6D 16 7C E9 EC 05
|
||||
0100 | BE 30 60 32 DB 97 50 B9 DE 65 25 55 03 D6 9F 48
|
||||
0110 | 97 5F 22 27 88 CC 65 91 02 4B BA 8A 95 0E 97 6F
|
||||
0120 | 6C DE BF 85 8C 3C 87 58 CB AA C7 29 91 B3 A0 5C
|
||||
0130 | E5 5D F5 0F 0A FE 3E B9 56 15 D2 D8 0A 0D 21 EC
|
||||
0140 | 74 E1 5F CE F2 FA 33 BE 65 10 8D 0A 79 BC 92 41
|
||||
0150 | E2 73 1C 99 EA BE 4C EC C8 3B C1 CF C9 8B 7F 9F
|
||||
0160 | DC C2 0B DC 05 C6 C1 6E 8F 32 CD 34 77 75 A8 F3
|
||||
0170 | 6D 49 34 35 0B 7B A2 3C 12 20 65 9B C5 DC 36 31
|
||||
0180 | 0F 5E A5 59 DB 87 C7 97 F1 04 03 95</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 7C B0 0E 00 3D 30 36 67
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 54 DA A8 B2 DC EB EE E5
|
||||
0020 | 17 AF C9 51 30 15 70 BE 81 FF 56 11 A6 F0 7A E1
|
||||
0030 | 01 5B D4 18 9E 60 68 7C FE 50 01 00 DB F9 52 AA
|
||||
0040 | C6 18 15 13 56 12 42 84 6E BE D4 86 A8 1A 0A 97
|
||||
0050 | B1 7E 15 D6 91 DE D0 1E 08 68 83 5B 19 3A C4 74
|
||||
0060 | 60 30 2F 8D C6 C6 9F 84 F1 B2 55 BF 45 95 68 4A
|
||||
0070 | E1 4A 6A 07 CA D0 F4 A5 13 98 93 C0 72 57 F2 FB
|
||||
0080 | F3 BD 06 FA D3 27 A3 6B CB 7F B9 64 2D D1 B1 27
|
||||
0090 | FB 1B 84 AF 11 3B B2 50 49 14 A9 E6 E5 C1 3E CB
|
||||
00A0 | 25 40 08 80 DC 87 4C 8A 77 5D 74 F5 37 65 CE 34
|
||||
00B0 | 03 BE E8 72 D5 79 6A 55 93 D8 A9 32 F5 CF 15 61
|
||||
00C0 | F7 C4 F1 D5 67 3D 28 87 5B C1 74 11 F9 5C FF AB
|
||||
00D0 | 69 98 0F 87 4B 3D 73 87 3D 71 6D F1 68 61 5D 26
|
||||
00E0 | 05 56 44 12 AF AE D4 66 20 12 0E 55 54 F6 98 A5
|
||||
00F0 | CC 69 95 4C BA 64 FE CE 0A D2 83 75 56 C3 AD 7E
|
||||
0100 | 58 B9 F8 A8 0B 26 37 54 E5 A4 6B 7F E0 1D 02 08
|
||||
0110 | 77 0A 77 24 3A 36 05 23 DF F6 46 69 20 13 21 5E
|
||||
0120 | D2 D9 2F 34 5A C0 0C E9 CF 41 7B 01 AB 81 47 3F
|
||||
0130 | 97 87 67 DF AD 00 7F B2 2F 94 56 5E 80 59 53 27
|
||||
0140 | AA FE 5B 00 8E A0 EF CD F3 E0 05 A6 6F 20 1C 7D
|
||||
0150 | 3C 84 EE 88 76 1E 99 51 A6 46 77 E5 FF 9F 0C C5
|
||||
0160 | F4 FF 78 18 27 88 65 39 17 9B EA 68 51 0E 75 39
|
||||
0170 | D9 4B 9D D1 97 F4 06 64 63 D4 55 F9 C9 C7 13 58
|
||||
0180 | BB EF 52 00 18 F2 B5 F6 81 96 E6 25</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>64E8040034F43467</code></td>
|
||||
<td><code>7CB00E003D303667</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>DBD8C65A8B8DD075E7F955693B65DD5D</code></td>
|
||||
<td><code>54DAA8B2DCEBEEE517AFC951301570BE</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>863C64439D30AC3C57173BBC88FF8CC2</code></td>
|
||||
<td><code>81FF5611A6F07AE1015BD4189E60687C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE500100BD50BC0C2A9ADE0325559B93</code> <code>1EA9EEFB8318BB5C088E0F6E1A445090</code> <code>4E8BD27A6A17F47312B89B13675A3D69</code> <code>44B37773412877BC8B2D6D25B91B771C</code> <code>C2E91E3223CA016D136D80572AB44FC9</code> <code>9A3FE5E13E3250F653E6DC2C9EAC5CD4</code> <code>DCF32E8A228DC56D81F3CED69EAB4C18</code> <code>D30381AD228D16DB3CFE2F3E8209F914</code> <code>871C5D38862C308554C78FE30032E582</code> <code>59EA93C132463FD13E85549A691700B8</code> <code>6DFB8EEEAF06FC41CCE635EC6B702618</code> <code>A620ED0BA9A68494B00DCB60EBFE2BA5</code> <code>28A56D167CE9EC05BE306032DB9750B9</code> <code>DE65255503D69F48975F222788CC6591</code> <code>024BBA8A950E976F6CDEBF858C3C8758</code> <code>CBAAC72991B3A05CE55DF50F0AFE3EB9</code> <code>5615D2D80A0D21EC74E15FCEF2FA33BE</code> <code>65108D0A79BC9241E2731C99EABE4CEC</code> <code>C83BC1CFC98B7F9FDCC20BDC05C6C16E</code> <code>8F32CD347775A8F36D4934350B7BA23C</code> <code>1220659BC5DC36310F5EA559DB87C797</code><br> <code>F1040395</code></td>
|
||||
<td><code>FE500100DBF952AAC618151356124284</code> <code>6EBED486A81A0A97B17E15D691DED01E</code> <code>0868835B193AC47460302F8DC6C69F84</code> <code>F1B255BF4595684AE14A6A07CAD0F4A5</code> <code>139893C07257F2FBF3BD06FAD327A36B</code> <code>CB7FB9642DD1B127FB1B84AF113BB250</code> <code>4914A9E6E5C13ECB25400880DC874C8A</code> <code>775D74F53765CE3403BEE872D5796A55</code> <code>93D8A932F5CF1561F7C4F1D5673D2887</code> <code>5BC17411F95CFFAB69980F874B3D7387</code> <code>3D716DF168615D2605564412AFAED466</code> <code>20120E5554F698A5CC69954CBA64FECE</code> <code>0AD2837556C3AD7E58B9F8A80B263754</code> <code>E5A46B7FE01D0208770A77243A360523</code> <code>DFF646692013215ED2D92F345AC00CE9</code> <code>CF417B01AB81473F978767DFAD007FB2</code> <code>2F94565E80595327AAFE5B008EA0EFCD</code> <code>F3E005A66F201C7D3C84EE88761E9951</code> <code>A64677E5FF9F0CC5F4FF781827886539</code> <code>179BEA68510E7539D94B9DD197F40664</code> <code>63D455F9C9C71358BBEF520018F2B5F6</code><br> <code>8196E625</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 = C709354ABAEE02FC44484CD0A8EAF79CE5BB57BBBE944A12C344BB19BBFF403ADEA36EB8DA1686DFD2F58C2D960C9A633C9151C51FC0557C89B3B52E1CDFE0E195D327AC8C6CAE705BC35A9A5368ABCF2DB3C72A6722F653E4E3CE2775BDA50B28FD3F87740C894C24FF911AB2739F536ECAED731D5C2ED5A285752781161A828470E3FE3FF27C49490075BCB1A66E4FFC20A64C4945CFBEE56B919ED55B758D20784320C290D7C6F39CC8D68E12BA1D270DE3A02CF3505A2B779652AF9C019A4055770329AA996DD46A2A6001021A5C91891793B6CA6A99F0E8EA4DB9C591416BC5FFA9F7C53D4683A2AAB4410C2DD1A8E394DB969D33115AE184824C804830</code></pre>
|
||||
<pre><code>auth_key = 27614781C5EFCF2E7327FBEB32D97ED420F5E58E134ED9A3D62239DE8034788D62168C8E5EC1E53BA0711D21DE91F4524E846040B056894D4C586E70E7EFEDCAAC4E49A3C941AA9200C170B7FE8C6F4DA6047222DA49ABD3CCD387EAAC2BE96457F1B14CA4CC28CF9A406927B3525B031DB0629152FA55AED310C00247F57F391A0C37B93CBB25369ACBC5D27D8A4B7A883FB57E9265C89C7E34654CCF02EADDC3BE08ACE3A85247487DBFA6BD66458D1D4301BB76B80529B3BB9E8D28458AAF3A4CB1DABC0135600F0430407CD3918E6821E00C641E298C5C413C9EB8FCD5996314887D185114C75648F752A6E20011075939F7F440FF9664049FEF7F615BBB</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 10 9B 55 36 F4 34 67
|
||||
0010 | 34 00 00 00 34 F7 CB 3B DB D8 C6 5A 8B 8D D0 75
|
||||
0020 | E7 F9 55 69 3B 65 DD 5D 86 3C 64 43 9D 30 AC 3C
|
||||
0030 | 57 17 3B BC 88 FF 8C C2 E0 8A A8 79 70 AF 59 C8
|
||||
0040 | 51 23 FF BF 88 BE B3 16</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C0 41 9C 3F 30 36 67
|
||||
0010 | 34 00 00 00 34 F7 CB 3B 54 DA A8 B2 DC EB EE E5
|
||||
0020 | 17 AF C9 51 30 15 70 BE 81 FF 56 11 A6 F0 7A E1
|
||||
0030 | 01 5B D4 18 9E 60 68 7C 18 B5 6C D1 0D DD B2 0E
|
||||
0040 | 0A 75 E9 74 75 80 7D AC</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,7 +817,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>01109B5536F43467</code></td>
|
||||
<td><code>01C0419C3F303667</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>
|
||||
|
@ -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>DBD8C65A8B8DD075E7F955693B65DD5D</code></td>
|
||||
<td><code>54DAA8B2DCEBEEE517AFC951301570BE</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>863C64439D30AC3C57173BBC88FF8CC2</code></td>
|
||||
<td><code>81FF5611A6F07AE1015BD4189E60687C</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>E08AA87970AF59C85123FFBF88BEB316</code></td>
|
||||
<td><code>18B56CD10DDDB20E0A75E97475807DAC</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>
|
||||
|
|
Loading…
Reference in a new issue