Trouble with generating ZMK component

Oct 11, 2010 at 6:06 PM
Edited Oct 11, 2010 at 6:06 PM

Hi,

very nice program, and very useful for me. Thanks a lot.

But a have one problem: I can't generate ZMK key.

My first try look like this:

Command: 0000A2100UComponent1 and 0000A2100UComponent2

Clear Component successfully printed in program and my program receive encrypted component.

After that a try to generate key on component: 0000A42000U<component1><component2>

But I always receive 0000A510 error code.

Can you help me?

Coordinator
Oct 11, 2010 at 7:12 PM

Can you post the results of the first and second A2 operations (both encrypted and clear keys) and the exact A4 command you're sending?

Oct 11, 2010 at 8:41 PM

Thanks for quick response.

Exact command: "0000A2100UComponent1"

Answer:  "0000A300U068487E56D00AC2FB7A7BD3501457E10"

 

Exact command: "0000A2100UComponent2"

Answer:  "0000A300UC574F53EA31570C40F156669227A6996"

Exact command:  "0000A42000UU068487E56D00AC2FB7A7BD3501457E10UC574F53EA31570C40F156669227A6996"

Answer: "0000A510"

 

Application Events:

 

Client from 127.0.0.1:1493 is connected

Client: 127.0.0.1:1493

Request: 0000A2100UComponent1
Parsing header and code of message 0000A2100UComponent1...
Searching for implementor of A2...
Found implementor ThalesSim.Core.HostCommands.BuildIn.GenerateAndPrintComponent_A2, instantiating...
Calling AcceptMessage()...
Calling ConstructResponse()...
Calling ConstructResponseAfterOperationComplete()...
Attaching header/response code to response...
Sending: 0000A300U068487E56D00AC2FB7A7BD3501457E10
Attaching header/response code to response after I/O...
Sending: 0000AZ00
Calling Terminate()...
Implementor to NothingClient disconnected.
Client from 127.0.0.1:1503 is connected
Client: 127.0.0.1:1503
Request: 0000A2100UComponent2
Parsing header and code of message 0000A2100UComponent2...
Searching for implementor of A2...
Found implementor ThalesSim.Core.HostCommands.BuildIn.GenerateAndPrintComponent_A2, instantiating...
Calling AcceptMessage()...
Calling ConstructResponse()...
Calling ConstructResponseAfterOperationComplete()...
Attaching header/response code to response...
Sending: 0000A300UC574F53EA31570C40F156669227A6996Attaching header/response code to response after I/O...
Sending: 0000AZ00
Calling Terminate()...
Implementor to Nothing
Client disconnected.
Client from 127.0.0.1:1504 is connected
Client: 127.0.0.1:1504
Request: 0000A42000UU068487E56D00AC2FB7A7BD3501457E10UC574F53EA31570C40F156669227A6996
Parsing header and code of message 0000A42000UU068487E56D00AC2FB7A7BD3501457E10UC574F53EA31570C40F156669227A6996...
Searching for implementor of A4...
Found implementor ThalesSim.Core.HostCommands.BuildIn.FormKeyFromEncryptedComponents_A4, instantiating...
Calling AcceptMessage()...
Calling ConstructResponse()...
Calling ConstructResponseAfterOperationComplete()...
Attaching header/response code to response...
Sending: 0000A510
Calling Terminate()...
Implementor to Nothing
Client disconnected.

 

Command events:

 

=== [A2], starts 23:29:52.843 =======

[Key,Value]=[Key Scheme LMK,U]

[Key,Value]=[Key Type,100]

Key generated (clear): 3823A8C7A467ECB620FB9898DAAB759B

Key generated (LMK): U068487E56D00AC2FB7A7BD3501457E10

=== [A2], � ends 23:29:52.843 =======


=== [A2], starts 23:32:09.656 =======

[Key,Value]=[Key Scheme LMK,U]

[Key,Value]=[Key Type,100]

Key generated (clear): 618FA4CD194994B3CD290BFB085EE0F7

Key generated (LMK): UC574F53EA31570C40F156669227A6996

=== [A2], � ends 23:32:09.656 =======


=== [A4], starts 23:33:33.968 =======

[Key,Value]=[Key Component #1,068487E56D00AC2FB7A7BD3501457E10]

[Key,Value]=[Key Component #2,C574F53EA31570C40F156669227A6996]

[Key,Value]=[Key Component Scheme #1,U]

[Key,Value]=[Key Component Scheme #2,U]

[Key,Value]=[Key Scheme (LMK),U]

[Key,Value]=[Key Type,000]

[Key,Value]=[Number of Components,2]

=== [A4], � ends 23:33:33.984 =======

 

 

 

 

 

 

 

 

Coordinator
Oct 11, 2010 at 11:34 PM

This would not work because the keys produced by A2 have a key type of 100 (ZMK-Comp) and are encrypted using a variant of 1. In A4 you're specifying key type 000 which uses a variant of 0, so you would get a parity key error anyway.

However, if you were to specify key type code 100 in the A4 command you would still get an error because it has a bug which causes it to incorrectly process keys with any variant other than 0. Thanks to your test that's been spotted and I've committed change set 55946 to correct it. This includes the fix for your other post as well, so download this only and test it.

Please let me know if this fixes both your problems.

Oct 12, 2010 at 9:21 AM
Edited Oct 12, 2010 at 10:02 AM

Hi nickntg,

 

I check your fix - all works fine. Thanks a lot.

Now I can go on working...