Skip to main content

DESFire library for python

Project description

Documentation Status License: MIT GitHub issues GitHub release (latest by date) GitHub top language pre-commit.ci status

Python DESFire

Introduction

Full documentation is available at read the docs.

The MIFARE DESFire product provides high security RFID key tokens than can be used for contactless identity, access control or payment applications.

This package provides a simple interface of interacting with DESFire chips using standard PC/SC smcartcard readers, using pure Python. It currently supports managing keys, applications and file operations, which should cover the majority of use cases. AES-128 is fully supported both, DES/3DES currently only receives limited testing up to the extend that is needed to change the default key and create applications.

Core features:

  • Compatible with all readers supported by pyscard
  • Support for AES and ISO authentication (DES, 2K3DES and 3K3DES). No support for legacy authentication.
  • Full crypto support including CMAC and CRC validation on all commands that require it
  • Key management change and create keys on PICC and application leven
  • Application management create and delete applications
  • File management support for standard data files is implemented, other file types are currently not available

Currently, the library has been used and tested with EV1 cards and CSL USB Reader, but other PC/SC compatible readers should work the same.

!!! warning "NDA and Accuracy" Note that NXP does not release the DESFire documentation to the public, NDA signature is required to obtain this information. The author of this package has not signed this NDA, nor does he have access to the documentation. This package has been created based on other open source work, see the Credits section below for details.

This also means that there is very limited ability to guarantee a correct implementation of all commands.
The package has mainly been tested using DES and AES-128 keys. If you encounter any issues, please
feel free to raise a ticket and/or submit an MR.

Documentation Sources and Credits

This library would not be possible without other amazing open source contributions that served as source of information when creating this package. Credits go to the creators and maintainers of the following repositories, in no particular order:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_desfire-0.0.5.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_desfire-0.0.5-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file python_desfire-0.0.5.tar.gz.

File metadata

  • Download URL: python_desfire-0.0.5.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for python_desfire-0.0.5.tar.gz
Algorithm Hash digest
SHA256 0f514563d067f388a8ee1198124f47c2fe65a1dabf5c2d426e0b3554b9ae2397
MD5 dafc116646aab1164a287f456142cd16
BLAKE2b-256 ce9bba7380405fdfea02b0b3c4f3f9c9cc035cfc6820b5cf5809dc399db2c432

See more details on using hashes here.

File details

Details for the file python_desfire-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: python_desfire-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for python_desfire-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 054214ea1f9c5bec8d079fac3f6862000de92d63ffbe3bfa533037f62275798a
MD5 000c57d0b6446270dba53c9aeb6ce0b2
BLAKE2b-256 4bd0fb8887921f248bae3dc2f36045044224cd9c6c5274fb9ad77e4ed086d85d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page