From 2c3113b642aa055d74e24e5cd4b151ea23e39537 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 24 Dec 2023 18:18:52 +0000 Subject: [PATCH] Update content of files --- .../mtproto/samples-auth_key.html | 412 +++++++++--------- 1 file changed, 206 insertions(+), 206 deletions(-) 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 b94db0fcfa..ef0ebfd94b 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 00 A3 0B 00 68 2B 88 65
-0010 | 14 00 00 00 F1 8E 7E BE 92 F0 49 59 80 B4 76 E4
-0020 | 6B DF 65 7D 07 70 71 60
+
0000 | 00 00 00 00 00 00 00 00 A0 EF 07 00 0B 71 88 65
+0010 | 14 00 00 00 F1 8E 7E BE E9 A9 5C F0 48 79 75 62
+0020 | 4F 9F A5 93 55 26 26 58

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 18 AD F8 68 2B 88 65
-0010 | CC 00 00 00 63 24 16 05 92 F0 49 59 80 B4 76 E4
-0020 | 6B DF 65 7D 07 70 71 60 2F 63 0E FC 18 D8 3F 59
-0030 | 08 18 FE 24 F6 6F 01 7A 08 1F E2 54 46 76 91 C4
-0040 | A9 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
+
0000 | 00 00 00 00 00 00 00 00 01 0C 23 AB 0B 71 88 65
+0010 | 70 00 00 00 63 24 16 05 E9 A9 5C F0 48 79 75 62
+0020 | 4F 9F A5 93 55 26 26 58 F2 A1 DD 5E 12 FD A6 19
+0030 | 8A F1 36 63 69 C0 BD 38 08 1E 1E 4E 26 3A 9A B0
+0040 | D9 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 = 2297491421526082729
-

Decompose into 2 prime cofactors p < q: 2297491421526082729 = 1266380771 * 1814218499

-
p = 1266380771
-q = 1814218499
+
pq = 2170257996538097881
+

Decompose into 2 prime cofactors p < q: 2170257996538097881 = 1356114863 * 1600349687

+
p = 1356114863
+q = 1600349687

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 1F E2 54 46 76 91 C4 A9 00 00 00
-0010 | 04 4B 7B 6F E3 00 00 00 04 6C 22 C7 03 00 00 00
-0020 | 92 F0 49 59 80 B4 76 E4 6B DF 65 7D 07 70 71 60
-0030 | 2F 63 0E FC 18 D8 3F 59 08 18 FE 24 F6 6F 01 7A
-0040 | 89 0B EA EA BD 5B 69 76 A6 C5 C8 81 CF 33 A0 DA
-0050 | 76 17 6E 00 E9 FD 04 69 DC E4 8B 84 6D 2E 5D 5C
+
0000 | 95 5F F5 A9 08 1E 1E 4E 26 3A 9A B0 D9 00 00 00
+0010 | 04 50 D4 AB AF 00 00 00 04 5F 63 65 F7 00 00 00
+0020 | E9 A9 5C F0 48 79 75 62 4F 9F A5 93 55 26 26 58
+0030 | F2 A1 DD 5E 12 FD A6 19 8A F1 36 63 69 C0 BD 38
+0040 | DD 9F 00 BF 8C 21 2D 1D 64 4A EF 29 1B BF 9E EB
+0050 | 17 F0 51 C6 11 04 AA 24 F3 46 FE B9 F8 8F D1 B8
 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 = 1814218499
- + - + - + - + - + - + @@ -291,39 +291,39 @@ q = 1814218499

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 = 955FF5A9081FE254467691C4A9000000044B7B6FE3000000046C22C70300000092F0495980B476E46BDF657D077071602F630EFC18D83F590818FE24F66F017A890BEAEABD5B6976A6C5C881CF33A0DA76176E00E9FD0469DCE48B846D2E5D5C02000000
-random_padding_bytes = 86C4B7EED21EC45F0C30C385989248950C2C53001603D28ECBDC8DA82485EBE51074D3FC1976F4438D627D86849DB9289669247AE2C6EEF1E240D82E578B332A791ABF5C5C7D1AA4167143C80915155778106B6D40EF01C9C11618E4
+
data = 955FF5A9081E1E4E263A9AB0D90000000450D4ABAF000000045F6365F7000000E9A95CF0487975624F9FA59355262658F2A1DD5E12FDA6198AF1366369C0BD38DD9F00BF8C212D1D644AEF291BBF9EEB17F051C61104AA24F346FEB9F88FD1B802000000
+random_padding_bytes = D9590C2E0B25ADB79B73125B7C00F467B7E039352D3196C1DEA1DFC72EB5AB4FBF1FC97EFFE4A4895F65BA3988EE57DFF55F633387CBA2EB3F6A2A673EDD70EAE93EEE60446ADC9998A689E18247980327FD592A6B8363289465ABAB

And this is the output:

-
encrypted_data = 5B9412A8C31EE8ECD66EB148789C4C76F35A3A8F3F32A70E3F311369E9AD3545E60F527923112BA22F651632DE61DA429282A3CA7E86FDF3905088E338B415985DB8D57CDB3E993D4C6C25169277446FC1058B108FFFD6734615B27B0901F07B37FBCF05DDC8D6AD7B8C6B22A13AC74FCAEA972BEA4530D8004D63DBC93B484DABB91AF5B436983DA08E34825F725D2C751313FD49C708AAB9144F4E50D31D7B6FEED1EAF42AC6E76FF52D275FE3DBAE6B3119A6FDCDF9CB898393774E10F2A8F57996A0FDACDCFB22FA1F2908117A50CEA79A35D7752DD0E13A3B68DFBED5C39DF19ED757881E359A8679F9A0EA37CFAA7FE59122C922B52F2E5C4808E8540A
+
encrypted_data = D3476A6B72B0C947F9373ED9A057CE0FB4A83DF72FFD06F560C9C40728F13BB5398B10A56DB8C8097CDC4202BC84F19AEB9665692D4218B07D7ACDA9FEE6C61567573D7591FA0DECB00F0E2E6F0272A23E4B694438239BDED0AEC0751DBBE0ED838C07CECA6210D646398B8BD9975CFD145CEB8609EDDB7B5722D22196279CE9862334877FCD24D9212B497ADAF7D8E2B5A7AB3F9283340B1988472E29F2EA69BF98AA5ABD43965294173D59BC4EE4CADEE4875A89E6D585393CB0C1151B0D6A7665874A62AD3E1167068E8DE40E0761838ABDD866DBD1C6C758F3896628FC3FD94C10C89115B44E68DC174F2F89C6A0DCE54CABCE74D0DB68D576A5F53CC9C5

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

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, 800A30B00682B8865A0EF07000B718865 Message ID generated as specified here » (unixtime() << 32) + (N*4)
nonce 24, 1692F0495980B476E46BDF657D07707160E9A95CF0487975624F9FA59355262658 Random number
message_id 8, 80118ADF8682B8865010C23AB0B718865 Message ID generated as specified here » (unixtime() << 32) + (N*4)
message_length 16, 4CC000000 (204 in decimal)70000000 (112 in decimal) Message body length
nonce 24, 1692F0495980B476E46BDF657D07707160E9A95CF0487975624F9FA59355262658 Value generated by client in Step 1
server_nonce 40, 162F630EFC18D83F590818FE24F66F017AF2A1DD5E12FDA6198AF1366369C0BD38 Server-generated random number
pq 56, 12081FE254467691C4A9000000
TL byte deserialization
=> bigendian conversion to decimal
=> 2297491421526082729
081E1E4E263A9AB0D9000000
TL byte deserialization
=> bigendian conversion to decimal
=> 2170257996538097881
Single-byte prefix denoting length, an 8-byte string, and three bytes of padding
pq 4, 12081FE254467691C4A9000000
TL byte deserialization
=> bigendian conversion to decimal
=> 2297491421526082729
081E1E4E263A9AB0D9000000
TL byte deserialization
=> bigendian conversion to decimal
=> 2170257996538097881
Single-byte prefix denoting length, 8-byte string, and three bytes of padding
p 16, 8044B7B6FE3000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1266380771
0450D4ABAF000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1356114863
First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
q 24, 8046C22C703000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1814218499
045F6365F7000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1600349687
Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
nonce 32, 1692F0495980B476E46BDF657D07707160E9A95CF0487975624F9FA59355262658 Value generated by client in Step 1
server_nonce 48, 162F630EFC18D83F590818FE24F66F017AF2A1DD5E12FDA6198AF1366369C0BD38 Value received from server in Step 2
new_nonce 64, 32890BEAEABD5B6976A6C5C881CF33A0DA 76176E00E9FD0469DCE48B846D2E5D5CDD9F00BF8C212D1D644AEF291BBF9EEB 17F051C61104AA24F346FEB9F88FD1B8 Client-generated random number
@@ -345,7 +345,7 @@ random_padding_bytes = 86C4B7EED21EC45F0C30C385989248950C2C53001603D28ECBDC8DA82 - + @@ -363,25 +363,25 @@ random_padding_bytes = 86C4B7EED21EC45F0C30C385989248950C2C53001603D28ECBDC8DA82 - + - + - + - + @@ -393,7 +393,7 @@ random_padding_bytes = 86C4B7EED21EC45F0C30C385989248950C2C53001603D28ECBDC8DA82 - + @@ -402,47 +402,47 @@ random_padding_bytes = 86C4B7EED21EC45F0C30C385989248950C2C53001603D28ECBDC8DA82
6) Server responds with:

Received payload (excluding transport headers/trailers):

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

Payload (de)serialization:

server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;
message_id 8, 8C8E10700692B8865A4EF07000B718865 Message ID generated as specified here » (unixtime() << 32) + (N*4)
nonce 24, 1692F0495980B476E46BDF657D07707160E9A95CF0487975624F9FA59355262658 Value generated by client in Step 1
server_nonce 40, 162F630EFC18D83F590818FE24F66F017AF2A1DD5E12FDA6198AF1366369C0BD38 Value received from server in Step 2
p 56, 8044B7B6FE3000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1266380771
0450D4ABAF000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1356114863
First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
q 64, 8046C22C703000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1814218499
045F6365F7000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1600349687
Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
encrypted_data 80, 260FE0001005B9412A8C31EE8ECD66EB148 789C4C76F35A3A8F3F32A70E3F311369 E9AD3545E60F527923112BA22F651632 DE61DA429282A3CA7E86FDF3905088E3 38B415985DB8D57CDB3E993D4C6C2516 9277446FC1058B108FFFD6734615B27B 0901F07B37FBCF05DDC8D6AD7B8C6B22 A13AC74FCAEA972BEA4530D8004D63DB C93B484DABB91AF5B436983DA08E3482 5F725D2C751313FD49C708AAB9144F4E 50D31D7B6FEED1EAF42AC6E76FF52D27 5FE3DBAE6B3119A6FDCDF9CB89839377 4E10F2A8F57996A0FDACDCFB22FA1F29 08117A50CEA79A35D7752DD0E13A3B68 DFBED5C39DF19ED757881E359A8679F9 A0EA37CFAA7FE59122C922B52F2E5C48
08E8540A
FE000100D3476A6B72B0C947F9373ED9 A057CE0FB4A83DF72FFD06F560C9C407 28F13BB5398B10A56DB8C8097CDC4202 BC84F19AEB9665692D4218B07D7ACDA9 FEE6C61567573D7591FA0DECB00F0E2E 6F0272A23E4B694438239BDED0AEC075 1DBBE0ED838C07CECA6210D646398B8B D9975CFD145CEB8609EDDB7B5722D221 96279CE9862334877FCD24D9212B497A DAF7D8E2B5A7AB3F9283340B1988472E 29F2EA69BF98AA5ABD43965294173D59 BC4EE4CADEE4875A89E6D585393CB0C1 151B0D6A7665874A62AD3E1167068E8D E40E0761838ABDD866DBD1C6C758F389 6628FC3FD94C10C89115B44E68DC174F 2F89C6A0DCE54CABCE74D0DB68D576A5
F53CC9C5
Value generated above
@@ -464,13 +464,13 @@ random_padding_bytes = 86C4B7EED21EC45F0C30C385989248950C2C53001603D28ECBDC8DA82 - + - + @@ -482,19 +482,19 @@ random_padding_bytes = 86C4B7EED21EC45F0C30C385989248950C2C53001603D28ECBDC8DA82 - + - + - + @@ -502,20 +502,20 @@ random_padding_bytes = 86C4B7EED21EC45F0C30C385989248950C2C53001603D28ECBDC8DA82

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

-
encrypted_answer = 1345C36E4FA89CB1A692040FEBED935A8BDFDAFB4D490C0B8CBCB8B747407129C28B97595AED040C3686465EB0E41E9FAD136C001660A7BC78A789BECD3E21FF7C5C03E6EC86D0B7C0F7B0EF242C1AE867CB558005A3CE0AEE719F76E0DE0F93518CAE5435D57AAE8550DFD176D5850D9162FEECFFF03A62BBA5E93719BCF480C39F8F5DD73BF9D456AB2A41332C80B81A4119EF686B83E158AB410A336FAF67E12CD3F85CCB39EE553C2F367C216C9A241881DFF5F96888E158CDEF640A69B98E3D5E663B900B8E92C94D84929624AE288ED78626452F760ECBEBF2F235D432DB141470F06776A7848C6323EC9329623986881DFE2FEC38DE7B8399C57EB5A77B66846F92E3E167741A07BAF0FCCAFAEC06D31B545630119DA3A1E79B68473147E9A1BABB6C8B77051F4FD50C6943638EFE9646616C535EC7221DE09369826314B7B07B12D41F2962E68D91D8CD0B38A4E7D78516F48F55F4C27799E022B12B33F5A1CBFD2D720B06284B49CB2BC49A72C9486905E34C857AC1A0F88D15F46964A4F6F5EA6CF8C1350AF6F99305918D0A55E21ED861DBD91EC555B978D2DF8D4ECBB51241BF9FE9DA2E61C8C9C8334EDBD78DE9348A917BA3875CA0F403AEEF4A21BD22CBB834BA75A9F02774A5AF1F29F93097EEDCBF9BBB8D4EA1C59AAB261950AF03C93ACB6CF1FC46CD8AA8131803CAE53D1C31B7838C7A266913D288892FF3BCDFBCB434EEE64836179CC27055BBE1D0BC5633015A29270C58E5D35BC04F0087C95159548E118D1CCE4D178D9060E85EA6967BED4048FF8F75DBBCA261C14E65D6719969E28ABFBC212C2B2190
-tmp_aes_key = 3A2455F86992C73BB43A2A7A7397E18CD56E1756616A3CBF4F601F32E08176B7
-tmp_aes_iv = EBE760B2B410B8ADE48EC7F9702FF9B9E76D9E5C4C18FD3ACE47DF2A890BEAEA
+
encrypted_answer = 15930D9CD2D35A6B7D60803FCD5326BAB641819B90B455071D3368055AD47E3377C5689EA88FFEB14102339DAE0B7C4AE50528E9EDD6F78C56356C0C00768374CF79F495DC2E285877F3742637109D517FBC3E63A2FD7044FF62695F5757C7ADD09DAC5DBF13026754E280A9C0ABB870387D28E18E32D0D5F09CAD50DA5420B2A8A0A1E44A97E492E878AC46C0FC2C7A9519290D6C350F09B6985FAA74BA8184E41B2E972E73A1C83A195D0BD741B91A8F8CE080A18965EDF06E56D47EBE7BAB8B36FB49A77162072CB3ECFC81B2AFA744477A64ED27FCE55CFD431526D97821540A5B09CE89D632CC16D860B28038141CBAD5EB6991CDE3CE49B5E9D9B1BBF5826A671D54405221FFC0EABB877595D64A3B84DA48195B08FA3644385B381AA1DCBD3DF8C5A50B16982AF46DC91DBA5F8141358C065001E7BDD521390E2438665391AA0E0520351E6A9C4AB628555C0B2D8F88AC38488A00104944D0AEB4B88F362408A77AC792A97423B1D83689F3C8CE1E02EA9B3542DB97E4C8FB5A96A865C42874BD0FC86CD65A2D11C723CFCCF9BDFF483FD0E2BD753F9B6C17DA3382105D4E124998EBBB26042860FE0DE451DE5C70C9D209C8ED7032CDFB03BCDC7910B302385D6C17EA7145F952A50ECDFA9419ED8168F25DE9DE0D2DDC94CF4713EB6B070199FF2C41D1BD41CE1225C3C40B2D8057070C669AE8EDE66F3E7DD8305039A1AB17429BE752AB165711CBA913FA11A618ACCC8A39B9E0F4B11C174A856934326EE14F1F749EFFD66657F441705373FB606D461A93A059AEED94ABEBC830DE0C0DB6D3D69B5731E68FBEE321C342
+tmp_aes_key = D5584BCF5777990CB7FB90F7CD3FAE5635853CD460AE1FC4A85D97FBEAA23B22
+tmp_aes_iv = EC1C42108FBC566B0751FA13B685AF7E81DC5CA95DF70BCCE8C4CFD0DD9F00BF

Yielding:

-
answer_with_hash = 6A51F258B5F58C53F4C54618B948DB07A5393D9CBA0D89B592F0495980B476E46BDF657D077071602F630EFC18D83F590818FE24F66F017A03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100232939B8A5969CA74982302C5B03AC4A9F14E18E0D75EC871CEACDF00B02BE7D1892EAC44715DA81D27D1D6EFAE52DEB320BB4D09B126E1E560BC672E0DB586F1D6ED0B7374595F1B53E0EDDC9F5C33C79F673BE0511A5839A2791AF995D18FE10BCA1274A28E8CF147287D4F38A3C4BB33C7779FA8A2100E9715C0023E595D760D6C9A6695A6A085CCD8F22712575ABE74A01C1A05400F56D4B61E8A83B75596B2688A2D6EBCA22AAF4ED3EE0E4356978251B99333FE224730FD8371A34919DAD073E46C6E503470394D60FDFC7C11FC62B87FAC8AB93456B139D49F9DA6E77B3DF4CACEB0C1F9B3FE2CD466354FC3B8CB2923C1F8F12505159210A7796535F692B886531701530C6F9AF84
-answer = BA0D89B592F0495980B476E46BDF657D077071602F630EFC18D83F590818FE24F66F017A03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100232939B8A5969CA74982302C5B03AC4A9F14E18E0D75EC871CEACDF00B02BE7D1892EAC44715DA81D27D1D6EFAE52DEB320BB4D09B126E1E560BC672E0DB586F1D6ED0B7374595F1B53E0EDDC9F5C33C79F673BE0511A5839A2791AF995D18FE10BCA1274A28E8CF147287D4F38A3C4BB33C7779FA8A2100E9715C0023E595D760D6C9A6695A6A085CCD8F22712575ABE74A01C1A05400F56D4B61E8A83B75596B2688A2D6EBCA22AAF4ED3EE0E4356978251B99333FE224730FD8371A34919DAD073E46C6E503470394D60FDFC7C11FC62B87FAC8AB93456B139D49F9DA6E77B3DF4CACEB0C1F9B3FE2CD466354FC3B8CB2923C1F8F12505159210A7796535F692B886531701530C6F9AF84
+
answer_with_hash = 2F3349E2A541F04E00F1D21D8C0971B5729384A7BA0D89B5E9A95CF0487975624F9FA59355262658F2A1DD5E12FDA6198AF1366369C0BD3803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001000804A0D7FF6AC9F253B89F796BC0C03FDE2863D645943825D3BC9327AA9E9CCB57C30BF43A64828F450E17C2F82B647CA86AEE8ECB67627C70CD273743AD97E5F09F8AFDBBD4E46893B85DCE7403BF611E3B2FE7C627EC793878A87F76C14E24EFF478253706769916FFD6031FCB0F9F9ED7C77556C7B66876411F21BCEAD8D8541374F9DE2F325AA1C3471280A2C84B66F7B6EB87B4FD3A7994DD5A1009E825F6C5D8B53B5D2E856B20637282448CABFD7CDC19635B0BE1D1F240FA5517CC62919E440CEFAD501BFEEE5D3B996A0E8E852D70CE80BF89662015053B5AA2DBED77DD5C2390161F13D3A7416340E09B30795DB0F8F32D29DA1F32DCA782F308900C71886520D8F1B4CFC79D46
+answer = BA0D89B5E9A95CF0487975624F9FA59355262658F2A1DD5E12FDA6198AF1366369C0BD3803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001000804A0D7FF6AC9F253B89F796BC0C03FDE2863D645943825D3BC9327AA9E9CCB57C30BF43A64828F450E17C2F82B647CA86AEE8ECB67627C70CD273743AD97E5F09F8AFDBBD4E46893B85DCE7403BF611E3B2FE7C627EC793878A87F76C14E24EFF478253706769916FFD6031FCB0F9F9ED7C77556C7B66876411F21BCEAD8D8541374F9DE2F325AA1C3471280A2C84B66F7B6EB87B4FD3A7994DD5A1009E825F6C5D8B53B5D2E856B20637282448CABFD7CDC19635B0BE1D1F240FA5517CC62919E440CEFAD501BFEEE5D3B996A0E8E852D70CE80BF89662015053B5AA2DBED77DD5C2390161F13D3A7416340E09B30795DB0F8F32D29DA1F32DCA782F308900C71886520D8F1B4CFC79D46

Generated payload (excluding transport headers/trailers):

-
0000 | BA 0D 89 B5 92 F0 49 59 80 B4 76 E4 6B DF 65 7D
-0010 | 07 70 71 60 2F 63 0E FC 18 D8 3F 59 08 18 FE 24
-0020 | F6 6F 01 7A 03 00 00 00 FE 00 01 00 C7 1C AE B9
+
0000 | BA 0D 89 B5 E9 A9 5C F0 48 79 75 62 4F 9F A5 93
+0010 | 55 26 26 58 F2 A1 DD 5E 12 FD A6 19 8A F1 36 63
+0020 | 69 C0 BD 38 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 = BA0D89B592F0495980B476E46BDF657D077071602F630EFC18D83F590818FE24F66F017
 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 | 23 29 39 B8 A5 96 9C A7 49 82 30 2C 5B 03 AC 4A
-0140 | 9F 14 E1 8E 0D 75 EC 87 1C EA CD F0 0B 02 BE 7D
-0150 | 18 92 EA C4 47 15 DA 81 D2 7D 1D 6E FA E5 2D EB
-0160 | 32 0B B4 D0 9B 12 6E 1E 56 0B C6 72 E0 DB 58 6F
-0170 | 1D 6E D0 B7 37 45 95 F1 B5 3E 0E DD C9 F5 C3 3C
-0180 | 79 F6 73 BE 05 11 A5 83 9A 27 91 AF 99 5D 18 FE
-0190 | 10 BC A1 27 4A 28 E8 CF 14 72 87 D4 F3 8A 3C 4B
-01A0 | B3 3C 77 79 FA 8A 21 00 E9 71 5C 00 23 E5 95 D7
-01B0 | 60 D6 C9 A6 69 5A 6A 08 5C CD 8F 22 71 25 75 AB
-01C0 | E7 4A 01 C1 A0 54 00 F5 6D 4B 61 E8 A8 3B 75 59
-01D0 | 6B 26 88 A2 D6 EB CA 22 AA F4 ED 3E E0 E4 35 69
-01E0 | 78 25 1B 99 33 3F E2 24 73 0F D8 37 1A 34 91 9D
-01F0 | AD 07 3E 46 C6 E5 03 47 03 94 D6 0F DF C7 C1 1F
-0200 | C6 2B 87 FA C8 AB 93 45 6B 13 9D 49 F9 DA 6E 77
-0210 | B3 DF 4C AC EB 0C 1F 9B 3F E2 CD 46 63 54 FC 3B
-0220 | 8C B2 92 3C 1F 8F 12 50 51 59 21 0A 77 96 53 5F
-0230 | 69 2B 88 65
+0130 | 08 04 A0 D7 FF 6A C9 F2 53 B8 9F 79 6B C0 C0 3F +0140 | DE 28 63 D6 45 94 38 25 D3 BC 93 27 AA 9E 9C CB +0150 | 57 C3 0B F4 3A 64 82 8F 45 0E 17 C2 F8 2B 64 7C +0160 | A8 6A EE 8E CB 67 62 7C 70 CD 27 37 43 AD 97 E5 +0170 | F0 9F 8A FD BB D4 E4 68 93 B8 5D CE 74 03 BF 61 +0180 | 1E 3B 2F E7 C6 27 EC 79 38 78 A8 7F 76 C1 4E 24 +0190 | EF F4 78 25 37 06 76 99 16 FF D6 03 1F CB 0F 9F +01A0 | 9E D7 C7 75 56 C7 B6 68 76 41 1F 21 BC EA D8 D8 +01B0 | 54 13 74 F9 DE 2F 32 5A A1 C3 47 12 80 A2 C8 4B +01C0 | 66 F7 B6 EB 87 B4 FD 3A 79 94 DD 5A 10 09 E8 25 +01D0 | F6 C5 D8 B5 3B 5D 2E 85 6B 20 63 72 82 44 8C AB +01E0 | FD 7C DC 19 63 5B 0B E1 D1 F2 40 FA 55 17 CC 62 +01F0 | 91 9E 44 0C EF AD 50 1B FE EE 5D 3B 99 6A 0E 8E +0200 | 85 2D 70 CE 80 BF 89 66 20 15 05 3B 5A A2 DB ED +0210 | 77 DD 5C 23 90 16 1F 13 D3 A7 41 63 40 E0 9B 30 +0220 | 79 5D B0 F8 F3 2D 29 DA 1F 32 DC A7 82 F3 08 90 +0230 | 0C 71 88 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, 8019476BD692B8865016870590C718865 Message ID generated as specified here » (unixtime() << 32) + (N*4)
message_length 16, 494020000 (660 in decimal)D8020000 (728 in decimal) Message body length
nonce 24, 1692F0495980B476E46BDF657D07707160E9A95CF0487975624F9FA59355262658 Value generated by client in Step 1
server_nonce 40, 162F630EFC18D83F590818FE24F66F017AF2A1DD5E12FDA6198AF1366369C0BD38 Value received from server in Step 2
encrypted_answer 56, 596FE5002001345C36E4FA89CB1A692040F EBED935A8BDFDAFB4D490C0B8CBCB8B7 47407129C28B97595AED040C3686465E B0E41E9FAD136C001660A7BC78A789BE CD3E21FF7C5C03E6EC86D0B7C0F7B0EF 242C1AE867CB558005A3CE0AEE719F76 E0DE0F93518CAE5435D57AAE8550DFD1 76D5850D9162FEECFFF03A62BBA5E937 19BCF480C39F8F5DD73BF9D456AB2A41 332C80B81A4119EF686B83E158AB410A 336FAF67E12CD3F85CCB39EE553C2F36 7C216C9A241881DFF5F96888E158CDEF 640A69B98E3D5E663B900B8E92C94D84 929624AE288ED78626452F760ECBEBF2 F235D432DB141470F06776A7848C6323 EC9329623986881DFE2FEC38DE7B8399 C57EB5A77B66846F92E3E167741A07BA F0FCCAFAEC06D31B545630119DA3A1E7 9B68473147E9A1BABB6C8B77051F4FD5 0C6943638EFE9646616C535EC7221DE0 9369826314B7B07B12D41F2962E68D91 D8CD0B38A4E7D78516F48F55F4C27799 E022B12B33F5A1CBFD2D720B06284B49 CB2BC49A72C9486905E34C857AC1A0F8 8D15F46964A4F6F5EA6CF8C1350AF6F9 9305918D0A55E21ED861DBD91EC555B9 78D2DF8D4ECBB51241BF9FE9DA2E61C8 C9C8334EDBD78DE9348A917BA3875CA0 F403AEEF4A21BD22CBB834BA75A9F027 74A5AF1F29F93097EEDCBF9BBB8D4EA1 C59AAB261950AF03C93ACB6CF1FC46CD 8AA8131803CAE53D1C31B7838C7A2669 13D288892FF3BCDFBCB434EEE6483617 9CC27055BBE1D0BC5633015A29270C58 E5D35BC04F0087C95159548E118D1CCE 4D178D9060E85EA6967BED4048FF8F75 DBBCA261C14E65D6719969E28ABFBC21
2C2B2190
FE50020015930D9CD2D35A6B7D60803F CD5326BAB641819B90B455071D336805 5AD47E3377C5689EA88FFEB14102339D AE0B7C4AE50528E9EDD6F78C56356C0C 00768374CF79F495DC2E285877F37426 37109D517FBC3E63A2FD7044FF62695F 5757C7ADD09DAC5DBF13026754E280A9 C0ABB870387D28E18E32D0D5F09CAD50 DA5420B2A8A0A1E44A97E492E878AC46 C0FC2C7A9519290D6C350F09B6985FAA 74BA8184E41B2E972E73A1C83A195D0B D741B91A8F8CE080A18965EDF06E56D4 7EBE7BAB8B36FB49A77162072CB3ECFC 81B2AFA744477A64ED27FCE55CFD4315 26D97821540A5B09CE89D632CC16D860 B28038141CBAD5EB6991CDE3CE49B5E9 D9B1BBF5826A671D54405221FFC0EABB 877595D64A3B84DA48195B08FA364438 5B381AA1DCBD3DF8C5A50B16982AF46D C91DBA5F8141358C065001E7BDD52139 0E2438665391AA0E0520351E6A9C4AB6 28555C0B2D8F88AC38488A00104944D0 AEB4B88F362408A77AC792A97423B1D8 3689F3C8CE1E02EA9B3542DB97E4C8FB 5A96A865C42874BD0FC86CD65A2D11C7 23CFCCF9BDFF483FD0E2BD753F9B6C17 DA3382105D4E124998EBBB26042860FE 0DE451DE5C70C9D209C8ED7032CDFB03 BCDC7910B302385D6C17EA7145F952A5 0ECDFA9419ED8168F25DE9DE0D2DDC94 CF4713EB6B070199FF2C41D1BD41CE12 25C3C40B2D8057070C669AE8EDE66F3E 7DD8305039A1AB17429BE752AB165711 CBA913FA11A618ACCC8A39B9E0F4B11C 174A856934326EE14F1F749EFFD66657 F441705373FB606D461A93A059AEED94 ABEBC830DE0C0DB6D3D69B5731E68FBE
E321C342
See below
@@ -570,13 +570,13 @@ answer = BA0D89B592F0495980B476E46BDF657D077071602F630EFC18D83F590818FE24F66F017 - + - + @@ -594,13 +594,13 @@ answer = BA0D89B592F0495980B476E46BDF657D077071602F630EFC18D83F590818FE24F66F017 - + - + @@ -609,34 +609,34 @@ answer = BA0D89B592F0495980B476E46BDF657D077071602F630EFC18D83F590818FE24F66F017
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 = 8AB50D0843BF6FA3B20AB89B66D9A96ACF8C118F9595F81C31FAE3136CF59B0687CD98C1FDC764B1EAB24EB2E21AA84934CFA7456E4D562F85ED13EDFF1E039B43B2452B2960269A7B71FED89FF43BD10CD4043887725A91D10FE241769107A4E479E24FE880D87D0CB88CD4A413E48A9AADCBFE905483C95152B5BA0CB1918B9BC448F4A06F82BAFDD48E19B5772F5BA7D7FE7BAFB9DE526225E67B91CB5FED49F9EE469A5DA90300D3626442DBD5040E697735983BE9E688A5E3B7DEC349A45CCCA1FC6EFC1E867B204B562EEB1742826C487F9966463E452DA067AC11C68905B6730E5C00451DD3B7BCF77ADEE61E504708CF16BA755E1D0DEF02D1B32C33
+
b = F0313C3418147FFFD95D0D9E6CB11C2547A2C1031839A196CB2345B80E0743D7B29FCE13EE02D62724776FF823B7DC3FC4875313179CBF638D3C975E8AF777305400190C72DCA8FB45352DC08DE0A5F91DFFC6F84A1D3DB13A2FC1703C550AB1C97E9B779AD3F88D1B1A870D9D3D75193D758CD5B208F27FF03D4959183931CFEA6976D1E653ECF7648A012D4DCFF3EAABA5D18E0E21F512409DE7C0EEB4B2B8D31377BE240D2AE3C31094DE5667CD5874EB85DCC73F2EB92F35A1AF67B4D77EBE0CAA07D732BCEBBA44A4DEE03AAB7D563F3B4D67AD2566BF379AF89E89C25E0EBC454A9AC3400C675E6894B34F26E29030C168DA0F20A1DC852266E41CB1CF

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

-
g_b = B466195E80BDA27A26984FD61F37C70104ED1014482068434D5DA41DCC313A5FAC36FCD07DC07855611F104BB90C12818432CB3FEA1A9CA13400ED17F1D9CCC0C75E0337155FD42C677DFFB2439C58F5781DCD8C25A11EB474C6F9B350FD206379D29199784FB1CCA1404C2864187CB613F14B7229294B42619091CFB6160FDC8D05F25445646710A6D498CB00360C81250D1AAD71F25DE845B0F1BF51266C910976FF27D87D310258274A576C407D685B839E0F0BFC56F22135BF43B2949253FE7F927D7B967D7CCA0E18CFB30F6B98EFF384D3DA572A38BFEF2664F4EA3912E7AF6C98FDD10AB15F58263794A62938CB184BF9365CBE2D80D38AB8BC2F54DD
+
g_b = 7EDE2DAB34332592ED6D6D25FCC64C7F6181BEF686125EB13B87DCE59CD40BCCAD464081671F5A94E23FF4536069F7740E3B43925B4CDF9DC757C5F9D372CAC08EAACAB895C06704B20E142B7AC568D3370AC19D39FC6BBCB09A65938CDDFE88654C4837C5EFC9D84756A7110F686CE3645A393726ABDE438820D9B8D6E2DDD39A13725D3BE166042E9AC5B75B4731ECEC26E20ADF8D3EDD172E001F0A75B6056805526D8F1414BDE14F4E643E8272B7610239D7C34ED877E1A9B0890FEE6B5868851D82417EC107B0F730D0AD4753E910C02604F5BAF63D03F9E868903BAA4DC4B908D3B581A023906EC45C342CF1BD94C62D9D988345209AEE5A7E1ABE6364
7.1) generation of encrypted_data

Generated payload (excluding transport headers/trailers):

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

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, 1692F0495980B476E46BDF657D07707160E9A95CF0487975624F9FA59355262658 Value generated by client in Step 1
server_nonce 20, 162F630EFC18D83F590818FE24F66F017AF2A1DD5E12FDA6198AF1366369C0BD38 Value received from server in Step 2
g_a 300, 260FE000100232939B8A5969CA74982302C 5B03AC4A9F14E18E0D75EC871CEACDF0 0B02BE7D1892EAC44715DA81D27D1D6E FAE52DEB320BB4D09B126E1E560BC672 E0DB586F1D6ED0B7374595F1B53E0EDD C9F5C33C79F673BE0511A5839A2791AF 995D18FE10BCA1274A28E8CF147287D4 F38A3C4BB33C7779FA8A2100E9715C00 23E595D760D6C9A6695A6A085CCD8F22 712575ABE74A01C1A05400F56D4B61E8 A83B75596B2688A2D6EBCA22AAF4ED3E E0E4356978251B99333FE224730FD837 1A34919DAD073E46C6E503470394D60F DFC7C11FC62B87FAC8AB93456B139D49 F9DA6E77B3DF4CACEB0C1F9B3FE2CD46 6354FC3B8CB2923C1F8F12505159210A
7796535F
FE0001000804A0D7FF6AC9F253B89F79 6BC0C03FDE2863D645943825D3BC9327 AA9E9CCB57C30BF43A64828F450E17C2 F82B647CA86AEE8ECB67627C70CD2737 43AD97E5F09F8AFDBBD4E46893B85DCE 7403BF611E3B2FE7C627EC793878A87F 76C14E24EFF478253706769916FFD603 1FCB0F9F9ED7C77556C7B66876411F21 BCEAD8D8541374F9DE2F325AA1C34712 80A2C84B66F7B6EB87B4FD3A7994DD5A 1009E825F6C5D8B53B5D2E856B206372 82448CABFD7CDC19635B0BE1D1F240FA 5517CC62919E440CEFAD501BFEEE5D3B 996A0E8E852D70CE80BF89662015053B 5AA2DBED77DD5C2390161F13D3A74163 40E09B30795DB0F8F32D29DA1F32DCA7
82F30890
g_a diffie-hellman parameter
server_time 560, 4692B8865 (1703422825 in decimal)0C718865 (1703440652 in decimal) Server time
@@ -658,19 +658,19 @@ answer = BA0D89B592F0495980B476E46BDF657D077071602F630EFC18D83F590818FE24F66F017 - + - + - + @@ -684,47 +684,47 @@ answer = BA0D89B592F0495980B476E46BDF657D077071602F630EFC18D83F590818FE24F66F017

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 = 54B6436692F0495980B476E46BDF657D077071602F630EFC18D83F590818FE24F66F017A0000000000000000FE000100B466195E80BDA27A26984FD61F37C70104ED1014482068434D5DA41DCC313A5FAC36FCD07DC07855611F104BB90C12818432CB3FEA1A9CA13400ED17F1D9CCC0C75E0337155FD42C677DFFB2439C58F5781DCD8C25A11EB474C6F9B350FD206379D29199784FB1CCA1404C2864187CB613F14B7229294B42619091CFB6160FDC8D05F25445646710A6D498CB00360C81250D1AAD71F25DE845B0F1BF51266C910976FF27D87D310258274A576C407D685B839E0F0BFC56F22135BF43B2949253FE7F927D7B967D7CCA0E18CFB30F6B98EFF384D3DA572A38BFEF2664F4EA3912E7AF6C98FDD10AB15F58263794A62938CB184BF9365CBE2D80D38AB8BC2F54DD
-padding = 8CD71C42C31884520DEFD6DB
-tmp_aes_key = 3A2455F86992C73BB43A2A7A7397E18CD56E1756616A3CBF4F601F32E08176B7
-tmp_aes_iv = EBE760B2B410B8ADE48EC7F9702FF9B9E76D9E5C4C18FD3ACE47DF2A890BEAEA
+
data = 54B64366E9A95CF0487975624F9FA59355262658F2A1DD5E12FDA6198AF1366369C0BD380000000000000000FE0001007EDE2DAB34332592ED6D6D25FCC64C7F6181BEF686125EB13B87DCE59CD40BCCAD464081671F5A94E23FF4536069F7740E3B43925B4CDF9DC757C5F9D372CAC08EAACAB895C06704B20E142B7AC568D3370AC19D39FC6BBCB09A65938CDDFE88654C4837C5EFC9D84756A7110F686CE3645A393726ABDE438820D9B8D6E2DDD39A13725D3BE166042E9AC5B75B4731ECEC26E20ADF8D3EDD172E001F0A75B6056805526D8F1414BDE14F4E643E8272B7610239D7C34ED877E1A9B0890FEE6B5868851D82417EC107B0F730D0AD4753E910C02604F5BAF63D03F9E868903BAA4DC4B908D3B581A023906EC45C342CF1BD94C62D9D988345209AEE5A7E1ABE6364
+padding = E2397B03564483A99EB2579F
+tmp_aes_key = D5584BCF5777990CB7FB90F7CD3FAE5635853CD460AE1FC4A85D97FBEAA23B22
+tmp_aes_iv = EC1C42108FBC566B0751FA13B685AF7E81DC5CA95DF70BCCE8C4CFD0DD9F00BF

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 = 6A85518F682E9B22FC69D96C945BF8AF75AE0078600F14C4D7CB19E5699744F8BA3652151CAFFCEC52C7AEBE0E651D73ECC52151463357E991C71B733BF82C8ECA9FCDD7CE98ED540C9B4C5A14B31FF9E1BCAB6A0167F03316AAF5252F3038CDAFF7ED55B0B827DD8DF15C9CA5ABA43001196C889928EA3C2A8DDA17AA6BD6043B3CB72B19D8C70B22C03437237003D90A372FA6EF7E63A48D965345686F4828BE5504B1A7BE126AEE30A981C94EE25ABD35285271BA0708A7F27E7E9F9C5300E627D1915EDA2AA91979B78C84DA24EB26EEBFC345EE7AC7CDBEB1E5A60E095745341EAADB809E4C38B3551E0AB066DDFED64345F28037648A4F38078D1C491E9E40DCEAB280D86B4532656FAADB1C06573332EEBBA573A0A9DB98C1F9CE301D6A9FEAE3B2476B432454E9C005823283F710F21DFEA3A5151D3404A5D007E45C985FA12B89B7CF1C8BD80437DC000279
+
encrypted_data = 44FD3B2D8DB981FB6BF9132FB418E767DAD6BEBC6270CDC631A91ABCCAAD60987F41AFCF9A19BD914AE521BDDEB737899BFD386DD059208FEFD6CCAD53BE74DD8F25C79AA22315A3C889F3C0B6B42E34677F6F06A5331CC5CFE77AB309FA8C988D3F6AD682B35D9B1ACF6C525DB86C7C78AB693A16984D1FF5CBC0B260D554115718D27B204D8699115939041A21144FD5A3D29B019F9D931C16C991407B5E6BF6C4E5853921D0965DFDBB195DC4B14E06CBF82BC7413BD63F9FC763A5ACF8D5A05080E1DBBA492475E03CB49C4AA34D1D4C78D8411D73E7940EEBBDFCEBE90F4A66D1808DBBC3DB64607AD59C7162241C50D60A30DC26DD01A98E53CFBBFAD9C0D8C313E931D8F074E73E2BCC978FE9E0D1FFEFE6599253EE86ABCF4DB7FED98EF34814223A2E8B8528A7250A17C4F7D3223E42E61F5CAF24FAB845053281FB5DD49A7A969D9F5A6CCB6ACFFDCDD593

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

Payload (de)serialization:

set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;
nonce 4, 1692F0495980B476E46BDF657D07707160E9A95CF0487975624F9FA59355262658 Value generated by client in Step 1
server_nonce 20, 162F630EFC18D83F590818FE24F66F017AF2A1DD5E12FDA6198AF1366369C0BD38 Value received from server in Step 2
g_b 36, 260FE000100B466195E80BDA27A26984FD6 1F37C70104ED1014482068434D5DA41D CC313A5FAC36FCD07DC07855611F104B B90C12818432CB3FEA1A9CA13400ED17 F1D9CCC0C75E0337155FD42C677DFFB2 439C58F5781DCD8C25A11EB474C6F9B3 50FD206379D29199784FB1CCA1404C28 64187CB613F14B7229294B42619091CF B6160FDC8D05F25445646710A6D498CB 00360C81250D1AAD71F25DE845B0F1BF 51266C910976FF27D87D310258274A57 6C407D685B839E0F0BFC56F22135BF43 B2949253FE7F927D7B967D7CCA0E18CF B30F6B98EFF384D3DA572A38BFEF2664 F4EA3912E7AF6C98FDD10AB15F582637 94A62938CB184BF9365CBE2D80D38AB8
BC2F54DD
FE0001007EDE2DAB34332592ED6D6D25 FCC64C7F6181BEF686125EB13B87DCE5 9CD40BCCAD464081671F5A94E23FF453 6069F7740E3B43925B4CDF9DC757C5F9 D372CAC08EAACAB895C06704B20E142B 7AC568D3370AC19D39FC6BBCB09A6593 8CDDFE88654C4837C5EFC9D84756A711 0F686CE3645A393726ABDE438820D9B8 D6E2DDD39A13725D3BE166042E9AC5B7 5B4731ECEC26E20ADF8D3EDD172E001F 0A75B6056805526D8F1414BDE14F4E64 3E8272B7610239D7C34ED877E1A9B089 0FEE6B5868851D82417EC107B0F730D0 AD4753E910C02604F5BAF63D03F9E868 903BAA4DC4B908D3B581A023906EC45C 342CF1BD94C62D9D988345209AEE5A7E
1ABE6364
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 = B2CE93368B11A779FE0440FCA53E14CB828D362BB785BC143189BFEA6568C3984B849E539520AADFDC707D757EAD1D484F9E21DB23C401B24DAEB77BCD24393119AFBB76A3565A8524FEBB8826A19FA9F3C8AA6DE9CD3E61ACCC67397F15DEAF85485E65A91DDFF0B42AB0A116CA1836B29AB202C4BB23EB4D3CD83A9E9AF768195EA5896A2E45BF57B39BDF100AA65A48E1ED45C94075AB0ED92C382BB6E3FC1EF0C86A0014E7271B84D0EC0C81A7410015760BE32D8AF026AB7C317A8B7103E178983A16B8E29B0C36B034595C733A5101E0B1A38ACC4D884089483C0FAB3815325604C679B865DB93759F05BAC1E74F37E3E300DE8FA39189FE898DC53B40
+
auth_key = 431578B02510B0396C0C03F9789AEE021F9CA817AD60BAE7EE2CE14B047EB7276E4733F42D655EBD492ACE24963B15FDB61EF051651284F679229A406A99B3C7F302E07C2E30F9B01732EDA7EBAFE22B7FDD4805E5D335C8ABE2F88A23AFEFBC59529BAEAE97B765AFC969DEB608ADC5F4702859D31D8D4F63313F0215648254C9A487CF220388A34B1DB7E9602127518F5DD85B8903C55C43D392090DC414F7D0268E584D9F115E5A54E487F5BE42FC45580676CB4AA4D56D529BFFEDD2075E936EDB19D0BE187E198625102CA209ACE3551EC51F0AD7A82EC500CE86EA3B317E5F8CF332F80CAD4B3CC61D1AC78FDACD64E4AF09B523940F12B1160B22A19E
9) Final server reply

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

Received payload (excluding transport headers/trailers):

-
0000 | 00 00 00 00 00 00 00 00 01 48 20 23 6A 2B 88 65
-0010 | 7C 00 00 00 34 F7 CB 3B 92 F0 49 59 80 B4 76 E4
-0020 | 6B DF 65 7D 07 70 71 60 2F 63 0E FC 18 D8 3F 59
-0030 | 08 18 FE 24 F6 6F 01 7A F0 68 88 B1 E3 27 FC B7
-0040 | 41 9B 90 89 C4 4B AF BF
+
0000 | 00 00 00 00 00 00 00 00 01 60 0E C2 0C 71 88 65
+0010 | 78 00 00 00 34 F7 CB 3B E9 A9 5C F0 48 79 75 62
+0020 | 4F 9F A5 93 55 26 26 58 F2 A1 DD 5E 12 FD A6 19
+0030 | 8A F1 36 63 69 C0 BD 38 42 3D 2F FB 93 E1 6F C4
+0040 | FA 01 DA FB ED C9 D5 BD

Payload (de)serialization:

dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;
message_id 8, 8F4340A00692B8865CC150B000C718865 Message ID generated as specified here » (unixtime() << 32) + (N*4)
nonce 24, 1692F0495980B476E46BDF657D07707160E9A95CF0487975624F9FA59355262658 Value generated by client in Step 1
server_nonce 40, 162F630EFC18D83F590818FE24F66F017AF2A1DD5E12FDA6198AF1366369C0BD38 Value received from server in Step 2
encrypted_data 56, 340FE5001006A85518F682E9B22FC69D96C 945BF8AF75AE0078600F14C4D7CB19E5 699744F8BA3652151CAFFCEC52C7AEBE 0E651D73ECC52151463357E991C71B73 3BF82C8ECA9FCDD7CE98ED540C9B4C5A 14B31FF9E1BCAB6A0167F03316AAF525 2F3038CDAFF7ED55B0B827DD8DF15C9C A5ABA43001196C889928EA3C2A8DDA17 AA6BD6043B3CB72B19D8C70B22C03437 237003D90A372FA6EF7E63A48D965345 686F4828BE5504B1A7BE126AEE30A981 C94EE25ABD35285271BA0708A7F27E7E 9F9C5300E627D1915EDA2AA91979B78C 84DA24EB26EEBFC345EE7AC7CDBEB1E5 A60E095745341EAADB809E4C38B3551E 0AB066DDFED64345F28037648A4F3807 8D1C491E9E40DCEAB280D86B4532656F AADB1C06573332EEBBA573A0A9DB98C1 F9CE301D6A9FEAE3B2476B432454E9C0 05823283F710F21DFEA3A5151D3404A5 D007E45C985FA12B89B7CF1C8BD80437
DC000279
FE50010044FD3B2D8DB981FB6BF9132F B418E767DAD6BEBC6270CDC631A91ABC CAAD60987F41AFCF9A19BD914AE521BD DEB737899BFD386DD059208FEFD6CCAD 53BE74DD8F25C79AA22315A3C889F3C0 B6B42E34677F6F06A5331CC5CFE77AB3 09FA8C988D3F6AD682B35D9B1ACF6C52 5DB86C7C78AB693A16984D1FF5CBC0B2 60D554115718D27B204D869911593904 1A21144FD5A3D29B019F9D931C16C991 407B5E6BF6C4E5853921D0965DFDBB19 5DC4B14E06CBF82BC7413BD63F9FC763 A5ACF8D5A05080E1DBBA492475E03CB4 9C4AA34D1D4C78D8411D73E7940EEBBD FCEBE90F4A66D1808DBBC3DB64607AD5 9C7162241C50D60A30DC26DD01A98E53 CFBBFAD9C0D8C313E931D8F074E73E2B CC978FE9E0D1FFEFE6599253EE86ABCF 4DB7FED98EF34814223A2E8B8528A725 0A17C4F7D3223E42E61F5CAF24FAB845 053281FB5DD49A7A969D9F5A6CCB6ACF
FDCDD593
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, 8014820236A2B886501600EC20C718865 Message ID generated as specified here » (unixtime() << 32) + (N*4)
message_length 16, 47C000000 (124 in decimal)78000000 (120 in decimal) Message body length
nonce 24, 1692F0495980B476E46BDF657D07707160E9A95CF0487975624F9FA59355262658 Value generated by client in Step 1
server_nonce 40, 162F630EFC18D83F590818FE24F66F017AF2A1DD5E12FDA6198AF1366369C0BD38 Value received from server in Step 2
new_nonce_hash1 56, 16F06888B1E327FCB7419B9089C44BAFBF423D2FFB93E16FC4FA01DAFBEDC9D5BD 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.