used GXDLMSDirector and everything works fine. But when I try to use C example client with these arguments:
./gurux.dlms.client.bin -h localhost -p 4061 -c 22 -a HighSHA256 -P Gurux -T 4142434445464748
I get error:
Connecting to localhost:4061
InitializeConnection
Access Error : Device reports Read-Write denied.
Also tried to use .NET client and everything works fine.
with Java server i get this error:
Jan 15, 2023 4:59:48 PM gurux.dlms.objects.GXDLMSAssociationLogicalName replyToHlsAuthentication
INFO: Invalid CtoS:3DC5E28B54872419BF5A79DE3B16C92EC1E576080A93973C950034D1C5D39817-4BABD61F121477FC9C3B869189477136E47B5A671A9B0A99404B2E6A0B14DC09
Client Disconnected.
is there any known problem with SHA256 and C library? Other security (md5, sha1, GMAC) works fine. Also, with other languages client works fine aswell.
Also in not working version i have this payload:
7E A0 4C 03 2D 10 9E C8 E6 E6 00 60 3E A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 06 AC 12 80 10 70
38 9C CE 67 B3 59 AC 56 AB 55 2A 15 8A 45 22 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 13 8B 7E
With gurux translator i can see, that MechanismName Value is null.
Hello, is there any news…
Hello, is there any news about SHA256 in C?
Hi, i can see, that problem…
Hi, i can see, that problem still occurs
Hello, did some more…
Hello,
did some more investigation:
HEX bytes that needs to be converted to SHA256: 47 75 72 75 78 41 42 43 44 45 46 47 48 38 06 6D 79 07 09 1D 49 26 60 59 79 68 3E 0D 5F 70 38 9C CE 67 B3 59 AC 56 AB 55 2A 15 8A 45 22
gxsha256_encrypt returns: E5 36 DE FB B3 1B 6D 14 9D 80 F0 23 E8 C0 50 BA 85 83 77 A7 AF EF D0 7F 00 12 01 75 30 B4 A4 B8
If i use the same hex bytes with other calculators I get:
c93338aa6d325e19efd1d5a7e067dd252c8fb193ecc2091103596b0b5fc71876
Also, Java server returns:
INFO: Invalid CtoS:C93338AA6D325E19EFD1D5A7E067DD252C8FB193ECC2091103596B0B5FC71876-E536DEFBB31B6D149D80F023E8C050BA858377A7AFEFD07F0012017530B4A4B8
Client Disconnected.
This confirms, that SHA256 is not calculated correctly in Ansi C DLMS library.
Hi, I'm sorry about the slow…
Hi,
I'm sorry about the slow reply. For some reason, I haven't noticed this email before. This is tested now and it seems that you are right.
This is under work now and I'll let you know when this is fixed.
BR,
Mikko