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
4 answers

javax.smartcardio - javadocs

I'm studying the javax.smartcardio classes. I'm using eclipse 3.6 and I have JDK 6 SE. I can use the statement import javax.smartcardio.* or any of its individual classes, as long as I change preferences to warn or ignore forbidden references. I…
NickT
  • 23,844
  • 11
  • 78
  • 121
4
votes
0 answers

Send APDU commands to SIM card on iOS13 with TKSmardCard

I would like to send APDU commands to SIM card which is a smart card with TKSmardCard. It wasn't possible to use TKSmardCard before iOS13 but it is now. Is TKSmartCard api only for external Smart Card reader and not for the built-in SIM card (Smart…
Michael
  • 41
  • 1
4
votes
0 answers

How to establish TLS connection using HSM and OpenSsl

Background I have inherited the task to establish TLS 1.2 connection with server using cryptography token programmatically. The token in question is a read-only - does not allow extraction of private key - smart card. This token have been…
raidensan
  • 1,099
  • 13
  • 31
4
votes
1 answer

Available slots in a smartCard provider working with Java 9+

In Java 8 we can do something like this: PKCS11 p11 = PKCS11.getInstance("/usr/local/lib/libsiecap11.so", "C_GetFunctionList", null, false); long[] slots = p11.C_GetSlotList(true); But in Java 9 PKCS11 was deprecated and now I can't find any…
Betwen
  • 145
  • 11
4
votes
2 answers

Encrypting a data with a public key using pkcs11 module fails

I am using Python's pkcs11 package to access an X.509 certificate stored on my Yubikey 5. Accessing the certificate, public and private keys using pkcs11 Objects work fine as is signing and signature verification. Howerver, for the life of me, I…
Proto Ukr
  • 492
  • 4
  • 13
4
votes
0 answers

Electron App and HTTPS/SSL authentication with smart-cards pcks11

I am writing an electron app which sends HTTP requests to a public API (minister of justice) in order to let attorneys view their proceedings and folders. The Minister has exposed a specific proxy which expects a client certificate (contained in a…
rob1985
  • 41
  • 3
4
votes
0 answers

Java Cards suddenly stopped responding

I'm developing a Java Card application and have suddenly had two cards stop working, both at the same time. The cards are J3H081 Java Cards (Java Card 3.0.4, Global Platform 2.2.1) and I'm using both ACR122U and ACR1222L readers. I had been…
Aleks
  • 1,629
  • 14
  • 19
4
votes
2 answers

How To Use Extended APDU With Windows SmartCard Framework

I am using WinSCard to read an ISO 7816 compliant smart card (to be specific, it's a PIV card). The card has a picture on it that is roughly 12 KB. Right now, I connect in T=1 mode and use the SCardTransmit function to send my GET DATA APDU command…
Ben
  • 449
  • 8
  • 15
4
votes
2 answers

JavaCard, enabling/disabling install without risk of bricking?

Assuming I wanted to switch between two INSTALL states; 1. you can install applets and 2. you cannot install applets. And I wanted to guarantee that a device cannot be bricked in the latter state, is this possible? As I understand it changing the…
4
votes
1 answer

What are Secure Access Modules (SAM) needed for?

I am working on understanding Secure Access Modules (SAM). Why are they needed? What is the difference between a SAM-based and SAM-less approach when used along with RFID card readers?
4
votes
2 answers

How to use smart cards on web browser

I want to get information from the smart card. I want to do it on the browser. I already have a local solution which I used python with pyscard library mostly. How can I get the information out of smartcard on the browser? Browser does not matter I…
4
votes
0 answers

Smart Card detection with java

i'm using the following code to test whether there is a smart card connected to computer or not public static boolean verifySmartCardPresence() { boolean cardPresent = false; try { TerminalFactory tf = TerminalFactory.getDefault(); …
Elarbi Mohamed Aymen
  • 1,617
  • 2
  • 14
  • 26
4
votes
1 answer

GPG key forwarding on Debian

I'm trying to use the private key from my openpgp card from my Debian laptop to a RPi. I followed the different hints found on google, in particular: extra-socket in ~/.gnupg/gpg-agent.conf removed it again when founding that this extra socket…
wollud1969
  • 497
  • 4
  • 13
4
votes
3 answers

java application reads data from card reader

If someone wants to write a java application that interacts with a physical device, specifically a reader (e.g. as when you go in a hotel, gym, bank etc and you pass the card through a reader and the application finds you in the database) how is…
Cratylus
  • 52,998
  • 69
  • 209
  • 339
4
votes
1 answer

What is the sequence of APDU commands to install applet to java card?

I have a .CAP file ( applet ) and I want to install it to my java card. I know that I can use tools like GPShell or apdutool (from JCDK) to do that but I want to replicate the installation process by myself. The confusing thing is that in the GP…
Sebastian
  • 43
  • 6