Generate a binary MAC (Base24)

Jul 6, 2011 at 8:43 AM


I am using the simulator to generate a binary MAC.  However, the MK command is not successful.  I got this log from the application events pane:

Client from is connected


Request: 0000MKTDECD21834450352B7600C93B761268BA010ABCDEF

Parsing header and code of message 0000MKTDECD21834450352B7600C93B761268BA010ABCDEF...

Searching for implementor of MK...

No implementor for MK.

Disconnecting client.

Client disconnected.


By the way, I have a question.  Can we generate a TAK, which is a requisite in generating a binary MAC using the command A0?  If I will base my assumption from the document of HSM8000, the TAK can be generated using Variant 0 and Code 03 (16-17 LMK pair) is my assumption correct?



thanks :)

Jul 6, 2011 at 10:49 AM

The type of the TAK you specified is correct (type 003, LMK pair 16-17). The format you're sending is wrong - after MK you should have the encrypted value of the key and the T character denotes that a triple-length key should follow (48 hex chars). However, there are only 41 characters after that (and of course no data afterwards).

Jul 7, 2011 at 4:28 AM

hi again nickntg,

     I tried your advice.  I generated a TAK using LMK pair 16-17 and type 003.  I was able to generate the following:

=== [A0], starts 11:43:46.734 =======

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

[Key,Value]=[Key Type,003]

Key generated (clear): 8F2AD513A7C11F4CE55DA440D9FD620254518002B9A84F4A

Key generated (LMK): T892E017642311320ADCC5482979F2F1482AFB584E7C7201D

Check value: 8BE8D9

=== [A0],   ends 11:43:47.015 =======


     then I generated a triple DES key:

=== [A0], starts 11:52:24.359 =======

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

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

Key generated (clear): 13D05752A1E554D668CB943D40109DCE34C26EDC01572AE6

Key generated (LMK): T2F7212DBB79FE8628413C7359AAA75C1C2D9D379428512F4

Check value: 45543A

=== [A0],   ends 11:52:24.406 =======


     This is the string I sent to the simulator, I separated each value with a "+" for clear reading: 0000MK + 892E017642311320ADCC5482979F2F1482AFB584E7C7201D + T2F7212DBB79FE8628413C7359AAA75C1C2D9D379428512F4 + ABCDEEEEEEFAAAABCDEDFABABABACDEFABDECEDDACEEAD

      My problem is that the simulator returned "No implementor for MK"  I don't have any idea if what I am sending is correct because the simulator didn't process my command.  Am I doing it correctly?  I have no other way of testing this particular command.


many thanks again!

Jul 7, 2011 at 7:07 AM

I'm sorry for sending you to try MK again. I got tunnel vision and went straight to the command documentation instead of going to the simulator and see what's in there. The MK command is not implemented, that's why it doesn't work.

What you can do is use M6 which is implemented and replaces MK. If there's no way to do that, please let me know and I'll quickly implement MK for you. Again I apologize for not checking the source before posting.