Questions tagged [apdu]

APDU stands for "Application Protocol Data Unit". An APDU is used to communicate with smart cards and Subscriber Identity Modules (SIMs) conforming to standard ISO/IEC 7816-4.

From www.jguru.com:

The APDU (Application Protocol Data Unit) is the communication unit between a reader and a card. The structure of an APDU is defined by the ISO 7816 standards.

There are two categories of APDUs: command APDUs and response APDUs. As the name implies, the former is sent by the reader to the card: it contains a mandatory 5-byte header and from 0 to up to 255 bytes of data. The latter is sent by the card to the reader: it contains a mandatory 2-byte status word and from 0 to up to 256 bytes of data.

686 questions
24
votes
2 answers

Android application to mimic a physical RFID card

Is it possible for an Android application to send a previously stored RFID card ID to a NFC reader? The aim would be to use an Android device to enable access to a room instead of a physical RFID card. Having read a lot of other threads about…
user1860579
  • 273
  • 1
  • 4
  • 9
21
votes
2 answers

SIMPLE-TLV vs BER-TLV

I have found in docs they are referring to SIMPLE-TLV and BER-TLV . I was look into most of the EMV and GP docs but they have not mentioned the different. Could anyone help me to understand the difference of two ?
nish1013
  • 3,288
  • 8
  • 30
  • 41
18
votes
2 answers

How to send commands to smart card reader (and not to the smart card) while no card present?

Preface: I have a dual interface smart card reader that has some extended capabilities (other than sending APDU commands to card and receiving APDU responses). For example in its document it is mentioned that you can get firmware version of your…
Abraham
  • 5,544
  • 10
  • 40
  • 95
17
votes
1 answer

how to create a sha1 hash in python

My objective is to perform "Hashsigning" using smart card in python. there are hashlib's used but there is no specific SHA1 or SHA256 functions in python. My Work: hash_object = hashlib.sha1(b'HelWorld') pbHash = hash_object.hexdigest() but the…
Swetha
  • 423
  • 1
  • 3
  • 11
12
votes
1 answer

How to get AID for reader Host based card emulation

I'm trying to do Host card emulation on an Android device using this example using ACR1281U NFC tag reader. This is the kind of application I want to make. As per the Android documentation and the example, it is required to register an AID in the…
Rachita Nanda
  • 4,171
  • 8
  • 39
  • 63
11
votes
3 answers

JavaCard 3 in real world?

I'm currently working on my diploma work. Part of the work includes development of JavaCard applet for regular SIM cards. First option is to use JavaCard2.X API and use APDU commands to communicate with the applet. This might be very tricky as I…
AGO
  • 123
  • 7
11
votes
2 answers

How do I distinguish different ISO 14443-4 cards?

There are different smart cards supporting ISO 14443-4. For example, Mifare Plus with its native command set. Or other cards with different command sets (i.e. 7816-4 APDUs). I develop some software for a card reader and I need to identify which…
10
votes
0 answers

How to Access Smart Card from a Chrome browser using WebUSB API and PC/SC?

I'm trying to write a web application which needs to exchange messages with a local Smart Card. Currently I'm trying to use WebUSB API to connect the Chrome with the smart card reader, but I'm struggling to use the PC/SC specification. In my…
Cauê Aruã
  • 101
  • 1
  • 4
10
votes
6 answers

How do I read the PAN from an EMV SmartCard from Java

I need to read account number from Maestro/Mastercard with smart card reader. I am using Java 1.6 and its javax.smartcardio package. I need to send APDU command which will ask EMV application stored on card's chip for PAN number. Problem is, I…
asabo
10
votes
3 answers

Java Card: How to load SIM applet to real smart card?

I developed a Java Card applet in Eclipse and obtained a cap file. Then i used jcManager – Java Secure Card Manager to load that file to my smart cards. I have two type of smart cards: Contact, JCOP 2.1 36K Contactless, JCOP 2.1 My smart card…
Oguz Ozkeroglu
  • 2,920
  • 3
  • 32
  • 60
10
votes
2 answers

APDU command to get smart card uid

i am looking for APDU to find UID of contact less ISO 14443 smart card and how to use it to print in Linux terminal. Problem is that i found many people talking about it, but there is no solution. Can anyone help is this regard??? Thanks
Salman
  • 167
  • 2
  • 2
  • 9
9
votes
5 answers

What APDU command gets card ID

Which APDU command gets 7 bytes of the card ID? I use T=CL (ISO7816) protocol with ISO14443 layer. On detect card I can see only 4 bytes of the card ID. I found that this should be the APDU command to get a card ID. For example its: 0xFF, 0xCA, …
dr_begemot
  • 113
  • 1
  • 2
  • 6
9
votes
0 answers

NFC Tag Read Speed

We are building a prototype application that reads an NFC tag using Android. However, we are not using the embedded NFC reader and Android SDK since we are using an external bluetooth reader called an ACR1255U-J1 The NFC chips that we are using are…
David
  • 5,464
  • 15
  • 47
  • 86
9
votes
1 answer

Host card emulation on Android (4.4 / KitKat and above) with Nexus 5

I'm trying to emulate an NFC tag with my Nexus 5 according to this document, but my service is never invoke. Should I turn off Android beam? I'd like to emulate a simple tag containing a url. The reader is a Nexus 7 (2012) and I've figured out the…
9
votes
3 answers

Developing a smartcard reader in Android

We developed a prototype board with a microcontroller, which can communicate with a SmartCard (It can read the ATR, issue and read responses to APDU commands, etc).Now I want to use this hardware with an Android phone or tablet. Our board has a USB…
SomethingBetter
  • 1,244
  • 1
  • 16
  • 31
1
2 3
45 46