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.

764 questions
27
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
  • 523
  • 1
  • 4
  • 11
27
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
  • 303
  • 1
  • 5
  • 9
24
votes
3 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,658
  • 8
  • 33
  • 46
19
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…
Ebrahim Ghasemi
  • 5,850
  • 10
  • 52
  • 113
16
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,509
  • 9
  • 42
  • 66
12
votes
1 answer

Generate "GET PROCESSING OPTIONS" (GPO) for EMV card (APDU) by PDOL

GPO Command is defined like this as an APDU command: CLA INS P1 P2 Lc Data Le 80 A8 00 00 Lc Data 00 So the missing parts is Lc & Data which we have to compute from the PDOL (if it is given). If it is not given, we can use: 80 A8 00 00 02 8300…
Steffan
  • 704
  • 1
  • 11
  • 25
12
votes
1 answer

NDEF vs APDU NFC Android

Can you tell me please what is the difference between NDEF (NFC Data Exchange Format) and APDU (Application Protocol Data Unit). I have developed an Android application that reads NDEF messages, and I want to know if it can work for APDU data too.
Najoua Mahi
  • 304
  • 3
  • 16
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
  • 133
  • 7
11
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ã
  • 111
  • 1
  • 4
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…
11
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
11
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,294
  • 3
  • 16
  • 32
11
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
  • 177
  • 2
  • 3
  • 9
10
votes
1 answer

Authentication on website using smart card in python

So I have a smart card provided by the company which looks like a credit card with a chip. This card logins on a website after the card is inserted into the card reader. Now I have to write a program in python which can read the card and login on…
Anudocs
  • 686
  • 1
  • 13
  • 54
10
votes
2 answers

Smart Card Reader T0 T1 communication on APDU level

I am struggle to understand what protocol I have to use to communicate with the card T0 or T1? So, correct me if I am wrong, but the reader actually decides by itself what protocol to use to communicate with the card if the card supports both. So…
Alex D
  • 942
  • 1
  • 6
  • 17
1
2 3
50 51