Search code examples
encryption3des

Decrypting data from MagTek iDynamo encrypted card reader


Does anyone have reference code (even if pseudo-code) for decrypting data from a MagTek iDynamo encrypted card reader? The ANSI X9.24 standard is... lacking... in the pseudo-code and readability department. I have the master key, KSN, and cipher text and need to derive the session key and get to the clear text. I've implemented an algorithm similar to the one found here and added a loop based on the counter portion of the KSN but it still doesn't produce actual card track data.


Solution

  • here is the DUKPT class i wrote to do what you need:

    https://github.com/mburshteyn1/DUKPT