diff --git a/data/web/corefork.telegram.org/api/bots/attach.html b/data/web/corefork.telegram.org/api/bots/attach.html index e659acc482..71bdb6a84c 100644 --- a/data/web/corefork.telegram.org/api/bots/attach.html +++ b/data/web/corefork.telegram.org/api/bots/attach.html @@ -2,12 +2,12 @@ - Bot attachment menu entries + Bot attachment menu and side menu entries - - + + - + @@ -39,12 +39,12 @@
- -

Bot attachment menu entries

+ +

Bot attachment menu and side menu entries

-

Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

+

Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

Schema:

user#abb5f120 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?int = User;
 
@@ -76,15 +76,39 @@
 messages.toggleBotInAttachMenu#69f59d69 flags:# write_allowed:flags.0?true bot:InputUser enabled:Bool = Bool;
 
 messages.getAttachMenuBots#16fcc2cb hash:long = AttachMenuBots;
-

Bots that have the bot_attach_menu flag set offer an attachment menu entry that can be added to the attachment menu.

-

Use messages.getAttachMenuBot to get info about the attachment menu entry of a given bot, see the attachMenuBot constructor page for more info ».

-

The installed attachment menu list can be fetched using messages.getAttachMenuBots.

-

Use messages.toggleBotInAttachMenu to enable or disable the attachment menu of a given bot.
-Changes made using this method will trigger an updateAttachMenuBots update in other clients, which should trigger a messages.getAttachMenuBots call to fetch the full updated list of installed attachment menu entries.
-The attachment menu list should also be refreshed if the user changes the app's language in the settings.

-

Once an attachment menu is enabled for a certain user, the user.attach_menu_enabled flag will be set for the bot, and the attachMenuBot.inactive flag will be unset.

-

Clicking on the attachment menu entry should open the related bot mini app, see here » for more info on the required steps.

-

Attachment menus can be installed and opened through attachment menu deep links.

+

Bots that have the bot_attach_menu flag set offer an attachment or side menu entry that can be added to the in-app attachment menu or main view side menu.

+

Use messages.getAttachMenuBot to get info about the attachment/side menu entry of a given bot, see the attachMenuBot constructor page for more info ».

+

The currently installed attachment/side menu list can be fetched using messages.getAttachMenuBots.

+

Use messages.toggleBotInAttachMenu to enable or disable the attachment and/or side menu of a given bot (the entries that must be installed or uninstalled depend on the values of the attachMenuBot.show_in_attach_menu and attachMenuBot.show_in_side_menu flags).
+Changes made using this method will trigger an updateAttachMenuBots update in other clients, which should trigger a messages.getAttachMenuBots call to fetch the full updated list of installed attachment/side menu entries.
+The attachment/side menu list should also be refreshed if the user changes the app's language in the settings.

+

Once an attachment/side menu is enabled for a certain user, the user.attach_menu_enabled flag will be set for the bot, and the attachMenuBot.inactive flag will be unset.

+

Clicking on the attachment/side menu entry should open the related bot mini app, see here » for more info on the required steps.

+

Attachment menus can be installed and opened through attachment/side menu deep links.

+

In particular, when clicking on such a link, messages.getAttachMenuBot should be invoked to check if the bot has an associated attachment/side menu entry, and if yes:

+
    +
  • If the attachMenuBot.inactive flag:
      +
    • ...is set, the attachment/side menu entry is not installed.
      +Thus, before launching the mini app when clicking on a attachment/side menu deep link, the client should show a prompt to the user, asking to add the mini app to the attachment/side menu.
      +Note that if the attachMenuBot.side_menu_disclaimer flag is set, an additional mandatory checkbox to accept the mini apps TOS and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown in the installation prompt.
      +If the user accepts, invoke messages.toggleBotInAttachMenu and proceed to the next step, otherwise abort the process.
    • +
    • ...is not set, proceed to the next step unconditionally.
    • +
    +
  • +
  • Open the Mini App:
      +
    • If the link subtype is a startapp link, open the Mini App regardless of the currently open Telegram chat (in fact, the Mini App should opened even if the client itself is minimized), as specified here ».
    • +
    • For any other link subtype, check that the attachment menu can be opened in the chosen chat type by checking the attachMenuBot.peer_types field.
        +
      • If the chosen chat is supported, open the attachment menu mini app » as specified here ».
      • +
      • Otherwise:
          +
        • If the user has just installed the attachment menu @ step 1, notify the user that the attachment menu was installed successfully.
        • +
        • Otherwise, notify the user that the attachment menu webapp can't be opened in the specified chat.
        • +
        +
      • +
      +
    • +
    +
  • +
diff --git a/data/web/corefork.telegram.org/api/bots/webapps.html b/data/web/corefork.telegram.org/api/bots/webapps.html index bee6a072d2..552b356da0 100644 --- a/data/web/corefork.telegram.org/api/bots/webapps.html +++ b/data/web/corefork.telegram.org/api/bots/webapps.html @@ -152,7 +152,7 @@ Note that eventual errors will not be sent as a failed event if the

To open them, clients should call messages.requestWebView, and then open a webview using the url contained in the returned webViewResultUrl.

After loading the webview, until it is closed by a web_app_close event, the user client must invoke messages.prolongWebView every 60 seconds: if the method call returns QUERY_ID_INVALID, the webview must be closed.

@@ -175,7 +175,7 @@ Note that eventual errors will not be sent as a failed event if the messages.requestAppWebView#8c5a3b3c flags:# write_allowed:flags.0?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = AppWebViewResult;

Another way to open Mini Apps is by using named bot Mini App links ».

-

These links are different from bot attachment menu deep links », because they don't require the user to install an attachment menu, and a single bot can offer multiple Mini Apps, distinguished by their short_name.

+

These links are different from bot attachment menu deep links », because they don't require the user to install an attachment menu, and a single bot can offer multiple Mini Apps, distinguished by their short_name.

These links should be handled as follows:

Layer 159

-

Introducing privacy settings for user bios, improved login code invalidation, improved chat invites, improved update handling, sponsored websites and click reporting for sponsored messages.

+

Introducing privacy settings for user bios, improved login code invalidation, improved chat invites, improved update handling, sponsored websites and click reporting for sponsored messages.

Also, anonymous channel admins can now vote in polls.

Schema changes

New Methods
@@ -1404,7 +1404,7 @@ Also, discussion group admins can now attachMenuBotIconColor - Represents an attachment menu icon color for bot mini apps »
  • Added attachMenuBotIcon - Represents an attachment menu icon for bot mini apps »
  • -
  • Added attachMenuBot - Represents a bot mini app that can be launched from the attachment menu »
  • +
  • Added attachMenuBot - Represents a bot mini app that can be launched from the attachment/side menu »
  • Added attachMenuBotsNotModified - The list of bot mini apps hasn't changed
  • Added attachMenuBots - Represents a list of bot mini apps that can be launched from the attachment menu »
  • Added attachMenuBotsBot - Represents a bot mini app that can be launched from the attachment menu »
  • diff --git a/data/web/corefork.telegram.org/api/links.html b/data/web/corefork.telegram.org/api/links.html index 36713693ba..7e8091ab69 100644 --- a/data/web/corefork.telegram.org/api/links.html +++ b/data/web/corefork.telegram.org/api/links.html @@ -59,7 +59,17 @@
  • tg://path?query
  • The #fragment part is always ignored when parsing Telegram deep links.

    -

    Also note that whenever a <username>.t.me link is encountered and <username> is not equal to www, is not a single letter and is a valid username, it should be treated exactly as a t.me/<username>/ link (generate a t.me/<username>/ link and append the rest of the path (if present) and the query string (if present)).

    +

    Also note that whenever a <username>.t.me link is encountered and <username>:

    + +

    ...it should be treated exactly as a t.me/<username>/ link (generate a t.me/<username>/ link and append the rest of the path (if present) and the query string (if present)).

    Public username links

    Used to link to public users, groups and channels, see here for more info on how to handle them ».

    t.me syntax:

    @@ -368,13 +378,15 @@ tg://addemoji?set=<slug>

    Used by users to boost channels », granting them the ability to post stories.

    Use the channel information to boost the channel as described here ».

    t.me syntax (public channels):

    -
    t.me/<username>?boost
    +
    t.me/boost/<username>
    +t.me/<username>?boost

    t.me syntax (private channels):

    -
    t.me/c/<id>?boost
    +
    t.me/boost?c=<id>
    +t.me/c/<id>?boost

    tg: syntax (public channels):

    tg://boost?domain=<username>

    tg: syntax (private channels):

    -
    tg://boost?channel=<channel>
    +
    tg://boost?channel=<id>

    Parameters:

    @@ -886,12 +898,13 @@ tg://resolve?domain=<bot_username>&startgroup&admin=<permission

    Named bot mini app links

    Used to share named bot mini apps.

    -

    These links are different from bot attachment menu deep links, because they don't require the user to install an attachment menu, and a single bot can offer multiple named mini apps, distinguished by their short_name.

    +

    These links are different from bot attachment menu deep links, because they don't require the user to install an attachment menu, and a single bot can offer multiple named mini apps, distinguished by their short_name.

    These links should be handled as specified in the named bot mini app documentation ».

    t.me syntax:

    t.me/<bot_username>/<short_name>?startapp=<start_parameter>

    tg: syntax:

    tg://resolve?domain=<bot_username>&appname=<short_name>&startapp=<start_parameter>
    +

    Note that bot attachment or side menu links have a similar syntax, without a short_name parameter.

    Parameters:

    @@ -1091,7 +1104,7 @@ These links are used to confirm ownership of the phone number, to prevent accoun

    QR code login links

    -

    Used by QR code login.

    +

    Used by the QR code login flow ».

    tg: syntax:

    tg://login?token=<base64encodedtoken>

    Parameters:

    @@ -1111,24 +1124,47 @@ These links are used to confirm ownership of the phone number, to prevent accoun -

    Bot attachment menu links

    -

    Used to install and optionally open a bot attachment menu » in a certain chat.
    -For all link types, clients should:

    +

    Bot attachment or side menu links

    +

    Used to install and open a bot attachment or side menu » in a certain chat.
    +For all link types, clients should first install the associated bot attachment or side menu entry as specified here », and if the user accepts the installation prompt, open the Mini App using the following logic, depending on the link subtype:

    +

    Open anywhere

    +

    After installing the attachment/side menu entry globally, opens the associated mini app, regardless of the currently open Telegram chat (in fact, the Mini App should opened even if the client itself is minimized).

    +

    t.me syntax:

    +
    t.me/<bot_username>?startapp
    +t.me/<bot_username>?startapp=<start_parameter>
    +

    Note that named bot mini app links have a similar syntax, with an additional short_name parameter.

    +

    tg: syntax:

    +
    tg://resolve?domain=<bot_username>&startapp
    +tg://resolve?domain=<bot_username>&startapp=<start_parameter>
    +

    Parameters:

    + + + + + + + + + + + + + + + + + + + + +
    NameOptionalDescription
    bot_usernameRequiredUsername of the bot that owns the attachment/side menu entry
    start_parameterOptionalIf provided, should be passed to messages.requestWebView.start_param
    +

    Open in current chat

    +

    After installing the attachment/side menu entry globally, opens the associated mini app in the currently open chat.

    +

    If the current chat is not supported by the attachMenuBot.peer_types field:

    -

    Open in current chat

    -

    Installs and opens an attachment menu mini app in the currently open chat.

    t.me syntax:

    t.me/<bot_username>?startattach
     t.me/<bot_username>?startattach=<start_parameter>
    @@ -1148,7 +1184,7 @@ tg://resolve?domain=<bot_username>&startattach=<start_parameter> bot_username Required -Username of the bot that owns the attachment menu +Username of the bot that owns the attachment/side menu entry start_parameter @@ -1158,7 +1194,7 @@ tg://resolve?domain=<bot_username>&startattach=<start_parameter>

    Open in specific chat

    -

    Installs and opens an attachment menu mini app in a specific chat.

    +

    After installing the attachment/side menu entry globally, opens the associated mini app in a specific chat.

    t.me syntax:

    t.me/<username>?attach=<bot_username>
     t.me/<username>?attach=<bot_username>&startattach=<start_parameter>
    @@ -1169,6 +1205,11 @@ t.me/+<phone_number>?attach=<bot_username>&startattach=<start
     tg://resolve?domain=<username>&attach=<bot_username>&startattach=<start_parameter>
     tg://resolve?phone=<phone_number>&attach=<bot_username>
     tg://resolve?phone=<phone_number>&attach=<bot_username>&startattach=<start_parameter>
    +

    If the specified chat is not supported by the attachMenuBot.peer_types field:

    +

    Parameters:

    @@ -1182,17 +1223,17 @@ tg://resolve?phone=<phone_number>&attach=<bot_username>&star - + - + - + @@ -1202,7 +1243,7 @@ tg://resolve?phone=<phone_number>&attach=<bot_username>&star
    username Required for username linksUsername of chat where to open mini appUsername of chat where to open the mini app
    phone_number Required for phone number linksPhone number of private chat where to open mini appPhone number of private chat where to the open mini app
    bot_username RequiredUsername of the bot that owns the attachment menuUsername of the bot that owns the attachment/side menu
    start_parameter

    Open in any chat

    -

    Installs an attachment menu, opens a dialog selection form that will open the attachment menu mini app in a specific chat.

    +

    After installing the attachment/side menu entry globally, opens a dialog selection form that will open the attachment menu mini app in a specific chat.

    t.me syntax:

    t.me/<bot_username>?startattach&choose=users+bots+groups+channels
     t.me/<bot_username>?startattach=<start_parameter>&choose=users+bots+groups+channels
    @@ -1222,7 +1263,7 @@ tg://resolve?domain=<bot_username>&startattach=<start_parameter> bot_username Required -Username of the bot that owns the attachment menu +Username of the bot that owns the attachment/side menu start_parameter diff --git a/data/web/corefork.telegram.org/constructor/attachMenuBot.html b/data/web/corefork.telegram.org/constructor/attachMenuBot.html index 721a0749ed..4a709951a4 100644 --- a/data/web/corefork.telegram.org/constructor/attachMenuBot.html +++ b/data/web/corefork.telegram.org/constructor/attachMenuBot.html @@ -4,10 +4,10 @@ attachMenuBot - + - + @@ -42,7 +42,8 @@

    attachMenuBot

    -

    Represents a bot mini app that can be launched from the attachment menu »

    +

    Represents a bot mini app that can be launched from the attachment/side menu »

    +

    At least one of the show_in_attach_menu or the show_in_side_menu flags will always be set.

    +

    Bot attachment menu and side menu entries

    +

    Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

    diff --git a/data/web/corefork.telegram.org/constructor/attachMenuBotIcon.html b/data/web/corefork.telegram.org/constructor/attachMenuBotIcon.html index 9fb9ed4b89..4660f1d1f3 100644 --- a/data/web/corefork.telegram.org/constructor/attachMenuBotIcon.html +++ b/data/web/corefork.telegram.org/constructor/attachMenuBotIcon.html @@ -74,7 +74,7 @@ name string -One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app.

    default_static - Default attachment menu icon in SVG format
    placeholder_static - Default placeholder for opened Web Apps in SVG format
    ios_static - Attachment menu icon in SVG format for the official iOS app
    ios_animated - Animated attachment menu icon in TGS format for the official iOS app
    android_animated - Animated attachment menu icon in TGS format for the official Android app
    macos_animated - Animated attachment menu icon in TGS format for the official native Mac OS app +One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app.

    default_static - Default attachment menu icon in SVG format
    placeholder_static - Default placeholder for opened Web Apps in SVG format
    ios_static - Attachment menu icon in SVG format for the official iOS app
    ios_animated - Animated attachment menu icon in TGS format for the official iOS app
    android_animated - Animated attachment menu icon in TGS format for the official Android app
    macos_animated - Animated attachment menu icon in TGS format for the official native Mac OS app
    ios_side_menu_static - Side menu icon in PNG format for the official iOS app
    android_side_menu_static - Side menu icon in SVG format for the official android app
    macos_side_menu_static - Side menu icon in PNG format for the official native Mac OS app icon @@ -91,8 +91,8 @@

    Type

    AttachMenuBotIcon

    Related pages

    -

    Bot attachment menu entries

    -

    Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

    +

    Bot attachment menu and side menu entries

    +

    Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

    diff --git a/data/web/corefork.telegram.org/constructor/attachMenuBotIconColor.html b/data/web/corefork.telegram.org/constructor/attachMenuBotIconColor.html index 8435375f93..4b094921d5 100644 --- a/data/web/corefork.telegram.org/constructor/attachMenuBotIconColor.html +++ b/data/web/corefork.telegram.org/constructor/attachMenuBotIconColor.html @@ -81,8 +81,8 @@

    Type

    AttachMenuBotIconColor

    Related pages

    -

    Bot attachment menu entries

    -

    Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

    +

    Bot attachment menu and side menu entries

    +

    Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

    diff --git a/data/web/corefork.telegram.org/constructor/attachMenuBots.html b/data/web/corefork.telegram.org/constructor/attachMenuBots.html index 5c2cd4f1c6..c6df68d5af 100644 --- a/data/web/corefork.telegram.org/constructor/attachMenuBots.html +++ b/data/web/corefork.telegram.org/constructor/attachMenuBots.html @@ -88,8 +88,8 @@

    Related pages

    Pagination in the API

    How to fetch results from large lists of objects.

    -

    Bot attachment menu entries

    -

    Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

    +

    Bot attachment menu and side menu entries

    +

    Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

    diff --git a/data/web/corefork.telegram.org/constructor/attachMenuBotsBot.html b/data/web/corefork.telegram.org/constructor/attachMenuBotsBot.html index 60cb02115b..30bc704b86 100644 --- a/data/web/corefork.telegram.org/constructor/attachMenuBotsBot.html +++ b/data/web/corefork.telegram.org/constructor/attachMenuBotsBot.html @@ -81,8 +81,8 @@

    Type

    AttachMenuBotsBot

    Related pages

    -

    Bot attachment menu entries

    -

    Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

    +

    Bot attachment menu and side menu entries

    +

    Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

    diff --git a/data/web/corefork.telegram.org/constructor/messageActionBotAllowed.html b/data/web/corefork.telegram.org/constructor/messageActionBotAllowed.html index 67ebbc9430..58a0948299 100644 --- a/data/web/corefork.telegram.org/constructor/messageActionBotAllowed.html +++ b/data/web/corefork.telegram.org/constructor/messageActionBotAllowed.html @@ -97,8 +97,8 @@

    Type

    MessageAction

    Related pages

    -

    Bot attachment menu entries

    -

    Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

    +

    Bot attachment menu and side menu entries

    +

    Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

    Telegram Login Widget

    Mini Apps on Telegram

    Bots can offer users interactive HTML5 web apps to completely replace any website.

    diff --git a/data/web/corefork.telegram.org/constructor/updateAttachMenuBots.html b/data/web/corefork.telegram.org/constructor/updateAttachMenuBots.html index 78969fd4cd..9c3d99854a 100644 --- a/data/web/corefork.telegram.org/constructor/updateAttachMenuBots.html +++ b/data/web/corefork.telegram.org/constructor/updateAttachMenuBots.html @@ -61,8 +61,8 @@

    Type

    Update

    Related pages

    -

    Bot attachment menu entries

    -

    Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

    +

    Bot attachment menu and side menu entries

    +

    Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

    messages.getAttachMenuBots

    Returns installed attachment menu bot mini apps »

    diff --git a/data/web/corefork.telegram.org/constructor/user.html b/data/web/corefork.telegram.org/constructor/user.html index 5d4dd74444..dd20b62dfa 100644 --- a/data/web/corefork.telegram.org/constructor/user.html +++ b/data/web/corefork.telegram.org/constructor/user.html @@ -268,8 +268,8 @@

    Related pages

    Min constructors

    In some situations user and channel constructors have reduced set of fields present (although id is always there) and min flag set.

    -

    Bot attachment menu entries

    -

    Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

    +

    Bot attachment menu and side menu entries

    +

    Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

    Stories

    Telegram users and channels can easily post and view stories through the API.

    userFull

    diff --git a/data/web/corefork.telegram.org/method/messages.getAttachMenuBot.html b/data/web/corefork.telegram.org/method/messages.getAttachMenuBot.html index 6430967952..7dfe8c2139 100644 --- a/data/web/corefork.telegram.org/method/messages.getAttachMenuBot.html +++ b/data/web/corefork.telegram.org/method/messages.getAttachMenuBot.html @@ -95,8 +95,8 @@

    Related pages

    -

    Bot attachment menu entries

    -

    Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

    +

    Bot attachment menu and side menu entries

    +

    Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

    diff --git a/data/web/corefork.telegram.org/method/messages.getAttachMenuBots.html b/data/web/corefork.telegram.org/method/messages.getAttachMenuBots.html index d2e2f8c0f3..7afd91bf5a 100644 --- a/data/web/corefork.telegram.org/method/messages.getAttachMenuBots.html +++ b/data/web/corefork.telegram.org/method/messages.getAttachMenuBots.html @@ -81,8 +81,8 @@

    Related pages

    Pagination in the API

    How to fetch results from large lists of objects.

    -

    Bot attachment menu entries

    -

    Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

    +

    Bot attachment menu and side menu entries

    +

    Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

    diff --git a/data/web/corefork.telegram.org/method/messages.requestWebView.html b/data/web/corefork.telegram.org/method/messages.requestWebView.html index 18aec2dda2..38081b7449 100644 --- a/data/web/corefork.telegram.org/method/messages.requestWebView.html +++ b/data/web/corefork.telegram.org/method/messages.requestWebView.html @@ -102,7 +102,7 @@ start_param flags.3?string -If the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter. +If the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter. theme_params diff --git a/data/web/corefork.telegram.org/method/messages.toggleBotInAttachMenu.html b/data/web/corefork.telegram.org/method/messages.toggleBotInAttachMenu.html index 579f87400d..83218d6b78 100644 --- a/data/web/corefork.telegram.org/method/messages.toggleBotInAttachMenu.html +++ b/data/web/corefork.telegram.org/method/messages.toggleBotInAttachMenu.html @@ -95,9 +95,10 @@

    Bool

    Related pages

    attachMenuBot

    -

    Represents a bot mini app that can be launched from the attachment menu »

    -

    Bot attachment menu entries

    -

    Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

    +

    Represents a bot mini app that can be launched from the attachment/side menu »

    +

    At least one of the show_in_attach_menu or the show_in_side_menu flags will always be set.

    +

    Bot attachment menu and side menu entries

    +

    Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

    diff --git a/data/web/corefork.telegram.org/mtproto/samples-auth_key.html b/data/web/corefork.telegram.org/mtproto/samples-auth_key.html index 6cfcd371f3..980aa823da 100644 --- a/data/web/corefork.telegram.org/mtproto/samples-auth_key.html +++ b/data/web/corefork.telegram.org/mtproto/samples-auth_key.html @@ -53,9 +53,9 @@
    1) Client sends query to server

    Sent payload (excluding transport headers/trailers):

    -
    0000 | 00 00 00 00 00 00 00 00 98 B8 09 00 E4 57 63 65
    -0010 | 14 00 00 00 F1 8E 7E BE C0 50 C4 54 83 E6 C2 E3
    -0020 | 30 D6 52 14 99 45 3D 5B
    +
    0000 | 00 00 00 00 00 00 00 00 F8 4C 0D 00 C0 4B 66 65
    +0010 | 14 00 00 00 F1 8E 7E BE B5 59 9A FA 6B AC 2E A9
    +0020 | 0A BE E2 D7 B5 4D D5 1D

    Payload (de)serialization:

    req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;
    @@ -77,7 +77,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -104,11 +104,11 @@
    2) Server sends response of the form

    Received payload (excluding transport headers/trailers):

    -
    0000 | 00 00 00 00 00 00 00 00 01 A0 36 E7 E4 57 63 65
    -0010 | 58 00 00 00 63 24 16 05 C0 50 C4 54 83 E6 C2 E3
    -0020 | 30 D6 52 14 99 45 3D 5B 53 3B AC FB 11 67 B9 55
    -0030 | 80 95 BD 91 A7 7F 8D 0E 08 2D 8E A2 50 67 4C 7B
    -0040 | 4D 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
    +
    0000 | 00 00 00 00 00 00 00 00 01 F8 B9 D7 C0 4B 66 65
    +0010 | 60 00 00 00 63 24 16 05 B5 59 9A FA 6B AC 2E A9
    +0020 | 0A BE E2 D7 B5 4D D5 1D 97 03 22 93 F4 8B FD EB
    +0030 | 2D 7C 79 AF 50 22 FE FE 08 26 FE F7 F1 B4 91 7C
    +0040 | D1 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

    Payload (de)serialization:

    @@ -132,13 +132,13 @@
    - + - + @@ -150,19 +150,19 @@ - + - + - + @@ -208,22 +208,22 @@

    Proof of work

    3) Client decomposes pq into prime factors such that p < q.
    -
    pq = 3282739644613819213
    -

    Decompose into 2 prime cofactors p < q: 3282739644613819213 = 1714145599 * 1915087987

    -
    p = 1714145599
    -q = 1915087987
    +
    pq = 2809955835014380753
    +

    Decompose into 2 prime cofactors p < q: 2809955835014380753 = 1420343893 * 1978363021

    +
    p = 1420343893
    +q = 1978363021

    Presenting proof of work; Server authentication

    4) encrypted_data payload generation

    First of all, generate an encrypted_data payload as follows:

    Generated payload (excluding transport headers/trailers):

    -
    0000 | 95 5F F5 A9 08 2D 8E A2 50 67 4C 7B 4D 00 00 00
    -0010 | 04 66 2B C9 3F 00 00 00 04 72 25 EC 73 00 00 00
    -0020 | C0 50 C4 54 83 E6 C2 E3 30 D6 52 14 99 45 3D 5B
    -0030 | 53 3B AC FB 11 67 B9 55 80 95 BD 91 A7 7F 8D 0E
    -0040 | C6 A0 60 71 DD 25 D9 01 92 CD C6 02 F6 5A EE BB
    -0050 | BF BA FF 36 14 11 48 C8 FD 54 BE DA D3 5A D6 97
    +
    0000 | 95 5F F5 A9 08 26 FE F7 F1 B4 91 7C D1 00 00 00
    +0010 | 04 54 A8 BA 55 00 00 00 04 75 EB 6C 8D 00 00 00
    +0020 | B5 59 9A FA 6B AC 2E A9 0A BE E2 D7 B5 4D D5 1D
    +0030 | 97 03 22 93 F4 8B FD EB 2D 7C 79 AF 50 22 FE FE
    +0040 | 3B AE 9A B8 12 72 6C F2 1A 9D CA 9A 9D 37 A3 11
    +0050 | 7A 81 D3 81 D8 52 8C A0 C4 E2 5C BB CD 8D 94 E6
     0060 | 02 00 00 00

    Payload (de)serialization:

    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;
    @@ -246,37 +246,37 @@ q = 1915087987
    - + - + - + - + - + - + @@ -291,39 +291,39 @@ q = 1915087987

    The serialization of P_Q_inner_data produces data, which is used to generate encrypted_data as specified in step 4.1.
    These are the inputs to the algorithm specified in step 4.1:

    -
    data = 955FF5A9082D8EA250674C7B4D00000004662BC93F000000047225EC73000000C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0EC6A06071DD25D90192CDC602F65AEEBBBFBAFF36141148C8FD54BEDAD35AD69702000000
    -random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA7FB01CBED39F3B4B6023C1AF3739DA07DA27579BD7BA1788D591F5D5D1101E97821C3EE4989C1104BE50CCC7FC31E23109735366DFBDF1537DB16C7F5642652
    +
    data = 955FF5A90826FEF7F1B4917CD10000000454A8BA550000000475EB6C8D000000B5599AFA6BAC2EA90ABEE2D7B54DD51D97032293F48BFDEB2D7C79AF5022FEFE3BAE9AB812726CF21A9DCA9A9D37A3117A81D381D8528CA0C4E25CBBCD8D94E602000000
    +random_padding_bytes = A0A08D9129A6004F851B20205F2FA07753FE8291010906D62EE0EFEB8B1C7052449EAF632FDDAF860BD9F128C350D1201526CBADFA7032FD64C2E8CA54A8460D608A626639B64181500138073BF7127B353985BD3F60F4DE37625F99

    And this is the output:

    -
    encrypted_data = AB05DFE223030018B0E6A1D58FBA9E9AE568DB395B5202C6284621AE5381E536DC9932757EF89B571D5E8F0D686FF13A952E229608A4D0185E95E86A6C2155CED021AA97A3E97DB21D89C361006FFC1923D168381CC045A82EF1CB2C1E3D75BEC6A22E37930EE6219A3238D10CAED7325C244C1F5906D1B79F252054E80185A8B769AEB7266808A26D8387505796D4E10959C573240AAB2FA611DE816AA069FEFA4D46809C83789D1EAAAD4C14249D98241315561F35E8C9021A69918441AEFA8F34E8523EE9E22CBE57DE903954405E70387306C2E0C40CC272C9F3B9EA361E554677797796194EDFFD385243BF592729F26D54AC82D326053C8580437DD57A
    +
    encrypted_data = E2936EF84988FDB8D5B7FB7406916AA843002E214F136CDFDAA76DFDCC0AF1490C3740B8CC4C8CC752CDA2ADCF2BE3D6EEC40F69D3527C7E15A22CEFB918CFB57532A69A852A08B71863D8B282C47D8500379CC1D127849B539928ADB63F27373938F2F834F94E30AB266DF541EA8D1C0E651DB17C204E27760FEA822134BBFF5C1490734AF5A5130E077526128B6B62AC2DEE617F51DFC3D176CB0B37A9A61C386DEDA78C1F279BE3FC345E46DBC647E88ABA15D71159B9F69787EA90F5C01368C28356C1B557D07D9D5F3352D3C55A1D911CEE6B32239AAD98DBE0396FB8FB311145E0D9F9D9B8F82446256B7A419E6D99093C05026FB43A08370DC59BF450

    The length of the final string is 256 bytes.

    5) Send req_DH_params query with generated encrypted_data

    Sent payload (excluding transport headers/trailers):

    -
    0000 | 00 00 00 00 00 00 00 00 9C 34 08 00 E5 57 63 65
    -0010 | 40 01 00 00 BE E4 12 D7 C0 50 C4 54 83 E6 C2 E3
    -0020 | 30 D6 52 14 99 45 3D 5B 53 3B AC FB 11 67 B9 55
    -0030 | 80 95 BD 91 A7 7F 8D 0E 04 66 2B C9 3F 00 00 00
    -0040 | 04 72 25 EC 73 00 00 00 85 FD 64 DE 85 1D 9D D0
    -0050 | FE 00 01 00 AB 05 DF E2 23 03 00 18 B0 E6 A1 D5
    -0060 | 8F BA 9E 9A E5 68 DB 39 5B 52 02 C6 28 46 21 AE
    -0070 | 53 81 E5 36 DC 99 32 75 7E F8 9B 57 1D 5E 8F 0D
    -0080 | 68 6F F1 3A 95 2E 22 96 08 A4 D0 18 5E 95 E8 6A
    -0090 | 6C 21 55 CE D0 21 AA 97 A3 E9 7D B2 1D 89 C3 61
    -00A0 | 00 6F FC 19 23 D1 68 38 1C C0 45 A8 2E F1 CB 2C
    -00B0 | 1E 3D 75 BE C6 A2 2E 37 93 0E E6 21 9A 32 38 D1
    -00C0 | 0C AE D7 32 5C 24 4C 1F 59 06 D1 B7 9F 25 20 54
    -00D0 | E8 01 85 A8 B7 69 AE B7 26 68 08 A2 6D 83 87 50
    -00E0 | 57 96 D4 E1 09 59 C5 73 24 0A AB 2F A6 11 DE 81
    -00F0 | 6A A0 69 FE FA 4D 46 80 9C 83 78 9D 1E AA AD 4C
    -0100 | 14 24 9D 98 24 13 15 56 1F 35 E8 C9 02 1A 69 91
    -0110 | 84 41 AE FA 8F 34 E8 52 3E E9 E2 2C BE 57 DE 90
    -0120 | 39 54 40 5E 70 38 73 06 C2 E0 C4 0C C2 72 C9 F3
    -0130 | B9 EA 36 1E 55 46 77 79 77 96 19 4E DF FD 38 52
    -0140 | 43 BF 59 27 29 F2 6D 54 AC 82 D3 26 05 3C 85 80
    -0150 | 43 7D D5 7A
    +
    0000 | 00 00 00 00 00 00 00 00 FC 4C 0D 00 C0 4B 66 65
    +0010 | 40 01 00 00 BE E4 12 D7 B5 59 9A FA 6B AC 2E A9
    +0020 | 0A BE E2 D7 B5 4D D5 1D 97 03 22 93 F4 8B FD EB
    +0030 | 2D 7C 79 AF 50 22 FE FE 04 54 A8 BA 55 00 00 00
    +0040 | 04 75 EB 6C 8D 00 00 00 85 FD 64 DE 85 1D 9D D0
    +0050 | FE 00 01 00 E2 93 6E F8 49 88 FD B8 D5 B7 FB 74
    +0060 | 06 91 6A A8 43 00 2E 21 4F 13 6C DF DA A7 6D FD
    +0070 | CC 0A F1 49 0C 37 40 B8 CC 4C 8C C7 52 CD A2 AD
    +0080 | CF 2B E3 D6 EE C4 0F 69 D3 52 7C 7E 15 A2 2C EF
    +0090 | B9 18 CF B5 75 32 A6 9A 85 2A 08 B7 18 63 D8 B2
    +00A0 | 82 C4 7D 85 00 37 9C C1 D1 27 84 9B 53 99 28 AD
    +00B0 | B6 3F 27 37 39 38 F2 F8 34 F9 4E 30 AB 26 6D F5
    +00C0 | 41 EA 8D 1C 0E 65 1D B1 7C 20 4E 27 76 0F EA 82
    +00D0 | 21 34 BB FF 5C 14 90 73 4A F5 A5 13 0E 07 75 26
    +00E0 | 12 8B 6B 62 AC 2D EE 61 7F 51 DF C3 D1 76 CB 0B
    +00F0 | 37 A9 A6 1C 38 6D ED A7 8C 1F 27 9B E3 FC 34 5E
    +0100 | 46 DB C6 47 E8 8A BA 15 D7 11 59 B9 F6 97 87 EA
    +0110 | 90 F5 C0 13 68 C2 83 56 C1 B5 57 D0 7D 9D 5F 33
    +0120 | 52 D3 C5 5A 1D 91 1C EE 6B 32 23 9A AD 98 DB E0
    +0130 | 39 6F B8 FB 31 11 45 E0 D9 F9 D9 B8 F8 24 46 25
    +0140 | 6B 7A 41 9E 6D 99 09 3C 05 02 6F B4 3A 08 37 0D
    +0150 | C5 9B F4 50

    Payload (de)serialization:

    req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;
    message_id 8, 898B80900E4576365F84C0D00C04B6665 Message ID generated as specified here » (unixtime() << 32) + (N*4)
    nonce 24, 16C050C45483E6C2E330D6521499453D5BB5599AFA6BAC2EA90ABEE2D7B54DD51D Random number
    message_id 8, 801A036E7E457636501F8B9D7C04B6665 Message ID generated as specified here » (unixtime() << 32) + (N*4)
    message_length 16, 458000000 (88 in decimal)60000000 (96 in decimal) Message body length
    nonce 24, 16C050C45483E6C2E330D6521499453D5BB5599AFA6BAC2EA90ABEE2D7B54DD51D Value generated by client in Step 1
    server_nonce 40, 16533BACFB1167B9558095BD91A77F8D0E97032293F48BFDEB2D7C79AF5022FEFE Server-generated random number
    pq 56, 12082D8EA250674C7B4D000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 3282739644613819213
    0826FEF7F1B4917CD1000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 2809955835014380753
    Single-byte prefix denoting length, an 8-byte string, and three bytes of padding
    pq 4, 12082D8EA250674C7B4D000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 3282739644613819213
    0826FEF7F1B4917CD1000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 2809955835014380753
    Single-byte prefix denoting length, 8-byte string, and three bytes of padding
    p 16, 804662BC93F000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 1714145599
    0454A8BA55000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 1420343893
    First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
    q 24, 8047225EC73000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 1915087987
    0475EB6C8D000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 1978363021
    Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
    nonce 32, 16C050C45483E6C2E330D6521499453D5BB5599AFA6BAC2EA90ABEE2D7B54DD51D Value generated by client in Step 1
    server_nonce 48, 16533BACFB1167B9558095BD91A77F8D0E97032293F48BFDEB2D7C79AF5022FEFE Value received from server in Step 2
    new_nonce 64, 32C6A06071DD25D90192CDC602F65AEEBB BFBAFF36141148C8FD54BEDAD35AD6973BAE9AB812726CF21A9DCA9A9D37A311 7A81D381D8528CA0C4E25CBBCD8D94E6 Client-generated random number
    @@ -345,7 +345,7 @@ random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA - + @@ -363,25 +363,25 @@ random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA - + - + - + - + @@ -393,7 +393,7 @@ random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA - + @@ -402,47 +402,47 @@ random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA
    6) Server responds with:

    Received payload (excluding transport headers/trailers):

    -
    0000 | 00 00 00 00 00 00 00 00 01 EC A2 A7 E5 57 63 65
    -0010 | A4 02 00 00 5C 07 E8 D0 C0 50 C4 54 83 E6 C2 E3
    -0020 | 30 D6 52 14 99 45 3D 5B 53 3B AC FB 11 67 B9 55
    -0030 | 80 95 BD 91 A7 7F 8D 0E FE 50 02 00 A5 43 81 85
    -0040 | D3 4A 6F 57 F3 6A 57 8D 18 9F 02 6F 7A 32 D3 DC
    -0050 | 05 A3 41 A3 9C 23 C4 BA D1 8C 4C DB 78 A1 A2 DE
    -0060 | 8B F1 85 3A BD 10 62 50 C3 7D 13 E2 D3 C3 80 71
    -0070 | 0A 36 F5 02 60 FE D7 8D FA 5A D4 85 D2 AF D5 1D
    -0080 | 05 77 CE 22 98 60 A3 66 8D F2 AA 2C 3B 86 38 0A
    -0090 | 42 40 3B 80 06 60 11 FD 79 D1 81 D4 20 C6 21 B8
    -00A0 | 6E 8F 96 C7 A3 65 F9 34 0D 01 48 26 5B 6E 32 18
    -00B0 | 50 05 5C 4D E7 5E 3C 58 1A 9C E3 9A 11 97 46 7C
    -00C0 | 7F C6 F4 A2 D3 49 85 DA 26 B1 22 A7 5B 1B 66 0B
    -00D0 | 96 85 81 FA AE FD 8B B8 DB 30 7F B3 12 34 EA F3
    -00E0 | DD 3F 31 94 33 17 C3 F0 99 8E 67 59 02 3F 25 4A
    -00F0 | 19 A5 7C 70 41 4D 31 76 68 FF F7 E1 DC B0 EC F0
    -0100 | 88 78 21 B9 A7 B4 05 CD 13 AE 67 54 22 93 E4 04
    -0110 | CA A5 B0 AE 34 63 CE 8B B6 F7 26 BA D9 A1 E0 53
    -0120 | 9F 86 3A 31 81 8D B7 68 49 9C C9 0D 29 21 04 BF
    -0130 | 7D 54 F0 1D 15 73 9A EB 6B 9F 8C 89 28 C6 4C F5
    -0140 | 0C BC B7 2A A4 A4 AE 1F 5E BC B9 2A 9F 56 5F 9C
    -0150 | 45 3D 07 1D 28 9C 91 67 46 1D 8D 3A 2E DA 8C 0C
    -0160 | 8E CC 0A 1D 9B E9 6F DA 1C 56 01 1E C9 D5 79 8A
    -0170 | A2 F3 FD 13 C5 AB 52 DC 06 62 0B CD F2 CC 61 0E
    -0180 | B5 20 B6 DB 94 C8 2E 30 FC 87 AE 65 25 B7 B3 2C
    -0190 | B7 BB 70 87 B3 59 A5 9A 03 9D 04 4C 64 29 81 24
    -01A0 | 7C 30 1A 9C 8E D5 1B 73 F2 D1 D4 45 5C 04 53 D2
    -01B0 | 60 74 1D 3D BB 78 83 74 D1 51 F0 E5 3A 20 DF AA
    -01C0 | 36 38 F2 6F 36 20 62 73 9A 4E 7A 57 1C 4A 96 23
    -01D0 | 91 DB D3 65 10 AF E4 4C 0D 9B 50 0B 9B 46 E1 9E
    -01E0 | 1A EF 88 0E 96 C0 49 3C D7 92 59 91 9C F2 56 24
    -01F0 | 52 3A 74 17 A1 FB 21 7E 5C 97 89 99 F2 29 DE B2
    -0200 | 90 3A DD 8E E1 ED 7E F6 AD B2 A2 4A 9D B4 3D 3C
    -0210 | F4 8B 24 EA A8 48 FF DD 6E EA DC 08 74 04 00 63
    -0220 | 46 A8 B8 2C C7 38 BE 4D E3 27 6D D3 2C 5B 12 A3
    -0230 | AA 60 D5 2B 21 1F D3 1C CF 95 08 E5 9B E8 FB 3A
    -0240 | 32 EE 3A 70 BA BB 60 3F 7D 76 A5 AE 7A DE 0A 6C
    -0250 | 8E 39 1B 1F D9 C2 60 C9 15 D0 92 3B 19 99 43 A9
    -0260 | 56 C7 BB 28 3D 41 BB 4D E4 62 DC BB 7C 2E 4A 2E
    -0270 | E9 71 FD 92 52 CF AB C4 2F 31 9E 99 95 0C E7 D3
    -0280 | 95 E5 9B 42 BC 26 AC 4D BF C3 8F 1A
    +
    0000 | 00 00 00 00 00 00 00 00 01 9C 0A 90 C1 4B 66 65
    +0010 | 7C 02 00 00 5C 07 E8 D0 B5 59 9A FA 6B AC 2E A9
    +0020 | 0A BE E2 D7 B5 4D D5 1D 97 03 22 93 F4 8B FD EB
    +0030 | 2D 7C 79 AF 50 22 FE FE FE 50 02 00 DD 82 E6 8C
    +0040 | 30 FC 02 8C 14 BF 84 ED 03 77 85 F2 FA 4E BE BB
    +0050 | 1E 24 AC C2 5C 77 22 C2 40 77 D4 3A 5F 72 21 BF
    +0060 | 3B 90 14 27 19 4A DD 03 56 54 BA 8A 3B DB 30 22
    +0070 | B7 93 AF B4 97 44 45 62 D4 41 46 D2 8A 1B 7A 62
    +0080 | D1 D6 69 51 5B 5E 5A CF F7 5B 07 FE 4B 46 11 9D
    +0090 | 50 CD 05 AD 27 9A 49 C6 4F EF D9 27 F0 A2 77 03
    +00A0 | 38 8A 37 04 D0 4A 9D D4 38 9C FD 0E B6 B6 01 51
    +00B0 | B7 34 F9 20 6B CF 3C 76 F1 77 8B CB 79 B0 71 94
    +00C0 | A1 27 A3 94 85 47 8F 05 C9 B1 87 A0 29 B2 8A AF
    +00D0 | 77 74 6F 1D 2A CF 2F D5 BF F3 5D 3C CD C8 06 DD
    +00E0 | 5B 56 52 F1 60 54 F2 47 C4 03 7B A0 F2 AF CA 9A
    +00F0 | 0A 90 42 C8 23 8C 23 94 1D A5 2A B9 C6 08 A3 9C
    +0100 | F5 C1 E2 DE 4A C3 97 13 D6 E6 A6 37 0F F9 56 31
    +0110 | E9 CF 8C 9B 16 28 E8 BE F6 B0 6D 52 75 94 39 45
    +0120 | 75 2E 6C 4C 83 89 68 B8 09 7E D4 45 40 0A 20 39
    +0130 | 5B F2 4B 43 2D F1 6F 46 99 BE F0 C0 B4 EE 36 3A
    +0140 | 53 64 84 45 43 1A E1 C0 23 20 59 1B B9 95 63 60
    +0150 | 86 DB 66 8F 0E EF 42 34 06 AB 3C F8 CF EE 92 0F
    +0160 | 68 66 88 AC 8B F5 48 E1 89 1C 83 88 30 29 9C 7D
    +0170 | C7 43 41 F0 53 22 38 F2 9F 32 5E 26 47 DA C2 2B
    +0180 | FC FC 99 2B 84 0D 1A 35 24 CB 23 4B C0 F3 7B 05
    +0190 | 39 ED 7A A2 2E 63 67 18 55 DD 5C 0C 22 09 F0 32
    +01A0 | CD 22 D9 2C 83 9E 91 FF A1 AA 6B EF 7E EC 26 9A
    +01B0 | 2C C1 4F F8 0E 98 A1 1A 3C 00 2F CB 32 47 1F C8
    +01C0 | DB 98 EA 0F 2B 94 54 D8 E3 C8 63 9B 64 5B 7A BE
    +01D0 | 2C 42 1F 50 C0 F5 1F 39 42 6E 3A 3D 3D 23 EA 38
    +01E0 | 28 6C 43 39 07 0D A0 4F E3 18 94 87 DC E5 FB 44
    +01F0 | FA 4B 10 FD 78 37 10 B3 56 27 B9 AE 06 79 0B ED
    +0200 | D5 7A EB 9B 5C F6 12 26 CE 89 65 58 22 C5 93 E5
    +0210 | E8 6A EE F4 7A BF FB CB 08 60 1C E1 20 73 3E 27
    +0220 | 3A AC 37 65 9B E4 B5 3A 3B 4A BC 23 31 FB A5 BA
    +0230 | E5 1D 55 BB DA F4 2A 48 64 56 C8 CB D9 58 35 2D
    +0240 | 68 D3 13 72 48 B0 4A B0 AE F9 27 6C CE 42 E9 AB
    +0250 | 52 54 7C 2E 59 70 7E A6 B7 9E 0D 38 3E AF 5C EF
    +0260 | BB 27 A0 CC E4 0F D7 63 3D D1 99 66 73 BA C8 42
    +0270 | 70 00 B9 FC F1 C4 21 22 9E F9 B0 11 F4 40 BB 49
    +0280 | 40 65 D7 EF 2C 35 7D 2E D2 FF 3D 0F

    Payload (de)serialization:

    server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;
    message_id 8, 89C340800E5576365FC4C0D00C04B6665 Message ID generated as specified here » (unixtime() << 32) + (N*4)
    nonce 24, 16C050C45483E6C2E330D6521499453D5BB5599AFA6BAC2EA90ABEE2D7B54DD51D Value generated by client in Step 1
    server_nonce 40, 16533BACFB1167B9558095BD91A77F8D0E97032293F48BFDEB2D7C79AF5022FEFE Value received from server in Step 2
    p 56, 804662BC93F000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 1714145599
    0454A8BA55000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 1420343893
    First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
    q 64, 8047225EC73000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 1915087987
    0475EB6C8D000000
    TL byte deserialization
    => bigendian conversion to decimal
    => 1978363021
    Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
    encrypted_data 80, 260FE000100AB05DFE223030018B0E6A1D5 8FBA9E9AE568DB395B5202C6284621AE 5381E536DC9932757EF89B571D5E8F0D 686FF13A952E229608A4D0185E95E86A 6C2155CED021AA97A3E97DB21D89C361 006FFC1923D168381CC045A82EF1CB2C 1E3D75BEC6A22E37930EE6219A3238D1 0CAED7325C244C1F5906D1B79F252054 E80185A8B769AEB7266808A26D838750 5796D4E10959C573240AAB2FA611DE81 6AA069FEFA4D46809C83789D1EAAAD4C 14249D98241315561F35E8C9021A6991 8441AEFA8F34E8523EE9E22CBE57DE90 3954405E70387306C2E0C40CC272C9F3 B9EA361E554677797796194EDFFD3852 43BF592729F26D54AC82D326053C8580
    437DD57A
    FE000100E2936EF84988FDB8D5B7FB74 06916AA843002E214F136CDFDAA76DFD CC0AF1490C3740B8CC4C8CC752CDA2AD CF2BE3D6EEC40F69D3527C7E15A22CEF B918CFB57532A69A852A08B71863D8B2 82C47D8500379CC1D127849B539928AD B63F27373938F2F834F94E30AB266DF5 41EA8D1C0E651DB17C204E27760FEA82 2134BBFF5C1490734AF5A5130E077526 128B6B62AC2DEE617F51DFC3D176CB0B 37A9A61C386DEDA78C1F279BE3FC345E 46DBC647E88ABA15D71159B9F69787EA 90F5C01368C28356C1B557D07D9D5F33 52D3C55A1D911CEE6B32239AAD98DBE0 396FB8FB311145E0D9F9D9B8F8244625 6B7A419E6D99093C05026FB43A08370D
    C59BF450
    Value generated above
    @@ -464,13 +464,13 @@ random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA - + - + @@ -482,19 +482,19 @@ random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA - + - + - + @@ -502,20 +502,20 @@ random_padding_bytes = BB7BE6BB46F63D92991135E46285BD79AC708608F822D5B593FA8A4CA

    Decrypt encrypted_answer using the reverse of the process specified in step 6:

    -
    encrypted_answer = A5438185D34A6F57F36A578D189F026F7A32D3DC05A341A39C23C4BAD18C4CDB78A1A2DE8BF1853ABD106250C37D13E2D3C380710A36F50260FED78DFA5AD485D2AFD51D0577CE229860A3668DF2AA2C3B86380A42403B80066011FD79D181D420C621B86E8F96C7A365F9340D0148265B6E321850055C4DE75E3C581A9CE39A1197467C7FC6F4A2D34985DA26B122A75B1B660B968581FAAEFD8BB8DB307FB31234EAF3DD3F31943317C3F0998E6759023F254A19A57C70414D317668FFF7E1DCB0ECF0887821B9A7B405CD13AE67542293E404CAA5B0AE3463CE8BB6F726BAD9A1E0539F863A31818DB768499CC90D292104BF7D54F01D15739AEB6B9F8C8928C64CF50CBCB72AA4A4AE1F5EBCB92A9F565F9C453D071D289C9167461D8D3A2EDA8C0C8ECC0A1D9BE96FDA1C56011EC9D5798AA2F3FD13C5AB52DC06620BCDF2CC610EB520B6DB94C82E30FC87AE6525B7B32CB7BB7087B359A59A039D044C642981247C301A9C8ED51B73F2D1D4455C0453D260741D3DBB788374D151F0E53A20DFAA3638F26F362062739A4E7A571C4A962391DBD36510AFE44C0D9B500B9B46E19E1AEF880E96C0493CD79259919CF25624523A7417A1FB217E5C978999F229DEB2903ADD8EE1ED7EF6ADB2A24A9DB43D3CF48B24EAA848FFDD6EEADC087404006346A8B82CC738BE4DE3276DD32C5B12A3AA60D52B211FD31CCF9508E59BE8FB3A32EE3A70BABB603F7D76A5AE7ADE0A6C8E391B1FD9C260C915D0923B199943A956C7BB283D41BB4DE462DCBB7C2E4A2EE971FD9252CFABC42F319E99950CE7D395E59B42BC26AC4DBFC38F1A
    -tmp_aes_key = DDE9D7DA461399FD1D9564B9313F80C9B33BE062852B3D48A82D396812037569
    -tmp_aes_iv = 23E6A1FE2F85BF5F4EA12E1514BB8D937849463EF3B1027712C1F8D2C6A06071
    +
    encrypted_answer = DD82E68C30FC028C14BF84ED037785F2FA4EBEBB1E24ACC25C7722C24077D43A5F7221BF3B901427194ADD035654BA8A3BDB3022B793AFB497444562D44146D28A1B7A62D1D669515B5E5ACFF75B07FE4B46119D50CD05AD279A49C64FEFD927F0A27703388A3704D04A9DD4389CFD0EB6B60151B734F9206BCF3C76F1778BCB79B07194A127A39485478F05C9B187A029B28AAF77746F1D2ACF2FD5BFF35D3CCDC806DD5B5652F16054F247C4037BA0F2AFCA9A0A9042C8238C23941DA52AB9C608A39CF5C1E2DE4AC39713D6E6A6370FF95631E9CF8C9B1628E8BEF6B06D5275943945752E6C4C838968B8097ED445400A20395BF24B432DF16F4699BEF0C0B4EE363A53648445431AE1C02320591BB995636086DB668F0EEF423406AB3CF8CFEE920F686688AC8BF548E1891C838830299C7DC74341F0532238F29F325E2647DAC22BFCFC992B840D1A3524CB234BC0F37B0539ED7AA22E63671855DD5C0C2209F032CD22D92C839E91FFA1AA6BEF7EEC269A2CC14FF80E98A11A3C002FCB32471FC8DB98EA0F2B9454D8E3C8639B645B7ABE2C421F50C0F51F39426E3A3D3D23EA38286C4339070DA04FE3189487DCE5FB44FA4B10FD783710B35627B9AE06790BEDD57AEB9B5CF61226CE89655822C593E5E86AEEF47ABFFBCB08601CE120733E273AAC37659BE4B53A3B4ABC2331FBA5BAE51D55BBDAF42A486456C8CBD958352D68D3137248B04AB0AEF9276CCE42E9AB52547C2E59707EA6B79E0D383EAF5CEFBB27A0CCE40FD7633DD1996673BAC8427000B9FCF1C421229EF9B011F440BB494065D7EF2C357D2ED2FF3D0F
    +tmp_aes_key = 1958F662C25BC962035DCDB03466EEE5912D0A27078AC3B48D09FF58C35597ED
    +tmp_aes_iv = 14EAA9C9B97D2BFABEF57C84CEE9FBE743EA0FA0F91CCE32E91A66683BAE9AB8

    Yielding:

    -
    answer_with_hash = 4981FEE758D8D56353659697CAD7365E11277F6DBA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0E03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001004916D416BFA942C255D504A1D88816E0D80F34339B3C1376A762AD2576372A5249A5FCDE1A49958BC65225E92C93FD93F65DC937E8A7F0546D06736CD8485ACE26F4859402156493386E61B772F5F284CFF194B96D58476DA6A52F2E1C61E932E6FEABB2ADABE10F14F0EA0D09DF221398014C7D0C210470F4C6F9BE6EF14C0003A5985E6B7D82E7B4A6D8C6C304C37852D75E87BAAE2A7D893698EBF5453DA4BACA62DFC5D4E8DC2712F07118A9008824368E96C3EE9D9984DA64D0943F02DB7E17E4321D8C91155CA500B338297405B1B6871BF39AFD240492FBB7D9C6F3AC0DA8EA80070AAAD2590EB474FCE3EEE3736642AACF362169F8C2A7F68BAE15AFE5576365EBFE2B4E1BFAC66E
    -answer = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0E03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001004916D416BFA942C255D504A1D88816E0D80F34339B3C1376A762AD2576372A5249A5FCDE1A49958BC65225E92C93FD93F65DC937E8A7F0546D06736CD8485ACE26F4859402156493386E61B772F5F284CFF194B96D58476DA6A52F2E1C61E932E6FEABB2ADABE10F14F0EA0D09DF221398014C7D0C210470F4C6F9BE6EF14C0003A5985E6B7D82E7B4A6D8C6C304C37852D75E87BAAE2A7D893698EBF5453DA4BACA62DFC5D4E8DC2712F07118A9008824368E96C3EE9D9984DA64D0943F02DB7E17E4321D8C91155CA500B338297405B1B6871BF39AFD240492FBB7D9C6F3AC0DA8EA80070AAAD2590EB474FCE3EEE3736642AACF362169F8C2A7F68BAE15AFE5576365EBFE2B4E1BFAC66E
    +
    answer_with_hash = 9F5F0A1FE926289582985E0892DEE63154911B2CBA0D89B5B5599AFA6BAC2EA90ABEE2D7B54DD51D97032293F48BFDEB2D7C79AF5022FEFE03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001009B6E8C566CD00054BAFC61744174666511C4F16FA61CDAE17673FC572C8671225A872F4BC049FD32EBE4263B4A19FEEA8C4F89986F158D0D1CF7CB4C45EEAAAFF00A1A38C1240324AEBF04EE53D6B50ED913001266EDF5A0BEBE60D0BC969A81D52F6222E5FBB6E6025B06779C05CAE0FDDFFDF440BCBF543017BF377F00C82E9FA5FE1DD8063CC4CD5B3E2CAF097ECDCFFA64D8B2C9A4C1125882C81DD70BE7A74DE6EFA2C5643F2926610281D55336760DBAFB5EB63147E88C007A481803F5CDCD4769B735D34635D8A4CABC7A2779963030552BB1831709E9489CB12886586AB37E525185D67AC6211B57C3909F3ADBDCF325A1FFD605DEE142468163FBA2C14B6665D241CA53FBE82768
    +answer = BA0D89B5B5599AFA6BAC2EA90ABEE2D7B54DD51D97032293F48BFDEB2D7C79AF5022FEFE03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001009B6E8C566CD00054BAFC61744174666511C4F16FA61CDAE17673FC572C8671225A872F4BC049FD32EBE4263B4A19FEEA8C4F89986F158D0D1CF7CB4C45EEAAAFF00A1A38C1240324AEBF04EE53D6B50ED913001266EDF5A0BEBE60D0BC969A81D52F6222E5FBB6E6025B06779C05CAE0FDDFFDF440BCBF543017BF377F00C82E9FA5FE1DD8063CC4CD5B3E2CAF097ECDCFFA64D8B2C9A4C1125882C81DD70BE7A74DE6EFA2C5643F2926610281D55336760DBAFB5EB63147E88C007A481803F5CDCD4769B735D34635D8A4CABC7A2779963030552BB1831709E9489CB12886586AB37E525185D67AC6211B57C3909F3ADBDCF325A1FFD605DEE142468163FBA2C14B6665D241CA53FBE82768

    Generated payload (excluding transport headers/trailers):

    -
    0000 | BA 0D 89 B5 C0 50 C4 54 83 E6 C2 E3 30 D6 52 14
    -0010 | 99 45 3D 5B 53 3B AC FB 11 67 B9 55 80 95 BD 91
    -0020 | A7 7F 8D 0E 03 00 00 00 FE 00 01 00 C7 1C AE B9
    +
    0000 | BA 0D 89 B5 B5 59 9A FA 6B AC 2E A9 0A BE E2 D7
    +0010 | B5 4D D5 1D 97 03 22 93 F4 8B FD EB 2D 7C 79 AF
    +0020 | 50 22 FE FE 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 = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0
     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 | 49 16 D4 16 BF A9 42 C2 55 D5 04 A1 D8 88 16 E0
    -0140 | D8 0F 34 33 9B 3C 13 76 A7 62 AD 25 76 37 2A 52
    -0150 | 49 A5 FC DE 1A 49 95 8B C6 52 25 E9 2C 93 FD 93
    -0160 | F6 5D C9 37 E8 A7 F0 54 6D 06 73 6C D8 48 5A CE
    -0170 | 26 F4 85 94 02 15 64 93 38 6E 61 B7 72 F5 F2 84
    -0180 | CF F1 94 B9 6D 58 47 6D A6 A5 2F 2E 1C 61 E9 32
    -0190 | E6 FE AB B2 AD AB E1 0F 14 F0 EA 0D 09 DF 22 13
    -01A0 | 98 01 4C 7D 0C 21 04 70 F4 C6 F9 BE 6E F1 4C 00
    -01B0 | 03 A5 98 5E 6B 7D 82 E7 B4 A6 D8 C6 C3 04 C3 78
    -01C0 | 52 D7 5E 87 BA AE 2A 7D 89 36 98 EB F5 45 3D A4
    -01D0 | BA CA 62 DF C5 D4 E8 DC 27 12 F0 71 18 A9 00 88
    -01E0 | 24 36 8E 96 C3 EE 9D 99 84 DA 64 D0 94 3F 02 DB
    -01F0 | 7E 17 E4 32 1D 8C 91 15 5C A5 00 B3 38 29 74 05
    -0200 | B1 B6 87 1B F3 9A FD 24 04 92 FB B7 D9 C6 F3 AC
    -0210 | 0D A8 EA 80 07 0A AA D2 59 0E B4 74 FC E3 EE E3
    -0220 | 73 66 42 AA CF 36 21 69 F8 C2 A7 F6 8B AE 15 AF
    -0230 | E5 57 63 65
    +0130 | 9B 6E 8C 56 6C D0 00 54 BA FC 61 74 41 74 66 65 +0140 | 11 C4 F1 6F A6 1C DA E1 76 73 FC 57 2C 86 71 22 +0150 | 5A 87 2F 4B C0 49 FD 32 EB E4 26 3B 4A 19 FE EA +0160 | 8C 4F 89 98 6F 15 8D 0D 1C F7 CB 4C 45 EE AA AF +0170 | F0 0A 1A 38 C1 24 03 24 AE BF 04 EE 53 D6 B5 0E +0180 | D9 13 00 12 66 ED F5 A0 BE BE 60 D0 BC 96 9A 81 +0190 | D5 2F 62 22 E5 FB B6 E6 02 5B 06 77 9C 05 CA E0 +01A0 | FD DF FD F4 40 BC BF 54 30 17 BF 37 7F 00 C8 2E +01B0 | 9F A5 FE 1D D8 06 3C C4 CD 5B 3E 2C AF 09 7E CD +01C0 | CF FA 64 D8 B2 C9 A4 C1 12 58 82 C8 1D D7 0B E7 +01D0 | A7 4D E6 EF A2 C5 64 3F 29 26 61 02 81 D5 53 36 +01E0 | 76 0D BA FB 5E B6 31 47 E8 8C 00 7A 48 18 03 F5 +01F0 | CD CD 47 69 B7 35 D3 46 35 D8 A4 CA BC 7A 27 79 +0200 | 96 30 30 55 2B B1 83 17 09 E9 48 9C B1 28 86 58 +0210 | 6A B3 7E 52 51 85 D6 7A C6 21 1B 57 C3 90 9F 3A +0220 | DB DC F3 25 A1 FF D6 05 DE E1 42 46 81 63 FB A2 +0230 | C1 4B 66 65

    Payload (de)serialization:

    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;
    message_id 8, 801ECA2A7E5576365019C0A90C14B6665 Message ID generated as specified here » (unixtime() << 32) + (N*4)
    message_length 16, 4A4020000 (676 in decimal)7C020000 (636 in decimal) Message body length
    nonce 24, 16C050C45483E6C2E330D6521499453D5BB5599AFA6BAC2EA90ABEE2D7B54DD51D Value generated by client in Step 1
    server_nonce 40, 16533BACFB1167B9558095BD91A77F8D0E97032293F48BFDEB2D7C79AF5022FEFE Value received from server in Step 2
    encrypted_answer 56, 596FE500200A5438185D34A6F57F36A578D 189F026F7A32D3DC05A341A39C23C4BA D18C4CDB78A1A2DE8BF1853ABD106250 C37D13E2D3C380710A36F50260FED78D FA5AD485D2AFD51D0577CE229860A366 8DF2AA2C3B86380A42403B80066011FD 79D181D420C621B86E8F96C7A365F934 0D0148265B6E321850055C4DE75E3C58 1A9CE39A1197467C7FC6F4A2D34985DA 26B122A75B1B660B968581FAAEFD8BB8 DB307FB31234EAF3DD3F31943317C3F0 998E6759023F254A19A57C70414D3176 68FFF7E1DCB0ECF0887821B9A7B405CD 13AE67542293E404CAA5B0AE3463CE8B B6F726BAD9A1E0539F863A31818DB768 499CC90D292104BF7D54F01D15739AEB 6B9F8C8928C64CF50CBCB72AA4A4AE1F 5EBCB92A9F565F9C453D071D289C9167 461D8D3A2EDA8C0C8ECC0A1D9BE96FDA 1C56011EC9D5798AA2F3FD13C5AB52DC 06620BCDF2CC610EB520B6DB94C82E30 FC87AE6525B7B32CB7BB7087B359A59A 039D044C642981247C301A9C8ED51B73 F2D1D4455C0453D260741D3DBB788374 D151F0E53A20DFAA3638F26F36206273 9A4E7A571C4A962391DBD36510AFE44C 0D9B500B9B46E19E1AEF880E96C0493C D79259919CF25624523A7417A1FB217E 5C978999F229DEB2903ADD8EE1ED7EF6 ADB2A24A9DB43D3CF48B24EAA848FFDD 6EEADC087404006346A8B82CC738BE4D E3276DD32C5B12A3AA60D52B211FD31C CF9508E59BE8FB3A32EE3A70BABB603F 7D76A5AE7ADE0A6C8E391B1FD9C260C9 15D0923B199943A956C7BB283D41BB4D E462DCBB7C2E4A2EE971FD9252CFABC4 2F319E99950CE7D395E59B42BC26AC4D
    BFC38F1A
    FE500200DD82E68C30FC028C14BF84ED 037785F2FA4EBEBB1E24ACC25C7722C2 4077D43A5F7221BF3B901427194ADD03 5654BA8A3BDB3022B793AFB497444562 D44146D28A1B7A62D1D669515B5E5ACF F75B07FE4B46119D50CD05AD279A49C6 4FEFD927F0A27703388A3704D04A9DD4 389CFD0EB6B60151B734F9206BCF3C76 F1778BCB79B07194A127A39485478F05 C9B187A029B28AAF77746F1D2ACF2FD5 BFF35D3CCDC806DD5B5652F16054F247 C4037BA0F2AFCA9A0A9042C8238C2394 1DA52AB9C608A39CF5C1E2DE4AC39713 D6E6A6370FF95631E9CF8C9B1628E8BE F6B06D5275943945752E6C4C838968B8 097ED445400A20395BF24B432DF16F46 99BEF0C0B4EE363A53648445431AE1C0 2320591BB995636086DB668F0EEF4234 06AB3CF8CFEE920F686688AC8BF548E1 891C838830299C7DC74341F0532238F2 9F325E2647DAC22BFCFC992B840D1A35 24CB234BC0F37B0539ED7AA22E636718 55DD5C0C2209F032CD22D92C839E91FF A1AA6BEF7EEC269A2CC14FF80E98A11A 3C002FCB32471FC8DB98EA0F2B9454D8 E3C8639B645B7ABE2C421F50C0F51F39 426E3A3D3D23EA38286C4339070DA04F E3189487DCE5FB44FA4B10FD783710B3 5627B9AE06790BEDD57AEB9B5CF61226 CE89655822C593E5E86AEEF47ABFFBCB 08601CE120733E273AAC37659BE4B53A 3B4ABC2331FBA5BAE51D55BBDAF42A48 6456C8CBD958352D68D3137248B04AB0 AEF9276CCE42E9AB52547C2E59707EA6 B79E0D383EAF5CEFBB27A0CCE40FD763 3DD1996673BAC8427000B9FCF1C42122 9EF9B011F440BB494065D7EF2C357D2E
    D2FF3D0F
    See below
    @@ -570,13 +570,13 @@ answer = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0 - + - + @@ -594,13 +594,13 @@ answer = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0 - + - + @@ -609,34 +609,34 @@ answer = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0
    7) Client computes random 2048-bit number b (using a sufficient amount of entropy) and sends the server a message

    First, generate a secure random 2048-bit number b:

    -
    b = 1690CE50058E37D10D31692F9BA3CCDA8023192F99EAFF1CCB556981BA08BC948D90B29E964137F12FEEB4B416212F96399825D52EEF78BFD0A5EE912DE42AC307AC10FF6547C1AC166D86D9603D259AAABAF03EAA80318CDBE1276476543B7F0FF381419BD9A52101F632608C51FBABAEBE4D16DBEDA7CA729722E304A8A1D0945B1CFEACA4970A4E7BAB66B5159519A10841A641333E76B6F7012C86BD9E7F40D4D7AF86007D713BF5BD716965FDC318370C4AFD10E2FC0B0798C318D757D14F2F88EA8AB529EBC7A8614108EF89DDFCF61F83DECDB688DAC7C8057CA658F4AFD9C450E7B37A86CA67FFFB647708835FE1833F6702820D44B3076943510824
    +
    b = 6074DE2CD93A3DD76723B23E1AC824FB4510736FFBC794C798108AB034F46FB46E7F7FE8BCD9DFBC01B346AF766D8F2B683F89C7ACA0FB85C3ECC699F3095E20659498E9074A5456CC395F9B7E936D94BDE4468C8DD0EC41ADBC0EC34360563B7365369A5432DB8DE1564F27B51890A57C99FC7AA6C6D6F7F6799947526A50C46C97FFA62272008B7831A903AC2857A3CDA6FD786CE10643E58613145B3E88E0E2E863839C09E27899F68952E12B15EE2A27999527214BBEEF952DA0AB84CCFC382310BD185BF0A930DF27387445ED31D8EBB33339FC01EC3CA5EB60A389D2AC470D71D00C5CEDE2EEB0E5A5E902C27EFCA01BB5CFD35093BAF877C9F0A4D632

    Then compute g_b = pow(g, b) mod dh_prime

    -
    g_b = B5B7ECA50AA21159E6808734399E78D58C7DE735990AF8B1746B86107EBCEDCBCBAEABD2015748E99BE50429B233BB0E94572C48DF4D138D5587C37FAB8394A1660F7C1183E1C145A5C71349D39D146DF30FB39624AE87868937EA0EC34E433A217DA33A84A0150412DCDC257D11B4B68C7280B06A6C751F3AA8ED313F23049DB2470B09AFDD52A4362F9FF28287C11F4750443C6440125C44F21F0B410E49A39E10F45DA6ACF7FC2AA14D1549C7674692DA2192CE41B1238B0E94F17328C18550BC5C74CA9655B368A95660134B662DFC194F95A7437FD59E9E81FD8E1A6A51CC37604472F864C0317D5A16998F1191D1D539F0105DBD872104B5EDF13A357E
    +
    g_b = 6BB1E74F256AA9E11A6D1D408213ADD2D81809FBF74D24A61392948C0C0D9814CD9FF9ABED79033B4E10E27EA96121F92FB3FE6CE8224AC2ED82B0BABBC70342D903B8EEDDBC6DB5D5AFAE214A3C141770C1CE2CDCEA1E223D72ACB07F53C4583AC19A3FB61D6629DFE0BE02E5C1817DCC07ED57A759F28AF0C0018F8FFFF20A8E686D7F08B8EF3D1CC2310A81E1E577A408A12BFEC439966DBC8D658FA571399B728325897B4CC3566D6ABA99A688A7011206997BB5970B4CFFBA3AC796FD182CD6C51D9981AB1718F513D95DE2C9016C2841AFBCDB9651D919921D57B64E6E06127D99051FD4E83FD50939B2C15AD092D7D681ABED7C49CD5A0BBBAD40D83C
    7.1) generation of encrypted_data

    Generated payload (excluding transport headers/trailers):

    -
    0000 | 54 B6 43 66 C0 50 C4 54 83 E6 C2 E3 30 D6 52 14
    -0010 | 99 45 3D 5B 53 3B AC FB 11 67 B9 55 80 95 BD 91
    -0020 | A7 7F 8D 0E 00 00 00 00 00 00 00 00 FE 00 01 00
    -0030 | B5 B7 EC A5 0A A2 11 59 E6 80 87 34 39 9E 78 D5
    -0040 | 8C 7D E7 35 99 0A F8 B1 74 6B 86 10 7E BC ED CB
    -0050 | CB AE AB D2 01 57 48 E9 9B E5 04 29 B2 33 BB 0E
    -0060 | 94 57 2C 48 DF 4D 13 8D 55 87 C3 7F AB 83 94 A1
    -0070 | 66 0F 7C 11 83 E1 C1 45 A5 C7 13 49 D3 9D 14 6D
    -0080 | F3 0F B3 96 24 AE 87 86 89 37 EA 0E C3 4E 43 3A
    -0090 | 21 7D A3 3A 84 A0 15 04 12 DC DC 25 7D 11 B4 B6
    -00A0 | 8C 72 80 B0 6A 6C 75 1F 3A A8 ED 31 3F 23 04 9D
    -00B0 | B2 47 0B 09 AF DD 52 A4 36 2F 9F F2 82 87 C1 1F
    -00C0 | 47 50 44 3C 64 40 12 5C 44 F2 1F 0B 41 0E 49 A3
    -00D0 | 9E 10 F4 5D A6 AC F7 FC 2A A1 4D 15 49 C7 67 46
    -00E0 | 92 DA 21 92 CE 41 B1 23 8B 0E 94 F1 73 28 C1 85
    -00F0 | 50 BC 5C 74 CA 96 55 B3 68 A9 56 60 13 4B 66 2D
    -0100 | FC 19 4F 95 A7 43 7F D5 9E 9E 81 FD 8E 1A 6A 51
    -0110 | CC 37 60 44 72 F8 64 C0 31 7D 5A 16 99 8F 11 91
    -0120 | D1 D5 39 F0 10 5D BD 87 21 04 B5 ED F1 3A 35 7E
    +
    0000 | 54 B6 43 66 B5 59 9A FA 6B AC 2E A9 0A BE E2 D7
    +0010 | B5 4D D5 1D 97 03 22 93 F4 8B FD EB 2D 7C 79 AF
    +0020 | 50 22 FE FE 00 00 00 00 00 00 00 00 FE 00 01 00
    +0030 | 6B B1 E7 4F 25 6A A9 E1 1A 6D 1D 40 82 13 AD D2
    +0040 | D8 18 09 FB F7 4D 24 A6 13 92 94 8C 0C 0D 98 14
    +0050 | CD 9F F9 AB ED 79 03 3B 4E 10 E2 7E A9 61 21 F9
    +0060 | 2F B3 FE 6C E8 22 4A C2 ED 82 B0 BA BB C7 03 42
    +0070 | D9 03 B8 EE DD BC 6D B5 D5 AF AE 21 4A 3C 14 17
    +0080 | 70 C1 CE 2C DC EA 1E 22 3D 72 AC B0 7F 53 C4 58
    +0090 | 3A C1 9A 3F B6 1D 66 29 DF E0 BE 02 E5 C1 81 7D
    +00A0 | CC 07 ED 57 A7 59 F2 8A F0 C0 01 8F 8F FF F2 0A
    +00B0 | 8E 68 6D 7F 08 B8 EF 3D 1C C2 31 0A 81 E1 E5 77
    +00C0 | A4 08 A1 2B FE C4 39 96 6D BC 8D 65 8F A5 71 39
    +00D0 | 9B 72 83 25 89 7B 4C C3 56 6D 6A BA 99 A6 88 A7
    +00E0 | 01 12 06 99 7B B5 97 0B 4C FF BA 3A C7 96 FD 18
    +00F0 | 2C D6 C5 1D 99 81 AB 17 18 F5 13 D9 5D E2 C9 01
    +0100 | 6C 28 41 AF BC DB 96 51 D9 19 92 1D 57 B6 4E 6E
    +0110 | 06 12 7D 99 05 1F D4 E8 3F D5 09 39 B2 C1 5A D0
    +0120 | 92 D7 D6 81 AB ED 7C 49 CD 5A 0B BB AD 40 D8 3C

    Payload (de)serialization:

    client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;
    nonce 4, 16C050C45483E6C2E330D6521499453D5BB5599AFA6BAC2EA90ABEE2D7B54DD51D Value generated by client in Step 1
    server_nonce 20, 16533BACFB1167B9558095BD91A77F8D0E97032293F48BFDEB2D7C79AF5022FEFE Value received from server in Step 2
    g_a 300, 260FE0001004916D416BFA942C255D504A1 D88816E0D80F34339B3C1376A762AD25 76372A5249A5FCDE1A49958BC65225E9 2C93FD93F65DC937E8A7F0546D06736C D8485ACE26F4859402156493386E61B7 72F5F284CFF194B96D58476DA6A52F2E 1C61E932E6FEABB2ADABE10F14F0EA0D 09DF221398014C7D0C210470F4C6F9BE 6EF14C0003A5985E6B7D82E7B4A6D8C6 C304C37852D75E87BAAE2A7D893698EB F5453DA4BACA62DFC5D4E8DC2712F071 18A9008824368E96C3EE9D9984DA64D0 943F02DB7E17E4321D8C91155CA500B3 38297405B1B6871BF39AFD240492FBB7 D9C6F3AC0DA8EA80070AAAD2590EB474 FCE3EEE3736642AACF362169F8C2A7F6
    8BAE15AF
    FE0001009B6E8C566CD00054BAFC6174 4174666511C4F16FA61CDAE17673FC57 2C8671225A872F4BC049FD32EBE4263B 4A19FEEA8C4F89986F158D0D1CF7CB4C 45EEAAAFF00A1A38C1240324AEBF04EE 53D6B50ED913001266EDF5A0BEBE60D0 BC969A81D52F6222E5FBB6E6025B0677 9C05CAE0FDDFFDF440BCBF543017BF37 7F00C82E9FA5FE1DD8063CC4CD5B3E2C AF097ECDCFFA64D8B2C9A4C1125882C8 1DD70BE7A74DE6EFA2C5643F29266102 81D55336760DBAFB5EB63147E88C007A 481803F5CDCD4769B735D34635D8A4CA BC7A2779963030552BB1831709E9489C B12886586AB37E525185D67AC6211B57 C3909F3ADBDCF325A1FFD605DEE14246
    8163FBA2
    g_a diffie-hellman parameter
    server_time 560, 4E5576365 (1701009381 in decimal)C14B6665 (1701202881 in decimal) Server time
    @@ -658,19 +658,19 @@ answer = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0 - + - + - + @@ -684,47 +684,47 @@ answer = BA0D89B5C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0

    The serialization of Client_DH_Inner_Data produces a string data. This is used to generate encrypted_data as specified in step 6, using the following inputs:

    -
    data = 54B64366C050C45483E6C2E330D6521499453D5B533BACFB1167B9558095BD91A77F8D0E0000000000000000FE000100B5B7ECA50AA21159E6808734399E78D58C7DE735990AF8B1746B86107EBCEDCBCBAEABD2015748E99BE50429B233BB0E94572C48DF4D138D5587C37FAB8394A1660F7C1183E1C145A5C71349D39D146DF30FB39624AE87868937EA0EC34E433A217DA33A84A0150412DCDC257D11B4B68C7280B06A6C751F3AA8ED313F23049DB2470B09AFDD52A4362F9FF28287C11F4750443C6440125C44F21F0B410E49A39E10F45DA6ACF7FC2AA14D1549C7674692DA2192CE41B1238B0E94F17328C18550BC5C74CA9655B368A95660134B662DFC194F95A7437FD59E9E81FD8E1A6A51CC37604472F864C0317D5A16998F1191D1D539F0105DBD872104B5EDF13A357E
    -padding = C4134CFF706DDC04451346F6
    -tmp_aes_key = DDE9D7DA461399FD1D9564B9313F80C9B33BE062852B3D48A82D396812037569
    -tmp_aes_iv = 23E6A1FE2F85BF5F4EA12E1514BB8D937849463EF3B1027712C1F8D2C6A06071
    +
    data = 54B64366B5599AFA6BAC2EA90ABEE2D7B54DD51D97032293F48BFDEB2D7C79AF5022FEFE0000000000000000FE0001006BB1E74F256AA9E11A6D1D408213ADD2D81809FBF74D24A61392948C0C0D9814CD9FF9ABED79033B4E10E27EA96121F92FB3FE6CE8224AC2ED82B0BABBC70342D903B8EEDDBC6DB5D5AFAE214A3C141770C1CE2CDCEA1E223D72ACB07F53C4583AC19A3FB61D6629DFE0BE02E5C1817DCC07ED57A759F28AF0C0018F8FFFF20A8E686D7F08B8EF3D1CC2310A81E1E577A408A12BFEC439966DBC8D658FA571399B728325897B4CC3566D6ABA99A688A7011206997BB5970B4CFFBA3AC796FD182CD6C51D9981AB1718F513D95DE2C9016C2841AFBCDB9651D919921D57B64E6E06127D99051FD4E83FD50939B2C15AD092D7D681ABED7C49CD5A0BBBAD40D83C
    +padding = 3E96302300ACDA40DA16C938
    +tmp_aes_key = 1958F662C25BC962035DCDB03466EEE5912D0A27078AC3B48D09FF58C35597ED
    +tmp_aes_iv = 14EAA9C9B97D2BFABEF57C84CEE9FBE743EA0FA0F91CCE32E91A66683BAE9AB8

    Process:

    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);

    Output:

    -
    encrypted_data = 00EE6F2CF13AEEB7440E04A12A3078CDDA211EB8A4A97013C8DEC965B732C51B71452CC89748DB2860DBEDA83F7908EE27AACDE23A63E55162193FB951C95708990E9583E0FC26B7B3892061A7ED7FDBE0DF4A33E06BB9E5BCFC9CB403810589FEFCBE32DDB40EEB2D79493F7CCAD91BEA12E57FBC104B231D85158ABBBF01BF6A48E8C19F1180574E73F59051967B7842AF0B80B30C43DD55ABFBB7F946B1E9A1BF81DFB72E48633B368F88E9CB4FF8DCA7EE762E4E5D9C875F1C91787F7BC6D29E0FE91D88C791FDDDB3FE25C5D4AA4C1C92AE11E3B34D4B012FBE502FA969B1427DC8A2F030BF537CC50723F2E1B88ADC81F496EBEBF328315A96FAB040A83242F53DC9A8C7B8179388C1A52F1477082AF82D687B46464187CA5F6672C7A427F0F32C25CCC5FDBD7E3E44488EF4938402ACEC1512856C3E7D768FBA24D6D8800A4F48B07B8EAED197534D91C84C8B
    +
    encrypted_data = 307D884EFAE1A7E551D15DF89C96B6DF12AFA5047B19ABB5B726FB9BC3D802CC4546EE5E6AB8928D90869B6C387E0DECF372DC9F937E0ADA1622BBFE64647BBE8291B701530523C7D2A19F704300EE2199FF065F2A04B9598873C37B28978B93B9C461F7B13ECDEEAA45905F453E5A624E97B4FEB56CA1542F66187C22624C4BE1F99A41601E5DCD58410A52A4A02507909FCCF2DACE9A22D1EA6722141705899213C1E8FF168B430F0D13199F3D5E2F7FE6D535CBEFCB727D20B967BF7C90DDA5B96D56B545D98F669DD529FC02C64C7A4E2C0EA4AE5D6DAA6D0ABA0B15C5859F897B8D26DA653772EAACAF7322BB98DDE764B79A5CE4B32AC8E2CFA8D9B31470CE9BBDB501CFDCBCE5D3E35B5C431C6FCD64EA05D7AF5483E1953DCDBB1C04CF3E759A88D289BC9B3A74CEDF1F88D094263B2899A4EE392E8632C96834661D1D1CDC1D675B34E37CF92770780E5E03

    The length of the final string is 336 bytes.

    7.2) set_client_DH_params query

    Sent payload (excluding transport headers/trailers):

    -
    0000 | 00 00 00 00 00 00 00 00 A0 34 08 00 E5 57 63 65
    -0010 | 78 01 00 00 1F 5F 04 F5 C0 50 C4 54 83 E6 C2 E3
    -0020 | 30 D6 52 14 99 45 3D 5B 53 3B AC FB 11 67 B9 55
    -0030 | 80 95 BD 91 A7 7F 8D 0E FE 50 01 00 00 EE 6F 2C
    -0040 | F1 3A EE B7 44 0E 04 A1 2A 30 78 CD DA 21 1E B8
    -0050 | A4 A9 70 13 C8 DE C9 65 B7 32 C5 1B 71 45 2C C8
    -0060 | 97 48 DB 28 60 DB ED A8 3F 79 08 EE 27 AA CD E2
    -0070 | 3A 63 E5 51 62 19 3F B9 51 C9 57 08 99 0E 95 83
    -0080 | E0 FC 26 B7 B3 89 20 61 A7 ED 7F DB E0 DF 4A 33
    -0090 | E0 6B B9 E5 BC FC 9C B4 03 81 05 89 FE FC BE 32
    -00A0 | DD B4 0E EB 2D 79 49 3F 7C CA D9 1B EA 12 E5 7F
    -00B0 | BC 10 4B 23 1D 85 15 8A BB BF 01 BF 6A 48 E8 C1
    -00C0 | 9F 11 80 57 4E 73 F5 90 51 96 7B 78 42 AF 0B 80
    -00D0 | B3 0C 43 DD 55 AB FB B7 F9 46 B1 E9 A1 BF 81 DF
    -00E0 | B7 2E 48 63 3B 36 8F 88 E9 CB 4F F8 DC A7 EE 76
    -00F0 | 2E 4E 5D 9C 87 5F 1C 91 78 7F 7B C6 D2 9E 0F E9
    -0100 | 1D 88 C7 91 FD DD B3 FE 25 C5 D4 AA 4C 1C 92 AE
    -0110 | 11 E3 B3 4D 4B 01 2F BE 50 2F A9 69 B1 42 7D C8
    -0120 | A2 F0 30 BF 53 7C C5 07 23 F2 E1 B8 8A DC 81 F4
    -0130 | 96 EB EB F3 28 31 5A 96 FA B0 40 A8 32 42 F5 3D
    -0140 | C9 A8 C7 B8 17 93 88 C1 A5 2F 14 77 08 2A F8 2D
    -0150 | 68 7B 46 46 41 87 CA 5F 66 72 C7 A4 27 F0 F3 2C
    -0160 | 25 CC C5 FD BD 7E 3E 44 48 8E F4 93 84 02 AC EC
    -0170 | 15 12 85 6C 3E 7D 76 8F BA 24 D6 D8 80 0A 4F 48
    -0180 | B0 7B 8E AE D1 97 53 4D 91 C8 4C 8B
    +
    0000 | 00 00 00 00 00 00 00 00 14 B4 04 00 C1 4B 66 65
    +0010 | 78 01 00 00 1F 5F 04 F5 B5 59 9A FA 6B AC 2E A9
    +0020 | 0A BE E2 D7 B5 4D D5 1D 97 03 22 93 F4 8B FD EB
    +0030 | 2D 7C 79 AF 50 22 FE FE FE 50 01 00 30 7D 88 4E
    +0040 | FA E1 A7 E5 51 D1 5D F8 9C 96 B6 DF 12 AF A5 04
    +0050 | 7B 19 AB B5 B7 26 FB 9B C3 D8 02 CC 45 46 EE 5E
    +0060 | 6A B8 92 8D 90 86 9B 6C 38 7E 0D EC F3 72 DC 9F
    +0070 | 93 7E 0A DA 16 22 BB FE 64 64 7B BE 82 91 B7 01
    +0080 | 53 05 23 C7 D2 A1 9F 70 43 00 EE 21 99 FF 06 5F
    +0090 | 2A 04 B9 59 88 73 C3 7B 28 97 8B 93 B9 C4 61 F7
    +00A0 | B1 3E CD EE AA 45 90 5F 45 3E 5A 62 4E 97 B4 FE
    +00B0 | B5 6C A1 54 2F 66 18 7C 22 62 4C 4B E1 F9 9A 41
    +00C0 | 60 1E 5D CD 58 41 0A 52 A4 A0 25 07 90 9F CC F2
    +00D0 | DA CE 9A 22 D1 EA 67 22 14 17 05 89 92 13 C1 E8
    +00E0 | FF 16 8B 43 0F 0D 13 19 9F 3D 5E 2F 7F E6 D5 35
    +00F0 | CB EF CB 72 7D 20 B9 67 BF 7C 90 DD A5 B9 6D 56
    +0100 | B5 45 D9 8F 66 9D D5 29 FC 02 C6 4C 7A 4E 2C 0E
    +0110 | A4 AE 5D 6D AA 6D 0A BA 0B 15 C5 85 9F 89 7B 8D
    +0120 | 26 DA 65 37 72 EA AC AF 73 22 BB 98 DD E7 64 B7
    +0130 | 9A 5C E4 B3 2A C8 E2 CF A8 D9 B3 14 70 CE 9B BD
    +0140 | B5 01 CF DC BC E5 D3 E3 5B 5C 43 1C 6F CD 64 EA
    +0150 | 05 D7 AF 54 83 E1 95 3D CD BB 1C 04 CF 3E 75 9A
    +0160 | 88 D2 89 BC 9B 3A 74 CE DF 1F 88 D0 94 26 3B 28
    +0170 | 99 A4 EE 39 2E 86 32 C9 68 34 66 1D 1D 1C DC 1D
    +0180 | 67 5B 34 E3 7C F9 27 70 78 0E 5E 03

    Payload (de)serialization:

    set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;
    nonce 4, 16C050C45483E6C2E330D6521499453D5BB5599AFA6BAC2EA90ABEE2D7B54DD51D Value generated by client in Step 1
    server_nonce 20, 16533BACFB1167B9558095BD91A77F8D0E97032293F48BFDEB2D7C79AF5022FEFE Value received from server in Step 2
    g_b 36, 260FE000100B5B7ECA50AA21159E6808734 399E78D58C7DE735990AF8B1746B8610 7EBCEDCBCBAEABD2015748E99BE50429 B233BB0E94572C48DF4D138D5587C37F AB8394A1660F7C1183E1C145A5C71349 D39D146DF30FB39624AE87868937EA0E C34E433A217DA33A84A0150412DCDC25 7D11B4B68C7280B06A6C751F3AA8ED31 3F23049DB2470B09AFDD52A4362F9FF2 8287C11F4750443C6440125C44F21F0B 410E49A39E10F45DA6ACF7FC2AA14D15 49C7674692DA2192CE41B1238B0E94F1 7328C18550BC5C74CA9655B368A95660 134B662DFC194F95A7437FD59E9E81FD 8E1A6A51CC37604472F864C0317D5A16 998F1191D1D539F0105DBD872104B5ED
    F13A357E
    FE0001006BB1E74F256AA9E11A6D1D40 8213ADD2D81809FBF74D24A61392948C 0C0D9814CD9FF9ABED79033B4E10E27E A96121F92FB3FE6CE8224AC2ED82B0BA BBC70342D903B8EEDDBC6DB5D5AFAE21 4A3C141770C1CE2CDCEA1E223D72ACB0 7F53C4583AC19A3FB61D6629DFE0BE02 E5C1817DCC07ED57A759F28AF0C0018F 8FFFF20A8E686D7F08B8EF3D1CC2310A 81E1E577A408A12BFEC439966DBC8D65 8FA571399B728325897B4CC3566D6ABA 99A688A7011206997BB5970B4CFFBA3A C796FD182CD6C51D9981AB1718F513D9 5DE2C9016C2841AFBCDB9651D919921D 57B64E6E06127D99051FD4E83FD50939 B2C15AD092D7D681ABED7C49CD5A0BBB
    AD40D83C
    Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding
    @@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);< - + @@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);< - + - + - + @@ -785,17 +785,17 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
    8) Auth key generation

    The client computes the auth_key using formula g_a^b mod dh_prime:

    -
    auth_key = 7005033C51F039B6421BB899E60D797774C3566D859FD86BC5BC0715A19411F8FBFCA7F7BDD1776AD091897A9DB32A97E811AE6AF33229A187D667E054CA7E1E4A2887F98A392536A1AB8CF3F65FAA7E71E992E0B628BF4B34337967804DBCC9CB74707639E0B6B6C4E29C7E78AD66846C7C1305923FAEAD6BDD91A6D20F89061F80BBC997BF42A8748338E3F44173C57BFAA2AD1A9B0520475A091F9FDE3BFED9B0A2FA92C0E4ECE12B7D1A98D3C9AFD25F10919EEF0A20F443856DE0284CE2647A9B2DE6C4E8DF71A014F6CAF09ADD5D83CFD066E330B3ECDC024514DE6F54EFFD14C156CC9ECBF472FECC70A4AB10BFA7281D4A93B8348CA48C6215017801
    +
    auth_key = 2292DBAEE0BFC2859A6AE19B7FEACD33A657DDBB02A7234938AC91B21AED8B368D313899ACFC9CC36CBF2C3373ADAF67B649746145FF92DE00E8AB04C96E266B616C009B389952401D91780937EFCFDB4BD5C0E0657DE4C3B23184C9D5329DB7FF1A8A72B90B9643DD96385C0A3783C1CC5DB095C8E42E6097B92689498368ECDDC023FF6F12E9602F994D37B52B66D8304A269BEE755D6D78EB3794A7DCEB56D32B231A982DED20D180B23295C0E14F0E72133A0A7BF16F4A6801F6F215268DAEBD0674942E4D2DD7A2D789DD79ECE00D9404933FEFA989667A527B4251D8501A7259A580EF50DF95A4B5DE07271BBD00C561E488E3AA38ED9C2EFBCADC97EC
    9) Final server reply

    The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:

    Received payload (excluding transport headers/trailers):

    -
    0000 | 00 00 00 00 00 00 00 00 01 38 0B 03 E6 57 63 65
    -0010 | 48 00 00 00 34 F7 CB 3B C0 50 C4 54 83 E6 C2 E3
    -0020 | 30 D6 52 14 99 45 3D 5B 53 3B AC FB 11 67 B9 55
    -0030 | 80 95 BD 91 A7 7F 8D 0E EA 9F 42 E2 0B 5E 54 AF
    -0040 | 96 4B DE BE 06 1B 1B 7A
    +
    0000 | 00 00 00 00 00 00 00 00 01 34 28 F4 C1 4B 66 65
    +0010 | 7C 00 00 00 34 F7 CB 3B B5 59 9A FA 6B AC 2E A9
    +0020 | 0A BE E2 D7 B5 4D D5 1D 97 03 22 93 F4 8B FD EB
    +0030 | 2D 7C 79 AF 50 22 FE FE C3 82 F8 B3 46 D5 E0 CA
    +0040 | BF 03 1B 9F 7D 07 1A C8

    Payload (de)serialization:

    dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;
    message_id 8, 8A0340800E557636514B40400C14B6665 Message ID generated as specified here » (unixtime() << 32) + (N*4)
    nonce 24, 16C050C45483E6C2E330D6521499453D5BB5599AFA6BAC2EA90ABEE2D7B54DD51D Value generated by client in Step 1
    server_nonce 40, 16533BACFB1167B9558095BD91A77F8D0E97032293F48BFDEB2D7C79AF5022FEFE Value received from server in Step 2
    encrypted_data 56, 340FE50010000EE6F2CF13AEEB7440E04A1 2A3078CDDA211EB8A4A97013C8DEC965 B732C51B71452CC89748DB2860DBEDA8 3F7908EE27AACDE23A63E55162193FB9 51C95708990E9583E0FC26B7B3892061 A7ED7FDBE0DF4A33E06BB9E5BCFC9CB4 03810589FEFCBE32DDB40EEB2D79493F 7CCAD91BEA12E57FBC104B231D85158A BBBF01BF6A48E8C19F1180574E73F590 51967B7842AF0B80B30C43DD55ABFBB7 F946B1E9A1BF81DFB72E48633B368F88 E9CB4FF8DCA7EE762E4E5D9C875F1C91 787F7BC6D29E0FE91D88C791FDDDB3FE 25C5D4AA4C1C92AE11E3B34D4B012FBE 502FA969B1427DC8A2F030BF537CC507 23F2E1B88ADC81F496EBEBF328315A96 FAB040A83242F53DC9A8C7B8179388C1 A52F1477082AF82D687B46464187CA5F 6672C7A427F0F32C25CCC5FDBD7E3E44 488EF4938402ACEC1512856C3E7D768F BA24D6D8800A4F48B07B8EAED197534D
    91C84C8B
    FE500100307D884EFAE1A7E551D15DF8 9C96B6DF12AFA5047B19ABB5B726FB9B C3D802CC4546EE5E6AB8928D90869B6C 387E0DECF372DC9F937E0ADA1622BBFE 64647BBE8291B701530523C7D2A19F70 4300EE2199FF065F2A04B9598873C37B 28978B93B9C461F7B13ECDEEAA45905F 453E5A624E97B4FEB56CA1542F66187C 22624C4BE1F99A41601E5DCD58410A52 A4A02507909FCCF2DACE9A22D1EA6722 141705899213C1E8FF168B430F0D1319 9F3D5E2F7FE6D535CBEFCB727D20B967 BF7C90DDA5B96D56B545D98F669DD529 FC02C64C7A4E2C0EA4AE5D6DAA6D0ABA 0B15C5859F897B8D26DA653772EAACAF 7322BB98DDE764B79A5CE4B32AC8E2CF A8D9B31470CE9BBDB501CFDCBCE5D3E3 5B5C431C6FCD64EA05D7AF5483E1953D CDBB1C04CF3E759A88D289BC9B3A74CE DF1F88D094263B2899A4EE392E8632C9 6834661D1D1CDC1D675B34E37CF92770
    780E5E03
    Encrypted client_DH_inner_data generated previously, serialized as a TL byte string
    @@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);< - + - + @@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);< - + - + - + diff --git a/data/web/corefork.telegram.org/type/AttachMenuBot.html b/data/web/corefork.telegram.org/type/AttachMenuBot.html index 90d90c66d2..81ba8de0e8 100644 --- a/data/web/corefork.telegram.org/type/AttachMenuBot.html +++ b/data/web/corefork.telegram.org/type/AttachMenuBot.html @@ -67,7 +67,7 @@ - +
    message_id 8, 801380B03E6576365013428F4C14B6665 Message ID generated as specified here » (unixtime() << 32) + (N*4)
    message_length 16, 448000000 (72 in decimal)7C000000 (124 in decimal) Message body length
    nonce 24, 16C050C45483E6C2E330D6521499453D5BB5599AFA6BAC2EA90ABEE2D7B54DD51D Value generated by client in Step 1
    server_nonce 40, 16533BACFB1167B9558095BD91A77F8D0E97032293F48BFDEB2D7C79AF5022FEFE Value received from server in Step 2
    new_nonce_hash1 56, 16EA9F42E20B5E54AF964BDEBE061B1B7AC382F8B346D5E0CABF031B9F7D071AC8 The 128 lower-order bits of SHA1 of the byte string derived from the new_nonce string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with auth_key_aux_hash. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.
    attachMenuBotRepresents a bot mini app that can be launched from the attachment menu »Represents a bot mini app that can be launched from the attachment/side menu »

    At least one of the show_in_attach_menu or the show_in_side_menu flags will always be set.