smartcard

Why I can't receive APDU buffer contents?

杀马特。学长 韩版系。学妹 提交于 2019-12-06 14:52:05
I wrote the following program to return all the APDU buffer contents on reception of each APDU command: package testPack; import javacard.framework.APDU; import javacard.framework.Applet; import javacard.framework.ISOException; public class BufferReturner extends Applet { private BufferReturner() { } public static void install(byte bArray[], short bOffset, byte bLength) throws ISOException { new BufferReturner().register(); } public void process(APDU arg0) throws ISOException { if(selectingApplet()){ return; } arg0.setOutgoingAndSend((short)0, (short)255); } } When I send commands though the

Reading NFC Tag using JAVA Smart Card API not working on MAC OS

纵饮孤独 提交于 2019-12-06 12:08:54
问题 I am developing an application to read a NFC Tag UID from NFC Reader (ACR122U-A9) device. I used JAVA and javax.smartcardio API to detect the NFC Reader and Reading NFC Tag. The functionality of the application is to display notification when the NFC Reader device is connect or disconnect from PC. Then if the device is connected and NFC Tag is presented then display the notification that NFC Tag is presented. I tried to find the Event based api to implement above functionality but I cannot

Request Client Certificate

安稳与你 提交于 2019-12-06 12:08:28
I've seen a lot of unsolved questions about this. Apparently many developers have gotten past this issue, but I haven't seen any solutions posted. I'm trying to read a smart card (X.509 CAC) for my ASP.NET MVC 5 web app. When I try to pull the certificate information like this: var request = HttpContext.Request; var cert = request.ClientCertificate; The cert has empty values. The problem appears to be I am not presenting the dialog to request user certificate info like I see on other websites. How do I expose this dialog? I am running it with SSL enabled. My applicationhost.config has this in

BigInteger subtraction in JavaCard

烂漫一生 提交于 2019-12-06 11:25:01
I am attempting a proof of concept under very constrained technological conditions. My question is: how to efficiently subtract big integers (represented as byte arrays) in a Java Card? . Now, the details are what make the task tricky. I have access to one smart card. The model is Feitian JavaCOS A22 and runs Java Card 2.2. For full detail, Java Card enables the usage of a very restricted subset of the Java API ( namely, no int , no char , and naturally, no BigInteger ), but it does support a series of cryptographic primitives that can be detailed on this list . In particular, my task is to

Update: Personalization of Javacard Applet with GlobalPlatform

孤街醉人 提交于 2019-12-06 11:06:13
问题 From what I've heard, it is common for bigger smart card applets to personalize with global platform. I also found some PDF about personalization with Global Platform, as well as the Javacard API for GP. But I'm somehow missing some information relating both and I haven't found a good documentation on it. How should I organize my Applet to perform GP compatible personalization? Edit: I've read into the documents and have some specific questions, which I hope you can answer shortly. Q1: Guide

Verify windows log-in via smart card

前提是你 提交于 2019-12-06 10:48:20
Hi I need to verify in my WPF application if the user log in to his computer via password or via smart-card. Both login options are available in my company clients but my application need to open only in the smart-card login. All the clients are windows 7 OS. I look at some sites: http://technet.microsoft.com/en-us/library/ff404285(v=ws.10).aspx http://www.codeproject.com/Articles/240655/Using-a-Smart-Card-Certificate-with-NET-Security-i and I'm thinking I need to get the enhanced key usage (EKU) attribute field. If the EKU is empty => then the user was loged via password and not via smartcard

setATRHistBytes() method always returns false

别等时光非礼了梦想. 提交于 2019-12-06 10:41:06
I wrote the following program to change the Historical Bytes in the ATR of my smartcard to, for example, 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 . I use GPSystem.setATRHistBytes() to set the historical bytes. Note that 0x00 0x00 ... 0x00 is not the actual value that I'm using for the historical bytes but I censored it. The actual value is an array of 15 bytes that is equal to the historical bytes of another exisitng card. package org.globalplatform; import javacard.framework.*; import org.globalplatform.GPSystem; public class TestPrj extends Applet { public static final byte[] HIST_B

Reading data from European DTCO company card

十年热恋 提交于 2019-12-06 09:22:19
I need to be able to read card and company identification data from European digital tachograph company cards (smart cards). These are described within the document COMMISSION REGULATION (EC) No 1360/2002 but I have run into a problem. The data I need to be able to read is contained within the file EF Identification , which must be read with secure messaging and I therefore need to issue a Manage Secure Environment APDU command that requires a key identifier that identifies a key residing on the card. I don't know where to find these key identifiers or the data that makes them up (described in

SIM Card Authentication

拟墨画扇 提交于 2019-12-06 07:20:28
I'm new to SIM Cards and I'm trying to authenticate to a SIM Card using Gemalto JCardManager (part of Gemalto Developer Suite), with Gemplus USB SmartCard Reader. Aparently, i have all the necessary keys (kic, kid and kik), but i can't authenticate. In fact, i have two SIM's: one SIM Card R5 and one USIM Card R5. I have configured the keys files for both of them, but when i try to authenticate to the SIM Card R5, the following message appears: [ERROR ] <- 6D 00 Command Exception on command: Authenticate. Authentication failed : INITIALIZE UPDATE : unknown response : VOP sw=6D00 And when i try

ACR122U NFC Peer to Peer demo not working

心不动则不痛 提交于 2019-12-06 06:23:20
I've got an ACR122U NFC card reader and ACR122T token from ACS. I'm trying to run their NFC Peer to Peer demo. I've installed the ACR122U SDK, mysql and connector, set up the database, and added the escape command to the registry. When I try to run the peer to peer demo I carry out the following steps (with resultant log results shown) Insert NFC ACR122T into USB port. Open the Smart Poster application and click initalise with reader 0. Log: D1: 2:04:57 PM Program ready D1: 2:05:02 PM Succesful connection to : ACS ACR122U PICC Interface 0 Direct Mode D1: 2:05:02 PM << FF 00 48 00 FF D1: 2:05