{"id":24501080,"url":"https://github.com/androidcrypto/desfirechangemasterappkey","last_synced_at":"2025-12-29T19:40:17.936Z","repository":{"id":245078618,"uuid":"817194052","full_name":"AndroidCrypto/DESFireChangeMasterAppKey","owner":"AndroidCrypto","description":"Android/Java application for changing the Master Application Key on Mifare DESFire NFC tags from DES to AES and vice versa.","archived":false,"fork":false,"pushed_at":"2024-06-19T08:04:05.000Z","size":21503,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-21T22:28:35.131Z","etag":null,"topics":["android","desfire-ev1","desfire-ev2","desfire-ev3","java","mifare-desfire","nfc"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndroidCrypto.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-19T07:57:37.000Z","updated_at":"2024-12-31T16:59:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"44c13ec0-4d94-457a-9841-417f77855a03","html_url":"https://github.com/AndroidCrypto/DESFireChangeMasterAppKey","commit_stats":null,"previous_names":["androidcrypto/desfirechangemasterappkey"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidCrypto%2FDESFireChangeMasterAppKey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidCrypto%2FDESFireChangeMasterAppKey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidCrypto%2FDESFireChangeMasterAppKey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidCrypto%2FDESFireChangeMasterAppKey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndroidCrypto","download_url":"https://codeload.github.com/AndroidCrypto/DESFireChangeMasterAppKey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243697705,"owners_count":20332999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","desfire-ev1","desfire-ev2","desfire-ev3","java","mifare-desfire","nfc"],"created_at":"2025-01-21T22:23:15.471Z","updated_at":"2025-12-29T19:40:17.896Z","avatar_url":"https://github.com/AndroidCrypto.png","language":"Java","readme":"# Mifare DESFire Change Master Application Key to AES or DES or vice versa using NFCjLib library\n\nThis app has a very limited purpose: it can **change a Default DES Master Application Key to a Default AES Master Application Key and vice versa only**.\nA functionality like this can be useful if you are working with other Mifare DESFire libraries that are only able to work with AES keys.\n\nA Mifare DESFire EVx tag has a fabric setting with a Master Application Key of DES length (8 bytes long), filled with (hex) 0x00: \n```plaintext\nDefaut DES key: 00 00 00 00 00 00 00 00\n```\n\nFor changing this key you need to authenticate with this key first and then run the changeKey method on the tag. As this command is working with \nencrypted data I'm using the Desfire Tools for Android library for these tasks. The Default AES Key is 16 bytes long and filled with (hex) 0x00:\n\n```plaintext\nDefaut AES key: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n```\n\nIf you should have changed the Default DES or Default AES Key to any other value then the default value you need to change the keys back to the default ones \non your own (this app is working with the Default Keys only !).\n\n![Application after start](docs/screenshots/web/app_img.png)\n\nIf you need some basic information about the tags I recommend this document, written by Daniel Andrade (and others) who wrote the NFCjLib: \nhttps://github.com/andrade/notes-about-desfire/blob/master/nfc-0.4.pdf\n\n## About this app:\n\nIt is developed using Android Studio version Jellyfish | 2023.3.1 Patch 2 and is running on SDK 21 to 34 (Android 14) (tested on \nAndroid 8, 9 and 13 with real devices).\n\nSome notes on typical sessions with the card: I recommend that you lay your phone on the tag and after the connection don't move the phone to hold the \nconnection.\n\nThe usage of the app is described in an article I published on medium.com: https://medium.com/@androidcrypto/mifare-desfire-evx-nfc-tag-change-the-master-application-key-from-des-to-aes-android-java-e5dcf02861ff\n\n## Ready to use compiled and build debug app\n\nA ready to use app in DEBUG mode is available under the debug folder.\n\n## Dependencies\n\nI'm using 1 external dependency for this project, but I did not load it with Gradle but included the source code. \nThis is specially due to the fact that I'm trying to understand how the workflow for the communication with the \nMifare DESFire tag is going on. The best way for this is to have a direct access to the underlying source code.\n\nThe main library for the access to Mifare DESFire tags are the **DESFire Tools for Android**, written by Thomas Skjølberg (\"skjolber\"), \navailable here: https://github.com/skjolber/desfire-tools-for-android \n\nThe licenses for this library are a mixture:\n- nfcjlib - Modified BSD License (3-clause BSD): https://github.com/skjolber/desfire-tools-for-android/blob/master/nfcjlib/LICENSE\n- libfreefare - LGPL 3.0 with classpath exception: https://github.com/skjolber/desfire-tools-for-android/blob/master/libfreefare/LICENSE.txt (Note: I did not use this part of the repository)\n- everything else - Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html\n\nI'm using an app icon created by Ahkâm and then changed for this app: \nNfc Simple PNG Transparent Background: https://www.freeiconspng.com/img/20581\n\n\u003ca href=\"https://www.freeiconspng.com/img/20581\"\u003eNfc Png Simple\u003c/a\u003e\n\nI used this online service to change the icon to my needs: Icon / Vector editor: https://editor.method.ac/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidcrypto%2Fdesfirechangemasterappkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroidcrypto%2Fdesfirechangemasterappkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidcrypto%2Fdesfirechangemasterappkey/lists"}