HSM (Thales) Simulator

The Thales Simulator Library is an implementation of a software emulation of the Thales (formerly Zaxus, formerly Racal) RG7000 Hardware Security Module cryptographic device.

How to Install

  1. – Goto CodePlex, an open source project archive ( and download. The source code is also available on github (, but you need to have all the tools to build the solution and only then you can lay your hands on the installer.
  2. – Extract downloaded file
  3. – Goto “thalessim\wiki\downloadWiki\docs\” directory.
  4. – Run the Thales Windows Simulator installer.
  5. – This will install the simulator as “Thales Simulator”.

How to Use

  1. – Run the installed “Thales Simulator”
  2. – The default configuration of the simulator is available in ThalesParameters.xml generally available in the installed directory (C:\Program Files (x86)\NTG\Thales Simulator)
  3. – The default port for the simulator is 9998. It can be changed in ThalesParameters.xml.
  4. – Open a socket and connect the simulator on port 9998.
  5. – Important!!! All messages need to be prefixed with a 2-byte header i.e; 0000. The purpose of this header is to be able to identify request/response pairs in a high-load scenario. If you send simultaneous requests to the simulator (or a real HSM for that matter), you need to be able to match the correct responses to original requests because they might not arrive in the original order. You can use the header to do that.

Sample command for CVV verification is “CYU123456789012345678901234567890121234123456789012345;1212101“, prefix it with 2-byte header before sending to the simulator i.e; “0000CYU123456789012345678901234567890121234123456789012345;1212101