contactless-smartcard

DESFire EV1 card emulation

只愿长相守 提交于 2019-11-29 00:15:41
I need to emulate a DESFire EV1 card on an Android device. However, I'm confused on how to use the Mifare SDK (lite or advanced) with the HCE. Is that even possible? I need to start the project and I had a lot of researches about how the data are stored and ciphered in the DESFire cards but I ended up with the fact that I need to use Mifare SDK on HCE. First of all, you cannot use the MIFARE SDK to emulate cards. The MIFARE SDK provides reader-side functionality only. Second, you cannot emulate the whole functionality of MIFARE DESFire (EV1) cards using Android HCE. However, you can emulate

issue with get processing options

孤街醉人 提交于 2019-11-28 12:48:31
I have selected application ( A0000000032010 ) on Visa contactless card and when I issue GPO command: "80A8000002830000" I get error: 67 00 Does anyone have idea what can be causing this? Michael Roland You receive that error code because you are sending an invalid GET PROCESSING OPTIONS command. In response to the application selection, you received the following PDOL: 9F38 0E (Processing Options Data Object List (PDOL)) 9F6604 (Terminal Transaction Qualifiers (TTQ)) 9F0206 (Amount, Authorized (Numeric)) 9F3704 (Unpredictable Number) 5F2A02 (Transaction Currency Code) 9A03 (Transaction Date)

Do I have to know what the AID of a card is for card emulation with Android HCE?

隐身守侯 提交于 2019-11-28 06:11:00
问题 I merely want to emulate a transit card with an Android application using HCE. I'm confused about the AID of the card. Do I have to know what the AID of the card is? According to Host-based Card Emulation document: If you are emulating cards for an existing NFC reader infrastructure, the AIDs that those readers are looking for are typically well-known and publicly registered (for example, the AIDs of payment networks such as Visa and MasterCard). So, what is the point? P.S. I don't think the

What APDU command gets card ID

前提是你 提交于 2019-11-27 22:20:23
问题 What APDU command gets 7 byte of card ID? I use T=CL (ISO7816) pritocol with ISO14443 layer. On detect card I can see only 4 byte of card ID. I searched, that is APDU command for gets card ID. For example its: 0xFF, 0xCA, 0x00, 0x00, 0x00 but result of thouse command is: 6E 00 , that on specifications of APDU answers tell that "Class not supported" Then I find, that its APDU command may be as: 0x00, 0xCA, 0x00, 0x00, 0x00 this command return 6A 88 where 6A XX - "Wrong parameter(s) P1-P2" and

Set own authentication keys MiFare Classic with APDU C#

社会主义新天地 提交于 2019-11-27 16:56:10
问题 I'm using the SMARTCARD API from CardWerk. How can I change the default key ( (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF ) using an APDU? The APDU consits of a CLASS, an INSTRUCTION, P1, P2. I have been reading documentation but I'm unable to find what parameters do I need to change the actual key to a new one. 回答1: The process for changing the keys of a MIFARE Classic card is like this: Authenticate to the secor for which you want to change the key. Read the

Card emulation via software NFC

你。 提交于 2019-11-27 15:33:20
问题 After reading a lot of questions, i decided to post this one. I read that stock version of android does not support API's for card emulation. Also, we cannot write custom applications to secure element embedded in nfc controllers due to keys managed by google/samsung. I need to emulate a card (mifare or desfire etc). The option i can see is doing it via software. I have a ACR122U reader and i've tested that NFC P2P mode works fine with the Nexus-S that i have. 1) I came across a site that

DESFire EV1 card emulation

耗尽温柔 提交于 2019-11-27 15:31:15
问题 I need to emulate a DESFire EV1 card on an Android device. However, I'm confused on how to use the Mifare SDK (lite or advanced) with the HCE. Is that even possible? I need to start the project and I had a lot of researches about how the data are stored and ciphered in the DESFire cards but I ended up with the fact that I need to use Mifare SDK on HCE. 回答1: First of all, you cannot use the MIFARE SDK to emulate cards. The MIFARE SDK provides reader-side functionality only. Second, you cannot

Getting Parser error on request for GPO command for EMV card

天涯浪子 提交于 2019-11-27 09:50:00
I have some issues with the GET PROCESSING OPTIONS (GPO) command for a VISA card. Following is my response to the SELECT command for the VISA application: 6F408407A0000000031010A535500A564953412044454249549F380C9F66049F02069F37049F1A025F2D02656EBF0C1242034761735F550255539F5A0511084008409000 I extracted the following PDOL from this: 9F66049F02069F37049F1A02 I'm not sure about tag 9F66 . My GPO command then looks like this: 80a800000100000001000000001000823DDE7A12400 But I get a parser error as response: 6A80 Your GPO command seems to have quite a lot of issues: 80 A8 0000 01 00000001

Locking mechanism of Mifare Classic 1K

巧了我就是萌 提交于 2019-11-27 09:19:25
The procedure of Mifare Classic 1K is Polling for tags Authenticate those tags If authentication succeded then read/write. I already completed those procedures and also read and write data from specific sectors. Command for Polling for tags is new byte[] { (byte) 0xFF, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0xD4, (byte) 0x4A, (byte) 0x01, (byte) 0x00 } Authentication command is new byte[] { (byte) 0xFF, (byte) 0x86, (byte) 0x00, (byte) 0x00, (byte) 0x05, (byte) 0x01,(byte) 0x00, (byte) 0x04, (byte) 0x60,(byte) 0x00 }; Here "(byte) 0x01" is the Sector 1 And Write on Sector 1

How to prevent NFC tag cloning?

 ̄綄美尐妖づ 提交于 2019-11-27 07:54:05
I am making an app using NFC tags and I have to prevent the NFC tag from cloning. I have seen many other NFC tags which when tried to be cloned, shows a pop up message "Cloning is restricted, tag is secured by secret key", I want the same security for my NFC tag. That depends on what type of tag you use and what level of protection against cloning you want. NFC tags (as defined by the NFC Forum ) have no protection against cloning. Such tags are intended as containers for freely readable data (so called NDEF messages). Anyone could read an NDEF message from one tag and duplicate it to another