Project: EMV Lab (Part 1)

So... you might wonder where I've been for the past few weeks. Well... I got side tracked... side tracked by what was a small side quest and turned very quickly into a big side quest..

For a few years I've been interested in EMV. The spec for chip based payment... you know... stick you card in... type in your pin... done. I've played about with a few public javacard applet implementations but they've always been lacking... hardcoded byte arrays which produce just enough to replicate a basic card. But... no personalisation... no dynamic data... no real end to end flow.

So, I set about writing my own javacard implementation... I started off by reading the specs and soon realised it's a pretty chunky project. You have multiple approaches to the same type of thing such as pin management, and cryptogram generation. Visa and Mastercard both do bits differently too.

Anyway... I got started, finished the chip implementation and then realised... that's great... but what can I do with it. Cards rely on PKI and terminals, issuers, acquirers etc... so... next steps... lets build those too.

Ok... that all now works, I can manage the end to end flow of chip cards... but what about contactless. Turns out (at least for now until kernel 8 is widely adopted), each of the issuers uses their own kernel... so... I implemented kernel 2 and 3 so I can do the end to end Visa and Mastercard flows.

Still plenty to do... no sure if I can release the code publicly or not... nice little side quest though.

← All posts