diff --git a/data/web/corefork.telegram.org/methods.html b/data/web/corefork.telegram.org/methods.html index ada0ec3208..fb67164948 100644 --- a/data/web/corefork.telegram.org/methods.html +++ b/data/web/corefork.telegram.org/methods.html @@ -207,6 +207,14 @@ Look for updates of telegram's terms of service…"> invokeWithoutUpdates Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries). + +invokeWithGooglePlayIntegrity +  + + +invokeWithApnsSecret +  +

Registration/Authorization

@@ -299,6 +307,10 @@ Look for updates of telegram's terms of service…"> Send the verification code for login +auth.reportMissingCode +  + + auth.signIn Signs in a user with a validated phone number. @@ -570,11 +582,34 @@ Look for updates of telegram's terms of service…"> Permanently disconnect a specific chat from all business bots » (equivalent to specifying it in recipients.exclude_users during initial configuration with account.updateConnectedBot »); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking account.updateConnectedBot ». +account.getBotBusinessConnection +Bots may invoke this method to re-fetch the updateBotBusinessConnect constructor associated with a specific business connection_id, see here » for more info on connected business bots.
This is needed for example for freshly logged in bots that are receiving some updateBotNewBusinessMessage, etc. updates because some users have already connected to the bot before it could login.
In this case, the bot is receiving messages from the business connection, but it hasn't cached the associated updateBotBusinessConnect with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet.
This method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new updateBotBusinessConnect updates to the bot using the usual update delivery methods ». + + invokeWithBusinessConnection Invoke a method using a Telegram Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor.

Make sure to always send queries wrapped in a invokeWithBusinessConnection to the datacenter ID, specified in the dc_id field of the botBusinessConnection that is being used. +

Working with Telegram Business greeting and away messages

+ + + + + + + + + + + + + + + + + +
NameDescription
account.updateBusinessGreetingMessageSet a list of Telegram Business greeting messages.
account.updateBusinessAwayMessageSet a list of Telegram Business away messages.

Working with Telegram Business opening hours »

@@ -2954,6 +2989,10 @@ Look for updates of telegram's terms of service…"> + + + + @@ -3215,6 +3254,36 @@ Look for updates of telegram's terms of service…">
View and search recently sent media.
This method does not support pagination.
channels.searchPostsGlobally search for posts from public channels » (including those we aren't a member of) containing a specific hashtag.
messages.sendMedia Send a media
+

Working with the Telegram Business intro »

+ + + + + + + + + + + + + +
NameDescription
account.updateBusinessIntroSet or remove the Telegram Business introduction ».
+

Working with the Telegram Business location

+ + + + + + + + + + + + + +
NameDescription
account.updateBusinessLocationBusinesses » may advertise their location using this method, see here » for more info.

To remove business location information invoke the method without setting any of the parameters.

Working with the attachment menu » of mini bot apps »

@@ -3280,6 +3349,45 @@ Look for updates of telegram's terms of service…">
+

Working with the privacy settings

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
account.getPrivacyGet privacy settings of current account
account.setPrivacyChange privacy settings of current account
account.setGlobalPrivacySettingsSet global privacy settings
account.getGlobalPrivacySettingsGet global privacy settings
users.getIsPremiumRequiredToContactCheck whether we can write to the specified user (non-Premium users only), see here » for more info on the full flow.
messages.setDefaultHistoryTTLChanges the default value of the Time-To-Live setting, applied to all new chats.
messages.getDefaultHistoryTTLGets the default value of the Time-To-Live setting, applied to all new chats.

Working with the takeout API, see here » for more info.

@@ -3315,6 +3423,57 @@ Look for updates of telegram's terms of service…">
+

Working with the user profile

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
photos.deletePhotosDeletes profile photos. The method returns a list of successfully deleted photo IDs.
photos.getUserPhotosReturns the list of user photos.
photos.updateProfilePhotoInstalls a previously uploaded photo as a profile photo.
photos.uploadProfilePhotoUpdates current user profile photo.

The file, video and video_emoji_markup flags are mutually exclusive.
photos.uploadContactProfilePhotoUpload a custom profile picture for a contact, or suggest a new profile picture to a contact.

The file, video and video_emoji_markup flags are mutually exclusive.
account.updateProfileUpdates user profile.
account.updateBirthdayUpdate our birthday, see here » for more info.
contacts.getBirthdaysFetch all users with birthdays that fall within +1/-1 days, relative to the current day: this method should be invoked by clients every 6-8 hours, and if the result is non-empty, it should be used to appropriately update locally cached birthday information in user.birthday.

See here » for more info.
account.updatePersonalChannelAssociate (or remove) a personal channel », that will be listed on our personal profile page ».

Changing it will emit an updateUser update.
account.updateStatusUpdates online user status.

Working with the bot menu button »

@@ -3360,10 +3519,6 @@ Look for updates of telegram's terms of service…"> - - - - @@ -3379,34 +3534,6 @@ Look for updates of telegram's terms of service…"> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Get days to live of account
account.getPrivacyGet privacy settings of current account
account.resetAuthorization Log out an active authorized session by its hash
account.setAccountTTL Set account self-destruction period
account.setPrivacyChange privacy settings of current account
account.setGlobalPrivacySettingsSet global privacy settings
account.getGlobalPrivacySettingsGet global privacy settings
account.updateProfileUpdates user profile.
account.updateStatusUpdates online user status.
messages.setDefaultHistoryTTLChanges the default value of the Time-To-Live setting, applied to all new chats.
messages.getDefaultHistoryTTLGets the default value of the Time-To-Live setting, applied to all new chats.

Working with timezones

@@ -3424,37 +3551,6 @@ Look for updates of telegram's terms of service…"> -

Working with user profile pictures

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescription
photos.deletePhotosDeletes profile photos. The method returns a list of successfully deleted photo IDs.
photos.getUserPhotosReturns the list of user photos.
photos.updateProfilePhotoInstalls a previously uploaded photo as a profile photo.
photos.uploadProfilePhotoUpdates current user profile photo.

The file, video and video_emoji_markup flags are mutually exclusive.
photos.uploadContactProfilePhotoUpload a custom profile picture for a contact, or suggest a new profile picture to a contact.

The file, video and video_emoji_markup flags are mutually exclusive.

Working with usernames

@@ -3500,34 +3596,10 @@ Look for updates of telegram's terms of service…"> - - - - - - - - - - - - - - - - - - - - - - - - @@ -3540,18 +3612,6 @@ Look for updates of telegram's terms of service…"> - - - - - - - - - - - - @@ -3563,22 +3623,6 @@ Look for updates of telegram's terms of service…"> - - - - - - - - - - - - - - - -
 
users.getIsPremiumRequiredToContactCheck whether we can write to the specified user (non-Premium users only), see here » for more info on the full flow.
account.updateBusinessLocationBusinesses » may advertise their location using this method, see here » for more info.

To remove business location information invoke the method without setting any of the parameters.
account.updateBusinessGreetingMessageSet a list of Telegram Business greeting messages.
account.updateBusinessAwayMessageSet a list of Telegram Business away messages.
messages.toggleDialogFilterTags  
account.getBotBusinessConnectionBots may invoke this method to re-fetch the updateBotBusinessConnect constructor associated with a specific business connection_id, see here » for more info on connected business bots.
This is needed for example for freshly logged in bots that are receiving some updateBotNewBusinessMessage, etc. updates because some users have already connected to the bot before it could login.
In this case, the bot is receiving messages from the business connection, but it hasn't cached the associated updateBotBusinessConnect with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet.
This method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new updateBotBusinessConnect updates to the bot using the usual update delivery methods ».
account.updateBusinessIntroSet or remove the Telegram Business introduction ».
stickers.replaceSticker Replace a sticker in a stickerset ».
 
account.updateBirthdayUpdate our birthday, see here » for more info.
contacts.getBirthdaysFetch all users with birthdays that fall within +1/-1 days, relative to the current day: this method should be invoked by clients every 6-8 hours, and if the result is non-empty, it should be used to appropriately update locally cached birthday information in user.birthday.

See here » for more info.
account.updatePersonalChannelAssociate (or remove) a personal channel », that will be listed on our personal profile page ».

Changing it will emit an updateUser update.
channels.reportSponsoredMessage  
account.toggleSponsoredMessages Disable or re-enable Telegram ads for the current Premium account.

Useful for business owners that may want to launch and view their own Telegram ads via the Telegram ad platform ».
auth.reportMissingCode 
invokeWithGooglePlayIntegrity 
invokeWithApnsSecret 
channels.searchPostsGlobally search for posts from public channels » (including those we aren't a member of) containing a specific hashtag.
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 5ab2c05093..cdf1af259c 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 88 57 0E 00 F1 FF 97 66
-0010 | 14 00 00 00 F1 8E 7E BE B9 58 7B 31 62 35 59 60
-0020 | 8E 08 A7 B2 DD 03 72 43
+
0000 | 00 00 00 00 00 00 00 00 10 B2 07 00 60 01 98 66
+0010 | 14 00 00 00 F1 8E 7E BE 05 FE F5 95 9C 0D 66 54
+0020 | 3D F2 34 62 04 81 AD 6F

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 BC 71 74 F1 FF 97 66
-0010 | B8 00 00 00 63 24 16 05 B9 58 7B 31 62 35 59 60
-0020 | 8E 08 A7 B2 DD 03 72 43 4D 59 F0 77 89 8A A1 E4
-0030 | AC C4 5F 5C 77 9B 3C E2 08 1A 80 74 F2 82 62 DB
-0040 | C3 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
+
0000 | 00 00 00 00 00 00 00 00 01 0C 00 F3 60 01 98 66
+0010 | 78 00 00 00 63 24 16 05 05 FE F5 95 9C 0D 66 54
+0020 | 3D F2 34 62 04 81 AD 6F 52 D1 9F 8A FF 7B 28 65
+0030 | 5B 12 6D F4 E6 40 2E CC 08 1C D1 1D 49 17 71 8E
+0040 | EF 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 = 1909654826923514819
-

Decompose into 2 prime cofactors p < q: 1909654826923514819 = 1039905901 * 1836372719

-
p = 1039905901
-q = 1836372719
+
pq = 2076473102957645551
+

Decompose into 2 prime cofactors p < q: 2076473102957645551 = 1132256093 * 1833925307

+
p = 1132256093
+q = 1833925307

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 1A 80 74 F2 82 62 DB C3 00 00 00
-0010 | 04 3D FB B4 6D 00 00 00 04 6D 74 D2 EF 00 00 00
-0020 | B9 58 7B 31 62 35 59 60 8E 08 A7 B2 DD 03 72 43
-0030 | 4D 59 F0 77 89 8A A1 E4 AC C4 5F 5C 77 9B 3C E2
-0040 | CE 39 E5 F8 0B 68 93 8D 85 05 B0 FE 57 EF 9D C2
-0050 | 80 2A E9 E8 A3 4E 86 F3 FD 21 2B 94 FE C3 C2 F0
+
0000 | 95 5F F5 A9 08 1C D1 1D 49 17 71 8E EF 00 00 00
+0010 | 04 43 7C DB 5D 00 00 00 04 6D 4F 7A BB 00 00 00
+0020 | 05 FE F5 95 9C 0D 66 54 3D F2 34 62 04 81 AD 6F
+0030 | 52 D1 9F 8A FF 7B 28 65 5B 12 6D F4 E6 40 2E CC
+0040 | 39 64 AE A8 7F 37 AD 6B D2 1A 62 D9 30 67 97 F0
+0050 | 46 BE F9 A1 7F C1 E0 C3 C3 F6 91 C4 64 8C 86 8D
 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 = 1836372719
- + - + - + - + - + - + @@ -291,39 +291,39 @@ q = 1836372719

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 = 955FF5A9081A8074F28262DBC3000000043DFBB46D000000046D74D2EF000000B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE2CE39E5F80B68938D8505B0FE57EF9DC2802AE9E8A34E86F3FD212B94FEC3C2F002000000
-random_padding_bytes = 6E28CF995D08AA2269C0859FFA1A5026C1F3DBA19AA00490EAC2EE52AD8F019056D2DAE75F5542FBD9842BBF322082F507CCF729B096FE42BFFCFA5DC5887D47135B59D2C872E9760C300E49884D577143BB7DA50294E2A9D073DC3E
+
data = 955FF5A9081CD11D4917718EEF00000004437CDB5D000000046D4F7ABB00000005FEF5959C0D66543DF234620481AD6F52D19F8AFF7B28655B126DF4E6402ECC3964AEA87F37AD6BD21A62D9306797F046BEF9A17FC1E0C3C3F691C4648C868D02000000
+random_padding_bytes = E235ADC313C2D6B78F9F496C518EE93AF2FB16102D1AFCCB745990AEF1AA0CFF74C899DB648D406F9291B960A4CE3684BE1598CD3947492488CB268178774E2BFBF93292EE6B0F0A04D9980C7339088EE35C86A8B61AE2D9FACBDD29

And this is the output:

-
encrypted_data = 1A258329963F5A8E228B7A868786DB94A655BAA852DE1BDFE7EF49B6858DB1BA2C376A9C5AB1880F68BCF9F4FBAD6B4EA6E0AE20DA67917DD457C7E42250E0E940E8B6241A0F364BD572321DF3E1C179A8230718A93669D8CBD818F947FF41B16BC824DD9D0742C67695C4206A8676734270B2D6CE2C9CA8DCF9C11157568EF20C9CB333BE63882138FAC09E48B750D0AE7C7C8C3992319B648309BAF78981ED0B6F94A8045D2D07DAD1C906CE7276E591BEBFAD98FAEF9AEE0C7267B656418B7EEE52977005806B4E263B599E0D83FB33D1BA0137280377873564AC0137C06EF5689BE7E89E2F005D94B39B8062F15030D076458E18CF327EE44390964346E7
+
encrypted_data = 3C845A07E15588991F5B395380C2F53E9CC623F36EA0BA66C3B54E36EBC23741C6B3AEDD77701B7A646388D42484FB6511844CE20981D0085114821106DB3F154796BE2DB059843EFD4EDF74624011F34B63DB68F00E76FAC85944148F5D3DC40469DB7B446B14F28364CE50954C341B7D41F87ABF4674380BB0DAAA848260A7616E4C7813C0D8DD07EE7852A021E6A1FB67CC4EF60A1953CAC853AA56C4A2D2575B2C3F89F77E9FDAE7D5796B41587E86892366942C959218EF87CEE1F752A34E359CCC382F10D73F5193CA5A2322A64B0B8522FEEF93EA646E8A438A508131D464C87701D109F8E4DC35264A89D59B9A31298A411DE8524063F9BFE4B43CB9

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

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, 888570E00F1FF976610B2070060019866 Message ID generated as specified here » (unixtime() << 32) + (N*4)
nonce 24, 16B9587B31623559608E08A7B2DD03724305FEF5959C0D66543DF234620481AD6F Random number
message_id 8, 801BC7174F1FF9766010C00F360019866 Message ID generated as specified here » (unixtime() << 32) + (N*4)
message_length 16, 4B8000000 (184 in decimal)78000000 (120 in decimal) Message body length
nonce 24, 16B9587B31623559608E08A7B2DD03724305FEF5959C0D66543DF234620481AD6F Value generated by client in Step 1
server_nonce 40, 164D59F077898AA1E4ACC45F5C779B3CE252D19F8AFF7B28655B126DF4E6402ECC Server-generated random number
pq 56, 12081A8074F28262DBC3000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1909654826923514819
081CD11D4917718EEF000000
TL byte deserialization
=> bigendian conversion to decimal
=> 2076473102957645551
Single-byte prefix denoting length, an 8-byte string, and three bytes of padding
pq 4, 12081A8074F28262DBC3000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1909654826923514819
081CD11D4917718EEF000000
TL byte deserialization
=> bigendian conversion to decimal
=> 2076473102957645551
Single-byte prefix denoting length, 8-byte string, and three bytes of padding
p 16, 8043DFBB46D000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1039905901
04437CDB5D000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1132256093
First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
q 24, 8046D74D2EF000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1836372719
046D4F7ABB000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1833925307
Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
nonce 32, 16B9587B31623559608E08A7B2DD03724305FEF5959C0D66543DF234620481AD6F Value generated by client in Step 1
server_nonce 48, 164D59F077898AA1E4ACC45F5C779B3CE252D19F8AFF7B28655B126DF4E6402ECC Value received from server in Step 2
new_nonce 64, 32CE39E5F80B68938D8505B0FE57EF9DC2 802AE9E8A34E86F3FD212B94FEC3C2F03964AEA87F37AD6BD21A62D9306797F0 46BEF9A17FC1E0C3C3F691C4648C868D Client-generated random number
@@ -345,7 +345,7 @@ random_padding_bytes = 6E28CF995D08AA2269C0859FFA1A5026C1F3DBA19AA00490EAC2EE52A - + @@ -363,25 +363,25 @@ random_padding_bytes = 6E28CF995D08AA2269C0859FFA1A5026C1F3DBA19AA00490EAC2EE52A - + - + - + - + @@ -393,7 +393,7 @@ random_padding_bytes = 6E28CF995D08AA2269C0859FFA1A5026C1F3DBA19AA00490EAC2EE52A - + @@ -402,47 +402,47 @@ random_padding_bytes = 6E28CF995D08AA2269C0859FFA1A5026C1F3DBA19AA00490EAC2EE52A
6) Server responds with:

Received payload (excluding transport headers/trailers):

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

Payload (de)serialization:

server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;
message_id 8, 88C570E00F1FF9766009A0A0061019866 Message ID generated as specified here » (unixtime() << 32) + (N*4)
nonce 24, 16B9587B31623559608E08A7B2DD03724305FEF5959C0D66543DF234620481AD6F Value generated by client in Step 1
server_nonce 40, 164D59F077898AA1E4ACC45F5C779B3CE252D19F8AFF7B28655B126DF4E6402ECC Value received from server in Step 2
p 56, 8043DFBB46D000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1039905901
04437CDB5D000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1132256093
First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
q 64, 8046D74D2EF000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1836372719
046D4F7ABB000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1833925307
Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
encrypted_data 80, 260FE0001001A258329963F5A8E228B7A86 8786DB94A655BAA852DE1BDFE7EF49B6 858DB1BA2C376A9C5AB1880F68BCF9F4 FBAD6B4EA6E0AE20DA67917DD457C7E4 2250E0E940E8B6241A0F364BD572321D F3E1C179A8230718A93669D8CBD818F9 47FF41B16BC824DD9D0742C67695C420 6A8676734270B2D6CE2C9CA8DCF9C111 57568EF20C9CB333BE63882138FAC09E 48B750D0AE7C7C8C3992319B648309BA F78981ED0B6F94A8045D2D07DAD1C906 CE7276E591BEBFAD98FAEF9AEE0C7267 B656418B7EEE52977005806B4E263B59 9E0D83FB33D1BA0137280377873564AC 0137C06EF5689BE7E89E2F005D94B39B 8062F15030D076458E18CF327EE44390
964346E7
FE0001003C845A07E15588991F5B3953 80C2F53E9CC623F36EA0BA66C3B54E36 EBC23741C6B3AEDD77701B7A646388D4 2484FB6511844CE20981D00851148211 06DB3F154796BE2DB059843EFD4EDF74 624011F34B63DB68F00E76FAC8594414 8F5D3DC40469DB7B446B14F28364CE50 954C341B7D41F87ABF4674380BB0DAAA 848260A7616E4C7813C0D8DD07EE7852 A021E6A1FB67CC4EF60A1953CAC853AA 56C4A2D2575B2C3F89F77E9FDAE7D579 6B41587E86892366942C959218EF87CE E1F752A34E359CCC382F10D73F5193CA 5A2322A64B0B8522FEEF93EA646E8A43 8A508131D464C87701D109F8E4DC3526 4A89D59B9A31298A411DE8524063F9BF
E4B43CB9
Value generated above
@@ -464,13 +464,13 @@ random_padding_bytes = 6E28CF995D08AA2269C0859FFA1A5026C1F3DBA19AA00490EAC2EE52A - + - + @@ -482,19 +482,19 @@ random_padding_bytes = 6E28CF995D08AA2269C0859FFA1A5026C1F3DBA19AA00490EAC2EE52A - + - + - + @@ -502,20 +502,20 @@ random_padding_bytes = 6E28CF995D08AA2269C0859FFA1A5026C1F3DBA19AA00490EAC2EE52A

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

-
encrypted_answer = F1007B188B7C1D2E1197B803E2638E67646D2E1B197168615A1530D36350747D07B26D4EF232B059C733502C951DA555CC4F7072B017F0C48F1565468B1D612D54533C0230916C187496A820FD2BD3A2C6EB18F026E821710AF087FA81DABA1ECDB3C88C123F261E50D522D5BAF7955493D5012ED3F02C21FA86E81FD88E4BEFA275059778CB8E1E90D3E956EC98AA4F9B2F4D566CBA620563F3BC3BBF137E9E5C85D64707ED49F6F74DC0130B4063AC13FA959A6CDA06400EDF3E8518E448B11BF8E6697189E9C5CDDCE04FD797D21C462EEBEF0673ACCC0F7FF8E91E6228AA847B4735941F6852B277122D20D47CDF8BB0A193D4DBC259287AC13B322D90D0E249B6CA0914489C65FEAE8C01881BB419248A8C86D9F7123DED6983F0D09A54BCA5C8054993D9E2BEE2B62C064C2DEB2201F3E0A47EFF172DD8A8F6AD6FF02AF9990529893420E0259CCA435F073DDAD576E0BF56928056C9AE69753F3E83A5244BE9A817AA0DC3BCE2D13FFC257DC19C46CB75479EEB8D1A49792EB78E7F99B99A0592B7079D34A9884AD7F521425FABF234274E120F48AF10E50B885D8859167739B58AB5DA4C8D518FC381477BD361C392FE1FC8E29736999651E2122E1577EBAA57D64F29CFB15590F54F308806C3E6D733D19EC9BCEE508F7168EB569F480F1713B5B919EC22C70577F1DEFBE37B776D4F7C9AEB4F69ACE982CDE6ECDFBA015AFA9C8E3E84ACCF15629452507FB78C0E1953EBBD86FF91A0167F7A905617AD750C9ED7E807EF1D9608B8DD511B8AE3137C8B4C40B7F1694F794B10DCE021773A2F62809BB8ED6885CCF363A912
-tmp_aes_key = 68BAFA98D2EF9596E4A16AC8738160B92728CB85D4675BA6C9FA60E0DADD29DC
-tmp_aes_iv = A172B2F171E9FC1B5ECAC2E5CA03D4D575FCB68E3BA103EEEF7E5608CE39E5F8
+
encrypted_answer = 56ED54EA55AEDF24961A6F97AD3132E68D0C4FB7859ADDBB89F4DFA537B5E4196AC52EBABFBFEEF83724ADC743FF51DC4E88F439EBD70402FAA3FFEF9028546EC878EB18FD7C64C200FAD5E5000AF1AA4A7C0CB58384C44E7771FE875B0718B758ABEF088D8D3A28784C37C5D300B24911DA68DB80321F763B0FDD04293E5F37EA6C61D675EDC3CD132D5B8190171075DC483BE5E9045E2FCEF0C6DF11C425DF865B4221DE557B97EF21DF2C96FBB992148EB9451901B6B744D408B8A67BE984367B685B3CE6A32B885D58CA83A5310D4F44A6ED2E07270D03D2ECF0C7F01003B6113CBD379FE3B4F18C1AD455A331DC61D696DAFD1C2F340EA26102EBEC2B84E74D7F740A8193A583BD31001E6ECF2FEB4B3BA8F46C12C4E7CD2CEA900CCDF5065206B4785C9961C28817673672378FD0BAA31D36BBAFBE8F656B091644949C4014A2845F7A09650325EB3A3C92677A6707CCFE000E4015FFE4BB9B3DE592AFCC7C0730363AAC2F3FFF16E599A67691FBA18E546EF76F6F6F3C80E04289B709AEE13E3BCA322014E6FB4AC5858998E5A73DAA355F63F311F9478C82411C3D2D728BEF20506C82DA17BB2B00D7BA442A198D9FA47CDE215117A6B7E4DBE43F3B4A577DDF19110E68710D05783ADE02A40AB1D074C1E08062801A801C3D4E7D5D3A161A646531458C582CA674F77D166583633B280BE28AB3D0F056507CFDF618B69A9C42C96024F739C96390547C754D2941BA1F58A538BCAB4F02DFAE5FAD68AD6D64C3921B3E4EAFE1631CF07C5BA5F60904A1ADA433AB7FE3B95C6B5F0F931D95949C916FC88E65DAAB0F0B26E94A
+tmp_aes_key = F4B676FBD0BE2784601BACED292ACC443B4ED4435C15A137214B9488342EE984
+tmp_aes_iv = 65ED8BAB8D6754E711E05FCAA479C436E5FFDCFC7526DEEFA756685F3964AEA8

Yielding:

-
answer_with_hash = 9B27FD2695A7CE549D38B1B7EDC722315FC3F788BA0D89B5B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001005B57056EC5B18248D9025587ACC41539DA38DEC882C7CE8B33D065D7D4149BC8599AA807F4E2300F780B5BD87A78F3419330F29577E1934A293499938D45812E32F538DFDB13EC07EA4823F8D8DC754073E82F336BABDF7A3F239FA23039B63359DF087C3AE3B1F6716E7251C06EA990F9F39263894BECB66C4BA14DD175D01775EE0C701DAF6455127A91E088C304E34209BE5469AB964BC6887DF017B6913DA48448055ED200C9713349A278F1F216B88CAA2E9B438905938F31036841B36A8B1C61FCE1651951C6606B166AE5BBBE1810B127137CA7C83798DA363ED1A10823951555BBC1ED4B4CB833D622C3274ABD211C1B891C10AF6F213DC029BA9A33F2FF976637A131F833FCBBD4
-answer = BA0D89B5B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE203000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001005B57056EC5B18248D9025587ACC41539DA38DEC882C7CE8B33D065D7D4149BC8599AA807F4E2300F780B5BD87A78F3419330F29577E1934A293499938D45812E32F538DFDB13EC07EA4823F8D8DC754073E82F336BABDF7A3F239FA23039B63359DF087C3AE3B1F6716E7251C06EA990F9F39263894BECB66C4BA14DD175D01775EE0C701DAF6455127A91E088C304E34209BE5469AB964BC6887DF017B6913DA48448055ED200C9713349A278F1F216B88CAA2E9B438905938F31036841B36A8B1C61FCE1651951C6606B166AE5BBBE1810B127137CA7C83798DA363ED1A10823951555BBC1ED4B4CB833D622C3274ABD211C1B891C10AF6F213DC029BA9A33F2FF976637A131F833FCBBD4
+
answer_with_hash = F0B83C37C36993F479B0DA26EFADC21BE3EEEF00BA0D89B505FEF5959C0D66543DF234620481AD6F52D19F8AFF7B28655B126DF4E6402ECC03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100848D0735BEB3B42FBEB066B6DF1D42A79F842F18753D8F6369E1C82BC7B44A940F43A96BAC92C199BD25533C0507F15980BBC932EBC86798546F78A83FFDEC4F31FE31CE22E936F6523945B7E7D2963EA3C6297E067143DB04BA02C71350B94E7D42C9A9916CB5616AF0AA3862EB4E95E396CB4E2D0280A2D6331A8FD2753DE105C771BD8585B29B497E0A668C743C1327FEA8767B85EAA7AE39CB0766FC9C8C2114B4770BE0F63DB517A0D487A43C9465189BD1BED2B3597A2798669891BEB85A05554BB9AA1CB9365B7E7FE18277D7A26FDD60E88FFF88F76A971A3FE2C6D79BB50A7AB34CB57746BE0C73550A81E8326EC21E7E43EEBCF48445957AFD092A6101986680AC66DC88E0A3AF
+answer = BA0D89B505FEF5959C0D66543DF234620481AD6F52D19F8AFF7B28655B126DF4E6402ECC03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100848D0735BEB3B42FBEB066B6DF1D42A79F842F18753D8F6369E1C82BC7B44A940F43A96BAC92C199BD25533C0507F15980BBC932EBC86798546F78A83FFDEC4F31FE31CE22E936F6523945B7E7D2963EA3C6297E067143DB04BA02C71350B94E7D42C9A9916CB5616AF0AA3862EB4E95E396CB4E2D0280A2D6331A8FD2753DE105C771BD8585B29B497E0A668C743C1327FEA8767B85EAA7AE39CB0766FC9C8C2114B4770BE0F63DB517A0D487A43C9465189BD1BED2B3597A2798669891BEB85A05554BB9AA1CB9365B7E7FE18277D7A26FDD60E88FFF88F76A971A3FE2C6D79BB50A7AB34CB57746BE0C73550A81E8326EC21E7E43EEBCF48445957AFD092A6101986680AC66DC88E0A3AF

Generated payload (excluding transport headers/trailers):

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

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, 801F8304BF2FF976601646CCE61019866 Message ID generated as specified here » (unixtime() << 32) + (N*4)
message_length 16, 4E0020000 (736 in decimal)90020000 (656 in decimal) Message body length
nonce 24, 16B9587B31623559608E08A7B2DD03724305FEF5959C0D66543DF234620481AD6F Value generated by client in Step 1
server_nonce 40, 164D59F077898AA1E4ACC45F5C779B3CE252D19F8AFF7B28655B126DF4E6402ECC Value received from server in Step 2
encrypted_answer 56, 596FE500200F1007B188B7C1D2E1197B803 E2638E67646D2E1B197168615A1530D3 6350747D07B26D4EF232B059C733502C 951DA555CC4F7072B017F0C48F156546 8B1D612D54533C0230916C187496A820 FD2BD3A2C6EB18F026E821710AF087FA 81DABA1ECDB3C88C123F261E50D522D5 BAF7955493D5012ED3F02C21FA86E81F D88E4BEFA275059778CB8E1E90D3E956 EC98AA4F9B2F4D566CBA620563F3BC3B BF137E9E5C85D64707ED49F6F74DC013 0B4063AC13FA959A6CDA06400EDF3E85 18E448B11BF8E6697189E9C5CDDCE04F D797D21C462EEBEF0673ACCC0F7FF8E9 1E6228AA847B4735941F6852B277122D 20D47CDF8BB0A193D4DBC259287AC13B 322D90D0E249B6CA0914489C65FEAE8C 01881BB419248A8C86D9F7123DED6983 F0D09A54BCA5C8054993D9E2BEE2B62C 064C2DEB2201F3E0A47EFF172DD8A8F6 AD6FF02AF9990529893420E0259CCA43 5F073DDAD576E0BF56928056C9AE6975 3F3E83A5244BE9A817AA0DC3BCE2D13F FC257DC19C46CB75479EEB8D1A49792E B78E7F99B99A0592B7079D34A9884AD7 F521425FABF234274E120F48AF10E50B 885D8859167739B58AB5DA4C8D518FC3 81477BD361C392FE1FC8E29736999651 E2122E1577EBAA57D64F29CFB15590F5 4F308806C3E6D733D19EC9BCEE508F71 68EB569F480F1713B5B919EC22C70577 F1DEFBE37B776D4F7C9AEB4F69ACE982 CDE6ECDFBA015AFA9C8E3E84ACCF1562 9452507FB78C0E1953EBBD86FF91A016 7F7A905617AD750C9ED7E807EF1D9608 B8DD511B8AE3137C8B4C40B7F1694F79 4B10DCE021773A2F62809BB8ED6885CC
F363A912
FE50020056ED54EA55AEDF24961A6F97 AD3132E68D0C4FB7859ADDBB89F4DFA5 37B5E4196AC52EBABFBFEEF83724ADC7 43FF51DC4E88F439EBD70402FAA3FFEF 9028546EC878EB18FD7C64C200FAD5E5 000AF1AA4A7C0CB58384C44E7771FE87 5B0718B758ABEF088D8D3A28784C37C5 D300B24911DA68DB80321F763B0FDD04 293E5F37EA6C61D675EDC3CD132D5B81 90171075DC483BE5E9045E2FCEF0C6DF 11C425DF865B4221DE557B97EF21DF2C 96FBB992148EB9451901B6B744D408B8 A67BE984367B685B3CE6A32B885D58CA 83A5310D4F44A6ED2E07270D03D2ECF0 C7F01003B6113CBD379FE3B4F18C1AD4 55A331DC61D696DAFD1C2F340EA26102 EBEC2B84E74D7F740A8193A583BD3100 1E6ECF2FEB4B3BA8F46C12C4E7CD2CEA 900CCDF5065206B4785C9961C2881767 3672378FD0BAA31D36BBAFBE8F656B09 1644949C4014A2845F7A09650325EB3A 3C92677A6707CCFE000E4015FFE4BB9B 3DE592AFCC7C0730363AAC2F3FFF16E5 99A67691FBA18E546EF76F6F6F3C80E0 4289B709AEE13E3BCA322014E6FB4AC5 858998E5A73DAA355F63F311F9478C82 411C3D2D728BEF20506C82DA17BB2B00 D7BA442A198D9FA47CDE215117A6B7E4 DBE43F3B4A577DDF19110E68710D0578 3ADE02A40AB1D074C1E08062801A801C 3D4E7D5D3A161A646531458C582CA674 F77D166583633B280BE28AB3D0F05650 7CFDF618B69A9C42C96024F739C96390 547C754D2941BA1F58A538BCAB4F02DF AE5FAD68AD6D64C3921B3E4EAFE1631C F07C5BA5F60904A1ADA433AB7FE3B95C 6B5F0F931D95949C916FC88E65DAAB0F
0B26E94A
See below
@@ -570,13 +570,13 @@ answer = BA0D89B5B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE - + - + @@ -594,13 +594,13 @@ answer = BA0D89B5B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE - + - + @@ -609,34 +609,34 @@ answer = BA0D89B5B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE
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 = 4A823903ECA4F36FD2A4143C541D0A8266C1B2DB004C71E94447E41F73579AAA60EA00614D084D73F5175253BB98A80A83F453395B3793420BE46A43C0ECC6393DB007CBB220B47366B0CB45145D3D2F3645EDFD5A0E66DB834EBC38F68D90212897CE7EF82830BFDC5D9A02B3D239313C0ECEA019C271694C4EE043A6BA3084DDFC4E63E38AA5E0D15EDA460C4EC9121742A9EE9479361E10169939DB017091808E47D7B26A7823FEDF47F5BCAC802DE039763525BCDF769B3896FC6674CABF732F3F7B5B58020C96B57E1236E2C5DD987CE829956DE94A20C2F7B13B64F4D2AED9E7CBD0B2FAF104D49C2E8C6C927CCE2A12FC476FE2F7E1334DE257A0CDFB
+
b = 5C69A02EAFFEAA2D326F217C1551542D60E4179F95EDEF8202A89E028BAF7DFB372B772DD2AEEF0A4FF3953CBD2B37346EEB9C63F601BA7F3AAE110C4EDDDB102A50122554FE27295BAE4C07EA6D1789EAD5325FB626A19E43F8F1F915897BEB2A6EE67BA1BBCC882CC0E4312AC49BAD752574EE16AE681BD2E2A86FF2096ED6A7F4CE8C86410A804325F045A01AB3512A092676247B7128803BC239F3566D457D47179096EA21A8C61C0C0531AF917FDA80801ECBA1E74263365F582B12E011892584C55C24F67A4C9C333108C290796A79C0DFE295CFDA924DBC1B67B6BEF22AF906400EE6C9B1DD7E8D7688BAC40411C618BE50B016F445A91469FD7CA208

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

-
g_b = 754842D64FD22308A0ADC9E83A1A4C2185DB50FC34336706E5F2A5E7B3B061A0DAA59065C69F2ACF9DF208617E46204390E4BB74DA8E5B0FF5D2D4F906A2478B5A91052BDFDEC6AEA98A693E36C9D73A217ACBA8BB848AB936E9100AF788D9977F5125073063D568EE2DF4AEEA0FB4DE4C3D0C844AC8E5B605F481D4CB977134BFAB7D2387D070C7B28BD7DAF056D4A87F512610E12DB4021556BE8803EE5E26090E1747C90CB7924FF1940B3FEABB612DA24F336F6CF9BB3FFD4497827E10B606946E3E9CAB3215EF56923BDB68D3F56DB7EBE4A0C507DECEDD6AE4DF2E1DF22F9C611D62989E5F618D1B1C376678BECF846F3C1D42C0D5C50CE93B447E4BED
+
g_b = 346FA22E130D06F9AF25A7E398F15893878030136A4AC899624BEE0E7ECBB28E8AEA227D06BC2D06F3B9E8A0B7A673C242A36F88D2316DA0D9D5C54646E1EF028F2741BBEB2F51FD22981200B73953D453D113192A38F88996FAFD11B9FD78724FEA55BB73C882EE4BBA5470B8857189ACCE642EA238F343E73EFDA7E84577833352F454E6FAD5428078C0DE9A5D5FDCEA5F6994E1E58FDAF37C78644F170360D2015C625A615767AE050CFA4108C38EA5DD6D9A0D0F76BB328B3D495FB91446FEA843CDB30C25BEA2D598C5373EAA111BB6CE76D4013B3A9889113F60BC35FEC710CEC9FCF50B2D4DCF25A9E28FE11B1E00C3DD84A6CC63E773112C16A54178
7.1) generation of encrypted_data

Generated payload (excluding transport headers/trailers):

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

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, 16B9587B31623559608E08A7B2DD03724305FEF5959C0D66543DF234620481AD6F Value generated by client in Step 1
server_nonce 20, 164D59F077898AA1E4ACC45F5C779B3CE252D19F8AFF7B28655B126DF4E6402ECC Value received from server in Step 2
g_a 300, 260FE0001005B57056EC5B18248D9025587 ACC41539DA38DEC882C7CE8B33D065D7 D4149BC8599AA807F4E2300F780B5BD8 7A78F3419330F29577E1934A29349993 8D45812E32F538DFDB13EC07EA4823F8 D8DC754073E82F336BABDF7A3F239FA2 3039B63359DF087C3AE3B1F6716E7251 C06EA990F9F39263894BECB66C4BA14D D175D01775EE0C701DAF6455127A91E0 88C304E34209BE5469AB964BC6887DF0 17B6913DA48448055ED200C9713349A2 78F1F216B88CAA2E9B438905938F3103 6841B36A8B1C61FCE1651951C6606B16 6AE5BBBE1810B127137CA7C83798DA36 3ED1A10823951555BBC1ED4B4CB833D6 22C3274ABD211C1B891C10AF6F213DC0
29BA9A33
FE000100848D0735BEB3B42FBEB066B6 DF1D42A79F842F18753D8F6369E1C82B C7B44A940F43A96BAC92C199BD25533C 0507F15980BBC932EBC86798546F78A8 3FFDEC4F31FE31CE22E936F6523945B7 E7D2963EA3C6297E067143DB04BA02C7 1350B94E7D42C9A9916CB5616AF0AA38 62EB4E95E396CB4E2D0280A2D6331A8F D2753DE105C771BD8585B29B497E0A66 8C743C1327FEA8767B85EAA7AE39CB07 66FC9C8C2114B4770BE0F63DB517A0D4 87A43C9465189BD1BED2B3597A279866 9891BEB85A05554BB9AA1CB9365B7E7F E18277D7A26FDD60E88FFF88F76A971A 3FE2C6D79BB50A7AB34CB57746BE0C73 550A81E8326EC21E7E43EEBCF4844595
7AFD092A
g_a diffie-hellman parameter
server_time 560, 4F2FF9766 (1721237490 in decimal)61019866 (1721237857 in decimal) Server time
@@ -658,19 +658,19 @@ answer = BA0D89B5B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE - + - + - + @@ -684,47 +684,47 @@ answer = BA0D89B5B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE

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 = 54B64366B9587B31623559608E08A7B2DD0372434D59F077898AA1E4ACC45F5C779B3CE20000000000000000FE000100754842D64FD22308A0ADC9E83A1A4C2185DB50FC34336706E5F2A5E7B3B061A0DAA59065C69F2ACF9DF208617E46204390E4BB74DA8E5B0FF5D2D4F906A2478B5A91052BDFDEC6AEA98A693E36C9D73A217ACBA8BB848AB936E9100AF788D9977F5125073063D568EE2DF4AEEA0FB4DE4C3D0C844AC8E5B605F481D4CB977134BFAB7D2387D070C7B28BD7DAF056D4A87F512610E12DB4021556BE8803EE5E26090E1747C90CB7924FF1940B3FEABB612DA24F336F6CF9BB3FFD4497827E10B606946E3E9CAB3215EF56923BDB68D3F56DB7EBE4A0C507DECEDD6AE4DF2E1DF22F9C611D62989E5F618D1B1C376678BECF846F3C1D42C0D5C50CE93B447E4BED
-padding = 350570234668F78504EFCC02
-tmp_aes_key = 68BAFA98D2EF9596E4A16AC8738160B92728CB85D4675BA6C9FA60E0DADD29DC
-tmp_aes_iv = A172B2F171E9FC1B5ECAC2E5CA03D4D575FCB68E3BA103EEEF7E5608CE39E5F8
+
data = 54B6436605FEF5959C0D66543DF234620481AD6F52D19F8AFF7B28655B126DF4E6402ECC0000000000000000FE000100346FA22E130D06F9AF25A7E398F15893878030136A4AC899624BEE0E7ECBB28E8AEA227D06BC2D06F3B9E8A0B7A673C242A36F88D2316DA0D9D5C54646E1EF028F2741BBEB2F51FD22981200B73953D453D113192A38F88996FAFD11B9FD78724FEA55BB73C882EE4BBA5470B8857189ACCE642EA238F343E73EFDA7E84577833352F454E6FAD5428078C0DE9A5D5FDCEA5F6994E1E58FDAF37C78644F170360D2015C625A615767AE050CFA4108C38EA5DD6D9A0D0F76BB328B3D495FB91446FEA843CDB30C25BEA2D598C5373EAA111BB6CE76D4013B3A9889113F60BC35FEC710CEC9FCF50B2D4DCF25A9E28FE11B1E00C3DD84A6CC63E773112C16A54178
+padding = 81FD69FCA6AC66BD72B25774
+tmp_aes_key = F4B676FBD0BE2784601BACED292ACC443B4ED4435C15A137214B9488342EE984
+tmp_aes_iv = 65ED8BAB8D6754E711E05FCAA479C436E5FFDCFC7526DEEFA756685F3964AEA8

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 = 3C51044D8DD6CC9B38DD2AD488B29291570FEBE34CF477595BFA0CC4F1E21C1AF9A7EBF55C6E2DF34428D6F55F24AC437ACD1233A90ED6D2AD93A3BF990B15FE48745A687EA470C72355D35FA1075FBB6CBB95B58AE1DE606E8FC7741B1419551E3251FECD4F7395B539753435A4685BD0B7D9C0732E2094EF96F1A07B035DD1434D4E623FDDB9550EC813B13EE359D8500C0C96D4F2184E2673868D95AB073927F0299B35C9A5E879332BA1C21F73315DDDBF907574D22A712F8791F8243BF918AB18BC2BCCE9C53142FF0BFD42C69CB118852B5407C2BC758BC12627CD3AA01945B943D18BE53AB2C6DDFDC5707BA52AC550E1CBF71D78887CCDBDBF0AAD3429BAB9E9B6A1FAE09A3E030E51FAD78B4D14A1649CF564CF7D330DED0C6BD9864BB5F940A60DFBC9A80D210162E4B3F4520D540D7A48AA7B68A642E060E07D674380C8592B15E72FBC9C742337CAED47
+
encrypted_data = 6C38FF22F954815526A6964B664E1A2D1A55C0DB760CDF2AE1536EDE3B35BBD4AC7B53D593EB0CBCEAAE98F61B50100C7B32A64503EB5AAB887BB1A6936CF0B5FC55170F33CFF32B4E1C1112E30FCFAEAD780C937A447EA87F1F31E4B463A6AE8921DA84880C7F31E1741C486836E554BC615E00B7EDED76988DF6C8736E8774F4A6D2D2259E7FA4072FFBD008E2C452493F218D768FE87623EDED20296523236508C5437D0E1790378BD48C5AD01D87B3D19645AA2BB867B1C9470B929E653AD3E5AF28B4B5DFD4D250B5AE645AD28E593CEBF5B1A0DB4047BEDCC862E06EC962E96637D307238993E74A8265608D17B07BD085BDAC1E14E938C465A3F2553196F6BD1FD15A089FF6423D5DBEB5F786D7FB16A53A56C490FA93DD30100DFE6A368C496C7048F1E718CA1F56220CAB618DAB00770A60156D6ADD56AC4F8C101F14ED1E0BD4BCA4F09F309DE90238D306

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

Payload (de)serialization:

set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;
nonce 4, 16B9587B31623559608E08A7B2DD03724305FEF5959C0D66543DF234620481AD6F Value generated by client in Step 1
server_nonce 20, 164D59F077898AA1E4ACC45F5C779B3CE252D19F8AFF7B28655B126DF4E6402ECC Value received from server in Step 2
g_b 36, 260FE000100754842D64FD22308A0ADC9E8 3A1A4C2185DB50FC34336706E5F2A5E7 B3B061A0DAA59065C69F2ACF9DF20861 7E46204390E4BB74DA8E5B0FF5D2D4F9 06A2478B5A91052BDFDEC6AEA98A693E 36C9D73A217ACBA8BB848AB936E9100A F788D9977F5125073063D568EE2DF4AE EA0FB4DE4C3D0C844AC8E5B605F481D4 CB977134BFAB7D2387D070C7B28BD7DA F056D4A87F512610E12DB4021556BE88 03EE5E26090E1747C90CB7924FF1940B 3FEABB612DA24F336F6CF9BB3FFD4497 827E10B606946E3E9CAB3215EF56923B DB68D3F56DB7EBE4A0C507DECEDD6AE4 DF2E1DF22F9C611D62989E5F618D1B1C 376678BECF846F3C1D42C0D5C50CE93B
447E4BED
FE000100346FA22E130D06F9AF25A7E3 98F15893878030136A4AC899624BEE0E 7ECBB28E8AEA227D06BC2D06F3B9E8A0 B7A673C242A36F88D2316DA0D9D5C546 46E1EF028F2741BBEB2F51FD22981200 B73953D453D113192A38F88996FAFD11 B9FD78724FEA55BB73C882EE4BBA5470 B8857189ACCE642EA238F343E73EFDA7 E84577833352F454E6FAD5428078C0DE 9A5D5FDCEA5F6994E1E58FDAF37C7864 4F170360D2015C625A615767AE050CFA 4108C38EA5DD6D9A0D0F76BB328B3D49 5FB91446FEA843CDB30C25BEA2D598C5 373EAA111BB6CE76D4013B3A9889113F 60BC35FEC710CEC9FCF50B2D4DCF25A9 E28FE11B1E00C3DD84A6CC63E773112C
16A54178
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 = 9982268B8CE5598E4ADF4C56A5D054BC2AA8A57067D06DFDA4F9271D0598A9A0B8608E885BB870DB8852176A13E513F230FC12DD80666C289C9D590BDA9422E022F3A36C60B6BACDCA3FE3D8AB1ECE82B981EF8020FEE55D15DE9E166B89A48FBD037351629C6DA7162EA8FBBB292A1494F2447A60115C5BB4CA9E144A528A71185821AB51731B478F63F9A0E20777A32DEEBDB8656704D07DCA499B47EB2C24E1635FEF16ECEAF45AAEC794999C3668B5108771C54097A3C1DB4C42D1200AB99337FA62B256302D0E29020D12F702126A40F5C86F9C85BDA947D4159F611236EA42F64425316DF54861D9576DD69FBD888FEB986A9115C30ACBAC505CD06350
+
auth_key = 5E5B0003BF77F374B3DCB4CE389DCD5056CF6A392F0631B3E5A527D2DEA22B5F4BED0D363C2A08C232EBAFC43A423D74B6CDDF0B6317087A26D620626B24B1627EDE442FBF66555D22591D948D59E502B0FE57B772921B9A79FBE1EB79A41BAF1C7C98A9FD33164BEC348A9297A068E636842D1A0068EB1A2B98FDC454363C5511690FF94559DD0A70BEF90D7EE969A4AB8B8D61BD74E2B3D3F8E80595CEBE110A78C94CBB9149D7B9B6EFFDCB0C71CF4681FF56A24D49641D45075E0951D8E58E753C8A18F21E1DF5DB54B6847C13044C7778B7E66E45FBAB6B97141D302ADE22125259C018E3EEA3E7D2103F8E0BAE597480E826396B9043B442284C5F3D1B
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 48 45 A9 F2 FF 97 66
-0010 | 70 00 00 00 34 F7 CB 3B B9 58 7B 31 62 35 59 60
-0020 | 8E 08 A7 B2 DD 03 72 43 4D 59 F0 77 89 8A A1 E4
-0030 | AC C4 5F 5C 77 9B 3C E2 CA 5E 0D 76 F0 F5 A1 55
-0040 | 15 27 98 64 69 4F E5 15
+
0000 | 00 00 00 00 00 00 00 00 01 E4 1C 40 62 01 98 66
+0010 | A4 00 00 00 34 F7 CB 3B 05 FE F5 95 9C 0D 66 54
+0020 | 3D F2 34 62 04 81 AD 6F 52 D1 9F 8A FF 7B 28 65
+0030 | 5B 12 6D F4 E6 40 2E CC D6 11 24 47 54 39 DC 1E
+0040 | 8C 17 01 95 CD DA ED 02

Payload (de)serialization:

dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;
message_id 8, 81CE60000F2FF9766E4250C0061019866 Message ID generated as specified here » (unixtime() << 32) + (N*4)
nonce 24, 16B9587B31623559608E08A7B2DD03724305FEF5959C0D66543DF234620481AD6F Value generated by client in Step 1
server_nonce 40, 164D59F077898AA1E4ACC45F5C779B3CE252D19F8AFF7B28655B126DF4E6402ECC Value received from server in Step 2
encrypted_data 56, 340FE5001003C51044D8DD6CC9B38DD2AD4 88B29291570FEBE34CF477595BFA0CC4 F1E21C1AF9A7EBF55C6E2DF34428D6F5 5F24AC437ACD1233A90ED6D2AD93A3BF 990B15FE48745A687EA470C72355D35F A1075FBB6CBB95B58AE1DE606E8FC774 1B1419551E3251FECD4F7395B5397534 35A4685BD0B7D9C0732E2094EF96F1A0 7B035DD1434D4E623FDDB9550EC813B1 3EE359D8500C0C96D4F2184E2673868D 95AB073927F0299B35C9A5E879332BA1 C21F73315DDDBF907574D22A712F8791 F8243BF918AB18BC2BCCE9C53142FF0B FD42C69CB118852B5407C2BC758BC126 27CD3AA01945B943D18BE53AB2C6DDFD C5707BA52AC550E1CBF71D78887CCDBD BF0AAD3429BAB9E9B6A1FAE09A3E030E 51FAD78B4D14A1649CF564CF7D330DED 0C6BD9864BB5F940A60DFBC9A80D2101 62E4B3F4520D540D7A48AA7B68A642E0 60E07D674380C8592B15E72FBC9C7423
37CAED47
FE5001006C38FF22F954815526A6964B 664E1A2D1A55C0DB760CDF2AE1536EDE 3B35BBD4AC7B53D593EB0CBCEAAE98F6 1B50100C7B32A64503EB5AAB887BB1A6 936CF0B5FC55170F33CFF32B4E1C1112 E30FCFAEAD780C937A447EA87F1F31E4 B463A6AE8921DA84880C7F31E1741C48 6836E554BC615E00B7EDED76988DF6C8 736E8774F4A6D2D2259E7FA4072FFBD0 08E2C452493F218D768FE87623EDED20 296523236508C5437D0E1790378BD48C 5AD01D87B3D19645AA2BB867B1C9470B 929E653AD3E5AF28B4B5DFD4D250B5AE 645AD28E593CEBF5B1A0DB4047BEDCC8 62E06EC962E96637D307238993E74A82 65608D17B07BD085BDAC1E14E938C465 A3F2553196F6BD1FD15A089FF6423D5D BEB5F786D7FB16A53A56C490FA93DD30 100DFE6A368C496C7048F1E718CA1F56 220CAB618DAB00770A60156D6ADD56AC 4F8C101F14ED1E0BD4BCA4F09F309DE9
0238D306
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);< - + - + - +
message_id 8, 8014845A9F2FF976601E41C4062019866 Message ID generated as specified here » (unixtime() << 32) + (N*4)
message_length 16, 470000000 (112 in decimal)A4000000 (164 in decimal) Message body length
nonce 24, 16B9587B31623559608E08A7B2DD03724305FEF5959C0D66543DF234620481AD6F Value generated by client in Step 1
server_nonce 40, 164D59F077898AA1E4ACC45F5C779B3CE252D19F8AFF7B28655B126DF4E6402ECC Value received from server in Step 2
new_nonce_hash1 56, 16CA5E0D76F0F5A15515279864694FE515D61124475439DC1E8C170195CDDAED02 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.