smartcard

How do I read the PAN from an EMV SmartCard from Java

六眼飞鱼酱① 提交于 2019-11-30 02:24:15
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 cannot find regular byte array to construct APDU command which will return needed data anywhere... You shouldn't need to wrap the APDU further. The API layer should take care of that. It looks like the 0x6D00 response just means that the application did not support the INS. Just troubleshooting now, but you did start out by selecting the MasterCard

Java Signature.verify results in SignatureException: Signature encoding error Caused by IOException: Sequence tag error

人走茶凉 提交于 2019-11-30 00:02:02
问题 first of all this is not a duplicate question as most people report this exception when creating a Public Key from a Certificate which is missing "---BEGIN RSA CERTIFICATE---" line. gist of what I am trying to do is 1. Sign a 50Byte message on JCOP Smart card using SHA1withRSA algorithm (RSA Key is 1024 bits). 2. Export the signature from smart card to server. 3. Verify the signature on the server. Code snippet on the smart card to create the signature. The key point is I am using algorithm

javax.smartcardio: how to send native commands to Desfire card?

二次信任 提交于 2019-11-29 23:30:58
问题 I am creating a java application communicating with a Mifare DESFire card through a PC/SC contactless reader and the javax.smartcardio API. I manage to send regular ISO 7816 APDUs (CLA, INS, P1-P2, Lc, Command data, Le). I have read on Ridrix's Blog that DESFire cards (at least the EV1 version that I am using) support both APDUs and Native commands where most of the commands are only 1 byte long. For example, the " Get Version " command: Command: 60 Response: af 04 01 01 00 02 18 05 I tested

Accessing javax.smartcardio from Linux 64 bits

我与影子孤独终老i 提交于 2019-11-29 22:22:50
I'm trying to load the smartcard terminals using the javax.smartcardio API with the following code: public CardTerminal getReadyCardTerminal() throws CardException { TerminalFactory factory = TerminalFactory.getDefault(); CardTerminals terminals = factory.terminals(); List<CardTerminal> list = terminals.list(State.CARD_PRESENT); while (list.isEmpty()) { terminals.waitForChange(1000); list = terminals.list(State.CARD_PRESENT); } CardTerminal cardTerminal = list.get(0); return cardTerminal; } ... and I always get the following exception: java.lang.IllegalStateException: no terminals at javax

java.lang.nullpointerexception in j2me

一曲冷凌霜 提交于 2019-11-29 17:40:37
I am writing an application for read the mifare card,but when I pass the APDU the error occur that on emulator "java.lang.nullpointerexception".I have successfully detect the ISO14443_CARD after that I pass the APDU like if (tp.hasTargetType(TargetType.ISO14443_CARD)){ form.append("Target is ISO14443_CARD\n"); try { static byte[] APDU_AUTH1 = { (byte) 0xff, (byte) 0x86, (byte) 0x00, (byte) 0x00, (byte) 0x05,(byte)0x01,(byte)0x00,(byte)0xfc,(byte)0x60,(byte)0x00}; static byte[] STATUS_BYTE = {(byte)0x90,(byte)0x00}; if(STATUS_BYTE == iso14443.exchangeData(APDU_LOAD_KEY)) { String value1 = new

working with IC card reader and SLE5528 smart card

允我心安 提交于 2019-11-29 16:51:46
Am having an IC contact card reader and SLE5528 smart cards.Am wondering how to get started working with these items really. The reader is being read and i see no effect when i insert the smart card . i also installed the smart card shell of opensmart from http://www.openscdp.org/ but i can't get to read any card reader with it.Am wondering whether it has compatibility issues. Please i know i may have asked the question inappropriately, but am kindly asking anyone there to help me out on this. Any relevant links or helpful information to get me started and done will be of great help Thanks in

I can't find APDU commands for SLE5542

穿精又带淫゛_ 提交于 2019-11-29 16:19:51
I can't find anywhere a valid APDU list for SLE5542 smartcard. Actually I found this: http://www.acs.com.hk/drivers/eng/PMA_ACR38x(CCID)_v6.01.pdf but it's not working. I've searched also for SLE4442 which is compatible, I've searched some standardization, but nothing. (I found some comprehensive datasheets about SLE4442 but they don't contain APDU data) I'm novice in this domain, so maybe I'm missing something. In the end I want to be able to read/write some data to the card. (including Programmable Security Code PSC Verfication) guidot The SLE5528 and 4428 are no SMARTcards, just dumb

Javacards IDE, and JCOP tools for eclipse unavailable to download

删除回忆录丶 提交于 2019-11-29 05:11:39
I'm starting to develop in JavaCard (more specifically JavaCard 2.2.2). I'm searching for tools to develop in JavaCard. I want an IDE that incorporates both an emulator and a debugger. The eclipse plugin JCOP tools from IBM seems to do that, but for some reason I can't find it online. Some forums point to the link http://www.zurich.ibm.com/jcop/download/eclipse/ , but this link no longer works... Anyone knows what's going on? Have JCOP tools been discontinued? If so, can anyone suggest another IDE capable of those features? JCOP tools is no longer maintained by IBM. All support activities

What APDU command gets card ID

家住魔仙堡 提交于 2019-11-29 04:20:58
What APDU command gets 7 byte of card ID? I use T=CL (ISO7816) pritocol with ISO14443 layer. On detect card I can see only 4 byte of card ID. I searched, that is APDU command for gets card ID. For example its: 0xFF, 0xCA, 0x00, 0x00, 0x00 but result of thouse command is: 6E 00 , that on specifications of APDU answers tell that "Class not supported" Then I find, that its APDU command may be as: 0x00, 0xCA, 0x00, 0x00, 0x00 this command return 6A 88 where 6A XX - "Wrong parameter(s) P1-P2" and 88 - "Referenced data not found" What you think about it? Thank you! p.s. All command as: CLA, INS, P1,

Browser is not prompting for a client certificate

不羁岁月 提交于 2019-11-29 03:23:16
Background: I am updating an internal application to a two-step authentication process. I want to add a client certificate authentication process (via a smart card) on top of a traditional username/password form. The application is written in C#, hosted on IIS7, and targeting Chrome and IE8. Problem: I am having issues with getting the application to prompt the user for a client certificate. I have been debugging the application with the help of Fiddler. When I have a test client certificate saved in Fiddler's user's directory (C:\Documents and Settings\USER\My Documents\Fiddler2), the