diff --git a/data/web/corefork.telegram.org/api/bots/webapps.html b/data/web/corefork.telegram.org/api/bots/webapps.html
index aee0a32caa..250d5a1643 100644
--- a/data/web/corefork.telegram.org/api/bots/webapps.html
+++ b/data/web/corefork.telegram.org/api/bots/webapps.html
@@ -272,9 +272,59 @@ Note that eventual errors will not be sent as a failed
event if the
status
- sent
or cancelled
Used by clients to reply to a web_app_request_phone
event », indicating whether the user has shared their phone number with the bot (allowed
) or not (cancelled
).
-biometry_auth_requested
-biometry_token_updated
biometry_info_received
+Params: a JSON object with the following fields:
+
+-
+
available
- boolean, if true, indicates that biometric authentication is available on the current device.
+
+-
+
type
- optional string, set if available
is true, contains the type of biometric authentication, one of:
+
+finger
- fingerprint-based biometrics
+face
- face-based biometrics
+unknown
- biometrics of an unknown type
+
+
+-
+
access_requested
- boolean, indicates whether the app has previously requested permission to use biometrics through a web_app_biometry_request_access
event »
+
+-
+
access_granted
- boolean, indicates whether the user has granted the app permission to use biometrics in response to a web_app_biometry_request_access
event ».
+If false and access_requested
is true, may indicate that:
+
+- The user has simply cancelled the permission popup, in which case a
web_app_biometry_request_access
event » can be emitted to re-open the popup
+- The user has denied the app permission to use biometrics, in which case the app should open a prompt notifying the user that the biometric settings must be changed to use biometrics, and if the user clicks on the in-app confirm button, a web_app_biometry_open_settings event » must be emitted.
+
+Since there is currently no way for apps to distinguish the above two cases, apps must assume the user has denied permission to use biometrics if access_granted
is false and access_requested
is true.
+
+-
+
token_saved
- boolean, whether a token was safely stored on-device by a previous web_app_biometry_update_token event ».
+
+-
+
device_id
- string, a unique device identifier that can be used to match the token to the device.
+
+
+Used by clients to reply to a web_app_biometry_get_info
event » or a web_app_biometry_request_access
event ».
+biometry_token_updated
+Params: a JSON object with the following fields:
+
+status
- string, one of:
+
+
+Used by clients to reply to a web_app_biometry_update_token
event ».
+biometry_auth_requested
+Params: a JSON object with the following fields:
+
+Used by clients to reply to a web_app_biometry_request_auth
biometric authentication request ».
custom_method_invoked
Params: a JSON object with the following fields:
diff --git a/data/web/corefork.telegram.org/api/effects.html b/data/web/corefork.telegram.org/api/effects.html
index 4ee1df6977..9d2e8c4e16 100644
--- a/data/web/corefork.telegram.org/api/effects.html
+++ b/data/web/corefork.telegram.org/api/effects.html
@@ -75,7 +75,7 @@ Shown in the right bottom corner of the preview animation as a quick way for the
Must also be shown in messages with this effect, near the message date: clicking on this icon should re-trigger the effect.
- Preview animation: the animated sticker specified in
effect_sticker_id
.
Used for the effect selection menu.
-- Effect animation: a different animated sticker, specified either by
effect_animation_id
(if set) or by the premium animated sticker effect associated to the animated sticker specified in effect_sticker_id
(always different from the animated sticker itself, fetched thanks to the videoSize of type f
as specified here »).
+ - Effect animation: a different animated sticker, specified either by
effect_animation_id
(if set) or by the premium animated sticker effect associated to the animated sticker specified in effect_sticker_id
(always different from the animated sticker itself, fetched thanks to the videoSize of type f
as specified here »).
The effect animation should be only played once, when first receiving or sending the message.
Clicking on the preview icon near the message date should re-trigger the effect.
diff --git a/data/web/corefork.telegram.org/api/web-events.html b/data/web/corefork.telegram.org/api/web-events.html
index 37e48d9e4a..70fdc882b3 100644
--- a/data/web/corefork.telegram.org/api/web-events.html
+++ b/data/web/corefork.telegram.org/api/web-events.html
@@ -110,26 +110,26 @@ Otherwise, if the user refuses or the bo
Emitted by bot mini apps to ask the client to initialize the biometric authentication manager object for the current bot, emitting a biometry_info_received
event » on completion.
This request should just initialize the client-side state, i.e. by checking if biometric authentication is even available or not, it should not ask the user anything.
web_app_biometry_request_access
-Event data: a JSON object, with an optional reason
string field, containing the reason why the bot is asking to use biometric authentication.
+Event data: a JSON object, with an optional reason
string field (1-128 chars, used in the prompt), containing the reason why the bot is asking to use biometric authentication.
Emitted by bot mini apps to ask the user permission to use biometric authentication, emitting a biometry_info_received
event » on completion.
This request should not actually prompt biometric authentication, it should just ask the user permission to use them, and a popup should be shown only if the user hasn't already allowed or denied the usage of biometric authentication for the bot associated to the mini app.
web_app_biometry_update_token
Event data: a JSON object with the following fields:
-token
- The new token (string, max 1024 chars), or an empty string to remove it.
-reason
- Optional string field, containing the reason why the bot is asking to authenticate using biometrics.
+token
- The new token (string, 0-1024 chars), or an empty string to remove it.
+reason
- Optional string field, containing the reason why the bot is asking to authenticate using biometrics (1-128 chars, used in the prompt).
Emitted by bot mini apps to authenticate using biometrics and store the biometric token securely stored on-device, emitting a biometry_token_updated
event » on completion.
This token (which may be for example the private key of a cryptocurrency wallet, or some other data the app must keep safe) must be safely stored by the Telegram client, associating it to the bot that owns the mini app.
For example, the token may be directly stored in the on-device secure storage, accessible only after biometric authentication, or it may be stored to normal, non-secure storage, but in encrypted form, encrypted using the key returned from the device's secure storage after biometric authentication (for example on Android, using the CryptoObject returned by the biometric prompt authentication result).
If the user has previously disallowed the bot from using biometric authentication, this request should immediately fail, emitting an appropriate biometry_token_updated
event ».
web_app_biometry_request_auth
-Event data: a JSON object, with an optional reason
string field, containing the reason why the bot is asking to authenticate using biometrics.
-Emitted by bot mini apps to authenticate using biometrics, emitting a biometry_auth_requested
event » on completion, containing either the error, or the decrypted previously stored biometric token » (or an empty string if no token was configured yet).
+Event data: a JSON object, with an optional reason
string field, containing the reason why the bot is asking to authenticate using biometrics (1-128 chars, used in the prompt).
+Emitted by bot mini apps to authenticate using biometrics, emitting a biometry_auth_requested
event » on completion, containing either an error, or the decrypted previously stored biometric token » (or an empty string if no token was configured yet).
If the user has previously disallowed the bot from using biometric authentication, this request should immediately fail, emitting an appropriate biometry_auth_requested
event ».
web_app_biometry_open_settings
Event data: null
-Emitted by bot mini apps to open the biometric authentication settings page for bots, useful when the app needs to request biometrics access from users who have previously denied it.
+Emitted by bot mini apps to open the biometric authentication settings page for bots, useful when the app needs to request permission to use biometrics from users who have previously denied it.
Note that this event should only be handled in response to user interaction with the Mini App interface (e.g. a click inside the Mini App or on the main button), and it must be handled at most once a second.
web_app_invoke_custom_method
Event data: a JSON object with the following fields:
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 882f0b5ef6..9c3fde0f58 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 B8 BE 04 00 B6 3D 9D 66
-0010 | 14 00 00 00 F1 8E 7E BE 40 80 21 19 68 68 1D 6D
-0020 | 1F DE 74 E0 B0 4F 71 6C
+0000 | 00 00 00 00 00 00 00 00 C0 62 0C 00 0F 09 9E 66
+0010 | 14 00 00 00 F1 8E 7E BE FE 7E E3 8C 9F B2 A0 E1
+0020 | 5D 1A BB 74 C2 E1 33 D2
Payload (de)serialization:
req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;
@@ -77,7 +77,7 @@
message_id |
8, 8 |
-B8BE0400B63D9D66 |
+C0620C000F099E66 |
Message ID generated as specified here » (unixtime() << 32) + (N*4) |
@@ -95,7 +95,7 @@
nonce |
24, 16 |
-4080211968681D6D1FDE74E0B04F716C |
+FE7EE38C9FB2A0E15D1ABB74C2E133D2 |
Random number |
@@ -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 8C 1A 5D B6 3D 9D 66
-0010 | B8 00 00 00 63 24 16 05 40 80 21 19 68 68 1D 6D
-0020 | 1F DE 74 E0 B0 4F 71 6C B3 67 26 72 28 78 35 1C
-0030 | 62 90 B0 C8 9A C5 42 4A 08 1A BF 15 42 72 62 52
-0040 | 5D 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 5C F7 B5 0F 09 9E 66
+0010 | 54 00 00 00 63 24 16 05 FE 7E E3 8C 9F B2 A0 E1
+0020 | 5D 1A BB 74 C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB
+0030 | BC DC 58 F8 8E 1E 3A E8 08 21 F7 74 9A 09 EA 98
+0040 | A3 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 @@
message_id |
8, 8 |
-018C1A5DB63D9D66 |
+015CF7B50F099E66 |
Message ID generated as specified here » (unixtime() << 32) + (N*4) |
message_length |
16, 4 |
-B8000000 (184 in decimal) |
+54000000 (84 in decimal) |
Message body length |
@@ -150,19 +150,19 @@
nonce |
24, 16 |
-4080211968681D6D1FDE74E0B04F716C |
+FE7EE38C9FB2A0E15D1ABB74C2E133D2 |
Value generated by client in Step 1 |
server_nonce |
40, 16 |
-B36726722878351C6290B0C89AC5424A |
+B11B0686D343E5FBBCDC58F88E1E3AE8 |
Server-generated random number |
pq |
56, 12 |
-081ABF15427262525D000000 TL byte deserialization => bigendian conversion to decimal => 1927282540668932701 |
+0821F7749A09EA98A3000000 TL byte deserialization => bigendian conversion to decimal => 2447553127439308963 |
Single-byte prefix denoting length, an 8-byte string, and three bytes of padding |
@@ -208,22 +208,22 @@
Proof of work
3) Client decomposes pq into prime factors such that p < q.
-pq = 1927282540668932701
-Decompose into 2 prime cofactors p < q
: 1927282540668932701 = 1378271773 * 1398332737
-p = 1378271773
-q = 1398332737
+pq = 2447553127439308963
+Decompose into 2 prime cofactors p < q
: 2447553127439308963 = 1284150331 * 1905970873
+p = 1284150331
+q = 1905970873
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 BF 15 42 72 62 52 5D 00 00 00
-0010 | 04 52 26 C2 1D 00 00 00 04 53 58 DD 41 00 00 00
-0020 | 40 80 21 19 68 68 1D 6D 1F DE 74 E0 B0 4F 71 6C
-0030 | B3 67 26 72 28 78 35 1C 62 90 B0 C8 9A C5 42 4A
-0040 | 82 C1 B9 BB 22 20 B4 18 75 C3 99 43 07 E3 9C 38
-0050 | 18 6D 22 DE CA 59 44 DB 8F 23 89 0F 1B C7 FC 26
+0000 | 95 5F F5 A9 08 21 F7 74 9A 09 EA 98 A3 00 00 00
+0010 | 04 4C 8A 94 3B 00 00 00 04 71 9A CE B9 00 00 00
+0020 | FE 7E E3 8C 9F B2 A0 E1 5D 1A BB 74 C2 E1 33 D2
+0030 | B1 1B 06 86 D3 43 E5 FB BC DC 58 F8 8E 1E 3A E8
+0040 | 2E 2D 46 44 8E CC BF CD E4 D0 55 64 EA 29 5F 70
+0050 | A8 27 B4 1B 52 A7 88 64 78 21 FA 22 80 5B 01 79
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 = 1398332737
pq |
4, 12 |
-081ABF15427262525D000000 TL byte deserialization => bigendian conversion to decimal => 1927282540668932701 |
+0821F7749A09EA98A3000000 TL byte deserialization => bigendian conversion to decimal => 2447553127439308963 |
Single-byte prefix denoting length, 8-byte string, and three bytes of padding |
p |
16, 8 |
-045226C21D000000 TL byte deserialization => bigendian conversion to decimal => 1378271773 |
+044C8A943B000000 TL byte deserialization => bigendian conversion to decimal => 1284150331 |
First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding |
q |
24, 8 |
-045358DD41000000 TL byte deserialization => bigendian conversion to decimal => 1398332737 |
+04719ACEB9000000 TL byte deserialization => bigendian conversion to decimal => 1905970873 |
Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding |
nonce |
32, 16 |
-4080211968681D6D1FDE74E0B04F716C |
+FE7EE38C9FB2A0E15D1ABB74C2E133D2 |
Value generated by client in Step 1 |
server_nonce |
48, 16 |
-B36726722878351C6290B0C89AC5424A |
+B11B0686D343E5FBBCDC58F88E1E3AE8 |
Value received from server in Step 2 |
new_nonce |
64, 32 |
-82C1B9BB2220B41875C3994307E39C38 186D22DECA5944DB8F23890F1BC7FC26 |
+2E2D46448ECCBFCDE4D05564EA295F70 A827B41B52A788647821FA22805B0179 |
Client-generated random number |
@@ -291,39 +291,39 @@ q = 1398332737
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 = 955FF5A9081ABF15427262525D000000045226C21D000000045358DD410000004080211968681D6D1FDE74E0B04F716CB36726722878351C6290B0C89AC5424A82C1B9BB2220B41875C3994307E39C38186D22DECA5944DB8F23890F1BC7FC2602000000
-random_padding_bytes = AD0C622C4B21B55F1940C5E07619EA37E6B0118545D4EA9FD389A5EA6D7508621F5EABCA8E4DEE7EF43F52B7446354BB27E00E64684B729BA4446A77BD5CB2A1FF4564EB8553A38D18644B4C090DDDDDD2E0C32CC0905C43FE3C039F
+data = 955FF5A90821F7749A09EA98A3000000044C8A943B00000004719ACEB9000000FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE82E2D46448ECCBFCDE4D05564EA295F70A827B41B52A788647821FA22805B017902000000
+random_padding_bytes = CD8C4EDA27DA91F03C9F8CF051671783BD56D31E5B19B9CFA703A84F0E9DBE62D2E45EA494E1BAF3D8D9A331D758DB115263DE35EB87D32EE526D4AB2F78169F9E6D1EDC3D5B6F16EF5976040CE69FCEF80F0E8B5E75E89419B3D7B8
And this is the output:
-encrypted_data = 3B91E3BC3E7A74527048A69839689AAFCBC7A11540B58F028DAEC6E3EEB382C41B8FF1B5E286AF027B2033A3F03553C12697C26A02B116229231ED7309FDF4AA4516F563EC3E484294A9B1B1AEBDF7AA9873B0C5576868B5DF0CCE357C2D51A9B7664AB65EE9A703CC2B0890C5F67622A606EA3B8D4EE08D0A975140691A6EF96BF56E6634716D76A081F5BDE71010DB05A7812A4905CE1E1585B4D083097FF2F26500260D2CFFEC332B3307D56E099DB44DEC8B110543CBC14113EE546AF6E5DB8A2BDCE9799BA49CBABCAFEF0EBC46C9F1F5308449D1F48EBD39BE918966AEBB9E7F51D15415EF40B174F270C3FE332F63A2889835FEE28D719631BFD884BB
+encrypted_data = E29368A6A56B647710525E2591AE29AE3AE8D35FB014BE046AE77F2FFB3F1123835032E4406A6C8344EF019536CA43D4ABB07809464ED1994415E0C34708C96CF35B05C8F8248AD3B3263D68E20D070B2ADB55FA160EF76A9571C841E5EB57BDEAC205C6049CFFF01C0552D5B9DFCD1A4A01CF79BAF2E42CE19927C76E38B060D7260AA263AB5309B55685AAF330E161666F25CAF03EEDF8EE77646C2B2A052B272CF7ADEDD326EB12E905A5F4AF56FA6820416E568CC476D847E3AAA5EF7EE1455F73405F28C83D81655246ED94176385DAD0B19F985E0073B4ABC6A232EBFEA03AE1B43BD662C587167668D3D5678ECBB65461D0A46E67A574933037F90109
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 F0 79 0D 00 B6 3D 9D 66
-0010 | 40 01 00 00 BE E4 12 D7 40 80 21 19 68 68 1D 6D
-0020 | 1F DE 74 E0 B0 4F 71 6C B3 67 26 72 28 78 35 1C
-0030 | 62 90 B0 C8 9A C5 42 4A 04 52 26 C2 1D 00 00 00
-0040 | 04 53 58 DD 41 00 00 00 85 FD 64 DE 85 1D 9D D0
-0050 | FE 00 01 00 3B 91 E3 BC 3E 7A 74 52 70 48 A6 98
-0060 | 39 68 9A AF CB C7 A1 15 40 B5 8F 02 8D AE C6 E3
-0070 | EE B3 82 C4 1B 8F F1 B5 E2 86 AF 02 7B 20 33 A3
-0080 | F0 35 53 C1 26 97 C2 6A 02 B1 16 22 92 31 ED 73
-0090 | 09 FD F4 AA 45 16 F5 63 EC 3E 48 42 94 A9 B1 B1
-00A0 | AE BD F7 AA 98 73 B0 C5 57 68 68 B5 DF 0C CE 35
-00B0 | 7C 2D 51 A9 B7 66 4A B6 5E E9 A7 03 CC 2B 08 90
-00C0 | C5 F6 76 22 A6 06 EA 3B 8D 4E E0 8D 0A 97 51 40
-00D0 | 69 1A 6E F9 6B F5 6E 66 34 71 6D 76 A0 81 F5 BD
-00E0 | E7 10 10 DB 05 A7 81 2A 49 05 CE 1E 15 85 B4 D0
-00F0 | 83 09 7F F2 F2 65 00 26 0D 2C FF EC 33 2B 33 07
-0100 | D5 6E 09 9D B4 4D EC 8B 11 05 43 CB C1 41 13 EE
-0110 | 54 6A F6 E5 DB 8A 2B DC E9 79 9B A4 9C BA BC AF
-0120 | EF 0E BC 46 C9 F1 F5 30 84 49 D1 F4 8E BD 39 BE
-0130 | 91 89 66 AE BB 9E 7F 51 D1 54 15 EF 40 B1 74 F2
-0140 | 70 C3 FE 33 2F 63 A2 88 98 35 FE E2 8D 71 96 31
-0150 | BF D8 84 BB
+0000 | 00 00 00 00 00 00 00 00 C4 62 0C 00 0F 09 9E 66
+0010 | 40 01 00 00 BE E4 12 D7 FE 7E E3 8C 9F B2 A0 E1
+0020 | 5D 1A BB 74 C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB
+0030 | BC DC 58 F8 8E 1E 3A E8 04 4C 8A 94 3B 00 00 00
+0040 | 04 71 9A CE B9 00 00 00 85 FD 64 DE 85 1D 9D D0
+0050 | FE 00 01 00 E2 93 68 A6 A5 6B 64 77 10 52 5E 25
+0060 | 91 AE 29 AE 3A E8 D3 5F B0 14 BE 04 6A E7 7F 2F
+0070 | FB 3F 11 23 83 50 32 E4 40 6A 6C 83 44 EF 01 95
+0080 | 36 CA 43 D4 AB B0 78 09 46 4E D1 99 44 15 E0 C3
+0090 | 47 08 C9 6C F3 5B 05 C8 F8 24 8A D3 B3 26 3D 68
+00A0 | E2 0D 07 0B 2A DB 55 FA 16 0E F7 6A 95 71 C8 41
+00B0 | E5 EB 57 BD EA C2 05 C6 04 9C FF F0 1C 05 52 D5
+00C0 | B9 DF CD 1A 4A 01 CF 79 BA F2 E4 2C E1 99 27 C7
+00D0 | 6E 38 B0 60 D7 26 0A A2 63 AB 53 09 B5 56 85 AA
+00E0 | F3 30 E1 61 66 6F 25 CA F0 3E ED F8 EE 77 64 6C
+00F0 | 2B 2A 05 2B 27 2C F7 AD ED D3 26 EB 12 E9 05 A5
+0100 | F4 AF 56 FA 68 20 41 6E 56 8C C4 76 D8 47 E3 AA
+0110 | A5 EF 7E E1 45 5F 73 40 5F 28 C8 3D 81 65 52 46
+0120 | ED 94 17 63 85 DA D0 B1 9F 98 5E 00 73 B4 AB C6
+0130 | A2 32 EB FE A0 3A E1 B4 3B D6 62 C5 87 16 76 68
+0140 | D3 D5 67 8E CB B6 54 61 D0 A4 6E 67 A5 74 93 30
+0150 | 37 F9 01 09
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;
@@ -345,7 +345,7 @@ random_padding_bytes = AD0C622C4B21B55F1940C5E07619EA37E6B0118545D4EA9FD389A5EA6
message_id |
8, 8 |
-F0790D00B63D9D66 |
+C4620C000F099E66 |
Message ID generated as specified here » (unixtime() << 32) + (N*4) |
@@ -363,25 +363,25 @@ random_padding_bytes = AD0C622C4B21B55F1940C5E07619EA37E6B0118545D4EA9FD389A5EA6
nonce |
24, 16 |
-4080211968681D6D1FDE74E0B04F716C |
+FE7EE38C9FB2A0E15D1ABB74C2E133D2 |
Value generated by client in Step 1 |
server_nonce |
40, 16 |
-B36726722878351C6290B0C89AC5424A |
+B11B0686D343E5FBBCDC58F88E1E3AE8 |
Value received from server in Step 2 |
p |
56, 8 |
-045226C21D000000 TL byte deserialization => bigendian conversion to decimal => 1378271773 |
+044C8A943B000000 TL byte deserialization => bigendian conversion to decimal => 1284150331 |
First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding |
q |
64, 8 |
-045358DD41000000 TL byte deserialization => bigendian conversion to decimal => 1398332737 |
+04719ACEB9000000 TL byte deserialization => bigendian conversion to decimal => 1905970873 |
Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding |
@@ -393,7 +393,7 @@ random_padding_bytes = AD0C622C4B21B55F1940C5E07619EA37E6B0118545D4EA9FD389A5EA6
encrypted_data |
80, 260 |
-FE0001003B91E3BC3E7A74527048A698 39689AAFCBC7A11540B58F028DAEC6E3 EEB382C41B8FF1B5E286AF027B2033A3 F03553C12697C26A02B116229231ED73 09FDF4AA4516F563EC3E484294A9B1B1 AEBDF7AA9873B0C5576868B5DF0CCE35 7C2D51A9B7664AB65EE9A703CC2B0890 C5F67622A606EA3B8D4EE08D0A975140 691A6EF96BF56E6634716D76A081F5BD E71010DB05A7812A4905CE1E1585B4D0 83097FF2F26500260D2CFFEC332B3307 D56E099DB44DEC8B110543CBC14113EE 546AF6E5DB8A2BDCE9799BA49CBABCAF EF0EBC46C9F1F5308449D1F48EBD39BE 918966AEBB9E7F51D15415EF40B174F2 70C3FE332F63A2889835FEE28D719631 BFD884BB |
+FE000100E29368A6A56B647710525E25 91AE29AE3AE8D35FB014BE046AE77F2F FB3F1123835032E4406A6C8344EF0195 36CA43D4ABB07809464ED1994415E0C3 4708C96CF35B05C8F8248AD3B3263D68 E20D070B2ADB55FA160EF76A9571C841 E5EB57BDEAC205C6049CFFF01C0552D5 B9DFCD1A4A01CF79BAF2E42CE19927C7 6E38B060D7260AA263AB5309B55685AA F330E161666F25CAF03EEDF8EE77646C 2B2A052B272CF7ADEDD326EB12E905A5 F4AF56FA6820416E568CC476D847E3AA A5EF7EE1455F73405F28C83D81655246 ED94176385DAD0B19F985E0073B4ABC6 A232EBFEA03AE1B43BD662C587167668 D3D5678ECBB65461D0A46E67A5749330 37F90109 |
Value generated above |
@@ -402,47 +402,47 @@ random_padding_bytes = AD0C622C4B21B55F1940C5E07619EA37E6B0118545D4EA9FD389A5EA6
6) Server responds with:
Received payload (excluding transport headers/trailers):
-0000 | 00 00 00 00 00 00 00 00 01 A4 D8 29 B7 3D 9D 66
-0010 | AC 02 00 00 5C 07 E8 D0 40 80 21 19 68 68 1D 6D
-0020 | 1F DE 74 E0 B0 4F 71 6C B3 67 26 72 28 78 35 1C
-0030 | 62 90 B0 C8 9A C5 42 4A FE 50 02 00 70 FE 0D 16
-0040 | F2 3A 36 FD 82 B1 3F 67 00 FD CA 7D 0B 30 F9 76
-0050 | 71 B3 D4 92 79 66 0D 45 9F 40 6E A3 DF 4C CA 6C
-0060 | CB 2B 46 EF 18 1A C2 7A 28 41 01 D4 8B 64 EE 55
-0070 | F9 72 C5 58 33 2B 82 0E E0 01 13 F1 6B C1 1A 6B
-0080 | 14 75 A4 38 A7 3C B8 1E 8B 99 58 98 E6 30 7B 46
-0090 | A4 BB CC D1 EF 77 1D 40 03 61 13 F2 39 BF B8 37
-00A0 | 38 A9 00 94 4E A9 C9 F4 79 0D FA DD 71 43 F1 DF
-00B0 | 1C A7 77 89 E3 43 5D 7A 5B 28 A1 30 1E 11 CF CC
-00C0 | 2D 59 D1 79 13 2C DF C3 98 AB 31 19 7F DE F8 A0
-00D0 | E5 B0 38 7D 9F D5 64 38 EB 7A 5E 74 B9 89 F8 06
-00E0 | EC CB 14 B9 BC DD E1 A2 5F 7B 18 0D 0A B8 1A B3
-00F0 | 74 CB 06 61 B1 8E 7C 8A 14 06 D3 C9 6A 92 26 F4
-0100 | 91 06 18 48 7A 69 F5 AD FE EE 14 53 B2 7A 1D F9
-0110 | CB E1 62 81 45 1C 59 18 38 6F E7 93 44 9E B7 3E
-0120 | D7 DD FC 65 DB 6F F7 85 1B 2B 63 06 85 66 54 02
-0130 | 12 08 F2 90 D2 00 A9 F4 52 4B E5 48 71 63 0F 0D
-0140 | 4E 9E 23 87 A6 DB 01 5B 6B 82 65 31 82 29 64 4D
-0150 | BD F0 72 12 DA C2 0A 41 4E CE E3 2E C3 50 57 47
-0160 | C3 C8 62 8D B9 97 23 D3 BD FB D4 9B 0A BE 5C 85
-0170 | 84 30 9B 6A 8F 77 B8 7D 09 3B 3E 85 3C 7D 8A F5
-0180 | 89 6E B0 D1 AD F8 A2 19 1F AC 7F 92 51 F8 0E 2A
-0190 | 48 58 8B 4C 58 CE 9F 93 15 EE C6 34 C8 3C 0F 8D
-01A0 | A2 B3 02 3A 8C BA 91 C3 50 C6 1A 19 CC AB 32 FF
-01B0 | 85 70 55 C6 E0 DF 9B D3 99 A7 34 9A FF 20 C5 32
-01C0 | 20 B5 86 0E D5 76 70 C6 17 78 48 8F BC FD D1 14
-01D0 | 96 BD A6 95 3E A4 F5 0F 57 D1 BC 25 57 B2 07 A7
-01E0 | B9 E3 7D 3D 5B 20 03 99 28 A9 6D 07 17 36 32 0C
-01F0 | F0 D6 97 B2 00 50 D6 7A 96 87 F6 F8 03 94 9A 68
-0200 | 53 35 AF 1A E0 8F EC F3 FF C5 F3 53 77 C5 37 63
-0210 | C5 94 4A 3C 14 86 1D F2 43 7C 1B B1 3B D4 E1 86
-0220 | FF 1B CD C0 27 1F F1 58 A5 A4 F7 00 8A D4 DF D3
-0230 | AB 6E F1 FF 8D B0 40 20 1D B4 09 0C 5B D6 E9 AA
-0240 | 30 C5 6C ED 46 26 08 DA 6F 87 87 70 F2 B9 87 88
-0250 | 68 64 70 33 1E 8F 5D 1C A0 83 AA 2C 21 B4 09 18
-0260 | AB E8 3E 73 52 AA EE 46 57 D7 84 69 E9 36 6D 35
-0270 | 08 6E 07 DB 05 72 F4 67 66 9D 54 34 2A 17 C2 78
-0280 | E3 10 2D 99 0C 08 48 E2 41 29 41 1E
+0000 | 00 00 00 00 00 00 00 00 01 B8 EC 79 10 09 9E 66
+0010 | D4 02 00 00 5C 07 E8 D0 FE 7E E3 8C 9F B2 A0 E1
+0020 | 5D 1A BB 74 C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB
+0030 | BC DC 58 F8 8E 1E 3A E8 FE 50 02 00 84 40 93 D5
+0040 | 80 3E 05 63 86 D8 C8 9B 88 80 04 03 45 18 3F FB
+0050 | 82 DD 62 1D DA 6D 88 DA 41 A4 8D 86 E9 E3 AD F2
+0060 | 48 53 5B 80 4E 72 44 A0 71 33 47 6C 01 E1 B0 00
+0070 | CE C8 15 C5 F7 B8 8E 4D 0D 05 F6 C9 42 10 EA 34
+0080 | D5 FC 6A DD 2D B9 87 63 0A 01 84 86 7C 7D E2 C1
+0090 | EB 45 78 E5 91 F0 88 47 B8 C4 0F 82 85 D4 6C C2
+00A0 | 51 37 17 75 F3 79 28 96 55 9A BF 0C 8F 16 8C 4D
+00B0 | E1 D6 0B 4C AA A1 81 F8 2F ED DC 3C FB 6C BC 4A
+00C0 | 7D B1 2B F8 79 8C 10 2A 83 9E 9D C5 1E 6F 7F 97
+00D0 | 80 27 A3 B0 A2 47 68 5A 3C 0F 1D CB 12 CE 0D 29
+00E0 | 20 37 EA 78 C7 B1 50 F3 A6 FD 31 82 9D 10 EF 21
+00F0 | 22 4F 10 BE B9 A7 3D E7 2B 3B 87 E2 8E 47 78 EE
+0100 | D0 DA 4C 19 31 05 D4 36 C4 E6 FD 4A C1 60 8D 01
+0110 | CB D3 E7 E1 D7 8E 96 B9 D8 DC 3C 37 F1 2B 72 05
+0120 | 5F 88 DA 9B EA E2 26 BA 60 1D EC FE 20 D5 D9 72
+0130 | 2F E5 34 B8 45 74 5F BF A0 B2 AE 46 7F 9A 42 5A
+0140 | 6F CE 0A 4E 58 B9 AA 51 6A BC C6 8B 78 C6 4E 63
+0150 | 4C DE A3 53 21 C3 79 99 D4 74 DB 0B 38 02 57 5A
+0160 | 08 65 69 19 9E 14 27 B7 D9 F2 D6 D4 62 4C 48 83
+0170 | AC 6C 7F 37 F8 37 12 E2 3D F8 D5 67 F7 56 DC 00
+0180 | 2A 59 94 E6 65 7E 63 4F CD 0F B3 29 AD B2 89 54
+0190 | E5 CD EB C8 8B A8 10 19 A2 3C A9 2B 49 D1 39 2D
+01A0 | A1 6B D9 81 7F 27 47 87 03 F1 65 FD 8D 1D 07 7B
+01B0 | 8C 44 C9 25 AD 3A 11 95 2E A5 CC 20 F9 4B 2C C6
+01C0 | 4D B6 5B 11 EC DA 51 18 69 5F 8D FD E1 F4 CA B2
+01D0 | D4 4D 0E 57 07 89 D4 A1 FA E6 5C EB D4 57 3C A4
+01E0 | D5 5A 5C E9 9C E3 5D 3E 2F D5 CC 60 74 A2 D7 46
+01F0 | 65 69 7D D1 AB D8 9C 24 F0 39 2F 07 9E FB 4A A8
+0200 | AB 93 BE C6 CE 8A 7C 1A 94 D4 15 25 18 9F 9C DC
+0210 | 86 29 77 7A 8F C5 E2 A8 09 AC A8 01 F5 69 5A BC
+0220 | FC A4 2C BA F4 E7 78 63 46 74 9C B8 93 7A B5 F4
+0230 | 76 C7 F2 04 3C 8D F9 91 60 0F AB 01 CD A7 CC 4C
+0240 | 3B AA 38 A7 56 B4 15 B6 59 2A 47 E4 10 82 76 66
+0250 | 33 4C EF 01 F6 9F 68 15 24 9E 0E EA 4C DF D7 C7
+0260 | A3 E0 9C B4 C0 D3 16 96 A8 0D 52 78 7B E0 B6 47
+0270 | CC 71 69 12 26 55 B0 3F 72 BA A3 00 34 F8 12 62
+0280 | DA 9E 2F 53 1B DE FB 57 56 C3 21 8F
Payload (de)serialization:
server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;
@@ -464,13 +464,13 @@ random_padding_bytes = AD0C622C4B21B55F1940C5E07619EA37E6B0118545D4EA9FD389A5EA6
message_id |
8, 8 |
-01A4D829B73D9D66 |
+01B8EC7910099E66 |
Message ID generated as specified here » (unixtime() << 32) + (N*4) |
message_length |
16, 4 |
-AC020000 (684 in decimal) |
+D4020000 (724 in decimal) |
Message body length |
@@ -482,19 +482,19 @@ random_padding_bytes = AD0C622C4B21B55F1940C5E07619EA37E6B0118545D4EA9FD389A5EA6
nonce |
24, 16 |
-4080211968681D6D1FDE74E0B04F716C |
+FE7EE38C9FB2A0E15D1ABB74C2E133D2 |
Value generated by client in Step 1 |
server_nonce |
40, 16 |
-B36726722878351C6290B0C89AC5424A |
+B11B0686D343E5FBBCDC58F88E1E3AE8 |
Value received from server in Step 2 |
encrypted_answer |
56, 596 |
-FE50020070FE0D16F23A36FD82B13F67 00FDCA7D0B30F97671B3D49279660D45 9F406EA3DF4CCA6CCB2B46EF181AC27A 284101D48B64EE55F972C558332B820E E00113F16BC11A6B1475A438A73CB81E 8B995898E6307B46A4BBCCD1EF771D40 036113F239BFB83738A900944EA9C9F4 790DFADD7143F1DF1CA77789E3435D7A 5B28A1301E11CFCC2D59D179132CDFC3 98AB31197FDEF8A0E5B0387D9FD56438 EB7A5E74B989F806ECCB14B9BCDDE1A2 5F7B180D0AB81AB374CB0661B18E7C8A 1406D3C96A9226F4910618487A69F5AD FEEE1453B27A1DF9CBE16281451C5918 386FE793449EB73ED7DDFC65DB6FF785 1B2B6306856654021208F290D200A9F4 524BE54871630F0D4E9E2387A6DB015B 6B8265318229644DBDF07212DAC20A41 4ECEE32EC3505747C3C8628DB99723D3 BDFBD49B0ABE5C8584309B6A8F77B87D 093B3E853C7D8AF5896EB0D1ADF8A219 1FAC7F9251F80E2A48588B4C58CE9F93 15EEC634C83C0F8DA2B3023A8CBA91C3 50C61A19CCAB32FF857055C6E0DF9BD3 99A7349AFF20C53220B5860ED57670C6 1778488FBCFDD11496BDA6953EA4F50F 57D1BC2557B207A7B9E37D3D5B200399 28A96D071736320CF0D697B20050D67A 9687F6F803949A685335AF1AE08FECF3 FFC5F35377C53763C5944A3C14861DF2 437C1BB13BD4E186FF1BCDC0271FF158 A5A4F7008AD4DFD3AB6EF1FF8DB04020 1DB4090C5BD6E9AA30C56CED462608DA 6F878770F2B98788686470331E8F5D1C A083AA2C21B40918ABE83E7352AAEE46 57D78469E9366D35086E07DB0572F467 669D54342A17C278E3102D990C0848E2 4129411E |
+FE500200844093D5803E056386D8C89B 8880040345183FFB82DD621DDA6D88DA 41A48D86E9E3ADF248535B804E7244A0 7133476C01E1B000CEC815C5F7B88E4D 0D05F6C94210EA34D5FC6ADD2DB98763 0A0184867C7DE2C1EB4578E591F08847 B8C40F8285D46CC251371775F3792896 559ABF0C8F168C4DE1D60B4CAAA181F8 2FEDDC3CFB6CBC4A7DB12BF8798C102A 839E9DC51E6F7F978027A3B0A247685A 3C0F1DCB12CE0D292037EA78C7B150F3 A6FD31829D10EF21224F10BEB9A73DE7 2B3B87E28E4778EED0DA4C193105D436 C4E6FD4AC1608D01CBD3E7E1D78E96B9 D8DC3C37F12B72055F88DA9BEAE226BA 601DECFE20D5D9722FE534B845745FBF A0B2AE467F9A425A6FCE0A4E58B9AA51 6ABCC68B78C64E634CDEA35321C37999 D474DB0B3802575A086569199E1427B7 D9F2D6D4624C4883AC6C7F37F83712E2 3DF8D567F756DC002A5994E6657E634F CD0FB329ADB28954E5CDEBC88BA81019 A23CA92B49D1392DA16BD9817F274787 03F165FD8D1D077B8C44C925AD3A1195 2EA5CC20F94B2CC64DB65B11ECDA5118 695F8DFDE1F4CAB2D44D0E570789D4A1 FAE65CEBD4573CA4D55A5CE99CE35D3E 2FD5CC6074A2D74665697DD1ABD89C24 F0392F079EFB4AA8AB93BEC6CE8A7C1A 94D41525189F9CDC8629777A8FC5E2A8 09ACA801F5695ABCFCA42CBAF4E77863 46749CB8937AB5F476C7F2043C8DF991 600FAB01CDA7CC4C3BAA38A756B415B6 592A47E410827666334CEF01F69F6815 249E0EEA4CDFD7C7A3E09CB4C0D31696 A80D52787BE0B647CC7169122655B03F 72BAA30034F81262DA9E2F531BDEFB57 56C3218F |
See below |
@@ -502,20 +502,20 @@ random_padding_bytes = AD0C622C4B21B55F1940C5E07619EA37E6B0118545D4EA9FD389A5EA6
Decrypt encrypted_answer
using the reverse of the process specified in step 6:
-encrypted_answer = 70FE0D16F23A36FD82B13F6700FDCA7D0B30F97671B3D49279660D459F406EA3DF4CCA6CCB2B46EF181AC27A284101D48B64EE55F972C558332B820EE00113F16BC11A6B1475A438A73CB81E8B995898E6307B46A4BBCCD1EF771D40036113F239BFB83738A900944EA9C9F4790DFADD7143F1DF1CA77789E3435D7A5B28A1301E11CFCC2D59D179132CDFC398AB31197FDEF8A0E5B0387D9FD56438EB7A5E74B989F806ECCB14B9BCDDE1A25F7B180D0AB81AB374CB0661B18E7C8A1406D3C96A9226F4910618487A69F5ADFEEE1453B27A1DF9CBE16281451C5918386FE793449EB73ED7DDFC65DB6FF7851B2B6306856654021208F290D200A9F4524BE54871630F0D4E9E2387A6DB015B6B8265318229644DBDF07212DAC20A414ECEE32EC3505747C3C8628DB99723D3BDFBD49B0ABE5C8584309B6A8F77B87D093B3E853C7D8AF5896EB0D1ADF8A2191FAC7F9251F80E2A48588B4C58CE9F9315EEC634C83C0F8DA2B3023A8CBA91C350C61A19CCAB32FF857055C6E0DF9BD399A7349AFF20C53220B5860ED57670C61778488FBCFDD11496BDA6953EA4F50F57D1BC2557B207A7B9E37D3D5B20039928A96D071736320CF0D697B20050D67A9687F6F803949A685335AF1AE08FECF3FFC5F35377C53763C5944A3C14861DF2437C1BB13BD4E186FF1BCDC0271FF158A5A4F7008AD4DFD3AB6EF1FF8DB040201DB4090C5BD6E9AA30C56CED462608DA6F878770F2B98788686470331E8F5D1CA083AA2C21B40918ABE83E7352AAEE4657D78469E9366D35086E07DB0572F467669D54342A17C278E3102D990C0848E24129411E
-tmp_aes_key = B36D932E42F5E244DAA33A16E2BD3B22482D1AE60775B15BE6CA246AF4D24021
-tmp_aes_iv = 537E15CDCCCA06155D814EA3BD1EF74908A51D32AF9E6843F03E831182C1B9BB
+encrypted_answer = 844093D5803E056386D8C89B8880040345183FFB82DD621DDA6D88DA41A48D86E9E3ADF248535B804E7244A07133476C01E1B000CEC815C5F7B88E4D0D05F6C94210EA34D5FC6ADD2DB987630A0184867C7DE2C1EB4578E591F08847B8C40F8285D46CC251371775F3792896559ABF0C8F168C4DE1D60B4CAAA181F82FEDDC3CFB6CBC4A7DB12BF8798C102A839E9DC51E6F7F978027A3B0A247685A3C0F1DCB12CE0D292037EA78C7B150F3A6FD31829D10EF21224F10BEB9A73DE72B3B87E28E4778EED0DA4C193105D436C4E6FD4AC1608D01CBD3E7E1D78E96B9D8DC3C37F12B72055F88DA9BEAE226BA601DECFE20D5D9722FE534B845745FBFA0B2AE467F9A425A6FCE0A4E58B9AA516ABCC68B78C64E634CDEA35321C37999D474DB0B3802575A086569199E1427B7D9F2D6D4624C4883AC6C7F37F83712E23DF8D567F756DC002A5994E6657E634FCD0FB329ADB28954E5CDEBC88BA81019A23CA92B49D1392DA16BD9817F27478703F165FD8D1D077B8C44C925AD3A11952EA5CC20F94B2CC64DB65B11ECDA5118695F8DFDE1F4CAB2D44D0E570789D4A1FAE65CEBD4573CA4D55A5CE99CE35D3E2FD5CC6074A2D74665697DD1ABD89C24F0392F079EFB4AA8AB93BEC6CE8A7C1A94D41525189F9CDC8629777A8FC5E2A809ACA801F5695ABCFCA42CBAF4E7786346749CB8937AB5F476C7F2043C8DF991600FAB01CDA7CC4C3BAA38A756B415B6592A47E410827666334CEF01F69F6815249E0EEA4CDFD7C7A3E09CB4C0D31696A80D52787BE0B647CC7169122655B03F72BAA30034F81262DA9E2F531BDEFB5756C3218F
+tmp_aes_key = 3EA165C07C78DAE58DC98DCEEB5C450C0486C84A89912B7C61FC3DE69B22C462
+tmp_aes_iv = 26C2647D816DD787E49CD1779D8972657E8C20954468B1B623AF61492E2D4644
Yielding:
-answer_with_hash = B822E491A4576421382D9D810AC3A1D891FF6A02BA0D89B54080211968681D6D1FDE74E0B04F716CB36726722878351C6290B0C89AC5424A03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010090A3D58D4655046BE5C2C3E7758B039F6BED52EDC3EC8739FF95D69D33F3EDD091B8A1D96FC112ED3999D64ECB413217192BFDDA6F9882E22ACA4AE0621617DE17E99C4D168C822E779EB93DCBBA1A690036A13649A7C4666D93EF091BE707560C08687FCFC42653FB64250FFBBDAE04E385DA515FE857F32386EFD89438C04634E8EEF20966E9AC3216EB5C259E866F9265064F2025657B797918EE4279EDFD0CEA4773E6579585C3398AC360C06102AD88188DF99E678490A0BE81B51027E67BCCB8526B8CE9A042505B9920167E65A4F81D440DA8404181B727055D7CED1AF31933CF3DF2887939C1EDFF9CF4DF091A40B7CA9ECC51A3BDD00A14EA015AB9B73D9D6687AB7782D62EBD8E
-answer = BA0D89B54080211968681D6D1FDE74E0B04F716CB36726722878351C6290B0C89AC5424A03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010090A3D58D4655046BE5C2C3E7758B039F6BED52EDC3EC8739FF95D69D33F3EDD091B8A1D96FC112ED3999D64ECB413217192BFDDA6F9882E22ACA4AE0621617DE17E99C4D168C822E779EB93DCBBA1A690036A13649A7C4666D93EF091BE707560C08687FCFC42653FB64250FFBBDAE04E385DA515FE857F32386EFD89438C04634E8EEF20966E9AC3216EB5C259E866F9265064F2025657B797918EE4279EDFD0CEA4773E6579585C3398AC360C06102AD88188DF99E678490A0BE81B51027E67BCCB8526B8CE9A042505B9920167E65A4F81D440DA8404181B727055D7CED1AF31933CF3DF2887939C1EDFF9CF4DF091A40B7CA9ECC51A3BDD00A14EA015AB9B73D9D6687AB7782D62EBD8E
+answer_with_hash = 7735F1F3FCCAA9D818D6EA08ED253E7FB917F099BA0D89B5FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010046E70BFCC5BAE4B1679086DC059F413F9DD08E5CF0FA1A4983B4348D73304421E92F886B56DD9F94039383507A4F09B313647F2D425C07C3A2E27A5F48D06F26FC447A23613BB4E3D9727A7A708DA10AB432A3B840BAEBAECDA42C1E37EF15C6DB83144175D2683AF991642C0BE636C4F2E9E442FEA9C2CF5A73FAB7D0BDB15542AD7526A7380ED146B9BE36D37CA71EEE89CF3CEAF190BF2C60ED42670A8C2F330E8A2EDB3F6A066BF01C2C5C3C17AC294616E80C5DEC7DD7F5A615C01EFF233ABEFAC6D3D2DC04DB2BF72E36C2BF844C85BC74C5BDFB0F5841DC65F83AD060DF3A6941D80B05019D79FC73D761D342B172ABBD0283F56F1097B565A8AB7AD610099E66DCA7B3C9DC376E81
+answer = BA0D89B5FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010046E70BFCC5BAE4B1679086DC059F413F9DD08E5CF0FA1A4983B4348D73304421E92F886B56DD9F94039383507A4F09B313647F2D425C07C3A2E27A5F48D06F26FC447A23613BB4E3D9727A7A708DA10AB432A3B840BAEBAECDA42C1E37EF15C6DB83144175D2683AF991642C0BE636C4F2E9E442FEA9C2CF5A73FAB7D0BDB15542AD7526A7380ED146B9BE36D37CA71EEE89CF3CEAF190BF2C60ED42670A8C2F330E8A2EDB3F6A066BF01C2C5C3C17AC294616E80C5DEC7DD7F5A615C01EFF233ABEFAC6D3D2DC04DB2BF72E36C2BF844C85BC74C5BDFB0F5841DC65F83AD060DF3A6941D80B05019D79FC73D761D342B172ABBD0283F56F1097B565A8AB7AD610099E66DCA7B3C9DC376E81
Generated payload (excluding transport headers/trailers):
-0000 | BA 0D 89 B5 40 80 21 19 68 68 1D 6D 1F DE 74 E0
-0010 | B0 4F 71 6C B3 67 26 72 28 78 35 1C 62 90 B0 C8
-0020 | 9A C5 42 4A 03 00 00 00 FE 00 01 00 C7 1C AE B9
+0000 | BA 0D 89 B5 FE 7E E3 8C 9F B2 A0 E1 5D 1A BB 74
+0010 | C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB BC DC 58 F8
+0020 | 8E 1E 3A E8 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 = BA0D89B54080211968681D6D1FDE74E0B04F716CB36726722878351C6290B0C89AC5424
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 | 90 A3 D5 8D 46 55 04 6B E5 C2 C3 E7 75 8B 03 9F
-0140 | 6B ED 52 ED C3 EC 87 39 FF 95 D6 9D 33 F3 ED D0
-0150 | 91 B8 A1 D9 6F C1 12 ED 39 99 D6 4E CB 41 32 17
-0160 | 19 2B FD DA 6F 98 82 E2 2A CA 4A E0 62 16 17 DE
-0170 | 17 E9 9C 4D 16 8C 82 2E 77 9E B9 3D CB BA 1A 69
-0180 | 00 36 A1 36 49 A7 C4 66 6D 93 EF 09 1B E7 07 56
-0190 | 0C 08 68 7F CF C4 26 53 FB 64 25 0F FB BD AE 04
-01A0 | E3 85 DA 51 5F E8 57 F3 23 86 EF D8 94 38 C0 46
-01B0 | 34 E8 EE F2 09 66 E9 AC 32 16 EB 5C 25 9E 86 6F
-01C0 | 92 65 06 4F 20 25 65 7B 79 79 18 EE 42 79 ED FD
-01D0 | 0C EA 47 73 E6 57 95 85 C3 39 8A C3 60 C0 61 02
-01E0 | AD 88 18 8D F9 9E 67 84 90 A0 BE 81 B5 10 27 E6
-01F0 | 7B CC B8 52 6B 8C E9 A0 42 50 5B 99 20 16 7E 65
-0200 | A4 F8 1D 44 0D A8 40 41 81 B7 27 05 5D 7C ED 1A
-0210 | F3 19 33 CF 3D F2 88 79 39 C1 ED FF 9C F4 DF 09
-0220 | 1A 40 B7 CA 9E CC 51 A3 BD D0 0A 14 EA 01 5A B9
-0230 | B7 3D 9D 66
+0130 | 46 E7 0B FC C5 BA E4 B1 67 90 86 DC 05 9F 41 3F
+0140 | 9D D0 8E 5C F0 FA 1A 49 83 B4 34 8D 73 30 44 21
+0150 | E9 2F 88 6B 56 DD 9F 94 03 93 83 50 7A 4F 09 B3
+0160 | 13 64 7F 2D 42 5C 07 C3 A2 E2 7A 5F 48 D0 6F 26
+0170 | FC 44 7A 23 61 3B B4 E3 D9 72 7A 7A 70 8D A1 0A
+0180 | B4 32 A3 B8 40 BA EB AE CD A4 2C 1E 37 EF 15 C6
+0190 | DB 83 14 41 75 D2 68 3A F9 91 64 2C 0B E6 36 C4
+01A0 | F2 E9 E4 42 FE A9 C2 CF 5A 73 FA B7 D0 BD B1 55
+01B0 | 42 AD 75 26 A7 38 0E D1 46 B9 BE 36 D3 7C A7 1E
+01C0 | EE 89 CF 3C EA F1 90 BF 2C 60 ED 42 67 0A 8C 2F
+01D0 | 33 0E 8A 2E DB 3F 6A 06 6B F0 1C 2C 5C 3C 17 AC
+01E0 | 29 46 16 E8 0C 5D EC 7D D7 F5 A6 15 C0 1E FF 23
+01F0 | 3A BE FA C6 D3 D2 DC 04 DB 2B F7 2E 36 C2 BF 84
+0200 | 4C 85 BC 74 C5 BD FB 0F 58 41 DC 65 F8 3A D0 60
+0210 | DF 3A 69 41 D8 0B 05 01 9D 79 FC 73 D7 61 D3 42
+0220 | B1 72 AB BD 02 83 F5 6F 10 97 B5 65 A8 AB 7A D6
+0230 | 10 09 9E 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;
@@ -570,13 +570,13 @@ answer = BA0D89B54080211968681D6D1FDE74E0B04F716CB36726722878351C6290B0C89AC5424
nonce |
4, 16 |
-4080211968681D6D1FDE74E0B04F716C |
+FE7EE38C9FB2A0E15D1ABB74C2E133D2 |
Value generated by client in Step 1 |
server_nonce |
20, 16 |
-B36726722878351C6290B0C89AC5424A |
+B11B0686D343E5FBBCDC58F88E1E3AE8 |
Value received from server in Step 2 |
@@ -594,13 +594,13 @@ answer = BA0D89B54080211968681D6D1FDE74E0B04F716CB36726722878351C6290B0C89AC5424
g_a |
300, 260 |
-FE00010090A3D58D4655046BE5C2C3E7 758B039F6BED52EDC3EC8739FF95D69D 33F3EDD091B8A1D96FC112ED3999D64E CB413217192BFDDA6F9882E22ACA4AE0 621617DE17E99C4D168C822E779EB93D CBBA1A690036A13649A7C4666D93EF09 1BE707560C08687FCFC42653FB64250F FBBDAE04E385DA515FE857F32386EFD8 9438C04634E8EEF20966E9AC3216EB5C 259E866F9265064F2025657B797918EE 4279EDFD0CEA4773E6579585C3398AC3 60C06102AD88188DF99E678490A0BE81 B51027E67BCCB8526B8CE9A042505B99 20167E65A4F81D440DA8404181B72705 5D7CED1AF31933CF3DF2887939C1EDFF 9CF4DF091A40B7CA9ECC51A3BDD00A14 EA015AB9 |
+FE00010046E70BFCC5BAE4B1679086DC 059F413F9DD08E5CF0FA1A4983B4348D 73304421E92F886B56DD9F9403938350 7A4F09B313647F2D425C07C3A2E27A5F 48D06F26FC447A23613BB4E3D9727A7A 708DA10AB432A3B840BAEBAECDA42C1E 37EF15C6DB83144175D2683AF991642C 0BE636C4F2E9E442FEA9C2CF5A73FAB7 D0BDB15542AD7526A7380ED146B9BE36 D37CA71EEE89CF3CEAF190BF2C60ED42 670A8C2F330E8A2EDB3F6A066BF01C2C 5C3C17AC294616E80C5DEC7DD7F5A615 C01EFF233ABEFAC6D3D2DC04DB2BF72E 36C2BF844C85BC74C5BDFB0F5841DC65 F83AD060DF3A6941D80B05019D79FC73 D761D342B172ABBD0283F56F1097B565 A8AB7AD6 |
g_a diffie-hellman parameter |
server_time |
560, 4 |
-B73D9D66 (1721580983 in decimal) |
+10099E66 (1721633040 in decimal) |
Server time |
@@ -609,34 +609,34 @@ answer = BA0D89B54080211968681D6D1FDE74E0B04F716CB36726722878351C6290B0C89AC5424
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 = 92A04574AB3B69E15EB541CB070985EC83012B66E74A4243B6495A4E4F954D7622D41E971AC9E16A99DEF44D77A2A32711BF948206DE2C6C261AB05373D3791AEFB544D609F510ED17821ABBB462059D5F859B47B022F53E36D943A97E03F1FE34302781A6230FDBFE6483AE0E01D269530954412A7DFD49695C2FFD0D2D09D0A15F306D6510E64D04E29034569D6EDE2AB1A21A14167307B4780E3BA9B5EB9D7D829A4153177E74F83666F88F7B8E6E744A01C6345BB53234882D441FE06115286036400C90F3AC0E4D2501C03BCA62A29220DB3510FE2AA0D2D8DFE4CEE2A0C45AFBC9F46037F0FFA7C1AFD9E2D83EF41E543AB077B4033111F1F3D59FDE63
+b = F88FE91EE7603AD761249BA53321D1F06CA7165D5B1356B848B8455C10F77523B3612E2030E82483C2C3AD1749751F67CF8CE5C4CF31CECB085B378660B4F3B495EB8130451A7E0F502643542AD5CF81A142A88E6AD4DA0553FAB0E92C88DDB8FF8D857CA1085C097502CF5B302C0BF972025FC3AA16BD727AA1960D99EEBC34CE36D915BA9CEFF39C979FF5DE214C9AC2DBA788B68796B406CBDCD34F15F0CA7A8D5C3BA480F818AC9D443AA0CBE1012E2CAA99369861ADFB2B117D01B091EBE08EBABAF704EECD97FBC4B64FC0A371D6A821148E8C6E62E34ADC5FDFF9998D32A0914F29635EE83E639273368EA59CC90140A52D55324B4DD092715CF23438
Then compute g_b = pow(g, b) mod dh_prime
-g_b = 0DF78FB9EBC8FE4EB147AEFD5F27896EC8E69C442C505BE2B6B5903735D6E7CC6E767D358A2E1FFA93C2B5D23C68B116205E86BD6862B9CED8D2499F053B33CCCA81AE287C8869D8EDB388E585643331E014A64FC203E851147F40F6C42E518DB1D783A60CDB1B29ECEEBBD3D03313D2AE20A80E6C566C65F18BA014655204F35C6539E82DDBB01322704CB6893C1BA51ADDAB6759D612B81171F2BFF8B959678EE1D33CFB73DFBC9B7ADEB11A6D562BDAE46DBB4F7A7DCE845B733FDF1AA62C3FEF99D29457AFE95AAA3E8270D230AD5946E8211821C21B6D2A88E373811A0017F2F08CFBB04D0DC3BE18BEE80C80661FC37FFE05962CDA14D6CD3A1547495B
+g_b = 570CD13FAE7E98F38DC9F976653674A6B9D88176BFB9DDA0A044A7B6D297640AA7EC2338DA3C7934FA7615BC92E9B11F691B753327B06D245398D59C0581BEDE54D1164CE22C20626380C3BE23A9E117A347A81C6D60DFD86FEFD3FC9DF00F15D62F15A6809B6A616411A8AC950C2470ABF61FE7D5812209003D821DFD8FB75E2D90491EFD374511366C5ADF51EFB9E95148C8D0027B9D803B3471B6D9D53E7CEC3502C5D2896BB4D255C96DF2215F296E131E1EEC7EC4A12431ED6DB95097FE36BFA720CD9340866C437A312A5E8FE2BE14B7FDDB37F5891887BB054FCBC59774E805DEDA23F0DC8D17C763626922369F3646021A9A85123EB40DAE5B912465
7.1) generation of encrypted_data
Generated payload (excluding transport headers/trailers):
-0000 | 54 B6 43 66 40 80 21 19 68 68 1D 6D 1F DE 74 E0
-0010 | B0 4F 71 6C B3 67 26 72 28 78 35 1C 62 90 B0 C8
-0020 | 9A C5 42 4A 00 00 00 00 00 00 00 00 FE 00 01 00
-0030 | 0D F7 8F B9 EB C8 FE 4E B1 47 AE FD 5F 27 89 6E
-0040 | C8 E6 9C 44 2C 50 5B E2 B6 B5 90 37 35 D6 E7 CC
-0050 | 6E 76 7D 35 8A 2E 1F FA 93 C2 B5 D2 3C 68 B1 16
-0060 | 20 5E 86 BD 68 62 B9 CE D8 D2 49 9F 05 3B 33 CC
-0070 | CA 81 AE 28 7C 88 69 D8 ED B3 88 E5 85 64 33 31
-0080 | E0 14 A6 4F C2 03 E8 51 14 7F 40 F6 C4 2E 51 8D
-0090 | B1 D7 83 A6 0C DB 1B 29 EC EE BB D3 D0 33 13 D2
-00A0 | AE 20 A8 0E 6C 56 6C 65 F1 8B A0 14 65 52 04 F3
-00B0 | 5C 65 39 E8 2D DB B0 13 22 70 4C B6 89 3C 1B A5
-00C0 | 1A DD AB 67 59 D6 12 B8 11 71 F2 BF F8 B9 59 67
-00D0 | 8E E1 D3 3C FB 73 DF BC 9B 7A DE B1 1A 6D 56 2B
-00E0 | DA E4 6D BB 4F 7A 7D CE 84 5B 73 3F DF 1A A6 2C
-00F0 | 3F EF 99 D2 94 57 AF E9 5A AA 3E 82 70 D2 30 AD
-0100 | 59 46 E8 21 18 21 C2 1B 6D 2A 88 E3 73 81 1A 00
-0110 | 17 F2 F0 8C FB B0 4D 0D C3 BE 18 BE E8 0C 80 66
-0120 | 1F C3 7F FE 05 96 2C DA 14 D6 CD 3A 15 47 49 5B
+0000 | 54 B6 43 66 FE 7E E3 8C 9F B2 A0 E1 5D 1A BB 74
+0010 | C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB BC DC 58 F8
+0020 | 8E 1E 3A E8 00 00 00 00 00 00 00 00 FE 00 01 00
+0030 | 57 0C D1 3F AE 7E 98 F3 8D C9 F9 76 65 36 74 A6
+0040 | B9 D8 81 76 BF B9 DD A0 A0 44 A7 B6 D2 97 64 0A
+0050 | A7 EC 23 38 DA 3C 79 34 FA 76 15 BC 92 E9 B1 1F
+0060 | 69 1B 75 33 27 B0 6D 24 53 98 D5 9C 05 81 BE DE
+0070 | 54 D1 16 4C E2 2C 20 62 63 80 C3 BE 23 A9 E1 17
+0080 | A3 47 A8 1C 6D 60 DF D8 6F EF D3 FC 9D F0 0F 15
+0090 | D6 2F 15 A6 80 9B 6A 61 64 11 A8 AC 95 0C 24 70
+00A0 | AB F6 1F E7 D5 81 22 09 00 3D 82 1D FD 8F B7 5E
+00B0 | 2D 90 49 1E FD 37 45 11 36 6C 5A DF 51 EF B9 E9
+00C0 | 51 48 C8 D0 02 7B 9D 80 3B 34 71 B6 D9 D5 3E 7C
+00D0 | EC 35 02 C5 D2 89 6B B4 D2 55 C9 6D F2 21 5F 29
+00E0 | 6E 13 1E 1E EC 7E C4 A1 24 31 ED 6D B9 50 97 FE
+00F0 | 36 BF A7 20 CD 93 40 86 6C 43 7A 31 2A 5E 8F E2
+0100 | BE 14 B7 FD DB 37 F5 89 18 87 BB 05 4F CB C5 97
+0110 | 74 E8 05 DE DA 23 F0 DC 8D 17 C7 63 62 69 22 36
+0120 | 9F 36 46 02 1A 9A 85 12 3E B4 0D AE 5B 91 24 65
Payload (de)serialization:
client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;
@@ -658,19 +658,19 @@ answer = BA0D89B54080211968681D6D1FDE74E0B04F716CB36726722878351C6290B0C89AC5424
nonce |
4, 16 |
-4080211968681D6D1FDE74E0B04F716C |
+FE7EE38C9FB2A0E15D1ABB74C2E133D2 |
Value generated by client in Step 1 |
server_nonce |
20, 16 |
-B36726722878351C6290B0C89AC5424A |
+B11B0686D343E5FBBCDC58F88E1E3AE8 |
Value received from server in Step 2 |
g_b |
36, 260 |
-FE0001000DF78FB9EBC8FE4EB147AEFD 5F27896EC8E69C442C505BE2B6B59037 35D6E7CC6E767D358A2E1FFA93C2B5D2 3C68B116205E86BD6862B9CED8D2499F 053B33CCCA81AE287C8869D8EDB388E5 85643331E014A64FC203E851147F40F6 C42E518DB1D783A60CDB1B29ECEEBBD3 D03313D2AE20A80E6C566C65F18BA014 655204F35C6539E82DDBB01322704CB6 893C1BA51ADDAB6759D612B81171F2BF F8B959678EE1D33CFB73DFBC9B7ADEB1 1A6D562BDAE46DBB4F7A7DCE845B733F DF1AA62C3FEF99D29457AFE95AAA3E82 70D230AD5946E8211821C21B6D2A88E3 73811A0017F2F08CFBB04D0DC3BE18BE E80C80661FC37FFE05962CDA14D6CD3A 1547495B |
+FE000100570CD13FAE7E98F38DC9F976 653674A6B9D88176BFB9DDA0A044A7B6 D297640AA7EC2338DA3C7934FA7615BC 92E9B11F691B753327B06D245398D59C 0581BEDE54D1164CE22C20626380C3BE 23A9E117A347A81C6D60DFD86FEFD3FC 9DF00F15D62F15A6809B6A616411A8AC 950C2470ABF61FE7D5812209003D821D FD8FB75E2D90491EFD374511366C5ADF 51EFB9E95148C8D0027B9D803B3471B6 D9D53E7CEC3502C5D2896BB4D255C96D F2215F296E131E1EEC7EC4A12431ED6D B95097FE36BFA720CD9340866C437A31 2A5E8FE2BE14B7FDDB37F5891887BB05 4FCBC59774E805DEDA23F0DC8D17C763 626922369F3646021A9A85123EB40DAE 5B912465 |
Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding |
@@ -684,47 +684,47 @@ answer = BA0D89B54080211968681D6D1FDE74E0B04F716CB36726722878351C6290B0C89AC5424
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 = 54B643664080211968681D6D1FDE74E0B04F716CB36726722878351C6290B0C89AC5424A0000000000000000FE0001000DF78FB9EBC8FE4EB147AEFD5F27896EC8E69C442C505BE2B6B5903735D6E7CC6E767D358A2E1FFA93C2B5D23C68B116205E86BD6862B9CED8D2499F053B33CCCA81AE287C8869D8EDB388E585643331E014A64FC203E851147F40F6C42E518DB1D783A60CDB1B29ECEEBBD3D03313D2AE20A80E6C566C65F18BA014655204F35C6539E82DDBB01322704CB6893C1BA51ADDAB6759D612B81171F2BFF8B959678EE1D33CFB73DFBC9B7ADEB11A6D562BDAE46DBB4F7A7DCE845B733FDF1AA62C3FEF99D29457AFE95AAA3E8270D230AD5946E8211821C21B6D2A88E373811A0017F2F08CFBB04D0DC3BE18BEE80C80661FC37FFE05962CDA14D6CD3A1547495B
-padding = A83123E23232A1AA7936200A
-tmp_aes_key = B36D932E42F5E244DAA33A16E2BD3B22482D1AE60775B15BE6CA246AF4D24021
-tmp_aes_iv = 537E15CDCCCA06155D814EA3BD1EF74908A51D32AF9E6843F03E831182C1B9BB
+data = 54B64366FE7EE38C9FB2A0E15D1ABB74C2E133D2B11B0686D343E5FBBCDC58F88E1E3AE80000000000000000FE000100570CD13FAE7E98F38DC9F976653674A6B9D88176BFB9DDA0A044A7B6D297640AA7EC2338DA3C7934FA7615BC92E9B11F691B753327B06D245398D59C0581BEDE54D1164CE22C20626380C3BE23A9E117A347A81C6D60DFD86FEFD3FC9DF00F15D62F15A6809B6A616411A8AC950C2470ABF61FE7D5812209003D821DFD8FB75E2D90491EFD374511366C5ADF51EFB9E95148C8D0027B9D803B3471B6D9D53E7CEC3502C5D2896BB4D255C96DF2215F296E131E1EEC7EC4A12431ED6DB95097FE36BFA720CD9340866C437A312A5E8FE2BE14B7FDDB37F5891887BB054FCBC59774E805DEDA23F0DC8D17C763626922369F3646021A9A85123EB40DAE5B912465
+padding = 93A82B4F98CCB78C36ECC67C
+tmp_aes_key = 3EA165C07C78DAE58DC98DCEEB5C450C0486C84A89912B7C61FC3DE69B22C462
+tmp_aes_iv = 26C2647D816DD787E49CD1779D8972657E8C20954468B1B623AF61492E2D4644
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 = C55D1DA12CA2083457C3193E67A146D3FD4BD67938CB1322F12CAEB1D91E68676E6FC929D3CA4AAE470218F9FBD5268BD8AF21DF05A512D07FB052D4A84E78376F0B8A305E1937082919ABE129A05271337FCEE4EAEB4AA52EAEEBA3FC4907DFEBD8B4904E8D990269DEFEC569FED4283975A340AFDD9F0BEB8BADD4B058765AFAEFCBFA25D630570FB02EC1453CDB98DC5D4A534691DF1C1279187E1F199E4CDE7AC61D94CAD1A2CDADB934800E1538594B4A5FCC77010533D672C6FCEF274D909E80BC78D1C559AEA84710572A732882DCCAE9CCCA79EE3238899D3228D7A56E68D47085C74586C05EA0388216F126A479542551E7DB80E604212B797106D6D50B4E35F818F53638DAE2249B0B9A2794270604ADC8AB9CBD3C9AF939A75D698BE69281E1854F858EC9F38E89841E53F185888F843D9D71549526231AD5A4F4C664F48397388816DB8A1FF6D9FF2B41
+encrypted_data = 0FADE83C081F2D935766DBFA33666AEF249C17339F5AE8BC952D2FD58765672E2DAE53C6885DF337B19B023CEB3BA974905EE6293D85E5061DB24DF7F8DB5A2FE7EF5CD8459AFA74C2CE1D53348073EF99F5FBCD08E3E963FB037D18832C34A0AFBE5C90E420CED585D883DD3538C93C11CB8110560964FE12C51696DDBCBD18A469FBA72B42D57CFA54F6E50D6EC476AF328E70A6213C49A9566A946845E6627EB360EBA89F1AF20E4704792A033DC09C5DDC94070B04D031BE8149A4B720AFC13868DF13144FA299882422DA45EF6B0AC7B09338CFDD4B656D27CBD20AE301D4D160233EB69A9AD6A19F2854C3E5BE0D4AC635FA1CD15540440E9B8A3CBD8E8B3A602057197E78038E988BB0671694E778F531750A5A5DE5BEF31AAB97CAD542048E2C940A1F146F1B6BF030500B6AB67A87B89F57B207A2F6B0053C6ADD8E0AD1728E5DC80280AEFACD9FC7323F2B
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 8C 72 0C 00 B7 3D 9D 66
-0010 | 78 01 00 00 1F 5F 04 F5 40 80 21 19 68 68 1D 6D
-0020 | 1F DE 74 E0 B0 4F 71 6C B3 67 26 72 28 78 35 1C
-0030 | 62 90 B0 C8 9A C5 42 4A FE 50 01 00 C5 5D 1D A1
-0040 | 2C A2 08 34 57 C3 19 3E 67 A1 46 D3 FD 4B D6 79
-0050 | 38 CB 13 22 F1 2C AE B1 D9 1E 68 67 6E 6F C9 29
-0060 | D3 CA 4A AE 47 02 18 F9 FB D5 26 8B D8 AF 21 DF
-0070 | 05 A5 12 D0 7F B0 52 D4 A8 4E 78 37 6F 0B 8A 30
-0080 | 5E 19 37 08 29 19 AB E1 29 A0 52 71 33 7F CE E4
-0090 | EA EB 4A A5 2E AE EB A3 FC 49 07 DF EB D8 B4 90
-00A0 | 4E 8D 99 02 69 DE FE C5 69 FE D4 28 39 75 A3 40
-00B0 | AF DD 9F 0B EB 8B AD D4 B0 58 76 5A FA EF CB FA
-00C0 | 25 D6 30 57 0F B0 2E C1 45 3C DB 98 DC 5D 4A 53
-00D0 | 46 91 DF 1C 12 79 18 7E 1F 19 9E 4C DE 7A C6 1D
-00E0 | 94 CA D1 A2 CD AD B9 34 80 0E 15 38 59 4B 4A 5F
-00F0 | CC 77 01 05 33 D6 72 C6 FC EF 27 4D 90 9E 80 BC
-0100 | 78 D1 C5 59 AE A8 47 10 57 2A 73 28 82 DC CA E9
-0110 | CC CA 79 EE 32 38 89 9D 32 28 D7 A5 6E 68 D4 70
-0120 | 85 C7 45 86 C0 5E A0 38 82 16 F1 26 A4 79 54 25
-0130 | 51 E7 DB 80 E6 04 21 2B 79 71 06 D6 D5 0B 4E 35
-0140 | F8 18 F5 36 38 DA E2 24 9B 0B 9A 27 94 27 06 04
-0150 | AD C8 AB 9C BD 3C 9A F9 39 A7 5D 69 8B E6 92 81
-0160 | E1 85 4F 85 8E C9 F3 8E 89 84 1E 53 F1 85 88 8F
-0170 | 84 3D 9D 71 54 95 26 23 1A D5 A4 F4 C6 64 F4 83
-0180 | 97 38 88 16 DB 8A 1F F6 D9 FF 2B 41
+0000 | 00 00 00 00 00 00 00 00 40 0F 05 00 11 09 9E 66
+0010 | 78 01 00 00 1F 5F 04 F5 FE 7E E3 8C 9F B2 A0 E1
+0020 | 5D 1A BB 74 C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB
+0030 | BC DC 58 F8 8E 1E 3A E8 FE 50 01 00 0F AD E8 3C
+0040 | 08 1F 2D 93 57 66 DB FA 33 66 6A EF 24 9C 17 33
+0050 | 9F 5A E8 BC 95 2D 2F D5 87 65 67 2E 2D AE 53 C6
+0060 | 88 5D F3 37 B1 9B 02 3C EB 3B A9 74 90 5E E6 29
+0070 | 3D 85 E5 06 1D B2 4D F7 F8 DB 5A 2F E7 EF 5C D8
+0080 | 45 9A FA 74 C2 CE 1D 53 34 80 73 EF 99 F5 FB CD
+0090 | 08 E3 E9 63 FB 03 7D 18 83 2C 34 A0 AF BE 5C 90
+00A0 | E4 20 CE D5 85 D8 83 DD 35 38 C9 3C 11 CB 81 10
+00B0 | 56 09 64 FE 12 C5 16 96 DD BC BD 18 A4 69 FB A7
+00C0 | 2B 42 D5 7C FA 54 F6 E5 0D 6E C4 76 AF 32 8E 70
+00D0 | A6 21 3C 49 A9 56 6A 94 68 45 E6 62 7E B3 60 EB
+00E0 | A8 9F 1A F2 0E 47 04 79 2A 03 3D C0 9C 5D DC 94
+00F0 | 07 0B 04 D0 31 BE 81 49 A4 B7 20 AF C1 38 68 DF
+0100 | 13 14 4F A2 99 88 24 22 DA 45 EF 6B 0A C7 B0 93
+0110 | 38 CF DD 4B 65 6D 27 CB D2 0A E3 01 D4 D1 60 23
+0120 | 3E B6 9A 9A D6 A1 9F 28 54 C3 E5 BE 0D 4A C6 35
+0130 | FA 1C D1 55 40 44 0E 9B 8A 3C BD 8E 8B 3A 60 20
+0140 | 57 19 7E 78 03 8E 98 8B B0 67 16 94 E7 78 F5 31
+0150 | 75 0A 5A 5D E5 BE F3 1A AB 97 CA D5 42 04 8E 2C
+0160 | 94 0A 1F 14 6F 1B 6B F0 30 50 0B 6A B6 7A 87 B8
+0170 | 9F 57 B2 07 A2 F6 B0 05 3C 6A DD 8E 0A D1 72 8E
+0180 | 5D C8 02 80 AE FA CD 9F C7 32 3F 2B
Payload (de)serialization:
set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;
@@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
message_id |
8, 8 |
-8C720C00B73D9D66 |
+400F050011099E66 |
Message ID generated as specified here » (unixtime() << 32) + (N*4) |
@@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
nonce |
24, 16 |
-4080211968681D6D1FDE74E0B04F716C |
+FE7EE38C9FB2A0E15D1ABB74C2E133D2 |
Value generated by client in Step 1 |
server_nonce |
40, 16 |
-B36726722878351C6290B0C89AC5424A |
+B11B0686D343E5FBBCDC58F88E1E3AE8 |
Value received from server in Step 2 |
encrypted_data |
56, 340 |
-FE500100C55D1DA12CA2083457C3193E 67A146D3FD4BD67938CB1322F12CAEB1 D91E68676E6FC929D3CA4AAE470218F9 FBD5268BD8AF21DF05A512D07FB052D4 A84E78376F0B8A305E1937082919ABE1 29A05271337FCEE4EAEB4AA52EAEEBA3 FC4907DFEBD8B4904E8D990269DEFEC5 69FED4283975A340AFDD9F0BEB8BADD4 B058765AFAEFCBFA25D630570FB02EC1 453CDB98DC5D4A534691DF1C1279187E 1F199E4CDE7AC61D94CAD1A2CDADB934 800E1538594B4A5FCC77010533D672C6 FCEF274D909E80BC78D1C559AEA84710 572A732882DCCAE9CCCA79EE3238899D 3228D7A56E68D47085C74586C05EA038 8216F126A479542551E7DB80E604212B 797106D6D50B4E35F818F53638DAE224 9B0B9A2794270604ADC8AB9CBD3C9AF9 39A75D698BE69281E1854F858EC9F38E 89841E53F185888F843D9D7154952623 1AD5A4F4C664F48397388816DB8A1FF6 D9FF2B41 |
+FE5001000FADE83C081F2D935766DBFA 33666AEF249C17339F5AE8BC952D2FD5 8765672E2DAE53C6885DF337B19B023C EB3BA974905EE6293D85E5061DB24DF7 F8DB5A2FE7EF5CD8459AFA74C2CE1D53 348073EF99F5FBCD08E3E963FB037D18 832C34A0AFBE5C90E420CED585D883DD 3538C93C11CB8110560964FE12C51696 DDBCBD18A469FBA72B42D57CFA54F6E5 0D6EC476AF328E70A6213C49A9566A94 6845E6627EB360EBA89F1AF20E470479 2A033DC09C5DDC94070B04D031BE8149 A4B720AFC13868DF13144FA299882422 DA45EF6B0AC7B09338CFDD4B656D27CB D20AE301D4D160233EB69A9AD6A19F28 54C3E5BE0D4AC635FA1CD15540440E9B 8A3CBD8E8B3A602057197E78038E988B B0671694E778F531750A5A5DE5BEF31A AB97CAD542048E2C940A1F146F1B6BF0 30500B6AB67A87B89F57B207A2F6B005 3C6ADD8E0AD1728E5DC80280AEFACD9F C7323F2B |
Encrypted client_DH_inner_data generated previously, serialized as a TL byte string |
@@ -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 = 765D837CCE3CE170B79A8DA86BE1EC90AC363D4B810DC597668AC02769B9FC4A13856E1E9E40C1E3D33883360A3CB7592D32598776E3365E334611B35E3C6EACC7D4AAC7C2F84C6D3A10EAC8FA3459F10E331EF9032700307A6AAFD0C2EB7FC5D035C9E0502DA4373FC6D0B409465421B84EAE427ACBF98980C46B90A6F69A2D7F927A7C5EBE71EE96D89F0E7945FC301716A7418882803AEEA508DF4DDF0E4698D076219018CD9702378E69117A510AA493B81F65A66AFB8DF25E8EF1438A6FA0856385018FF89D4D888993E0CF661256C3C7F21D200F23B86D82D4EB05597F67B70CD7E8C6C1D32BFBFDB80CF13359E37AD61B2DE109588685B7B342F23572
+auth_key = 47021B73ADFFD25A3A726B4A56A8A17908D109EC0FB09A3D953460A20A9B53D6B0C3372C293DCCA0C1BBB73A3A7B00262AC3C662269CC10B85142B32A73CF9D35130A28D9839AF7A5FE159CB569F8EB41D8D101AD98A704086F5CF389DC351ED1A12A1D339F0E65955B085FE20444CDD41F9304EC13869AAA53313124079DFD5FBC72C0CF410982D8717B85D7A3709B4754F9D93BFCD125AF08331AE3980E46E0DC181BB65C533FFE79D80B2FA33406549BED2EEF887ABF034D6606271B7C508DE6E72F9F800A326FCC44192476FC6F8ACE5BC27D7B0D3FBEC3D3BF7E606B688246AD3490CB19376416DEC17DC6FEEAF732266229F6E098FF35921652F87C31C
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 4C EE E9 B7 3D 9D 66
-0010 | 94 00 00 00 34 F7 CB 3B 40 80 21 19 68 68 1D 6D
-0020 | 1F DE 74 E0 B0 4F 71 6C B3 67 26 72 28 78 35 1C
-0030 | 62 90 B0 C8 9A C5 42 4A 99 6C 72 3F 1F EB 67 06
-0040 | 05 EE 31 AA 99 DB 40 FE
+0000 | 00 00 00 00 00 00 00 00 01 30 B9 9E 11 09 9E 66
+0010 | 88 00 00 00 34 F7 CB 3B FE 7E E3 8C 9F B2 A0 E1
+0020 | 5D 1A BB 74 C2 E1 33 D2 B1 1B 06 86 D3 43 E5 FB
+0030 | BC DC 58 F8 8E 1E 3A E8 40 89 8F 25 3A 28 2A 6C
+0040 | 52 F2 6E 65 CB CA 59 DC
Payload (de)serialization:
dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;
@@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
message_id |
8, 8 |
-014CEEE9B73D9D66 |
+0130B99E11099E66 |
Message ID generated as specified here » (unixtime() << 32) + (N*4) |
message_length |
16, 4 |
-94000000 (148 in decimal) |
+88000000 (136 in decimal) |
Message body length |
@@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
nonce |
24, 16 |
-4080211968681D6D1FDE74E0B04F716C |
+FE7EE38C9FB2A0E15D1ABB74C2E133D2 |
Value generated by client in Step 1 |
server_nonce |
40, 16 |
-B36726722878351C6290B0C89AC5424A |
+B11B0686D343E5FBBCDC58F88E1E3AE8 |
Value received from server in Step 2 |
new_nonce_hash1 |
56, 16 |
-996C723F1FEB670605EE31AA99DB40FE |
+40898F253A282A6C52F26E65CBCA59DC |
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. |