Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Decryption of Notification Data

Decryption of Notification Data

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Sajjad khan pathan , 15 January, 2019
Forums
DLMSDirector

Hey,

Is it possible to decrypt the data received in Notification window with authenticated encryption ?

Profile picture for user Kurumi

Kurumi

7 years 4 months ago

Decryption of Notification Data

Hi,

If your keys are correct decrypted data should be shown if you have selected "Pdu" and "Comments" from "View" | "Notifications"

BR,
Mikko

Sajjad khan pathan

7 years 4 months ago

In reply to Decryption of Notification Data by Kurumi

Decryption of Notification Data

Hi,

Yes, I've selected pdu and comments in Notification view but its showing Encrypted Data.

Issues may be something like if i have added multiple devices and they may have different keys, different target address, which one is used for decryption ?

i tried to decrypt data with source code but the result was not as intended.
here is what i tried :

public void DecryptData()
{

try
{
client.ClientAddress = 30;
client.Authentication = Authentication.HighGMAC;
client.Ciphering.BlockCipherKey = GXCommon.HexToBytes("Some key");
client.Ciphering.AuthenticationKey = GXCommon.HexToBytes("Some key");
client.Ciphering.DedicatedKey = GXCommon.HexToBytes("Some key");
client.Ciphering.SystemTitle = GXCommon.HexToBytes("Title");
client.Ciphering.Security = Security.AuthenticationEncryption;
client.UseLogicalNameReferencing = true;
int logicaladdress = Convert.ToInt32("0");
int physicaladdressint = Convert.ToInt32(1);
client.ServerAddress = GetServerAddress(logicaladdress, physicaladdressint, 1);
client.ServerAddressSize = (byte)1;
GXByteBuffer ciphertext = new GXByteBuffer();
ciphertext.Set(GXCommon.HexToBytes("D482001E3000000935ECD4CADA3280D3628ADBF6AE4CCCC2B54A33B9299F637B0C80"));
uint IC = 2357;
AesGcmParameter p = new AesGcmParameter((byte)Command.DedGetResponse, client.Ciphering.Security, IC, client.Ciphering.SystemTitle, client.Ciphering.BlockCipherKey, client.Ciphering.AuthenticationKey);
GXByteBuffer data2 = new GXByteBuffer();
byte[] data3 = GXDLMSChippering.DecryptAesGcm(p, ciphertext);
data2.Set(data3);
string Result = data2.ToString();
MessageBox.Show(Convert.ToString(Result));

}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
reply.Clear();
}
}

Can you suggest ?

Profile picture for user Kurumi

Kurumi

7 years 4 months ago

Decryption of Notification Data

Hi,

Do you have problems if you have only one meter? If you have several meters it might cause problems to translator.

BR,

Mikko

Sajjad khan pathan

7 years 4 months ago

In reply to Decryption of Notification Data by Kurumi

Decryption of Notification Data

Yes, the problem is there when i have only one meter.
This is what i receive.
May be i am doing something wrong ? Or the meter is sending something which you do not expect ?
Data downloading and other communication is all OK.
As the trace and Log data are also received in the same way.. so i was supposing the GXDLMSDirector doesn't decrypt these data before showing.

01/15/2019 3:57:46 PM
<GeneralGloCiphering>
<SystemTitle Value="474F4500007BE512" />
<CipheredService Value="3000000001B3C3A79A2F3EDD38364345044F3F5B295840F9DDC23AA4DDA70CF57C3AD6F75F5601940C5C90A7768AFDFEB9405C0B666B18BB1CF5DCAABA3A39DF4F0EB87C79E27C50FD1E22078D160F06417000736A4925779630FFFC271F6D2D4B789B03D6C14E746C3CA550FEEE90F239E150B1EF54F77A025E9A43A7DE3C65C0" />
</GeneralGloCiphering>

Client disconnected: 10.78.163.40:38042

Sajjad khan pathan

7 years 4 months ago

In reply to Decryption of Notification Data by Sajjad khan pathan

Decryption of Notification Data

Let me add the source code of Notification window from GXDLMSDirector,

try
{
//Show as PDU.
eventsTranslator.PduOnly = NotificationPdu.Checked;
eventsData.Set((byte[])e.Data);
GXByteBuffer pdu = new GXByteBuffer();
InterfaceType type = GXDLMSTranslator.GetDlmsFraming(eventsData);
StringBuilder sb = new StringBuilder();
while (eventsTranslator.FindNextFrame(eventsData, pdu, type))
{
sb.Append(eventsTranslator.MessageToXml(eventsData));
pdu.Clear();
}
if (AutoReset.Checked)
{
EventsView.ResetText();
}
if (NotificationTimeMnu.Checked)
{
OnAddNotification(DateTime.Now.ToString() + Environment.NewLine + sb.ToString());
}
else
{
OnAddNotification(sb.ToString());
}
}
catch (Exception ex)
{
eventsData.Clear();
OnAddNotification(ex.Message);
}

I don't this only the translator will Decrypt the AES-128 Authenticated Encrypted Data ?

Profile picture for user Kurumi

Kurumi

7 years 4 months ago

Decryption of Notification Data

Hi,

Data is tried to decrypt and it's shown if it succeeds on the Notify log. We'll check this and let you know later this week.

BR,
Mikko

Sajjad khan pathan

7 years 4 months ago

Decryption of Notification Data

Ok,

Thanks for the response !

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin