Hi, I'm trying to simulate key_transfer method (2) from IC 64
Inside the GXDLMSSecuritySetups.cs class,
when action is invoked settings.Cypher is being modified with new keys as you can see
line 430 in GXDLMSSecuritySetup ->
"settings.Cipher.BlockCipherKey = GXDLMSSecureClient.Decrypt(settings.Kek, data);"
those settings (with new keys) are being used to cypher the response, this is strange since if we take a look to DLMS blue book (attached image), the book says "The new keys are activated immediately after result of the method invocation is sent back with result = success. Notice that this rule equally applies to all keys, including the master key."
The new keys have to be applied only AFTER the response is sent, I mean, we understand that the response still has to be cyphered with old keys.
How is working:
System -> cyphered action request (old keys) -> gurux meter execute action -> cyphered action response (new keys) -> System
How I understand it should work accordingly to blue book:
System -> cypher action request (old keys) -> gurux meter execute action -> cyphered action response (old keys) -> System
Is this considered somehow for future releases? Am I understanding this in the wrong way?
You are right on this. The keys are updated right away. I have tried to think of how this can be solved.
At the moment the main problem is how it can be a clean and nice solution.
Hi Miguel,
Hi Miguel,
You are right on this. The keys are updated right away. I have tried to think of how this can be solved.
At the moment the main problem is how it can be a clean and nice solution.
BR,
Mikko
Hi,
Hi,
This is fixed. Get the latest version.
http://gurux.fi/node/15075
BR,
Mikko