smartcard

SmartCardIO EMV Reader, find my card type with only the ATR number

我怕爱的太早我们不能终老 提交于 2019-12-03 22:23:05
问题 I´m starting a new project, I´m new using EMV reader and Javax SmartCardIO. I have the list of the RID for each type of card, however the only thing I can access without knowing the type of card is the ATR, I´m wondering if there is a way to get the RID or the card type with only this info, any help is welcome. Thanks in advance! EDIT: I tried to execute the select PSE command with this method: public static byte[] selectPSE(CardChannel channel) throws CardException { byte[] selectPSE = {

Sign multiple pdf with itextsharp and token prompts for pin every time

馋奶兔 提交于 2019-12-03 22:17:18
Hi I am trying to prevent multiple pin prompts for every pdf that needs to be signed. I am using code from this example : Pin is required when this part of code get process : MakeSignature.SignDetached(appearance, pks, chain, crlList, ocspClient, tsaClient, estimatedSize, subfilter); Is there any way to memorize token pin and sing rest of pdfs without prompting for pin? Finally I found solution, this code does the trick : ... RSACryptoServiceProvider rsa = (RSACryptoServiceProvider)pk.PrivateKey; CspParameters cspp = new CspParameters(); cspp.KeyContainerName = rsa.CspKeyContainerInfo

Smartcard reader naming

无人久伴 提交于 2019-12-03 22:15:59
I have two readers (HID OMNIKEY 5321) in system (every reader performs a different function) reader 1 - "Smart Card Reader 0 " reader 2 - "Smart Card Reader 1 " In my program is set up that "Smart Card Reader 0 " - action 1 "Smart Card Reader 1 " - action 2 but sometimes (without rebooting, perhaps lost contact) reader 1 gets name "Smart Card Reader 1 " reader 2 gets name "Smart Card Reader 0 " and the program does not do what users need. I use SCardGetStatusChange (requires the name of the reader) in WinScard.dll What to do? Is there a way to change the name of the reader (firmware, drivers..

Overwriting OffHostApduService to route APDU to SIM Card

南楼画角 提交于 2019-12-03 21:53:54
I'm working on a project to emulate a transport card on an Android phone, I've read through the Android Kitkat documentation and found that in order to emulate a card with a secure element I need to inherit from OffHostApduService. How ever after spending a lot of time on Google I couldn't find what to write on the onBind function to redirect APDU from the other NFC device to my mobile device SIM card. The card is NFC A & B compatible does it means I can send commands to it using the NfcA or NfcB Class ? I work on a Samsung Galaxy 3, Samsung Galaxy 4 Mini, which both have the openmobile api or

C# - Write in Smartcard using PCSC-Sharp

可紊 提交于 2019-12-03 21:45:17
Good day everyone, I would like to ask on how to write in Smartcard. I just rely on the example given on the documentation but it only has read tag. I follow the examples here in https://github.com/danm-de/pcsc-sharp/blob/master/Examples/Transmit/Program.cs using System; using PCSC; using PCSC.Iso7816; namespace Transmit { public class Program { public static void Main() { using (var context = new SCardContext()) { context.Establish(SCardScope.System); var readerNames = context.GetReaders(); if (readerNames == null || readerNames.Length < 1) { Console.WriteLine("You need at least one reader in

JCWDE : Exception from install() method

左心房为你撑大大i 提交于 2019-12-03 21:44:57
I am working on JavaCard and I developed an applet with JCDE on Eclipse: import javacard.framework.APDU; import javacard.framework.Applet; import javacard.framework.ISO7816; import javacard.framework.ISOException; import javacard.framework.Util; import javacardx.framework.math.BigNumber; import javacard.security.CryptoException; import javacard.security.MessageDigest; public class SignatureGPS extends Applet { public static final byte CLA = (byte) 0xB0; public static final byte INS = (byte) 0x00; private BigNumber s; private BigNumber x; private MessageDigest h; private SignatureGPS() { s =

How to Access Remote USB Smartcard during RDP

旧城冷巷雨未停 提交于 2019-12-03 20:51:18
[My set up] RDP Client (Win7) ------------------RDP------------------------> Remote Server (Win2k8R2) with SmartCard I've found countless answers that would suggest this is not possible. Alot of answers indicate that RDP was designed this way for security. The smartcards are locked which do not allow the device to be seen when connecting remotely with Remote desktop connection (RDP). However I've found a useful link which appears to work for some but not all. http://lifayk.blogspot.co.uk/2012/07/windows-smart-card-subsystem-and-remote.html The guide shows how it's possible (by editing the

Behavior of javax.smartcardio.Card.disconnect(boolean reset) in JDK 7u79?

夙愿已清 提交于 2019-12-03 20:07:35
According to the release notes of JRE 7u72 : Change in javax.smartcardio.Card.disconnect(boolean reset) method behavior Prior to the JDK 8u20 and JDK 7u72 releases, the javax.smartcardio.Card.disconnect(boolean reset) method had inverted logic for the 'reset' boolean value passed to it. The card was reset upon a disconnect if false was passed to it and vice versa. Starting with JDK 7u72 and JDK 8u20, the correct behavior as per API documentation has been implemented. In order to provide backwards compatibility to users who rely on the old behavior, a new system property has been introduced.

Parse CV Rule from CVM List for EMV

旧街凉风 提交于 2019-12-03 14:22:41
I have succesfully retrieved the CVM List from EMV card. 0000 0000 0000 0000 4103 4203 1E03 1F02 From the EMV specification book 3, the first 4 bytes and second 4 bytes are amount and rest is CV rules. Making these the CV Rule 4103 4203 1E03 1F02 The book also shows how to parse the CV rules, as shown below: I am assuming that I need to convert the first two bytes in a CV rule to binary and match with the table above? But why does the table above have empty cells? Also can someone explain in a simple pseudo code algorithm to parse this? Have you referred section 10.5.5 CVM Processing Logic in

Installing applet in javacard

不打扰是莪最后的温柔 提交于 2019-12-03 12:50:30
I made a .cap file of the popular "Hello World" javacard code via Eclipse And now I want to load it in a real javacard via GPShell and ACR38 smart card reader. question: Am I need any key to load the .cap file in the card? I mean, should I authenticate before uploading my applet in the card or it's not necessory? I think it is mndatory to authenticate. it is irrational to upload .cap without authentication. but I don't know , how to authenticate. question: What's wrong in this? C:\Users\ghasemi>java -jar e:\gpj\gpj.jar -load e:\helloWorld.cap -install Found terminals: [PC/SC terminal ACS CCID