From 3beb66c8e627eb2d1ccea8b58dc191df061ea073 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 23 Nov 2023 20:22:16 +0000 Subject: [PATCH] Update content of files --- .../api/end-to-end/seq_no.html | 1 + .../method/auth.requestFirebaseSms.html | 1 - .../mtproto/samples-auth_key.html | 412 +++++++++--------- 3 files changed, 207 insertions(+), 207 deletions(-) diff --git a/data/web/corefork.telegram.org/api/end-to-end/seq_no.html b/data/web/corefork.telegram.org/api/end-to-end/seq_no.html index e126499845..9550516587 100644 --- a/data/web/corefork.telegram.org/api/end-to-end/seq_no.html +++ b/data/web/corefork.telegram.org/api/end-to-end/seq_no.html @@ -47,6 +47,7 @@ + diff --git a/data/web/corefork.telegram.org/method/auth.requestFirebaseSms.html b/data/web/corefork.telegram.org/method/auth.requestFirebaseSms.html index 7ffb0589fe..14e050d31c 100644 --- a/data/web/corefork.telegram.org/method/auth.requestFirebaseSms.html +++ b/data/web/corefork.telegram.org/method/auth.requestFirebaseSms.html @@ -115,7 +115,6 @@
  in_seq_no out_seq_no
-

Bots can use this method

Related pages

auth.sendCode

Send the verification code for login

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 f7428443c7..c7c2872661 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 50 CF 0A 00 AA A9 5F 65
-0010 | 14 00 00 00 F1 8E 7E BE 7A 44 83 F4 E1 2D 9C 01
-0020 | 2A 39 CC C1 09 20 BD C3
+
0000 | 00 00 00 00 00 00 00 00 BC 20 0A 00 54 B3 5F 65
+0010 | 14 00 00 00 F1 8E 7E BE D3 C7 6C F7 7D 76 D6 35
+0020 | 46 A4 97 C0 42 3D FC 7C

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 34 C2 5E AA A9 5F 65
-0010 | 7C 00 00 00 63 24 16 05 7A 44 83 F4 E1 2D 9C 01
-0020 | 2A 39 CC C1 09 20 BD C3 94 D9 D0 DA D2 40 80 02
-0030 | 4B 00 1A 91 59 09 1D E9 08 19 0E BA FD 22 12 34
-0040 | 19 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 9C 77 FF 54 B3 5F 65
+0010 | 60 00 00 00 63 24 16 05 D3 C7 6C F7 7D 76 D6 35
+0020 | 46 A4 97 C0 42 3D FC 7C 50 9F E3 CA 67 09 F9 B8
+0030 | 73 01 F3 45 D6 43 08 4B 08 1E 27 F3 4F A8 42 ED
+0040 | 61 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 = 1805586096983258137
-

Decompose into 2 prime cofactors p < q: 1805586096983258137 = 1335192181 * 1352304277

-
p = 1335192181
-q = 1352304277
+
pq = 2172972868680478049
+

Decompose into 2 prime cofactors p < q: 2172972868680478049 = 1263580933 * 1719694253

+
p = 1263580933
+q = 1719694253

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 19 0E BA FD 22 12 34 19 00 00 00
-0010 | 04 4F 95 6A 75 00 00 00 04 50 9A 86 95 00 00 00
-0020 | 7A 44 83 F4 E1 2D 9C 01 2A 39 CC C1 09 20 BD C3
-0030 | 94 D9 D0 DA D2 40 80 02 4B 00 1A 91 59 09 1D E9
-0040 | A1 5B FB 1E 08 C5 1E 20 42 B9 86 9F 23 CE 17 B8
-0050 | 20 E0 9B 84 D4 26 1C 41 89 F2 A9 91 D3 C7 77 AB
+
0000 | 95 5F F5 A9 08 1E 27 F3 4F A8 42 ED 61 00 00 00
+0010 | 04 4B 50 B7 05 00 00 00 04 66 80 73 AD 00 00 00
+0020 | D3 C7 6C F7 7D 76 D6 35 46 A4 97 C0 42 3D FC 7C
+0030 | 50 9F E3 CA 67 09 F9 B8 73 01 F3 45 D6 43 08 4B
+0040 | 26 DA C4 84 89 FD E6 FD D0 4F F0 95 2D 9F 30 64
+0050 | 47 CA 81 E3 4C 32 B0 21 6C A8 EC B1 BA F7 8D 82
 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 = 1352304277
- + - + - + - + - + - + @@ -291,39 +291,39 @@ q = 1352304277

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 = 955FF5A908190EBAFD22123419000000044F956A7500000004509A86950000007A4483F4E12D9C012A39CCC10920BDC394D9D0DAD24080024B001A9159091DE9A15BFB1E08C51E2042B9869F23CE17B820E09B84D4261C4189F2A991D3C777AB02000000
-random_padding_bytes = 14ABE224D91B4219DF309EEAD010344A1DF5B86DB379750530408D6712A5505A98A290362161A8342A389CAF7E0D3BFDF49D37A95E7B0F65C31A8DE9437948D64EAED939814469DE85F039E61F6E09BAFB429643C8AC8999DF1C58FE
+
data = 955FF5A9081E27F34FA842ED61000000044B50B70500000004668073AD000000D3C76CF77D76D63546A497C0423DFC7C509FE3CA6709F9B87301F345D643084B26DAC48489FDE6FDD04FF0952D9F306447CA81E34C32B0216CA8ECB1BAF78D8202000000
+random_padding_bytes = C1C01D642E4BC7F519FC61A4D33B649C753B77441903A159E7E7EA6B65972F0E092E4B71D0689C50BD2FA87485E2CD451B3C842C973EDB59900D21B2BB18CD2B37860F2C95227911149221EC686679AFA76CD30695B46EF2039E235E

And this is the output:

-
encrypted_data = 4C82E1FEED63DA610FE2BCAC65776CFCF60AA179AE04CD39B58115AB9B7D65C8D764559A5CE95D770FDB3F59BED8F998FE5A8F73AC9EB337F998CCA260E0B0CBE3410A013720307CEE38D9CADAD1C2E134F1AF7BBE3F97E049CD4F32E9A86597F71913236A5FD9F379AFEBFBB515CDD96206BE2B6EC9392F3F7CF7AAE09CAF82FFBF24A80F76C59C17D37428032233ECC54A5C3BE9009A44FC4BE484CD976DE235B488232FD570DAAF5363A134DA52CFE869D6D8F1730F148B3AFDC3649515002027B4A6AF07FC7F0A31BD01B1D115AC2DD25E9F8009449DE0401C0DF1BB9FE8DB545B42B035F5999021FF4AED3B0718762FE9CC577134FBF548AA162AC2B042
+
encrypted_data = B29490390AC9CF440758BDF18319C0CAD5EA6787E13C6342C7BA88B80190F41A11CE3C61BD62D5735202D04A92E061B846D421D0FF16B64B8E67F96851C702C3705979818282141E009241CC0DA2FEAA75FBAEC812C4F61221D746D6AE9C70A208EC49C8B52EA105FF390FC2D7A4758670B02E20D3D34770B8470E9EAB0D989B187642E4A1700CEEF87AD519AAE7B5E8D0AE660953128F254B180701EB0F50C809D1537DD7399439A0B4A1005243DC79A3C6ECFF336C4A7275655F0DF0AB582B819E5FBC4ADFEB6D77769F55C90095ADB2509E31853876953E543A0B52D6B86135A6102718BF8567CA1EB814C35DF13EC2F5151A5618CC4B17622B7862127870

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

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, 850CF0A00AAA95F65BC200A0054B35F65 Message ID generated as specified here » (unixtime() << 32) + (N*4)
nonce 24, 167A4483F4E12D9C012A39CCC10920BDC3D3C76CF77D76D63546A497C0423DFC7C Random number
message_id 8, 80134C25EAAA95F65019C77FF54B35F65 Message ID generated as specified here » (unixtime() << 32) + (N*4)
message_length 16, 47C000000 (124 in decimal)60000000 (96 in decimal) Message body length
nonce 24, 167A4483F4E12D9C012A39CCC10920BDC3D3C76CF77D76D63546A497C0423DFC7C Value generated by client in Step 1
server_nonce 40, 1694D9D0DAD24080024B001A9159091DE9509FE3CA6709F9B87301F345D643084B Server-generated random number
pq 56, 1208190EBAFD22123419000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1805586096983258137
081E27F34FA842ED61000000
TL byte deserialization
=> bigendian conversion to decimal
=> 2172972868680478049
Single-byte prefix denoting length, an 8-byte string, and three bytes of padding
pq 4, 1208190EBAFD22123419000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1805586096983258137
081E27F34FA842ED61000000
TL byte deserialization
=> bigendian conversion to decimal
=> 2172972868680478049
Single-byte prefix denoting length, 8-byte string, and three bytes of padding
p 16, 8044F956A75000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1335192181
044B50B705000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1263580933
First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
q 24, 804509A8695000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1352304277
04668073AD000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1719694253
Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
nonce 32, 167A4483F4E12D9C012A39CCC10920BDC3D3C76CF77D76D63546A497C0423DFC7C Value generated by client in Step 1
server_nonce 48, 1694D9D0DAD24080024B001A9159091DE9509FE3CA6709F9B87301F345D643084B Value received from server in Step 2
new_nonce 64, 32A15BFB1E08C51E2042B9869F23CE17B8 20E09B84D4261C4189F2A991D3C777AB26DAC48489FDE6FDD04FF0952D9F3064 47CA81E34C32B0216CA8ECB1BAF78D82 Client-generated random number
@@ -345,7 +345,7 @@ random_padding_bytes = 14ABE224D91B4219DF309EEAD010344A1DF5B86DB379750530408D671 - + @@ -363,25 +363,25 @@ random_padding_bytes = 14ABE224D91B4219DF309EEAD010344A1DF5B86DB379750530408D671 - + - + - + - + @@ -393,7 +393,7 @@ random_padding_bytes = 14ABE224D91B4219DF309EEAD010344A1DF5B86DB379750530408D671 - + @@ -402,47 +402,47 @@ random_padding_bytes = 14ABE224D91B4219DF309EEAD010344A1DF5B86DB379750530408D671
6) Server responds with:

Received payload (excluding transport headers/trailers):

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

Payload (de)serialization:

server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;
message_id 8, 854CF0A00AAA95F657CE5010055B35F65 Message ID generated as specified here » (unixtime() << 32) + (N*4)
nonce 24, 167A4483F4E12D9C012A39CCC10920BDC3D3C76CF77D76D63546A497C0423DFC7C Value generated by client in Step 1
server_nonce 40, 1694D9D0DAD24080024B001A9159091DE9509FE3CA6709F9B87301F345D643084B Value received from server in Step 2
p 56, 8044F956A75000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1335192181
044B50B705000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1263580933
First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
q 64, 804509A8695000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1352304277
04668073AD000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1719694253
Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
encrypted_data 80, 260FE0001004C82E1FEED63DA610FE2BCAC 65776CFCF60AA179AE04CD39B58115AB 9B7D65C8D764559A5CE95D770FDB3F59 BED8F998FE5A8F73AC9EB337F998CCA2 60E0B0CBE3410A013720307CEE38D9CA DAD1C2E134F1AF7BBE3F97E049CD4F32 E9A86597F71913236A5FD9F379AFEBFB B515CDD96206BE2B6EC9392F3F7CF7AA E09CAF82FFBF24A80F76C59C17D37428 032233ECC54A5C3BE9009A44FC4BE484 CD976DE235B488232FD570DAAF5363A1 34DA52CFE869D6D8F1730F148B3AFDC3 649515002027B4A6AF07FC7F0A31BD01 B1D115AC2DD25E9F8009449DE0401C0D F1BB9FE8DB545B42B035F5999021FF4A ED3B0718762FE9CC577134FBF548AA16
2AC2B042
FE000100B29490390AC9CF440758BDF1 8319C0CAD5EA6787E13C6342C7BA88B8 0190F41A11CE3C61BD62D5735202D04A 92E061B846D421D0FF16B64B8E67F968 51C702C3705979818282141E009241CC 0DA2FEAA75FBAEC812C4F61221D746D6 AE9C70A208EC49C8B52EA105FF390FC2 D7A4758670B02E20D3D34770B8470E9E AB0D989B187642E4A1700CEEF87AD519 AAE7B5E8D0AE660953128F254B180701 EB0F50C809D1537DD7399439A0B4A100 5243DC79A3C6ECFF336C4A7275655F0D F0AB582B819E5FBC4ADFEB6D77769F55 C90095ADB2509E31853876953E543A0B 52D6B86135A6102718BF8567CA1EB814 C35DF13EC2F5151A5618CC4B17622B78
62127870
Value generated above
@@ -464,13 +464,13 @@ random_padding_bytes = 14ABE224D91B4219DF309EEAD010344A1DF5B86DB379750530408D671 - + - + @@ -482,19 +482,19 @@ random_padding_bytes = 14ABE224D91B4219DF309EEAD010344A1DF5B86DB379750530408D671 - + - + - + @@ -502,20 +502,20 @@ random_padding_bytes = 14ABE224D91B4219DF309EEAD010344A1DF5B86DB379750530408D671

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

-
encrypted_answer = 736A8A7D7A91D4880857CF9DAC618ADC53BDCA2B7D74764597011B982ED8F1F844319DE0E9F63C4727D12EFEF6C6EA5A124B474B4C7844E46817EFBE1E11461DE192A3DC03DC9A71D8253A7D44DF20B11C123E3DB8CB4376915FC547939428456771AFA5DE7EE44600547E58BDA4FEF590F34C33C698CD81E48222E8E42335FE16BFC976F3A6FB2BD01EF6DC6EE31466F438EEBB5EC115F965D819AFAD11E414A1D44A14344636B23E7E9725F2754834AE1351B730AD67475A7C52390E7B8E959BD78D75E34DA3DAC10FD4F2661BAAFFCF9DDD0453EF6AE9F979EEB849CF92CB39A50D6B3A30EB933C4A5ED211AE6D43D9FCEC634B7B9F20D360E1FE4FB53E76686C693F27AA9C465174B5EA92D2FBBC478D5AC3D4B8639B7162D243C991117C66E3C9AB3C08C27288DE0CCFE2F4D9B12EF1C764148576D35FD3CEA85456DDA0B3688301CBC36595BC5E4342B6AB96915C3B5CE10D9AE3A83216D13AA6FB0DDC98BE0DFB997D7DAC0A1CE758079B8146C7326A646796373AC817A58D4F6A23F7C05F630D36EF870D616F23A0A429F1C3A559C6E08F3477FB4B63C73848A2BEF1ED2F52CEAF9C5508B10712EE04D90488EE363B2B7F53E07795B4E958E6AA72F62F390A688AA0CF0E0412D46AB7E7EB83CA01D6038B1938221C4CB2869F587C36E75FD4F9DBB11680AB83FB4AFB7090B1A65F5AAA137C607F478E26A0F978F10799CCFC0C5EBA8C4491506D6472D24F9E27F91C01C87CAF902469159C7CED71B4B8AE6C8B62EC53B76093DAF1FC8AC88EA7E979A2E20C1FC219DD0CB5A5B61A390BF136E41B0015FCE3C0CB24E8659F55
-tmp_aes_key = 675641CF483005F1A58B6741C0D8550A8336A7072783138A41AD9980FC09FDE7
-tmp_aes_iv = 13465E12C0B0DC4CDA3685C09D2FDB128B40AAEA53CBDF1356F420FCA15BFB1E
+
encrypted_answer = 66D381F4675B7D308F41FB244EDB3689A8340447DB35BD190FB2E28AD3B0F6734AC8099D7DDBDA11AEE7CAFD5BAC7C3ACF7DBF4BE4443B822CE7046767AE39222F0B79021E7C4590CA22A94875B4930587F75A2F7786DA916E825977F84729AA8E0D1ACD94ABE7C3CBF213808F362E34832D4EBDEC44B239C245106410BF91CBD5DBB1A8C1D8B9D7DD4CD426B4B9F98693A4DD562F323C3F95CAD816884392361379552EA93EAEFAFA2AFB37C03A6F7C737DDFD09E601438897EBA18C7B73E98D9DB3152BA4443604C93C78474D3EA77610FCCB542AB099837D7AAAD63C2A4E08D05A2A85D9A31B9E2D4BB0ADE6271181B26F800626584426BB4E714C179DE8EC1B706C4C47A43DC2B6E29E8DD91D696FF05021C211175A49FA140EFBE10BF743E9CE258EC49C6198EF950B11A1B7CF2DDC5A49540AF6E3840109BE1FDF9554186B59ED37BE70FFB73AD88455BEEC8C26EE87E9F0CA7939E99491FAE134AB1451E1EC14ADA9727BC401335AC82FB5FAE55B80926F111D61E9D2A38045A91FC46BD85EACC65B6A0E2C2B4AAAFBEAA79DEF4FE10ECCF3E454039F88AB59BFAA6135C28B42D249D78FBEBD41E637DD38927A5EF81CF2795E2C13A75679CDB77C6F247743DC94DE74D9483449D8063FF24E91B803FA46263A7D1900DFEA98856403A9E9C76E91A003423184DEC1D117837936C29D9B7336CC4F76D42E029485CE42FA2F023D30133C2484FCCF78DFC069B5A41022F7E2E2EB6D60DF8F6B23464023AA6949C392D974AA960E178F6044931F032EBF8C0B53B01D450726FEDE55564066EFFB2B1F82731DA90B8DC44F973E6BD
+tmp_aes_key = 3D27FBABF48F4AB792754710A5F63B0421105B1FCB1D6700FE2160586C3D6A5D
+tmp_aes_iv = 5E37276CE40077CFCD38F6235E1BB0D2CAB73E21A6E0BF08892BABEF26DAC484

Yielding:

-
answer_with_hash = F16156B11DBD6B8DD84A429E1BDCA04013B42CCEBA0D89B57A4483F4E12D9C012A39CCC10920BDC394D9D0DAD24080024B001A9159091DE903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001008C5C61AEBFFEBCFC1B46DA700574D4F9A46DD6A948E371C33FF555957C74FC04CCF78D94D962FF95E5A122DCAA060C03090E396460F608563CCE93A5C7CEB4AF9ED27C765084FDFD6881DE65C2EED350A0FEBEC40FE6F393EA3F912C5F61583436DF7C04CEBAC6C1BE5987596FCE1B1C8D68DA1F127E7D1CD713EE7D85B398540B571DD911C9830A33F6EDF8FD43200A87E661EA203279997485FAFE07520D6F4F40DFA7F9A0A619E0547E7548A3FD887BF49C485921F19276A18B08A9DB16B2B68B040331391BC5C64C58304EFEECCE8386E39CED5F97948D1CC3D7F53C2E65EC7F763FDD3718925B33BAE6BCE00583F234FAB7BBBC4C3FE660108B5A42730CABA95F65A9D4078A53F16A8D
-answer = BA0D89B57A4483F4E12D9C012A39CCC10920BDC394D9D0DAD24080024B001A9159091DE903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001008C5C61AEBFFEBCFC1B46DA700574D4F9A46DD6A948E371C33FF555957C74FC04CCF78D94D962FF95E5A122DCAA060C03090E396460F608563CCE93A5C7CEB4AF9ED27C765084FDFD6881DE65C2EED350A0FEBEC40FE6F393EA3F912C5F61583436DF7C04CEBAC6C1BE5987596FCE1B1C8D68DA1F127E7D1CD713EE7D85B398540B571DD911C9830A33F6EDF8FD43200A87E661EA203279997485FAFE07520D6F4F40DFA7F9A0A619E0547E7548A3FD887BF49C485921F19276A18B08A9DB16B2B68B040331391BC5C64C58304EFEECCE8386E39CED5F97948D1CC3D7F53C2E65EC7F763FDD3718925B33BAE6BCE00583F234FAB7BBBC4C3FE660108B5A42730CABA95F65A9D4078A53F16A8D
+
answer_with_hash = 393A87194DCC3E35882E5BBE97CC9743826BA9B2BA0D89B5D3C76CF77D76D63546A497C0423DFC7C509FE3CA6709F9B87301F345D643084B03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010006BF9BE57AB3FCF8F17D7D2F1136B62F73C4F918232B2A70D51EF194146111BB0C1B6C9EB8F01C304E96C12A2A23D30F02BBB6DB7431C2AF2111BAFB0BBF9A0F46315AA01F74691F1D6EC8126EF761DC18DE5CA3361489C5352E7FD57AA2978B65AC5EC7E1BD95D495B84F72DC88963C62C28AD871AB995CBA2F51F94E6AD7EF8721ABC5F1AE86EFE6AE9B584963FDFDAFB24F87A5780C6A0A5B2273C10C54B93F98E68219D01A8B58709943760C72F9B0C38528193613F55F2E08D8E1637A3EBA10EF58880E45584EDCD557CADDF1755AC695C14711AA5C0E76EDDC15E20D05463FF14D89EF2F4EA531E3B22F86DBD3B7FE893CD9A1A1DA8B712703E06925E555B35F658FF4853C209201EA
+answer = BA0D89B5D3C76CF77D76D63546A497C0423DFC7C509FE3CA6709F9B87301F345D643084B03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010006BF9BE57AB3FCF8F17D7D2F1136B62F73C4F918232B2A70D51EF194146111BB0C1B6C9EB8F01C304E96C12A2A23D30F02BBB6DB7431C2AF2111BAFB0BBF9A0F46315AA01F74691F1D6EC8126EF761DC18DE5CA3361489C5352E7FD57AA2978B65AC5EC7E1BD95D495B84F72DC88963C62C28AD871AB995CBA2F51F94E6AD7EF8721ABC5F1AE86EFE6AE9B584963FDFDAFB24F87A5780C6A0A5B2273C10C54B93F98E68219D01A8B58709943760C72F9B0C38528193613F55F2E08D8E1637A3EBA10EF58880E45584EDCD557CADDF1755AC695C14711AA5C0E76EDDC15E20D05463FF14D89EF2F4EA531E3B22F86DBD3B7FE893CD9A1A1DA8B712703E06925E555B35F658FF4853C209201EA

Generated payload (excluding transport headers/trailers):

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

Payload (de)serialization:

server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;
message_id 8, 8017C901CABA95F6501149FB855B35F65 Message ID generated as specified here » (unixtime() << 32) + (N*4)
message_length 16, 4A8020000 (680 in decimal)E0020000 (736 in decimal) Message body length
nonce 24, 167A4483F4E12D9C012A39CCC10920BDC3D3C76CF77D76D63546A497C0423DFC7C Value generated by client in Step 1
server_nonce 40, 1694D9D0DAD24080024B001A9159091DE9509FE3CA6709F9B87301F345D643084B Value received from server in Step 2
encrypted_answer 56, 596FE500200736A8A7D7A91D4880857CF9D AC618ADC53BDCA2B7D74764597011B98 2ED8F1F844319DE0E9F63C4727D12EFE F6C6EA5A124B474B4C7844E46817EFBE 1E11461DE192A3DC03DC9A71D8253A7D 44DF20B11C123E3DB8CB4376915FC547 939428456771AFA5DE7EE44600547E58 BDA4FEF590F34C33C698CD81E48222E8 E42335FE16BFC976F3A6FB2BD01EF6DC 6EE31466F438EEBB5EC115F965D819AF AD11E414A1D44A14344636B23E7E9725 F2754834AE1351B730AD67475A7C5239 0E7B8E959BD78D75E34DA3DAC10FD4F2 661BAAFFCF9DDD0453EF6AE9F979EEB8 49CF92CB39A50D6B3A30EB933C4A5ED2 11AE6D43D9FCEC634B7B9F20D360E1FE 4FB53E76686C693F27AA9C465174B5EA 92D2FBBC478D5AC3D4B8639B7162D243 C991117C66E3C9AB3C08C27288DE0CCF E2F4D9B12EF1C764148576D35FD3CEA8 5456DDA0B3688301CBC36595BC5E4342 B6AB96915C3B5CE10D9AE3A83216D13A A6FB0DDC98BE0DFB997D7DAC0A1CE758 079B8146C7326A646796373AC817A58D 4F6A23F7C05F630D36EF870D616F23A0 A429F1C3A559C6E08F3477FB4B63C738 48A2BEF1ED2F52CEAF9C5508B10712EE 04D90488EE363B2B7F53E07795B4E958 E6AA72F62F390A688AA0CF0E0412D46A B7E7EB83CA01D6038B1938221C4CB286 9F587C36E75FD4F9DBB11680AB83FB4A FB7090B1A65F5AAA137C607F478E26A0 F978F10799CCFC0C5EBA8C4491506D64 72D24F9E27F91C01C87CAF902469159C 7CED71B4B8AE6C8B62EC53B76093DAF1 FC8AC88EA7E979A2E20C1FC219DD0CB5 A5B61A390BF136E41B0015FCE3C0CB24
E8659F55
FE50020066D381F4675B7D308F41FB24 4EDB3689A8340447DB35BD190FB2E28A D3B0F6734AC8099D7DDBDA11AEE7CAFD 5BAC7C3ACF7DBF4BE4443B822CE70467 67AE39222F0B79021E7C4590CA22A948 75B4930587F75A2F7786DA916E825977 F84729AA8E0D1ACD94ABE7C3CBF21380 8F362E34832D4EBDEC44B239C2451064 10BF91CBD5DBB1A8C1D8B9D7DD4CD426 B4B9F98693A4DD562F323C3F95CAD816 884392361379552EA93EAEFAFA2AFB37 C03A6F7C737DDFD09E601438897EBA18 C7B73E98D9DB3152BA4443604C93C784 74D3EA77610FCCB542AB099837D7AAAD 63C2A4E08D05A2A85D9A31B9E2D4BB0A DE6271181B26F800626584426BB4E714 C179DE8EC1B706C4C47A43DC2B6E29E8 DD91D696FF05021C211175A49FA140EF BE10BF743E9CE258EC49C6198EF950B1 1A1B7CF2DDC5A49540AF6E3840109BE1 FDF9554186B59ED37BE70FFB73AD8845 5BEEC8C26EE87E9F0CA7939E99491FAE 134AB1451E1EC14ADA9727BC401335AC 82FB5FAE55B80926F111D61E9D2A3804 5A91FC46BD85EACC65B6A0E2C2B4AAAF BEAA79DEF4FE10ECCF3E454039F88AB5 9BFAA6135C28B42D249D78FBEBD41E63 7DD38927A5EF81CF2795E2C13A75679C DB77C6F247743DC94DE74D9483449D80 63FF24E91B803FA46263A7D1900DFEA9 8856403A9E9C76E91A003423184DEC1D 117837936C29D9B7336CC4F76D42E029 485CE42FA2F023D30133C2484FCCF78D FC069B5A41022F7E2E2EB6D60DF8F6B2 3464023AA6949C392D974AA960E178F6 044931F032EBF8C0B53B01D450726FED E55564066EFFB2B1F82731DA90B8DC44
F973E6BD
See below
@@ -570,13 +570,13 @@ answer = BA0D89B57A4483F4E12D9C012A39CCC10920BDC394D9D0DAD24080024B001A9159091DE - + - + @@ -594,13 +594,13 @@ answer = BA0D89B57A4483F4E12D9C012A39CCC10920BDC394D9D0DAD24080024B001A9159091DE - + - + @@ -609,34 +609,34 @@ answer = BA0D89B57A4483F4E12D9C012A39CCC10920BDC394D9D0DAD24080024B001A9159091DE
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 = 13B66234DA363C82F3B76128DC878D77E8CBECFA1B39540E5C6028CBEF140B5280EEFCB0F1EBD195D4491F70324334DE50A0F2D27CF72A4BB3EFDC3D5C9404B0E90BBC7BA95905D344A7CECD3F621AB97B63F05E20685137FF83D4521E507B78B04F8D1C6DDADB563CA99B7CBF6980701D5570578B7E96B0A754C8FCBD60DE79CEF53CD8E9C5FE70AA0C55BC0384E9CE982AABF5F1896F599483EB701088A8E6A702B85DBE785C5A2860BC27579AE0CA009D1093A8E7FFF9269E724A208C213347B68D11EE65FDCE8B262F601BFCAB8D7162DDFEBFD5F43B6738E222D5CADB4A51E444506A16087A6DBE9DE1F06A55976F3B63FB4E75E494E94724B6628DF86D
+
b = 64E2EF26A39DA1D134BFD62C4881C6600ABA06E681E481A21F6B9ECF59885EA9CBB9C82A124933495F18B5F74CA2CC395B9B52E81A2FCDEDB443EE445389587A87C2EED8B7D7A8028B8AB9578B0D11EBBC06AA404C3FCAA52EB20DA6DCF51415BC6C3010B2F03A968EADFFF7B51D4C52A21DA1A0A51B06372CAB3DBC72FD8707805F74FAB2E46A35CA38509312C7082C86470A72140C5221C19E99037B600243D8D84263EDB3096538788B74E9F447F4A4D1AF085B9F2AC39A4DF10D33D49663B6A02A66126D51801ABB27ED7421C78C2D6D23DA6530880F25BD752165B270F0CEEB4585B4DCE75B804E6928170D859C86460AC79320F3AD0E969FA9AC2694C7

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

-
g_b = 76E7C32846DD187CA7917E86BBC3D83D61B1764BF6E1FF101420D41B17E64EFF529060E59F81BD13B39EA3F9A809F8AA091F209D8A056FD9D787FD9A1064E9FC646F327E77F40E3B27B589CAA0301E4B7C845AE17D77FE5B4ECD691B9B8D7AA74D9B83EEEC566146E58AF109623ED90F41EE7932F72FF5846BDBA9F56C798EA68AD987208A5140B3B29F550C88779C987EF9CCEE70E13772039844E312AB17D3CA3362080C49C16FC0D21DB2D450CE674E108075005E85EFD631072966E0929EFDAEFBFDEC54C4ECC2F02F83FDBF206B3169D3A26BA4D556DD320B5DFCB799D2F4360ADC7943B0FE8DB6781D447CAC4D31AD4F08288B18D5FDE78CAE43E6A62D
+
g_b = 0101CD28945B9502B625E4B28EA75DE1E14906A131FBD5413560FE6EC87BEC6D633F1FF697108453542960A63EB30AE509DC57243D31585A7C17C5E399617701894EA6F8480A3102883D3CBA6C64B8C1A0278E70E3DB04B1F194B19115D3228C2EA6D913654E5E94B4238CF1E280D272920B001BC42DF938ADF07C190D6E8FECD564A28628F33F351245AB6A43F4A39CA1B47C1053C5D4A18B33B6EBC1E1698876A14E65C1963C277F4FCF8EEEA64A8BC97A725142EF37B8948B738494461443248699DC4F9FDFD0A8744D49AF7C42840DB9381F5D09DA3628EA002AEB7F32EBAF4FD275E7C6F8F99A37FA69FA321B30AF1AA988ABC5D9DFFCF97F221FD9172A
7.1) generation of encrypted_data

Generated payload (excluding transport headers/trailers):

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

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, 167A4483F4E12D9C012A39CCC10920BDC3D3C76CF77D76D63546A497C0423DFC7C Value generated by client in Step 1
server_nonce 20, 1694D9D0DAD24080024B001A9159091DE9509FE3CA6709F9B87301F345D643084B Value received from server in Step 2
g_a 300, 260FE0001008C5C61AEBFFEBCFC1B46DA70 0574D4F9A46DD6A948E371C33FF55595 7C74FC04CCF78D94D962FF95E5A122DC AA060C03090E396460F608563CCE93A5 C7CEB4AF9ED27C765084FDFD6881DE65 C2EED350A0FEBEC40FE6F393EA3F912C 5F61583436DF7C04CEBAC6C1BE598759 6FCE1B1C8D68DA1F127E7D1CD713EE7D 85B398540B571DD911C9830A33F6EDF8 FD43200A87E661EA203279997485FAFE 07520D6F4F40DFA7F9A0A619E0547E75 48A3FD887BF49C485921F19276A18B08 A9DB16B2B68B040331391BC5C64C5830 4EFEECCE8386E39CED5F97948D1CC3D7 F53C2E65EC7F763FDD3718925B33BAE6 BCE00583F234FAB7BBBC4C3FE660108B
5A42730C
FE00010006BF9BE57AB3FCF8F17D7D2F 1136B62F73C4F918232B2A70D51EF194 146111BB0C1B6C9EB8F01C304E96C12A 2A23D30F02BBB6DB7431C2AF2111BAFB 0BBF9A0F46315AA01F74691F1D6EC812 6EF761DC18DE5CA3361489C5352E7FD5 7AA2978B65AC5EC7E1BD95D495B84F72 DC88963C62C28AD871AB995CBA2F51F9 4E6AD7EF8721ABC5F1AE86EFE6AE9B58 4963FDFDAFB24F87A5780C6A0A5B2273 C10C54B93F98E68219D01A8B58709943 760C72F9B0C38528193613F55F2E08D8 E1637A3EBA10EF58880E45584EDCD557 CADDF1755AC695C14711AA5C0E76EDDC 15E20D05463FF14D89EF2F4EA531E3B2 2F86DBD3B7FE893CD9A1A1DA8B712703
E06925E5
g_a diffie-hellman parameter
server_time 560, 4ABA95F65 (1700768171 in decimal)55B35F65 (1700770645 in decimal) Server time
@@ -658,19 +658,19 @@ answer = BA0D89B57A4483F4E12D9C012A39CCC10920BDC394D9D0DAD24080024B001A9159091DE - + - + - + @@ -684,47 +684,47 @@ answer = BA0D89B57A4483F4E12D9C012A39CCC10920BDC394D9D0DAD24080024B001A9159091DE

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 = 54B643667A4483F4E12D9C012A39CCC10920BDC394D9D0DAD24080024B001A9159091DE90000000000000000FE00010076E7C32846DD187CA7917E86BBC3D83D61B1764BF6E1FF101420D41B17E64EFF529060E59F81BD13B39EA3F9A809F8AA091F209D8A056FD9D787FD9A1064E9FC646F327E77F40E3B27B589CAA0301E4B7C845AE17D77FE5B4ECD691B9B8D7AA74D9B83EEEC566146E58AF109623ED90F41EE7932F72FF5846BDBA9F56C798EA68AD987208A5140B3B29F550C88779C987EF9CCEE70E13772039844E312AB17D3CA3362080C49C16FC0D21DB2D450CE674E108075005E85EFD631072966E0929EFDAEFBFDEC54C4ECC2F02F83FDBF206B3169D3A26BA4D556DD320B5DFCB799D2F4360ADC7943B0FE8DB6781D447CAC4D31AD4F08288B18D5FDE78CAE43E6A62D
-padding = AE24319859262BF27E60384F
-tmp_aes_key = 675641CF483005F1A58B6741C0D8550A8336A7072783138A41AD9980FC09FDE7
-tmp_aes_iv = 13465E12C0B0DC4CDA3685C09D2FDB128B40AAEA53CBDF1356F420FCA15BFB1E
+
data = 54B64366D3C76CF77D76D63546A497C0423DFC7C509FE3CA6709F9B87301F345D643084B0000000000000000FE0001000101CD28945B9502B625E4B28EA75DE1E14906A131FBD5413560FE6EC87BEC6D633F1FF697108453542960A63EB30AE509DC57243D31585A7C17C5E399617701894EA6F8480A3102883D3CBA6C64B8C1A0278E70E3DB04B1F194B19115D3228C2EA6D913654E5E94B4238CF1E280D272920B001BC42DF938ADF07C190D6E8FECD564A28628F33F351245AB6A43F4A39CA1B47C1053C5D4A18B33B6EBC1E1698876A14E65C1963C277F4FCF8EEEA64A8BC97A725142EF37B8948B738494461443248699DC4F9FDFD0A8744D49AF7C42840DB9381F5D09DA3628EA002AEB7F32EBAF4FD275E7C6F8F99A37FA69FA321B30AF1AA988ABC5D9DFFCF97F221FD9172A
+padding = 53EE4FD5B53345A7C4414441
+tmp_aes_key = 3D27FBABF48F4AB792754710A5F63B0421105B1FCB1D6700FE2160586C3D6A5D
+tmp_aes_iv = 5E37276CE40077CFCD38F6235E1BB0D2CAB73E21A6E0BF08892BABEF26DAC484

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 = 9C62CA0C1111B634A8B405F217977B8AB414DBEF6A9C4C0CCAAE191FA11A08298465BE7CDF811B378EED574ED65E41A7C8FC50D1FC80A8AB5EF56E60A586AE048E4939E36D7826A6255D1D5D6B9AB5F6D1A237647DEF04C4A5FE39B948D61F01142087F30C3F08B516BE17A7BD0AA94252A0BDDE0D7DE30CAA4AB58C3BE89E996214D7E48BB30F9472E96B38C4D404B4F742EE74A23682B13B5FDA50D11929D506D208E525B86FD1FA768BDBB223FC5D27BC89F1E04326FD2E9F4DAA2F09E6A9EC91A7F57F5A3FA49311873C887716B8A625764A8671C05115A56EE368F904D36964D362F7B664F8BFA5CC51431AAF5173703555ED6B399E4FF3315FAB42B349073F604BE827B7088284CC347AAEE8A67AE688B7B33C2021899635DE1E6A41E588931A7ADF3FD5C990EA0D38DBCACB0F99F39372C7FB2B08CBDB690D5C6E008B48BD5B2101A92F8DDB32B5976B4BE82B
+
encrypted_data = D87C822814EC5E1EB34E662573E9CD1D81E5610763754329FB82F1D3F26F190945E04FB3BE454EA6A7C45A68595D3368D0FE641D8F8EDA2B782745DAE87101473B4F17965547E0076AA6A8ACCFC9AB7989444DA3CE9864EDE9047B5A13C1DE5BC593B421494A2D286026C2E3E18197E31C2AE2DCC3D0AAA26501EDF471DF714EFB74E1484719CC4F2A41866755006A6CFEB75121ECD365129E5B5223C19A106059E064B6C8E0DF67EE9AB899F8FC91B743AD10E59763C2F2D3631EC8E330A3305B3339124B3393E99DEDC7ED864E953D706DBC4D8678145816E83EAFC5201872559C2FF7B873954DA23FFF48B91BD9ADA585C7546ABD5B2A9C64C3E415A763A5D632F0A2E20A01F0CEA280604BE1D03BF429463CE59ACE9D2F67F4823FFA5E581FB0C216D8CFABEE61ED86EF8920BA6B79ACDA6569EA73CDB07CB2F68B70E561CA641CC308239821350D567BF816C009

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

Payload (de)serialization:

set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;
nonce 4, 167A4483F4E12D9C012A39CCC10920BDC3D3C76CF77D76D63546A497C0423DFC7C Value generated by client in Step 1
server_nonce 20, 1694D9D0DAD24080024B001A9159091DE9509FE3CA6709F9B87301F345D643084B Value received from server in Step 2
g_b 36, 260FE00010076E7C32846DD187CA7917E86 BBC3D83D61B1764BF6E1FF101420D41B 17E64EFF529060E59F81BD13B39EA3F9 A809F8AA091F209D8A056FD9D787FD9A 1064E9FC646F327E77F40E3B27B589CA A0301E4B7C845AE17D77FE5B4ECD691B 9B8D7AA74D9B83EEEC566146E58AF109 623ED90F41EE7932F72FF5846BDBA9F5 6C798EA68AD987208A5140B3B29F550C 88779C987EF9CCEE70E13772039844E3 12AB17D3CA3362080C49C16FC0D21DB2 D450CE674E108075005E85EFD6310729 66E0929EFDAEFBFDEC54C4ECC2F02F83 FDBF206B3169D3A26BA4D556DD320B5D FCB799D2F4360ADC7943B0FE8DB6781D 447CAC4D31AD4F08288B18D5FDE78CAE
43E6A62D
FE0001000101CD28945B9502B625E4B2 8EA75DE1E14906A131FBD5413560FE6E C87BEC6D633F1FF697108453542960A6 3EB30AE509DC57243D31585A7C17C5E3 99617701894EA6F8480A3102883D3CBA 6C64B8C1A0278E70E3DB04B1F194B191 15D3228C2EA6D913654E5E94B4238CF1 E280D272920B001BC42DF938ADF07C19 0D6E8FECD564A28628F33F351245AB6A 43F4A39CA1B47C1053C5D4A18B33B6EB C1E1698876A14E65C1963C277F4FCF8E EEA64A8BC97A725142EF37B8948B7384 94461443248699DC4F9FDFD0A8744D49 AF7C42840DB9381F5D09DA3628EA002A EB7F32EBAF4FD275E7C6F8F99A37FA69 FA321B30AF1AA988ABC5D9DFFCF97F22
1FD9172A
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 = 591926B9BE2F2FC2CAEF695B8EB04B6B19942248E324FAB986973ADC8DD156333B7D040871546D408791D4F6B9FB00D246FAC3780418CE8365F636707FE6D55EBC2B54455185F0FF6176CEED54C3CFBCA1F4FD55B247F27D0A393251000D51D9EAFBD47C016F973B79C776AE3A27242DE18C5676FE8B6298ED3D77DCE8FB483E5EA9DD2B1F7987F629B04065E4C47CD3621997D38202AC24430F2F2B90B68866AD10634136D6EA651A4269161D440DF0A2212A7853CB0EBC10258A93F8F4A3BC35805384DD41F44759892B22CB29C6ACE4EC39E331838757C7A4B69076F5745CBECB1F4042366DD8E56F7A6DDA38D482BAB8FF58F817B8274CDDBA493F91E232
+
auth_key = 7CF9B59B3E589AD19732D8C6AC65E158087425B8292B8D9478CEE3A8DBEA0EEB7AAA241F99E0FF5B7AEE142B52C9884709FBCC7AC060DC5C9A650CEB1728884102B349E149425624A8FF289D891DAE6664661CF5CAE9598DD674533BB2FCD205EDF769CFBEA0718C47C7060D6E20BA996ED5A4157F0635EE0E75BD09C6D2393792E21DED2D3FC571F6E6CBE501DA25985185D58CE6BC67641A5771B6752F49BBCCDE3D50C39A292628A5D4FDFF95EF74343F7F00E78BD3DDC36F8F5650C27C2313F610D3F2667FF1471451159AC55D84B88C8BB571D1B9429F48448F551375E7BC8814DDEEE14A2C1CD10A8CEC3DB5CE854CEF9CAD8F25E0E0EC301146FE7915
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 98 7B 62 AB A9 5F 65
-0010 | 44 00 00 00 34 F7 CB 3B 7A 44 83 F4 E1 2D 9C 01
-0020 | 2A 39 CC C1 09 20 BD C3 94 D9 D0 DA D2 40 80 02
-0030 | 4B 00 1A 91 59 09 1D E9 B3 FD F0 C5 E2 04 74 DE
-0040 | 6A 15 7F C8 2E F9 58 9F
+
0000 | 00 00 00 00 00 00 00 00 01 A0 54 0A 56 B3 5F 65
+0010 | 48 00 00 00 34 F7 CB 3B D3 C7 6C F7 7D 76 D6 35
+0020 | 46 A4 97 C0 42 3D FC 7C 50 9F E3 CA 67 09 F9 B8
+0030 | 73 01 F3 45 D6 43 08 4B 3C D0 2A AE BA DA C1 B2
+0040 | 14 02 56 C9 BF F8 13 05

Payload (de)serialization:

dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;
message_id 8, 8F8780800ABA95F6580E5010055B35F65 Message ID generated as specified here » (unixtime() << 32) + (N*4)
nonce 24, 167A4483F4E12D9C012A39CCC10920BDC3D3C76CF77D76D63546A497C0423DFC7C Value generated by client in Step 1
server_nonce 40, 1694D9D0DAD24080024B001A9159091DE9509FE3CA6709F9B87301F345D643084B Value received from server in Step 2
encrypted_data 56, 340FE5001009C62CA0C1111B634A8B405F2 17977B8AB414DBEF6A9C4C0CCAAE191F A11A08298465BE7CDF811B378EED574E D65E41A7C8FC50D1FC80A8AB5EF56E60 A586AE048E4939E36D7826A6255D1D5D 6B9AB5F6D1A237647DEF04C4A5FE39B9 48D61F01142087F30C3F08B516BE17A7 BD0AA94252A0BDDE0D7DE30CAA4AB58C 3BE89E996214D7E48BB30F9472E96B38 C4D404B4F742EE74A23682B13B5FDA50 D11929D506D208E525B86FD1FA768BDB B223FC5D27BC89F1E04326FD2E9F4DAA 2F09E6A9EC91A7F57F5A3FA49311873C 887716B8A625764A8671C05115A56EE3 68F904D36964D362F7B664F8BFA5CC51 431AAF5173703555ED6B399E4FF3315F AB42B349073F604BE827B7088284CC34 7AAEE8A67AE688B7B33C2021899635DE 1E6A41E588931A7ADF3FD5C990EA0D38 DBCACB0F99F39372C7FB2B08CBDB690D 5C6E008B48BD5B2101A92F8DDB32B597
6B4BE82B
FE500100D87C822814EC5E1EB34E6625 73E9CD1D81E5610763754329FB82F1D3 F26F190945E04FB3BE454EA6A7C45A68 595D3368D0FE641D8F8EDA2B782745DA E87101473B4F17965547E0076AA6A8AC CFC9AB7989444DA3CE9864EDE9047B5A 13C1DE5BC593B421494A2D286026C2E3 E18197E31C2AE2DCC3D0AAA26501EDF4 71DF714EFB74E1484719CC4F2A418667 55006A6CFEB75121ECD365129E5B5223 C19A106059E064B6C8E0DF67EE9AB899 F8FC91B743AD10E59763C2F2D3631EC8 E330A3305B3339124B3393E99DEDC7ED 864E953D706DBC4D8678145816E83EAF C5201872559C2FF7B873954DA23FFF48 B91BD9ADA585C7546ABD5B2A9C64C3E4 15A763A5D632F0A2E20A01F0CEA28060 4BE1D03BF429463CE59ACE9D2F67F482 3FFA5E581FB0C216D8CFABEE61ED86EF 8920BA6B79ACDA6569EA73CDB07CB2F6 8B70E561CA641CC308239821350D567B
F816C009
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, 801987B62ABA95F6501A0540A56B35F65 Message ID generated as specified here » (unixtime() << 32) + (N*4)
message_length 16, 444000000 (68 in decimal)48000000 (72 in decimal) Message body length
nonce 24, 167A4483F4E12D9C012A39CCC10920BDC3D3C76CF77D76D63546A497C0423DFC7C Value generated by client in Step 1
server_nonce 40, 1694D9D0DAD24080024B001A9159091DE9509FE3CA6709F9B87301F345D643084B Value received from server in Step 2
new_nonce_hash1 56, 16B3FDF0C5E20474DE6A157FC82EF9589F3CD02AAEBADAC1B2140256C9BFF81305 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.