Update content of files

This commit is contained in:
GitHub Action 2024-11-16 14:37:36 +00:00
parent 092a5561b6
commit a8d415847c
11 changed files with 238 additions and 263 deletions

View file

@ -147,6 +147,7 @@ Currently the only allowed subscription period is <code>30*24*60*60</code>, i.e.
<p>When we get close to the end of the subscription period of one or more active subscriptions, and the current Telegram Star balance is not high enough to autorenew at least one of them, the <a href="/api/config#suggestions">"STARS_SUBSCRIPTION_LOW_BALANCE" suggestion »</a> will be activated: when the user clicks on the suggestion, the client should fetch and display the list of expiring subscriptions by invoking <a href="/method/payments.getStarsSubscriptions">payments.getStarsSubscriptions</a>, passing <a href="/constructor/inputPeerSelf">inputPeerSelf</a> to <code>peer</code> and setting the <code>missing_balance</code> flag: the returned subscriptions may be renewed by <a href="/api/stars">filling up the current Telegram Star balance</a> with at least <a href="/constructor/payments.starsStatus">payments.starsStatus</a>.<code>subscriptions_missing_balance</code> stars.</p> <p>When we get close to the end of the subscription period of one or more active subscriptions, and the current Telegram Star balance is not high enough to autorenew at least one of them, the <a href="/api/config#suggestions">"STARS_SUBSCRIPTION_LOW_BALANCE" suggestion »</a> will be activated: when the user clicks on the suggestion, the client should fetch and display the list of expiring subscriptions by invoking <a href="/method/payments.getStarsSubscriptions">payments.getStarsSubscriptions</a>, passing <a href="/constructor/inputPeerSelf">inputPeerSelf</a> to <code>peer</code> and setting the <code>missing_balance</code> flag: the returned subscriptions may be renewed by <a href="/api/stars">filling up the current Telegram Star balance</a> with at least <a href="/constructor/payments.starsStatus">payments.starsStatus</a>.<code>subscriptions_missing_balance</code> stars.</p>
<p><a href="/method/payments.getStarsTransactions">payments.getStarsTransactions</a> may be used to fetch only and all transactions for a specific subscription by populating the <code>subscription_id</code> flag. </p> <p><a href="/method/payments.getStarsTransactions">payments.getStarsTransactions</a> may be used to fetch only and all transactions for a specific subscription by populating the <code>subscription_id</code> flag. </p>
<p>Admins may also use <a href="/method/messages.getChatInviteImporters">messages.getChatInviteImporters</a> with the <code>subscription_expired</code> flag set to fetch only and all users with an expired subscription. </p> <p>Admins may also use <a href="/method/messages.getChatInviteImporters">messages.getChatInviteImporters</a> with the <code>subscription_expired</code> flag set to fetch only and all users with an expired subscription. </p>
<p>Channel admins can also see the end date of the current subscription period for any user in <a href="/constructor/channelParticipant">channelParticipant</a>.<code>subscription_until_date</code>.</p>
<h3><a class="anchor" href="#join-requests" id="join-requests" name="join-requests"><i class="anchor-icon"></i></a>Join requests</h3> <h3><a class="anchor" href="#join-requests" id="join-requests" name="join-requests"><i class="anchor-icon"></i></a>Join requests</h3>
<pre><code><a href='/constructor/channel'>channel</a>#fe4478bd flags:<a href='/type/%23'>#</a> creator:flags.0?<a href='/constructor/true'>true</a> left:flags.2?<a href='/constructor/true'>true</a> broadcast:flags.5?<a href='/constructor/true'>true</a> verified:flags.7?<a href='/constructor/true'>true</a> megagroup:flags.8?<a href='/constructor/true'>true</a> restricted:flags.9?<a href='/constructor/true'>true</a> signatures:flags.11?<a href='/constructor/true'>true</a> min:flags.12?<a href='/constructor/true'>true</a> scam:flags.19?<a href='/constructor/true'>true</a> has_link:flags.20?<a href='/constructor/true'>true</a> has_geo:flags.21?<a href='/constructor/true'>true</a> slowmode_enabled:flags.22?<a href='/constructor/true'>true</a> call_active:flags.23?<a href='/constructor/true'>true</a> call_not_empty:flags.24?<a href='/constructor/true'>true</a> fake:flags.25?<a href='/constructor/true'>true</a> gigagroup:flags.26?<a href='/constructor/true'>true</a> noforwards:flags.27?<a href='/constructor/true'>true</a> join_to_send:flags.28?<a href='/constructor/true'>true</a> join_request:flags.29?<a href='/constructor/true'>true</a> forum:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> stories_hidden:flags2.1?<a href='/constructor/true'>true</a> stories_hidden_min:flags2.2?<a href='/constructor/true'>true</a> stories_unavailable:flags2.3?<a href='/constructor/true'>true</a> signature_profiles:flags2.12?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.13?<a href='/type/long'>long</a> title:<a href='/type/string'>string</a> username:flags.6?<a href='/type/string'>string</a> photo:<a href='/type/ChatPhoto'>ChatPhoto</a> date:<a href='/type/int'>int</a> restriction_reason:flags.9?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; admin_rights:flags.14?<a href='/type/ChatAdminRights'>ChatAdminRights</a> banned_rights:flags.15?<a href='/type/ChatBannedRights'>ChatBannedRights</a> default_banned_rights:flags.18?<a href='/type/ChatBannedRights'>ChatBannedRights</a> participants_count:flags.17?<a href='/type/int'>int</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Username'>Username</a>&gt; stories_max_id:flags2.4?<a href='/type/int'>int</a> color:flags2.7?<a href='/type/PeerColor'>PeerColor</a> profile_color:flags2.8?<a href='/type/PeerColor'>PeerColor</a> emoji_status:flags2.9?<a href='/type/EmojiStatus'>EmojiStatus</a> level:flags2.10?<a href='/type/int'>int</a> subscription_until_date:flags2.11?<a href='/type/int'>int</a> = <a href='/type/Chat'>Chat</a>; <pre><code><a href='/constructor/channel'>channel</a>#fe4478bd flags:<a href='/type/%23'>#</a> creator:flags.0?<a href='/constructor/true'>true</a> left:flags.2?<a href='/constructor/true'>true</a> broadcast:flags.5?<a href='/constructor/true'>true</a> verified:flags.7?<a href='/constructor/true'>true</a> megagroup:flags.8?<a href='/constructor/true'>true</a> restricted:flags.9?<a href='/constructor/true'>true</a> signatures:flags.11?<a href='/constructor/true'>true</a> min:flags.12?<a href='/constructor/true'>true</a> scam:flags.19?<a href='/constructor/true'>true</a> has_link:flags.20?<a href='/constructor/true'>true</a> has_geo:flags.21?<a href='/constructor/true'>true</a> slowmode_enabled:flags.22?<a href='/constructor/true'>true</a> call_active:flags.23?<a href='/constructor/true'>true</a> call_not_empty:flags.24?<a href='/constructor/true'>true</a> fake:flags.25?<a href='/constructor/true'>true</a> gigagroup:flags.26?<a href='/constructor/true'>true</a> noforwards:flags.27?<a href='/constructor/true'>true</a> join_to_send:flags.28?<a href='/constructor/true'>true</a> join_request:flags.29?<a href='/constructor/true'>true</a> forum:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> stories_hidden:flags2.1?<a href='/constructor/true'>true</a> stories_hidden_min:flags2.2?<a href='/constructor/true'>true</a> stories_unavailable:flags2.3?<a href='/constructor/true'>true</a> signature_profiles:flags2.12?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.13?<a href='/type/long'>long</a> title:<a href='/type/string'>string</a> username:flags.6?<a href='/type/string'>string</a> photo:<a href='/type/ChatPhoto'>ChatPhoto</a> date:<a href='/type/int'>int</a> restriction_reason:flags.9?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; admin_rights:flags.14?<a href='/type/ChatAdminRights'>ChatAdminRights</a> banned_rights:flags.15?<a href='/type/ChatBannedRights'>ChatBannedRights</a> default_banned_rights:flags.18?<a href='/type/ChatBannedRights'>ChatBannedRights</a> participants_count:flags.17?<a href='/type/int'>int</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Username'>Username</a>&gt; stories_max_id:flags2.4?<a href='/type/int'>int</a> color:flags2.7?<a href='/type/PeerColor'>PeerColor</a> profile_color:flags2.8?<a href='/type/PeerColor'>PeerColor</a> emoji_status:flags2.9?<a href='/type/EmojiStatus'>EmojiStatus</a> level:flags2.10?<a href='/type/int'>int</a> subscription_until_date:flags2.11?<a href='/type/int'>int</a> = <a href='/type/Chat'>Chat</a>;

View file

@ -198,7 +198,7 @@
<h5><a class="anchor" href="#new-constructors" id="new-constructors" name="new-constructors"><i class="anchor-icon"></i></a>New Constructors</h5> <h5><a class="anchor" href="#new-constructors" id="new-constructors" name="new-constructors"><i class="anchor-icon"></i></a>New Constructors</h5>
<ul> <ul>
<li>Added <a href="/constructor/updateBotPurchasedPaidMedia">updateBotPurchasedPaidMedia</a> - </li> <li>Added <a href="/constructor/updateBotPurchasedPaidMedia">updateBotPurchasedPaidMedia</a> - </li>
<li>Added <a href="/constructor/channelAdminLogEventActionParticipantSubExtend">channelAdminLogEventActionParticipantSubExtend</a> - </li> <li>Added <a href="/constructor/channelAdminLogEventActionParticipantSubExtend">channelAdminLogEventActionParticipantSubExtend</a> - A paid subscriber has extended their <a href="/api/stars#star-subscriptions">Telegram Star subscription »</a>.</li>
<li>Added <a href="/constructor/inputStorePaymentStarsGiveaway">inputStorePaymentStarsGiveaway</a> - </li> <li>Added <a href="/constructor/inputStorePaymentStarsGiveaway">inputStorePaymentStarsGiveaway</a> - </li>
<li>Added <a href="/constructor/messageActionPrizeStars">messageActionPrizeStars</a> - </li> <li>Added <a href="/constructor/messageActionPrizeStars">messageActionPrizeStars</a> - </li>
<li>Added <a href="/constructor/updatePaidReactionPrivacy">updatePaidReactionPrivacy</a> - </li> <li>Added <a href="/constructor/updatePaidReactionPrivacy">updatePaidReactionPrivacy</a> - </li>
@ -270,7 +270,7 @@
<li>Added <a href="/constructor/starsSubscription">starsSubscription</a> - Represents a <a href="/api/invites#paid-invite-links">Telegram Star subscription »</a>.</li> <li>Added <a href="/constructor/starsSubscription">starsSubscription</a> - Represents a <a href="/api/invites#paid-invite-links">Telegram Star subscription »</a>.</li>
<li>Added <a href="/constructor/reactionPaid">reactionPaid</a> - Represents a <a href="/api/reactions#paid-reactions">paid Telegram Star reaction »</a>.</li> <li>Added <a href="/constructor/reactionPaid">reactionPaid</a> - Represents a <a href="/api/reactions#paid-reactions">paid Telegram Star reaction »</a>.</li>
<li>Added <a href="/constructor/messageReactor">messageReactor</a> - Info about a user in the <a href="/api/reactions#paid-reactions">paid Star reactions leaderboard</a> for a message.</li> <li>Added <a href="/constructor/messageReactor">messageReactor</a> - Info about a user in the <a href="/api/reactions#paid-reactions">paid Star reactions leaderboard</a> for a message.</li>
<li>Added <a href="/constructor/channelAdminLogEventActionToggleSignatureProfiles">channelAdminLogEventActionToggleSignatureProfiles</a> - </li> <li>Added <a href="/constructor/channelAdminLogEventActionToggleSignatureProfiles">channelAdminLogEventActionToggleSignatureProfiles</a> - Channel signature profiles were enabled/disabled.</li>
</ul> </ul>
<h5><a class="anchor" href="#changed-constructors" id="changed-constructors" name="changed-constructors"><i class="anchor-icon"></i></a>Changed Constructors</h5> <h5><a class="anchor" href="#changed-constructors" id="changed-constructors" name="changed-constructors"><i class="anchor-icon"></i></a>Changed Constructors</h5>
<ul> <ul>

View file

@ -113,7 +113,6 @@ If the user explicitly chose to make their paid reaction(s) private, pass <a hre
If the user did not make any explicit choice about the privacy of their paid reaction(s) (i.e. when reacting by clicking on an existing star reaction on a message), do not populate the <a href="/method/messages.sendPaidReaction">messages.sendPaidReaction</a>.<code>private</code> flag. </p> If the user did not make any explicit choice about the privacy of their paid reaction(s) (i.e. when reacting by clicking on an existing star reaction on a message), do not populate the <a href="/method/messages.sendPaidReaction">messages.sendPaidReaction</a>.<code>private</code> flag. </p>
<p>To change the privacy of already sent paid reactions, invoke <a href="/method/messages.togglePaidReactionPrivacy">messages.togglePaidReactionPrivacy</a>, passing the ID of the message, the channel and the desired privacy setting. </p> <p>To change the privacy of already sent paid reactions, invoke <a href="/method/messages.togglePaidReactionPrivacy">messages.togglePaidReactionPrivacy</a>, passing the ID of the message, the channel and the desired privacy setting. </p>
<p>To fetch the paid reactions leaderboard, invoke <a href="/method/messages.getMessagesReactions">messages.getMessagesReactions</a>: the returned <a href="/constructor/updateMessageReactions">updateMessageReactions</a> constructor will contain a <code>top_reactors</code> vector of <a href="/constructor/messageReactor">messageReactor</a>s, containing the paid reactions leaderboard for that message. </p> <p>To fetch the paid reactions leaderboard, invoke <a href="/method/messages.getMessagesReactions">messages.getMessagesReactions</a>: the returned <a href="/constructor/updateMessageReactions">updateMessageReactions</a> constructor will contain a <code>top_reactors</code> vector of <a href="/constructor/messageReactor">messageReactor</a>s, containing the paid reactions leaderboard for that message. </p>
<p>Channel admins can also see the end date of the current subscription period for any user in <a href="/constructor/channelParticipant">channelParticipant</a>.<code>subscription_until_date</code>.</p>
<h3><a class="anchor" href="#react-to-a-story" id="react-to-a-story" name="react-to-a-story"><i class="anchor-icon"></i></a>React to a story</h3> <h3><a class="anchor" href="#react-to-a-story" id="react-to-a-story" name="react-to-a-story"><i class="anchor-icon"></i></a>React to a story</h3>
<p>See <a href="/api/stories#reactions">here »</a> for more info on how to react to a story.</p> <p>See <a href="/api/stories#reactions">here »</a> for more info on how to react to a story.</p>
<h3><a class="anchor" href="#notifications-about-reactions" id="notifications-about-reactions" name="notifications-about-reactions"><i class="anchor-icon"></i></a>Notifications about reactions</h3> <h3><a class="anchor" href="#notifications-about-reactions" id="notifications-about-reactions" name="notifications-about-reactions"><i class="anchor-icon"></i></a>Notifications about reactions</h3>

View file

@ -4,32 +4,10 @@
<meta charset="utf-8"> <meta charset="utf-8">
<title>channelAdminLogEventActionParticipantSubExtend</title> <title>channelAdminLogEventActionParticipantSubExtend</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters <meta property="description" content="A paid subscriber has extended their Telegram Star subscription ».">
Name
Type
Description
prev_participant
ChannelParticipant
 
new_participant
ChannelParticipant
 
Type
Chann…">
<meta property="og:title" content="channelAdminLogEventActionParticipantSubExtend"> <meta property="og:title" content="channelAdminLogEventActionParticipantSubExtend">
<meta property="og:image" content=""> <meta property="og:image" content="">
<meta property="og:description" content="Parameters <meta property="og:description" content="A paid subscriber has extended their Telegram Star subscription ».">
Name
Type
Description
prev_participant
ChannelParticipant
 
new_participant
ChannelParticipant
 
Type
Chann…">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4"> <link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -64,7 +42,8 @@ Chann…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionParticipantSubExtend" >channelAdminLogEventActionParticipantSubExtend</a></li></ul></div> <div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionParticipantSubExtend" >channelAdminLogEventActionParticipantSubExtend</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionParticipantSubExtend</h1> <h1 id="dev_page_title">channelAdminLogEventActionParticipantSubExtend</h1>
<div id="dev_page_content"><p><div class="clearfix"> <div id="dev_page_content"><p>A paid subscriber has extended their <a href="/api/stars#star-subscriptions">Telegram Star subscription »</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills"> <ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown"> <li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 192 <b class="caret"></b></a> <a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 192 <b class="caret"></b></a>
@ -100,7 +79,10 @@ Chann…">
</tbody> </tbody>
</table> </table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3> <h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p></div> <p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div> </div>

View file

@ -4,26 +4,10 @@
<meta charset="utf-8"> <meta charset="utf-8">
<title>channelAdminLogEventActionToggleSignatureProfiles</title> <title>channelAdminLogEventActionToggleSignatureProfiles</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters <meta property="description" content="Channel signature profiles were enabled/disabled.">
Name
Type
Description
new_value
Bool
 
Type
ChannelAdminLogEventAction">
<meta property="og:title" content="channelAdminLogEventActionToggleSignatureProfiles"> <meta property="og:title" content="channelAdminLogEventActionToggleSignatureProfiles">
<meta property="og:image" content=""> <meta property="og:image" content="">
<meta property="og:description" content="Parameters <meta property="og:description" content="Channel signature profiles were enabled/disabled.">
Name
Type
Description
new_value
Bool
 
Type
ChannelAdminLogEventAction">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4"> <link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -58,7 +42,8 @@ ChannelAdminLogEventAction">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionToggleSignatureProfiles" >channelAdminLogEventActionToggleSignatureProfiles</a></li></ul></div> <div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionToggleSignatureProfiles" >channelAdminLogEventActionToggleSignatureProfiles</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionToggleSignatureProfiles</h1> <h1 id="dev_page_title">channelAdminLogEventActionToggleSignatureProfiles</h1>
<div id="dev_page_content"><p><div class="clearfix"> <div id="dev_page_content"><p>Channel signature profiles were enabled/disabled.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills"> <ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown"> <li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 192 <b class="caret"></b></a> <a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 192 <b class="caret"></b></a>
@ -84,7 +69,7 @@ ChannelAdminLogEventAction">
<tr> <tr>
<td><strong>new_value</strong></td> <td><strong>new_value</strong></td>
<td style="text-align: center;"><a href="/type/Bool">Bool</a></td> <td style="text-align: center;"><a href="/type/Bool">Bool</a></td>
<td> </td> <td>New value</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View file

@ -164,7 +164,7 @@
<tr> <tr>
<td><strong>sub_extend</strong></td> <td><strong>sub_extend</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.18?<a href="/constructor/true">true</a></td> <td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.18?<a href="/constructor/true">true</a></td>
<td> </td> <td><a href="/constructor/channelAdminLogEventActionParticipantSubExtend">Telegram Star subscription extension events »</a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -220,7 +220,9 @@
<h4><a class="anchor" href="#channeladminlogeventactiondeletemessage" id="channeladminlogeventactiondeletemessage" name="channeladminlogeventactiondeletemessage"><i class="anchor-icon"></i></a><a href="/constructor/channelAdminLogEventActionDeleteMessage">channelAdminLogEventActionDeleteMessage</a></h4> <h4><a class="anchor" href="#channeladminlogeventactiondeletemessage" id="channeladminlogeventactiondeletemessage" name="channeladminlogeventactiondeletemessage"><i class="anchor-icon"></i></a><a href="/constructor/channelAdminLogEventActionDeleteMessage">channelAdminLogEventActionDeleteMessage</a></h4>
<p>A message was deleted</p> <p>A message was deleted</p>
<h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4> <h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>
<p>Telegram allows creating forums with multiple distinct topics.</p></div> <p>Telegram allows creating forums with multiple distinct topics.</p>
<h4><a class="anchor" href="#channeladminlogeventactionparticipantsubextend" id="channeladminlogeventactionparticipantsubextend" name="channeladminlogeventactionparticipantsubextend"><i class="anchor-icon"></i></a><a href="/constructor/channelAdminLogEventActionParticipantSubExtend">channelAdminLogEventActionParticipantSubExtend</a></h4>
<p>A paid subscriber has extended their <a href="/api/stars#star-subscriptions">Telegram Star subscription »</a>.</p></div>
</div> </div>

View file

@ -170,7 +170,7 @@
<tr> <tr>
<td><strong>paid_reactions_available</strong></td> <td><strong>paid_reactions_available</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.16?<a href="/constructor/true">true</a></td> <td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.16?<a href="/constructor/true">true</a></td>
<td> </td> <td>If set, users may send <a href="/api/reactions#paid-reactions">paid Telegram Star reactions »</a> to messages of this channel.</td>
</tr> </tr>
<tr> <tr>
<td><strong>id</strong></td> <td><strong>id</strong></td>
@ -407,6 +407,8 @@
<p>Content creators can accept Stars by publishing paid photos or videos on their channels. Subscribers will be allowed to view such posts only after paying the author to unlock them.</p> <p>Content creators can accept Stars by publishing paid photos or videos on their channels. Subscribers will be allowed to view such posts only after paying the author to unlock them.</p>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4> <h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p> <p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p>
<h4><a class="anchor" href="#message-reactions" id="message-reactions" name="message-reactions"><i class="anchor-icon"></i></a><a href="/api/reactions">Message reactions</a></h4>
<p>Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.</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> <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> <p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p>
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4> <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>
@ -423,8 +425,6 @@
<p>Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel.</p> <p>Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel.</p>
<h4><a class="anchor" href="#invites" id="invites" name="invites"><i class="anchor-icon"></i></a><a href="/api/invites">Invites</a></h4> <h4><a class="anchor" href="#invites" id="invites" name="invites"><i class="anchor-icon"></i></a><a href="/api/invites">Invites</a></h4>
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p> <p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p>
<h4><a class="anchor" href="#message-reactions" id="message-reactions" name="message-reactions"><i class="anchor-icon"></i></a><a href="/api/reactions">Message reactions</a></h4>
<p>Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.</p>
<h4><a class="anchor" href="#wallpapers" id="wallpapers" name="wallpapers"><i class="anchor-icon"></i></a><a href="/api/wallpapers">Wallpapers</a></h4> <h4><a class="anchor" href="#wallpapers" id="wallpapers" name="wallpapers"><i class="anchor-icon"></i></a><a href="/api/wallpapers">Wallpapers</a></h4>
<p>Telegram apps support generating, sharing and synchronizing chat backgrounds.</p> <p>Telegram apps support generating, sharing and synchronizing chat backgrounds.</p>
<h4><a class="anchor" href="#custom-emojis" id="custom-emojis" name="custom-emojis"><i class="anchor-icon"></i></a><a href="/api/custom-emoji">Custom emojis</a></h4> <h4><a class="anchor" href="#custom-emojis" id="custom-emojis" name="custom-emojis"><i class="anchor-icon"></i></a><a href="/api/custom-emoji">Custom emojis</a></h4>

View file

@ -84,12 +84,15 @@
<tr> <tr>
<td><strong>subscription_until_date</strong></td> <td><strong>subscription_until_date</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td> <td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td>
<td> </td> <td>If set, contains the expiration date of the current <a href="/api/stars#star-subscriptions">Telegram Star subscription period »</a> for the specified participant.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3> <h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelParticipant">ChannelParticipant</a></p></div> <p><a href="/type/ChannelParticipant">ChannelParticipant</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div> </div>

View file

@ -94,12 +94,15 @@
<tr> <tr>
<td><strong>subscription_until_date</strong></td> <td><strong>subscription_until_date</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td> <td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
<td> </td> <td>If set, contains the expiration date of the current <a href="/api/stars#star-subscriptions">Telegram Star subscription period »</a> for the specified participant.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3> <h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelParticipant">ChannelParticipant</a></p></div> <p><a href="/type/ChannelParticipant">ChannelParticipant</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div> </div>

View file

@ -53,9 +53,9 @@
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5> <h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
<!-- start req_pq_multi --> <!-- start req_pq_multi -->
<p>Sent payload (excluding transport headers/trailers):</p> <p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 CC C4 07 00 09 A9 38 67 <pre><code>0000 | 00 00 00 00 00 00 00 00 F4 B7 0D 00 9D AB 38 67
0010 | 14 00 00 00 F1 8E 7E BE 88 A0 0C B2 64 2E 0D CC 0010 | 14 00 00 00 F1 8E 7E BE E8 FF D0 70 C6 56 0F C1
0020 | D6 BD 55 3F 42 43 30 B4</code></pre> 0020 | 91 A6 69 5C BB 3D 69 6B</code></pre>
<p>Payload (de)serialization:</p> <p>Payload (de)serialization:</p>
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre> <pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
<table class="table"> <table class="table">
@ -77,7 +77,7 @@
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>CCC4070009A93867</code></td> <td><code>F4B70D009DAB3867</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td> <td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr> </tr>
<tr> <tr>
@ -95,7 +95,7 @@
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>88A00CB2642E0DCCD6BD553F424330B4</code></td> <td><code>E8FFD070C6560FC191A6695CBB3D696B</code></td>
<td>Random number</td> <td>Random number</td>
</tr> </tr>
</tbody> </tbody>
@ -104,11 +104,11 @@
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5> <h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
<!-- start resPQ --> <!-- start resPQ -->
<p>Received payload (excluding transport headers/trailers):</p> <p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 78 D6 E3 09 A9 38 67 <pre><code>0000 | 00 00 00 00 00 00 00 00 01 00 CA E9 9D AB 38 67
0010 | 50 00 00 00 63 24 16 05 88 A0 0C B2 64 2E 0D CC 0010 | 50 00 00 00 63 24 16 05 E8 FF D0 70 C6 56 0F C1
0020 | D6 BD 55 3F 42 43 30 B4 8A 33 80 8D 1D 5B AE E2 0020 | 91 A6 69 5C BB 3D 69 6B 50 52 07 36 D6 05 6F 36
0030 | 7E 2D 08 4D AB 67 CE D0 08 19 EE AA 4A 04 90 58 0030 | F7 B5 AE 82 38 C4 61 93 08 29 16 D5 CA 3E 83 65
0040 | BD 00 00 00 15 C4 B5 1C 03 00 00 00 85 FD 64 DE 0040 | 25 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 0050 | 85 1D 9D D0 A5 B7 F7 09 35 5F C3 0B 21 6B E8 6C
0060 | 02 2B B4 C3</code></pre> 0060 | 02 2B B4 C3</code></pre>
<p>Payload (de)serialization:</p> <p>Payload (de)serialization:</p>
@ -132,7 +132,7 @@
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>0178D6E309A93867</code></td> <td><code>0100CAE99DAB3867</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td> <td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr> </tr>
<tr> <tr>
@ -150,19 +150,19 @@
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>88A00CB2642E0DCCD6BD553F424330B4</code></td> <td><code>E8FFD070C6560FC191A6695CBB3D696B</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>40, 16</td> <td>40, 16</td>
<td><code>8A33808D1D5BAEE27E2D084DAB67CED0</code></td> <td><code>50520736D6056F36F7B5AE8238C46193</code></td>
<td>Server-generated random number</td> <td>Server-generated random number</td>
</tr> </tr>
<tr> <tr>
<td>pq</td> <td>pq</td>
<td>56, 12</td> <td>56, 12</td>
<td><code>0819EEAA4A049058BD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1868618130286205117</td> <td><code>082916D5CA3E836525000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2960788869651588389</td>
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td> <td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
</tr> </tr>
<tr> <tr>
@ -208,22 +208,22 @@
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4> <h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p &lt; q.</h5> <h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p &lt; q.</h5>
<!-- start pq --> <!-- start pq -->
<pre><code>pq = 1868618130286205117</code></pre> <pre><code>pq = 2960788869651588389</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1868618130286205117 = 1093105483 * 1709458199</code></p> <p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2960788869651588389 = 1553479331 * 1905908119</code></p>
<pre><code>p = 1093105483 <pre><code>p = 1553479331
q = 1709458199</code></pre> q = 1905908119</code></pre>
<!-- end pq --> <!-- end pq -->
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4> <h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5> <h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p> <p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
<!-- start p_q_inner_data_dc --> <!-- start p_q_inner_data_dc -->
<p>Generated payload (excluding transport headers/trailers):</p> <p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 95 5F F5 A9 08 19 EE AA 4A 04 90 58 BD 00 00 00 <pre><code>0000 | 95 5F F5 A9 08 29 16 D5 CA 3E 83 65 25 00 00 00
0010 | 04 41 27 77 4B 00 00 00 04 65 E4 43 17 00 00 00 0010 | 04 5C 98 36 A3 00 00 00 04 71 99 D9 97 00 00 00
0020 | 88 A0 0C B2 64 2E 0D CC D6 BD 55 3F 42 43 30 B4 0020 | E8 FF D0 70 C6 56 0F C1 91 A6 69 5C BB 3D 69 6B
0030 | 8A 33 80 8D 1D 5B AE E2 7E 2D 08 4D AB 67 CE D0 0030 | 50 52 07 36 D6 05 6F 36 F7 B5 AE 82 38 C4 61 93
0040 | C6 1C 4C B1 76 7F D6 E5 66 1D 48 E8 30 35 96 85 0040 | C7 34 2A 00 E4 97 51 C3 44 E9 8D AC A4 98 E3 D5
0050 | BB E4 FD 66 9F 97 F4 20 34 05 82 EE CF 6A 39 84 0050 | 3D 7E 99 B2 10 17 84 E5 20 FF 38 07 E0 96 EE 1B
0060 | 02 00 00 00</code></pre> 0060 | 02 00 00 00</code></pre>
<p>Payload (de)serialization:</p> <p>Payload (de)serialization:</p>
<pre><code>p_q_inner_data_dc#a9f55f95 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data;</code></pre> <pre><code>p_q_inner_data_dc#a9f55f95 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data;</code></pre>
@ -246,37 +246,37 @@ q = 1709458199</code></pre>
<tr> <tr>
<td>pq</td> <td>pq</td>
<td>4, 12</td> <td>4, 12</td>
<td><code>0819EEAA4A049058BD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1868618130286205117</td> <td><code>082916D5CA3E836525000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2960788869651588389</td>
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td> <td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
</tr> </tr>
<tr> <tr>
<td>p</td> <td>p</td>
<td>16, 8</td> <td>16, 8</td>
<td><code>044127774B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1093105483</td> <td><code>045C9836A3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1553479331</td>
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td> <td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr> </tr>
<tr> <tr>
<td>q</td> <td>q</td>
<td>24, 8</td> <td>24, 8</td>
<td><code>0465E44317000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1709458199</td> <td><code>047199D997000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1905908119</td>
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td> <td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr> </tr>
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>32, 16</td> <td>32, 16</td>
<td><code>88A00CB2642E0DCCD6BD553F424330B4</code></td> <td><code>E8FFD070C6560FC191A6695CBB3D696B</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>48, 16</td> <td>48, 16</td>
<td><code>8A33808D1D5BAEE27E2D084DAB67CED0</code></td> <td><code>50520736D6056F36F7B5AE8238C46193</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>new_nonce</td> <td>new_nonce</td>
<td>64, 32</td> <td>64, 32</td>
<td><code>C61C4CB1767FD6E5661D48E830359685</code> <code>BBE4FD669F97F420340582EECF6A3984</code></td> <td><code>C7342A00E49751C344E98DACA498E3D5</code> <code>3D7E99B2101784E520FF3807E096EE1B</code></td>
<td>Client-generated random number</td> <td>Client-generated random number</td>
</tr> </tr>
<tr> <tr>
@ -291,39 +291,39 @@ q = 1709458199</code></pre>
<p>The serialization of <em>P_Q_inner_data</em> produces <strong>data</strong>, which is used to generate <strong>encrypted_data</strong> as specified in <a href="/mtproto/auth_key">step 4.1</a>.<br> <p>The serialization of <em>P_Q_inner_data</em> produces <strong>data</strong>, which is used to generate <strong>encrypted_data</strong> as specified in <a href="/mtproto/auth_key">step 4.1</a>.<br>
These are the inputs to the algorithm specified in <a href="/mtproto/auth_key">step 4.1</a>:</p> These are the inputs to the algorithm specified in <a href="/mtproto/auth_key">step 4.1</a>:</p>
<!-- start p_q_inner_data_input --> <!-- start p_q_inner_data_input -->
<pre><code>data = 955FF5A90819EEAA4A049058BD000000044127774B0000000465E4431700000088A00CB2642E0DCCD6BD553F424330B48A33808D1D5BAEE27E2D084DAB67CED0C61C4CB1767FD6E5661D48E830359685BBE4FD669F97F420340582EECF6A398402000000 <pre><code>data = 955FF5A9082916D5CA3E836525000000045C9836A3000000047199D997000000E8FFD070C6560FC191A6695CBB3D696B50520736D6056F36F7B5AE8238C46193C7342A00E49751C344E98DACA498E3D53D7E99B2101784E520FF3807E096EE1B02000000
random_padding_bytes = 4FD6DF70DAC10A80FB882E175ED130769E47ACA62330CFA8098708C10A765264176E3391DBC1E80CDEADD8C4A4EC3CBA7CA7C08FBBD4881A4435EC7B6A4A5CF5897E970AAA0330FA4C188BA83A02620EBC82AF9426FD88829A5683AD</code></pre> random_padding_bytes = B466F6A58F3A78359B82AA87C98DE9847CEB0886FBDA78154B395957431373B4500A7AC595FEBA67680E2CD50DA72ACC9D2827A04F25EE681438E0B7F09BF73864BD6D7532CEC7D4611A86AAB23E4F3C715C25C1B04D336BBA28231F</code></pre>
<!-- end p_q_inner_data_input --> <!-- end p_q_inner_data_input -->
<p>And this is the output:</p> <p>And this is the output:</p>
<!-- start p_q_inner_data_output --> <!-- start p_q_inner_data_output -->
<pre><code>encrypted_data = 619B4727009001B44082013B8731011A984F708CD5D0C253FF48BDB3DFAFA2637FFA25B40B4C4BFB28504DE7B3F0066D6895B79B7C29B3F74A5358493E28D73D3B0D14D531EF6A1A4270C593E8D10EB3B246AE668DA94B2F65F3CC4E63BD6AA543B543E51327D426B983BD2E1A64CDB6E697C9BA4671DDCCCAFEC541716862CBDA37A8A1F3678CC75CE9E564F0A6A19EABDFB94EFB41CBDB586611757F7EEFFAD47B62C9A65931079DFD9ECAF4A451D8470491FEC1E5EAC6BB92D2F6E7D4B7418527C486478159F867591422ED7130CA98D5B274EBEBB139EA3579A6A81113A3A70921388898D18A4F5B56E8931D422108292B1BE3E8DD4FEB59E6C8B530AE54</code></pre> <pre><code>encrypted_data = 25CF84E953F562707ACECDB185CF5052BC4D1E82330FD395A840EEB13806941EE95CA63EF2774F0625EB358DCAEAE5FAE06366779FDED68F10E204DDDAEEF3B93AC93C81DE0383C5E7C72C296E8E7E1C9A92E5A2181C82FABE0097F3DEC77CF788D2AD65D9FC3D70573B7E4010AFFC0AF6019FEDBE509B654E06A0BF26CF3446F5D1BE057E18E103B25B76FF30C6893D466EE930474298AC44039870BB97839D63902926E41F326CEFA577B5E6BF1AD2D6D00A08DABA9041559C78540C4E8BD82CCFAC98B322E1531CEC7D1C783C459B325CA7A41E04E24FB30319BB3F8817E88F2642D0EDD87925259B8DAB8AC0225293543C7A3DF5256E20F5747E53C6A4E9</code></pre>
<!-- end p_q_inner_data_output --> <!-- end p_q_inner_data_output -->
<p>The length of the final string is 256 bytes.</p> <p>The length of the final string is 256 bytes.</p>
<h5><a class="anchor" href="#5-send-req-dh-params-query-with-generated-encrypted-data" id="5-send-req-dh-params-query-with-generated-encrypted-data" name="5-send-req-dh-params-query-with-generated-encrypted-data"><i class="anchor-icon"></i></a>5) Send req_DH_params query with generated <code>encrypted_data</code></h5> <h5><a class="anchor" href="#5-send-req-dh-params-query-with-generated-encrypted-data" id="5-send-req-dh-params-query-with-generated-encrypted-data" name="5-send-req-dh-params-query-with-generated-encrypted-data"><i class="anchor-icon"></i></a>5) Send req_DH_params query with generated <code>encrypted_data</code></h5>
<!-- start req_DH_params --> <!-- start req_DH_params -->
<p>Sent payload (excluding transport headers/trailers):</p> <p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 D0 C4 07 00 09 A9 38 67 <pre><code>0000 | 00 00 00 00 00 00 00 00 F8 B7 0D 00 9D AB 38 67
0010 | 40 01 00 00 BE E4 12 D7 88 A0 0C B2 64 2E 0D CC 0010 | 40 01 00 00 BE E4 12 D7 E8 FF D0 70 C6 56 0F C1
0020 | D6 BD 55 3F 42 43 30 B4 8A 33 80 8D 1D 5B AE E2 0020 | 91 A6 69 5C BB 3D 69 6B 50 52 07 36 D6 05 6F 36
0030 | 7E 2D 08 4D AB 67 CE D0 04 41 27 77 4B 00 00 00 0030 | F7 B5 AE 82 38 C4 61 93 04 5C 98 36 A3 00 00 00
0040 | 04 65 E4 43 17 00 00 00 85 FD 64 DE 85 1D 9D D0 0040 | 04 71 99 D9 97 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 61 9B 47 27 00 90 01 B4 40 82 01 3B 0050 | FE 00 01 00 25 CF 84 E9 53 F5 62 70 7A CE CD B1
0060 | 87 31 01 1A 98 4F 70 8C D5 D0 C2 53 FF 48 BD B3 0060 | 85 CF 50 52 BC 4D 1E 82 33 0F D3 95 A8 40 EE B1
0070 | DF AF A2 63 7F FA 25 B4 0B 4C 4B FB 28 50 4D E7 0070 | 38 06 94 1E E9 5C A6 3E F2 77 4F 06 25 EB 35 8D
0080 | B3 F0 06 6D 68 95 B7 9B 7C 29 B3 F7 4A 53 58 49 0080 | CA EA E5 FA E0 63 66 77 9F DE D6 8F 10 E2 04 DD
0090 | 3E 28 D7 3D 3B 0D 14 D5 31 EF 6A 1A 42 70 C5 93 0090 | DA EE F3 B9 3A C9 3C 81 DE 03 83 C5 E7 C7 2C 29
00A0 | E8 D1 0E B3 B2 46 AE 66 8D A9 4B 2F 65 F3 CC 4E 00A0 | 6E 8E 7E 1C 9A 92 E5 A2 18 1C 82 FA BE 00 97 F3
00B0 | 63 BD 6A A5 43 B5 43 E5 13 27 D4 26 B9 83 BD 2E 00B0 | DE C7 7C F7 88 D2 AD 65 D9 FC 3D 70 57 3B 7E 40
00C0 | 1A 64 CD B6 E6 97 C9 BA 46 71 DD CC CA FE C5 41 00C0 | 10 AF FC 0A F6 01 9F ED BE 50 9B 65 4E 06 A0 BF
00D0 | 71 68 62 CB DA 37 A8 A1 F3 67 8C C7 5C E9 E5 64 00D0 | 26 CF 34 46 F5 D1 BE 05 7E 18 E1 03 B2 5B 76 FF
00E0 | F0 A6 A1 9E AB DF B9 4E FB 41 CB DB 58 66 11 75 00E0 | 30 C6 89 3D 46 6E E9 30 47 42 98 AC 44 03 98 70
00F0 | 7F 7E EF FA D4 7B 62 C9 A6 59 31 07 9D FD 9E CA 00F0 | BB 97 83 9D 63 90 29 26 E4 1F 32 6C EF A5 77 B5
0100 | F4 A4 51 D8 47 04 91 FE C1 E5 EA C6 BB 92 D2 F6 0100 | E6 BF 1A D2 D6 D0 0A 08 DA BA 90 41 55 9C 78 54
0110 | E7 D4 B7 41 85 27 C4 86 47 81 59 F8 67 59 14 22 0110 | 0C 4E 8B D8 2C CF AC 98 B3 22 E1 53 1C EC 7D 1C
0120 | ED 71 30 CA 98 D5 B2 74 EB EB B1 39 EA 35 79 A6 0120 | 78 3C 45 9B 32 5C A7 A4 1E 04 E2 4F B3 03 19 BB
0130 | A8 11 13 A3 A7 09 21 38 88 98 D1 8A 4F 5B 56 E8 0130 | 3F 88 17 E8 8F 26 42 D0 ED D8 79 25 25 9B 8D AB
0140 | 93 1D 42 21 08 29 2B 1B E3 E8 DD 4F EB 59 E6 C8 0140 | 8A C0 22 52 93 54 3C 7A 3D F5 25 6E 20 F5 74 7E
0150 | B5 30 AE 54</code></pre> 0150 | 53 C6 A4 E9</code></pre>
<p>Payload (de)serialization:</p> <p>Payload (de)serialization:</p>
<pre><code>req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;</code></pre> <pre><code>req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;</code></pre>
<table class="table"> <table class="table">
@ -345,7 +345,7 @@ random_padding_bytes = 4FD6DF70DAC10A80FB882E175ED130769E47ACA62330CFA8098708C10
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>D0C4070009A93867</code></td> <td><code>F8B70D009DAB3867</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td> <td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr> </tr>
<tr> <tr>
@ -363,25 +363,25 @@ random_padding_bytes = 4FD6DF70DAC10A80FB882E175ED130769E47ACA62330CFA8098708C10
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>88A00CB2642E0DCCD6BD553F424330B4</code></td> <td><code>E8FFD070C6560FC191A6695CBB3D696B</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>40, 16</td> <td>40, 16</td>
<td><code>8A33808D1D5BAEE27E2D084DAB67CED0</code></td> <td><code>50520736D6056F36F7B5AE8238C46193</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>p</td> <td>p</td>
<td>56, 8</td> <td>56, 8</td>
<td><code>044127774B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1093105483</td> <td><code>045C9836A3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1553479331</td>
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td> <td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr> </tr>
<tr> <tr>
<td>q</td> <td>q</td>
<td>64, 8</td> <td>64, 8</td>
<td><code>0465E44317000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1709458199</td> <td><code>047199D997000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1905908119</td>
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td> <td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr> </tr>
<tr> <tr>
@ -393,7 +393,7 @@ random_padding_bytes = 4FD6DF70DAC10A80FB882E175ED130769E47ACA62330CFA8098708C10
<tr> <tr>
<td>encrypted_data</td> <td>encrypted_data</td>
<td>80, 260</td> <td>80, 260</td>
<td><code>FE000100619B4727009001B44082013B</code> <code>8731011A984F708CD5D0C253FF48BDB3</code> <code>DFAFA2637FFA25B40B4C4BFB28504DE7</code> <code>B3F0066D6895B79B7C29B3F74A535849</code> <code>3E28D73D3B0D14D531EF6A1A4270C593</code> <code>E8D10EB3B246AE668DA94B2F65F3CC4E</code> <code>63BD6AA543B543E51327D426B983BD2E</code> <code>1A64CDB6E697C9BA4671DDCCCAFEC541</code> <code>716862CBDA37A8A1F3678CC75CE9E564</code> <code>F0A6A19EABDFB94EFB41CBDB58661175</code> <code>7F7EEFFAD47B62C9A65931079DFD9ECA</code> <code>F4A451D8470491FEC1E5EAC6BB92D2F6</code> <code>E7D4B7418527C486478159F867591422</code> <code>ED7130CA98D5B274EBEBB139EA3579A6</code> <code>A81113A3A70921388898D18A4F5B56E8</code> <code>931D422108292B1BE3E8DD4FEB59E6C8</code><br> <code>B530AE54</code></td> <td><code>FE00010025CF84E953F562707ACECDB1</code> <code>85CF5052BC4D1E82330FD395A840EEB1</code> <code>3806941EE95CA63EF2774F0625EB358D</code> <code>CAEAE5FAE06366779FDED68F10E204DD</code> <code>DAEEF3B93AC93C81DE0383C5E7C72C29</code> <code>6E8E7E1C9A92E5A2181C82FABE0097F3</code> <code>DEC77CF788D2AD65D9FC3D70573B7E40</code> <code>10AFFC0AF6019FEDBE509B654E06A0BF</code> <code>26CF3446F5D1BE057E18E103B25B76FF</code> <code>30C6893D466EE930474298AC44039870</code> <code>BB97839D63902926E41F326CEFA577B5</code> <code>E6BF1AD2D6D00A08DABA9041559C7854</code> <code>0C4E8BD82CCFAC98B322E1531CEC7D1C</code> <code>783C459B325CA7A41E04E24FB30319BB</code> <code>3F8817E88F2642D0EDD87925259B8DAB</code> <code>8AC0225293543C7A3DF5256E20F5747E</code><br> <code>53C6A4E9</code></td>
<td>Value generated above</td> <td>Value generated above</td>
</tr> </tr>
</tbody> </tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 4FD6DF70DAC10A80FB882E175ED130769E47ACA62330CFA8098708C10
<h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5> <h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5>
<!-- start server_DH_params_ok --> <!-- start server_DH_params_ok -->
<p>Received payload (excluding transport headers/trailers):</p> <p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 80 DD F7 09 A9 38 67 <pre><code>0000 | 00 00 00 00 00 00 00 00 01 BC 6F FF 9D AB 38 67
0010 | 78 02 00 00 5C 07 E8 D0 88 A0 0C B2 64 2E 0D CC 0010 | 78 02 00 00 5C 07 E8 D0 E8 FF D0 70 C6 56 0F C1
0020 | D6 BD 55 3F 42 43 30 B4 8A 33 80 8D 1D 5B AE E2 0020 | 91 A6 69 5C BB 3D 69 6B 50 52 07 36 D6 05 6F 36
0030 | 7E 2D 08 4D AB 67 CE D0 FE 50 02 00 DB 11 E8 39 0030 | F7 B5 AE 82 38 C4 61 93 FE 50 02 00 E3 A5 84 CC
0040 | 12 F4 51 CC E9 CC B5 A4 E2 71 95 CE 8D 9C 5E 74 0040 | 81 10 CA 19 0F 8A C7 3B 79 7E ED 86 A9 B3 64 49
0050 | E8 79 AF 4B 91 80 40 0A 83 69 D0 27 7E 0A B8 DF 0050 | 07 1D 89 C1 13 4D 44 30 37 9F DA F7 06 83 6E 21
0060 | 51 B5 3A EC 1C 2C 6E D2 D4 DA D5 40 FA 7E E1 B4 0060 | 58 C0 BA BA E3 44 00 B9 92 8D 6E 58 6F D9 47 23
0070 | B7 55 A1 E8 BA 3D BF 75 4D 81 6D 46 90 6B B5 4E 0070 | 4C 81 85 B0 CE 61 2E 7B 36 6E F3 B5 5D 11 D9 0D
0080 | 26 CD 79 8D 2A 33 CB 3B 3C FD 32 23 19 5F CD AB 0080 | 37 7B 1E 25 C6 C9 BD D4 89 42 A6 ED 1F 39 1B 5F
0090 | D5 74 3A B4 2E D4 26 62 35 50 38 FE 07 A9 2B 4A 0090 | 03 02 BD 56 91 C3 06 08 18 83 56 BC 69 82 67 3F
00A0 | 60 21 ED F2 A7 0A 86 5A DF DD 55 6A 93 23 EE 52 00A0 | BD E9 49 26 18 49 B1 D8 A8 B5 41 38 FE 2B 7C 69
00B0 | 6B 77 52 9D CA 6E CC 60 21 AB 76 B6 B2 9B 8D 42 00B0 | D4 0C 5A 08 99 28 0E F5 12 E3 FA E6 A4 96 94 AA
00C0 | 32 35 49 CF 73 81 96 55 87 FF EC C1 B4 23 43 A6 00C0 | 70 BF 13 33 A5 3F FA CD B6 D3 B8 38 C1 47 52 50
00D0 | 90 B0 4A 4B FA 53 C3 B3 BF 61 80 AD 85 CB B4 72 00D0 | 5F 27 66 14 D1 1E F1 14 C8 33 AF 06 91 92 E8 5D
00E0 | BA 83 60 70 70 4F 54 07 A3 50 CC E6 E9 43 76 FE 00E0 | 53 74 8B F1 11 F6 D0 34 32 A9 EA E9 A9 BB 7A 3E
00F0 | BE 9D 92 F9 04 D5 1E 04 9A 12 F6 63 4E 0E A7 75 00F0 | 63 90 4C 73 66 8D 7D 3A AC B3 9A C2 BF EB 36 DC
0100 | 2C B2 AD 56 06 70 1F CD 2A CF 43 3A 7A 78 20 F6 0100 | 8B 3D 18 B7 B6 7B CB 5B 82 DA F5 15 0C A2 3C 07
0110 | B9 4D 44 C0 FB 3D 9D EF 73 F6 AD 93 E4 A3 6C 2F 0110 | 7A AC 8E D2 70 3C BF D2 C9 37 6A AF CD 4B A4 D3
0120 | AA 3E 22 40 C8 2C E2 A4 2D 72 21 28 E6 89 01 5D 0120 | 0E 5C 26 01 E7 6D 19 F4 81 5A B1 EA 1A 1E 8C 98
0130 | C9 5B 41 42 CD 09 BA 46 4D 9E A6 79 AA 70 86 0E 0130 | 5B 5D E8 9E C4 D5 22 D6 15 1B D8 B1 58 B9 FE CF
0140 | A7 BC 95 93 15 3C 6F E4 20 83 2F A7 8C 2C C4 31 0140 | 53 2E DC B2 31 C8 43 FF 35 9A D5 48 78 9C F3 EE
0150 | 2F A6 A8 1E BD BD 61 22 43 B5 27 1B B2 ED CB 2F 0150 | 1A 4D DC 66 5F 3D 9B D6 22 99 DF 0C 72 25 71 6D
0160 | 64 29 28 90 25 2E AE C0 F6 E7 3C 5D A0 CF D8 A2 0160 | 60 B6 17 D1 EA 7C 0F 4C 1D 8A 56 43 87 5D 58 E2
0170 | 20 BB E2 F6 5A C3 CA E6 59 82 95 B5 42 30 CD 85 0170 | CB 12 42 27 C3 98 6F EA CD 0C 3F 0C CA 4C 1F 8F
0180 | F3 26 9A 95 FD FE E3 AE 04 C7 FE AC 11 34 BE 51 0180 | D6 B2 D4 97 2B E4 AA 1D B8 89 AC 9C 21 CF 26 3F
0190 | 8E C7 BC AB 99 72 B4 9A 58 DB F3 8F D2 FF 60 92 0190 | CF 2A 65 BB F2 B7 20 AD 74 E1 90 EA D9 AB 72 56
01A0 | 9E 6C BB 3A 95 CE 10 15 FD 92 77 59 A8 0D 69 D2 01A0 | 48 63 FE 75 47 46 FA 13 13 B1 93 D2 73 CF C4 F5
01B0 | 8B 90 43 05 98 62 F7 3B 17 14 11 6A 4D 48 08 29 01B0 | 57 C2 05 CB 7F 6F 22 7B ED 33 8B 42 72 7D 3B 9C
01C0 | C8 C4 20 3F 6F 9D DD 34 AE 9F 5F A9 5A 0B 1F 64 01C0 | 77 DE 3B A9 A8 D5 43 E1 30 44 90 E8 56 B6 B8 FC
01D0 | D6 34 AB 3B BF 18 EC 74 66 D5 24 DA D7 35 4D 2E 01D0 | BE 7D 78 F5 73 8B 43 47 BA EE A2 8C CD BC BB 42
01E0 | 95 7E 3B 30 92 06 A8 EA 67 41 92 F5 6B 5E A3 C6 01E0 | 8B 72 F4 35 47 47 50 73 DF 47 04 F1 89 39 03 52
01F0 | 3B B5 F4 56 62 80 1D 42 26 1E D8 0F 40 12 59 25 01F0 | C6 F1 95 4A 79 60 C5 89 D3 FA EF 15 A6 06 59 8F
0200 | 11 8D 6A 4D 56 0D 24 30 C8 BA 3E 89 FF E5 3B 29 0200 | 43 18 6D 4D E2 AD 47 FD EE 57 C7 2C 90 97 72 D5
0210 | 20 52 B9 49 26 4C C9 87 23 BF F1 50 DC 65 E5 FF 0210 | E8 59 75 44 3B 54 C0 BE CD 7D EB 33 33 E7 78 3F
0220 | 2A F6 06 3A 7B E5 20 50 D7 10 9C F3 31 01 6F 6B 0220 | 3D E6 83 E1 5E E7 D0 E4 3C AE 8D 98 67 9B CF 70
0230 | E2 E9 E8 FE 32 19 1C 4D B9 A5 B3 FB C1 6A B5 A2 0230 | D2 D5 5F F7 ED BE CA D8 4C 67 E6 5A 3F F1 16 23
0240 | 87 F9 D2 5C 69 22 5B 4B 89 40 A0 D4 A3 E6 2D DB 0240 | A5 14 68 A1 FB ED AD 11 F0 D5 07 64 F6 08 2E B7
0250 | 67 8B B1 A4 42 FB 71 55 1D 6B 43 F7 49 AD 46 EB 0250 | FE C4 E5 DB 3E 00 B4 68 5D 9D 49 13 27 2B EF 1B
0260 | F5 3D 32 27 41 83 4B 5C 2E D3 EA 3A 14 A5 5C AC 0260 | AB DC 16 04 A1 15 DF BC 0D F5 04 05 5F 2E E8 BA
0270 | E0 21 4D 1C E5 25 CD C9 39 9B 1C A2 40 8C BF BC 0270 | EF AF F2 85 DF 8D 6E AA 5E DC DB F9 2A 98 3B 5E
0280 | 70 83 63 2F BD 93 45 E5 DD 25 B7 A3</code></pre> 0280 | 21 57 44 56 6C 75 9B 7D B4 0C 40 2E</code></pre>
<p>Payload (de)serialization:</p> <p>Payload (de)serialization:</p>
<pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre> <pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
<table class="table"> <table class="table">
@ -464,7 +464,7 @@ random_padding_bytes = 4FD6DF70DAC10A80FB882E175ED130769E47ACA62330CFA8098708C10
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>0180DDF709A93867</code></td> <td><code>01BC6FFF9DAB3867</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td> <td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr> </tr>
<tr> <tr>
@ -482,19 +482,19 @@ random_padding_bytes = 4FD6DF70DAC10A80FB882E175ED130769E47ACA62330CFA8098708C10
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>88A00CB2642E0DCCD6BD553F424330B4</code></td> <td><code>E8FFD070C6560FC191A6695CBB3D696B</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>40, 16</td> <td>40, 16</td>
<td><code>8A33808D1D5BAEE27E2D084DAB67CED0</code></td> <td><code>50520736D6056F36F7B5AE8238C46193</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>encrypted_answer</td> <td>encrypted_answer</td>
<td>56, 596</td> <td>56, 596</td>
<td><code>FE500200DB11E83912F451CCE9CCB5A4</code> <code>E27195CE8D9C5E74E879AF4B9180400A</code> <code>8369D0277E0AB8DF51B53AEC1C2C6ED2</code> <code>D4DAD540FA7EE1B4B755A1E8BA3DBF75</code> <code>4D816D46906BB54E26CD798D2A33CB3B</code> <code>3CFD3223195FCDABD5743AB42ED42662</code> <code>355038FE07A92B4A6021EDF2A70A865A</code> <code>DFDD556A9323EE526B77529DCA6ECC60</code> <code>21AB76B6B29B8D42323549CF73819655</code> <code>87FFECC1B42343A690B04A4BFA53C3B3</code> <code>BF6180AD85CBB472BA836070704F5407</code> <code>A350CCE6E94376FEBE9D92F904D51E04</code> <code>9A12F6634E0EA7752CB2AD5606701FCD</code> <code>2ACF433A7A7820F6B94D44C0FB3D9DEF</code> <code>73F6AD93E4A36C2FAA3E2240C82CE2A4</code> <code>2D722128E689015DC95B4142CD09BA46</code> <code>4D9EA679AA70860EA7BC9593153C6FE4</code> <code>20832FA78C2CC4312FA6A81EBDBD6122</code> <code>43B5271BB2EDCB2F64292890252EAEC0</code> <code>F6E73C5DA0CFD8A220BBE2F65AC3CAE6</code> <code>598295B54230CD85F3269A95FDFEE3AE</code> <code>04C7FEAC1134BE518EC7BCAB9972B49A</code> <code>58DBF38FD2FF60929E6CBB3A95CE1015</code> <code>FD927759A80D69D28B9043059862F73B</code> <code>1714116A4D480829C8C4203F6F9DDD34</code> <code>AE9F5FA95A0B1F64D634AB3BBF18EC74</code> <code>66D524DAD7354D2E957E3B309206A8EA</code> <code>674192F56B5EA3C63BB5F45662801D42</code> <code>261ED80F40125925118D6A4D560D2430</code> <code>C8BA3E89FFE53B292052B949264CC987</code> <code>23BFF150DC65E5FF2AF6063A7BE52050</code> <code>D7109CF331016F6BE2E9E8FE32191C4D</code> <code>B9A5B3FBC16AB5A287F9D25C69225B4B</code> <code>8940A0D4A3E62DDB678BB1A442FB7155</code> <code>1D6B43F749AD46EBF53D322741834B5C</code> <code>2ED3EA3A14A55CACE0214D1CE525CDC9</code> <code>399B1CA2408CBFBC7083632FBD9345E5</code><br> <code>DD25B7A3</code></td> <td><code>FE500200E3A584CC8110CA190F8AC73B</code> <code>797EED86A9B36449071D89C1134D4430</code> <code>379FDAF706836E2158C0BABAE34400B9</code> <code>928D6E586FD947234C8185B0CE612E7B</code> <code>366EF3B55D11D90D377B1E25C6C9BDD4</code> <code>8942A6ED1F391B5F0302BD5691C30608</code> <code>188356BC6982673FBDE949261849B1D8</code> <code>A8B54138FE2B7C69D40C5A0899280EF5</code> <code>12E3FAE6A49694AA70BF1333A53FFACD</code> <code>B6D3B838C14752505F276614D11EF114</code> <code>C833AF069192E85D53748BF111F6D034</code> <code>32A9EAE9A9BB7A3E63904C73668D7D3A</code> <code>ACB39AC2BFEB36DC8B3D18B7B67BCB5B</code> <code>82DAF5150CA23C077AAC8ED2703CBFD2</code> <code>C9376AAFCD4BA4D30E5C2601E76D19F4</code> <code>815AB1EA1A1E8C985B5DE89EC4D522D6</code> <code>151BD8B158B9FECF532EDCB231C843FF</code> <code>359AD548789CF3EE1A4DDC665F3D9BD6</code> <code>2299DF0C7225716D60B617D1EA7C0F4C</code> <code>1D8A5643875D58E2CB124227C3986FEA</code> <code>CD0C3F0CCA4C1F8FD6B2D4972BE4AA1D</code> <code>B889AC9C21CF263FCF2A65BBF2B720AD</code> <code>74E190EAD9AB72564863FE754746FA13</code> <code>13B193D273CFC4F557C205CB7F6F227B</code> <code>ED338B42727D3B9C77DE3BA9A8D543E1</code> <code>304490E856B6B8FCBE7D78F5738B4347</code> <code>BAEEA28CCDBCBB428B72F43547475073</code> <code>DF4704F189390352C6F1954A7960C589</code> <code>D3FAEF15A606598F43186D4DE2AD47FD</code> <code>EE57C72C909772D5E85975443B54C0BE</code> <code>CD7DEB3333E7783F3DE683E15EE7D0E4</code> <code>3CAE8D98679BCF70D2D55FF7EDBECAD8</code> <code>4C67E65A3FF11623A51468A1FBEDAD11</code> <code>F0D50764F6082EB7FEC4E5DB3E00B468</code> <code>5D9D4913272BEF1BABDC1604A115DFBC</code> <code>0DF504055F2EE8BAEFAFF285DF8D6EAA</code> <code>5EDCDBF92A983B5E215744566C759B7D</code><br> <code>B40C402E</code></td>
<td>See below</td> <td>See below</td>
</tr> </tr>
</tbody> </tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 4FD6DF70DAC10A80FB882E175ED130769E47ACA62330CFA8098708C10
<!-- end server_DH_params_ok --> <!-- end server_DH_params_ok -->
<p>Decrypt <code>encrypted_answer</code> using the reverse of the process specified in <a href="/mtproto/auth_key#6-server-responds-with">step 6</a>:</p> <p>Decrypt <code>encrypted_answer</code> using the reverse of the process specified in <a href="/mtproto/auth_key#6-server-responds-with">step 6</a>:</p>
<!-- start server_DH_inner_data_input --> <!-- start server_DH_inner_data_input -->
<pre><code>encrypted_answer = DB11E83912F451CCE9CCB5A4E27195CE8D9C5E74E879AF4B9180400A8369D0277E0AB8DF51B53AEC1C2C6ED2D4DAD540FA7EE1B4B755A1E8BA3DBF754D816D46906BB54E26CD798D2A33CB3B3CFD3223195FCDABD5743AB42ED42662355038FE07A92B4A6021EDF2A70A865ADFDD556A9323EE526B77529DCA6ECC6021AB76B6B29B8D42323549CF7381965587FFECC1B42343A690B04A4BFA53C3B3BF6180AD85CBB472BA836070704F5407A350CCE6E94376FEBE9D92F904D51E049A12F6634E0EA7752CB2AD5606701FCD2ACF433A7A7820F6B94D44C0FB3D9DEF73F6AD93E4A36C2FAA3E2240C82CE2A42D722128E689015DC95B4142CD09BA464D9EA679AA70860EA7BC9593153C6FE420832FA78C2CC4312FA6A81EBDBD612243B5271BB2EDCB2F64292890252EAEC0F6E73C5DA0CFD8A220BBE2F65AC3CAE6598295B54230CD85F3269A95FDFEE3AE04C7FEAC1134BE518EC7BCAB9972B49A58DBF38FD2FF60929E6CBB3A95CE1015FD927759A80D69D28B9043059862F73B1714116A4D480829C8C4203F6F9DDD34AE9F5FA95A0B1F64D634AB3BBF18EC7466D524DAD7354D2E957E3B309206A8EA674192F56B5EA3C63BB5F45662801D42261ED80F40125925118D6A4D560D2430C8BA3E89FFE53B292052B949264CC98723BFF150DC65E5FF2AF6063A7BE52050D7109CF331016F6BE2E9E8FE32191C4DB9A5B3FBC16AB5A287F9D25C69225B4B8940A0D4A3E62DDB678BB1A442FB71551D6B43F749AD46EBF53D322741834B5C2ED3EA3A14A55CACE0214D1CE525CDC9399B1CA2408CBFBC7083632FBD9345E5DD25B7A3 <pre><code>encrypted_answer = E3A584CC8110CA190F8AC73B797EED86A9B36449071D89C1134D4430379FDAF706836E2158C0BABAE34400B9928D6E586FD947234C8185B0CE612E7B366EF3B55D11D90D377B1E25C6C9BDD48942A6ED1F391B5F0302BD5691C30608188356BC6982673FBDE949261849B1D8A8B54138FE2B7C69D40C5A0899280EF512E3FAE6A49694AA70BF1333A53FFACDB6D3B838C14752505F276614D11EF114C833AF069192E85D53748BF111F6D03432A9EAE9A9BB7A3E63904C73668D7D3AACB39AC2BFEB36DC8B3D18B7B67BCB5B82DAF5150CA23C077AAC8ED2703CBFD2C9376AAFCD4BA4D30E5C2601E76D19F4815AB1EA1A1E8C985B5DE89EC4D522D6151BD8B158B9FECF532EDCB231C843FF359AD548789CF3EE1A4DDC665F3D9BD62299DF0C7225716D60B617D1EA7C0F4C1D8A5643875D58E2CB124227C3986FEACD0C3F0CCA4C1F8FD6B2D4972BE4AA1DB889AC9C21CF263FCF2A65BBF2B720AD74E190EAD9AB72564863FE754746FA1313B193D273CFC4F557C205CB7F6F227BED338B42727D3B9C77DE3BA9A8D543E1304490E856B6B8FCBE7D78F5738B4347BAEEA28CCDBCBB428B72F43547475073DF4704F189390352C6F1954A7960C589D3FAEF15A606598F43186D4DE2AD47FDEE57C72C909772D5E85975443B54C0BECD7DEB3333E7783F3DE683E15EE7D0E43CAE8D98679BCF70D2D55FF7EDBECAD84C67E65A3FF11623A51468A1FBEDAD11F0D50764F6082EB7FEC4E5DB3E00B4685D9D4913272BEF1BABDC1604A115DFBC0DF504055F2EE8BAEFAFF285DF8D6EAA5EDCDBF92A983B5E215744566C759B7DB40C402E
tmp_aes_key = 010C0C9B7A484D3A0D5BE8A9D860F7037247338A949243ABFD2598EA8BAFE4D1 tmp_aes_key = 56A62D764A5E8973B19859D80559EB24EA089A0ED17D7660973EACBAB5B455C2
tmp_aes_iv = E9737E2AA80D0D0FC0161512F6069DF0654F7B84D8A2C4679359DF78C61C4CB1</code></pre> tmp_aes_iv = F1EE1C15FD64CF2E5E94EB7D322D30F65CC45E6E0E13F88E3D4EB4F2C7342A00</code></pre>
<!-- end server_DH_inner_data_input --> <!-- end server_DH_inner_data_input -->
<p>Yielding:</p> <p>Yielding:</p>
<!-- start server_DH_inner_data_output --> <!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 7FC0273CC2008BCABACC587CFFDEA36CC61A2195BA0D89B588A00CB2642E0DCCD6BD553F424330B48A33808D1D5BAEE27E2D084DAB67CED003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100793E8C3BC9C45F094D11A4277C747A11D65D3B6F5C97D8320D4BE76ABF41C4D8EFB57AFE6B0C1C7E7A5F073BA509FADE1E20DEFE69CBEC0864C94A9778B40FD57EEBBCEDA4E088AA20C71F5F289E8CC4D202DF73C621BBDFA750255F05518CAE0E58EE6EA7A0319A5B23CBDE0B146EABE42B7022AA71074D6E9164063ABA342920779D5D253FB48EB9B9BDA2A9EF56833829FE1FB199ACDC85C853D97FE9D0B69159A4826777C28AB3024D1C41F9FF53815ACB7E3105D3E21AAB984CC110498298E55BEDE751A3E7ECD357D884ACA32F6E2E0CA121FDD7792B9C3E9D19B685AEE66EA166BCED647F2BF6F036C9B6513B2D95BD6E411B46EC9F21916CD1259B5809A938674022F989DA20AE22 <pre><code>answer_with_hash = A4E385F1BD53C09C2E2B31009BF677B46A42FD57BA0D89B5E8FFD070C6560FC191A6695CBB3D696B50520736D6056F36F7B5AE8238C4619303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100533958476D50770C106E1DAC83C192DA63B2E82CEB8B9FCE4BEB41D3005C68BA399B87F89C6FDDB7B6969C705F9B901AE5CA9C88AA770E3BFD5925A25B15551B176650E5C7AACCBC2F843682B045CFA98EB00D3C3EFA13E3B4BD3D5B2E800DE079B8215CC47F98ED62B62C6C5EEFC7BB7D212BE8356BFF7B68597D467AB4AFF0C4F470669598FEA8BDE594CAA0A3B7D949B983230EA53AD3744F38B4F3AD21366D461EF8B06526F4AEDA287D875C3532AD92F55940EF1E56C7FB5251A2D134C6ED9F857C18A1A13D17FDE9E62A2C1F7ED9F3600405C66C12C1D5418D2A4CAB59C0662C38C79CE728838A7A3FC7798A06797BDAEDC487CCED3088E7ADE98FC70F9DAB386727DB97A494109B39
answer = BA0D89B588A00CB2642E0DCCD6BD553F424330B48A33808D1D5BAEE27E2D084DAB67CED003000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100793E8C3BC9C45F094D11A4277C747A11D65D3B6F5C97D8320D4BE76ABF41C4D8EFB57AFE6B0C1C7E7A5F073BA509FADE1E20DEFE69CBEC0864C94A9778B40FD57EEBBCEDA4E088AA20C71F5F289E8CC4D202DF73C621BBDFA750255F05518CAE0E58EE6EA7A0319A5B23CBDE0B146EABE42B7022AA71074D6E9164063ABA342920779D5D253FB48EB9B9BDA2A9EF56833829FE1FB199ACDC85C853D97FE9D0B69159A4826777C28AB3024D1C41F9FF53815ACB7E3105D3E21AAB984CC110498298E55BEDE751A3E7ECD357D884ACA32F6E2E0CA121FDD7792B9C3E9D19B685AEE66EA166BCED647F2BF6F036C9B6513B2D95BD6E411B46EC9F21916CD1259B5809A938674022F989DA20AE22</code></pre> answer = BA0D89B5E8FFD070C6560FC191A6695CBB3D696B50520736D6056F36F7B5AE8238C4619303000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100533958476D50770C106E1DAC83C192DA63B2E82CEB8B9FCE4BEB41D3005C68BA399B87F89C6FDDB7B6969C705F9B901AE5CA9C88AA770E3BFD5925A25B15551B176650E5C7AACCBC2F843682B045CFA98EB00D3C3EFA13E3B4BD3D5B2E800DE079B8215CC47F98ED62B62C6C5EEFC7BB7D212BE8356BFF7B68597D467AB4AFF0C4F470669598FEA8BDE594CAA0A3B7D949B983230EA53AD3744F38B4F3AD21366D461EF8B06526F4AEDA287D875C3532AD92F55940EF1E56C7FB5251A2D134C6ED9F857C18A1A13D17FDE9E62A2C1F7ED9F3600405C66C12C1D5418D2A4CAB59C0662C38C79CE728838A7A3FC7798A06797BDAEDC487CCED3088E7ADE98FC70F9DAB386727DB97A494109B39</code></pre>
<!-- end server_DH_inner_data_output --> <!-- end server_DH_inner_data_output -->
<!-- start server_DH_inner_data --> <!-- start server_DH_inner_data -->
<p>Generated payload (excluding transport headers/trailers):</p> <p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | BA 0D 89 B5 88 A0 0C B2 64 2E 0D CC D6 BD 55 3F <pre><code>0000 | BA 0D 89 B5 E8 FF D0 70 C6 56 0F C1 91 A6 69 5C
0010 | 42 43 30 B4 8A 33 80 8D 1D 5B AE E2 7E 2D 08 4D 0010 | BB 3D 69 6B 50 52 07 36 D6 05 6F 36 F7 B5 AE 82
0020 | AB 67 CE D0 03 00 00 00 FE 00 01 00 C7 1C AE B9 0020 | 38 C4 61 93 03 00 00 00 FE 00 01 00 C7 1C AE B9
0030 | C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23 0030 | C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23
0040 | 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A 0040 | 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A
0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E 0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E
@ -532,23 +532,23 @@ answer = BA0D89B588A00CB2642E0DCCD6BD553F424330B48A33808D1D5BAEE27E2D084DAB67CED
0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6 0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6
0110 | 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0 0110 | 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0
0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00 0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
0130 | 79 3E 8C 3B C9 C4 5F 09 4D 11 A4 27 7C 74 7A 11 0130 | 53 39 58 47 6D 50 77 0C 10 6E 1D AC 83 C1 92 DA
0140 | D6 5D 3B 6F 5C 97 D8 32 0D 4B E7 6A BF 41 C4 D8 0140 | 63 B2 E8 2C EB 8B 9F CE 4B EB 41 D3 00 5C 68 BA
0150 | EF B5 7A FE 6B 0C 1C 7E 7A 5F 07 3B A5 09 FA DE 0150 | 39 9B 87 F8 9C 6F DD B7 B6 96 9C 70 5F 9B 90 1A
0160 | 1E 20 DE FE 69 CB EC 08 64 C9 4A 97 78 B4 0F D5 0160 | E5 CA 9C 88 AA 77 0E 3B FD 59 25 A2 5B 15 55 1B
0170 | 7E EB BC ED A4 E0 88 AA 20 C7 1F 5F 28 9E 8C C4 0170 | 17 66 50 E5 C7 AA CC BC 2F 84 36 82 B0 45 CF A9
0180 | D2 02 DF 73 C6 21 BB DF A7 50 25 5F 05 51 8C AE 0180 | 8E B0 0D 3C 3E FA 13 E3 B4 BD 3D 5B 2E 80 0D E0
0190 | 0E 58 EE 6E A7 A0 31 9A 5B 23 CB DE 0B 14 6E AB 0190 | 79 B8 21 5C C4 7F 98 ED 62 B6 2C 6C 5E EF C7 BB
01A0 | E4 2B 70 22 AA 71 07 4D 6E 91 64 06 3A BA 34 29 01A0 | 7D 21 2B E8 35 6B FF 7B 68 59 7D 46 7A B4 AF F0
01B0 | 20 77 9D 5D 25 3F B4 8E B9 B9 BD A2 A9 EF 56 83 01B0 | C4 F4 70 66 95 98 FE A8 BD E5 94 CA A0 A3 B7 D9
01C0 | 38 29 FE 1F B1 99 AC DC 85 C8 53 D9 7F E9 D0 B6 01C0 | 49 B9 83 23 0E A5 3A D3 74 4F 38 B4 F3 AD 21 36
01D0 | 91 59 A4 82 67 77 C2 8A B3 02 4D 1C 41 F9 FF 53 01D0 | 6D 46 1E F8 B0 65 26 F4 AE DA 28 7D 87 5C 35 32
01E0 | 81 5A CB 7E 31 05 D3 E2 1A AB 98 4C C1 10 49 82 01E0 | AD 92 F5 59 40 EF 1E 56 C7 FB 52 51 A2 D1 34 C6
01F0 | 98 E5 5B ED E7 51 A3 E7 EC D3 57 D8 84 AC A3 2F 01F0 | ED 9F 85 7C 18 A1 A1 3D 17 FD E9 E6 2A 2C 1F 7E
0200 | 6E 2E 0C A1 21 FD D7 79 2B 9C 3E 9D 19 B6 85 AE 0200 | D9 F3 60 04 05 C6 6C 12 C1 D5 41 8D 2A 4C AB 59
0210 | E6 6E A1 66 BC ED 64 7F 2B F6 F0 36 C9 B6 51 3B 0210 | C0 66 2C 38 C7 9C E7 28 83 8A 7A 3F C7 79 8A 06
0220 | 2D 95 BD 6E 41 1B 46 EC 9F 21 91 6C D1 25 9B 58 0220 | 79 7B DA ED C4 87 CC ED 30 88 E7 AD E9 8F C7 0F
0230 | 09 A9 38 67</code></pre> 0230 | 9D AB 38 67</code></pre>
<p>Payload (de)serialization:</p> <p>Payload (de)serialization:</p>
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre> <pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
<table class="table"> <table class="table">
@ -570,13 +570,13 @@ answer = BA0D89B588A00CB2642E0DCCD6BD553F424330B48A33808D1D5BAEE27E2D084DAB67CED
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>4, 16</td> <td>4, 16</td>
<td><code>88A00CB2642E0DCCD6BD553F424330B4</code></td> <td><code>E8FFD070C6560FC191A6695CBB3D696B</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>20, 16</td> <td>20, 16</td>
<td><code>8A33808D1D5BAEE27E2D084DAB67CED0</code></td> <td><code>50520736D6056F36F7B5AE8238C46193</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
@ -594,13 +594,13 @@ answer = BA0D89B588A00CB2642E0DCCD6BD553F424330B48A33808D1D5BAEE27E2D084DAB67CED
<tr> <tr>
<td>g_a</td> <td>g_a</td>
<td>300, 260</td> <td>300, 260</td>
<td><code>FE000100793E8C3BC9C45F094D11A427</code> <code>7C747A11D65D3B6F5C97D8320D4BE76A</code> <code>BF41C4D8EFB57AFE6B0C1C7E7A5F073B</code> <code>A509FADE1E20DEFE69CBEC0864C94A97</code> <code>78B40FD57EEBBCEDA4E088AA20C71F5F</code> <code>289E8CC4D202DF73C621BBDFA750255F</code> <code>05518CAE0E58EE6EA7A0319A5B23CBDE</code> <code>0B146EABE42B7022AA71074D6E916406</code> <code>3ABA342920779D5D253FB48EB9B9BDA2</code> <code>A9EF56833829FE1FB199ACDC85C853D9</code> <code>7FE9D0B69159A4826777C28AB3024D1C</code> <code>41F9FF53815ACB7E3105D3E21AAB984C</code> <code>C110498298E55BEDE751A3E7ECD357D8</code> <code>84ACA32F6E2E0CA121FDD7792B9C3E9D</code> <code>19B685AEE66EA166BCED647F2BF6F036</code> <code>C9B6513B2D95BD6E411B46EC9F21916C</code><br> <code>D1259B58</code></td> <td><code>FE000100533958476D50770C106E1DAC</code> <code>83C192DA63B2E82CEB8B9FCE4BEB41D3</code> <code>005C68BA399B87F89C6FDDB7B6969C70</code> <code>5F9B901AE5CA9C88AA770E3BFD5925A2</code> <code>5B15551B176650E5C7AACCBC2F843682</code> <code>B045CFA98EB00D3C3EFA13E3B4BD3D5B</code> <code>2E800DE079B8215CC47F98ED62B62C6C</code> <code>5EEFC7BB7D212BE8356BFF7B68597D46</code> <code>7AB4AFF0C4F470669598FEA8BDE594CA</code> <code>A0A3B7D949B983230EA53AD3744F38B4</code> <code>F3AD21366D461EF8B06526F4AEDA287D</code> <code>875C3532AD92F55940EF1E56C7FB5251</code> <code>A2D134C6ED9F857C18A1A13D17FDE9E6</code> <code>2A2C1F7ED9F3600405C66C12C1D5418D</code> <code>2A4CAB59C0662C38C79CE728838A7A3F</code> <code>C7798A06797BDAEDC487CCED3088E7AD</code><br> <code>E98FC70F</code></td>
<td><code>g_a</code> diffie-hellman parameter</td> <td><code>g_a</code> diffie-hellman parameter</td>
</tr> </tr>
<tr> <tr>
<td>server_time</td> <td>server_time</td>
<td>560, 4</td> <td>560, 4</td>
<td><code>09A93867</code> (1731766537 in decimal)</td> <td><code>9DAB3867</code> (1731767197 in decimal)</td>
<td>Server time</td> <td>Server time</td>
</tr> </tr>
</tbody> </tbody>
@ -609,34 +609,34 @@ answer = BA0D89B588A00CB2642E0DCCD6BD553F424330B48A33808D1D5BAEE27E2D084DAB67CED
<h5><a class="anchor" href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" id="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" name="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message"><i class="anchor-icon"></i></a>7) Client computes random 2048-bit number <em>b</em> (using a sufficient amount of entropy) and sends the server a message</h5> <h5><a class="anchor" href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" id="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" name="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message"><i class="anchor-icon"></i></a>7) Client computes random 2048-bit number <em>b</em> (using a sufficient amount of entropy) and sends the server a message</h5>
<p>First, generate a secure random 2048-bit number b:</p> <p>First, generate a secure random 2048-bit number b:</p>
<!-- start b --> <!-- start b -->
<pre><code>b = 8487CEEC95B08B349E56A2EACC775D5DB3AC7B0E231A6EFEB194B2305C10385F0DC79C589C5C38A446BB353DF4BBECFF96E2EDE7EEAC4384FBCD82CB8BC31C65FC38D69796691FDF314501CB010F486A677BB4638344DCC3A0A307F6A2F38AE1DF7B43D6BD00FF42121D15FE30B7FE307816771ECB9BCDF97E08CD0FFF783191B1FAEFECF533050252921FEA2D6DF31FFBBD62B5F836A07BCA342F2EE325D6D70706477D0E22234F25A427E561D2E276C9204E484A6F184C7462AB56DEB18A16EC4668EBCE28569275A36F59D05CD4D1D731531DD0B8633E87801DCAF5736E6BEE06C7A3AE7E47EAE3B53D35D4BB23EB1597048FFBC38A28F2B7E72D60147401</code></pre> <pre><code>b = 4628EDE8659332AC2458B5BFA148148FC59516410B705E471E97B4C39EFA850FA30691DE8167453A9B75212BC5B804F32201A7E31FAD54C6472AA60001B3C5186E37DFD8B3E96B8049993BCF03D818E9C60F3E49218B03C6A37E56618E149EE1AEA577304DC843F85DA6BEA079AEBE5622804A1BE5E28F2E8CB3CEC7ABC8DE17C99268898FFBA317465F6BB03E610356EA68245C88EA226B79A44F98327B2300B3CB4C4BB9CDAA704338641B3DE35936E81630A60A78711F7E7A3E5A1296389D05B5F2BF1D8EF8BFA7950CEB8E286C6AC4773CB72A550FA1C73B447D3B5D4D227520109258BC548EE2B44B06E251A39A24F56613EA775955A2BCDF0BF853D4C9</code></pre>
<!-- end b --> <!-- end b -->
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p> <p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
<!-- start g_b --> <!-- start g_b -->
<pre><code>g_b = 6E9707456F57D1A5BA110E879B97A146952B760195EEE9B09A4416D13A60C4F3DC4F267EFB3EF6009D2E08B31E8097391583C3D63C9938D376D10A1934F2514F4C2938B7B76E3F59DA8C5B20FF08F1922A37808104CAE3DA3A395AF2EF5D4C1C9690BCE32066A1A082B88CFC5086F999AB7E847B4518EEFA8E6C2AB4E5988C93EC2EED9D264F3D297E7225921F87A70A7292F564E55F22C21116C3120ECA708B8171A690CE5E85676695669F581F702B8D99A42BBD927677AB6AEC82F714DB0C8096654171A913D91602D458F2E53BB2689F1D75BAECFAD5702447F679C2D326A67FD5A356E236018A4DC1A8315F5BD35ADDCA421A0DE3BDB4B55E2B8DA578E4</code></pre> <pre><code>g_b = 9624B1C1AA5BE4CC057636BCB57E6D8E739076FF622720BCA484A7B77EAEF63772FF22AE2EFBCACAE3B5E47824AB8DDF914AE4E0837076A94861DE2EBE89C208B7E7DBFBCD158801CABD16BB9C645BD37844415AC2BC2C34BF1825CBD1468F20C38E76CBE1DA8EC6EC8FF57F327E846D14932AD68933F34F18F4151BFC43E55FE50B5016F0B0870F4519AB73F0F94122AA41C1AB00C133870DA9A2A83ACA2F5EE45E02497DCA3FBEE53AC11CCBAF3447FA1CD816A07D82492FD67136FBD1C3C612594D9844C0F95520399149327A765E62BBD2A390EF3708360D94EC9F9DE3C7992D9FA6C4E325D2D419EDC4B260BE4AABE8506B3F978FFE3A4C50266F048D80</code></pre>
<!-- end g_b --> <!-- end g_b -->
<h6>7.1) generation of encrypted_data</h6> <h6>7.1) generation of encrypted_data</h6>
<!-- start client_DH_inner_data --> <!-- start client_DH_inner_data -->
<p>Generated payload (excluding transport headers/trailers):</p> <p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 54 B6 43 66 88 A0 0C B2 64 2E 0D CC D6 BD 55 3F <pre><code>0000 | 54 B6 43 66 E8 FF D0 70 C6 56 0F C1 91 A6 69 5C
0010 | 42 43 30 B4 8A 33 80 8D 1D 5B AE E2 7E 2D 08 4D 0010 | BB 3D 69 6B 50 52 07 36 D6 05 6F 36 F7 B5 AE 82
0020 | AB 67 CE D0 00 00 00 00 00 00 00 00 FE 00 01 00 0020 | 38 C4 61 93 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 6E 97 07 45 6F 57 D1 A5 BA 11 0E 87 9B 97 A1 46 0030 | 96 24 B1 C1 AA 5B E4 CC 05 76 36 BC B5 7E 6D 8E
0040 | 95 2B 76 01 95 EE E9 B0 9A 44 16 D1 3A 60 C4 F3 0040 | 73 90 76 FF 62 27 20 BC A4 84 A7 B7 7E AE F6 37
0050 | DC 4F 26 7E FB 3E F6 00 9D 2E 08 B3 1E 80 97 39 0050 | 72 FF 22 AE 2E FB CA CA E3 B5 E4 78 24 AB 8D DF
0060 | 15 83 C3 D6 3C 99 38 D3 76 D1 0A 19 34 F2 51 4F 0060 | 91 4A E4 E0 83 70 76 A9 48 61 DE 2E BE 89 C2 08
0070 | 4C 29 38 B7 B7 6E 3F 59 DA 8C 5B 20 FF 08 F1 92 0070 | B7 E7 DB FB CD 15 88 01 CA BD 16 BB 9C 64 5B D3
0080 | 2A 37 80 81 04 CA E3 DA 3A 39 5A F2 EF 5D 4C 1C 0080 | 78 44 41 5A C2 BC 2C 34 BF 18 25 CB D1 46 8F 20
0090 | 96 90 BC E3 20 66 A1 A0 82 B8 8C FC 50 86 F9 99 0090 | C3 8E 76 CB E1 DA 8E C6 EC 8F F5 7F 32 7E 84 6D
00A0 | AB 7E 84 7B 45 18 EE FA 8E 6C 2A B4 E5 98 8C 93 00A0 | 14 93 2A D6 89 33 F3 4F 18 F4 15 1B FC 43 E5 5F
00B0 | EC 2E ED 9D 26 4F 3D 29 7E 72 25 92 1F 87 A7 0A 00B0 | E5 0B 50 16 F0 B0 87 0F 45 19 AB 73 F0 F9 41 22
00C0 | 72 92 F5 64 E5 5F 22 C2 11 16 C3 12 0E CA 70 8B 00C0 | AA 41 C1 AB 00 C1 33 87 0D A9 A2 A8 3A CA 2F 5E
00D0 | 81 71 A6 90 CE 5E 85 67 66 95 66 9F 58 1F 70 2B 00D0 | E4 5E 02 49 7D CA 3F BE E5 3A C1 1C CB AF 34 47
00E0 | 8D 99 A4 2B BD 92 76 77 AB 6A EC 82 F7 14 DB 0C 00E0 | FA 1C D8 16 A0 7D 82 49 2F D6 71 36 FB D1 C3 C6
00F0 | 80 96 65 41 71 A9 13 D9 16 02 D4 58 F2 E5 3B B2 00F0 | 12 59 4D 98 44 C0 F9 55 20 39 91 49 32 7A 76 5E
0100 | 68 9F 1D 75 BA EC FA D5 70 24 47 F6 79 C2 D3 26 0100 | 62 BB D2 A3 90 EF 37 08 36 0D 94 EC 9F 9D E3 C7
0110 | A6 7F D5 A3 56 E2 36 01 8A 4D C1 A8 31 5F 5B D3 0110 | 99 2D 9F A6 C4 E3 25 D2 D4 19 ED C4 B2 60 BE 4A
0120 | 5A DD CA 42 1A 0D E3 BD B4 B5 5E 2B 8D A5 78 E4</code></pre> 0120 | AB E8 50 6B 3F 97 8F FE 3A 4C 50 26 6F 04 8D 80</code></pre>
<p>Payload (de)serialization:</p> <p>Payload (de)serialization:</p>
<pre><code>client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;</code></pre> <pre><code>client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;</code></pre>
<table class="table"> <table class="table">
@ -658,19 +658,19 @@ answer = BA0D89B588A00CB2642E0DCCD6BD553F424330B48A33808D1D5BAEE27E2D084DAB67CED
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>4, 16</td> <td>4, 16</td>
<td><code>88A00CB2642E0DCCD6BD553F424330B4</code></td> <td><code>E8FFD070C6560FC191A6695CBB3D696B</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>20, 16</td> <td>20, 16</td>
<td><code>8A33808D1D5BAEE27E2D084DAB67CED0</code></td> <td><code>50520736D6056F36F7B5AE8238C46193</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>g_b</td> <td>g_b</td>
<td>36, 260</td> <td>36, 260</td>
<td><code>FE0001006E9707456F57D1A5BA110E87</code> <code>9B97A146952B760195EEE9B09A4416D1</code> <code>3A60C4F3DC4F267EFB3EF6009D2E08B3</code> <code>1E8097391583C3D63C9938D376D10A19</code> <code>34F2514F4C2938B7B76E3F59DA8C5B20</code> <code>FF08F1922A37808104CAE3DA3A395AF2</code> <code>EF5D4C1C9690BCE32066A1A082B88CFC</code> <code>5086F999AB7E847B4518EEFA8E6C2AB4</code> <code>E5988C93EC2EED9D264F3D297E722592</code> <code>1F87A70A7292F564E55F22C21116C312</code> <code>0ECA708B8171A690CE5E85676695669F</code> <code>581F702B8D99A42BBD927677AB6AEC82</code> <code>F714DB0C8096654171A913D91602D458</code> <code>F2E53BB2689F1D75BAECFAD5702447F6</code> <code>79C2D326A67FD5A356E236018A4DC1A8</code> <code>315F5BD35ADDCA421A0DE3BDB4B55E2B</code><br> <code>8DA578E4</code></td> <td><code>FE0001009624B1C1AA5BE4CC057636BC</code> <code>B57E6D8E739076FF622720BCA484A7B7</code> <code>7EAEF63772FF22AE2EFBCACAE3B5E478</code> <code>24AB8DDF914AE4E0837076A94861DE2E</code> <code>BE89C208B7E7DBFBCD158801CABD16BB</code> <code>9C645BD37844415AC2BC2C34BF1825CB</code> <code>D1468F20C38E76CBE1DA8EC6EC8FF57F</code> <code>327E846D14932AD68933F34F18F4151B</code> <code>FC43E55FE50B5016F0B0870F4519AB73</code> <code>F0F94122AA41C1AB00C133870DA9A2A8</code> <code>3ACA2F5EE45E02497DCA3FBEE53AC11C</code> <code>CBAF3447FA1CD816A07D82492FD67136</code> <code>FBD1C3C612594D9844C0F95520399149</code> <code>327A765E62BBD2A390EF3708360D94EC</code> <code>9F9DE3C7992D9FA6C4E325D2D419EDC4</code> <code>B260BE4AABE8506B3F978FFE3A4C5026</code><br> <code>6F048D80</code></td>
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td> <td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
</tr> </tr>
<tr> <tr>
@ -684,47 +684,47 @@ answer = BA0D89B588A00CB2642E0DCCD6BD553F424330B48A33808D1D5BAEE27E2D084DAB67CED
<!-- end client_DH_inner_data --> <!-- end client_DH_inner_data -->
<p>The serialization of <em>Client_DH_Inner_Data</em> produces a string <strong>data</strong>. This is used to generate <strong>encrypted_data</strong> as specified in <a href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message">step 6</a>, using the following inputs:</p> <p>The serialization of <em>Client_DH_Inner_Data</em> produces a string <strong>data</strong>. This is used to generate <strong>encrypted_data</strong> as specified in <a href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message">step 6</a>, using the following inputs:</p>
<!-- start client_DH_inner_data_input --> <!-- start client_DH_inner_data_input -->
<pre><code>data = 54B6436688A00CB2642E0DCCD6BD553F424330B48A33808D1D5BAEE27E2D084DAB67CED00000000000000000FE0001006E9707456F57D1A5BA110E879B97A146952B760195EEE9B09A4416D13A60C4F3DC4F267EFB3EF6009D2E08B31E8097391583C3D63C9938D376D10A1934F2514F4C2938B7B76E3F59DA8C5B20FF08F1922A37808104CAE3DA3A395AF2EF5D4C1C9690BCE32066A1A082B88CFC5086F999AB7E847B4518EEFA8E6C2AB4E5988C93EC2EED9D264F3D297E7225921F87A70A7292F564E55F22C21116C3120ECA708B8171A690CE5E85676695669F581F702B8D99A42BBD927677AB6AEC82F714DB0C8096654171A913D91602D458F2E53BB2689F1D75BAECFAD5702447F679C2D326A67FD5A356E236018A4DC1A8315F5BD35ADDCA421A0DE3BDB4B55E2B8DA578E4 <pre><code>data = 54B64366E8FFD070C6560FC191A6695CBB3D696B50520736D6056F36F7B5AE8238C461930000000000000000FE0001009624B1C1AA5BE4CC057636BCB57E6D8E739076FF622720BCA484A7B77EAEF63772FF22AE2EFBCACAE3B5E47824AB8DDF914AE4E0837076A94861DE2EBE89C208B7E7DBFBCD158801CABD16BB9C645BD37844415AC2BC2C34BF1825CBD1468F20C38E76CBE1DA8EC6EC8FF57F327E846D14932AD68933F34F18F4151BFC43E55FE50B5016F0B0870F4519AB73F0F94122AA41C1AB00C133870DA9A2A83ACA2F5EE45E02497DCA3FBEE53AC11CCBAF3447FA1CD816A07D82492FD67136FBD1C3C612594D9844C0F95520399149327A765E62BBD2A390EF3708360D94EC9F9DE3C7992D9FA6C4E325D2D419EDC4B260BE4AABE8506B3F978FFE3A4C50266F048D80
padding = F06EBED4D1D4AB175BE9CC8E padding = 6BEB9B8D16F85CFA554D0342
tmp_aes_key = 010C0C9B7A484D3A0D5BE8A9D860F7037247338A949243ABFD2598EA8BAFE4D1 tmp_aes_key = 56A62D764A5E8973B19859D80559EB24EA089A0ED17D7660973EACBAB5B455C2
tmp_aes_iv = E9737E2AA80D0D0FC0161512F6069DF0654F7B84D8A2C4679359DF78C61C4CB1</code></pre> tmp_aes_iv = F1EE1C15FD64CF2E5E94EB7D322D30F65CC45E6E0E13F88E3D4EB4F2C7342A00</code></pre>
<!-- end client_DH_inner_data_input --> <!-- end client_DH_inner_data_input -->
<p>Process:</p> <p>Process:</p>
<pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16) <pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16)
encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre> encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre>
<p>Output:</p> <p>Output:</p>
<!-- start client_DH_inner_data_output --> <!-- start client_DH_inner_data_output -->
<pre><code>encrypted_data = 6CA5FA6974FB55D595863B586A284FE5A15AD986F67F1C5A07491EBABBE64A244E45F46CAF47786FCCD17C3AC5CFD571BAF80F5E4986BB7BAF0AD66E82B1E6E9FA03E6D296F5F77BEB8BEB1A979B1517B5AF46E423F39E38628F06208E6CAD6D38B2C0279A84B7182300DBD2F934B243A78BB5508DDAC482868B2F8B06D8F098BA1BB156C5CB8BEE86EBE4403EAB6DDA387A55D101F1B29216C219ADEE29A637F69178C960B74CBC7D779319D0A660FA2C1855F55BD7D03E03C3E591CDD8174E2B147E15592009F1229098C58D639714D8F63A64F8E3CA699118D5C4472523F22ACE75017DC325A01B93BF983D787285AFD56D80D671677F8BAF3B4A62633FEC3EB4AB9FFC6B80358D7DF6420364BF04628C7CC4485D9A472741E6B88CE100C80B5DB173EBA4B44CD4574E7B052083021D64E8F1D142ECB6EB6255CA9739C6D3475550FF6E30A7D1E0B19A23FA2342DB</code></pre> <pre><code>encrypted_data = 52AA7D684C4D0330BE5ADCA8D8C6272F1AE969A9C988A2423E5D92E25F09EB94E1CE80A686B60CE3AF675E911119E0C38D00DADFB6EF3D39B4F3B576E6AC0F94664068BB5E346BCBEF1BEB5A981356CFFD6949EB06F11A58E7DA4505F9A2FB9E6F037CD04F1CDBED0C9CD822589922F97D27200492315B99446F36EFB501C6A4090D5EF5CD1195038C1C52E5E185C8BF67B4B81B0CC39247741770724055A005C86C4BA9715383B2E1DED85202D54792C888B318B6C6655A109AA5281CF8EEDD37744E914C789A1648B19B21B346565F226C2F15DF746DF3497FDFB5A91E179EF7A1EB61C1E371974F297414F4CC20A9161FFA9EDC7BB08CA219EB4F521120C27A5391130C5A0D90059179CBE19CADC2B6A988E49A93A01D938CBD55B2725D938556A78B0F12C48012E438EF38B7C5DDD9A1AB4E6A97084E917CCCFB67AC42764F8F81C366170735817A4737BAF0962E</code></pre>
<!-- end client_DH_inner_data_output --> <!-- end client_DH_inner_data_output -->
<p>The length of the final string is 336 bytes.</p> <p>The length of the final string is 336 bytes.</p>
<h6>7.2) set_client_DH_params query</h6> <h6>7.2) set_client_DH_params query</h6>
<!-- start set_client_DH_params --> <!-- start set_client_DH_params -->
<p>Sent payload (excluding transport headers/trailers):</p> <p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 F4 D4 09 00 09 A9 38 67 <pre><code>0000 | 00 00 00 00 00 00 00 00 FC B7 0D 00 9D AB 38 67
0010 | 78 01 00 00 1F 5F 04 F5 88 A0 0C B2 64 2E 0D CC 0010 | 78 01 00 00 1F 5F 04 F5 E8 FF D0 70 C6 56 0F C1
0020 | D6 BD 55 3F 42 43 30 B4 8A 33 80 8D 1D 5B AE E2 0020 | 91 A6 69 5C BB 3D 69 6B 50 52 07 36 D6 05 6F 36
0030 | 7E 2D 08 4D AB 67 CE D0 FE 50 01 00 6C A5 FA 69 0030 | F7 B5 AE 82 38 C4 61 93 FE 50 01 00 52 AA 7D 68
0040 | 74 FB 55 D5 95 86 3B 58 6A 28 4F E5 A1 5A D9 86 0040 | 4C 4D 03 30 BE 5A DC A8 D8 C6 27 2F 1A E9 69 A9
0050 | F6 7F 1C 5A 07 49 1E BA BB E6 4A 24 4E 45 F4 6C 0050 | C9 88 A2 42 3E 5D 92 E2 5F 09 EB 94 E1 CE 80 A6
0060 | AF 47 78 6F CC D1 7C 3A C5 CF D5 71 BA F8 0F 5E 0060 | 86 B6 0C E3 AF 67 5E 91 11 19 E0 C3 8D 00 DA DF
0070 | 49 86 BB 7B AF 0A D6 6E 82 B1 E6 E9 FA 03 E6 D2 0070 | B6 EF 3D 39 B4 F3 B5 76 E6 AC 0F 94 66 40 68 BB
0080 | 96 F5 F7 7B EB 8B EB 1A 97 9B 15 17 B5 AF 46 E4 0080 | 5E 34 6B CB EF 1B EB 5A 98 13 56 CF FD 69 49 EB
0090 | 23 F3 9E 38 62 8F 06 20 8E 6C AD 6D 38 B2 C0 27 0090 | 06 F1 1A 58 E7 DA 45 05 F9 A2 FB 9E 6F 03 7C D0
00A0 | 9A 84 B7 18 23 00 DB D2 F9 34 B2 43 A7 8B B5 50 00A0 | 4F 1C DB ED 0C 9C D8 22 58 99 22 F9 7D 27 20 04
00B0 | 8D DA C4 82 86 8B 2F 8B 06 D8 F0 98 BA 1B B1 56 00B0 | 92 31 5B 99 44 6F 36 EF B5 01 C6 A4 09 0D 5E F5
00C0 | C5 CB 8B EE 86 EB E4 40 3E AB 6D DA 38 7A 55 D1 00C0 | CD 11 95 03 8C 1C 52 E5 E1 85 C8 BF 67 B4 B8 1B
00D0 | 01 F1 B2 92 16 C2 19 AD EE 29 A6 37 F6 91 78 C9 00D0 | 0C C3 92 47 74 17 70 72 40 55 A0 05 C8 6C 4B A9
00E0 | 60 B7 4C BC 7D 77 93 19 D0 A6 60 FA 2C 18 55 F5 00E0 | 71 53 83 B2 E1 DE D8 52 02 D5 47 92 C8 88 B3 18
00F0 | 5B D7 D0 3E 03 C3 E5 91 CD D8 17 4E 2B 14 7E 15 00F0 | B6 C6 65 5A 10 9A A5 28 1C F8 EE DD 37 74 4E 91
0100 | 59 20 09 F1 22 90 98 C5 8D 63 97 14 D8 F6 3A 64 0100 | 4C 78 9A 16 48 B1 9B 21 B3 46 56 5F 22 6C 2F 15
0110 | F8 E3 CA 69 91 18 D5 C4 47 25 23 F2 2A CE 75 01 0110 | DF 74 6D F3 49 7F DF B5 A9 1E 17 9E F7 A1 EB 61
0120 | 7D C3 25 A0 1B 93 BF 98 3D 78 72 85 AF D5 6D 80 0120 | C1 E3 71 97 4F 29 74 14 F4 CC 20 A9 16 1F FA 9E
0130 | D6 71 67 7F 8B AF 3B 4A 62 63 3F EC 3E B4 AB 9F 0130 | DC 7B B0 8C A2 19 EB 4F 52 11 20 C2 7A 53 91 13
0140 | FC 6B 80 35 8D 7D F6 42 03 64 BF 04 62 8C 7C C4 0140 | 0C 5A 0D 90 05 91 79 CB E1 9C AD C2 B6 A9 88 E4
0150 | 48 5D 9A 47 27 41 E6 B8 8C E1 00 C8 0B 5D B1 73 0150 | 9A 93 A0 1D 93 8C BD 55 B2 72 5D 93 85 56 A7 8B
0160 | EB A4 B4 4C D4 57 4E 7B 05 20 83 02 1D 64 E8 F1 0160 | 0F 12 C4 80 12 E4 38 EF 38 B7 C5 DD D9 A1 AB 4E
0170 | D1 42 EC B6 EB 62 55 CA 97 39 C6 D3 47 55 50 FF 0170 | 6A 97 08 4E 91 7C CC FB 67 AC 42 76 4F 8F 81 C3
0180 | 6E 30 A7 D1 E0 B1 9A 23 FA 23 42 DB</code></pre> 0180 | 66 17 07 35 81 7A 47 37 BA F0 96 2E</code></pre>
<p>Payload (de)serialization:</p> <p>Payload (de)serialization:</p>
<pre><code>set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;</code></pre> <pre><code>set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;</code></pre>
<table class="table"> <table class="table">
@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>F4D4090009A93867</code></td> <td><code>FCB70D009DAB3867</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td> <td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr> </tr>
<tr> <tr>
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>88A00CB2642E0DCCD6BD553F424330B4</code></td> <td><code>E8FFD070C6560FC191A6695CBB3D696B</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>40, 16</td> <td>40, 16</td>
<td><code>8A33808D1D5BAEE27E2D084DAB67CED0</code></td> <td><code>50520736D6056F36F7B5AE8238C46193</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>encrypted_data</td> <td>encrypted_data</td>
<td>56, 340</td> <td>56, 340</td>
<td><code>FE5001006CA5FA6974FB55D595863B58</code> <code>6A284FE5A15AD986F67F1C5A07491EBA</code> <code>BBE64A244E45F46CAF47786FCCD17C3A</code> <code>C5CFD571BAF80F5E4986BB7BAF0AD66E</code> <code>82B1E6E9FA03E6D296F5F77BEB8BEB1A</code> <code>979B1517B5AF46E423F39E38628F0620</code> <code>8E6CAD6D38B2C0279A84B7182300DBD2</code> <code>F934B243A78BB5508DDAC482868B2F8B</code> <code>06D8F098BA1BB156C5CB8BEE86EBE440</code> <code>3EAB6DDA387A55D101F1B29216C219AD</code> <code>EE29A637F69178C960B74CBC7D779319</code> <code>D0A660FA2C1855F55BD7D03E03C3E591</code> <code>CDD8174E2B147E15592009F1229098C5</code> <code>8D639714D8F63A64F8E3CA699118D5C4</code> <code>472523F22ACE75017DC325A01B93BF98</code> <code>3D787285AFD56D80D671677F8BAF3B4A</code> <code>62633FEC3EB4AB9FFC6B80358D7DF642</code> <code>0364BF04628C7CC4485D9A472741E6B8</code> <code>8CE100C80B5DB173EBA4B44CD4574E7B</code> <code>052083021D64E8F1D142ECB6EB6255CA</code> <code>9739C6D3475550FF6E30A7D1E0B19A23</code><br> <code>FA2342DB</code></td> <td><code>FE50010052AA7D684C4D0330BE5ADCA8</code> <code>D8C6272F1AE969A9C988A2423E5D92E2</code> <code>5F09EB94E1CE80A686B60CE3AF675E91</code> <code>1119E0C38D00DADFB6EF3D39B4F3B576</code> <code>E6AC0F94664068BB5E346BCBEF1BEB5A</code> <code>981356CFFD6949EB06F11A58E7DA4505</code> <code>F9A2FB9E6F037CD04F1CDBED0C9CD822</code> <code>589922F97D27200492315B99446F36EF</code> <code>B501C6A4090D5EF5CD1195038C1C52E5</code> <code>E185C8BF67B4B81B0CC3924774177072</code> <code>4055A005C86C4BA9715383B2E1DED852</code> <code>02D54792C888B318B6C6655A109AA528</code> <code>1CF8EEDD37744E914C789A1648B19B21</code> <code>B346565F226C2F15DF746DF3497FDFB5</code> <code>A91E179EF7A1EB61C1E371974F297414</code> <code>F4CC20A9161FFA9EDC7BB08CA219EB4F</code> <code>521120C27A5391130C5A0D90059179CB</code> <code>E19CADC2B6A988E49A93A01D938CBD55</code> <code>B2725D938556A78B0F12C48012E438EF</code> <code>38B7C5DDD9A1AB4E6A97084E917CCCFB</code> <code>67AC42764F8F81C366170735817A4737</code><br> <code>BAF0962E</code></td>
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td> <td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
</tr> </tr>
</tbody> </tbody>
@ -785,17 +785,17 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<h5><a class="anchor" href="#8-auth-key-generation" id="8-auth-key-generation" name="8-auth-key-generation"><i class="anchor-icon"></i></a>8) Auth key generation</h5> <h5><a class="anchor" href="#8-auth-key-generation" id="8-auth-key-generation" name="8-auth-key-generation"><i class="anchor-icon"></i></a>8) Auth key generation</h5>
<p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p> <p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p>
<!-- start auth_key --> <!-- start auth_key -->
<pre><code>auth_key = BCEC8676D1BF9942E58451FB59B077B4E1CED8BEA189910E9C4759551612EE1EF1C33ED8DC685B5D2ADD46F4C04DD62A8884F0DA77FE8FA1FD973063F7535AA22D5BF85FAD0D6B856911272DAAE6E8ADA29E2679D2879696AA711F95A225C896DE07F72BF1342ED04F528943537F68C4E12AAEFC79A05BC1ACFB7DE4CCC9B694977D98ED4BDD7971B2CCED07B4F760366A5FAE69121DEB9A79A127B30A965E438831F731EEB0616EC5EB40158F669878E28F54482D859E458B8A3C0DEEA3B817A4236AE729A6A147379F7E98737D00E17BEC1DFF0896F9C11D18394F64F2548E877F7623D7845587FEA12F02FFE2479DBCCB688C2248E036CD0D74C82B956A25</code></pre> <pre><code>auth_key = 4437E1C81E2FC5AE12C81E8D81E658072CA6160D8FA0345D8EE2ED2A6E9892DEB3CD0DE8B44CC9D6DE9E5ED98A41BBD29BAE6CABC8CDA36C3D958E5D04E3A144724C4A5011D73E772E0ADEAE3AE0C2093050DDA19C2BB931BF896D3D584B5F443E114D8EAECED9C52EBD1B71306101E7ABBC98E9F48E6C30C3301E33E162B4CA16FF517A07B40BADB1D3D4F358AD759CD3A35EBACB599171A2C32F9AE5B7F86294733C39083E7156B9E12B511869CA9FB296A9AFE7F569DE8E4B97729B22C37DA7027DCAB354E41A10A45B1EDC91CA2982F2774108DAD91817D32EB1E1EA720E98D0F381D3C6275D7353C0CF121EFB1C7719F7ECFA948052071C2AECA2743578</code></pre>
<!-- end auth_key --> <!-- end auth_key -->
<h5><a class="anchor" href="#9-final-server-reply" id="9-final-server-reply" name="9-final-server-reply"><i class="anchor-icon"></i></a>9) Final server reply</h5> <h5><a class="anchor" href="#9-final-server-reply" id="9-final-server-reply" name="9-final-server-reply"><i class="anchor-icon"></i></a>9) Final server reply</h5>
<p>The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:</p> <p>The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:</p>
<!-- start dh_gen_ok --> <!-- start dh_gen_ok -->
<p>Received payload (excluding transport headers/trailers):</p> <p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 6C 44 58 0B A9 38 67 <pre><code>0000 | 00 00 00 00 00 00 00 00 01 10 4B 01 9F AB 38 67
0010 | 34 00 00 00 34 F7 CB 3B 88 A0 0C B2 64 2E 0D CC 0010 | 34 00 00 00 34 F7 CB 3B E8 FF D0 70 C6 56 0F C1
0020 | D6 BD 55 3F 42 43 30 B4 8A 33 80 8D 1D 5B AE E2 0020 | 91 A6 69 5C BB 3D 69 6B 50 52 07 36 D6 05 6F 36
0030 | 7E 2D 08 4D AB 67 CE D0 EC 44 2B 71 0B 93 7F 95 0030 | F7 B5 AE 82 38 C4 61 93 04 DE FD 1F 17 F3 6F CE
0040 | 1F 3F 2D 57 D0 B3 38 2E</code></pre> 0040 | 7E DD 37 3E B2 91 C6 2C</code></pre>
<p>Payload (de)serialization:</p> <p>Payload (de)serialization:</p>
<pre><code>dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;</code></pre> <pre><code>dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;</code></pre>
<table class="table"> <table class="table">
@ -817,7 +817,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr> <tr>
<td>message_id</td> <td>message_id</td>
<td>8, 8</td> <td>8, 8</td>
<td><code>016C44580BA93867</code></td> <td><code>01104B019FAB3867</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td> <td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr> </tr>
<tr> <tr>
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr> <tr>
<td>nonce</td> <td>nonce</td>
<td>24, 16</td> <td>24, 16</td>
<td><code>88A00CB2642E0DCCD6BD553F424330B4</code></td> <td><code>E8FFD070C6560FC191A6695CBB3D696B</code></td>
<td>Value generated by client in Step 1</td> <td>Value generated by client in Step 1</td>
</tr> </tr>
<tr> <tr>
<td>server_nonce</td> <td>server_nonce</td>
<td>40, 16</td> <td>40, 16</td>
<td><code>8A33808D1D5BAEE27E2D084DAB67CED0</code></td> <td><code>50520736D6056F36F7B5AE8238C46193</code></td>
<td>Value received from server in Step 2</td> <td>Value received from server in Step 2</td>
</tr> </tr>
<tr> <tr>
<td>new_nonce_hash1</td> <td>new_nonce_hash1</td>
<td>56, 16</td> <td>56, 16</td>
<td><code>EC442B710B937F951F3F2D57D0B3382E</code></td> <td><code>04DEFD1F17F36FCE7EDD373EB291C62C</code></td>
<td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td> <td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td>
</tr> </tr>
</tbody> </tbody>

View file

@ -308,11 +308,11 @@
</tr> </tr>
<tr> <tr>
<td><a href="/constructor/channelAdminLogEventActionToggleSignatureProfiles">channelAdminLogEventActionToggleSignatureProfiles</a></td> <td><a href="/constructor/channelAdminLogEventActionToggleSignatureProfiles">channelAdminLogEventActionToggleSignatureProfiles</a></td>
<td> </td> <td>Channel signature profiles were enabled/disabled.</td>
</tr> </tr>
<tr> <tr>
<td><a href="/constructor/channelAdminLogEventActionParticipantSubExtend">channelAdminLogEventActionParticipantSubExtend</a></td> <td><a href="/constructor/channelAdminLogEventActionParticipantSubExtend">channelAdminLogEventActionParticipantSubExtend</a></td>
<td> </td> <td>A paid subscriber has extended their <a href="/api/stars#star-subscriptions">Telegram Star subscription »</a>.</td>
</tr> </tr>
</tbody> </tbody>
</table></div> </table></div>