Update content of files

This commit is contained in:
GitHub Action 2024-07-17 17:37:42 +00:00
parent 712cd49882
commit 66a9c7e911
14 changed files with 407 additions and 446 deletions

View file

@ -52,11 +52,11 @@
<li>Added <a href="/method/messages.editFactCheck">messages.editFactCheck</a> - Edit/create a <a href="/api/factcheck">fact-check</a> on a message.</li>
<li>Added <a href="/method/messages.deleteFactCheck">messages.deleteFactCheck</a> - Delete a <a href="/api/factcheck">fact-check</a> from a message.</li>
<li>Added <a href="/method/messages.getFactCheck">messages.getFactCheck</a> - </li>
<li>Added <a href="/method/payments.getStarsTopupOptions">payments.getStarsTopupOptions</a> - </li>
<li>Added <a href="/method/payments.getStarsStatus">payments.getStarsStatus</a> - </li>
<li>Added <a href="/method/payments.getStarsTransactions">payments.getStarsTransactions</a> - </li>
<li>Added <a href="/method/payments.sendStarsForm">payments.sendStarsForm</a> - </li>
<li>Added <a href="/method/payments.refundStarsCharge">payments.refundStarsCharge</a> - </li>
<li>Added <a href="/method/payments.getStarsTopupOptions">payments.getStarsTopupOptions</a> - Obtain a list of <a href="/api/stars#buying-stars">Telegram Stars topup options »</a> as <a href="/constructor/starsTopupOption">starsTopupOption</a> constructors.</li>
<li>Added <a href="/method/payments.getStarsStatus">payments.getStarsStatus</a> - Get the current <a href="/api/stars">Telegram Stars balance</a> of the current account (with peer=<a href="/constructor/inputPeerSelf">inputPeerSelf</a>), or the stars balance of the bot specified in <code>peer</code>.</li>
<li>Added <a href="/method/payments.getStarsTransactions">payments.getStarsTransactions</a> - Fetch <a href="/api/stars#balance-and-transaction-history">Telegram Stars transactions</a>.</li>
<li>Added <a href="/method/payments.sendStarsForm">payments.sendStarsForm</a> - Make a payment using <a href="/api/stars#using-stars">Telegram Stars, see here »</a> for more info.</li>
<li>Added <a href="/method/payments.refundStarsCharge">payments.refundStarsCharge</a> - Refund a <a href="/api/stars">Telegram Stars</a> transaction, see <a href="/api/payments#6-refunds">here »</a> for more info.</li>
</ul>
<h5><a class="anchor" href="#new-constructors" id="new-constructors" name="new-constructors"><i class="anchor-icon"></i></a>New Constructors</h5>
<ul>
@ -72,7 +72,7 @@
<li>Added <a href="/constructor/inputInvoiceStars">inputInvoiceStars</a> - Used to top up the current account's <a href="/api/stars">Telegram Stars</a> balance.</li>
<li>Added <a href="/constructor/starsTransaction">starsTransaction</a> - Represents a <a href="/api/stars">Telegram Stars transaction »</a>.</li>
<li>Added <a href="/constructor/payments.starsStatus">payments.starsStatus</a> - Info about the current <a href="/api/stars#balance-and-transaction-history">Telegram Star balance and transaction history »</a>.</li>
<li>Added <a href="/constructor/updateStarsBalance">updateStarsBalance</a> - </li>
<li>Added <a href="/constructor/updateStarsBalance">updateStarsBalance</a> - The current account's <a href="/api/stars">Telegram Stars balance »</a> has changed.</li>
<li>Added <a href="/constructor/payments.paymentFormStars">payments.paymentFormStars</a> - </li>
<li>Added <a href="/constructor/payments.paymentReceiptStars">payments.paymentReceiptStars</a> - </li>
</ul>
@ -573,7 +573,7 @@
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
<ul>
<li>Added <a href="/method/messages.getOutboxReadDate">messages.getOutboxReadDate</a> - </li>
<li>Added <a href="/method/users.getIsPremiumRequiredToContact">users.getIsPremiumRequiredToContact</a> - Check whether we can write to the specified user (non-<a href="/api/premium">Premium</a> users only).</li>
<li>Added <a href="/method/users.getIsPremiumRequiredToContact">users.getIsPremiumRequiredToContact</a> - Check whether we can write to the specified user (non-<a href="/api/premium">Premium</a> users only), see <a href="/api/privacy#require-premium-for-new-non-contact-users">here »</a> for more info on the full flow.</li>
<li>Added <a href="/method/channels.setBoostsToUnblockRestrictions">channels.setBoostsToUnblockRestrictions</a> - Admins with <a href="/constructor/chatAdminRights">ban_users admin rights »</a> may allow users that apply a certain number of <a href="/api/boost">booosts »</a> to the group to bypass <a href="/method/channels.toggleSlowMode">slow mode »</a> and <a href="/api/rights#default-rights">other »</a> supergroup restrictions, see <a href="/api/boost#bypass-slowmode-and-chat-restrictions">here »</a> for more info.</li>
<li>Added <a href="/method/channels.setEmojiStickers">channels.setEmojiStickers</a> - Set a <a href="/api/custom-emoji">custom emoji stickerset</a> for supergroups. Only usable after reaching at least the <a href="/api/boost">boost level »</a> specified in the <a href="/api/config#group-emoji-stickers-level-min"><code>group_emoji_stickers_level_min</code> »</a> config parameter.</li>
</ul>

View file

@ -110,11 +110,7 @@
<h4><a class="anchor" href="#userfull" id="userfull" name="userfull"><i class="anchor-icon"></i></a><a href="/constructor/userFull">userFull</a></h4>
<p>Extended user info</p>
<h4><a class="anchor" href="#usersgetispremiumrequiredtocontact" id="usersgetispremiumrequiredtocontact" name="usersgetispremiumrequiredtocontact"><i class="anchor-icon"></i></a><a href="/method/users.getIsPremiumRequiredToContact">users.getIsPremiumRequiredToContact</a></h4>
<p>Check whether we can write to the specified user (non-<a href="/api/premium">Premium</a> users only).</p>
<p>If a user enables their <strong>new_noncontact_peers_require_premium</strong> <a href="/api/privacy#global-privacy-settings">global privacy setting</a>, represented in <a href="/constructor/userFull">userFull</a>.<code>contact_require_premium</code>, only users that have a premium account, are in our contact list, or already have a private chat with them can write to them in private.</p>
<p>To easily check whether we can write to a user with this flag enabled, if we haven't yet cached all the required information (for example we don't have the <a href="/constructor/userFull">userFull</a> or history of all users while displaying the chat list in the sharing UI) this method may be invoked, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user.</p>
<p>This list may then be used, for example, to display a lock near the avatar of each user that we cannot write to, with an appropriate tooltip to purchase a <a href="/api/premium">Premium</a> subscription.</p>
<p>Note that this method should <strong>only</strong> be invoked if we don't have a <a href="/api/premium">Premium</a> subscription, only for users whose full info (<a href="/constructor/userFull">userFull</a> + message history information) is not cached yet, as the same info can be computed locally if all the mentioned information is available, and updated automatically using the usual <a href="/api/updates">updates</a>.</p>
<p>Check whether we can write to the specified user (non-<a href="/api/premium">Premium</a> users only), see <a href="/api/privacy#require-premium-for-new-non-contact-users">here »</a> for more info on the full flow.</p>
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p></div>

View file

@ -102,6 +102,7 @@
<p><a href="/type/payments.StarsStatus">payments.StarsStatus</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="#paymentsgetstarstransactions" id="paymentsgetstarstransactions" name="paymentsgetstarstransactions"><i class="anchor-icon"></i></a><a href="/method/payments.getStarsTransactions">payments.getStarsTransactions</a></h4>
<p>Fetch <a href="/api/stars#balance-and-transaction-history">Telegram Stars transactions</a>.</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>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by <a href="https://telegram.org/blog/telegram-stars">Telegram bots</a> or <a href="https://telegram.org/blog/mini-app-bar-paid-media-and-more#pay-for-content-with-telegram-stars">Telegram channels</a>.</p></div>

View file

@ -4,28 +4,10 @@
<meta charset="utf-8">
<title>updateSmsJob</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A new SMS job was received
Parameters
Name
Type
Description
job_id
string
SMS job ID
Type
Update">
<meta property="description" content="A new SMS job was received">
<meta property="og:title" content="updateSmsJob">
<meta property="og:image" content="">
<meta property="og:description" content="A new SMS job was received
Parameters
Name
Type
Description
job_id
string
SMS job ID
Type
Update">
<meta property="og:description" content="A new SMS job was received">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">

View file

@ -4,26 +4,10 @@
<meta charset="utf-8">
<title>updateStarsBalance</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="The current account&#39;s Telegram Stars balance » has changed.
Parameters
Name
Type
Description
balance
long
New balance.
Type…">
<meta property="description" content="The current account&#39;s Telegram Stars balance » has changed.">
<meta property="og:title" content="updateStarsBalance">
<meta property="og:image" content="">
<meta property="og:description" content="The current account&#39;s Telegram Stars balance » has changed.
Parameters
Name
Type
Description
balance
long
New balance.
Type…">
<meta property="og:description" content="The current account&#39;s Telegram Stars balance » has changed.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -90,7 +74,10 @@ Type…">
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Update">Update</a></p></div>
<p><a href="/type/Update">Update</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#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 an in-app currency that allows the user to pay for digital goods and services offered by <a href="https://telegram.org/blog/telegram-stars">Telegram bots</a> or <a href="https://telegram.org/blog/mini-app-bar-paid-media-and-more#pay-for-content-with-telegram-stars">Telegram channels</a>.</p></div>
</div>

View file

@ -303,11 +303,7 @@
<h4><a class="anchor" href="#user" id="user" name="user"><i class="anchor-icon"></i></a><a href="/constructor/user">user</a></h4>
<p>Indicates info about a certain user</p>
<h4><a class="anchor" href="#usersgetispremiumrequiredtocontact" id="usersgetispremiumrequiredtocontact" name="usersgetispremiumrequiredtocontact"><i class="anchor-icon"></i></a><a href="/method/users.getIsPremiumRequiredToContact">users.getIsPremiumRequiredToContact</a></h4>
<p>Check whether we can write to the specified user (non-<a href="/api/premium">Premium</a> users only).</p>
<p>If a user enables their <strong>new_noncontact_peers_require_premium</strong> <a href="/api/privacy#global-privacy-settings">global privacy setting</a>, represented in <a href="/constructor/userFull">userFull</a>.<code>contact_require_premium</code>, only users that have a premium account, are in our contact list, or already have a private chat with them can write to them in private.</p>
<p>To easily check whether we can write to a user with this flag enabled, if we haven't yet cached all the required information (for example we don't have the <a href="/constructor/userFull">userFull</a> or history of all users while displaying the chat list in the sharing UI) this method may be invoked, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user.</p>
<p>This list may then be used, for example, to display a lock near the avatar of each user that we cannot write to, with an appropriate tooltip to purchase a <a href="/api/premium">Premium</a> subscription.</p>
<p>Note that this method should <strong>only</strong> be invoked if we don't have a <a href="/api/premium">Premium</a> subscription, only for users whose full info (<a href="/constructor/userFull">userFull</a> + message history information) is not cached yet, as the same info can be computed locally if all the mentioned information is available, and updated automatically using the usual <a href="/api/updates">updates</a>.</p>
<p>Check whether we can write to the specified user (non-<a href="/api/premium">Premium</a> users only), see <a href="/api/privacy#require-premium-for-new-non-contact-users">here »</a> for more info on the full flow.</p>
<h4><a class="anchor" href="#accountsetglobalprivacysettings" id="accountsetglobalprivacysettings" name="accountsetglobalprivacysettings"><i class="anchor-icon"></i></a><a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a></h4>
<p>Set global privacy settings</p>
<h4><a class="anchor" href="#messagesgetoutboxreaddate" id="messagesgetoutboxreaddate" name="messagesgetoutboxreaddate"><i class="anchor-icon"></i></a><a href="/method/messages.getOutboxReadDate">messages.getOutboxReadDate</a></h4>

View file

@ -4,36 +4,10 @@
<meta charset="utf-8">
<title>payments.getStarsStatus</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
peer
InputPeer
 
Result
payments.StarsStatus
Possible errors
Code
Type
Description
400…">
<meta property="description" content="Get the current Telegram Stars balance of the current account (with peer=inputPeerSelf), or the stars balance of the bot specified in peer.">
<meta property="og:title" content="payments.getStarsStatus">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
peer
InputPeer
 
Result
payments.StarsStatus
Possible errors
Code
Type
Description
400…">
<meta property="og:description" content="Get the current Telegram Stars balance of the current account (with peer=inputPeerSelf), or the stars balance of the bot specified in peer.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -68,7 +42,8 @@ Description
<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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/payments.getStarsStatus" >payments.getStarsStatus</a></li></ul></div>
<h1 id="dev_page_title">payments.getStarsStatus</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Get the current <a href="/api/stars">Telegram Stars balance</a> of the current account (with peer=<a href="/constructor/inputPeerSelf">inputPeerSelf</a>), or the stars balance of the bot specified in <code>peer</code>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -96,7 +71,7 @@ Description
<tr>
<td><strong>peer</strong></td>
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
<td> </td>
<td>Peer of which to get the balance.</td>
</tr>
</tbody>
</table>
@ -118,7 +93,12 @@ Description
<td>The provided peer id is invalid.</td>
</tr>
</tbody>
</table></div>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#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 an in-app currency that allows the user to pay for digital goods and services offered by <a href="https://telegram.org/blog/telegram-stars">Telegram bots</a> or <a href="https://telegram.org/blog/mini-app-bar-paid-media-and-more#pay-for-content-with-telegram-stars">Telegram channels</a>.</p>
<h4><a class="anchor" href="#inputpeerself" id="inputpeerself" name="inputpeerself"><i class="anchor-icon"></i></a><a href="/constructor/inputPeerSelf">inputPeerSelf</a></h4>
<p>Defines the current user.</p></div>
</div>

View file

@ -4,16 +4,10 @@
<meta charset="utf-8">
<title>payments.getStarsTopupOptions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
This constructor does not require any parameters.
Result
Vector&lt;StarsTopupOption&gt;">
<meta property="description" content="Obtain a list of Telegram Stars topup options » as starsTopupOption constructors.">
<meta property="og:title" content="payments.getStarsTopupOptions">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
This constructor does not require any parameters.
Result
Vector&lt;StarsTopupOption&gt;">
<meta property="og:description" content="Obtain a list of Telegram Stars topup options » as starsTopupOption constructors.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -48,7 +42,8 @@ Vector&lt;StarsTopupOption&gt;">
<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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/payments.getStarsTopupOptions" >payments.getStarsTopupOptions</a></li></ul></div>
<h1 id="dev_page_title">payments.getStarsTopupOptions</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Obtain a list of <a href="/api/stars#buying-stars">Telegram Stars topup options »</a> as <a href="/constructor/starsTopupOption">starsTopupOption</a> constructors.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -65,7 +60,12 @@ Vector&lt;StarsTopupOption&gt;">
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
<p><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/StarsTopupOption">StarsTopupOption</a>&gt;</p></div>
<p><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/StarsTopupOption">StarsTopupOption</a>&gt;</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 an in-app currency that allows the user to pay for digital goods and services offered by <a href="https://telegram.org/blog/telegram-stars">Telegram bots</a> or <a href="https://telegram.org/blog/mini-app-bar-paid-media-and-more#pay-for-content-with-telegram-stars">Telegram channels</a>.</p>
<h4><a class="anchor" href="#starstopupoption" id="starstopupoption" name="starstopupoption"><i class="anchor-icon"></i></a><a href="/constructor/starsTopupOption">starsTopupOption</a></h4>
<p><a href="/api/stars">Telegram Stars topup option</a>.</p></div>
</div>

View file

@ -4,32 +4,10 @@
<meta charset="utf-8">
<title>payments.getStarsTransactions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
inbound
flags.0?true
 
outbound
flags.1?true…">
<meta property="description" content="Fetch Telegram Stars transactions.">
<meta property="og:title" content="payments.getStarsTransactions">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
inbound
flags.0?true
 
outbound
flags.1?true…">
<meta property="og:description" content="Fetch Telegram Stars transactions.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -64,7 +42,8 @@ flags.1?true…">
<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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/payments.getStarsTransactions" >payments.getStarsTransactions</a></li></ul></div>
<h1 id="dev_page_title">payments.getStarsTransactions</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Fetch <a href="/api/stars#balance-and-transaction-history">Telegram Stars transactions</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -107,12 +86,12 @@ flags.1?true…">
<tr>
<td><strong>peer</strong></td>
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
<td> </td>
<td>Fetch the transaction history of the peer (<a href="/constructor/inputPeerSelf">inputPeerSelf</a> or a bot we own).</td>
</tr>
<tr>
<td><strong>offset</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td> </td>
<td><a href="/api/offsets">Offset for pagination, obtained from the returned <code>next_offset</code>, initially an empty string »</a>.</td>
</tr>
</tbody>
</table>
@ -135,7 +114,14 @@ flags.1?true…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div>
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
<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="#inputpeerself" id="inputpeerself" name="inputpeerself"><i class="anchor-icon"></i></a><a href="/constructor/inputPeerSelf">inputPeerSelf</a></h4>
<p>Defines the current user.</p>
<h4><a class="anchor" href="#pagination-in-the-api" id="pagination-in-the-api" name="pagination-in-the-api"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination in the API</a></h4>
<p>How to fetch results from large lists of objects.</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>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by <a href="https://telegram.org/blog/telegram-stars">Telegram bots</a> or <a href="https://telegram.org/blog/mini-app-bar-paid-media-and-more#pay-for-content-with-telegram-stars">Telegram channels</a>.</p></div>
</div>

View file

@ -4,36 +4,10 @@
<meta charset="utf-8">
<title>payments.sendStarsForm</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
form_id
long
 
invoice
InputInvoice
 
Result…">
<meta property="description" content="Make a payment using Telegram Stars, see here » for more info.">
<meta property="og:title" content="payments.sendStarsForm">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
form_id
long
 
invoice
InputInvoice
 
Result…">
<meta property="og:description" content="Make a payment using Telegram Stars, see here » for more info.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -68,7 +42,8 @@ Result…">
<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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/payments.sendStarsForm" >payments.sendStarsForm</a></li></ul></div>
<h1 id="dev_page_title">payments.sendStarsForm</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Make a payment using <a href="/api/stars#using-stars">Telegram Stars, see here »</a> for more info.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -102,12 +77,12 @@ Result…">
<tr>
<td><strong>form_id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td> </td>
<td>Payment form ID</td>
</tr>
<tr>
<td><strong>invoice</strong></td>
<td style="text-align: center;"><a href="/type/InputInvoice">InputInvoice</a></td>
<td> </td>
<td>Invoice</td>
</tr>
</tbody>
</table>
@ -129,7 +104,10 @@ Result…">
<td>The provided peer id is invalid.</td>
</tr>
</tbody>
</table></div>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#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 an in-app currency that allows the user to pay for digital goods and services offered by <a href="https://telegram.org/blog/telegram-stars">Telegram bots</a> or <a href="https://telegram.org/blog/mini-app-bar-paid-media-and-more#pay-for-content-with-telegram-stars">Telegram channels</a>.</p></div>
</div>

View file

@ -513,6 +513,37 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-telegram-business-chat-links" id="working-with-telegram-business-chat-links" name="working-with-telegram-business-chat-links"><i class="anchor-icon"></i></a>Working with <a href="/api/business#business-chat-links">Telegram Business chat links</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/account.createBusinessChatLink">account.createBusinessChatLink</a></td>
<td>Create a <a href="/api/business#business-chat-links">business chat deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.editBusinessChatLink">account.editBusinessChatLink</a></td>
<td>Edit a created <a href="/api/business#business-chat-links">business chat deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.deleteBusinessChatLink">account.deleteBusinessChatLink</a></td>
<td>Delete a <a href="/api/business#business-chat-links">business chat deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.getBusinessChatLinks">account.getBusinessChatLinks</a></td>
<td>List all created <a href="/api/business#business-chat-links">business chat deep links »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.resolveBusinessChatLink">account.resolveBusinessChatLink</a></td>
<td>Resolve a <a href="/api/business#business-chat-links">business chat deep link »</a>.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-telegram-business-connected-bots-" id="working-with-telegram-business-connected-bots-" name="working-with-telegram-business-connected-bots-"><i class="anchor-icon"></i></a>Working with <a href="/api/business#connected-bots">Telegram Business connected bots »</a></h3>
<table class="table">
<thead>
@ -535,6 +566,10 @@ Look for updates of telegram&#39;s terms of service…">
<td>Pause or unpause a specific chat, temporarily disconnecting it from all <a href="/api/business#connected-bots">business bots »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.disablePeerConnectedBot">account.disablePeerConnectedBot</a></td>
<td>Permanently disconnect a specific chat from all <a href="/api/business#connected-bots">business bots »</a> (equivalent to specifying it in <code>recipients.exclude_users</code> during initial configuration with <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>.</td>
</tr>
<tr>
<td><a href="/method/invokeWithBusinessConnection">invokeWithBusinessConnection</a></td>
<td>Invoke a method using a <a href="/api/business#connected-bots">Telegram Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor</a>.<br><br>Make sure to always send queries wrapped in a <code>invokeWithBusinessConnection</code> to the datacenter ID, specified in the <code>dc_id</code> field of the <a href="/constructor/botBusinessConnection">botBusinessConnection</a> that is being used.</td>
</tr>
@ -598,6 +633,37 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-telegram-stars" id="working-with-telegram-stars" name="working-with-telegram-stars"><i class="anchor-icon"></i></a>Working with <a href="/api/stars">Telegram Stars</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/payments.getStarsTopupOptions">payments.getStarsTopupOptions</a></td>
<td>Obtain a list of <a href="/api/stars#buying-stars">Telegram Stars topup options »</a> as <a href="/constructor/starsTopupOption">starsTopupOption</a> constructors.</td>
</tr>
<tr>
<td><a href="/method/payments.getStarsStatus">payments.getStarsStatus</a></td>
<td>Get the current <a href="/api/stars">Telegram Stars balance</a> of the current account (with peer=<a href="/constructor/inputPeerSelf">inputPeerSelf</a>), or the stars balance of the bot specified in <code>peer</code>.</td>
</tr>
<tr>
<td><a href="/method/payments.getStarsTransactions">payments.getStarsTransactions</a></td>
<td>Fetch <a href="/api/stars#balance-and-transaction-history">Telegram Stars transactions</a>.</td>
</tr>
<tr>
<td><a href="/method/payments.sendStarsForm">payments.sendStarsForm</a></td>
<td>Make a payment using <a href="/api/stars#using-stars">Telegram Stars, see here »</a> for more info.</td>
</tr>
<tr>
<td><a href="/method/payments.refundStarsCharge">payments.refundStarsCharge</a></td>
<td>Refund a <a href="/api/stars">Telegram Stars</a> transaction, see <a href="/api/payments#6-refunds">here »</a> for more info.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-voip-calls" id="working-with-voip-calls" name="working-with-voip-calls"><i class="anchor-icon"></i></a>Working with <a href="/api/end-to-end/voice-calls">VoIP calls</a></h3>
<table class="table">
<thead>
@ -713,6 +779,10 @@ Look for updates of telegram&#39;s terms of service…">
<td><a href="/method/premium.getUserBoosts">premium.getUserBoosts</a></td>
<td>Returns the lists of boost that were applied to a channel/supergroup by a specific user (admins only)</td>
</tr>
<tr>
<td><a href="/method/channels.setBoostsToUnblockRestrictions">channels.setBoostsToUnblockRestrictions</a></td>
<td>Admins with <a href="/constructor/chatAdminRights">ban_users admin rights »</a> may allow users that apply a certain number of <a href="/api/boost">booosts »</a> to the group to bypass <a href="/method/channels.toggleSlowMode">slow mode »</a> and <a href="/api/rights#default-rights">other »</a> supergroup restrictions, see <a href="/api/boost#bypass-slowmode-and-chat-restrictions">here »</a> for more info.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-channel-recommendations-" id="working-with-channel-recommendations-" name="working-with-channel-recommendations-"><i class="anchor-icon"></i></a>Working with <a href="/api/recommend">channel recommendations »</a></h3>
@ -1209,6 +1279,29 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-fact-checks" id="working-with-fact-checks" name="working-with-fact-checks"><i class="anchor-icon"></i></a>Working with <a href="/api/factcheck">fact-checks</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/messages.editFactCheck">messages.editFactCheck</a></td>
<td>Edit/create a <a href="/api/factcheck">fact-check</a> on a message.<br><br>Can only be used by independent fact-checkers as specified by the <a href="/api/config#can-edit-factcheck">appConfig.can_edit_factcheck</a> configuration flag.</td>
</tr>
<tr>
<td><a href="/method/messages.deleteFactCheck">messages.deleteFactCheck</a></td>
<td>Delete a <a href="/api/factcheck">fact-check</a> from a message.<br><br>Can only be used by independent fact-checkers as specified by the <a href="/api/config#can-edit-factcheck">appConfig.can_edit_factcheck</a> configuration flag.</td>
</tr>
<tr>
<td><a href="/method/messages.getFactCheck">messages.getFactCheck</a></td>
<td> </td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-files" id="working-with-files" name="working-with-files"><i class="anchor-icon"></i></a>Working with <a href="/api/files">files</a></h3>
<table class="table">
<thead>
@ -1419,6 +1512,21 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-message-effects" id="working-with-message-effects" name="working-with-message-effects"><i class="anchor-icon"></i></a>Working with <a href="/api/effects">message effects</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/messages.getAvailableEffects">messages.getAvailableEffects</a></td>
<td>Fetch the full list of usable <a href="/api/effects">animated message effects »</a>.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-message-reactions" id="working-with-message-reactions" name="working-with-message-reactions"><i class="anchor-icon"></i></a>Working with <a href="/api/reactions">message reactions</a></h3>
<table class="table">
<thead>
@ -1872,6 +1980,10 @@ Look for updates of telegram&#39;s terms of service…">
<td>Deletes some posted <a href="/api/stories">stories</a>.</td>
</tr>
<tr>
<td><a href="/method/stories.togglePinnedToTop">stories.togglePinnedToTop</a></td>
<td>Pin some stories to the top of the profile, see <a href="/api/stories#pinned-or-archived-stories">here »</a> for more info.</td>
</tr>
<tr>
<td><a href="/method/stories.togglePinned">stories.togglePinned</a></td>
<td>Pin or unpin one or more stories</td>
</tr>
@ -3126,6 +3238,29 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-the-channel-ad-revenue" id="working-with-the-channel-ad-revenue" name="working-with-the-channel-ad-revenue"><i class="anchor-icon"></i></a>Working with the <a href="/api/revenue">channel ad revenue</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/stats.getBroadcastRevenueStats">stats.getBroadcastRevenueStats</a></td>
<td>Get <a href="/api/revenue">channel ad revenue statistics »</a>.</td>
</tr>
<tr>
<td><a href="/method/stats.getBroadcastRevenueWithdrawalUrl">stats.getBroadcastRevenueWithdrawalUrl</a></td>
<td>Withdraw funds from a channel's <a href="/api/revenue">ad revenue balance »</a>.</td>
</tr>
<tr>
<td><a href="/method/stats.getBroadcastRevenueTransactions">stats.getBroadcastRevenueTransactions</a></td>
<td>Fetch <a href="/api/revenue">channel ad revenue transaction history »</a>.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-the-native-anti-spam-system" id="working-with-the-native-anti-spam-system" name="working-with-the-native-anti-spam-system"><i class="anchor-icon"></i></a>Working with the <a href="/api/antispam">native anti-spam system</a></h3>
<table class="table">
<thead>
@ -3369,10 +3504,6 @@ Look for updates of telegram&#39;s terms of service…">
<td>Check whether we can write to the specified user (non-<a href="/api/premium">Premium</a> users only), see <a href="/api/privacy#require-premium-for-new-non-contact-users">here »</a> for more info on the full flow.</td>
</tr>
<tr>
<td><a href="/method/channels.setBoostsToUnblockRestrictions">channels.setBoostsToUnblockRestrictions</a></td>
<td>Admins with <a href="/constructor/chatAdminRights">ban_users admin rights »</a> may allow users that apply a certain number of <a href="/api/boost">booosts »</a> to the group to bypass <a href="/method/channels.toggleSlowMode">slow mode »</a> and <a href="/api/rights#default-rights">other »</a> supergroup restrictions, see <a href="/api/boost#bypass-slowmode-and-chat-restrictions">here »</a> for more info.</td>
</tr>
<tr>
<td><a href="/method/account.updateBusinessLocation">account.updateBusinessLocation</a></td>
<td><a href="/api/business#location">Businesses »</a> may advertise their location using this method, see <a href="/api/business#location">here »</a> for more info.<br><br>To remove business location information invoke the method without setting any of the parameters.</td>
</tr>
@ -3409,10 +3540,6 @@ Look for updates of telegram&#39;s terms of service…">
<td> </td>
</tr>
<tr>
<td><a href="/method/account.disablePeerConnectedBot">account.disablePeerConnectedBot</a></td>
<td>Permanently disconnect a specific chat from all <a href="/api/business#connected-bots">business bots »</a> (equivalent to specifying it in <code>recipients.exclude_users</code> during initial configuration with <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking <a href="/method/account.updateConnectedBot">account.updateConnectedBot »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.updateBirthday">account.updateBirthday</a></td>
<td>Update our <a href="/api/profile#birthday">birthday, see here »</a> for more info.</td>
</tr>
@ -3421,26 +3548,6 @@ Look for updates of telegram&#39;s terms of service…">
<td>Fetch all users with birthdays that fall within +1/-1 days, relative to the current day: this method should be invoked by clients every 6-8 hours, and if the result is non-empty, it should be used to appropriately update locally cached birthday information in <a href="/constructor/user">user</a>.<code>birthday</code>.<br><br><a href="/api/profile#birthday">See here »</a> for more info.</td>
</tr>
<tr>
<td><a href="/method/account.createBusinessChatLink">account.createBusinessChatLink</a></td>
<td>Create a <a href="/api/business#business-chat-links">business chat deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.editBusinessChatLink">account.editBusinessChatLink</a></td>
<td>Edit a created <a href="/api/business#business-chat-links">business chat deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.deleteBusinessChatLink">account.deleteBusinessChatLink</a></td>
<td>Delete a <a href="/api/business#business-chat-links">business chat deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.getBusinessChatLinks">account.getBusinessChatLinks</a></td>
<td>List all created <a href="/api/business#business-chat-links">business chat deep links »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.resolveBusinessChatLink">account.resolveBusinessChatLink</a></td>
<td>Resolve a <a href="/api/business#business-chat-links">business chat deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/account.updatePersonalChannel">account.updatePersonalChannel</a></td>
<td>Associate (or remove) a personal <a href="/api/channel">channel »</a>, that will be listed on our personal <a href="/api/profile#personal-channel">profile page »</a>.<br><br>Changing it will emit an <a href="/constructor/updateUser">updateUser</a> update.</td>
</tr>
@ -3449,18 +3556,6 @@ Look for updates of telegram&#39;s terms of service…">
<td> </td>
</tr>
<tr>
<td><a href="/method/stats.getBroadcastRevenueStats">stats.getBroadcastRevenueStats</a></td>
<td>Get <a href="/api/revenue">channel ad revenue statistics »</a>.</td>
</tr>
<tr>
<td><a href="/method/stats.getBroadcastRevenueWithdrawalUrl">stats.getBroadcastRevenueWithdrawalUrl</a></td>
<td>Withdraw funds from a channel's <a href="/api/revenue">ad revenue balance »</a>.</td>
</tr>
<tr>
<td><a href="/method/stats.getBroadcastRevenueTransactions">stats.getBroadcastRevenueTransactions</a></td>
<td>Fetch <a href="/api/revenue">channel ad revenue transaction history »</a>.</td>
</tr>
<tr>
<td><a href="/method/channels.restrictSponsoredMessages">channels.restrictSponsoredMessages</a></td>
<td>Disable ads on the specified channel, for all users.<br><br>Available only after reaching at least the <a href="/api/boost">boost level »</a> specified in the <a href="/api/config#channel-restrict-sponsored-level-min"><code>channel_restrict_sponsored_level_min</code> »</a> config parameter.</td>
</tr>
@ -3469,10 +3564,6 @@ Look for updates of telegram&#39;s terms of service…">
<td>Disable or re-enable Telegram ads for the current <a href="/api/premium">Premium</a> account.<br><br>Useful for business owners that may want to launch and view their own Telegram ads via the <a href="https://ads.telegram.org">Telegram ad platform »</a>.</td>
</tr>
<tr>
<td><a href="/method/stories.togglePinnedToTop">stories.togglePinnedToTop</a></td>
<td>Pin some stories to the top of the profile, see <a href="/api/stories#pinned-or-archived-stories">here »</a> for more info.</td>
</tr>
<tr>
<td><a href="/method/auth.reportMissingCode">auth.reportMissingCode</a></td>
<td> </td>
</tr>
@ -3485,45 +3576,9 @@ Look for updates of telegram&#39;s terms of service…">
<td> </td>
</tr>
<tr>
<td><a href="/method/messages.getAvailableEffects">messages.getAvailableEffects</a></td>
<td>Fetch the full list of usable <a href="/api/effects">animated message effects »</a>.</td>
</tr>
<tr>
<td><a href="/method/channels.searchPosts">channels.searchPosts</a></td>
<td>Globally search for posts from public <a href="/api/channel">channels »</a> (<em>including</em> those we aren't a member of) containing a specific hashtag.</td>
</tr>
<tr>
<td><a href="/method/messages.editFactCheck">messages.editFactCheck</a></td>
<td>Edit/create a <a href="/api/factcheck">fact-check</a> on a message.<br><br>Can only be used by independent fact-checkers as specified by the <a href="/api/config#can-edit-factcheck">appConfig.can_edit_factcheck</a> configuration flag.</td>
</tr>
<tr>
<td><a href="/method/messages.deleteFactCheck">messages.deleteFactCheck</a></td>
<td>Delete a <a href="/api/factcheck">fact-check</a> from a message.<br><br>Can only be used by independent fact-checkers as specified by the <a href="/api/config#can-edit-factcheck">appConfig.can_edit_factcheck</a> configuration flag.</td>
</tr>
<tr>
<td><a href="/method/messages.getFactCheck">messages.getFactCheck</a></td>
<td> </td>
</tr>
<tr>
<td><a href="/method/payments.getStarsTopupOptions">payments.getStarsTopupOptions</a></td>
<td>Obtain a list of <a href="/api/stars#buying-stars">Telegram Stars topup options »</a> as <a href="/constructor/starsTopupOption">starsTopupOption</a> constructors.</td>
</tr>
<tr>
<td><a href="/method/payments.getStarsStatus">payments.getStarsStatus</a></td>
<td>Get the current <a href="/api/stars">Telegram Stars balance</a> of the current account (with peer=<a href="/constructor/inputPeerSelf">inputPeerSelf</a>), or the stars balance of the bot specified in <code>peer</code>.</td>
</tr>
<tr>
<td><a href="/method/payments.getStarsTransactions">payments.getStarsTransactions</a></td>
<td>Fetch <a href="/api/stars#balance-and-transaction-history">Telegram Stars transactions</a>.</td>
</tr>
<tr>
<td><a href="/method/payments.sendStarsForm">payments.sendStarsForm</a></td>
<td>Make a payment using <a href="/api/stars#using-stars">Telegram Stars, see here »</a> for more info.</td>
</tr>
<tr>
<td><a href="/method/payments.refundStarsCharge">payments.refundStarsCharge</a></td>
<td>Refund a <a href="/api/stars">Telegram Stars</a> transaction, see <a href="/api/payments#6-refunds">here »</a> for more info.</td>
</tr>
</tbody>
</table></div>

View file

@ -53,9 +53,9 @@
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
<!-- start req_pq_multi -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 78 1B 0B 00 BA FB 97 66
0010 | 14 00 00 00 F1 8E 7E BE 9B DE 3C 06 C0 EF 93 D9
0020 | 72 AF 72 00 A0 EA F5 AB</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 88 57 0E 00 F1 FF 97 66
0010 | 14 00 00 00 F1 8E 7E BE B9 58 7B 31 62 35 59 60
0020 | 8E 08 A7 B2 DD 03 72 43</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
<table class="table">
@ -77,7 +77,7 @@
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>781B0B00BAFB9766</code></td>
<td><code>88570E00F1FF9766</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -95,7 +95,7 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>9BDE3C06C0EF93D972AF7200A0EAF5AB</code></td>
<td><code>B9587B31623559608E08A7B2DD037243</code></td>
<td>Random number</td>
</tr>
</tbody>
@ -104,11 +104,11 @@
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
<!-- start resPQ -->
<p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 10 15 25 BA FB 97 66
0010 | 5C 00 00 00 63 24 16 05 9B DE 3C 06 C0 EF 93 D9
0020 | 72 AF 72 00 A0 EA F5 AB BD 90 9B 93 BE F0 96 1A
0030 | 95 C6 37 5A D6 CF 6E B5 08 29 80 17 E1 62 0E 71
0040 | 83 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 BC 71 74 F1 FF 97 66
0010 | B8 00 00 00 63 24 16 05 B9 58 7B 31 62 35 59 60
0020 | 8E 08 A7 B2 DD 03 72 43 4D 59 F0 77 89 8A A1 E4
0030 | AC C4 5F 5C 77 9B 3C E2 08 1A 80 74 F2 82 62 DB
0040 | C3 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
0050 | 35 5F C3 0B 21 6B E8 6C 02 2B B4 C3 85 FD 64 DE
0060 | 85 1D 9D D0</code></pre>
<p>Payload (de)serialization:</p>
@ -132,13 +132,13 @@
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01101525BAFB9766</code></td>
<td><code>01BC7174F1FF9766</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>5C000000</code> (92 in decimal)</td>
<td><code>B8000000</code> (184 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>9BDE3C06C0EF93D972AF7200A0EAF5AB</code></td>
<td><code>B9587B31623559608E08A7B2DD037243</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>BD909B93BEF0961A95C6375AD6CF6EB5</code></td>
<td><code>4D59F077898AA1E4ACC45F5C779B3CE2</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>08298017E1620E7183000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2990416409354203523</td>
<td><code>081A8074F28262DBC3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1909654826923514819</td>
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
</tr>
<tr>
@ -208,22 +208,22 @@
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p &lt; q.</h5>
<!-- start pq -->
<pre><code>pq = 2990416409354203523</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2990416409354203523 = 1614906899 * 1851757777</code></p>
<pre><code>p = 1614906899
q = 1851757777</code></pre>
<pre><code>pq = 1909654826923514819</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1909654826923514819 = 1039905901 * 1836372719</code></p>
<pre><code>p = 1039905901
q = 1836372719</code></pre>
<!-- end pq -->
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
<!-- start p_q_inner_data_dc -->
<p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 95 5F F5 A9 08 29 80 17 E1 62 0E 71 83 00 00 00
0010 | 04 60 41 86 13 00 00 00 04 6E 5F 94 D1 00 00 00
0020 | 9B DE 3C 06 C0 EF 93 D9 72 AF 72 00 A0 EA F5 AB
0030 | BD 90 9B 93 BE F0 96 1A 95 C6 37 5A D6 CF 6E B5
0040 | 4D 3E 1A 6F 33 4E 05 CB BD 96 87 28 CB 0A 0D 78
0050 | 2D F2 3F 59 F9 2F 34 3F 05 BC 15 A2 EC F1 3F 86
<pre><code>0000 | 95 5F F5 A9 08 1A 80 74 F2 82 62 DB C3 00 00 00
0010 | 04 3D FB B4 6D 00 00 00 04 6D 74 D2 EF 00 00 00
0020 | B9 58 7B 31 62 35 59 60 8E 08 A7 B2 DD 03 72 43
0030 | 4D 59 F0 77 89 8A A1 E4 AC C4 5F 5C 77 9B 3C E2
0040 | CE 39 E5 F8 0B 68 93 8D 85 05 B0 FE 57 EF 9D C2
0050 | 80 2A E9 E8 A3 4E 86 F3 FD 21 2B 94 FE C3 C2 F0
0060 | 02 00 00 00</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>p_q_inner_data_dc#a9f55f95 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data;</code></pre>
@ -246,37 +246,37 @@ q = 1851757777</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>08298017E1620E7183000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2990416409354203523</td>
<td><code>081A8074F28262DBC3000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1909654826923514819</td>
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>p</td>
<td>16, 8</td>
<td><code>0460418613000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1614906899</td>
<td><code>043DFBB46D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1039905901</td>
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>q</td>
<td>24, 8</td>
<td><code>046E5F94D1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1851757777</td>
<td><code>046D74D2EF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1836372719</td>
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>nonce</td>
<td>32, 16</td>
<td><code>9BDE3C06C0EF93D972AF7200A0EAF5AB</code></td>
<td><code>B9587B31623559608E08A7B2DD037243</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>BD909B93BEF0961A95C6375AD6CF6EB5</code></td>
<td><code>4D59F077898AA1E4ACC45F5C779B3CE2</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>4D3E1A6F334E05CBBD968728CB0A0D78</code> <code>2DF23F59F92F343F05BC15A2ECF13F86</code></td>
<td><code>CE39E5F80B68938D8505B0FE57EF9DC2</code> <code>802AE9E8A34E86F3FD212B94FEC3C2F0</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1851757777</code></pre>
<p>The serialization of <em>P_Q_inner_data</em> produces <strong>data</strong>, which is used to generate <strong>encrypted_data</strong> as specified in <a href="/mtproto/auth_key">step 4.1</a>.<br>
These are the inputs to the algorithm specified in <a href="/mtproto/auth_key">step 4.1</a>:</p>
<!-- start p_q_inner_data_input -->
<pre><code>data = 955FF5A908298017E1620E71830000000460418613000000046E5F94D10000009BDE3C06C0EF93D972AF7200A0EAF5ABBD909B93BEF0961A95C6375AD6CF6EB54D3E1A6F334E05CBBD968728CB0A0D782DF23F59F92F343F05BC15A2ECF13F8602000000
random_padding_bytes = 27B8093BC146B3FE1222F8910D5FAA0866D2831ACD45B8C999F2A99548B1E99F041DCBD5DE28FCF848638ACF52A5CA9B2AF049FDBD923F7768AB3B0473CF774B8D9230A3EDA3A93944AC7ED34B3CD15F908120D455D9FE2CB7B103F6</code></pre>
<pre><code>data = 955FF5A9081A8074F28262DBC3000000043DFBB46D000000046D74D2EF000000B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE2CE39E5F80B68938D8505B0FE57EF9DC2802AE9E8A34E86F3FD212B94FEC3C2F002000000
random_padding_bytes = 6E28CF995D08AA2269C0859FFA1A5026C1F3DBA19AA00490EAC2EE52AD8F019056D2DAE75F5542FBD9842BBF322082F507CCF729B096FE42BFFCFA5DC5887D47135B59D2C872E9760C300E49884D577143BB7DA50294E2A9D073DC3E</code></pre>
<!-- end p_q_inner_data_input -->
<p>And this is the output:</p>
<!-- start p_q_inner_data_output -->
<pre><code>encrypted_data = 7179356E012AA6DEEB3C68B44AB1212A369EBAA91FCFD005C39F7D132A211B80658041625047A44296E9E4103C286B9E29377870DEB364F9C741835B6002FF284163782C380F7D8D5424B12030626CA59AE9D59F8B8B6A9FDC6E4F56B25CDFB3E6DD942D9467A252A288D9427A14D176498F8E275050E3D94571BB91805154491A938EC2251CC9DC264216BAD171583C94DE1D666AFE7CBACEC319F60E1307B73311EB870D821CC20613BEDC745145F8EBCF4DC430284A05B9FA1EA8A0700C336C85A74BF87484538F3D5ADF6D534E06893577DB1E8C4F0BB4D2EB4A4404EA5EE27FB86457945F2BF42016BDAEF803411C43C0F06339B90D7D2841B3C5C37412</code></pre>
<pre><code>encrypted_data = 1A258329963F5A8E228B7A868786DB94A655BAA852DE1BDFE7EF49B6858DB1BA2C376A9C5AB1880F68BCF9F4FBAD6B4EA6E0AE20DA67917DD457C7E42250E0E940E8B6241A0F364BD572321DF3E1C179A8230718A93669D8CBD818F947FF41B16BC824DD9D0742C67695C4206A8676734270B2D6CE2C9CA8DCF9C11157568EF20C9CB333BE63882138FAC09E48B750D0AE7C7C8C3992319B648309BAF78981ED0B6F94A8045D2D07DAD1C906CE7276E591BEBFAD98FAEF9AEE0C7267B656418B7EEE52977005806B4E263B599E0D83FB33D1BA0137280377873564AC0137C06EF5689BE7E89E2F005D94B39B8062F15030D076458E18CF327EE44390964346E7</code></pre>
<!-- end p_q_inner_data_output -->
<p>The length of the final string is 256 bytes.</p>
<h5><a class="anchor" href="#5-send-req-dh-params-query-with-generated-encrypted-data" id="5-send-req-dh-params-query-with-generated-encrypted-data" name="5-send-req-dh-params-query-with-generated-encrypted-data"><i class="anchor-icon"></i></a>5) Send req_DH_params query with generated <code>encrypted_data</code></h5>
<!-- start req_DH_params -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 7C 1B 0B 00 BA FB 97 66
0010 | 40 01 00 00 BE E4 12 D7 9B DE 3C 06 C0 EF 93 D9
0020 | 72 AF 72 00 A0 EA F5 AB BD 90 9B 93 BE F0 96 1A
0030 | 95 C6 37 5A D6 CF 6E B5 04 60 41 86 13 00 00 00
0040 | 04 6E 5F 94 D1 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 71 79 35 6E 01 2A A6 DE EB 3C 68 B4
0060 | 4A B1 21 2A 36 9E BA A9 1F CF D0 05 C3 9F 7D 13
0070 | 2A 21 1B 80 65 80 41 62 50 47 A4 42 96 E9 E4 10
0080 | 3C 28 6B 9E 29 37 78 70 DE B3 64 F9 C7 41 83 5B
0090 | 60 02 FF 28 41 63 78 2C 38 0F 7D 8D 54 24 B1 20
00A0 | 30 62 6C A5 9A E9 D5 9F 8B 8B 6A 9F DC 6E 4F 56
00B0 | B2 5C DF B3 E6 DD 94 2D 94 67 A2 52 A2 88 D9 42
00C0 | 7A 14 D1 76 49 8F 8E 27 50 50 E3 D9 45 71 BB 91
00D0 | 80 51 54 49 1A 93 8E C2 25 1C C9 DC 26 42 16 BA
00E0 | D1 71 58 3C 94 DE 1D 66 6A FE 7C BA CE C3 19 F6
00F0 | 0E 13 07 B7 33 11 EB 87 0D 82 1C C2 06 13 BE DC
0100 | 74 51 45 F8 EB CF 4D C4 30 28 4A 05 B9 FA 1E A8
0110 | A0 70 0C 33 6C 85 A7 4B F8 74 84 53 8F 3D 5A DF
0120 | 6D 53 4E 06 89 35 77 DB 1E 8C 4F 0B B4 D2 EB 4A
0130 | 44 04 EA 5E E2 7F B8 64 57 94 5F 2B F4 20 16 BD
0140 | AE F8 03 41 1C 43 C0 F0 63 39 B9 0D 7D 28 41 B3
0150 | C5 C3 74 12</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 8C 57 0E 00 F1 FF 97 66
0010 | 40 01 00 00 BE E4 12 D7 B9 58 7B 31 62 35 59 60
0020 | 8E 08 A7 B2 DD 03 72 43 4D 59 F0 77 89 8A A1 E4
0030 | AC C4 5F 5C 77 9B 3C E2 04 3D FB B4 6D 00 00 00
0040 | 04 6D 74 D2 EF 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 1A 25 83 29 96 3F 5A 8E 22 8B 7A 86
0060 | 87 86 DB 94 A6 55 BA A8 52 DE 1B DF E7 EF 49 B6
0070 | 85 8D B1 BA 2C 37 6A 9C 5A B1 88 0F 68 BC F9 F4
0080 | FB AD 6B 4E A6 E0 AE 20 DA 67 91 7D D4 57 C7 E4
0090 | 22 50 E0 E9 40 E8 B6 24 1A 0F 36 4B D5 72 32 1D
00A0 | F3 E1 C1 79 A8 23 07 18 A9 36 69 D8 CB D8 18 F9
00B0 | 47 FF 41 B1 6B C8 24 DD 9D 07 42 C6 76 95 C4 20
00C0 | 6A 86 76 73 42 70 B2 D6 CE 2C 9C A8 DC F9 C1 11
00D0 | 57 56 8E F2 0C 9C B3 33 BE 63 88 21 38 FA C0 9E
00E0 | 48 B7 50 D0 AE 7C 7C 8C 39 92 31 9B 64 83 09 BA
00F0 | F7 89 81 ED 0B 6F 94 A8 04 5D 2D 07 DA D1 C9 06
0100 | CE 72 76 E5 91 BE BF AD 98 FA EF 9A EE 0C 72 67
0110 | B6 56 41 8B 7E EE 52 97 70 05 80 6B 4E 26 3B 59
0120 | 9E 0D 83 FB 33 D1 BA 01 37 28 03 77 87 35 64 AC
0130 | 01 37 C0 6E F5 68 9B E7 E8 9E 2F 00 5D 94 B3 9B
0140 | 80 62 F1 50 30 D0 76 45 8E 18 CF 32 7E E4 43 90
0150 | 96 43 46 E7</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;</code></pre>
<table class="table">
@ -345,7 +345,7 @@ random_padding_bytes = 27B8093BC146B3FE1222F8910D5FAA0866D2831ACD45B8C999F2A9954
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>7C1B0B00BAFB9766</code></td>
<td><code>8C570E00F1FF9766</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -363,25 +363,25 @@ random_padding_bytes = 27B8093BC146B3FE1222F8910D5FAA0866D2831ACD45B8C999F2A9954
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>9BDE3C06C0EF93D972AF7200A0EAF5AB</code></td>
<td><code>B9587B31623559608E08A7B2DD037243</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>BD909B93BEF0961A95C6375AD6CF6EB5</code></td>
<td><code>4D59F077898AA1E4ACC45F5C779B3CE2</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>0460418613000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1614906899</td>
<td><code>043DFBB46D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1039905901</td>
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>q</td>
<td>64, 8</td>
<td><code>046E5F94D1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1851757777</td>
<td><code>046D74D2EF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1836372719</td>
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
@ -393,7 +393,7 @@ random_padding_bytes = 27B8093BC146B3FE1222F8910D5FAA0866D2831ACD45B8C999F2A9954
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001007179356E012AA6DEEB3C68B4</code> <code>4AB1212A369EBAA91FCFD005C39F7D13</code> <code>2A211B80658041625047A44296E9E410</code> <code>3C286B9E29377870DEB364F9C741835B</code> <code>6002FF284163782C380F7D8D5424B120</code> <code>30626CA59AE9D59F8B8B6A9FDC6E4F56</code> <code>B25CDFB3E6DD942D9467A252A288D942</code> <code>7A14D176498F8E275050E3D94571BB91</code> <code>805154491A938EC2251CC9DC264216BA</code> <code>D171583C94DE1D666AFE7CBACEC319F6</code> <code>0E1307B73311EB870D821CC20613BEDC</code> <code>745145F8EBCF4DC430284A05B9FA1EA8</code> <code>A0700C336C85A74BF87484538F3D5ADF</code> <code>6D534E06893577DB1E8C4F0BB4D2EB4A</code> <code>4404EA5EE27FB86457945F2BF42016BD</code> <code>AEF803411C43C0F06339B90D7D2841B3</code><br> <code>C5C37412</code></td>
<td><code>FE0001001A258329963F5A8E228B7A86</code> <code>8786DB94A655BAA852DE1BDFE7EF49B6</code> <code>858DB1BA2C376A9C5AB1880F68BCF9F4</code> <code>FBAD6B4EA6E0AE20DA67917DD457C7E4</code> <code>2250E0E940E8B6241A0F364BD572321D</code> <code>F3E1C179A8230718A93669D8CBD818F9</code> <code>47FF41B16BC824DD9D0742C67695C420</code> <code>6A8676734270B2D6CE2C9CA8DCF9C111</code> <code>57568EF20C9CB333BE63882138FAC09E</code> <code>48B750D0AE7C7C8C3992319B648309BA</code> <code>F78981ED0B6F94A8045D2D07DAD1C906</code> <code>CE7276E591BEBFAD98FAEF9AEE0C7267</code> <code>B656418B7EEE52977005806B4E263B59</code> <code>9E0D83FB33D1BA0137280377873564AC</code> <code>0137C06EF5689BE7E89E2F005D94B39B</code> <code>8062F15030D076458E18CF327EE44390</code><br> <code>964346E7</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 27B8093BC146B3FE1222F8910D5FAA0866D2831ACD45B8C999F2A9954
<h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5>
<!-- start server_DH_params_ok -->
<p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 74 0A 03 BB FB 97 66
0010 | 78 02 00 00 5C 07 E8 D0 9B DE 3C 06 C0 EF 93 D9
0020 | 72 AF 72 00 A0 EA F5 AB BD 90 9B 93 BE F0 96 1A
0030 | 95 C6 37 5A D6 CF 6E B5 FE 50 02 00 49 39 5C 7C
0040 | 04 76 90 5C 52 1F 55 EE A8 F1 42 52 EB 0F EF 60
0050 | 81 03 27 62 A6 AE 3C 78 59 7C C7 65 76 37 18 89
0060 | E6 F1 01 6D 6F 3B 84 F8 DA 15 30 A0 55 9A E7 02
0070 | 6D 49 B0 2A 03 20 31 96 D7 75 5D 47 B0 C5 7F 10
0080 | A5 B3 C9 64 E6 3E E6 1E 4B A6 BD 39 B8 82 57 59
0090 | DC 9A 29 F9 B2 A7 06 EC E7 F7 E2 4F 97 B6 C7 1B
00A0 | 0F 0A 1E 02 04 2E 96 34 7E AE 13 2A 20 36 F4 98
00B0 | D0 5D 9E 75 2A 50 B0 5E 35 94 BF 57 B8 8D 9F 48
00C0 | 8F 3B 64 93 B6 7E 95 90 20 1A 78 7E 37 3E C4 4D
00D0 | 10 B1 E9 23 69 D0 16 C9 22 E1 26 3C 43 FF F3 15
00E0 | 3C 47 E7 96 26 A1 4C 29 24 6A D9 78 B6 51 F2 9C
00F0 | 5E B5 5F 63 97 7A 65 95 E4 5F 85 69 E1 5C D9 28
0100 | A9 99 B2 A5 D2 3C 75 EC 5A 16 72 64 9C 5E CE 38
0110 | 8F C3 9F EF B4 E9 C2 BD 0F FA CC 9A C6 D8 4D B4
0120 | 29 AA 8B 8C 8E 18 AD F6 9E 25 12 BF 10 91 1A 9A
0130 | A0 57 7F DA 9B 3B E2 06 3C B6 DF CB 58 43 53 6B
0140 | 34 B3 CC C7 CB 61 47 4A 26 AE 0D 25 E4 F5 32 48
0150 | D8 78 A9 CF 48 7E 66 3D C3 B2 27 30 9E 44 82 15
0160 | F4 39 BC AC D3 96 A0 1B D6 E6 94 24 A2 DA 9B 33
0170 | C4 B6 9C 70 7C 5B 0A BA 87 9E 76 D7 A7 7F 9A CC
0180 | 5A 0B 9E 54 EE 6D E0 5B F2 B9 C2 14 4D AF E1 87
0190 | B7 7D AE C4 9E 0E 32 A9 17 C5 C4 CF A8 59 12 63
01A0 | 97 D7 2E 35 3E 1E CD 42 C4 3C BB F4 2C E0 31 8A
01B0 | 89 63 37 1F 01 DB 00 B6 23 7A 4D FB D8 07 CE BD
01C0 | F0 5A A5 D1 CD 01 85 78 FE EE 49 C9 E1 45 E6 A2
01D0 | 77 04 99 88 A1 AD 29 C4 85 52 2B 83 E9 A2 0F BA
01E0 | D7 8F 92 97 51 62 6C 76 20 5B CA 0E 95 18 78 0D
01F0 | E8 76 9D 29 F9 68 9A D9 8D 6C B0 EA 0D 58 E2 D1
0200 | CB E6 D5 DD 23 1E 16 51 9A EA EF 1B B9 10 C0 1A
0210 | FA 56 CE 8E 09 00 33 A7 08 50 E8 7D D7 53 3E 1C
0220 | CD 33 F7 B0 08 2A 95 E2 24 0D E2 DC 0E E5 60 22
0230 | 51 EA 44 30 80 0C 7B C8 6C 27 45 53 65 94 B8 24
0240 | 1F FE DB B0 A0 BB 7F 9A 3E 09 33 ED 87 38 B7 77
0250 | 14 72 1C AC CB 47 1A 83 0F 03 54 0E 7D 1C A7 B2
0260 | 9E 36 F0 88 A5 91 F6 81 BD 60 0F 67 4D AD 50 64
0270 | 10 4C 25 05 14 37 4C FB 12 46 29 ED 1D 9B 41 B6
0280 | B6 50 6B C1 32 69 5E FA E3 E8 AA 25</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 F8 30 4B F2 FF 97 66
0010 | E0 02 00 00 5C 07 E8 D0 B9 58 7B 31 62 35 59 60
0020 | 8E 08 A7 B2 DD 03 72 43 4D 59 F0 77 89 8A A1 E4
0030 | AC C4 5F 5C 77 9B 3C E2 FE 50 02 00 F1 00 7B 18
0040 | 8B 7C 1D 2E 11 97 B8 03 E2 63 8E 67 64 6D 2E 1B
0050 | 19 71 68 61 5A 15 30 D3 63 50 74 7D 07 B2 6D 4E
0060 | F2 32 B0 59 C7 33 50 2C 95 1D A5 55 CC 4F 70 72
0070 | B0 17 F0 C4 8F 15 65 46 8B 1D 61 2D 54 53 3C 02
0080 | 30 91 6C 18 74 96 A8 20 FD 2B D3 A2 C6 EB 18 F0
0090 | 26 E8 21 71 0A F0 87 FA 81 DA BA 1E CD B3 C8 8C
00A0 | 12 3F 26 1E 50 D5 22 D5 BA F7 95 54 93 D5 01 2E
00B0 | D3 F0 2C 21 FA 86 E8 1F D8 8E 4B EF A2 75 05 97
00C0 | 78 CB 8E 1E 90 D3 E9 56 EC 98 AA 4F 9B 2F 4D 56
00D0 | 6C BA 62 05 63 F3 BC 3B BF 13 7E 9E 5C 85 D6 47
00E0 | 07 ED 49 F6 F7 4D C0 13 0B 40 63 AC 13 FA 95 9A
00F0 | 6C DA 06 40 0E DF 3E 85 18 E4 48 B1 1B F8 E6 69
0100 | 71 89 E9 C5 CD DC E0 4F D7 97 D2 1C 46 2E EB EF
0110 | 06 73 AC CC 0F 7F F8 E9 1E 62 28 AA 84 7B 47 35
0120 | 94 1F 68 52 B2 77 12 2D 20 D4 7C DF 8B B0 A1 93
0130 | D4 DB C2 59 28 7A C1 3B 32 2D 90 D0 E2 49 B6 CA
0140 | 09 14 48 9C 65 FE AE 8C 01 88 1B B4 19 24 8A 8C
0150 | 86 D9 F7 12 3D ED 69 83 F0 D0 9A 54 BC A5 C8 05
0160 | 49 93 D9 E2 BE E2 B6 2C 06 4C 2D EB 22 01 F3 E0
0170 | A4 7E FF 17 2D D8 A8 F6 AD 6F F0 2A F9 99 05 29
0180 | 89 34 20 E0 25 9C CA 43 5F 07 3D DA D5 76 E0 BF
0190 | 56 92 80 56 C9 AE 69 75 3F 3E 83 A5 24 4B E9 A8
01A0 | 17 AA 0D C3 BC E2 D1 3F FC 25 7D C1 9C 46 CB 75
01B0 | 47 9E EB 8D 1A 49 79 2E B7 8E 7F 99 B9 9A 05 92
01C0 | B7 07 9D 34 A9 88 4A D7 F5 21 42 5F AB F2 34 27
01D0 | 4E 12 0F 48 AF 10 E5 0B 88 5D 88 59 16 77 39 B5
01E0 | 8A B5 DA 4C 8D 51 8F C3 81 47 7B D3 61 C3 92 FE
01F0 | 1F C8 E2 97 36 99 96 51 E2 12 2E 15 77 EB AA 57
0200 | D6 4F 29 CF B1 55 90 F5 4F 30 88 06 C3 E6 D7 33
0210 | D1 9E C9 BC EE 50 8F 71 68 EB 56 9F 48 0F 17 13
0220 | B5 B9 19 EC 22 C7 05 77 F1 DE FB E3 7B 77 6D 4F
0230 | 7C 9A EB 4F 69 AC E9 82 CD E6 EC DF BA 01 5A FA
0240 | 9C 8E 3E 84 AC CF 15 62 94 52 50 7F B7 8C 0E 19
0250 | 53 EB BD 86 FF 91 A0 16 7F 7A 90 56 17 AD 75 0C
0260 | 9E D7 E8 07 EF 1D 96 08 B8 DD 51 1B 8A E3 13 7C
0270 | 8B 4C 40 B7 F1 69 4F 79 4B 10 DC E0 21 77 3A 2F
0280 | 62 80 9B B8 ED 68 85 CC F3 63 A9 12</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
<table class="table">
@ -464,13 +464,13 @@ random_padding_bytes = 27B8093BC146B3FE1222F8910D5FAA0866D2831ACD45B8C999F2A9954
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01740A03BBFB9766</code></td>
<td><code>01F8304BF2FF9766</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>78020000</code> (632 in decimal)</td>
<td><code>E0020000</code> (736 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 27B8093BC146B3FE1222F8910D5FAA0866D2831ACD45B8C999F2A9954
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>9BDE3C06C0EF93D972AF7200A0EAF5AB</code></td>
<td><code>B9587B31623559608E08A7B2DD037243</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>BD909B93BEF0961A95C6375AD6CF6EB5</code></td>
<td><code>4D59F077898AA1E4ACC45F5C779B3CE2</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE50020049395C7C0476905C521F55EE</code> <code>A8F14252EB0FEF6081032762A6AE3C78</code> <code>597CC76576371889E6F1016D6F3B84F8</code> <code>DA1530A0559AE7026D49B02A03203196</code> <code>D7755D47B0C57F10A5B3C964E63EE61E</code> <code>4BA6BD39B8825759DC9A29F9B2A706EC</code> <code>E7F7E24F97B6C71B0F0A1E02042E9634</code> <code>7EAE132A2036F498D05D9E752A50B05E</code> <code>3594BF57B88D9F488F3B6493B67E9590</code> <code>201A787E373EC44D10B1E92369D016C9</code> <code>22E1263C43FFF3153C47E79626A14C29</code> <code>246AD978B651F29C5EB55F63977A6595</code> <code>E45F8569E15CD928A999B2A5D23C75EC</code> <code>5A1672649C5ECE388FC39FEFB4E9C2BD</code> <code>0FFACC9AC6D84DB429AA8B8C8E18ADF6</code> <code>9E2512BF10911A9AA0577FDA9B3BE206</code> <code>3CB6DFCB5843536B34B3CCC7CB61474A</code> <code>26AE0D25E4F53248D878A9CF487E663D</code> <code>C3B227309E448215F439BCACD396A01B</code> <code>D6E69424A2DA9B33C4B69C707C5B0ABA</code> <code>879E76D7A77F9ACC5A0B9E54EE6DE05B</code> <code>F2B9C2144DAFE187B77DAEC49E0E32A9</code> <code>17C5C4CFA859126397D72E353E1ECD42</code> <code>C43CBBF42CE0318A8963371F01DB00B6</code> <code>237A4DFBD807CEBDF05AA5D1CD018578</code> <code>FEEE49C9E145E6A277049988A1AD29C4</code> <code>85522B83E9A20FBAD78F929751626C76</code> <code>205BCA0E9518780DE8769D29F9689AD9</code> <code>8D6CB0EA0D58E2D1CBE6D5DD231E1651</code> <code>9AEAEF1BB910C01AFA56CE8E090033A7</code> <code>0850E87DD7533E1CCD33F7B0082A95E2</code> <code>240DE2DC0EE5602251EA4430800C7BC8</code> <code>6C2745536594B8241FFEDBB0A0BB7F9A</code> <code>3E0933ED8738B77714721CACCB471A83</code> <code>0F03540E7D1CA7B29E36F088A591F681</code> <code>BD600F674DAD5064104C250514374CFB</code> <code>124629ED1D9B41B6B6506BC132695EFA</code><br> <code>E3E8AA25</code></td>
<td><code>FE500200F1007B188B7C1D2E1197B803</code> <code>E2638E67646D2E1B197168615A1530D3</code> <code>6350747D07B26D4EF232B059C733502C</code> <code>951DA555CC4F7072B017F0C48F156546</code> <code>8B1D612D54533C0230916C187496A820</code> <code>FD2BD3A2C6EB18F026E821710AF087FA</code> <code>81DABA1ECDB3C88C123F261E50D522D5</code> <code>BAF7955493D5012ED3F02C21FA86E81F</code> <code>D88E4BEFA275059778CB8E1E90D3E956</code> <code>EC98AA4F9B2F4D566CBA620563F3BC3B</code> <code>BF137E9E5C85D64707ED49F6F74DC013</code> <code>0B4063AC13FA959A6CDA06400EDF3E85</code> <code>18E448B11BF8E6697189E9C5CDDCE04F</code> <code>D797D21C462EEBEF0673ACCC0F7FF8E9</code> <code>1E6228AA847B4735941F6852B277122D</code> <code>20D47CDF8BB0A193D4DBC259287AC13B</code> <code>322D90D0E249B6CA0914489C65FEAE8C</code> <code>01881BB419248A8C86D9F7123DED6983</code> <code>F0D09A54BCA5C8054993D9E2BEE2B62C</code> <code>064C2DEB2201F3E0A47EFF172DD8A8F6</code> <code>AD6FF02AF9990529893420E0259CCA43</code> <code>5F073DDAD576E0BF56928056C9AE6975</code> <code>3F3E83A5244BE9A817AA0DC3BCE2D13F</code> <code>FC257DC19C46CB75479EEB8D1A49792E</code> <code>B78E7F99B99A0592B7079D34A9884AD7</code> <code>F521425FABF234274E120F48AF10E50B</code> <code>885D8859167739B58AB5DA4C8D518FC3</code> <code>81477BD361C392FE1FC8E29736999651</code> <code>E2122E1577EBAA57D64F29CFB15590F5</code> <code>4F308806C3E6D733D19EC9BCEE508F71</code> <code>68EB569F480F1713B5B919EC22C70577</code> <code>F1DEFBE37B776D4F7C9AEB4F69ACE982</code> <code>CDE6ECDFBA015AFA9C8E3E84ACCF1562</code> <code>9452507FB78C0E1953EBBD86FF91A016</code> <code>7F7A905617AD750C9ED7E807EF1D9608</code> <code>B8DD511B8AE3137C8B4C40B7F1694F79</code> <code>4B10DCE021773A2F62809BB8ED6885CC</code><br> <code>F363A912</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 27B8093BC146B3FE1222F8910D5FAA0866D2831ACD45B8C999F2A9954
<!-- end server_DH_params_ok -->
<p>Decrypt <code>encrypted_answer</code> using the reverse of the process specified in <a href="/mtproto/auth_key#6-server-responds-with">step 6</a>:</p>
<!-- start server_DH_inner_data_input -->
<pre><code>encrypted_answer = 49395C7C0476905C521F55EEA8F14252EB0FEF6081032762A6AE3C78597CC76576371889E6F1016D6F3B84F8DA1530A0559AE7026D49B02A03203196D7755D47B0C57F10A5B3C964E63EE61E4BA6BD39B8825759DC9A29F9B2A706ECE7F7E24F97B6C71B0F0A1E02042E96347EAE132A2036F498D05D9E752A50B05E3594BF57B88D9F488F3B6493B67E9590201A787E373EC44D10B1E92369D016C922E1263C43FFF3153C47E79626A14C29246AD978B651F29C5EB55F63977A6595E45F8569E15CD928A999B2A5D23C75EC5A1672649C5ECE388FC39FEFB4E9C2BD0FFACC9AC6D84DB429AA8B8C8E18ADF69E2512BF10911A9AA0577FDA9B3BE2063CB6DFCB5843536B34B3CCC7CB61474A26AE0D25E4F53248D878A9CF487E663DC3B227309E448215F439BCACD396A01BD6E69424A2DA9B33C4B69C707C5B0ABA879E76D7A77F9ACC5A0B9E54EE6DE05BF2B9C2144DAFE187B77DAEC49E0E32A917C5C4CFA859126397D72E353E1ECD42C43CBBF42CE0318A8963371F01DB00B6237A4DFBD807CEBDF05AA5D1CD018578FEEE49C9E145E6A277049988A1AD29C485522B83E9A20FBAD78F929751626C76205BCA0E9518780DE8769D29F9689AD98D6CB0EA0D58E2D1CBE6D5DD231E16519AEAEF1BB910C01AFA56CE8E090033A70850E87DD7533E1CCD33F7B0082A95E2240DE2DC0EE5602251EA4430800C7BC86C2745536594B8241FFEDBB0A0BB7F9A3E0933ED8738B77714721CACCB471A830F03540E7D1CA7B29E36F088A591F681BD600F674DAD5064104C250514374CFB124629ED1D9B41B6B6506BC132695EFAE3E8AA25
tmp_aes_key = 402A22230C9BB7E1AAF6E978F76FCF6E641F1B62DBCA2BF60FC95A1BAD45F56C
tmp_aes_iv = C4BAAC5594932970391D732F1FF2A0CCDBB82F8CC63F5D5BB844A9234D3E1A6F</code></pre>
<pre><code>encrypted_answer = F1007B188B7C1D2E1197B803E2638E67646D2E1B197168615A1530D36350747D07B26D4EF232B059C733502C951DA555CC4F7072B017F0C48F1565468B1D612D54533C0230916C187496A820FD2BD3A2C6EB18F026E821710AF087FA81DABA1ECDB3C88C123F261E50D522D5BAF7955493D5012ED3F02C21FA86E81FD88E4BEFA275059778CB8E1E90D3E956EC98AA4F9B2F4D566CBA620563F3BC3BBF137E9E5C85D64707ED49F6F74DC0130B4063AC13FA959A6CDA06400EDF3E8518E448B11BF8E6697189E9C5CDDCE04FD797D21C462EEBEF0673ACCC0F7FF8E91E6228AA847B4735941F6852B277122D20D47CDF8BB0A193D4DBC259287AC13B322D90D0E249B6CA0914489C65FEAE8C01881BB419248A8C86D9F7123DED6983F0D09A54BCA5C8054993D9E2BEE2B62C064C2DEB2201F3E0A47EFF172DD8A8F6AD6FF02AF9990529893420E0259CCA435F073DDAD576E0BF56928056C9AE69753F3E83A5244BE9A817AA0DC3BCE2D13FFC257DC19C46CB75479EEB8D1A49792EB78E7F99B99A0592B7079D34A9884AD7F521425FABF234274E120F48AF10E50B885D8859167739B58AB5DA4C8D518FC381477BD361C392FE1FC8E29736999651E2122E1577EBAA57D64F29CFB15590F54F308806C3E6D733D19EC9BCEE508F7168EB569F480F1713B5B919EC22C70577F1DEFBE37B776D4F7C9AEB4F69ACE982CDE6ECDFBA015AFA9C8E3E84ACCF15629452507FB78C0E1953EBBD86FF91A0167F7A905617AD750C9ED7E807EF1D9608B8DD511B8AE3137C8B4C40B7F1694F794B10DCE021773A2F62809BB8ED6885CCF363A912
tmp_aes_key = 68BAFA98D2EF9596E4A16AC8738160B92728CB85D4675BA6C9FA60E0DADD29DC
tmp_aes_iv = A172B2F171E9FC1B5ECAC2E5CA03D4D575FCB68E3BA103EEEF7E5608CE39E5F8</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = E421EE86B1B2406E293D4250709A03950668500DBA0D89B59BDE3C06C0EF93D972AF7200A0EAF5ABBD909B93BEF0961A95C6375AD6CF6EB503000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007ECBBFA544A985176C847DE6DCF401F2B93FFD3F0224B001CAE4C41894A9C7829B3211AB7DD023D603010F9AD6BE132D508874983BE0CFAEA25746E095A904F2364CE7174C27BDC7D4D4BD177A6AB18620E4F8DAE00C7FFC17B20347872FF59C1066F4D6160AB9C5E3C809948192F61A3828773730D66EBD6EF9DFC09A25F68A1E788904730A93DE2A246D9642717B5482814EC15DFFF639A577B07D5C3C1BAA69B69FC587ABCA463E143440F60B6032B884F4947204B11B33A48BCE2F9E910195D499AF07450CCA3844F8421618AA748E737FD26F775E4438CBDBC6BDFCA972476C8AF1C42418D337B939C2A78BA36D320916114928154140D89513C04D8409BBFB9766550555BFD8381C31
answer = BA0D89B59BDE3C06C0EF93D972AF7200A0EAF5ABBD909B93BEF0961A95C6375AD6CF6EB503000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007ECBBFA544A985176C847DE6DCF401F2B93FFD3F0224B001CAE4C41894A9C7829B3211AB7DD023D603010F9AD6BE132D508874983BE0CFAEA25746E095A904F2364CE7174C27BDC7D4D4BD177A6AB18620E4F8DAE00C7FFC17B20347872FF59C1066F4D6160AB9C5E3C809948192F61A3828773730D66EBD6EF9DFC09A25F68A1E788904730A93DE2A246D9642717B5482814EC15DFFF639A577B07D5C3C1BAA69B69FC587ABCA463E143440F60B6032B884F4947204B11B33A48BCE2F9E910195D499AF07450CCA3844F8421618AA748E737FD26F775E4438CBDBC6BDFCA972476C8AF1C42418D337B939C2A78BA36D320916114928154140D89513C04D8409BBFB9766550555BFD8381C31</code></pre>
<pre><code>answer_with_hash = 9B27FD2695A7CE549D38B1B7EDC722315FC3F788BA0D89B5B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001005B57056EC5B18248D9025587ACC41539DA38DEC882C7CE8B33D065D7D4149BC8599AA807F4E2300F780B5BD87A78F3419330F29577E1934A293499938D45812E32F538DFDB13EC07EA4823F8D8DC754073E82F336BABDF7A3F239FA23039B63359DF087C3AE3B1F6716E7251C06EA990F9F39263894BECB66C4BA14DD175D01775EE0C701DAF6455127A91E088C304E34209BE5469AB964BC6887DF017B6913DA48448055ED200C9713349A278F1F216B88CAA2E9B438905938F31036841B36A8B1C61FCE1651951C6606B166AE5BBBE1810B127137CA7C83798DA363ED1A10823951555BBC1ED4B4CB833D622C3274ABD211C1B891C10AF6F213DC029BA9A33F2FF976637A131F833FCBBD4
answer = BA0D89B5B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001005B57056EC5B18248D9025587ACC41539DA38DEC882C7CE8B33D065D7D4149BC8599AA807F4E2300F780B5BD87A78F3419330F29577E1934A293499938D45812E32F538DFDB13EC07EA4823F8D8DC754073E82F336BABDF7A3F239FA23039B63359DF087C3AE3B1F6716E7251C06EA990F9F39263894BECB66C4BA14DD175D01775EE0C701DAF6455127A91E088C304E34209BE5469AB964BC6887DF017B6913DA48448055ED200C9713349A278F1F216B88CAA2E9B438905938F31036841B36A8B1C61FCE1651951C6606B166AE5BBBE1810B127137CA7C83798DA363ED1A10823951555BBC1ED4B4CB833D622C3274ABD211C1B891C10AF6F213DC029BA9A33F2FF976637A131F833FCBBD4</code></pre>
<!-- end server_DH_inner_data_output -->
<!-- start server_DH_inner_data -->
<p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | BA 0D 89 B5 9B DE 3C 06 C0 EF 93 D9 72 AF 72 00
0010 | A0 EA F5 AB BD 90 9B 93 BE F0 96 1A 95 C6 37 5A
0020 | D6 CF 6E B5 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 B9 58 7B 31 62 35 59 60 8E 08 A7 B2
0010 | DD 03 72 43 4D 59 F0 77 89 8A A1 E4 AC C4 5F 5C
0020 | 77 9B 3C E2 03 00 00 00 FE 00 01 00 C7 1C AE B9
0030 | C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23
0040 | 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A
0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E
@ -532,23 +532,23 @@ answer = BA0D89B59BDE3C06C0EF93D972AF7200A0EAF5ABBD909B93BEF0961A95C6375AD6CF6EB
0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6
0110 | 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0
0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
0130 | 7E CB BF A5 44 A9 85 17 6C 84 7D E6 DC F4 01 F2
0140 | B9 3F FD 3F 02 24 B0 01 CA E4 C4 18 94 A9 C7 82
0150 | 9B 32 11 AB 7D D0 23 D6 03 01 0F 9A D6 BE 13 2D
0160 | 50 88 74 98 3B E0 CF AE A2 57 46 E0 95 A9 04 F2
0170 | 36 4C E7 17 4C 27 BD C7 D4 D4 BD 17 7A 6A B1 86
0180 | 20 E4 F8 DA E0 0C 7F FC 17 B2 03 47 87 2F F5 9C
0190 | 10 66 F4 D6 16 0A B9 C5 E3 C8 09 94 81 92 F6 1A
01A0 | 38 28 77 37 30 D6 6E BD 6E F9 DF C0 9A 25 F6 8A
01B0 | 1E 78 89 04 73 0A 93 DE 2A 24 6D 96 42 71 7B 54
01C0 | 82 81 4E C1 5D FF F6 39 A5 77 B0 7D 5C 3C 1B AA
01D0 | 69 B6 9F C5 87 AB CA 46 3E 14 34 40 F6 0B 60 32
01E0 | B8 84 F4 94 72 04 B1 1B 33 A4 8B CE 2F 9E 91 01
01F0 | 95 D4 99 AF 07 45 0C CA 38 44 F8 42 16 18 AA 74
0200 | 8E 73 7F D2 6F 77 5E 44 38 CB DB C6 BD FC A9 72
0210 | 47 6C 8A F1 C4 24 18 D3 37 B9 39 C2 A7 8B A3 6D
0220 | 32 09 16 11 49 28 15 41 40 D8 95 13 C0 4D 84 09
0230 | BB FB 97 66</code></pre>
0130 | 5B 57 05 6E C5 B1 82 48 D9 02 55 87 AC C4 15 39
0140 | DA 38 DE C8 82 C7 CE 8B 33 D0 65 D7 D4 14 9B C8
0150 | 59 9A A8 07 F4 E2 30 0F 78 0B 5B D8 7A 78 F3 41
0160 | 93 30 F2 95 77 E1 93 4A 29 34 99 93 8D 45 81 2E
0170 | 32 F5 38 DF DB 13 EC 07 EA 48 23 F8 D8 DC 75 40
0180 | 73 E8 2F 33 6B AB DF 7A 3F 23 9F A2 30 39 B6 33
0190 | 59 DF 08 7C 3A E3 B1 F6 71 6E 72 51 C0 6E A9 90
01A0 | F9 F3 92 63 89 4B EC B6 6C 4B A1 4D D1 75 D0 17
01B0 | 75 EE 0C 70 1D AF 64 55 12 7A 91 E0 88 C3 04 E3
01C0 | 42 09 BE 54 69 AB 96 4B C6 88 7D F0 17 B6 91 3D
01D0 | A4 84 48 05 5E D2 00 C9 71 33 49 A2 78 F1 F2 16
01E0 | B8 8C AA 2E 9B 43 89 05 93 8F 31 03 68 41 B3 6A
01F0 | 8B 1C 61 FC E1 65 19 51 C6 60 6B 16 6A E5 BB BE
0200 | 18 10 B1 27 13 7C A7 C8 37 98 DA 36 3E D1 A1 08
0210 | 23 95 15 55 BB C1 ED 4B 4C B8 33 D6 22 C3 27 4A
0220 | BD 21 1C 1B 89 1C 10 AF 6F 21 3D C0 29 BA 9A 33
0230 | F2 FF 97 66</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
<table class="table">
@ -570,13 +570,13 @@ answer = BA0D89B59BDE3C06C0EF93D972AF7200A0EAF5ABBD909B93BEF0961A95C6375AD6CF6EB
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>9BDE3C06C0EF93D972AF7200A0EAF5AB</code></td>
<td><code>B9587B31623559608E08A7B2DD037243</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>BD909B93BEF0961A95C6375AD6CF6EB5</code></td>
<td><code>4D59F077898AA1E4ACC45F5C779B3CE2</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B59BDE3C06C0EF93D972AF7200A0EAF5ABBD909B93BEF0961A95C6375AD6CF6EB
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE0001007ECBBFA544A985176C847DE6</code> <code>DCF401F2B93FFD3F0224B001CAE4C418</code> <code>94A9C7829B3211AB7DD023D603010F9A</code> <code>D6BE132D508874983BE0CFAEA25746E0</code> <code>95A904F2364CE7174C27BDC7D4D4BD17</code> <code>7A6AB18620E4F8DAE00C7FFC17B20347</code> <code>872FF59C1066F4D6160AB9C5E3C80994</code> <code>8192F61A3828773730D66EBD6EF9DFC0</code> <code>9A25F68A1E788904730A93DE2A246D96</code> <code>42717B5482814EC15DFFF639A577B07D</code> <code>5C3C1BAA69B69FC587ABCA463E143440</code> <code>F60B6032B884F4947204B11B33A48BCE</code> <code>2F9E910195D499AF07450CCA3844F842</code> <code>1618AA748E737FD26F775E4438CBDBC6</code> <code>BDFCA972476C8AF1C42418D337B939C2</code> <code>A78BA36D320916114928154140D89513</code><br> <code>C04D8409</code></td>
<td><code>FE0001005B57056EC5B18248D9025587</code> <code>ACC41539DA38DEC882C7CE8B33D065D7</code> <code>D4149BC8599AA807F4E2300F780B5BD8</code> <code>7A78F3419330F29577E1934A29349993</code> <code>8D45812E32F538DFDB13EC07EA4823F8</code> <code>D8DC754073E82F336BABDF7A3F239FA2</code> <code>3039B63359DF087C3AE3B1F6716E7251</code> <code>C06EA990F9F39263894BECB66C4BA14D</code> <code>D175D01775EE0C701DAF6455127A91E0</code> <code>88C304E34209BE5469AB964BC6887DF0</code> <code>17B6913DA48448055ED200C9713349A2</code> <code>78F1F216B88CAA2E9B438905938F3103</code> <code>6841B36A8B1C61FCE1651951C6606B16</code> <code>6AE5BBBE1810B127137CA7C83798DA36</code> <code>3ED1A10823951555BBC1ED4B4CB833D6</code> <code>22C3274ABD211C1B891C10AF6F213DC0</code><br> <code>29BA9A33</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>BBFB9766</code> (1721236411 in decimal)</td>
<td><code>F2FF9766</code> (1721237490 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B59BDE3C06C0EF93D972AF7200A0EAF5ABBD909B93BEF0961A95C6375AD6CF6EB
<h5><a class="anchor" href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" id="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" name="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message"><i class="anchor-icon"></i></a>7) Client computes random 2048-bit number <em>b</em> (using a sufficient amount of entropy) and sends the server a message</h5>
<p>First, generate a secure random 2048-bit number b:</p>
<!-- start b -->
<pre><code>b = ECA740BED253508A350F5B87AEFE93FEE28E9C67872CF4F6C005A7DEF3525D41A649A046AD663092159DABA47492882A8F8067449CE0B8D2DBD4E0021DB82F7C51A3F4641862C0D95876D5862F98DD0A4AB9D305A044F63DE3271B3C6ECF036255784EACC35641B56C6BBED8E90984C79D422666E5EC045EAFED87D223FD79CE5CCE5783DDB6EF22F2DCD7FF660D4DBE84A124338C91C6672047630B4A470A2D50FFDB980FFAF8E5658E4D29A4D66D0BBA52891EDAFF77B3EC302740E3CA8FCD1A8AC8876C3124FFFD51978FD65E2C28766D51E8493C81268447F5FA54EE06BD1F5FD43E752C3119A6216388407AA612699770BB1E58DB5084947688C8A69CC9</code></pre>
<pre><code>b = 4A823903ECA4F36FD2A4143C541D0A8266C1B2DB004C71E94447E41F73579AAA60EA00614D084D73F5175253BB98A80A83F453395B3793420BE46A43C0ECC6393DB007CBB220B47366B0CB45145D3D2F3645EDFD5A0E66DB834EBC38F68D90212897CE7EF82830BFDC5D9A02B3D239313C0ECEA019C271694C4EE043A6BA3084DDFC4E63E38AA5E0D15EDA460C4EC9121742A9EE9479361E10169939DB017091808E47D7B26A7823FEDF47F5BCAC802DE039763525BCDF769B3896FC6674CABF732F3F7B5B58020C96B57E1236E2C5DD987CE829956DE94A20C2F7B13B64F4D2AED9E7CBD0B2FAF104D49C2E8C6C927CCE2A12FC476FE2F7E1334DE257A0CDFB</code></pre>
<!-- end b -->
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
<!-- start g_b -->
<pre><code>g_b = 3C3BB4E4EABA39BC1998EC5F9678B04B287EEA079DBD277A727BB453DB1A3CFE6AA62178E3269DD6B3045F65EDC6D5D741A29EF8B098B914D07B2E65B556EAD4BDECA732A609C0C537616DB5E9995031FE5BCFBE3A9C9619995AC094D3A141987DC37FF28D0544D8D4D3FF123CD43A1B337077B1680D0B3CED329447D16B8A48916791567473277F78919CC2EBEA41351E7DFA3BB9F041026996F6C959268CFEA786A5158A9F1D1A59F5BB43852479AC3CFB5CA59DF5FD6627867C81D6E4524A0A2C8228A4E645CD5680CF3B74CD1D484F33FB4C9C2C0AEE5ACF516401041264C047F339D03A60329C20EEFF38F6C2D324DEED3807C8BE0B2C6C013AE14F40B9</code></pre>
<pre><code>g_b = 754842D64FD22308A0ADC9E83A1A4C2185DB50FC34336706E5F2A5E7B3B061A0DAA59065C69F2ACF9DF208617E46204390E4BB74DA8E5B0FF5D2D4F906A2478B5A91052BDFDEC6AEA98A693E36C9D73A217ACBA8BB848AB936E9100AF788D9977F5125073063D568EE2DF4AEEA0FB4DE4C3D0C844AC8E5B605F481D4CB977134BFAB7D2387D070C7B28BD7DAF056D4A87F512610E12DB4021556BE8803EE5E26090E1747C90CB7924FF1940B3FEABB612DA24F336F6CF9BB3FFD4497827E10B606946E3E9CAB3215EF56923BDB68D3F56DB7EBE4A0C507DECEDD6AE4DF2E1DF22F9C611D62989E5F618D1B1C376678BECF846F3C1D42C0D5C50CE93B447E4BED</code></pre>
<!-- end g_b -->
<h6>7.1) generation of encrypted_data</h6>
<!-- start client_DH_inner_data -->
<p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 54 B6 43 66 9B DE 3C 06 C0 EF 93 D9 72 AF 72 00
0010 | A0 EA F5 AB BD 90 9B 93 BE F0 96 1A 95 C6 37 5A
0020 | D6 CF 6E B5 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 3C 3B B4 E4 EA BA 39 BC 19 98 EC 5F 96 78 B0 4B
0040 | 28 7E EA 07 9D BD 27 7A 72 7B B4 53 DB 1A 3C FE
0050 | 6A A6 21 78 E3 26 9D D6 B3 04 5F 65 ED C6 D5 D7
0060 | 41 A2 9E F8 B0 98 B9 14 D0 7B 2E 65 B5 56 EA D4
0070 | BD EC A7 32 A6 09 C0 C5 37 61 6D B5 E9 99 50 31
0080 | FE 5B CF BE 3A 9C 96 19 99 5A C0 94 D3 A1 41 98
0090 | 7D C3 7F F2 8D 05 44 D8 D4 D3 FF 12 3C D4 3A 1B
00A0 | 33 70 77 B1 68 0D 0B 3C ED 32 94 47 D1 6B 8A 48
00B0 | 91 67 91 56 74 73 27 7F 78 91 9C C2 EB EA 41 35
00C0 | 1E 7D FA 3B B9 F0 41 02 69 96 F6 C9 59 26 8C FE
00D0 | A7 86 A5 15 8A 9F 1D 1A 59 F5 BB 43 85 24 79 AC
00E0 | 3C FB 5C A5 9D F5 FD 66 27 86 7C 81 D6 E4 52 4A
00F0 | 0A 2C 82 28 A4 E6 45 CD 56 80 CF 3B 74 CD 1D 48
0100 | 4F 33 FB 4C 9C 2C 0A EE 5A CF 51 64 01 04 12 64
0110 | C0 47 F3 39 D0 3A 60 32 9C 20 EE FF 38 F6 C2 D3
0120 | 24 DE ED 38 07 C8 BE 0B 2C 6C 01 3A E1 4F 40 B9</code></pre>
<pre><code>0000 | 54 B6 43 66 B9 58 7B 31 62 35 59 60 8E 08 A7 B2
0010 | DD 03 72 43 4D 59 F0 77 89 8A A1 E4 AC C4 5F 5C
0020 | 77 9B 3C E2 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 75 48 42 D6 4F D2 23 08 A0 AD C9 E8 3A 1A 4C 21
0040 | 85 DB 50 FC 34 33 67 06 E5 F2 A5 E7 B3 B0 61 A0
0050 | DA A5 90 65 C6 9F 2A CF 9D F2 08 61 7E 46 20 43
0060 | 90 E4 BB 74 DA 8E 5B 0F F5 D2 D4 F9 06 A2 47 8B
0070 | 5A 91 05 2B DF DE C6 AE A9 8A 69 3E 36 C9 D7 3A
0080 | 21 7A CB A8 BB 84 8A B9 36 E9 10 0A F7 88 D9 97
0090 | 7F 51 25 07 30 63 D5 68 EE 2D F4 AE EA 0F B4 DE
00A0 | 4C 3D 0C 84 4A C8 E5 B6 05 F4 81 D4 CB 97 71 34
00B0 | BF AB 7D 23 87 D0 70 C7 B2 8B D7 DA F0 56 D4 A8
00C0 | 7F 51 26 10 E1 2D B4 02 15 56 BE 88 03 EE 5E 26
00D0 | 09 0E 17 47 C9 0C B7 92 4F F1 94 0B 3F EA BB 61
00E0 | 2D A2 4F 33 6F 6C F9 BB 3F FD 44 97 82 7E 10 B6
00F0 | 06 94 6E 3E 9C AB 32 15 EF 56 92 3B DB 68 D3 F5
0100 | 6D B7 EB E4 A0 C5 07 DE CE DD 6A E4 DF 2E 1D F2
0110 | 2F 9C 61 1D 62 98 9E 5F 61 8D 1B 1C 37 66 78 BE
0120 | CF 84 6F 3C 1D 42 C0 D5 C5 0C E9 3B 44 7E 4B ED</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;</code></pre>
<table class="table">
@ -658,19 +658,19 @@ answer = BA0D89B59BDE3C06C0EF93D972AF7200A0EAF5ABBD909B93BEF0961A95C6375AD6CF6EB
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>9BDE3C06C0EF93D972AF7200A0EAF5AB</code></td>
<td><code>B9587B31623559608E08A7B2DD037243</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>BD909B93BEF0961A95C6375AD6CF6EB5</code></td>
<td><code>4D59F077898AA1E4ACC45F5C779B3CE2</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE0001003C3BB4E4EABA39BC1998EC5F</code> <code>9678B04B287EEA079DBD277A727BB453</code> <code>DB1A3CFE6AA62178E3269DD6B3045F65</code> <code>EDC6D5D741A29EF8B098B914D07B2E65</code> <code>B556EAD4BDECA732A609C0C537616DB5</code> <code>E9995031FE5BCFBE3A9C9619995AC094</code> <code>D3A141987DC37FF28D0544D8D4D3FF12</code> <code>3CD43A1B337077B1680D0B3CED329447</code> <code>D16B8A48916791567473277F78919CC2</code> <code>EBEA41351E7DFA3BB9F041026996F6C9</code> <code>59268CFEA786A5158A9F1D1A59F5BB43</code> <code>852479AC3CFB5CA59DF5FD6627867C81</code> <code>D6E4524A0A2C8228A4E645CD5680CF3B</code> <code>74CD1D484F33FB4C9C2C0AEE5ACF5164</code> <code>01041264C047F339D03A60329C20EEFF</code> <code>38F6C2D324DEED3807C8BE0B2C6C013A</code><br> <code>E14F40B9</code></td>
<td><code>FE000100754842D64FD22308A0ADC9E8</code> <code>3A1A4C2185DB50FC34336706E5F2A5E7</code> <code>B3B061A0DAA59065C69F2ACF9DF20861</code> <code>7E46204390E4BB74DA8E5B0FF5D2D4F9</code> <code>06A2478B5A91052BDFDEC6AEA98A693E</code> <code>36C9D73A217ACBA8BB848AB936E9100A</code> <code>F788D9977F5125073063D568EE2DF4AE</code> <code>EA0FB4DE4C3D0C844AC8E5B605F481D4</code> <code>CB977134BFAB7D2387D070C7B28BD7DA</code> <code>F056D4A87F512610E12DB4021556BE88</code> <code>03EE5E26090E1747C90CB7924FF1940B</code> <code>3FEABB612DA24F336F6CF9BB3FFD4497</code> <code>827E10B606946E3E9CAB3215EF56923B</code> <code>DB68D3F56DB7EBE4A0C507DECEDD6AE4</code> <code>DF2E1DF22F9C611D62989E5F618D1B1C</code> <code>376678BECF846F3C1D42C0D5C50CE93B</code><br> <code>447E4BED</code></td>
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
</tr>
<tr>
@ -684,47 +684,47 @@ answer = BA0D89B59BDE3C06C0EF93D972AF7200A0EAF5ABBD909B93BEF0961A95C6375AD6CF6EB
<!-- end client_DH_inner_data -->
<p>The serialization of <em>Client_DH_Inner_Data</em> produces a string <strong>data</strong>. This is used to generate <strong>encrypted_data</strong> as specified in <a href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message">step 6</a>, using the following inputs:</p>
<!-- start client_DH_inner_data_input -->
<pre><code>data = 54B643669BDE3C06C0EF93D972AF7200A0EAF5ABBD909B93BEF0961A95C6375AD6CF6EB50000000000000000FE0001003C3BB4E4EABA39BC1998EC5F9678B04B287EEA079DBD277A727BB453DB1A3CFE6AA62178E3269DD6B3045F65EDC6D5D741A29EF8B098B914D07B2E65B556EAD4BDECA732A609C0C537616DB5E9995031FE5BCFBE3A9C9619995AC094D3A141987DC37FF28D0544D8D4D3FF123CD43A1B337077B1680D0B3CED329447D16B8A48916791567473277F78919CC2EBEA41351E7DFA3BB9F041026996F6C959268CFEA786A5158A9F1D1A59F5BB43852479AC3CFB5CA59DF5FD6627867C81D6E4524A0A2C8228A4E645CD5680CF3B74CD1D484F33FB4C9C2C0AEE5ACF516401041264C047F339D03A60329C20EEFF38F6C2D324DEED3807C8BE0B2C6C013AE14F40B9
padding = 8F6DE24A7AA3B5EE1B038467
tmp_aes_key = 402A22230C9BB7E1AAF6E978F76FCF6E641F1B62DBCA2BF60FC95A1BAD45F56C
tmp_aes_iv = C4BAAC5594932970391D732F1FF2A0CCDBB82F8CC63F5D5BB844A9234D3E1A6F</code></pre>
<pre><code>data = 54B64366B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE20000000000000000FE000100754842D64FD22308A0ADC9E83A1A4C2185DB50FC34336706E5F2A5E7B3B061A0DAA59065C69F2ACF9DF208617E46204390E4BB74DA8E5B0FF5D2D4F906A2478B5A91052BDFDEC6AEA98A693E36C9D73A217ACBA8BB848AB936E9100AF788D9977F5125073063D568EE2DF4AEEA0FB4DE4C3D0C844AC8E5B605F481D4CB977134BFAB7D2387D070C7B28BD7DAF056D4A87F512610E12DB4021556BE8803EE5E26090E1747C90CB7924FF1940B3FEABB612DA24F336F6CF9BB3FFD4497827E10B606946E3E9CAB3215EF56923BDB68D3F56DB7EBE4A0C507DECEDD6AE4DF2E1DF22F9C611D62989E5F618D1B1C376678BECF846F3C1D42C0D5C50CE93B447E4BED
padding = 350570234668F78504EFCC02
tmp_aes_key = 68BAFA98D2EF9596E4A16AC8738160B92728CB85D4675BA6C9FA60E0DADD29DC
tmp_aes_iv = A172B2F171E9FC1B5ECAC2E5CA03D4D575FCB68E3BA103EEEF7E5608CE39E5F8</code></pre>
<!-- end client_DH_inner_data_input -->
<p>Process:</p>
<pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16)
encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre>
<p>Output:</p>
<!-- start client_DH_inner_data_output -->
<pre><code>encrypted_data = CE240137B24A93AE76D0C04F93324AEFF69599DA627DAD709B13D94B611018AA67715A576F041DB9E5E84378C2B6DDC8C3CF7B58E2DB9812F71C35137248ED5575B57D14780694B14CEC2B3DAC60612BC07232929E93B1F32F3AB49096BB27282224BD180B07E3D274BB7BCFF7063CF55347B798D45F771AD5A6BF6052918082396CDE82EF3719C80BAC18BEA096AB59A8B707242BB0315FF81AFE0A08F9D47C7B7236A5C67D4F98C4514BD3F7DCF301BB1DA4A7DDE5138BBC2451FD2513A33FD21D4C52D5F0250CFB50173192AF10C8BF347F6CB44B43A504C4010E25242B082FCBCC04AF5BE1BA881AC97BD3F4E9C82C734CD14B731B3324E2FAE62203AC2B28E0956C7EBE30AD0B59A5AB983E32127CB78105AF487A258BA69D9F098AFED871CFAD0AFBDB3D3FF67B69875A716CBE3413ECCC3A1E9ECB0304DABCA8B7699667EEAE1847755EA892579E60F62A04EC</code></pre>
<pre><code>encrypted_data = 3C51044D8DD6CC9B38DD2AD488B29291570FEBE34CF477595BFA0CC4F1E21C1AF9A7EBF55C6E2DF34428D6F55F24AC437ACD1233A90ED6D2AD93A3BF990B15FE48745A687EA470C72355D35FA1075FBB6CBB95B58AE1DE606E8FC7741B1419551E3251FECD4F7395B539753435A4685BD0B7D9C0732E2094EF96F1A07B035DD1434D4E623FDDB9550EC813B13EE359D8500C0C96D4F2184E2673868D95AB073927F0299B35C9A5E879332BA1C21F73315DDDBF907574D22A712F8791F8243BF918AB18BC2BCCE9C53142FF0BFD42C69CB118852B5407C2BC758BC12627CD3AA01945B943D18BE53AB2C6DDFDC5707BA52AC550E1CBF71D78887CCDBDBF0AAD3429BAB9E9B6A1FAE09A3E030E51FAD78B4D14A1649CF564CF7D330DED0C6BD9864BB5F940A60DFBC9A80D210162E4B3F4520D540D7A48AA7B68A642E060E07D674380C8592B15E72FBC9C742337CAED47</code></pre>
<!-- end client_DH_inner_data_output -->
<p>The length of the final string is 336 bytes.</p>
<h6>7.2) set_client_DH_params query</h6>
<!-- start set_client_DH_params -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 CC FA 0C 00 BB FB 97 66
0010 | 78 01 00 00 1F 5F 04 F5 9B DE 3C 06 C0 EF 93 D9
0020 | 72 AF 72 00 A0 EA F5 AB BD 90 9B 93 BE F0 96 1A
0030 | 95 C6 37 5A D6 CF 6E B5 FE 50 01 00 CE 24 01 37
0040 | B2 4A 93 AE 76 D0 C0 4F 93 32 4A EF F6 95 99 DA
0050 | 62 7D AD 70 9B 13 D9 4B 61 10 18 AA 67 71 5A 57
0060 | 6F 04 1D B9 E5 E8 43 78 C2 B6 DD C8 C3 CF 7B 58
0070 | E2 DB 98 12 F7 1C 35 13 72 48 ED 55 75 B5 7D 14
0080 | 78 06 94 B1 4C EC 2B 3D AC 60 61 2B C0 72 32 92
0090 | 9E 93 B1 F3 2F 3A B4 90 96 BB 27 28 22 24 BD 18
00A0 | 0B 07 E3 D2 74 BB 7B CF F7 06 3C F5 53 47 B7 98
00B0 | D4 5F 77 1A D5 A6 BF 60 52 91 80 82 39 6C DE 82
00C0 | EF 37 19 C8 0B AC 18 BE A0 96 AB 59 A8 B7 07 24
00D0 | 2B B0 31 5F F8 1A FE 0A 08 F9 D4 7C 7B 72 36 A5
00E0 | C6 7D 4F 98 C4 51 4B D3 F7 DC F3 01 BB 1D A4 A7
00F0 | DD E5 13 8B BC 24 51 FD 25 13 A3 3F D2 1D 4C 52
0100 | D5 F0 25 0C FB 50 17 31 92 AF 10 C8 BF 34 7F 6C
0110 | B4 4B 43 A5 04 C4 01 0E 25 24 2B 08 2F CB CC 04
0120 | AF 5B E1 BA 88 1A C9 7B D3 F4 E9 C8 2C 73 4C D1
0130 | 4B 73 1B 33 24 E2 FA E6 22 03 AC 2B 28 E0 95 6C
0140 | 7E BE 30 AD 0B 59 A5 AB 98 3E 32 12 7C B7 81 05
0150 | AF 48 7A 25 8B A6 9D 9F 09 8A FE D8 71 CF AD 0A
0160 | FB DB 3D 3F F6 7B 69 87 5A 71 6C BE 34 13 EC CC
0170 | 3A 1E 9E CB 03 04 DA BC A8 B7 69 96 67 EE AE 18
0180 | 47 75 5E A8 92 57 9E 60 F6 2A 04 EC</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 1C E6 00 00 F2 FF 97 66
0010 | 78 01 00 00 1F 5F 04 F5 B9 58 7B 31 62 35 59 60
0020 | 8E 08 A7 B2 DD 03 72 43 4D 59 F0 77 89 8A A1 E4
0030 | AC C4 5F 5C 77 9B 3C E2 FE 50 01 00 3C 51 04 4D
0040 | 8D D6 CC 9B 38 DD 2A D4 88 B2 92 91 57 0F EB E3
0050 | 4C F4 77 59 5B FA 0C C4 F1 E2 1C 1A F9 A7 EB F5
0060 | 5C 6E 2D F3 44 28 D6 F5 5F 24 AC 43 7A CD 12 33
0070 | A9 0E D6 D2 AD 93 A3 BF 99 0B 15 FE 48 74 5A 68
0080 | 7E A4 70 C7 23 55 D3 5F A1 07 5F BB 6C BB 95 B5
0090 | 8A E1 DE 60 6E 8F C7 74 1B 14 19 55 1E 32 51 FE
00A0 | CD 4F 73 95 B5 39 75 34 35 A4 68 5B D0 B7 D9 C0
00B0 | 73 2E 20 94 EF 96 F1 A0 7B 03 5D D1 43 4D 4E 62
00C0 | 3F DD B9 55 0E C8 13 B1 3E E3 59 D8 50 0C 0C 96
00D0 | D4 F2 18 4E 26 73 86 8D 95 AB 07 39 27 F0 29 9B
00E0 | 35 C9 A5 E8 79 33 2B A1 C2 1F 73 31 5D DD BF 90
00F0 | 75 74 D2 2A 71 2F 87 91 F8 24 3B F9 18 AB 18 BC
0100 | 2B CC E9 C5 31 42 FF 0B FD 42 C6 9C B1 18 85 2B
0110 | 54 07 C2 BC 75 8B C1 26 27 CD 3A A0 19 45 B9 43
0120 | D1 8B E5 3A B2 C6 DD FD C5 70 7B A5 2A C5 50 E1
0130 | CB F7 1D 78 88 7C CD BD BF 0A AD 34 29 BA B9 E9
0140 | B6 A1 FA E0 9A 3E 03 0E 51 FA D7 8B 4D 14 A1 64
0150 | 9C F5 64 CF 7D 33 0D ED 0C 6B D9 86 4B B5 F9 40
0160 | A6 0D FB C9 A8 0D 21 01 62 E4 B3 F4 52 0D 54 0D
0170 | 7A 48 AA 7B 68 A6 42 E0 60 E0 7D 67 43 80 C8 59
0180 | 2B 15 E7 2F BC 9C 74 23 37 CA ED 47</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;</code></pre>
<table class="table">
@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>CCFA0C00BBFB9766</code></td>
<td><code>1CE60000F2FF9766</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>9BDE3C06C0EF93D972AF7200A0EAF5AB</code></td>
<td><code>B9587B31623559608E08A7B2DD037243</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>BD909B93BEF0961A95C6375AD6CF6EB5</code></td>
<td><code>4D59F077898AA1E4ACC45F5C779B3CE2</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100CE240137B24A93AE76D0C04F</code> <code>93324AEFF69599DA627DAD709B13D94B</code> <code>611018AA67715A576F041DB9E5E84378</code> <code>C2B6DDC8C3CF7B58E2DB9812F71C3513</code> <code>7248ED5575B57D14780694B14CEC2B3D</code> <code>AC60612BC07232929E93B1F32F3AB490</code> <code>96BB27282224BD180B07E3D274BB7BCF</code> <code>F7063CF55347B798D45F771AD5A6BF60</code> <code>52918082396CDE82EF3719C80BAC18BE</code> <code>A096AB59A8B707242BB0315FF81AFE0A</code> <code>08F9D47C7B7236A5C67D4F98C4514BD3</code> <code>F7DCF301BB1DA4A7DDE5138BBC2451FD</code> <code>2513A33FD21D4C52D5F0250CFB501731</code> <code>92AF10C8BF347F6CB44B43A504C4010E</code> <code>25242B082FCBCC04AF5BE1BA881AC97B</code> <code>D3F4E9C82C734CD14B731B3324E2FAE6</code> <code>2203AC2B28E0956C7EBE30AD0B59A5AB</code> <code>983E32127CB78105AF487A258BA69D9F</code> <code>098AFED871CFAD0AFBDB3D3FF67B6987</code> <code>5A716CBE3413ECCC3A1E9ECB0304DABC</code> <code>A8B7699667EEAE1847755EA892579E60</code><br> <code>F62A04EC</code></td>
<td><code>FE5001003C51044D8DD6CC9B38DD2AD4</code> <code>88B29291570FEBE34CF477595BFA0CC4</code> <code>F1E21C1AF9A7EBF55C6E2DF34428D6F5</code> <code>5F24AC437ACD1233A90ED6D2AD93A3BF</code> <code>990B15FE48745A687EA470C72355D35F</code> <code>A1075FBB6CBB95B58AE1DE606E8FC774</code> <code>1B1419551E3251FECD4F7395B5397534</code> <code>35A4685BD0B7D9C0732E2094EF96F1A0</code> <code>7B035DD1434D4E623FDDB9550EC813B1</code> <code>3EE359D8500C0C96D4F2184E2673868D</code> <code>95AB073927F0299B35C9A5E879332BA1</code> <code>C21F73315DDDBF907574D22A712F8791</code> <code>F8243BF918AB18BC2BCCE9C53142FF0B</code> <code>FD42C69CB118852B5407C2BC758BC126</code> <code>27CD3AA01945B943D18BE53AB2C6DDFD</code> <code>C5707BA52AC550E1CBF71D78887CCDBD</code> <code>BF0AAD3429BAB9E9B6A1FAE09A3E030E</code> <code>51FAD78B4D14A1649CF564CF7D330DED</code> <code>0C6BD9864BB5F940A60DFBC9A80D2101</code> <code>62E4B3F4520D540D7A48AA7B68A642E0</code> <code>60E07D674380C8592B15E72FBC9C7423</code><br> <code>37CAED47</code></td>
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
</tr>
</tbody>
@ -785,17 +785,17 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<h5><a class="anchor" href="#8-auth-key-generation" id="8-auth-key-generation" name="8-auth-key-generation"><i class="anchor-icon"></i></a>8) Auth key generation</h5>
<p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p>
<!-- start auth_key -->
<pre><code>auth_key = 4A0C761FAB31351AD267B26423AEBE448D930CF1B5C19EBCC52CCBE6D4ADDEE159F2BB5029327012AF93E4CE200F411C70EBAD273045597698C376FC42E4A166AF2555B50BBAA5CFA06A0FB2480DC63F781E790D310D43A5A72FEFEDBF3B6FF74C98E7D16E79974044D11226231A840F726F76ED7B99BA8EDBEE804855D00A976EE6B61FE445B2DBF3738F6065D7977C53AF1B57543129BCA14B152DB1E134AFCD2F361E40AF6C2A38D73727A02E5EE03E2197BCF6ACAB90066CCABB24A031E9259E033EC57F20D84C550A325493E85CF0EE745D483F0CE6065F1E71CF259ED89EA8F17E93237321BC04B0A1339B6FD57BD73AD54D06326A9599DE93F30F618F</code></pre>
<pre><code>auth_key = 9982268B8CE5598E4ADF4C56A5D054BC2AA8A57067D06DFDA4F9271D0598A9A0B8608E885BB870DB8852176A13E513F230FC12DD80666C289C9D590BDA9422E022F3A36C60B6BACDCA3FE3D8AB1ECE82B981EF8020FEE55D15DE9E166B89A48FBD037351629C6DA7162EA8FBBB292A1494F2447A60115C5BB4CA9E144A528A71185821AB51731B478F63F9A0E20777A32DEEBDB8656704D07DCA499B47EB2C24E1635FEF16ECEAF45AAEC794999C3668B5108771C54097A3C1DB4C42D1200AB99337FA62B256302D0E29020D12F702126A40F5C86F9C85BDA947D4159F611236EA42F64425316DF54861D9576DD69FBD888FEB986A9115C30ACBAC505CD06350</code></pre>
<!-- end auth_key -->
<h5><a class="anchor" href="#9-final-server-reply" id="9-final-server-reply" name="9-final-server-reply"><i class="anchor-icon"></i></a>9) Final server reply</h5>
<p>The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:</p>
<!-- start dh_gen_ok -->
<p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 F4 C0 07 BC FB 97 66
0010 | 6C 00 00 00 34 F7 CB 3B 9B DE 3C 06 C0 EF 93 D9
0020 | 72 AF 72 00 A0 EA F5 AB BD 90 9B 93 BE F0 96 1A
0030 | 95 C6 37 5A D6 CF 6E B5 03 50 4F 6F 45 00 D7 AE
0040 | 17 0C 71 EE 2E 61 36 6C</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 48 45 A9 F2 FF 97 66
0010 | 70 00 00 00 34 F7 CB 3B B9 58 7B 31 62 35 59 60
0020 | 8E 08 A7 B2 DD 03 72 43 4D 59 F0 77 89 8A A1 E4
0030 | AC C4 5F 5C 77 9B 3C E2 CA 5E 0D 76 F0 F5 A1 55
0040 | 15 27 98 64 69 4F E5 15</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;</code></pre>
<table class="table">
@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01F4C007BCFB9766</code></td>
<td><code>014845A9F2FF9766</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>6C000000</code> (108 in decimal)</td>
<td><code>70000000</code> (112 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>9BDE3C06C0EF93D972AF7200A0EAF5AB</code></td>
<td><code>B9587B31623559608E08A7B2DD037243</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>BD909B93BEF0961A95C6375AD6CF6EB5</code></td>
<td><code>4D59F077898AA1E4ACC45F5C779B3CE2</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>03504F6F4500D7AE170C71EE2E61366C</code></td>
<td><code>CA5E0D76F0F5A15515279864694FE515</code></td>
<td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td>
</tr>
</tbody>

View file

@ -699,7 +699,7 @@
</tr>
<tr>
<td><a href="/constructor/updateSmsJob">updateSmsJob</a></td>
<td> </td>
<td>A new SMS job was received</td>
</tr>
<tr>
<td><a href="/constructor/updateQuickReplies">updateQuickReplies</a></td>
@ -747,7 +747,7 @@
</tr>
<tr>
<td><a href="/constructor/updateStarsBalance">updateStarsBalance</a></td>
<td> </td>
<td>The current account's <a href="/api/stars">Telegram Stars balance »</a> has changed.</td>
</tr>
</tbody>
</table></div>

View file

@ -96,7 +96,7 @@
</tr>
<tr>
<td><a href="/method/payments.sendStarsForm">payments.sendStarsForm</a></td>
<td> </td>
<td>Make a payment using <a href="/api/stars#using-stars">Telegram Stars, see here »</a> for more info.</td>
</tr>
</tbody>
</table></div>