The libfreefare project aims to provide a convenient API for MIFARE card manipulations.