Open Source Payment HSM Simulators


PyEMV – Provides EMV functionality, but not CVC / CVV or PIN.

This package provides methods for the generation of the Application Cryptograms (TC, ARQC, or AAC) generated by the ICC and the Authorisation Response Cryptogram (ARPC) generated by the issuer and verified by the ICC. In addition, this package supports secure messaging integrity and confidentiality.

PyEMV Project Description from PyPi

pythales – Provides CVC / CVV, PIN, and Key management functionality. Does not support EMV functions.

A primitive implementation of Thales HSM simulator. Only the basic (the most popular) HSM commands are implemented:

– A0 – Generate a Key
– BU – Generate a Key check value
– CA – Translate PIN from TPK to ZPK
– CY – Verify CVV/CSC
– DC – Verify PIN
– EC – Verify an Interchange PIN using ABA PVV method
– FA – Translate a ZPK from ZMK to LMK
– HC – Generate a TMK, TPK or PVK
– NC – Diagnostics information

pythales Project Description from PyPi

EMVCAP – A software implementation of a Chip Authentication Program (CAP) device.

This tool emulates an EMV-CAP device, to illustrate the article “Banque en ligne: a la decouverte d’EMV-CAP” published in MISC #56.

EMVCAP About from github

EMV for Python – An implementation of the Chip Authentication Program (CAP) to generate authentication codes using chip cards.

A Pythonic implementation of the EMV smartcard protocol, which is used worldwide for chip-and-PIN payments. This is intended to be readable, tested, and heavily cross-referenced with the appropriate sections of the EMV Specification.

This also includes an implementation of the EMV CAP (aka Pinsentry) standard which is known to work for Barclays cards.

EMV for Python Project Descrption from PyPi