Check digit for double length zmk

Mar 23, 2010 at 3:34 PM

Hi

I've trying to create a ZMK that is double length, which I do using the console (F, Z, D commands).

After loading the encrypted key in my app, I call the Generate check digit function. However, the parsing only recognizes the first component of the double length encrypted ZMK (I've run it in debug), and I consistently get an invalid key type error (error code 04). The same command on a single length key is successful.

Question: Is the simulator version 0.8.5 not supporting Double Length ZMK? Or am I missing something. Below the event trail from the Simulator. First part is the single length ZMK:

 

Request: 0002BUFF039DE1EC210F0BB70;000;ZZ1
Parsing header and code of message 0002BUFF039DE1EC210F0BB70;000;ZZ1...
Searching for implementor of BU...
Found implementor ThalesSim.Core.HostCommands.BuildIn.GenerateCheckValue_BU, instantiating...
Calling AcceptMessage()...
Calling ConstructResponse()...
Calling ConstructResponseAfterOperationComplete()...
Attaching header/response code to response...
Sending: 0002BV00ACFB99
Calling Terminate()...
Implementor to Nothing
Client: 127.0.0.1:55615
Request: 0003BUFF139DE1EC210F0BB70DBAE2F3DE258F489;000;XU1
Parsing header and code of message 0003BUFF139DE1EC210F0BB70DBAE2F3DE258F489;000;XU1...
Searching for implementor of BU...
Found implementor ThalesSim.Core.HostCommands.BuildIn.GenerateCheckValue_BU, instantiating...
Calling AcceptMessage()...
Calling ConstructResponse()...
Calling ConstructResponseAfterOperationComplete()...
Attaching header/response code to response...
Sending: 0003BV04
Calling Terminate()...

 

Single Length

Request: 0002BUFF039DE1EC210F0BB70;000;ZZ1

Parsing header and code of message 0002BUFF039DE1EC210F0BB70;000;ZZ1...

Searching for implementor of BU...

Found implementor ThalesSim.Core.HostCommands.BuildIn.GenerateCheckValue_BU, instantiating...

Calling AcceptMessage()...

Calling ConstructResponse()...

Calling ConstructResponseAfterOperationComplete()...

Attaching header/response code to response...

Sending: 0002BV00ACFB99

Calling Terminate()...

Implementor to Nothing

Double Length

Request: 0003BUFF139DE1EC210F0BB70DBAE2F3DE258F489;000;XU1

Parsing header and code of message 0003BUFF139DE1EC210F0BB70DBAE2F3DE258F489;000;XU1...

Searching for implementor of BU...

Found implementor ThalesSim.Core.HostCommands.BuildIn.GenerateCheckValue_BU, instantiating...

Calling AcceptMessage()...

Calling ConstructResponse()...

Calling ConstructResponseAfterOperationComplete()...

Attaching header/response code to response...

Sending: 0003BV04

Calling Terminate()...

 

Thanks for your help

 

Coordinator
Mar 23, 2010 at 5:00 PM

Hi,

0.8.5 supports double-length ZMKs. The BU command (and several others) expects double & triple length keys to be preceeded by U/X/T/Y. That happens because the host may send commands without the optional fields that allow the simulator to know whether a key is passed using the variant or Ansi formats. Using the command 0003BUFF1U39DE1EC210F0BB70DBAE2F3DE258F489;000;XU1 should do the trick (if the key format is variant).

Note that there is a bug in the console generation commands and check values are not displayed properly. If you're building from source, try getting the latest changeset. Otherwise, download the latest setup from the downloads page.

Please let me know if this fixes your problem.