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
0
votes
1 answer

How to get card number and expiration date from debit/credit card?

I have a card reader to read cards with chip for android (it connects via usb). I can connect to card reader and power on card itself. But I cannot understand reponse when I send APDU command. Here is my code. String command =…
Nadir Novruzov
  • 467
  • 1
  • 6
  • 16
0
votes
1 answer

Background task in mobile phone to access a secure element and a web server

Is it possible in a GSM mobile phone OS (e.g. Android, Win Mo, Symbian, etc.) to have some kind of background task or application able to exchange data at the same time with a web server and a secure element of the mobile? The purpose if for the web…
0
votes
2 answers

Need help understanding APDU response

I've been using the ACR122 card reader for a while which had no trouble reading either Mifare 1K or Mifare Ultralight NFC cards. After upgrading the card reader to the newest version (ACR1251), my program can't read the UID from the Mifare 1K…
denethon
  • 93
  • 1
  • 10
0
votes
1 answer

Encrypted logical channel in Host Card Emulation

HCE implementations only support a single logical channel and it is by default not encrypted. Does anyone know, is it possible to establish a encrypted logical channel in HCE or any other way to make host card emulation more secure. Thanks
0
votes
1 answer

Read Certificate from SmartCard using javax.smartcardio

I need to retrieve a Certificate contained in a SmartCard ISO 7816 compatible. So far I've been able to verify the PIN using APDU commands but I need some pointers for retrieving the certificate. I've tried the following SELECT APDU which should…
user2824073
  • 2,407
  • 10
  • 39
  • 73
0
votes
0 answers

SmartCard response data in the Verify (pin) command gets lost in the Secure Pin Entry mode

I have a Smart Card applet that returns 16 bytes of random data in the response buffer of a successful VERIFY (pin) command. Normally (in a non-SPE regime) I send the following Verify command: 00 20 00 00 - 06 - 01 02 03 04 05 06 where the first 4…
0
votes
1 answer

PN532 Normal Frame limitation and How to Use Extended Frame

I am using PN532 with Raspberry Pi OS. I am able to communicate with Nexus 4. But PN532 reader is able to read max 134 bytes from the Nexus 4 phone. I am expecting to read more than 10k bytes. Please help me how to read so much bytes in one shot.…
0
votes
1 answer

How to Update APDU Multiple Records

Is it possible to update multiple records within a single APDU command? For example if I wanted to update PNN with 3 entries, is there a way of sending a single command instead of 3 commands?
0
votes
1 answer

PKCS file system in Android

I would like to create an android application. In this application I would like to create a PKCS file system (like in Java Card applet) (not involving secure element) and perform cryptographic operations through APDU commands. Is it possible? Any…
0
votes
3 answers

Smart Cards Development

I need a 'java' source code on how to extract a cap file from the computer and divide it into blocks in order to send it using APDUs to the smart card to install or load or delete an application. Thanks in advance.
0
votes
2 answers

Mandatory file apdu error: 6283 upon read. File invalidated

I'm attempting to read EF_LOCI(Location Information) file from a USIM. 1.I'm selecting the MF ->00A40004023F00 <-622C8202782183023F00A50980017183040001575B8A01058B032F0602C6099001408301018301818104000201069000 2.Now selecting DF TELECOM …
skoperst
  • 2,259
  • 1
  • 23
  • 35
0
votes
0 answers

Problems with Java Card, PCSC lite, and Applet Playground

I've been trying to get started using Java Card. I downloaded and installed the repository at this link: https://github.com/martinpaljak/AppletPlayground/ with the hope of starting to develop and use applets, but as of yet I have had no success…
0
votes
1 answer

Communicating to an iso 14443 card with android nfc

I have been trying to write a basic android app that could send APDUs to an ISO 14443 card and receive response APDUs. I already have my applet in the smart card with ID F000000A. So far I have written/modified other codes but I know im doing…
user3312054
  • 97
  • 2
  • 13
0
votes
1 answer

RSA Key generation fails on JCARD 2.2.2

I'm beginner in JCard programming (2 days experience ...) and I'm trying to deploy an app on a CREF emulated card that generates an RSA KeyPair and sends the public key over to the host RMI Client application, somehow when I launch the init method…
0
votes
1 answer

HCE Service is not running

I installed aide from playstore and copied the code from google to test the HostApduService. My app is shown under Tapp and Pay but if I send a CAPDU with my identive cloud 4700f reader my phone LG G2 (android 4.4.2) is not responding anything. My…