help pls someone...

Apr 8, 2010 at 10:42 AM

Hi, I am quite new to hsm. I tried sending a message that was recommended on one of the discussions thread that will be used to generate keys and it reports back saying error from hsm. Actually what am trying to do is to translate a key based on the zmk and zpk. whenever i alter the length of the message it tells me error from hsm. However, whenever I then send a valid message to it, the hsm responds that the command was not found but it does not return the error code. The actual message i sent that gives me the responce that the command does not exist is -LHeaderteFAUB5C99B705FE3586BE317A53B755B2DE7X11111111111111111111111111111111 (working with double length keys). Also, does anyone have an idea on how to implement a simulator for dukpt since it might be quite complicated to implement the actual dukpt encryption.

Apr 8, 2010 at 10:50 AM

You're trying to send -LHeaderteFAUB5C99B705FE3586BE317A53B755B2DE7X11111111111111111111111111111111, is my understanding correct?

Apr 8, 2010 at 1:04 PM
Yes.. That is the message that I am sending to translate pin...
Sent from my BlackBerry wireless device from MTN
Apr 8, 2010 at 1:07 PM

This will certainly not work. Have a look at this to see how you're supposed to connect to the simulator or a real HSM.


Apr 13, 2010 at 11:41 AM


Still having problems communicating with the hsm. I have implemented the event handlers and method calls in the code but am still getting the same response. Is it possible for me to get my hands on a sample that an application uses TCP/IP to connect with it. I think i might be implementing the thales_MessageArrived method wrongly. Basically, i am just following the steps used in the Clashing demo. But i didn't see any reference to it in the demo code.

Apr 13, 2010 at 3:18 PM

Of course. Have a look at this wiki article to get some more details regarding connecting to the simulator or a real HSM.

Apr 21, 2010 at 11:23 AM

Hi again,

I have been looking for the data store of the simulator. When a key is generated and used to generate another, and then i shut down the simulator; on restarting, its still recognizes the keys that were generated. Can you help me out with this and please don't refer me to the same article. The class and a brief explanation on how this is done would be very helpful. Thanks.

Apr 21, 2010 at 5:08 PM

I'm not sure I completely understand but you can have a look at the source code for storing the LMKs. The class directly responsible for implementing LMK save/read functionality is at ThalesCore/Cryptography/LMK/LMKStorage.vb and it works very simply by writing the hexadecimal values of the LMK storage to a file named LMKSTORAGE.TXT. I will elaborate some more if I can but I'm not sure what is it you want to know exactly...