Dear sir,
We are making the the meter reading software but facing issue in LN with ciphering
As per green book and your comment about one post that
AES-128-GCM require
1. System title 2. Block Cipher key 3. Authentication key 4. Dedicated key 5. Frame counter
We have generated the ciphered pdu and authentication tag and add in AARQ request.
We have also received the AARE reponse and also decrpt and get conformance block.
AARQ request.
7E A0 70 03 41 10 AD DF E6 E6 00 60 62 A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 4C 54 43 4C 49 45 4E 54 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 06 80 04 6C 6E 74 31 BE 34 04 32 21 30 30 01 23 45 69 71 5F 4B F4 AA C5 18 12 F3 1A C7 32 5B 75 41 5E D8 AF E7 42 50 0C 50 4B 5A 70 6F 13 67 18 42 76 02 66 05 62 EC 5F F9 51 52 36 61 2A 9C 7E
AARE respnse
7E A0 56 41 03 30 7E FC E6 E7 00 61 48 A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01 00 A4 0A 04 08 4C 4E 54 31 39 32 35 38 BE 23 04 21 28 1F 30 00 00 03 DB A1 88 FF 35 34 1E 62 75 D6 9E 3B 24 A5 58 A5 74 B5 DA 3E 3E BD 15 6B 5A 81 17 65 FA 7E
15:17:00 Parsing AARE reply succeeded.
But facing issue in ciphered pdu in GET Request Normal
How the ciphered data generated .I follow the same procedure for ciphered data as in AARQ
means using System title,AAD,IV,EK but cipherd data is diffrent.
I am trying to read 1.0.1.8.0.255 class 3 attribute 2
Request
7E A0 2C 03 41 98 CF 95 E6 E6 00 D0 1E 30 01 23 45 7E 2B 83 54 61 B7 AE 18 20 C3 5B 0C39 49 00 57 B1 BE 0E 58 1C 31 B0 60 8B 26 2A 4F 7E
D0- Tag
1E- length
0123457E- Frame counter
2B 83 54 61 B7 AE 18 20 C3 5B 0C 39 49 00 57 B1 BE 0E 58 1C 31 B0 60 8B 26 -What is used as input for this ciphered data generation?
00 00 00
13 A7 A7 10 B1 A6 64 D8 73 BA 5B FF A4 08 1A 37 7A 83 86 E5 10 68-- Same for this ciphered also?
What is input for this cipherd data genaration
Dear Sir
Below is DLMS Director log
Yellow- Frame Counter
Green- System Title
Blue- Ciphered PDU (Ciphered Data+ Authentication Tag)
Initialization vector-Using frame counter(Yellow marked)and System title(Green marked)
Authentication key+Encryption key as provided by manufacturer, We can generate the Ciphered PDU
And is matched with Gurux Director ciphered AARQ (Blue marked)
But use same technique my read request ciphered not matched with DLMS director log.
I used gurux dlms director log framecounter(yellow marked)+system title(green marked) alongwith encryption key and authentication key not able to generate ciphered data. Is any other technique for this ciphering ?
Is frame counter show in read request as yellow marked used for Ciphering?
Sir,
As you require,Please find the raw data which is same as image attached marked with colour for differentiation.
GXDLMSDirector 8.2.2007.060
18:42:32 Initializing serial connection.
18:42:33 Send SNRM request.
7E A0 07 03 41 93 5A 64 7E
18:42:34
7E A0 1E 41 03 73 8E 7F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
18:42:34 Parsing UA reply succeeded.
18:42:34 Send AARQ request.
7E A0 70 03 41 10 AD DF E6 E6 00 60 62 A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 4C 4E 43 4C 49 45 4E 54 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 06 80 04 6C 6E 74 31 BE 34 04 32 21 30 30 00 00 14 F4 8E 98 88 72 1E 49 AE F8 9B 0C 4D 24 5E 80 42 B8 0A FA 04 C9 EC A0 58 00 95 89 24 0C C7 C7 B8 F6 67 79 F4 48 50 D1 E7 52 46 F5 3A C5 C8 7E
18:42:34
7E A0 56 41 03 30 7E FC E6 E7 00 61 48 A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01 00 A4 0A 04 08 4C 4E 54 38 35 31 32 31 BE 23 04 21 28 1F 30 00 00 14 E4 08 4D 92 DB 63 26 E8 28 A3 BA C1 CF 78 FB 70 F1 F6 17 9A 72 62 07 43 E0 27 AB 08 98 7E
18:42:34 Parsing AARE reply succeeded.
18:42:39 Read object type Register index: 2
7E A0 2C 03 41 32 9F 9F E6 E6 00 D0 1E 30 00 00 14 F6 D4 97 F3 DE 5A 20 F3 0B 22 A7 FA B2 16 8D C9 DA 2F 26 94 47 82 B0 48 C0 DB 9E F0 7E
18:42:39
7E A0 28 41 03 52 6D 48 E6 E7 00 D4 1A 30 00 00 00 00 63 37 4B 73 33 70 6E 83 A0 85 18 D3 CC 6F 3D 60 60 A2 B3 C5 70 38 FF 7E
Please help me to generate ciphered data of Read object(GETcommand request).
What are input of above example is used get the resultant
t
ciphered data. I have AES-128 -GCM implemented module. As earlier post able to generate ciphered data for Aarq and aare but not for GET request.
Sir,
I want read simple energy register 1.0.1.8.0.255 attribute 2
So Plain text what i am taking for ciphering is
C0 01 C1 00 03 01 00 01 08 00 FF 02 00
Is it right?
Dear Sir
This is the Get request log fromDirector
18:42:39 Read object type Register index: 2
7E A0 2C 03 41 32 9F 9F E6 E6 00 D0 1E 30 00 00 14 F6 D4 97 F3 DE 5A 20 F3 0B 22 A7 FA B2 16 8D C9 DA 2F 26 94 47 82 B0 48 C0 DB 9E F0 7E
As you told that
Plain text-C0 01 C1 00 03 01 00 01 08 00 FF 02 00
System Title-4C4E434C49454E54(In hex)
Initialization vector(IV)- 4C4E434C49454E5400 00 14 F6
EK-31323334353637383930313233343536(In hex)
AK-31323334353637383930313233343536(In Hex)
AAD-3031323334353637383930313233343536
The above parameter used not able to generate your ciphered text.
Is anything wrong in parameter?
Dear sir,
In Gurux Director(Client) When we provide the details such as frame counter,system title,authentication key,encryption key is able to make connection to meter(server) and read the content using same key. It means that both having same parameter then only meter reply.
So using same key we are not able generate get request ciphered data. Where as able to replicate AARQ/AARE ciphered (DLMS director) data with our software
Hi,
Hi,
You should check the invocation (frame) counter first. Try to read it from the meter. IV counter is usually the reason why connection fails.
BR,
Mikko
Dear Sir
Dear Sir
Below is DLMS Director log
Yellow- Frame Counter
Green- System Title
Blue- Ciphered PDU (Ciphered Data+ Authentication Tag)
Initialization vector-Using frame counter(Yellow marked)and System title(Green marked)
Authentication key+Encryption key as provided by manufacturer, We can generate the Ciphered PDU
And is matched with Gurux Director ciphered AARQ (Blue marked)
But use same technique my read request ciphered not matched with DLMS director log.
I used gurux dlms director log framecounter(yellow marked)+system title(green marked) alongwith encryption key and authentication key not able to generate ciphered data. Is any other technique for this ciphering ?
Is frame counter show in read request as yellow marked used for Ciphering?
Hi,
Hi,
Please, don't add images. It's hard to compare bytes. Can you add bytes in raw format and I'll check this tomorrow.
BR,
Mikko
Sir,
Sir,
As you require,Please find the raw data which is same as image attached marked with colour for differentiation.
GXDLMSDirector 8.2.2007.060
18:42:32 Initializing serial connection.
18:42:33 Send SNRM request.
7E A0 07 03 41 93 5A 64 7E
18:42:34
7E A0 1E 41 03 73 8E 7F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
18:42:34 Parsing UA reply succeeded.
18:42:34 Send AARQ request.
7E A0 70 03 41 10 AD DF E6 E6 00 60 62 A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 4C 4E 43 4C 49 45 4E 54 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 06 80 04 6C 6E 74 31 BE 34 04 32 21 30 30 00 00 14 F4 8E 98 88 72 1E 49 AE F8 9B 0C 4D 24 5E 80 42 B8 0A FA 04 C9 EC A0 58 00 95 89 24 0C C7 C7 B8 F6 67 79 F4 48 50 D1 E7 52 46 F5 3A C5 C8 7E
18:42:34
7E A0 56 41 03 30 7E FC E6 E7 00 61 48 A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01 00 A4 0A 04 08 4C 4E 54 38 35 31 32 31 BE 23 04 21 28 1F 30 00 00 14 E4 08 4D 92 DB 63 26 E8 28 A3 BA C1 CF 78 FB 70 F1 F6 17 9A 72 62 07 43 E0 27 AB 08 98 7E
18:42:34 Parsing AARE reply succeeded.
18:42:39 Read object type Register index: 2
7E A0 2C 03 41 32 9F 9F E6 E6 00 D0 1E 30 00 00 14 F6 D4 97 F3 DE 5A 20 F3 0B 22 A7 FA B2 16 8D C9 DA 2F 26 94 47 82 B0 48 C0 DB 9E F0 7E
18:42:39
7E A0 28 41 03 52 6D 48 E6 E7 00 D4 1A 30 00 00 00 00 63 37 4B 73 33 70 6E 83 A0 85 18 D3 CC 6F 3D 60 60 A2 B3 C5 70 38 FF 7E
Please help me to generate ciphered data of Read object(GETcommand request).
What are input of above example is used get the resultant
t
ciphered data. I have AES-128 -GCM implemented module. As earlier post able to generate ciphered data for Aarq and aare but not for GET request.
Regards,
Rajesh
Hi Rajesh,
Hi Rajesh,
Ciphering is quite complicated and describing it here it's not possible. It's described quite well in Green Book. You should read it carefully.
BR,
Mikko
Dear Sir,
Dear Sir,
We will again go through the Green book. What is plain PDU text pass to ciphering in GEt reqquest?
Hi,
Hi,
It depends on what you want to read.
BR,
Mikko
Sir,
Sir,
I want read simple energy register 1.0.1.8.0.255 attribute 2
So Plain text what i am taking for ciphering is
C0 01 C1 00 03 01 00 01 08 00 FF 02 00
Is it right?
Regards,
Rajesh
Hi, Yes. BR, Mikko
Hi,
Yes.
BR,
Mikko
Dear Sir
Dear Sir
This is the Get request log fromDirector
18:42:39 Read object type Register index: 2
7E A0 2C 03 41 32 9F 9F E6 E6 00 D0 1E 30 00 00 14 F6 D4 97 F3 DE 5A 20 F3 0B 22 A7 FA B2 16 8D C9 DA 2F 26 94 47 82 B0 48 C0 DB 9E F0 7E
As you told that
Plain text-C0 01 C1 00 03 01 00 01 08 00 FF 02 00
System Title-4C4E434C49454E54(In hex)
Initialization vector(IV)- 4C4E434C49454E5400 00 14 F6
EK-31323334353637383930313233343536(In hex)
AK-31323334353637383930313233343536(In Hex)
AAD-3031323334353637383930313233343536
The above parameter used not able to generate your ciphered text.
Is anything wrong in parameter?
Hi,
Hi,
If the parameters are different in client and server, generated data is invalid. Both client and server must use the same parameters.
BR,
Mikko
Dear sir,
Dear sir,
In Gurux Director(Client) When we provide the details such as frame counter,system title,authentication key,encryption key is able to make connection to meter(server) and read the content using same key. It means that both having same parameter then only meter reply.
So using same key we are not able generate get request ciphered data. Where as able to replicate AARQ/AARE ciphered (DLMS director) data with our software
Hi,
Hi,
Check how you generate the ciphered data. It's hard to say what you are making differently.
BR,
Mikko