smartcard

How to use SCardGetStatusChange correctly on Windows 8?

混江龙づ霸主 提交于 2019-12-07 12:12:59
问题 The smart card service behaves differently on Windows 8 and MSDN hasn't updated their documentation. Can anyone give a code snippet on how to call SCardGetStatusChange correctly to monitor smart card actions on Windows 8? Thanks in advance! 回答1: Here is a C++ template function that I wrote for a personal blog project. It uses a library I am developing that is up on github, but you can also just rework the logic into your own context. template<typename SetContext, typename ClearContext,

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

EMV Tag 91 Issuer Authentication Data - How to Determine Format of Tag in Response

扶醉桌前 提交于 2019-12-07 07:20:57
问题 If present, EMV Tag 91 Issuer Authentication Data can have several different formats when returned in a transaction response. From my (limited) understanding, this may be determined by the card brand. For example MasterCard Tag 91 includes Card Status Update as part of Tag 91 data Visa Tag 91 includes the Authorization Response Code as the last two bytes of Tag 91 data. I need to solve a problem where Tag 8A Authorization Response Data is not returned as part of the EMV tag data in the case

Certificates from SmartCard in C#

。_饼干妹妹 提交于 2019-12-07 05:45:15
问题 How can I ensure to I am accesing the Certificates from my SmartCard and not form my personal certificate store in c#? and How can I make my RSACryptoProvider to utilize my smart card certificate private key? thanks Wally 回答1: Sometimes, especially if you are not using default key container name on the smart card (recommended by Microsoft), certificates are not copied to local certificate store. The solution is to use crypto api to access the key with KP_CERTIFICATE, construct certificate

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:

How to work with SCOSTA smart card, create MF, DF, EF and write/read data, …etc?

假装没事ソ 提交于 2019-12-06 21:42:50
I am new to world of ISO 7816 smart-card programming, I have good knowledge about contactless programming, I have SCOSTA card and I tried my best to read/write data on it but always it response to me with Error 6986. You first need to select a file or indicate a file within the READ BINARY command before you can read data from these kind of cards. You currently get an exception that means that you haven't selected a file yet. Memory cards commonly have a single interface and a default selected file so you can directly send read commands. But a file based Smart Card implementation such as

Loading a .cap file onto a smart card: LOAD failed SW 69 85

我的梦境 提交于 2019-12-06 21:34:25
I am having trouble loading the .cap file onto the smart card, its just a basic hello world program. I keep getting LOAD failed SW 69 85 as an error. Ive tried loading the .cap using gp and gpj. From the reading I've done it seems to be some security issue. I am still able to view the apps and delete it off the card, so the card is not locked yet. I'm just a beginner at this so help would be really appreciated. Here is the output from gpj: Found card in terminal: OMNIKEY Smart Card Reader USB 0 ATR: 3B 68 00 00 00 73 C8 40 11 00 90 00 DEBUG: Command APDU: 00 A4 04 00 07 A0 00 00 01 51 00 00

How do I get all the smart card readers on my system via WMI?

左心房为你撑大大i 提交于 2019-12-06 15:33:16
I want to get the DeviceID and Service of all PCSC smart card readers on my system using WMI. They're all connected via USB, so I query the WMI registry for all Win32_PnPEntity s. But I have no clue how to determine which devices are 'card readers'. Here's what I already have: ManagementObjectSearcher mos = new ManagementObjectSearcher(@"\root\cimv2", @"Select * From Win32_PnPEntity"); ManagementObjectCollection mob = mos.Get(); foreach (ManagementObject mo in mob) { Console.WriteLine("DeviceID: " + mo["DeviceID"].ToString()); Console.WriteLine("Service: " + mo["Service"].ToString()); } I can

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