contactless-smartcard

Emulate a smart card on Android when the NFC Reader does not send a “SELECT AID” APDU

谁都会走 提交于 2019-12-01 07:40:28
问题 I have read the Android documentation about NFC and found that it could emulate an NFC tag. However it requires that you register which AID you serve. Is it possible to create an application that handles communication if the NFC reader does not send a "SELECT AID" APDU? Either by creating an application where the AID in the manifest file is empty, or create some sort of default application. I don't mind if the application has to be in the foreground, if that helps in any way. Thank you in

Parsing PDOL for GET PROCESSING OPTIONS command in EMV transaction

可紊 提交于 2019-12-01 05:18:35
I am trying to build a correctly formatted GET PROCESSING OPTIONS command to be sent to a contactless EMV card. This post has been very helpful but I just need to know a little more detail. When parsing the PDOL, is it safe to assume that each tag is 2 bytes in length, followed by the size of the data expected in return? For example, the PDOL 9F66049F02069F37049F1A02 is broken into 9F66 04 , 9F02 06 , etc. each with 2 byte tags and 1 byte for the expected length of the data value. Is it safe to assume that each tag is 2 bytes in length when parsing? No, you can't expect that each tag consists

Android isoDep.transceive on Generate AC command always returns 6D00 unsupported

孤街醉人 提交于 2019-11-30 23:13:03
I'm trying to emulate a PoS, point of sale :), system and complete a transaction with Google wallet running on a 2013 Nexus 7 (no secure element) v4.4.2. My PoS prototype is also running on a 2013 Nexus 7 v4.4.2. I'm able to get NFC responses from the 2PAY_SYS_DDF01 request. I'm able to select the MasterCard application ID. I'm able to get Processing Options. When I Read Records it doesn't look like Google wallet is returning all the mandatory EMV fields. And finally when I request the Generate AC command it always returns 6D00 unsupported. Area of the code that is a problem: //set P1 to '40',

Reading public data of EMV card

元气小坏坏 提交于 2019-11-30 16:04:42
问题 Say I want to read public elements of EMV card. I will list some steps which I think are involved. 1. First, select application In order to select application we must: (1) find out AID of application using PSE (if present) (2) Try existing AID list. Now, imagine I successfully selected application using one of the two methods above. My question is : What steps I must undertake further to read the public elements of EMV card? More precisely: Do I need to provide card with PDOL and get AIP and

Mifare 1K authentication keys

大城市里の小女人 提交于 2019-11-30 14:12:52
问题 I have a MIFARE 1K tag. Some blocks can be written/read using authentication key A, while other block can be written using authentication key B. Why? How can I change all blocks to be written/read, for example, with key A? For example, I can write the key block 07 using key A, and I can also change the key A for this key block, but I can't write on it using key B, and I can't change the key B for this key block. Why should I write/read using key A instead of key B? What's the difference? 回答1:

How mature is the Android NFC ISODep support?

半腔热情 提交于 2019-11-30 13:25:56
问题 I understand that this is a "discussion" topic that has no definite answer, but I would really like some feedback on what to expect when developing NFC APPs for Android, in particular using IsoDep to communicate with DESFire cards using APDU frames. Can I expect that the same APDU frames sent to a particular DESFire card responds identically across Android Devices and versions? What Android versions and devices should I test on as a minimum to be reasonably well covered? Is it common with

How mature is the Android NFC ISODep support?

不羁的心 提交于 2019-11-30 07:28:59
I understand that this is a "discussion" topic that has no definite answer, but I would really like some feedback on what to expect when developing NFC APPs for Android, in particular using IsoDep to communicate with DESFire cards using APDU frames. Can I expect that the same APDU frames sent to a particular DESFire card responds identically across Android Devices and versions? What Android versions and devices should I test on as a minimum to be reasonably well covered? Is it common with bugs or regressions in the Android drivers or can I expect that these are rooted out a long time ago? What

Why doesn't Android HCE support Mifare Classic type?

旧时模样 提交于 2019-11-29 07:44:47
Mifare Classic is the most used cards and I can't understand why HCE (Host-based Card Emulation) only supports ISO 14443-4, but not Mifare Classic type. Because NXP stops them from using their proprietary protocols and algorithms? Or because they didn’t implement Mifare Classic in Android OS level? Any comments will be very appreciated. Short answer: Because Google decided to support only ISO/IEC 7816-4 over ISO-DEP (ISO/IEC 14443-4). Speculations on why they decided that way: First of all, ISO/IEC 7816-4 over ISO-DEP is the highes protocol layer that could be used to route communication to

What APDU command gets card ID

家住魔仙堡 提交于 2019-11-29 04:20:58
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 88 - "Referenced data not found" What you think about it? Thank you! p.s. All command as: CLA, INS, P1,

Set own authentication keys MiFare Classic with APDU C#

99封情书 提交于 2019-11-29 02:37:38
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. 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 sector trailer using normal read operation (or generate a new sector trailer containing the access bytes you want