viernes, 1 de julio de 2011

DesfireWrapper. Dotnet library for Desfire cards access

Hi. I have opened a project on sourceforge.net , DesfireWrapper.

This project is an easy-to-use-object-oriented wrapper for SpringCard SDK Desfire libraries to be used from dotnet without pain.

SpringCard is a smartcard hardware provider. Offers a lot of opensource libraries for managing their devices. But libraries seem to have grown without a common guide. My project wraps up two of them to achieve a higher level API for dotnet (instead of C) to access Desfire smartcards.

PC/SC is a standard for smartcard integration on computing enviroments. Allows sending messages -streams of bytes- to smartcards through a PC/SC compatible smartcard reader. Windows offers a full implementation since Win2k on winscard.dll .

There are several smartcard technologies. Maybe the main familiy of products is Mifare, property of NXP Semiconductors ( a spin off from Philips ) . Mifare Desfire is one of these products. The product specification defines a set of high level commands the card should reply to. A good Desfire API should implement this high level commands to be called by the programmer instead of worrying about sending bytes over an USB port.

NXP offers the reference Desfire API , but it is blindsource, so you don't really know how certain commands work. And they want to receive royalties not only by the patent of the technology but for the API itself.

And I think SpringCard wanted to change the point and implemented a full opensource DesfireAPI based on PC/SC standard.

I needed to develop software to work with Desfire cards and first I used NXP API. But it was not open source so we didn't know what commands were being sent to the card to be used from non-PCSC devices. And google showed me the light.

SpringCard provides a full plain-C API. And provides C# PC/SC use examples. So I wrapped it up on an objectual C# integrated API and developed a simple demo application. Anybody who need to access a Desfire card from dotnet can use my project and avoid days of marshaling and native calls.

Just one problem. SpringCard SDK License allows to include their code on other source but only if used with SpringCard hardware products. So I have a full standard PC/SC + Desfire C# objectual API limited by license to be used only with SpringCard hardware.

Next point? Maybe do the same thing for Java.

Remember, DesfireWrapper .

3 comentarios:

  1. Did you have the time to make the code for JAVA? :)
    George

    ResponderEliminar
  2. No, we have not, but we are willing new contributors to join our sourceforge project. Do you want to join us developing a java version for the wrapper?

    ResponderEliminar
  3. Hi Pedro,

    I tried to contact you privately without success, so I post here.
    Just released a new open source RFID library which support well DESFire and DESFire EV1 chips.
    Developed in C++, it also have a COM wrapper to use it in C# and other high level languages. This part is just not well documented for now, will come.
    I would be interested about your feedback: http://liblogicalaccess.islog.com/

    No license issue as we developed all from scratch, LGPL license.

    ResponderEliminar