apdu

Unable to generate correct application cryptogram

偶尔善良 提交于 2019-12-07 23:43:26
问题 I am successfully getting Generate Command response [9F02 06 (Amount, authorized, numeric)]: 000000003000 [9F03 06 (Amount, other, numeric)]: 000000000000 [9F1A 02 (Terminal country code)]: 0826 [95 05 (Terminal verification results)]: 0000000000 [5F2A 02 (Transaction currency code)]: 0826 [9A 03 (Transaction date)]: 150724 (2015-05-28) [9C 01 (Transaction type)]: 00 [9F37 04 (Unpredictable number)]: 12345678 And the command is 80 AE 4000 1D 000000003000 000000000000 0826 0000000000 0826

How to Reset java card using APDU command

非 Y 不嫁゛ 提交于 2019-12-07 22:32:28
问题 I am new to java card development.so far i have developed java card applet which can encrypt data using RSA algorithm. So basically i followed Application selection and send data.But now i want to reset java card before selecting the java card.Can anyone give me some brief idea how to do that??thanks Sajith. 回答1: There is no such thing as a RESET APDU command. Generally speaking, you can reset using a lower level API (which may not be available to you) or by disconnecting the card entirely.

Access an applet directly without AID selection

左心房为你撑大大i 提交于 2019-12-07 11:55:31
问题 Usually, when you power up a JavaCard smartcard and want to communicate with an applet, you must select the applet using its AID first. Is there any way to have a "default applet" that is selected when the card is powered up? What I really want to do is be able to send my application level APDUs immediately upon selecting the card and not need to go through the application selection process. Is this possible? If so, how? 回答1: If your Java Card smartcard implements the Global Platform Card

What is the meaning of 6E 00 when I send a command to a SmartCard

こ雲淡風輕ζ 提交于 2019-12-07 05:19:28
问题 I try to access a SmartCard via C++. I got already the Connection and the CardHandle. But when I send an APDU Command via SCardTransmit, i'll get 6E 00 as the answer from the card. No matter which APDU Command i send. Everytime 6E 00. For Example: FF CA FA 00 00 (Card's ATR - Answer To Reset) or FF CA FF 82 00 (Product name in ASCII) The same thing when i send the Command with an PC/SC Testtootl like "PC/SC Diag". Has anybody an Idea what the meaning of this Error-Code and how to solve the

What are the requirements for IssuerScripts

北战南征 提交于 2019-12-07 03:45:28
I am totally stumped about Issuer Scripts in EMV. I know what they are and I have read the EMV book 3. I was wondering if anyone has a good summary that tells me: Parse the script based on "86". Then based upon some values do this or that. Thanks Content of EMV TAG 0x86 is ready to use APDU command for the smartcard. It could be any of EMV or ISO 7816 Commands actually and should be translated to smartcard thru EMV terminal application/kernel without additional modifications. Here are usual APDU Instructions (INS) for Issuer scripts: - 16: EMV, Card Block - 18: EMV, Application Unblock - 1E:

EMV JavaCard APDU Response in TLV Format

ぃ、小莉子 提交于 2019-12-06 14:53:04
问题 I have a simple JavaCard HelloWorld script, i execute it in JCIDE with virtual reader then i send apdu commands from pyapdutool: 00a404000e aid then 80000000 and i receive javacard string, everything runs fine. My question is: how can i return a tlv format data instead of that response ? I was looking in the emv book 4.3 about this and also on google haven't found a single example to implement emv tlv tags in javacard script. Can someone put me on correct path to understand this ? package

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

Initial handshake between NFC controller and POS reader

青春壹個敷衍的年華 提交于 2019-12-06 13:26:53
I have few questions when the reader initiates the transaction with NFC emulated payment application using HCE Does the reader send the PPSE command as with the regular contactless card infrastructure? Does the host controller respond to PPSE command with the list of AID's from the registered AIDs listed in the routing table? So after the reader selects the AID, the host controller directs to the right HCE service? Please correct my understanding on the above concept. An EMV payment card terminal will not distinguish plastic cards, secure element based cards or HCE emulated cards. In all cases

Java Card Connecting To a Simulator failed

心不动则不痛 提交于 2019-12-06 10:59:18
I am trying to test a Java Card applet to establish a connection to a simulator such as cref: try { sckClient = new Socket("localhost", 9025); InputStream is = sckClient.getInputStream(); OutputStream os = sckClient.getOutputStream(); cad = CadDevice.getCadClientInstance(CadDevice.PROTOCOL_T0, is, os); } catch (Exception e) { System.out.println("error"); return; } try { cad.powerUp(); } catch (IOException e) { e.printStackTrace(); } catch (CadTransportException e) { System.out.println("error"); try { sckClient.close(); } catch (IOException e1) { e1.printStackTrace(); } return; } My code get

How to find AID number of my local transportation card?

∥☆過路亽.° 提交于 2019-12-06 09:32:08
问题 I have a transportation card for urban transportation. I need to know what aid(application identifier) number of the card is. According to EMV Book 1, i have to use the List of AIDs method (page 141). But how? I also have a ACR122U card reader. I can send an APDU command to the card. All i need is the AID of the card. In addition, i always get SW=6A82 error. It means "File Not Found". I suppose, i need to know true AID number to solve this problem. I want to see SW=9000 (successful) response.