Update content of files

This commit is contained in:
GitHub Action 2024-07-25 18:02:11 +00:00
parent ee09c7c42f
commit b73f93a499
3 changed files with 360 additions and 371 deletions

View file

@ -65,7 +65,7 @@
<li>Added <a href="/constructor/starsTransactionPeerUnsupported">starsTransactionPeerUnsupported</a> - Describes a <a href="/api/stars">Telegram Star</a> transaction that cannot be described using the current layer.</li>
<li>Added <a href="/constructor/starsTransactionPeerAppStore">starsTransactionPeerAppStore</a> - Describes a <a href="/api/stars">Telegram Star</a> transaction with the App Store, used when purchasing Telegram Stars through the App Store.</li>
<li>Added <a href="/constructor/starsTransactionPeerPlayMarket">starsTransactionPeerPlayMarket</a> - Describes a <a href="/api/stars">Telegram Star</a> transaction with the Play Store, used when purchasing Telegram Stars through the Play Store.</li>
<li>Added <a href="/constructor/starsTransactionPeerPremiumBot">starsTransactionPeerPremiumBot</a> - </li>
<li>Added <a href="/constructor/starsTransactionPeerPremiumBot">starsTransactionPeerPremiumBot</a> - Describes a <a href="/api/stars">Telegram Star</a> transaction made using <a href="https://t.me/premiumbot">@PremiumBot</a> (i.e. using the <a href="/constructor/inputInvoiceStars">inputInvoiceStars</a> flow described <a href="/api/stars#buying-stars">here »</a>).</li>
<li>Added <a href="/constructor/starsTransactionPeerFragment">starsTransactionPeerFragment</a> - Describes a <a href="/api/stars">Telegram Star</a> transaction with <a href="https://fragment.com">Fragment</a>, used when purchasing Telegram Stars through <a href="https://fragment.com">Fragment</a>.</li>
<li>Added <a href="/constructor/starsTransactionPeer">starsTransactionPeer</a> - Describes a <a href="/api/stars">Telegram Star</a> transaction with another peer (usually a bot or a channel).</li>
<li>Added <a href="/constructor/inputStorePaymentStars">inputStorePaymentStars</a> - Used to top up the <a href="/api/stars">Telegram Stars balance</a> using the Play Store/App Store flow (official apps only).</li>

View file

@ -1236,6 +1236,29 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-drafts" id="working-with-drafts" name="working-with-drafts"><i class="anchor-icon"></i></a>Working with <a href="/api/drafts">drafts</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/messages.clearAllDrafts">messages.clearAllDrafts</a></td>
<td>Clear all <a href="/api/drafts">drafts</a>.</td>
</tr>
<tr>
<td><a href="/method/messages.getAllDrafts">messages.getAllDrafts</a></td>
<td>Return all message <a href="/api/drafts">drafts</a>. <br>Returns all the latest <a href="/constructor/updateDraftMessage">updateDraftMessage</a> updates related to all chats with drafts.</td>
</tr>
<tr>
<td><a href="/method/messages.saveDraft">messages.saveDraft</a></td>
<td>Save a message <a href="/api/drafts">draft</a> associated to a chat.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-emoji-categories" id="working-with-emoji-categories" name="working-with-emoji-categories"><i class="anchor-icon"></i></a>Working with <a href="/api/emoji-categories">emoji categories</a></h3>
<table class="table">
<thead>
@ -1415,6 +1438,96 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-folder-tags" id="working-with-folder-tags" name="working-with-folder-tags"><i class="anchor-icon"></i></a>Working with <a href="/api/folders#folder-tags">folder tags</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/messages.toggleDialogFilterTags">messages.toggleDialogFilterTags</a></td>
<td>Enable or disable <a href="/api/folders#folder-tags">folder tags »</a>.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-folders" id="working-with-folders" name="working-with-folders"><i class="anchor-icon"></i></a>Working with <a href="/api/folders">folders</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/messages.updateDialogFiltersOrder">messages.updateDialogFiltersOrder</a></td>
<td>Reorder <a href="/api/folders">folders</a></td>
</tr>
<tr>
<td><a href="/method/messages.getDialogFilters">messages.getDialogFilters</a></td>
<td>Get <a href="/api/folders">folders</a></td>
</tr>
<tr>
<td><a href="/method/messages.getSuggestedDialogFilters">messages.getSuggestedDialogFilters</a></td>
<td>Get <a href="/api/folders">suggested folders</a></td>
</tr>
<tr>
<td><a href="/method/messages.updateDialogFilter">messages.updateDialogFilter</a></td>
<td>Update <a href="/api/folders">folder</a></td>
</tr>
<tr>
<td><a href="/method/folders.editPeerFolders">folders.editPeerFolders</a></td>
<td>Edit peers in <a href="/api/folders#peer-folders">peer folder</a></td>
</tr>
<tr>
<td><a href="/method/chatlists.exportChatlistInvite">chatlists.exportChatlistInvite</a></td>
<td>Export a <a href="/api/folders">folder »</a>, creating a <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.deleteExportedInvite">chatlists.deleteExportedInvite</a></td>
<td>Delete a previously created <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.editExportedInvite">chatlists.editExportedInvite</a></td>
<td>Edit a <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.getExportedInvites">chatlists.getExportedInvites</a></td>
<td>List all <a href="/api/links#chat-folder-links">chat folder deep links »</a> associated to a folder</td>
</tr>
<tr>
<td><a href="/method/chatlists.checkChatlistInvite">chatlists.checkChatlistInvite</a></td>
<td>Obtain information about a <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.joinChatlistInvite">chatlists.joinChatlistInvite</a></td>
<td>Import a <a href="/api/links#chat-folder-links">chat folder deep link »</a>, joining some or all the chats in the folder.</td>
</tr>
<tr>
<td><a href="/method/chatlists.getChatlistUpdates">chatlists.getChatlistUpdates</a></td>
<td>Fetch new chats associated with an imported <a href="/api/links#chat-folder-links">chat folder deep link »</a>. Must be invoked at most every <code>chatlist_update_period</code> seconds (as per the related <a href="/api/config#chatlist-update-period">client configuration parameter »</a>).</td>
</tr>
<tr>
<td><a href="/method/chatlists.joinChatlistUpdates">chatlists.joinChatlistUpdates</a></td>
<td>Join channels and supergroups recently added to a <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.hideChatlistUpdates">chatlists.hideChatlistUpdates</a></td>
<td>Dismiss new pending peers recently added to a <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.getLeaveChatlistSuggestions">chatlists.getLeaveChatlistSuggestions</a></td>
<td>Returns identifiers of pinned or always included chats from a chat folder imported using a <a href="/api/links#chat-folder-links">chat folder deep link »</a>, which are suggested to be left when the chat folder is deleted.</td>
</tr>
<tr>
<td><a href="/method/chatlists.leaveChatlist">chatlists.leaveChatlist</a></td>
<td>Delete a folder imported using a <a href="/api/links#chat-folder-links">chat folder deep link »</a></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-forums" id="working-with-forums" name="working-with-forums"><i class="anchor-icon"></i></a>Working with <a href="/api/forum">forums</a></h3>
<table class="table">
<thead>
@ -1501,6 +1614,33 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-games" id="working-with-games" name="working-with-games"><i class="anchor-icon"></i></a>Working with <a href="/api/bots/games">games</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/messages.getGameHighScores">messages.getGameHighScores</a></td>
<td>Get highscores of a game</td>
</tr>
<tr>
<td><a href="/method/messages.getInlineGameHighScores">messages.getInlineGameHighScores</a></td>
<td>Get highscores of a game sent using an inline bot</td>
</tr>
<tr>
<td><a href="/method/messages.setGameScore">messages.setGameScore</a></td>
<td>Use this method to set the score of the specified user in a game sent as a normal message (bots only).</td>
</tr>
<tr>
<td><a href="/method/messages.setInlineGameScore">messages.setInlineGameScore</a></td>
<td>Use this method to set the score of the specified user in a game sent as an inline message (bots only).</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-gift-codes" id="working-with-gift-codes" name="working-with-gift-codes"><i class="anchor-icon"></i></a>Working with <a href="/api/links#premium-giftcode-links">gift codes</a></h3>
<table class="table">
<thead>
@ -1895,6 +2035,10 @@ Look for updates of telegram&#39;s terms of service…">
<td>Suggests a short name for a given stickerpack name</td>
</tr>
<tr>
<td><a href="/method/stickers.replaceSticker">stickers.replaceSticker</a></td>
<td>Replace a sticker in a <a href="/api/stickers">stickerset »</a>.</td>
</tr>
<tr>
<td><a href="/method/stickers.checkShortName">stickers.checkShortName</a></td>
<td>Check whether the given short name is available</td>
</tr>
@ -2489,21 +2633,6 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-credit-cards" id="working-with-credit-cards" name="working-with-credit-cards"><i class="anchor-icon"></i></a>Working with credit cards</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/payments.getBankCardData">payments.getBankCardData</a></td>
<td>Get info about a credit card</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-dialogs" id="working-with-dialogs" name="working-with-dialogs"><i class="anchor-icon"></i></a>Working with dialogs</h3>
<table class="table">
<thead>
@ -2567,131 +2696,6 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-drafts" id="working-with-drafts" name="working-with-drafts"><i class="anchor-icon"></i></a>Working with drafts</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/messages.clearAllDrafts">messages.clearAllDrafts</a></td>
<td>Clear all <a href="/api/drafts">drafts</a>.</td>
</tr>
<tr>
<td><a href="/method/messages.getAllDrafts">messages.getAllDrafts</a></td>
<td>Return all message <a href="/api/drafts">drafts</a>. <br>Returns all the latest <a href="/constructor/updateDraftMessage">updateDraftMessage</a> updates related to all chats with drafts.</td>
</tr>
<tr>
<td><a href="/method/messages.saveDraft">messages.saveDraft</a></td>
<td>Save a message <a href="/api/drafts">draft</a> associated to a chat.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-folders" id="working-with-folders" name="working-with-folders"><i class="anchor-icon"></i></a>Working with folders</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/messages.updateDialogFiltersOrder">messages.updateDialogFiltersOrder</a></td>
<td>Reorder <a href="/api/folders">folders</a></td>
</tr>
<tr>
<td><a href="/method/messages.getDialogFilters">messages.getDialogFilters</a></td>
<td>Get <a href="/api/folders">folders</a></td>
</tr>
<tr>
<td><a href="/method/messages.getSuggestedDialogFilters">messages.getSuggestedDialogFilters</a></td>
<td>Get <a href="/api/folders">suggested folders</a></td>
</tr>
<tr>
<td><a href="/method/messages.updateDialogFilter">messages.updateDialogFilter</a></td>
<td>Update <a href="/api/folders">folder</a></td>
</tr>
<tr>
<td><a href="/method/folders.editPeerFolders">folders.editPeerFolders</a></td>
<td>Edit peers in <a href="/api/folders#peer-folders">peer folder</a></td>
</tr>
<tr>
<td><a href="/method/chatlists.exportChatlistInvite">chatlists.exportChatlistInvite</a></td>
<td>Export a <a href="/api/folders">folder »</a>, creating a <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.deleteExportedInvite">chatlists.deleteExportedInvite</a></td>
<td>Delete a previously created <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.editExportedInvite">chatlists.editExportedInvite</a></td>
<td>Edit a <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.getExportedInvites">chatlists.getExportedInvites</a></td>
<td>List all <a href="/api/links#chat-folder-links">chat folder deep links »</a> associated to a folder</td>
</tr>
<tr>
<td><a href="/method/chatlists.checkChatlistInvite">chatlists.checkChatlistInvite</a></td>
<td>Obtain information about a <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.joinChatlistInvite">chatlists.joinChatlistInvite</a></td>
<td>Import a <a href="/api/links#chat-folder-links">chat folder deep link »</a>, joining some or all the chats in the folder.</td>
</tr>
<tr>
<td><a href="/method/chatlists.getChatlistUpdates">chatlists.getChatlistUpdates</a></td>
<td>Fetch new chats associated with an imported <a href="/api/links#chat-folder-links">chat folder deep link »</a>. Must be invoked at most every <code>chatlist_update_period</code> seconds (as per the related <a href="/api/config#chatlist-update-period">client configuration parameter »</a>).</td>
</tr>
<tr>
<td><a href="/method/chatlists.joinChatlistUpdates">chatlists.joinChatlistUpdates</a></td>
<td>Join channels and supergroups recently added to a <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.hideChatlistUpdates">chatlists.hideChatlistUpdates</a></td>
<td>Dismiss new pending peers recently added to a <a href="/api/links#chat-folder-links">chat folder deep link »</a>.</td>
</tr>
<tr>
<td><a href="/method/chatlists.getLeaveChatlistSuggestions">chatlists.getLeaveChatlistSuggestions</a></td>
<td>Returns identifiers of pinned or always included chats from a chat folder imported using a <a href="/api/links#chat-folder-links">chat folder deep link »</a>, which are suggested to be left when the chat folder is deleted.</td>
</tr>
<tr>
<td><a href="/method/chatlists.leaveChatlist">chatlists.leaveChatlist</a></td>
<td>Delete a folder imported using a <a href="/api/links#chat-folder-links">chat folder deep link »</a></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-games" id="working-with-games" name="working-with-games"><i class="anchor-icon"></i></a>Working with games</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/messages.getGameHighScores">messages.getGameHighScores</a></td>
<td>Get highscores of a game</td>
</tr>
<tr>
<td><a href="/method/messages.getInlineGameHighScores">messages.getInlineGameHighScores</a></td>
<td>Get highscores of a game sent using an inline bot</td>
</tr>
<tr>
<td><a href="/method/messages.setGameScore">messages.setGameScore</a></td>
<td>Use this method to set the score of the specified user in a game sent as a normal message (bots only).</td>
</tr>
<tr>
<td><a href="/method/messages.setInlineGameScore">messages.setInlineGameScore</a></td>
<td>Use this method to set the score of the specified user in a game sent as an inline message (bots only).</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-group-calls-amp-live-streaming" id="working-with-group-calls-amp-live-streaming" name="working-with-group-calls-amp-live-streaming"><i class="anchor-icon"></i></a>Working with group calls &amp; live streaming</h3>
<table class="table">
<thead>
@ -2956,6 +2960,10 @@ Look for updates of telegram&#39;s terms of service…">
<td>Find out if a media message's caption can be edited</td>
</tr>
<tr>
<td><a href="/method/messages.getOutboxReadDate">messages.getOutboxReadDate</a></td>
<td>Get the exact read date of one of our messages, sent to a private chat with another user.<br><br>Can be only done for private outgoing messages not older than <a href="/api/config#pm-read-date-expire-period">appConfig.pm_read_date_expire_period »</a>.<br><br>If the <code>peer</code>'s <a href="/constructor/userFull">userFull</a>.<code>read_dates_private</code> flag is set, we will not be able to fetch the exact read date of messages we send to them, and a <code>USER_PRIVACY_RESTRICTED</code> RPC error will be emitted. <br>The exact read date of messages might still be unavailable for other reasons, see <a href="/constructor/globalPrivacySettings">here »</a> for more info. <br>To set <a href="/constructor/userFull">userFull</a>.<code>read_dates_private</code> for ourselves invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a>, setting the <code>settings.hide_read_marks</code> flag.</td>
</tr>
<tr>
<td><a href="/method/messages.getMessages">messages.getMessages</a></td>
<td>Returns the list of messages by their IDs.</td>
</tr>
@ -3179,6 +3187,10 @@ Look for updates of telegram&#39;s terms of service…">
<td><a href="/method/payments.exportInvoice">payments.exportInvoice</a></td>
<td>Generate an <a href="/api/links#invoice-links">invoice deep link</a></td>
</tr>
<tr>
<td><a href="/method/payments.getBankCardData">payments.getBankCardData</a></td>
<td>Get info about a credit card</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-polls" id="working-with-polls" name="working-with-polls"><i class="anchor-icon"></i></a>Working with polls</h3>
@ -3612,29 +3624,6 @@ Look for updates of telegram&#39;s terms of service…">
<td>Resolve a @username to get peer info</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#other" id="other" name="other"><i class="anchor-icon"></i></a>Other</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/messages.getOutboxReadDate">messages.getOutboxReadDate</a></td>
<td>Get the exact read date of one of our messages, sent to a private chat with another user.<br><br>Can be only done for private outgoing messages not older than <a href="/api/config#pm-read-date-expire-period">appConfig.pm_read_date_expire_period »</a>.<br><br>If the <code>peer</code>'s <a href="/constructor/userFull">userFull</a>.<code>read_dates_private</code> flag is set, we will not be able to fetch the exact read date of messages we send to them, and a <code>USER_PRIVACY_RESTRICTED</code> RPC error will be emitted. <br>The exact read date of messages might still be unavailable for other reasons, see <a href="/constructor/globalPrivacySettings">here »</a> for more info. <br>To set <a href="/constructor/userFull">userFull</a>.<code>read_dates_private</code> for ourselves invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a>, setting the <code>settings.hide_read_marks</code> flag.</td>
</tr>
<tr>
<td><a href="/method/messages.toggleDialogFilterTags">messages.toggleDialogFilterTags</a></td>
<td>Enable or disable <a href="/api/folders#folder-tags">folder tags »</a>.</td>
</tr>
<tr>
<td><a href="/method/stickers.replaceSticker">stickers.replaceSticker</a></td>
<td>Replace a sticker in a <a href="/api/stickers">stickerset »</a>.</td>
</tr>
</tbody>
</table></div>
</div>

View file

@ -53,9 +53,9 @@
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
<!-- start req_pq_multi -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 84 32 0D 00 84 90 A2 66
0010 | 14 00 00 00 F1 8E 7E BE B8 1E E8 98 8B A0 21 46
0020 | C0 B5 86 ED 6E 48 FA F7</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 38 8B 01 00 2B 91 A2 66
0010 | 14 00 00 00 F1 8E 7E BE 0A 10 39 86 07 65 90 2D
0020 | FB 0C AC B7 C5 6E 4D D1</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>84320D008490A266</code></td>
<td><code>388B01002B91A266</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>B81EE8988BA02146C0B586ED6E48FAF7</code></td>
<td><code>0A1039860765902DFB0CACB7C56E4DD1</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 78 06 70 84 90 A2 66
0010 | B0 00 00 00 63 24 16 05 B8 1E E8 98 8B A0 21 46
0020 | C0 B5 86 ED 6E 48 FA F7 71 C1 F5 53 57 41 48 71
0030 | 77 74 D4 C4 99 5C F5 44 08 27 A9 1D 5F F3 26 2B
0040 | 57 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 84 EC 20 2B 91 A2 66
0010 | 60 00 00 00 63 24 16 05 0A 10 39 86 07 65 90 2D
0020 | FB 0C AC B7 C5 6E 4D D1 C9 35 9C B9 B3 E5 FD C9
0030 | ED B5 CC 2B 80 59 9F 26 08 2C 8C 80 64 FA 45 27
0040 | BF 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>017806708490A266</code></td>
<td><code>0184EC202B91A266</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>B0000000</code> (176 in decimal)</td>
<td><code>60000000</code> (96 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>B81EE8988BA02146C0B586ED6E48FAF7</code></td>
<td><code>0A1039860765902DFB0CACB7C56E4DD1</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>71C1F553574148717774D4C4995CF544</code></td>
<td><code>C9359CB9B3E5FDC9EDB5CC2B80599F26</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>0827A91D5FF3262B57000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2857847736481753943</td>
<td><code>082C8C8064FA4527BF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 3210081805592242111</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 = 2857847736481753943</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2857847736481753943 = 1463159681 * 1953202903</code></p>
<pre><code>p = 1463159681
q = 1953202903</code></pre>
<pre><code>pq = 3210081805592242111</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>3210081805592242111 = 1715908321 * 1870776991</code></p>
<pre><code>p = 1715908321
q = 1870776991</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 27 A9 1D 5F F3 26 2B 57 00 00 00
0010 | 04 57 36 0B 81 00 00 00 04 74 6B 82 D7 00 00 00
0020 | B8 1E E8 98 8B A0 21 46 C0 B5 86 ED 6E 48 FA F7
0030 | 71 C1 F5 53 57 41 48 71 77 74 D4 C4 99 5C F5 44
0040 | 6D AA 2E FD D6 10 27 7A BB 80 31 B3 B0 AA 71 7A
0050 | 03 95 0C BE 63 65 5A FD D4 A4 24 60 79 6B DE 22
<pre><code>0000 | 95 5F F5 A9 08 2C 8C 80 64 FA 45 27 BF 00 00 00
0010 | 04 66 46 AE E1 00 00 00 04 6F 81 CA 9F 00 00 00
0020 | 0A 10 39 86 07 65 90 2D FB 0C AC B7 C5 6E 4D D1
0030 | C9 35 9C B9 B3 E5 FD C9 ED B5 CC 2B 80 59 9F 26
0040 | 10 87 BD AD 57 39 94 4B 58 9D 6D D2 4C 7A B3 B0
0050 | 3E AA 4A B1 DF AF B8 2E 87 09 B5 18 85 0E 5B 8D
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 = 1953202903</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>0827A91D5FF3262B57000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2857847736481753943</td>
<td><code>082C8C8064FA4527BF000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 3210081805592242111</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>0457360B81000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1463159681</td>
<td><code>046646AEE1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1715908321</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>04746B82D7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1953202903</td>
<td><code>046F81CA9F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1870776991</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>B81EE8988BA02146C0B586ED6E48FAF7</code></td>
<td><code>0A1039860765902DFB0CACB7C56E4DD1</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>71C1F553574148717774D4C4995CF544</code></td>
<td><code>C9359CB9B3E5FDC9EDB5CC2B80599F26</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>6DAA2EFDD610277ABB8031B3B0AA717A</code> <code>03950CBE63655AFDD4A42460796BDE22</code></td>
<td><code>1087BDAD5739944B589D6DD24C7AB3B0</code> <code>3EAA4AB1DFAFB82E8709B518850E5B8D</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1953202903</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 = 955FF5A90827A91D5FF3262B570000000457360B8100000004746B82D7000000B81EE8988BA02146C0B586ED6E48FAF771C1F553574148717774D4C4995CF5446DAA2EFDD610277ABB8031B3B0AA717A03950CBE63655AFDD4A42460796BDE2202000000
random_padding_bytes = 69E092E50B0AD67D6BFD8CAF612C2B852A0E890E09EFB78D28319AA6B2827B8A2446068F0BB195CA24668AA5B0008FD3891EF71588DD1B48767830F926C9D83C7DD532AD2A9CA011B534E58042307AC4FB2502B9B228628D8A7B643B</code></pre>
<pre><code>data = 955FF5A9082C8C8064FA4527BF000000046646AEE1000000046F81CA9F0000000A1039860765902DFB0CACB7C56E4DD1C9359CB9B3E5FDC9EDB5CC2B80599F261087BDAD5739944B589D6DD24C7AB3B03EAA4AB1DFAFB82E8709B518850E5B8D02000000
random_padding_bytes = 5560F9B1379CF97E08C10982636784F8F4CD7009FE7E0A844801765254D5FC4260376EC1536F738A1977AD0419E1C975C25C864EF4CCB49D100EAC8392B4A40B8C53C4C39B480243243212DCDD36A230D3F42D3C0751E8887D00DEF0</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 = C616B3FD7EBD370E1C9280766678C627401185FE0714795CC93A8209D3DABA9D6C334D56F5AC96A121830F130182D46AB6931176C025FEDF6E201D0C999C6F2C3828CCA61866FDC5AE0E9E0CD9C823A048D85517E8C7245CA4BA133997419137B4E6E5E914C205BF4110857F42F80A50189CFD65A62B3F4FC6B53F03FB619E9B521F2B0AC481B496C0D071C92BE35014E7817F4CF4185278A8DB7D3ACA323699FC415CA25D86F830FD0253195AF221D0550152FD5F8A53BAB4B9287ED541ADEB48A65DC504D5CE595B992E6D237DFDB8C9F9A30D80531FCCC2127D5EFF4FD3DFBA5A181E7B7C5A709CD58D2BBF0D5D4CBA13D9D055ACD6D9C9753CC54160E351</code></pre>
<pre><code>encrypted_data = 4936B5905D07C165BB5F70F454A400AE62F36EA466CD3789B1FE5D9F9D5A819637F6833F2A63DE96FC42118B654A71E8B97952400DDCD71D8C896A20DEDA04A13ED61991CC0F9EEDBC65F0CEF5B1009F76DCF1CEEBAEC4D9C72960E0850203189810402A33E317E5A959549C4242453B883D3BE0AAE7DBAE55665B74931ED0C0AA6FB21B143725B817FEC6C2556CBB49124311500FE348427433AE302E47184A994726CCA192A1EEB9244FAF5CEC041F8AAF67D5B9217160656B4031FFBA23127B94F12A3EC809C69A2EF99CDFC1E0AB2762EB794C6EE3A85DC27F0F00CC4FCC61F1CC9ED28F92F876F3E7B8FAA4E93891A7EE64B39A293730F8BC3D03F7AE93</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 88 32 0D 00 84 90 A2 66
0010 | 40 01 00 00 BE E4 12 D7 B8 1E E8 98 8B A0 21 46
0020 | C0 B5 86 ED 6E 48 FA F7 71 C1 F5 53 57 41 48 71
0030 | 77 74 D4 C4 99 5C F5 44 04 57 36 0B 81 00 00 00
0040 | 04 74 6B 82 D7 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 C6 16 B3 FD 7E BD 37 0E 1C 92 80 76
0060 | 66 78 C6 27 40 11 85 FE 07 14 79 5C C9 3A 82 09
0070 | D3 DA BA 9D 6C 33 4D 56 F5 AC 96 A1 21 83 0F 13
0080 | 01 82 D4 6A B6 93 11 76 C0 25 FE DF 6E 20 1D 0C
0090 | 99 9C 6F 2C 38 28 CC A6 18 66 FD C5 AE 0E 9E 0C
00A0 | D9 C8 23 A0 48 D8 55 17 E8 C7 24 5C A4 BA 13 39
00B0 | 97 41 91 37 B4 E6 E5 E9 14 C2 05 BF 41 10 85 7F
00C0 | 42 F8 0A 50 18 9C FD 65 A6 2B 3F 4F C6 B5 3F 03
00D0 | FB 61 9E 9B 52 1F 2B 0A C4 81 B4 96 C0 D0 71 C9
00E0 | 2B E3 50 14 E7 81 7F 4C F4 18 52 78 A8 DB 7D 3A
00F0 | CA 32 36 99 FC 41 5C A2 5D 86 F8 30 FD 02 53 19
0100 | 5A F2 21 D0 55 01 52 FD 5F 8A 53 BA B4 B9 28 7E
0110 | D5 41 AD EB 48 A6 5D C5 04 D5 CE 59 5B 99 2E 6D
0120 | 23 7D FD B8 C9 F9 A3 0D 80 53 1F CC C2 12 7D 5E
0130 | FF 4F D3 DF BA 5A 18 1E 7B 7C 5A 70 9C D5 8D 2B
0140 | BF 0D 5D 4C BA 13 D9 D0 55 AC D6 D9 C9 75 3C C5
0150 | 41 60 E3 51</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 AC 1B 03 00 2B 91 A2 66
0010 | 40 01 00 00 BE E4 12 D7 0A 10 39 86 07 65 90 2D
0020 | FB 0C AC B7 C5 6E 4D D1 C9 35 9C B9 B3 E5 FD C9
0030 | ED B5 CC 2B 80 59 9F 26 04 66 46 AE E1 00 00 00
0040 | 04 6F 81 CA 9F 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 49 36 B5 90 5D 07 C1 65 BB 5F 70 F4
0060 | 54 A4 00 AE 62 F3 6E A4 66 CD 37 89 B1 FE 5D 9F
0070 | 9D 5A 81 96 37 F6 83 3F 2A 63 DE 96 FC 42 11 8B
0080 | 65 4A 71 E8 B9 79 52 40 0D DC D7 1D 8C 89 6A 20
0090 | DE DA 04 A1 3E D6 19 91 CC 0F 9E ED BC 65 F0 CE
00A0 | F5 B1 00 9F 76 DC F1 CE EB AE C4 D9 C7 29 60 E0
00B0 | 85 02 03 18 98 10 40 2A 33 E3 17 E5 A9 59 54 9C
00C0 | 42 42 45 3B 88 3D 3B E0 AA E7 DB AE 55 66 5B 74
00D0 | 93 1E D0 C0 AA 6F B2 1B 14 37 25 B8 17 FE C6 C2
00E0 | 55 6C BB 49 12 43 11 50 0F E3 48 42 74 33 AE 30
00F0 | 2E 47 18 4A 99 47 26 CC A1 92 A1 EE B9 24 4F AF
0100 | 5C EC 04 1F 8A AF 67 D5 B9 21 71 60 65 6B 40 31
0110 | FF BA 23 12 7B 94 F1 2A 3E C8 09 C6 9A 2E F9 9C
0120 | DF C1 E0 AB 27 62 EB 79 4C 6E E3 A8 5D C2 7F 0F
0130 | 00 CC 4F CC 61 F1 CC 9E D2 8F 92 F8 76 F3 E7 B8
0140 | FA A4 E9 38 91 A7 EE 64 B3 9A 29 37 30 F8 BC 3D
0150 | 03 F7 AE 93</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 = 69E092E50B0AD67D6BFD8CAF612C2B852A0E890E09EFB78D28319AA6B
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>88320D008490A266</code></td>
<td><code>AC1B03002B91A266</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 = 69E092E50B0AD67D6BFD8CAF612C2B852A0E890E09EFB78D28319AA6B
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>B81EE8988BA02146C0B586ED6E48FAF7</code></td>
<td><code>0A1039860765902DFB0CACB7C56E4DD1</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>71C1F553574148717774D4C4995CF544</code></td>
<td><code>C9359CB9B3E5FDC9EDB5CC2B80599F26</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>0457360B81000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1463159681</td>
<td><code>046646AEE1000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1715908321</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>04746B82D7000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1953202903</td>
<td><code>046F81CA9F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1870776991</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 = 69E092E50B0AD67D6BFD8CAF612C2B852A0E890E09EFB78D28319AA6B
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE000100C616B3FD7EBD370E1C928076</code> <code>6678C627401185FE0714795CC93A8209</code> <code>D3DABA9D6C334D56F5AC96A121830F13</code> <code>0182D46AB6931176C025FEDF6E201D0C</code> <code>999C6F2C3828CCA61866FDC5AE0E9E0C</code> <code>D9C823A048D85517E8C7245CA4BA1339</code> <code>97419137B4E6E5E914C205BF4110857F</code> <code>42F80A50189CFD65A62B3F4FC6B53F03</code> <code>FB619E9B521F2B0AC481B496C0D071C9</code> <code>2BE35014E7817F4CF4185278A8DB7D3A</code> <code>CA323699FC415CA25D86F830FD025319</code> <code>5AF221D0550152FD5F8A53BAB4B9287E</code> <code>D541ADEB48A65DC504D5CE595B992E6D</code> <code>237DFDB8C9F9A30D80531FCCC2127D5E</code> <code>FF4FD3DFBA5A181E7B7C5A709CD58D2B</code> <code>BF0D5D4CBA13D9D055ACD6D9C9753CC5</code><br> <code>4160E351</code></td>
<td><code>FE0001004936B5905D07C165BB5F70F4</code> <code>54A400AE62F36EA466CD3789B1FE5D9F</code> <code>9D5A819637F6833F2A63DE96FC42118B</code> <code>654A71E8B97952400DDCD71D8C896A20</code> <code>DEDA04A13ED61991CC0F9EEDBC65F0CE</code> <code>F5B1009F76DCF1CEEBAEC4D9C72960E0</code> <code>850203189810402A33E317E5A959549C</code> <code>4242453B883D3BE0AAE7DBAE55665B74</code> <code>931ED0C0AA6FB21B143725B817FEC6C2</code> <code>556CBB49124311500FE348427433AE30</code> <code>2E47184A994726CCA192A1EEB9244FAF</code> <code>5CEC041F8AAF67D5B9217160656B4031</code> <code>FFBA23127B94F12A3EC809C69A2EF99C</code> <code>DFC1E0AB2762EB794C6EE3A85DC27F0F</code> <code>00CC4FCC61F1CC9ED28F92F876F3E7B8</code> <code>FAA4E93891A7EE64B39A293730F8BC3D</code><br> <code>03F7AE93</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 69E092E50B0AD67D6BFD8CAF612C2B852A0E890E09EFB78D28319AA6B
<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 F8 96 3F 85 90 A2 66
0010 | 7C 02 00 00 5C 07 E8 D0 B8 1E E8 98 8B A0 21 46
0020 | C0 B5 86 ED 6E 48 FA F7 71 C1 F5 53 57 41 48 71
0030 | 77 74 D4 C4 99 5C F5 44 FE 50 02 00 47 5B BE CE
0040 | 6C 46 22 4C C4 C5 67 9D 72 3D 24 59 8D 98 65 4C
0050 | BD 0D D1 56 F6 12 4B 11 18 D7 5B 41 5D 29 3D A5
0060 | 9E E6 E5 98 C5 BF 7B 7D F1 7A 3D 5D D7 0B 34 FD
0070 | 12 29 90 34 99 C5 03 12 B1 B9 BD BD 9C 1F A9 67
0080 | 95 0B EF BC F4 AF 43 AB DF BE 33 E3 88 5A 6E 62
0090 | BF ED DB 58 30 93 66 16 E4 AF 9B 89 BF 75 26 99
00A0 | 70 5A 61 0C BA BA 62 AB 5A EF 88 1F 95 54 69 3B
00B0 | 72 F0 FD D0 54 C8 73 6C D3 38 D7 5F 0D C8 0C 13
00C0 | C2 DC 1D BB ED 4B 48 93 34 58 D9 B0 B3 5D 8A 2D
00D0 | 5A 15 11 66 E2 07 11 6E 43 B7 24 B3 77 EA E3 30
00E0 | A5 45 74 6C 6F E4 59 F3 49 74 34 C4 59 E5 9E E6
00F0 | 4C D0 A8 DE C0 E0 96 4D 6D 70 DB 0F ED 7E FC B4
0100 | B1 BB 3D 09 8A 2A 48 81 27 88 2D 07 B5 02 03 3A
0110 | 06 1F E1 AF A8 46 75 74 15 08 6E E6 78 C0 43 CE
0120 | F9 06 F4 D5 1E 08 55 F0 05 88 3A 31 1C ED F0 2F
0130 | B9 35 AF 67 89 C8 BE 18 C3 3E BE AE DF 34 04 A0
0140 | 46 E9 37 47 18 7E BF E7 15 B4 07 73 63 57 FB D1
0150 | 2D B4 8D 20 0F D4 DA 76 BE B5 2F 1B 8C A0 66 DE
0160 | F5 6B B2 69 C8 0F 0E 38 81 AE 1A 10 01 2B D4 49
0170 | AB 41 7A 63 84 D8 6B F6 99 A7 98 9E BD 56 6A FD
0180 | A4 AB A1 76 A0 1F 25 46 25 CC D3 4E A8 5E 14 77
0190 | 30 DF AA BC 9F AB 5C D8 2F A6 C2 69 64 E2 04 44
01A0 | 69 AA 8A B5 07 78 DA 3C 33 2A F8 DA B7 F3 EF CA
01B0 | 19 5F ED 61 57 2B 0E C4 01 EB C5 52 81 8F 48 25
01C0 | 07 78 B2 00 7F 5F 72 CE E3 F0 1C B8 64 3C 0F 85
01D0 | CF 39 A7 6C 19 FB EE E6 C0 FE C3 B0 4D 22 79 02
01E0 | 86 03 E1 44 B8 BE D6 3C CA 16 8B F8 3E 1D 66 E0
01F0 | 47 E0 64 3A 1B 90 39 9F 5E 49 1E B8 1D 39 61 ED
0200 | 2C 0A 21 44 33 38 A4 7C 62 26 62 44 8E 13 47 F3
0210 | 04 DD C9 EF 9B 5C 91 FA 09 87 26 1D 8B 08 5F 2B
0220 | F2 77 3F AE 15 CC 42 78 0C 07 91 65 34 4D F2 4C
0230 | E1 FF 4A 9F B0 F0 2C E3 F0 10 6E 85 29 D2 1F 75
0240 | 55 FB AC 26 3A 42 0D DA B1 A6 CC C7 F6 33 6B 98
0250 | 53 B8 4E C5 AE 67 CE 63 8C A1 01 FE 04 14 7E 64
0260 | A0 D5 03 9D D1 70 07 B0 2A EE B3 73 45 58 E2 53
0270 | 78 60 AA 99 0A 5D FD 6B E4 8A CE 6E DE 1D 72 B8
0280 | 54 43 B2 D2 60 56 CE 66 32 01 F5 AE</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C8 BA F5 2B 91 A2 66
0010 | 88 02 00 00 5C 07 E8 D0 0A 10 39 86 07 65 90 2D
0020 | FB 0C AC B7 C5 6E 4D D1 C9 35 9C B9 B3 E5 FD C9
0030 | ED B5 CC 2B 80 59 9F 26 FE 50 02 00 50 79 4F F6
0040 | F5 15 C8 15 AE B8 2B 19 BB FD B1 40 17 BD 59 29
0050 | FC 83 EA A9 41 65 E2 21 F6 13 2F 04 E9 A1 D2 69
0060 | 07 7A 43 4C 3D 44 9F E8 ED 47 BA 5B 88 C8 62 E8
0070 | A7 22 1E 05 AF D6 31 22 C9 EB 5B 3A 80 08 2F 44
0080 | 1E F0 BE 61 17 E9 AF F9 FE 72 D6 DF EC B5 9F 4D
0090 | 78 50 70 60 E0 11 42 B0 F4 53 42 4E 26 C0 A7 7E
00A0 | 7A C8 14 11 D8 86 5F 01 3F F2 BE 0A F8 03 A3 AA
00B0 | 80 6F 2A 86 14 23 F2 83 4E D5 AF 67 69 8D B6 5D
00C0 | F8 25 5C 2A 1C BD 02 EA D0 B9 AB 07 64 47 50 FB
00D0 | 0E DB EF 41 ED CE E4 41 DD D9 94 70 A7 59 F5 53
00E0 | 0F B6 5E E0 ED 80 6F 00 06 FF 1F 65 E7 5F 13 F4
00F0 | 2E 0B 37 A5 6D 92 A3 CA CB 02 E8 BB 97 8B EB 33
0100 | D8 50 3F 46 D2 10 AC 2B 9A 13 24 6A E4 3A 0B BD
0110 | 38 C3 E9 8C 5D 00 48 97 FE 50 FA 9A D6 CA 19 E0
0120 | 76 BF 59 AF D2 C7 65 93 81 C3 42 D8 36 A9 E7 EA
0130 | A4 25 7E 42 12 60 23 3A 3A 2F 5C 08 A7 B6 91 E9
0140 | B0 C7 4A 7E 15 5A 47 3A 9E E1 F7 AA 24 DA 0B A1
0150 | ED 68 D3 F0 A9 E1 0B 87 9D 64 FC 37 49 E1 97 30
0160 | 2C 34 B7 BD 25 BD 83 40 8E 9E 49 63 AA D2 3C 7F
0170 | A9 ED A1 9E EE 5B AB 9D B3 EC 9E FB 40 97 12 60
0180 | 94 CA 2A 81 15 83 23 4F 79 AC AC 6D FD 71 3C 18
0190 | F6 90 5E A4 20 78 DA 22 7E 34 0F 34 3E 7C B3 3E
01A0 | 2D 12 6E B3 32 7B 13 81 36 78 51 17 8A 7A 1F 6D
01B0 | 34 B0 39 59 94 AE 50 9D BF AA BB AF B1 C8 CF 6A
01C0 | 44 31 BE C6 C0 C5 7C AC 6C 87 48 3F 49 1C 3D F8
01D0 | C7 50 24 68 7E 67 0F 11 FD B8 08 8E 71 CC CB 88
01E0 | 91 48 28 A4 EE 1B A3 12 8E 58 C1 32 B3 7F 2F B6
01F0 | EE 2D 30 51 CC FC 76 F1 95 BF 5D DC 0C EF DB B3
0200 | 93 AE 5A 23 40 54 52 19 1E F6 B7 3B 44 A2 4A D0
0210 | 45 08 10 18 AC 05 97 6D 6C 15 45 78 20 B7 45 0A
0220 | 65 6E 88 30 BB 5A 82 A5 29 51 1D F4 D9 2D C4 02
0230 | 95 C5 5B AD 0C 5F 97 FD 36 DB 04 1E FD 0A E0 B3
0240 | 20 D3 50 4D 00 72 3E 81 8D 8B B5 EC 76 B8 59 71
0250 | FC D9 B8 C3 A2 34 DE 92 5E 15 08 6A DE 56 4E 85
0260 | A9 1D 2E EA D7 30 52 E2 99 48 20 EE 60 D4 B8 5C
0270 | 21 25 20 94 CD BC 19 68 FE CE AD 84 DB 66 51 ED
0280 | FA 0B FB F9 EA BB CA 7E AC 80 16 B5</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 = 69E092E50B0AD67D6BFD8CAF612C2B852A0E890E09EFB78D28319AA6B
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01F8963F8590A266</code></td>
<td><code>01C8BAF52B91A266</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>7C020000</code> (636 in decimal)</td>
<td><code>88020000</code> (648 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 69E092E50B0AD67D6BFD8CAF612C2B852A0E890E09EFB78D28319AA6B
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>B81EE8988BA02146C0B586ED6E48FAF7</code></td>
<td><code>0A1039860765902DFB0CACB7C56E4DD1</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>71C1F553574148717774D4C4995CF544</code></td>
<td><code>C9359CB9B3E5FDC9EDB5CC2B80599F26</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200475BBECE6C46224CC4C5679D</code> <code>723D24598D98654CBD0DD156F6124B11</code> <code>18D75B415D293DA59EE6E598C5BF7B7D</code> <code>F17A3D5DD70B34FD1229903499C50312</code> <code>B1B9BDBD9C1FA967950BEFBCF4AF43AB</code> <code>DFBE33E3885A6E62BFEDDB5830936616</code> <code>E4AF9B89BF752699705A610CBABA62AB</code> <code>5AEF881F9554693B72F0FDD054C8736C</code> <code>D338D75F0DC80C13C2DC1DBBED4B4893</code> <code>3458D9B0B35D8A2D5A151166E207116E</code> <code>43B724B377EAE330A545746C6FE459F3</code> <code>497434C459E59EE64CD0A8DEC0E0964D</code> <code>6D70DB0FED7EFCB4B1BB3D098A2A4881</code> <code>27882D07B502033A061FE1AFA8467574</code> <code>15086EE678C043CEF906F4D51E0855F0</code> <code>05883A311CEDF02FB935AF6789C8BE18</code> <code>C33EBEAEDF3404A046E93747187EBFE7</code> <code>15B407736357FBD12DB48D200FD4DA76</code> <code>BEB52F1B8CA066DEF56BB269C80F0E38</code> <code>81AE1A10012BD449AB417A6384D86BF6</code> <code>99A7989EBD566AFDA4ABA176A01F2546</code> <code>25CCD34EA85E147730DFAABC9FAB5CD8</code> <code>2FA6C26964E2044469AA8AB50778DA3C</code> <code>332AF8DAB7F3EFCA195FED61572B0EC4</code> <code>01EBC552818F48250778B2007F5F72CE</code> <code>E3F01CB8643C0F85CF39A76C19FBEEE6</code> <code>C0FEC3B04D2279028603E144B8BED63C</code> <code>CA168BF83E1D66E047E0643A1B90399F</code> <code>5E491EB81D3961ED2C0A21443338A47C</code> <code>622662448E1347F304DDC9EF9B5C91FA</code> <code>0987261D8B085F2BF2773FAE15CC4278</code> <code>0C079165344DF24CE1FF4A9FB0F02CE3</code> <code>F0106E8529D21F7555FBAC263A420DDA</code> <code>B1A6CCC7F6336B9853B84EC5AE67CE63</code> <code>8CA101FE04147E64A0D5039DD17007B0</code> <code>2AEEB3734558E2537860AA990A5DFD6B</code> <code>E48ACE6EDE1D72B85443B2D26056CE66</code><br> <code>3201F5AE</code></td>
<td><code>FE50020050794FF6F515C815AEB82B19</code> <code>BBFDB14017BD5929FC83EAA94165E221</code> <code>F6132F04E9A1D269077A434C3D449FE8</code> <code>ED47BA5B88C862E8A7221E05AFD63122</code> <code>C9EB5B3A80082F441EF0BE6117E9AFF9</code> <code>FE72D6DFECB59F4D78507060E01142B0</code> <code>F453424E26C0A77E7AC81411D8865F01</code> <code>3FF2BE0AF803A3AA806F2A861423F283</code> <code>4ED5AF67698DB65DF8255C2A1CBD02EA</code> <code>D0B9AB07644750FB0EDBEF41EDCEE441</code> <code>DDD99470A759F5530FB65EE0ED806F00</code> <code>06FF1F65E75F13F42E0B37A56D92A3CA</code> <code>CB02E8BB978BEB33D8503F46D210AC2B</code> <code>9A13246AE43A0BBD38C3E98C5D004897</code> <code>FE50FA9AD6CA19E076BF59AFD2C76593</code> <code>81C342D836A9E7EAA4257E421260233A</code> <code>3A2F5C08A7B691E9B0C74A7E155A473A</code> <code>9EE1F7AA24DA0BA1ED68D3F0A9E10B87</code> <code>9D64FC3749E197302C34B7BD25BD8340</code> <code>8E9E4963AAD23C7FA9EDA19EEE5BAB9D</code> <code>B3EC9EFB4097126094CA2A811583234F</code> <code>79ACAC6DFD713C18F6905EA42078DA22</code> <code>7E340F343E7CB33E2D126EB3327B1381</code> <code>367851178A7A1F6D34B0395994AE509D</code> <code>BFAABBAFB1C8CF6A4431BEC6C0C57CAC</code> <code>6C87483F491C3DF8C75024687E670F11</code> <code>FDB8088E71CCCB88914828A4EE1BA312</code> <code>8E58C132B37F2FB6EE2D3051CCFC76F1</code> <code>95BF5DDC0CEFDBB393AE5A2340545219</code> <code>1EF6B73B44A24AD045081018AC05976D</code> <code>6C15457820B7450A656E8830BB5A82A5</code> <code>29511DF4D92DC40295C55BAD0C5F97FD</code> <code>36DB041EFD0AE0B320D3504D00723E81</code> <code>8D8BB5EC76B85971FCD9B8C3A234DE92</code> <code>5E15086ADE564E85A91D2EEAD73052E2</code> <code>994820EE60D4B85C21252094CDBC1968</code> <code>FECEAD84DB6651EDFA0BFBF9EABBCA7E</code><br> <code>AC8016B5</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 69E092E50B0AD67D6BFD8CAF612C2B852A0E890E09EFB78D28319AA6B
<!-- 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 = 475BBECE6C46224CC4C5679D723D24598D98654CBD0DD156F6124B1118D75B415D293DA59EE6E598C5BF7B7DF17A3D5DD70B34FD1229903499C50312B1B9BDBD9C1FA967950BEFBCF4AF43ABDFBE33E3885A6E62BFEDDB5830936616E4AF9B89BF752699705A610CBABA62AB5AEF881F9554693B72F0FDD054C8736CD338D75F0DC80C13C2DC1DBBED4B48933458D9B0B35D8A2D5A151166E207116E43B724B377EAE330A545746C6FE459F3497434C459E59EE64CD0A8DEC0E0964D6D70DB0FED7EFCB4B1BB3D098A2A488127882D07B502033A061FE1AFA846757415086EE678C043CEF906F4D51E0855F005883A311CEDF02FB935AF6789C8BE18C33EBEAEDF3404A046E93747187EBFE715B407736357FBD12DB48D200FD4DA76BEB52F1B8CA066DEF56BB269C80F0E3881AE1A10012BD449AB417A6384D86BF699A7989EBD566AFDA4ABA176A01F254625CCD34EA85E147730DFAABC9FAB5CD82FA6C26964E2044469AA8AB50778DA3C332AF8DAB7F3EFCA195FED61572B0EC401EBC552818F48250778B2007F5F72CEE3F01CB8643C0F85CF39A76C19FBEEE6C0FEC3B04D2279028603E144B8BED63CCA168BF83E1D66E047E0643A1B90399F5E491EB81D3961ED2C0A21443338A47C622662448E1347F304DDC9EF9B5C91FA0987261D8B085F2BF2773FAE15CC42780C079165344DF24CE1FF4A9FB0F02CE3F0106E8529D21F7555FBAC263A420DDAB1A6CCC7F6336B9853B84EC5AE67CE638CA101FE04147E64A0D5039DD17007B02AEEB3734558E2537860AA990A5DFD6BE48ACE6EDE1D72B85443B2D26056CE663201F5AE
tmp_aes_key = C7662A7CD11630CAE946C0E8C90E28B8291DA1C29130D81D8341A55D47C1F4BE
tmp_aes_iv = F69ACF2331B4EDB15931C58AF8A570F560D6281C7EE7C2F40868B76A6DAA2EFD</code></pre>
<pre><code>encrypted_answer = 50794FF6F515C815AEB82B19BBFDB14017BD5929FC83EAA94165E221F6132F04E9A1D269077A434C3D449FE8ED47BA5B88C862E8A7221E05AFD63122C9EB5B3A80082F441EF0BE6117E9AFF9FE72D6DFECB59F4D78507060E01142B0F453424E26C0A77E7AC81411D8865F013FF2BE0AF803A3AA806F2A861423F2834ED5AF67698DB65DF8255C2A1CBD02EAD0B9AB07644750FB0EDBEF41EDCEE441DDD99470A759F5530FB65EE0ED806F0006FF1F65E75F13F42E0B37A56D92A3CACB02E8BB978BEB33D8503F46D210AC2B9A13246AE43A0BBD38C3E98C5D004897FE50FA9AD6CA19E076BF59AFD2C7659381C342D836A9E7EAA4257E421260233A3A2F5C08A7B691E9B0C74A7E155A473A9EE1F7AA24DA0BA1ED68D3F0A9E10B879D64FC3749E197302C34B7BD25BD83408E9E4963AAD23C7FA9EDA19EEE5BAB9DB3EC9EFB4097126094CA2A811583234F79ACAC6DFD713C18F6905EA42078DA227E340F343E7CB33E2D126EB3327B1381367851178A7A1F6D34B0395994AE509DBFAABBAFB1C8CF6A4431BEC6C0C57CAC6C87483F491C3DF8C75024687E670F11FDB8088E71CCCB88914828A4EE1BA3128E58C132B37F2FB6EE2D3051CCFC76F195BF5DDC0CEFDBB393AE5A23405452191EF6B73B44A24AD045081018AC05976D6C15457820B7450A656E8830BB5A82A529511DF4D92DC40295C55BAD0C5F97FD36DB041EFD0AE0B320D3504D00723E818D8BB5EC76B85971FCD9B8C3A234DE925E15086ADE564E85A91D2EEAD73052E2994820EE60D4B85C21252094CDBC1968FECEAD84DB6651EDFA0BFBF9EABBCA7EAC8016B5
tmp_aes_key = CF42CE543CA64B8450A2858436C60B94FF825A523F7C2B217DEBFEDD120851B6
tmp_aes_iv = 672B46D3963F476DFB337FE5A0F2947764124A707F0F751671B2EF291087BDAD</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = 645ECD8175ED7E2EECAFB6836F63F77DF4997C77BA0D89B5B81EE8988BA02146C0B586ED6E48FAF771C1F553574148717774D4C4995CF54403000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFEFF0000E1423A539D948A59D31D200D4B7CC58F76380EDCF090A93A024CDF0C01D95C2B1B336CE19D2B7A5DCC3A0D879D3488006C2EA97344FBFEA5AF18DF21780867A15C9C87ABDFB53499CC37FBF6574233F43C08290D2928F375575CD55387228123C14A5AB18AF99BA0E1BFCDC81ADA129AA4311EC81368FCA5743615AE2B5227D9C347158153FCB062E6C182DFBC68A62B11DD42EB578DA81E6C07342C20213569D312360D0F802E8D9EE01A611081C1C682C4218370F0E073D6138DBE6E0C09DC07AEED430A6D965E3C5B3F4E3627CA8F1CCBBAA20790C84F124B815458D123D45BBEAAD191DCB294646BFF46A3741F5B4312C80FE993C4E14779C3DC2A0FD0008590A266EECFE0BACF892D30
answer = BA0D89B5B81EE8988BA02146C0B586ED6E48FAF771C1F553574148717774D4C4995CF54403000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFEFF0000E1423A539D948A59D31D200D4B7CC58F76380EDCF090A93A024CDF0C01D95C2B1B336CE19D2B7A5DCC3A0D879D3488006C2EA97344FBFEA5AF18DF21780867A15C9C87ABDFB53499CC37FBF6574233F43C08290D2928F375575CD55387228123C14A5AB18AF99BA0E1BFCDC81ADA129AA4311EC81368FCA5743615AE2B5227D9C347158153FCB062E6C182DFBC68A62B11DD42EB578DA81E6C07342C20213569D312360D0F802E8D9EE01A611081C1C682C4218370F0E073D6138DBE6E0C09DC07AEED430A6D965E3C5B3F4E3627CA8F1CCBBAA20790C84F124B815458D123D45BBEAAD191DCB294646BFF46A3741F5B4312C80FE993C4E14779C3DC2A0FD0008590A266EECFE0BACF892D30</code></pre>
<pre><code>answer_with_hash = 56D52B1FE4961315681D5CCC0AF1CE7F6099165EBA0D89B50A1039860765902DFB0CACB7C56E4DD1C9359CB9B3E5FDC9EDB5CC2B80599F2603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010073A185573E261B72086F130E6CF8BD8F6628575E840FABD8E422B65EF77AA31E7DC312263D43852BC5BD169FB181A6F79AED9A7D777D199D8F5998E2767680CBB4B038687EF52D6221688A39476F5167175211D52E3C774161C2E64448DC92ECFC123058AB29EC8F481FA99F779DCD48FB83942AB1F72FDAAFC3009629FF47BEE6C9DBEEB915CDEA6FB825E64BA3EA32E7C1D4BA7569A6D7C8F4BC9FB2DF84759412B6E78F219274833071BCF440437D6042A5C51DFE8217E0C15EDF03F9A9D181C922DDB8DD139E538860AA83B35799984E6680658DC0173E53B5746E03714312FA93D0ED398C7158093442CD650134C3C6DF5C98CB8E4494FBA2DEE763F36B2B91A266E701676115091A16
answer = BA0D89B50A1039860765902DFB0CACB7C56E4DD1C9359CB9B3E5FDC9EDB5CC2B80599F2603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010073A185573E261B72086F130E6CF8BD8F6628575E840FABD8E422B65EF77AA31E7DC312263D43852BC5BD169FB181A6F79AED9A7D777D199D8F5998E2767680CBB4B038687EF52D6221688A39476F5167175211D52E3C774161C2E64448DC92ECFC123058AB29EC8F481FA99F779DCD48FB83942AB1F72FDAAFC3009629FF47BEE6C9DBEEB915CDEA6FB825E64BA3EA32E7C1D4BA7569A6D7C8F4BC9FB2DF84759412B6E78F219274833071BCF440437D6042A5C51DFE8217E0C15EDF03F9A9D181C922DDB8DD139E538860AA83B35799984E6680658DC0173E53B5746E03714312FA93D0ED398C7158093442CD650134C3C6DF5C98CB8E4494FBA2DEE763F36B2B91A266E701676115091A16</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 B8 1E E8 98 8B A0 21 46 C0 B5 86 ED
0010 | 6E 48 FA F7 71 C1 F5 53 57 41 48 71 77 74 D4 C4
0020 | 99 5C F5 44 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 0A 10 39 86 07 65 90 2D FB 0C AC B7
0010 | C5 6E 4D D1 C9 35 9C B9 B3 E5 FD C9 ED B5 CC 2B
0020 | 80 59 9F 26 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
@ -531,24 +531,24 @@ answer = BA0D89B5B81EE8988BA02146C0B586ED6E48FAF771C1F553574148717774D4C4995CF54
00F0 | E8 3E BE A0 F8 7F A9 FF 5E ED 70 05 0D ED 28 49
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 FF 00 00
0130 | E1 42 3A 53 9D 94 8A 59 D3 1D 20 0D 4B 7C C5 8F
0140 | 76 38 0E DC F0 90 A9 3A 02 4C DF 0C 01 D9 5C 2B
0150 | 1B 33 6C E1 9D 2B 7A 5D CC 3A 0D 87 9D 34 88 00
0160 | 6C 2E A9 73 44 FB FE A5 AF 18 DF 21 78 08 67 A1
0170 | 5C 9C 87 AB DF B5 34 99 CC 37 FB F6 57 42 33 F4
0180 | 3C 08 29 0D 29 28 F3 75 57 5C D5 53 87 22 81 23
0190 | C1 4A 5A B1 8A F9 9B A0 E1 BF CD C8 1A DA 12 9A
01A0 | A4 31 1E C8 13 68 FC A5 74 36 15 AE 2B 52 27 D9
01B0 | C3 47 15 81 53 FC B0 62 E6 C1 82 DF BC 68 A6 2B
01C0 | 11 DD 42 EB 57 8D A8 1E 6C 07 34 2C 20 21 35 69
01D0 | D3 12 36 0D 0F 80 2E 8D 9E E0 1A 61 10 81 C1 C6
01E0 | 82 C4 21 83 70 F0 E0 73 D6 13 8D BE 6E 0C 09 DC
01F0 | 07 AE ED 43 0A 6D 96 5E 3C 5B 3F 4E 36 27 CA 8F
0200 | 1C CB BA A2 07 90 C8 4F 12 4B 81 54 58 D1 23 D4
0210 | 5B BE AA D1 91 DC B2 94 64 6B FF 46 A3 74 1F 5B
0220 | 43 12 C8 0F E9 93 C4 E1 47 79 C3 DC 2A 0F D0 00
0230 | 85 90 A2 66</code></pre>
0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
0130 | 73 A1 85 57 3E 26 1B 72 08 6F 13 0E 6C F8 BD 8F
0140 | 66 28 57 5E 84 0F AB D8 E4 22 B6 5E F7 7A A3 1E
0150 | 7D C3 12 26 3D 43 85 2B C5 BD 16 9F B1 81 A6 F7
0160 | 9A ED 9A 7D 77 7D 19 9D 8F 59 98 E2 76 76 80 CB
0170 | B4 B0 38 68 7E F5 2D 62 21 68 8A 39 47 6F 51 67
0180 | 17 52 11 D5 2E 3C 77 41 61 C2 E6 44 48 DC 92 EC
0190 | FC 12 30 58 AB 29 EC 8F 48 1F A9 9F 77 9D CD 48
01A0 | FB 83 94 2A B1 F7 2F DA AF C3 00 96 29 FF 47 BE
01B0 | E6 C9 DB EE B9 15 CD EA 6F B8 25 E6 4B A3 EA 32
01C0 | E7 C1 D4 BA 75 69 A6 D7 C8 F4 BC 9F B2 DF 84 75
01D0 | 94 12 B6 E7 8F 21 92 74 83 30 71 BC F4 40 43 7D
01E0 | 60 42 A5 C5 1D FE 82 17 E0 C1 5E DF 03 F9 A9 D1
01F0 | 81 C9 22 DD B8 DD 13 9E 53 88 60 AA 83 B3 57 99
0200 | 98 4E 66 80 65 8D C0 17 3E 53 B5 74 6E 03 71 43
0210 | 12 FA 93 D0 ED 39 8C 71 58 09 34 42 CD 65 01 34
0220 | C3 C6 DF 5C 98 CB 8E 44 94 FB A2 DE E7 63 F3 6B
0230 | 2B 91 A2 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 = BA0D89B5B81EE8988BA02146C0B586ED6E48FAF771C1F553574148717774D4C4995CF54
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>B81EE8988BA02146C0B586ED6E48FAF7</code></td>
<td><code>0A1039860765902DFB0CACB7C56E4DD1</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>71C1F553574148717774D4C4995CF544</code></td>
<td><code>C9359CB9B3E5FDC9EDB5CC2B80599F26</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B5B81EE8988BA02146C0B586ED6E48FAF771C1F553574148717774D4C4995CF54
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FEFF0000E1423A539D948A59D31D200D</code> <code>4B7CC58F76380EDCF090A93A024CDF0C</code> <code>01D95C2B1B336CE19D2B7A5DCC3A0D87</code> <code>9D3488006C2EA97344FBFEA5AF18DF21</code> <code>780867A15C9C87ABDFB53499CC37FBF6</code> <code>574233F43C08290D2928F375575CD553</code> <code>87228123C14A5AB18AF99BA0E1BFCDC8</code> <code>1ADA129AA4311EC81368FCA5743615AE</code> <code>2B5227D9C347158153FCB062E6C182DF</code> <code>BC68A62B11DD42EB578DA81E6C07342C</code> <code>20213569D312360D0F802E8D9EE01A61</code> <code>1081C1C682C4218370F0E073D6138DBE</code> <code>6E0C09DC07AEED430A6D965E3C5B3F4E</code> <code>3627CA8F1CCBBAA20790C84F124B8154</code> <code>58D123D45BBEAAD191DCB294646BFF46</code> <code>A3741F5B4312C80FE993C4E14779C3DC</code><br> <code>2A0FD000</code></td>
<td><code>FE00010073A185573E261B72086F130E</code> <code>6CF8BD8F6628575E840FABD8E422B65E</code> <code>F77AA31E7DC312263D43852BC5BD169F</code> <code>B181A6F79AED9A7D777D199D8F5998E2</code> <code>767680CBB4B038687EF52D6221688A39</code> <code>476F5167175211D52E3C774161C2E644</code> <code>48DC92ECFC123058AB29EC8F481FA99F</code> <code>779DCD48FB83942AB1F72FDAAFC30096</code> <code>29FF47BEE6C9DBEEB915CDEA6FB825E6</code> <code>4BA3EA32E7C1D4BA7569A6D7C8F4BC9F</code> <code>B2DF84759412B6E78F219274833071BC</code> <code>F440437D6042A5C51DFE8217E0C15EDF</code> <code>03F9A9D181C922DDB8DD139E538860AA</code> <code>83B35799984E6680658DC0173E53B574</code> <code>6E03714312FA93D0ED398C7158093442</code> <code>CD650134C3C6DF5C98CB8E4494FBA2DE</code><br> <code>E763F36B</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>8590A266</code> (1721929861 in decimal)</td>
<td><code>2B91A266</code> (1721930027 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B5B81EE8988BA02146C0B586ED6E48FAF771C1F553574148717774D4C4995CF54
<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 = 664DFD427B63E3EE79EFAAED1F93B8D1F7618D5BC9EA96D1336BF949671FD574B373EA0094B4D3706E52B859C4C8C2B4A19DCF54BE54288C3482254D6F3C943405120EBCD82A3584EF18DDF4CB29ACAE679A5D2F9A66BE9681E322093618DCB00FCD6BB8FD162C0DEBD8D536DCD153A18729309098FAE7A2F88216D2E85A69CCDBB029F9445D7CBA61E07B10DCA5E2DDFC225E0F48DCF9894F0A1156581EA7E8DCA6AC795864254AE50AA078FCFF479AB50B300C9305616D4F903B15C91F4DE1177DF78416F9C4A8249DEE5C0B9043A509CEBB93DD16607E023720512AD579EBB97A3F769117DB7D1D850E61D2D2CD11313BA2CBFCE20EC2E70BB25028994FBF</code></pre>
<pre><code>b = E5AFB9BD1A8109B130D03FEA6DFD0FD35F43F5274812B439FD03FFD5C9F1198FA69356AB11FD14CBACE9D880706648EC6FC4C30A9B64E2715493F41A5878E46953CA3ABDDEFC785ED9520025F46589EA3F510DF9CBBC00C68E5662496B20A6AE65FFDBA3129F181EEC911239E56A0072390465C8E23D81FB8A7B8C97E3551E27FDCBB2ADA5ACD6BB85D83567F7CAC988292050BE57CA777BA270DBBD261425C2FE46B4B13E21E58DACB8669DDA31BD4E60A7D89C4B564C7AF7CD6E02E2277D01C7F5CFBB85CDB44F085738DEE5C28EDD1FE30921CD8AE5341AA44CFE3B20EB158D06BA71ACF535A9E365D3CDBB87B38CDDA60600B6FCFA20526A286663C10A69</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 = 05354DCA9AB51D8269F671246B9348819F09B3B9277BF3B56C839134610981632383BC24125794EF5EDB45135343DC24122F0B9334026D054C5C60DE07B86E0DD48F5A9D7D221F64FD01A9E3EF425CE98E6DC74FE800EAF28D8315D12094A1AA3448C43C183EF4D6272765ECDD6B694737062DCD55F1F1AE443B1D22B0D97AD56A9F49616B7BAEED6A6582BA61A1EEB628A3B15AB199772973E1090ABEFF8C3671DB7EA305F72CE409815BC4A89D8EA6BA48786E16E5DA2CDD06F054C78D5E532B1C642BE8071D82EBFE1F43217396030651B50C683131E0000FB13F6951C64CE291E77E9FDBC92CFDB64865D13AFDF81CA37D1A1A561CCE717BEA06C513CD4A</code></pre>
<pre><code>g_b = 86E93E1DF1F8460AE26C7A848264DBFF888F6126739A56EA5DD6C0788CC7F52A594F58ECED2C2E2005E5D2BF14503970BC4D9833CDCEB97A57E2E3EDDF3A7684C2A11AF274DD99760D4EFEDACF5B04F55BB215FA2A3F672D57CC3A3D9A13657FA6C33B81646A4B7353D5A9310EA25BB850932969E98B244B80C98E33BD3B9F884B03FB4751FB6B12E14B17362A89508F6E2044396AE62A08F24015FB583C7B7151807D88966CF4D6113D22A8CB2020B8765F9F8F244D4E38FDD66B806347FBC1C3FC8D3FA0B645611237104A469B8160A7817A36B87AB641C9540D5C6823A6E390D9A8C247DD89B8F4653F26800174BF6FE88CF7B61E4F653422FA19188FE3D4</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 B8 1E E8 98 8B A0 21 46 C0 B5 86 ED
0010 | 6E 48 FA F7 71 C1 F5 53 57 41 48 71 77 74 D4 C4
0020 | 99 5C F5 44 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 05 35 4D CA 9A B5 1D 82 69 F6 71 24 6B 93 48 81
0040 | 9F 09 B3 B9 27 7B F3 B5 6C 83 91 34 61 09 81 63
0050 | 23 83 BC 24 12 57 94 EF 5E DB 45 13 53 43 DC 24
0060 | 12 2F 0B 93 34 02 6D 05 4C 5C 60 DE 07 B8 6E 0D
0070 | D4 8F 5A 9D 7D 22 1F 64 FD 01 A9 E3 EF 42 5C E9
0080 | 8E 6D C7 4F E8 00 EA F2 8D 83 15 D1 20 94 A1 AA
0090 | 34 48 C4 3C 18 3E F4 D6 27 27 65 EC DD 6B 69 47
00A0 | 37 06 2D CD 55 F1 F1 AE 44 3B 1D 22 B0 D9 7A D5
00B0 | 6A 9F 49 61 6B 7B AE ED 6A 65 82 BA 61 A1 EE B6
00C0 | 28 A3 B1 5A B1 99 77 29 73 E1 09 0A BE FF 8C 36
00D0 | 71 DB 7E A3 05 F7 2C E4 09 81 5B C4 A8 9D 8E A6
00E0 | BA 48 78 6E 16 E5 DA 2C DD 06 F0 54 C7 8D 5E 53
00F0 | 2B 1C 64 2B E8 07 1D 82 EB FE 1F 43 21 73 96 03
0100 | 06 51 B5 0C 68 31 31 E0 00 0F B1 3F 69 51 C6 4C
0110 | E2 91 E7 7E 9F DB C9 2C FD B6 48 65 D1 3A FD F8
0120 | 1C A3 7D 1A 1A 56 1C CE 71 7B EA 06 C5 13 CD 4A</code></pre>
<pre><code>0000 | 54 B6 43 66 0A 10 39 86 07 65 90 2D FB 0C AC B7
0010 | C5 6E 4D D1 C9 35 9C B9 B3 E5 FD C9 ED B5 CC 2B
0020 | 80 59 9F 26 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 86 E9 3E 1D F1 F8 46 0A E2 6C 7A 84 82 64 DB FF
0040 | 88 8F 61 26 73 9A 56 EA 5D D6 C0 78 8C C7 F5 2A
0050 | 59 4F 58 EC ED 2C 2E 20 05 E5 D2 BF 14 50 39 70
0060 | BC 4D 98 33 CD CE B9 7A 57 E2 E3 ED DF 3A 76 84
0070 | C2 A1 1A F2 74 DD 99 76 0D 4E FE DA CF 5B 04 F5
0080 | 5B B2 15 FA 2A 3F 67 2D 57 CC 3A 3D 9A 13 65 7F
0090 | A6 C3 3B 81 64 6A 4B 73 53 D5 A9 31 0E A2 5B B8
00A0 | 50 93 29 69 E9 8B 24 4B 80 C9 8E 33 BD 3B 9F 88
00B0 | 4B 03 FB 47 51 FB 6B 12 E1 4B 17 36 2A 89 50 8F
00C0 | 6E 20 44 39 6A E6 2A 08 F2 40 15 FB 58 3C 7B 71
00D0 | 51 80 7D 88 96 6C F4 D6 11 3D 22 A8 CB 20 20 B8
00E0 | 76 5F 9F 8F 24 4D 4E 38 FD D6 6B 80 63 47 FB C1
00F0 | C3 FC 8D 3F A0 B6 45 61 12 37 10 4A 46 9B 81 60
0100 | A7 81 7A 36 B8 7A B6 41 C9 54 0D 5C 68 23 A6 E3
0110 | 90 D9 A8 C2 47 DD 89 B8 F4 65 3F 26 80 01 74 BF
0120 | 6F E8 8C F7 B6 1E 4F 65 34 22 FA 19 18 8F E3 D4</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 = BA0D89B5B81EE8988BA02146C0B586ED6E48FAF771C1F553574148717774D4C4995CF54
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>B81EE8988BA02146C0B586ED6E48FAF7</code></td>
<td><code>0A1039860765902DFB0CACB7C56E4DD1</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>71C1F553574148717774D4C4995CF544</code></td>
<td><code>C9359CB9B3E5FDC9EDB5CC2B80599F26</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE00010005354DCA9AB51D8269F67124</code> <code>6B9348819F09B3B9277BF3B56C839134</code> <code>610981632383BC24125794EF5EDB4513</code> <code>5343DC24122F0B9334026D054C5C60DE</code> <code>07B86E0DD48F5A9D7D221F64FD01A9E3</code> <code>EF425CE98E6DC74FE800EAF28D8315D1</code> <code>2094A1AA3448C43C183EF4D6272765EC</code> <code>DD6B694737062DCD55F1F1AE443B1D22</code> <code>B0D97AD56A9F49616B7BAEED6A6582BA</code> <code>61A1EEB628A3B15AB199772973E1090A</code> <code>BEFF8C3671DB7EA305F72CE409815BC4</code> <code>A89D8EA6BA48786E16E5DA2CDD06F054</code> <code>C78D5E532B1C642BE8071D82EBFE1F43</code> <code>217396030651B50C683131E0000FB13F</code> <code>6951C64CE291E77E9FDBC92CFDB64865</code> <code>D13AFDF81CA37D1A1A561CCE717BEA06</code><br> <code>C513CD4A</code></td>
<td><code>FE00010086E93E1DF1F8460AE26C7A84</code> <code>8264DBFF888F6126739A56EA5DD6C078</code> <code>8CC7F52A594F58ECED2C2E2005E5D2BF</code> <code>14503970BC4D9833CDCEB97A57E2E3ED</code> <code>DF3A7684C2A11AF274DD99760D4EFEDA</code> <code>CF5B04F55BB215FA2A3F672D57CC3A3D</code> <code>9A13657FA6C33B81646A4B7353D5A931</code> <code>0EA25BB850932969E98B244B80C98E33</code> <code>BD3B9F884B03FB4751FB6B12E14B1736</code> <code>2A89508F6E2044396AE62A08F24015FB</code> <code>583C7B7151807D88966CF4D6113D22A8</code> <code>CB2020B8765F9F8F244D4E38FDD66B80</code> <code>6347FBC1C3FC8D3FA0B645611237104A</code> <code>469B8160A7817A36B87AB641C9540D5C</code> <code>6823A6E390D9A8C247DD89B8F4653F26</code> <code>800174BF6FE88CF7B61E4F653422FA19</code><br> <code>188FE3D4</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 = BA0D89B5B81EE8988BA02146C0B586ED6E48FAF771C1F553574148717774D4C4995CF54
<!-- 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 = 54B64366B81EE8988BA02146C0B586ED6E48FAF771C1F553574148717774D4C4995CF5440000000000000000FE00010005354DCA9AB51D8269F671246B9348819F09B3B9277BF3B56C839134610981632383BC24125794EF5EDB45135343DC24122F0B9334026D054C5C60DE07B86E0DD48F5A9D7D221F64FD01A9E3EF425CE98E6DC74FE800EAF28D8315D12094A1AA3448C43C183EF4D6272765ECDD6B694737062DCD55F1F1AE443B1D22B0D97AD56A9F49616B7BAEED6A6582BA61A1EEB628A3B15AB199772973E1090ABEFF8C3671DB7EA305F72CE409815BC4A89D8EA6BA48786E16E5DA2CDD06F054C78D5E532B1C642BE8071D82EBFE1F43217396030651B50C683131E0000FB13F6951C64CE291E77E9FDBC92CFDB64865D13AFDF81CA37D1A1A561CCE717BEA06C513CD4A
padding = 713B2E085D8855979577F563
tmp_aes_key = C7662A7CD11630CAE946C0E8C90E28B8291DA1C29130D81D8341A55D47C1F4BE
tmp_aes_iv = F69ACF2331B4EDB15931C58AF8A570F560D6281C7EE7C2F40868B76A6DAA2EFD</code></pre>
<pre><code>data = 54B643660A1039860765902DFB0CACB7C56E4DD1C9359CB9B3E5FDC9EDB5CC2B80599F260000000000000000FE00010086E93E1DF1F8460AE26C7A848264DBFF888F6126739A56EA5DD6C0788CC7F52A594F58ECED2C2E2005E5D2BF14503970BC4D9833CDCEB97A57E2E3EDDF3A7684C2A11AF274DD99760D4EFEDACF5B04F55BB215FA2A3F672D57CC3A3D9A13657FA6C33B81646A4B7353D5A9310EA25BB850932969E98B244B80C98E33BD3B9F884B03FB4751FB6B12E14B17362A89508F6E2044396AE62A08F24015FB583C7B7151807D88966CF4D6113D22A8CB2020B8765F9F8F244D4E38FDD66B806347FBC1C3FC8D3FA0B645611237104A469B8160A7817A36B87AB641C9540D5C6823A6E390D9A8C247DD89B8F4653F26800174BF6FE88CF7B61E4F653422FA19188FE3D4
padding = 46AE79AED34A2D759CB0EB9F
tmp_aes_key = CF42CE543CA64B8450A2858436C60B94FF825A523F7C2B217DEBFEDD120851B6
tmp_aes_iv = 672B46D3963F476DFB337FE5A0F2947764124A707F0F751671B2EF291087BDAD</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 = C9647315637804559FC08818538119083A6625746B895EA5F06A90A911F850B4DE88623B62E6319080BB17857735195377CB70C5B72AFE4F5C97483F245B49DD63694A0BD4CC98239F505C4DF785A8744C1DB7BBA34B9A222E86F9EFF68CF374F70DF1F6ECD900CA4BA626D7FE6E16804E2B94431CB60A4F67CAA6637141ED25FAD81ED3D97961378D60F3ADBB472A674A690B4ED2A52E91D176644A01B74E423ED5838D28F364DE64E152F426B5FEAD53223D240010D68C021C2EA4BBE45A0CA21DFD1DC9B9B0AA1D506C3332342AECCF5174759E37034D3139651061B91B345B66F51612F8FFD864FF2DE15463584BDAC0B7900FAC0A2BCC5A0328955A4EDD92146C55488D03F7D28067C5C4007B4D35090662B73A1EBEE30BB7EE27A8F97EFCDEEBF948CACE605BFDDAC000F87A9AE0D5EAC659BEFD46C6270B0483E00DE7C2299F65507ED4994FA8312A3EDD9173</code></pre>
<pre><code>encrypted_data = 7406AD67E426A062396063968F85D25F714A3396284EDBDFB8F8E9770DCA96A9CCC3C9A3EF2C3701CC59F6C9B1BE398AA3DCEA461ED5B7DA12A4001BC1F4E863869CF873F8A7839273F2779C301412E07B468D6AA574EBB8072FD09C1FE371448ACA7EDD7E7FBC57FD7721C1CCEDD095948A4DD79C80322190808EE622DC1E7DBEE9E9FB3AB76644F486C772ACF8822DCB16C61B205807D3ABA6CF46B4EF34DF8F00EF953D910ABE4CEA362D454B8788814FB0C1BAB3E2E1EDF5355111013E0C1CFB12075AF3F060BDBECE57EC654D1A235F4890C94F4B7D3422F58BF4A627A9357FC87A50F5205A39B1C783A45CF7E30CDAD60FAB5CC5019AE31DF7C5A632BC1010BF988C2E927690DA854CB12295CC97A9FDCA968CC0EA2B69FB1F2BEE68A44156BE6889DFEA563FC1E7F0923DCEF99F58256D20C633BDEBD050C24551E1539F3450867F3EBACAE4EE128493855C00</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 24 5D 05 00 85 90 A2 66
0010 | 78 01 00 00 1F 5F 04 F5 B8 1E E8 98 8B A0 21 46
0020 | C0 B5 86 ED 6E 48 FA F7 71 C1 F5 53 57 41 48 71
0030 | 77 74 D4 C4 99 5C F5 44 FE 50 01 00 C9 64 73 15
0040 | 63 78 04 55 9F C0 88 18 53 81 19 08 3A 66 25 74
0050 | 6B 89 5E A5 F0 6A 90 A9 11 F8 50 B4 DE 88 62 3B
0060 | 62 E6 31 90 80 BB 17 85 77 35 19 53 77 CB 70 C5
0070 | B7 2A FE 4F 5C 97 48 3F 24 5B 49 DD 63 69 4A 0B
0080 | D4 CC 98 23 9F 50 5C 4D F7 85 A8 74 4C 1D B7 BB
0090 | A3 4B 9A 22 2E 86 F9 EF F6 8C F3 74 F7 0D F1 F6
00A0 | EC D9 00 CA 4B A6 26 D7 FE 6E 16 80 4E 2B 94 43
00B0 | 1C B6 0A 4F 67 CA A6 63 71 41 ED 25 FA D8 1E D3
00C0 | D9 79 61 37 8D 60 F3 AD BB 47 2A 67 4A 69 0B 4E
00D0 | D2 A5 2E 91 D1 76 64 4A 01 B7 4E 42 3E D5 83 8D
00E0 | 28 F3 64 DE 64 E1 52 F4 26 B5 FE AD 53 22 3D 24
00F0 | 00 10 D6 8C 02 1C 2E A4 BB E4 5A 0C A2 1D FD 1D
0100 | C9 B9 B0 AA 1D 50 6C 33 32 34 2A EC CF 51 74 75
0110 | 9E 37 03 4D 31 39 65 10 61 B9 1B 34 5B 66 F5 16
0120 | 12 F8 FF D8 64 FF 2D E1 54 63 58 4B DA C0 B7 90
0130 | 0F AC 0A 2B CC 5A 03 28 95 5A 4E DD 92 14 6C 55
0140 | 48 8D 03 F7 D2 80 67 C5 C4 00 7B 4D 35 09 06 62
0150 | B7 3A 1E BE E3 0B B7 EE 27 A8 F9 7E FC DE EB F9
0160 | 48 CA CE 60 5B FD DA C0 00 F8 7A 9A E0 D5 EA C6
0170 | 59 BE FD 46 C6 27 0B 04 83 E0 0D E7 C2 29 9F 65
0180 | 50 7E D4 99 4F A8 31 2A 3E DD 91 73</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 54 8F 07 00 2C 91 A2 66
0010 | 78 01 00 00 1F 5F 04 F5 0A 10 39 86 07 65 90 2D
0020 | FB 0C AC B7 C5 6E 4D D1 C9 35 9C B9 B3 E5 FD C9
0030 | ED B5 CC 2B 80 59 9F 26 FE 50 01 00 74 06 AD 67
0040 | E4 26 A0 62 39 60 63 96 8F 85 D2 5F 71 4A 33 96
0050 | 28 4E DB DF B8 F8 E9 77 0D CA 96 A9 CC C3 C9 A3
0060 | EF 2C 37 01 CC 59 F6 C9 B1 BE 39 8A A3 DC EA 46
0070 | 1E D5 B7 DA 12 A4 00 1B C1 F4 E8 63 86 9C F8 73
0080 | F8 A7 83 92 73 F2 77 9C 30 14 12 E0 7B 46 8D 6A
0090 | A5 74 EB B8 07 2F D0 9C 1F E3 71 44 8A CA 7E DD
00A0 | 7E 7F BC 57 FD 77 21 C1 CC ED D0 95 94 8A 4D D7
00B0 | 9C 80 32 21 90 80 8E E6 22 DC 1E 7D BE E9 E9 FB
00C0 | 3A B7 66 44 F4 86 C7 72 AC F8 82 2D CB 16 C6 1B
00D0 | 20 58 07 D3 AB A6 CF 46 B4 EF 34 DF 8F 00 EF 95
00E0 | 3D 91 0A BE 4C EA 36 2D 45 4B 87 88 81 4F B0 C1
00F0 | BA B3 E2 E1 ED F5 35 51 11 01 3E 0C 1C FB 12 07
0100 | 5A F3 F0 60 BD BE CE 57 EC 65 4D 1A 23 5F 48 90
0110 | C9 4F 4B 7D 34 22 F5 8B F4 A6 27 A9 35 7F C8 7A
0120 | 50 F5 20 5A 39 B1 C7 83 A4 5C F7 E3 0C DA D6 0F
0130 | AB 5C C5 01 9A E3 1D F7 C5 A6 32 BC 10 10 BF 98
0140 | 8C 2E 92 76 90 DA 85 4C B1 22 95 CC 97 A9 FD CA
0150 | 96 8C C0 EA 2B 69 FB 1F 2B EE 68 A4 41 56 BE 68
0160 | 89 DF EA 56 3F C1 E7 F0 92 3D CE F9 9F 58 25 6D
0170 | 20 C6 33 BD EB D0 50 C2 45 51 E1 53 9F 34 50 86
0180 | 7F 3E BA CA E4 EE 12 84 93 85 5C 00</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>245D05008590A266</code></td>
<td><code>548F07002C91A266</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>B81EE8988BA02146C0B586ED6E48FAF7</code></td>
<td><code>0A1039860765902DFB0CACB7C56E4DD1</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>71C1F553574148717774D4C4995CF544</code></td>
<td><code>C9359CB9B3E5FDC9EDB5CC2B80599F26</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100C9647315637804559FC08818</code> <code>538119083A6625746B895EA5F06A90A9</code> <code>11F850B4DE88623B62E6319080BB1785</code> <code>7735195377CB70C5B72AFE4F5C97483F</code> <code>245B49DD63694A0BD4CC98239F505C4D</code> <code>F785A8744C1DB7BBA34B9A222E86F9EF</code> <code>F68CF374F70DF1F6ECD900CA4BA626D7</code> <code>FE6E16804E2B94431CB60A4F67CAA663</code> <code>7141ED25FAD81ED3D97961378D60F3AD</code> <code>BB472A674A690B4ED2A52E91D176644A</code> <code>01B74E423ED5838D28F364DE64E152F4</code> <code>26B5FEAD53223D240010D68C021C2EA4</code> <code>BBE45A0CA21DFD1DC9B9B0AA1D506C33</code> <code>32342AECCF5174759E37034D31396510</code> <code>61B91B345B66F51612F8FFD864FF2DE1</code> <code>5463584BDAC0B7900FAC0A2BCC5A0328</code> <code>955A4EDD92146C55488D03F7D28067C5</code> <code>C4007B4D35090662B73A1EBEE30BB7EE</code> <code>27A8F97EFCDEEBF948CACE605BFDDAC0</code> <code>00F87A9AE0D5EAC659BEFD46C6270B04</code> <code>83E00DE7C2299F65507ED4994FA8312A</code><br> <code>3EDD9173</code></td>
<td><code>FE5001007406AD67E426A06239606396</code> <code>8F85D25F714A3396284EDBDFB8F8E977</code> <code>0DCA96A9CCC3C9A3EF2C3701CC59F6C9</code> <code>B1BE398AA3DCEA461ED5B7DA12A4001B</code> <code>C1F4E863869CF873F8A7839273F2779C</code> <code>301412E07B468D6AA574EBB8072FD09C</code> <code>1FE371448ACA7EDD7E7FBC57FD7721C1</code> <code>CCEDD095948A4DD79C80322190808EE6</code> <code>22DC1E7DBEE9E9FB3AB76644F486C772</code> <code>ACF8822DCB16C61B205807D3ABA6CF46</code> <code>B4EF34DF8F00EF953D910ABE4CEA362D</code> <code>454B8788814FB0C1BAB3E2E1EDF53551</code> <code>11013E0C1CFB12075AF3F060BDBECE57</code> <code>EC654D1A235F4890C94F4B7D3422F58B</code> <code>F4A627A9357FC87A50F5205A39B1C783</code> <code>A45CF7E30CDAD60FAB5CC5019AE31DF7</code> <code>C5A632BC1010BF988C2E927690DA854C</code> <code>B12295CC97A9FDCA968CC0EA2B69FB1F</code> <code>2BEE68A44156BE6889DFEA563FC1E7F0</code> <code>923DCEF99F58256D20C633BDEBD050C2</code> <code>4551E1539F3450867F3EBACAE4EE1284</code><br> <code>93855C00</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 = 91DB36AD929C40B4E43312AA240BE2B4169B0E8ECAA41B4BE66F346CAD9D0D8030E1D44E0E243BFCF11556C09CB440B31FAB8C964F781E7B1788D3668EFC88065B1643E007ECE7D11D7BA6D37CB4115197728332170936833E5BB3B23B1ED5FB0B9527DA7EDF69394543596E062621657101AB58F99E465941F42DF26E53AA76776D713AFE6558AA20C37CD464E22659A2149B828F39FDE6F2E95539C21EF263D134A153B037386473FDE9A03D992F0EC1830A048E017E680BD9D79B592DE19138B8AAFF2E9E4AB24BB81B563C1F5903E933B675613B3CAB2AECAF8F94D715E5F3AE2FF769083A29BE57A2F50B86DF5A19CC9AF1D2EDD602E4702575A62DB260</code></pre>
<pre><code>auth_key = 32012E3302ECA4E5BCFDDE193C70510CACBDCE18BF28537B007E398059E77135529A83E5D034060E1890709B8C26D00BEDBCE93EBA47F5CD0CF2B79E280A5005C908AE62D58B1CA6294E33FA8C2B007D1B5E0A70506BDD9BF513271C9B21FA2B3F6CCE88125B340D44DBF7FC80D4176B678290A067D4DA03D1DA690B5339D585D718023020F279AED47BFF0F329614B4B76BFE0A2A825AE81747DE9CF6A09611A1C219503A43C5050929B2D053055897D62330100C7764E487AB998FF4D0A2F1C3DACAB1EBC4663A607DE8293EFE2892C1301AE431494F5B7E65EA8A59FC3E68DB3F14204245F98ECA9F935F0B7B9D82F1FFCA423F64FD5136AC7CD6A9705F47</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 4C 17 D8 85 90 A2 66
0010 | 94 00 00 00 34 F7 CB 3B B8 1E E8 98 8B A0 21 46
0020 | C0 B5 86 ED 6E 48 FA F7 71 C1 F5 53 57 41 48 71
0030 | 77 74 D4 C4 99 5C F5 44 B5 4F 21 9D 5F 9F 6F 94
0040 | DA A5 B4 AC 22 AD 7A 2C</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 10 7D 0D 2D 91 A2 66
0010 | 88 00 00 00 34 F7 CB 3B 0A 10 39 86 07 65 90 2D
0020 | FB 0C AC B7 C5 6E 4D D1 C9 35 9C B9 B3 E5 FD C9
0030 | ED B5 CC 2B 80 59 9F 26 11 19 7A DF EC BB D4 B3
0040 | 7D 11 CE 01 32 46 94 A2</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>014C17D88590A266</code></td>
<td><code>01107D0D2D91A266</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>94000000</code> (148 in decimal)</td>
<td><code>88000000</code> (136 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>B81EE8988BA02146C0B586ED6E48FAF7</code></td>
<td><code>0A1039860765902DFB0CACB7C56E4DD1</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>71C1F553574148717774D4C4995CF544</code></td>
<td><code>C9359CB9B3E5FDC9EDB5CC2B80599F26</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>B54F219D5F9F6F94DAA5B4AC22AD7A2C</code></td>
<td><code>11197ADFECBBD4B37D11CE01324694A2</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>