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 54fe2989e8..8e24998d1b 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 @@ For example, for the abridged version of the transport », the…">

1. request req_pq_multi

Sent payload (excluding transport headers/trailers):

-
0000 | 00 00 00 00 00 00 00 00 00 00 00 00 13 90 9C 64
-0010 | 14 00 00 00 F1 8E 7E BE A1 F9 B9 D5 B1 C7 24 55
-0020 | 20 11 1F B7 30 1C 95 C0
+
0000 | 00 00 00 00 00 00 00 00 00 00 00 00 C4 90 9C 64
+0010 | 14 00 00 00 F1 8E 7E BE DF D6 01 C3 D4 AD 9E 9F
+0020 | 59 2A 9E 0E 97 B3 E6 03

Payload serialization:

req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;
@@ -77,7 +77,7 @@ For example, for the abridged version of the transport », the…"> - + @@ -95,7 +95,7 @@ For example, for the abridged version of the transport », the…"> - + @@ -104,11 +104,11 @@ For example, for the abridged version of the transport », the…">

2. response respq

Received payload (excluding transport headers/trailers):

-
0000 | 00 00 00 00 00 00 00 00 01 A8 D4 9C 13 90 9C 64
-0010 | 78 00 00 00 63 24 16 05 A1 F9 B9 D5 B1 C7 24 55
-0020 | 20 11 1F B7 30 1C 95 C0 70 EA 28 24 B9 2F 73 9F
-0030 | 4C 26 45 7B 02 94 8D CA 08 28 6C A9 D9 90 2D A7
-0040 | ED 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 84 C1 D8 C4 90 9C 64
+0010 | 5C 00 00 00 63 24 16 05 DF D6 01 C3 D4 AD 9E 9F
+0020 | 59 2A 9E 0E 97 B3 E6 03 74 8B 67 63 BB E5 93 96
+0030 | D6 24 9A 28 79 1F F0 70 08 1B 0A 05 21 4E 98 91
+0040 | CB 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 serialization:

@@ -132,13 +132,13 @@ For example, for the abridged version of the transport », the…">
- + - + @@ -150,19 +150,19 @@ For example, for the abridged version of the transport », the…"> - + - + - + @@ -207,20 +207,20 @@ For example, for the abridged version of the transport », the…">

2.1. decompose p and q

-
pq = 2912889810893776877
-

Decompose into 2 prime cofactors: 1567638131 * 1858139167 = 2912889810893776877

-
p = 1567638131
-q = 1858139167
+
pq = 1948375429401842123
+

Decompose into 2 prime cofactors: 1272587959 * 1531033997 = 1948375429401842123

+
p = 1272587959
+q = 1531033997

2.2. encrypted_data generation

Generated payload (excluding transport headers/trailers):

-
0000 | 95 5F F5 A9 08 28 6C A9 D9 90 2D A7 ED 00 00 00
-0010 | 04 5D 70 42 73 00 00 00 04 6E C0 F4 1F 00 00 00
-0020 | A1 F9 B9 D5 B1 C7 24 55 20 11 1F B7 30 1C 95 C0
-0030 | 70 EA 28 24 B9 2F 73 9F 4C 26 45 7B 02 94 8D CA
-0040 | F6 CB F0 39 C5 6D 79 01 6C 22 33 6A C3 4A C3 CC
-0050 | C6 CF 1F 11 32 3A CB FC CB 06 62 7E 94 BB C3 59
+
0000 | 95 5F F5 A9 08 1B 0A 05 21 4E 98 91 CB 00 00 00
+0010 | 04 4B DA 26 B7 00 00 00 04 5B 41 B9 8D 00 00 00
+0020 | DF D6 01 C3 D4 AD 9E 9F 59 2A 9E 0E 97 B3 E6 03
+0030 | 74 8B 67 63 BB E5 93 96 D6 24 9A 28 79 1F F0 70
+0040 | 16 CE AD 6A 85 3A 5B C4 68 E8 1E 7C 54 EC 20 97
+0050 | C8 95 5D 1C C6 1F 6B 5F 13 4E 56 46 78 4C C0 81
 0060 | 02 00 00 00

Payload 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 @@ p_q_inner_data_temp#3c6a84d4 pq:string p:string q:string nonce:int128 server_non
 
- + - + - + - + - + - + @@ -291,39 +291,39 @@ p_q_inner_data_temp#3c6a84d4 pq:string p:string q:string nonce:int128 server_non

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 = 955FF5A908286CA9D9902DA7ED000000045D704273000000046EC0F41F000000A1F9B9D5B1C7245520111FB7301C95C070EA2824B92F739F4C26457B02948DCAF6CBF039C56D79016C22336AC34AC3CCC6CF1F11323ACBFCCB06627E94BBC35902000000
-random_padding_bytes = C00B71D54D522A134D231AEE7DD68B5290D97FA57F4C2A735C4A5FC2044F28D9C361D1E16F70C6A33477F27B5EF538D532398E3A34BE17192389F2C3F214F8F2A50C9646E1143EA5B5C421DE5A2F8A20FBDC3F3C08D706F13EDA3BB9
+
data = 955FF5A9081B0A05214E9891CB000000044BDA26B7000000045B41B98D000000DFD601C3D4AD9E9F592A9E0E97B3E603748B6763BBE59396D6249A28791FF07016CEAD6A853A5BC468E81E7C54EC2097C8955D1CC61F6B5F134E5646784CC08102000000
+random_padding_bytes = 0A82901E4C955DEF7CB1FF0A698F2E1AF69116524EA5E8DFCEC0A5EAE4536B99D061DA8BFF2103419464FD69303912D9D62F377CC3245D7347AA1D0F8F8FE881C97EE2DFB2BDBE2E2D88FAAE42594F29D1770E17B44CF4B67CB36486

And this is the output:

-
encrypted_data = C576240305C4E62F0D4C1C7DA76D16A3F0529C38CC8AC087C3A098D44B4A6D96E0508217EEE987E092F079FE61ED02D73B513E612D1CA391D3DFF3AFEE0919B45A5E5F80677517543A2624E46E238564118311EABB002ECE73BAD010C1DAB49F422FF700351772C017721407B6058F684A65C271B618AD30B6FFAC6F27AA39F7425E6C20AB1B3F3CEF228863F88D0EE72409A5E737C928562CF4FCA9C2158FBD92991126735E7C0A036CE498C9675017C10137AB1D0584CB7D75975DE4F3D3746B8416ACDA103A753C0B249D0D29D0E0E81206B56BC583333DEABEA203D7E42A19680F4C3996E408E369D208533C2C6EE9D1574F3722BCD9EC15789EE285942A
+
encrypted_data = C7B379DAF991447C61EEE34A0138053144E1FDB4DDAFA91909DDF35EB762DC35D1DE3F147E4A6DC44B7088B13A68BA103C621149578590BDD22CBEC0A61014AFEEC51623362AEDA4349AE0F35594D8941775AB5E646CABB26A3214E7873C45830E4A64C722C7E60D17F95DF82ECA383183CA1BFAB4545F2706860F61B6372777A85EDF44783227E3821835C78603115369E2EC01E788CAB624426F73CD4B7BA1BCA9AC831A92FCA878BE701B12772DEF1A7B3854F70C96F3856B50B2CCF775E4F661790CFC3B44D415432E00D6D2A98BF9D709A2C6C43BD3014D5F81025D4A1B68977004708EF7CB3FAE68F4248F26A2C52AEBF18F48478451D7461D09024A10

The length of the final string is 256 bytes.

3. request req_dh_params

Sent payload (excluding transport headers/trailers):

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

Payload 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, 80000000013909C6400000000C4909C64 Exact unixtime*2^32, +(4*N) if N messages with the same message ID were already generated
nonce 24, 16A1F9B9D5B1C7245520111FB7301C95C0DFD601C3D4AD9E9F592A9E0E97B3E603 Random number
message_id 8, 801A8D49C13909C640184C1D8C4909C64 Exact unixtime*2^32, +(4*N) if N messages with the same message ID were already generated
message_length 16, 478000000 (120 in decimal)5C000000 (92 in decimal) Message body length
nonce 24, 16A1F9B9D5B1C7245520111FB7301C95C0DFD601C3D4AD9E9F592A9E0E97B3E603 Value generated by client in Step 1
server_nonce 40, 1670EA2824B92F739F4C26457B02948DCA748B6763BBE59396D6249A28791FF070 Server-generated random number
pq 56, 1208286CA9D9902DA7ED000000
TL byte deserialization
=> bigendian conversion to decimal
=> 2912889810893776877
081B0A05214E9891CB000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1948375429401842123
Single-byte prefix denoting length, an 8-byte string, and three bytes of padding
pq 4, 1208286CA9D9902DA7ED000000
TL byte deserialization
=> bigendian conversion to decimal
=> 2912889810893776877
081B0A05214E9891CB000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1948375429401842123
Single-byte prefix denoting length, 8-byte string, and three bytes of padding
p 16, 8045D704273000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1567638131
044BDA26B7000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1272587959
First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
q 24, 8046EC0F41F000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1858139167
045B41B98D000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1531033997
Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
nonce 32, 16A1F9B9D5B1C7245520111FB7301C95C0DFD601C3D4AD9E9F592A9E0E97B3E603 Value generated by client in Step 1
server_nonce 48, 1670EA2824B92F739F4C26457B02948DCA748B6763BBE59396D6249A28791FF070 Value received from server in Step 2
new_nonce 64, 32F6CBF039C56D79016C22336AC34AC3CC C6CF1F11323ACBFCCB06627E94BBC35916CEAD6A853A5BC468E81E7C54EC2097 C8955D1CC61F6B5F134E5646784CC081 Client-generated random number
@@ -345,7 +345,7 @@ random_padding_bytes = C00B71D54D522A134D231AEE7DD68B5290D97FA57F4C2A735C4A5FC20 - + @@ -363,25 +363,25 @@ random_padding_bytes = C00B71D54D522A134D231AEE7DD68B5290D97FA57F4C2A735C4A5FC20 - + - + - + - + @@ -393,7 +393,7 @@ random_padding_bytes = C00B71D54D522A134D231AEE7DD68B5290D97FA57F4C2A735C4A5FC20 - + @@ -402,47 +402,47 @@ random_padding_bytes = C00B71D54D522A134D231AEE7DD68B5290D97FA57F4C2A735C4A5FC20

4. response server_dh_params_ok

Received payload (excluding transport headers/trailers):

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

Payload serialization:

server_DH_params_fail#79cb045d nonce:int128 server_nonce:int128 new_nonce_hash:int128 = Server_DH_Params;
 server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;
@@ -465,13 +465,13 @@ server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:s
- + - + @@ -483,19 +483,19 @@ server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:s - + - + - + @@ -505,9 +505,9 @@ server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:s

Decrypt encrypted_answer using the process specified in step 5.

Generated payload (excluding transport headers/trailers):

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

Payload 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, 80400000013909C6404000000C4909C64 Exact unixtime*2^32, +(4*N) if N messages with the same message ID were already generated
nonce 24, 16A1F9B9D5B1C7245520111FB7301C95C0DFD601C3D4AD9E9F592A9E0E97B3E603 Value generated by client in Step 1
server_nonce 40, 1670EA2824B92F739F4C26457B02948DCA748B6763BBE59396D6249A28791FF070 Value received from server in Step 2
p 56, 8045D704273000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1567638131
044BDA26B7000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1272587959
First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
q 64, 8046EC0F41F000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1858139167
045B41B98D000000
TL byte deserialization
=> bigendian conversion to decimal
=> 1531033997
Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding
encrypted_data 80, 260FE000100C576240305C4E62F0D4C1C7D A76D16A3F0529C38CC8AC087C3A098D4 4B4A6D96E0508217EEE987E092F079FE 61ED02D73B513E612D1CA391D3DFF3AF EE0919B45A5E5F80677517543A2624E4 6E238564118311EABB002ECE73BAD010 C1DAB49F422FF700351772C017721407 B6058F684A65C271B618AD30B6FFAC6F 27AA39F7425E6C20AB1B3F3CEF228863 F88D0EE72409A5E737C928562CF4FCA9 C2158FBD92991126735E7C0A036CE498 C9675017C10137AB1D0584CB7D75975D E4F3D3746B8416ACDA103A753C0B249D 0D29D0E0E81206B56BC583333DEABEA2 03D7E42A19680F4C3996E408E369D208 533C2C6EE9D1574F3722BCD9EC15789EE285942AFE000100C7B379DAF991447C61EEE34A 0138053144E1FDB4DDAFA91909DDF35E B762DC35D1DE3F147E4A6DC44B7088B1 3A68BA103C621149578590BDD22CBEC0 A61014AFEEC51623362AEDA4349AE0F3 5594D8941775AB5E646CABB26A3214E7 873C45830E4A64C722C7E60D17F95DF8 2ECA383183CA1BFAB4545F2706860F61 B6372777A85EDF44783227E3821835C7 8603115369E2EC01E788CAB624426F73 CD4B7BA1BCA9AC831A92FCA878BE701B 12772DEF1A7B3854F70C96F3856B50B2 CCF775E4F661790CFC3B44D415432E00 D6D2A98BF9D709A2C6C43BD3014D5F81 025D4A1B68977004708EF7CB3FAE68F4 248F26A2C52AEBF18F48478451D7461D
09024A10
See Generation of encrypted_data »
message_id 8, 801C02E4114909C640164D069C5909C64 Exact unixtime*2^32, +(4*N) if N messages with the same message ID were already generated
message_length 16, 4A0020000 (672 in decimal)C4020000 (708 in decimal) Message body length
nonce 24, 16A1F9B9D5B1C7245520111FB7301C95C0DFD601C3D4AD9E9F592A9E0E97B3E603 Value generated by client in Step 1
server_nonce 40, 1670EA2824B92F739F4C26457B02948DCA748B6763BBE59396D6249A28791FF070 Value received from server in Step 2
encrypted_answer 56, 596FE500200A37DDE27DD2CD8365E53A44D 458FAEC707B84FFD0D1DC60F93EB8DEE 86408CDE4D4ACC01DEF41CA8F3F5530C A67C07C60F80B373EB00954BBA8DCA2F EBCC73374855DCACE34A584F835443B1 4CF61BB8D50232315B8423C48609B4F9 4300AA85ACDD37AE4833CF7262FD78F9 E9CF5591CCB137168CCB51C232D0993F B913EBF38428BA714C7C443B5434BFF6 EBC2649CD52BE10D91AFEBA29E8FF1CA E7905E05250450E9D4A82D3220A94DE8 CEDA2F5B30E5AA1EE5FD30B4F8411D98 1BFD7322650801490EBC4B06942493DB B2E3D61AEF428ED963E1696C26420224 65D2E457FDF970FC54A168483B26E457 DA08A3FA17BC1754E603CDF717C637C2 A4716E868E98DA8CEE3C1134620C12A0 A0129F136CD1E1F44AC1F6E9DBAB69A8 DE5C1E981204955EE6D147CF122BC6D9 693CCC31C8462B20512308525C42A244 4B0023F31F8491992111D1F70D15B060 BC129A98C48B1D3CF782F0808D2479CA 42164FFB92FD2C2DCFEB56E4953ECB49 6829E6FFBA59FFF5D8A66E4382D3AF89 BCA5143834EA4B2C30C7DE8D65A32FA6 390D57F7D502578FBA7616200D5B2E5B 12A899B8EB10C9EF4835C3B5ED95427F 063F0AFD1963ADF65CBC1FEC55CC2822 DDDE4A7EEBDCAD6EABADB0CF51A3D0FA 5A141B31BBE575187E6D7CCC57977D2E 7D86AA505F10F50034586375DCF22B9C 91B5B4B01151971E20E101E35418DF6C 1E896CBCDF6177FF9003B0DF2175F7A4 DC61C6FD7A7654AE504CDCA01A22314B 88D54A1BA4D6D490ABFA71DA42893CD8 2845FE55DAC268B2001D2B07AF47B509 2F2B4A7DFDD098480D53419D52DD9342E6E3F7E1FE500200941DB6389BB212EE21EFDC8F CBF22F9D12853E320DCCC7985D4EE801 A5B671512EC6228330245849E5D1980A B5D013237936E76130154D9F742C8F49 DBE6CAB450AC88A74D38E7E1C177E57E BB4AA534BA93DF8923BE4B1D60533A5D DF80DDB66CE7BAFA648A6BFC79B64142 1BDD30B4992FBB1871F94CD86F5C4953 E7540750EF5B80C0E34CA15964E8F40D C87D39B6A5EC270FFB84C7768AFE7C03 A0F2367728687C3642CEA73251754AC0 28556AEDD283FF18DB65A2D6B0A80B93 F2EDB5644ABD97762A5DE6449E29C9DA 78EFEAEBF0F6C97E2F52F99E99C9B861 7D8BB5BF769F4BF429E632F464D1C655 97F392B11900BE6C78D21CF1BABC4991 F0BA557A57FFEA041609E503856BFFFD F73D2A20392039C1EB8E21A3BA95CC85 267D00499B639AB2F7345E9276D4206C 151C2AA3A000016DB8309A5F54E265A6 F4BEAC0BDB486D2ACD539C1DD10E5F74 96582A5248CDD7DDC8E6D494CB7BBDA2 E9C7402C327003B92D7AA8BB77951FD5 83C148E3C5DC82C0EE0C11F0E6B2590F 3A1349D9076CDE62C3A162BA0EFD9060 EC7FB8FEF9DAABFFF86D4FDC5679CFF1 65C933DFBF81C25F6EDCB28730179560 A934272A944A64A287B101ED18E8B012 1C24EBF6C053A0F7FB38958FCC6360D5 2F66701499016C18363A95D3AAC8321E ED6209FD54B86E1361E6CA2BBEF603C6 6D4E8C732DD91BEA011913440E947711 A47D052CC7DBEB3C4EFF09F81FC38FCD 349AE79ECE9851AC8FA5611CDCD80785 DD7F50EE2A652D32E3D0FDD6D9A7D117 14B04F6D4F507F5BE5042C24A7B921AB 1B1D0E8B3AD27718F7198C34D9EACA57
E795AC60
See Decomposition of encrypted_answer »
@@ -562,13 +562,13 @@ server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:s - + - + @@ -580,19 +580,19 @@ server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:s - + - + - + @@ -601,34 +601,34 @@ server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:s

4.2. generate diffie-helman parameters

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

-
b = E462A59CDB5CF30663768339228829F5626875E6C4EBD090CED99DAD8E0E8E4FEB63929E982673D12CDF5F5B8C80672DB6631246A7A794EFB29AA9DBCED0750557DE4E552937EF797184693AF0691AB79A66F6A093F8EAD7B3FA9DE8A3672CD2D6DFED1AD93A86A2FE073534FC2C719C2DD1692E5D65A481F312019ADF474503032DA7C24580FB95788EF9D4F222512619FE047D100E96F73E568276D4458B507DA463B19F691BC25571C3E59837ABA05AC5EBBD390126A80E8CCA94661F1BCABEF4A88A646C3D1C0C0CCAC3F5B1471AC5571043094EC328D304A377998992FAA0C46EDADD33FD09C9C727A9583B38192A316BB58C45512DB6C8848904ED7375
+
b = 9A995B773D2EFDBC35278F68CE723EBD131407AE61447E983B144A714FB86AF6029CE9537D24E5AD6CFE7335079D4B00725FDE14A974CC8D6C01B98EE6AA208D189A09514499060DB69BE3624425F3FCC8E53188FD3F60593E43945B8D2C5DEAC6A5A94EBDDDDD6ABF349044F28E6DCA180F6707B61B379B7C40BD20347FC16AA9D421CF523C8CC2EE024E0FCCF8D12BC40A2B83FF48747B2F651D20A65A044B8EEBA44C5AE9639B279868DCD774926FBA74767693B60D9C9F480C7E6C38839197F71E0A901972D2E467AE67BC57B9922655012F9C4A4C32546D9486559E3D0C193D92FC6349F5007C89907C3678F04F6B5745520929FB30677F3F75643CF5A1

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

-
g_b = 036B95C4619BE45DA07482AFF85439E8982344A97F94B044DB2F5626A6E7E3B4CDF5B817A1BF5F5E36A528EB21CBD61E8FE69C4DCF4F5BF11C0E6BE0A9097449023527DBCBC767EBDBE443B88D6770094723F99F39F64CA2991AC9E5E2F470BB52068164E846F5E786B4968BB35940B4D41C9F754C85C4E40FC17E90D076D42F55154E0586F0EC67CFD6E8234B82F5D50420EFC121D8EF1D7970B7FC3A7C48334D7339566A462CDC6D67AFCFE643CEA20F1C2EFE09D9E8C5B43D5AC667157601C21DA10DC60357B7496C880E1E172EABF165316A023C1964E01B2AA123927F0C1212558B872E9EC5C7F7E4F6E82F657BF36BEE66D3C311E9342FC1BBE40BCAF0
+
g_b = B5841CD8246261CFBD6FDA1C4BF64E7ECCC82C19EAB86C59D986C429D6A0D5204C547C74ED6AB61E28A4AA9A39FA676D14C1C9FACCE9B9D3056A34093408CEC28EEDF5F09AC3F2645137D91F50E4FE6A358A24507EB3E8AB94312D8013C4740E492C0A5E902E2E460CFA96055C8682C3B220D0E1661884FCE525D3AD8ED7B23D3B341BDFB1D5DD988F363A48730EC1565313B20AD286FD7E36317E3D870E92A9AEBAB835833F023A185168922FA7BCEA7D5F4F0B1B7DBD10F0818D7F9A4A94961EA4597415E457CD575E309B73225F205CD2D67918C00C170412CD430D6A343D061C4BAD7AC149CC4EC5F1910F3A0C09D184C9F123FCA71C51E83419E9E5F64D

4.3 generation of encrypted_data

Generated payload (excluding transport headers/trailers):

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

Payload serialization:

client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;
nonce 4, 16A1F9B9D5B1C7245520111FB7301C95C0DFD601C3D4AD9E9F592A9E0E97B3E603 Value generated by client in Step 1
server_nonce 20, 1670EA2824B92F739F4C26457B02948DCA748B6763BBE59396D6249A28791FF070 Value received from server in Step 2
dh_prime 40, 260FE000100C71CAEB9C6B1C9048E6C522F 70F13F73980D40238E3E21C14934D037 563D930F48198A0AA7C14058229493D2 2530F4DBFA336F6E0AC925139543AED4 4CCE7C3720FD51F69458705AC68CD4FE 6B6B13ABDC9746512969328454F18FAF 8C595F642477FE96BB2A941D5BCD1D4A C8CC49880708FA9B378E3C4F3A9060BE E67CF9A4A4A695811051907E162753B5 6B0F6B410DBA74D8A84B2A14B3144E0E F1284754FD17ED950D5965B4B9DD4658 2DB1178D169C6BC465B0D6FF9CA3928F EF5B9AE4E418FC15E83EBEA0F87FA9FF 5EED70050DED2849F47BF959D956850C E929851F0D8115F635B105EE2E4E15D0 4B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100C71CAEB9C6B1C9048E6C522F 70F13F73980D40238E3E21C14934D037 563D930F48198A0AA7C14058229493D2 2530F4DBFA336F6E0AC925139543AED4 4CCE7C3720FD51F69458705AC68CD4FE 6B6B13ABDC9746512969328454F18FAF 8C595F642477FE96BB2A941D5BCD1D4A C8CC49880708FA9B378E3C4F3A9060BE E67CF9A4A4A695811051907E162753B5 6B0F6B410DBA74D8A84B2A14B3144E0E F1284754FD17ED950D5965B4B9DD4658 2DB1178D169C6BC465B0D6FF9CA3928F EF5B9AE4E418FC15E83EBEA0F87FA9FF 5EED70050DED2849F47BF959D956850C E929851F0D8115F635B105EE2E4E15D0 4B2454BF6F4FADF034B10403119CD8E3
B92FCC5B
2048-bit prime, in big-endian byte order, to be checked as specified in the auth key docs
g_a 300, 260FE000100090D878A770D8BC39FD66502 CC47E29AAEFFD127DD1511907034FF46 7627A17620B6C321E5C04FD3D4CE55D5 F0EF8614F889F402EBFC703E499451EC 4269F1AB168857EE0738DB48F7AE0422 BCB96E131D27DA0F07DED601A59A3E2C 1F90F4DFC9A2E49244065B7859232DF5 650F0FF26640C523E69F34DB383818BC B826A12FEFB9847C5911A6230D16FDF6 C379BF0C7DE22CCD57D5DCF6A74AAC3F 8E888BA67EAD2C7FA619729BF0E472B3 8EC6B9AE4508A6BAE520D96611EC65DD AF4A95CED216B996A1EB5089AF75E24F 5FD2E55E7169A36C589FA131512BC949 667CBD73B7975D6144A9E38B0CB13FD9 3C06EDA84F843CF583718817E154D8A508B7F266FE000100790F9F6EE3E6FF349CDFECE3 86C81B492AF87B0DB100CB7CD96EE29A 6F741AFFA78F6A487C898011FF3B647E 3E1B79BCAAC2747E10FAFAB369ADBA9E E67FDD31679CD3356B069FE31F80B25F 15D46E8664030E4BEA407AA89022C7CB A27BAAE587465D8FB5C00BA05B749243 941A11598B4845B480C44C380FF8AC87 4EFB22518417432328AD26362907D1B4 650C026595499F53558211FC08D80072 9800B6CFEC22F0E9EB564CA77E7A7F97 D1A92165901F652AACDC0980BDF8A1F1 0A097DC8490DFA271A16DFB0AB2DFB10 286F6E1203AB0A925CDEDED4BB940043 4D47C59008E967963BE11D5E12F58B8B 3714883F7A024866DB593A3268F398CE
D9539837
g_a diffie-hellman parameter
server_time 560, 414909C64 (1687982100 in decimal)C5909C64 (1687982277 in decimal) Server time
@@ -650,19 +650,19 @@ server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:s - + - + - + @@ -681,31 +681,31 @@ AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv) = 928A4957D0463B525

5. request set_client_dh_params

Sent payload (excluding transport headers/trailers):

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

Payload serialization:

set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;
nonce 4, 16A1F9B9D5B1C7245520111FB7301C95C0DFD601C3D4AD9E9F592A9E0E97B3E603 Value generated by client in Step 1
server_nonce 20, 1670EA2824B92F739F4C26457B02948DCA748B6763BBE59396D6249A28791FF070 Value received from server in Step 2
g_b 36, 260FE000100036B95C4619BE45DA07482AF F85439E8982344A97F94B044DB2F5626 A6E7E3B4CDF5B817A1BF5F5E36A528EB 21CBD61E8FE69C4DCF4F5BF11C0E6BE0 A9097449023527DBCBC767EBDBE443B8 8D6770094723F99F39F64CA2991AC9E5 E2F470BB52068164E846F5E786B4968B B35940B4D41C9F754C85C4E40FC17E90 D076D42F55154E0586F0EC67CFD6E823 4B82F5D50420EFC121D8EF1D7970B7FC 3A7C48334D7339566A462CDC6D67AFCF E643CEA20F1C2EFE09D9E8C5B43D5AC6 67157601C21DA10DC60357B7496C880E 1E172EABF165316A023C1964E01B2AA1 23927F0C1212558B872E9EC5C7F7E4F6 E82F657BF36BEE66D3C311E9342FC1BBE40BCAF0FE000100B5841CD8246261CFBD6FDA1C 4BF64E7ECCC82C19EAB86C59D986C429 D6A0D5204C547C74ED6AB61E28A4AA9A 39FA676D14C1C9FACCE9B9D3056A3409 3408CEC28EEDF5F09AC3F2645137D91F 50E4FE6A358A24507EB3E8AB94312D80 13C4740E492C0A5E902E2E460CFA9605 5C8682C3B220D0E1661884FCE525D3AD 8ED7B23D3B341BDFB1D5DD988F363A48 730EC1565313B20AD286FD7E36317E3D 870E92A9AEBAB835833F023A18516892 2FA7BCEA7D5F4F0B1B7DBD10F0818D7F 9A4A94961EA4597415E457CD575E309B 73225F205CD2D67918C00C170412CD43 0D6A343D061C4BAD7AC149CC4EC5F191 0F3A0C09D184C9F123FCA71C51E83419
E9E5F64D
pow(g, b) mod dh_prime
@@ -727,7 +727,7 @@ AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv) = 928A4957D0463B525 - + @@ -745,19 +745,19 @@ AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv) = 928A4957D0463B525 - + - + - + @@ -766,17 +766,17 @@ AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv) = 928A4957D0463B525

6. auth key generation

The clients computes the auth_key using formula g^{ab} mod dh_prime:

-
auth_key = 550EABB544BBED3192BDC4914FF864B914BABC8026A4F9E9AD82D6DA35BC8EE141A04978963F9704191F93FDE7C138911610390797D66BAD3EAE14E891EE8F2A5AF52FC392FE98C0EE64DD557179C5D92919C5BE6B7FF5B394A1486C09F2F9BA27484021BAE0B3D65A3BC37CD7086DC58BD9B85B066D971C5BF107CB229700D9A05559D3B2547152124EAA507C4B845D8AD4138F66B671B556A5F686DCC2A5BD4C29352ACD1BA090F8D948FD9A29818CF77EB4C61AC3E9F0DE55B3FEFB89BCDECFED1440E443368F2AC98735FC50448870CD15E9E54015AF11B9DEC1EB3B642A25E396F22C580EF42F7B5D4F41D24C23A412657DB5A203D20EFA29A963C6F1C8
+
auth_key = 7AB41163F9DADC0E7AD17B0ED9C960B23436B0925E8D875C14AE2CB171D3B37F5E98A186E6C447641AD963FB63D99B31DEF206F55D522A41D120D04C4D5ACA12CEBF1130A4BF09C7A430CF5ACF550BA166CAE2AD842ECD94E26B4DC57460F537B2CB1DEEB8F681ABFF0C416757BAE47C4B1E2BFEE3EEB994D653D9794633A5C8BE0EEAEE35E1DFA271BE94140F39FCDAE9DD51330C7F46761744F4B79CBFB89A82891567A4AB8924C84F2024049F3E2DB86E6008454A0D3E5353E44E72CB2E1A24CFF0573F8EC4FE420EF0F4D15DE37749D2907DDB960C9BA0A8C89EA6AFAD8E8B0862D231329DEC391C793D067F4459587A5D6374B188126A949852133013A6

7. reply set_client_dh_params_answer

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 04 20 8A 14 90 9C 64
-0010 | 74 00 00 00 34 F7 CB 3B A1 F9 B9 D5 B1 C7 24 55
-0020 | 20 11 1F B7 30 1C 95 C0 70 EA 28 24 B9 2F 73 9F
-0030 | 4C 26 45 7B 02 94 8D CA 87 FA CB 12 63 11 10 7E
-0040 | CB 62 4A C0 8D 59 55 B4
+
0000 | 00 00 00 00 00 00 00 00 01 94 13 B1 C5 90 9C 64
+0010 | 38 00 00 00 34 F7 CB 3B DF D6 01 C3 D4 AD 9E 9F
+0020 | 59 2A 9E 0E 97 B3 E6 03 74 8B 67 63 BB E5 93 96
+0030 | D6 24 9A 28 79 1F F0 70 61 A9 07 63 0C 8B FD 9E
+0040 | 2E D7 28 5B 0B 4C C8 26

Payload serialization:

dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;
 dh_gen_retry#46dc1fb9 nonce:int128 server_nonce:int128 new_nonce_hash2:int128 = Set_client_DH_params_answer;
@@ -800,13 +800,13 @@ dh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = S
 
- + - + @@ -818,19 +818,19 @@ dh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = S - + - + - +
message_id 8, 80000000014909C6400000000C5909C64 Exact unixtime*2^32, +(4*N) if N messages with the same message ID were already generated
nonce 24, 16A1F9B9D5B1C7245520111FB7301C95C0DFD601C3D4AD9E9F592A9E0E97B3E603 Value generated by client in Step 1
server_nonce 40, 1670EA2824B92F739F4C26457B02948DCA748B6763BBE59396D6249A28791FF070 Value received from server in Step 2
encrypted_data 56, 340FE5001003ECBCE8397309DA1845B9388 3B11992190FFB9C552265C262C6277A3 0E61862BC5450D6721781F07CEAD8167 FEE4BE784E4AAFF573D9DD31ED4C7648 DBD5A93CF2906EBBDE0CE8F2F52FD681 3CC3F863469CF0BEC77AF8A72B101AD6 BB93001A20C9E8F0EFA0AA458E84A0F2 BC74D1BE4D7ABBBBEC9AB69BDAC57EB7 83915117168353787BB6B673B43CBC33 FC0B280ACFE72E1BEA4DB7ECF6D6307C CCFB0F0C066868A382ACEAC68EA4AB0B 313A16EFDE55C34BF4F119E7F0EE5BD7 792FC85223C199AA7944EC8811940DCE 470CF6A1522335EBBA78EDF25975FE0E BD0633E01DEB6C8701A6BFF19AAB13BB 3E1E4C1743780412456E0133B370DC70 852063822002DE0050089E3749E5E62F D3B98CC040A160454A8156E6765B1C7B 22D36703A3ACD46BC50AF373C2F0CC4A 1C31453025D9A8704552BA9FE5E7F319 85B0548AB39333F9DBE93CC083FFBD09BA66DA06FE5001006190D43D96794AF681C7366F A0507F35CBE50FD01ED9BF2749B1D4DB B917C773B605B5370CF101A20CF8A6E3 5EC8C7F07FA2B4C3CFF97D1155FD9037 9BA3D58753101AD4FA368F0C56B9C57D 501C14AFF85C97657340A6F3458713F5 F7D74B2B79455203224F425DE4652D05 A44AFFA4E770B6CFA8BDD22C01B64C3F 0D3209D84C64FFC7EBC9B3C85D8C02F9 D27EF720EEA4DC7871A7C9F14C0AB131 355EEB80EEC9168F8683264DFFF94875 41F9B52DC692157A716FA0CC9E450F44 CFF419BB0EB87C521DF81C9D24F34D47 772A6387B93D4C5FE0CAE8444B29BE25 38C4E0CA5EE69A2049F8C92B09FE52BE 48E9E65C767DD26C5D523642A61104D1 B6819C88D9A9775AE8564A72218B38DC 53487E91959E5AEC7CE8DB02044D2DD1 C8262AF65075E30F2CEA997360CF1FEF B7A3464E1C6924617BCED6B3AD89A587 42204DA0760EEBE58DA281B4C10D9732
99E05867
Encrypted client_DH_inner_data, generated as follows
message_id 8, 80104208A14909C64019413B1C5909C64 Exact unixtime*2^32, +(4*N) if N messages with the same message ID were already generated
message_length 16, 474000000 (116 in decimal)38000000 (56 in decimal) Message body length
nonce 24, 16A1F9B9D5B1C7245520111FB7301C95C0DFD601C3D4AD9E9F592A9E0E97B3E603 Value generated by client in Step 1
server_nonce 40, 1670EA2824B92F739F4C26457B02948DCA748B6763BBE59396D6249A28791FF070 Value received from server in Step 2
new_nonce_hash1 56, 1687FACB126311107ECB624AC08D5955B461A907630C8BFD9E2ED7285B0B4CC826 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.