Questions tagged [smartcard]

A smartcard is a card with an embedded chip that may store cryptographic keys and/or perform cryptographic functions. Smartcards are often use as employee ID badges or in contactless credit/debit cards.

Smartcards used for cryptographic functions such as identity verification, signing, and decryption are usually designed so that the cards can generate their own cryptographic public/private key pairs, such that the private key cannot be removed or exported from the card. Using a smartcard to decrypt or sign a piece of data is usually protected by a PIN or passcode.

If you receive a message, whose signature can be validated using the public key, then you know that the message could only have been signed using the private key stored on the smartcard, which means that the message came from someone having physical possession of the smartcard and who knows the PIN or passcode required to use the smartcard. Having the decryption key on the card directly enforces, that without card and PIN knowledge just the encrypted message is available.

SIM cards used in mobile phones are also smart cards, proving an existing account towards network and storing phone numbers and text messages.

EMV cards (also known as "chip and pin") use smartcards to increase security and decrease fraud. The EMV standard, and its test cases, are governed by EMVCo.

Smartcards have a dedicated standard: ISO/IEC 7816 that describes what defines a smartcard from physical characteristics to cryptographic information application, including protocols and commands.

Contactless smart card (such as PayPass and payWave etc) are covered by ISO/IEC 14443; that describe the physical characteristics of the card, power and signal interfaces, transmission and collision detection, and transmission protocols.

EMV cards are also issued with "dual" interfaces that use the same chip on the card and two external interfaces.

1917 questions
4
votes
1 answer

why I receive 6A80, 6A84 And 6A88 while I trying to change JavaCard keys?

I have a java card that is empty of applets. when I try to add/modify its keys via JCManager I receive 6A84 and 6A88 APDU-Response. Note-1: I searched GP Card Spec2.2 for both of this responses and finally I found nothing but the meaning of them!…
Ebrahim Ghasemi
  • 5,850
  • 10
  • 52
  • 113
4
votes
2 answers

Reading public data of EMV card

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…
user2793162
4
votes
2 answers

Always ask for the pin KeyStore PKCS11

I have an applet for digital signature. My problem is that initialize the keystore, but it remains open until you close the browser. How do I ask the pin every time I want to sign? This is the initialization code: /* Se obtiene el proveedor del…
Fernando
  • 41
  • 3
4
votes
1 answer

Mark Javacard applet as implicit selectable (default applet) after install

I'm looking for a way to mark an applet as the implicit selectable/"selected by default" applet after it already has been uploaded and installed on a Global Platform/JCOP 2.4.2 R1 system (for starters in the NXP JCOP Tools Java Card Simulation). …
VolkerK
  • 95,432
  • 20
  • 163
  • 226
4
votes
1 answer

ISO 14443 Type A Card Read/Write using Android

I am trying to write an Android App to read/write an NFC Card which supports the ISO 14443 Type A standard. After a thorough search it seems that the only option left now for me is to use the IsoDep class and its transceive method by sending the…
Ripul
  • 1,271
  • 4
  • 15
  • 18
4
votes
2 answers

Mifare authentication

Say I want to authenticate to Mifare Classic. How do I know the exact kind of APDU to send to the card? Example. This code: bcla = 0xFF; bins = 0x86; bp1 = 0x0; bp2 = 0x0; // currentBlock len = 0x5; sendBuffer[0] = bcla; sendBuffer[1] =…
user2568508
4
votes
2 answers

Has anyone got a tutorial up on getting your own smartcard and getting pkcs#11 working on it?

Has anyone got a tutorial up on getting your own smartcard and getting pkcs#11 working on it? In Linux? (Windows would be fine too). Most of the vendors seem to assume you'll be wanting enough for your whole company, not one or two.
joeforker
  • 40,459
  • 37
  • 151
  • 246
4
votes
1 answer

Card holder's name in APDU commands (ICC Card)

We are reading visa card information from APDU commands, here is the command sequence that we are sending 1. 00A404000E315041592E5359532E444446303100 2. 00B2010C00 at this time, we know that we can send Processing Command as …
user1479203
  • 437
  • 1
  • 8
  • 16
4
votes
1 answer

Trying to read and write a string to smartcard using smartcard I/O API

I'm using an ACS AET65 card reader trying to store a string into a smart card, and then read it back. I'm using the smartcard IO API and I'm able to get the terminal and connect with the card. However, I've been reading through the ISO 7816…
Edy Bourne
  • 5,679
  • 13
  • 53
  • 101
4
votes
1 answer

Using SCardGetStatusChange to be notified of card insert/remove without polling

I'm trying to detect when a card has been inserted into a reader. If I do a nasty polling loop like this: public struct SCARD_READERSTATE { [MarshalAs(UnmanagedType.LPWStr)] public string szReader; …
Dylan
  • 1,306
  • 1
  • 11
  • 29
4
votes
1 answer

How to send a PIN verification CODE to a smartcard using APDU - Using .NET

I am able to connect to the card and now I need to verify the PIN but I´m not able to figure out which code should I use to perform the verification // Verify PIN //HERE IS WHAT I´M NOT SURE WHAT TO USE - Just an Example byte[] pin = new byte[] {…
Guilherme Longo
  • 2,278
  • 7
  • 44
  • 64
4
votes
1 answer

how to create PKCS7 signedData structure with openssl or any other library with signing on smart card?

i need to create PKCS7 signedData structure with signing performed on smart card. It is almost what openssl function PKCS7_sign does, except the signing. Maybe somebody can advice something for this question, i.e. how to do this with openssl or any…
10101010
  • 121
  • 9
4
votes
2 answers

Are there javax.smartcardio analogues on Android?

Are there javax.smartcardio analogues on Android? but not using Open Mobile API. Thanks!
Taras
  • 2,526
  • 3
  • 33
  • 63
4
votes
2 answers

APDU Command to read card number

I would like to know if it's possible to get a Debit/Credit Card number from a SmartCard, I' trying to get it using a SmartCard reader with the communication protocol PC/SC,CCID and the card interface ISO/IEC 7816-1/2/3 SmartCard,MicroSD interface…
JuanD
  • 301
  • 1
  • 5
  • 11
4
votes
2 answers

Unblock PIN of SmartCard via Java (SunPKCS11)

i try to unblock or change a pin on smartcard tokens via java. Writing and reading smartcard-certificates via SunPKCS11-Wrapper is no big deal but i cannot see any C_setPIN or C_initPIN-methods in the PKCS11-wrapper-class. So is there a way to…
Dano
  • 239
  • 3
  • 10