smartcard

Load MSCAPI Java Keystore without loading private keys (hard token)

為{幸葍}努か 提交于 2019-12-03 11:58:38
问题 I would like to load a MSCAPI keystore within Java and examine available certificates in the MY store. However some keys for those certificates reside on hardware tokens and a popup asks for the token during load. Is there a way to defer loading the private keys when loading the Windows keystore? keyStore = KeyStore.getInstance("Windows-MY", "SunMSCAPI"); keystore.load(null,null); 回答1: The popup is being activated from the MS-CAPI Cryptographic Service Provider (CSP) - the DLL supplied by the

How can I check INITIALIZE UPDATE and EXTERNAL AUTHENTICATE correctness?

孤人 提交于 2019-12-03 10:09:27
I sent 80 50 00 00 08 00 00 00 00 00 00 00 00 [ INITILIZE UPDATE Command] via opensc-tool to my java card and received 00 00 11 60 01 00 8A 79 0A F9 FF 02 00 11 79 11 36 5D 71 00 A5 A5 EC 63 BB DC 05 CC [ Init Response ] as its response from the card. As you see: In the command,I send 00 00 00 00 00 00 00 00 as Host Challenge , And in the response : 00 00 11 60 01 00 8A 79 0A F9 = Key diversification data FF 02 = Key information 00 11 79 11 36 5D 71 00 = Card challenge A5 A5 EC 63 BB DC 05 CC = Card cryptogram Now I want to check myself,if the card cryptogram is OK or not. How I can do it? for

Smartcard CMS Decrypt

*爱你&永不变心* 提交于 2019-12-03 08:51:31
I'm using Bouncycastle to manage the Encrypt function of my project. I managed out to use CMS for encrypt and decrypt where both key are stored in my file system (a .cert and a .p12 ). These are the two function I'm actually using: private static byte[] CmsEncrypt(byte[] message) { var envelopGenerator = new CmsEnvelopedDataGenerator(); var certificateStream = new FileStream("Test.cer", FileMode.Open, FileAccess.Read); var cert = new X509CertificateParser().ReadCertificate(certificateStream); envelopGenerator.AddKeyTransRecipient(cert); return envelopGenerator.Generate(new

Determine card type from ATR

爱⌒轻易说出口 提交于 2019-12-03 08:31:37
Is it possible using ATR to determine whether I have ISO14443A or ISO14443B type card? If yes, how? Michael Roland As mictter correctly explained , a real AT R only exists for ISO 7816 contact cards. I can follow the argumentation that the ISO 14443 equivalent could be the ATQA/ATQB as this is the first answer you get from tags after activation, though I would rather say that the equvalent of the ATR is a combination of ATQA + SAK + ATS (for Type A) and a combination of ATQB + Answer to ATTRIB (for Type B). Regarding the ATR you see, I assume that this is a PC/SC-emulated ATR according to the

Are there any Android phones which support extended APDUs?

空扰寡人 提交于 2019-12-03 08:20:16
I am developing an Android app which has function to read data from a smart card. By default, NFC Controllers support APDU command with maximum transceive length is 261 bytes in single command. Because of large data need to be read on the card, the speed of reading is very slow. Are there any Android phones which support extended APDUs allow to send more than 261 bytes in single APDU ? Or are there any ways to modify the maximum transceive length by calling Android API to allow to do that? I have found some topic: link In which they increased the hard-coded value in the NativeNfcManager.java

Is it possible to implement a token queue in NFC cards?

纵饮孤独 提交于 2019-12-03 07:59:39
This question is specifically about MIFARE Ultralight C/EV1, or MIFARE DESFire EV1, or even NTAG cards. I want to implement a system of tokens, so that each time a normal user reads one of those cards they'll get one available token; that token will "pop out" from the NFC card they're reading. In other words, every time that NFC chip is read, it will issue a different usable token from the card's storage. Is this possible to implement? Common non-programmable smart cards usually provide one of (or some combination) of the following: fuse bits -- a memory area where values of individual bits

Load MSCAPI Java Keystore without loading private keys (hard token)

早过忘川 提交于 2019-12-03 02:23:33
I would like to load a MSCAPI keystore within Java and examine available certificates in the MY store. However some keys for those certificates reside on hardware tokens and a popup asks for the token during load. Is there a way to defer loading the private keys when loading the Windows keystore? keyStore = KeyStore.getInstance("Windows-MY", "SunMSCAPI"); keystore.load(null,null); The popup is being activated from the MS-CAPI Cryptographic Service Provider (CSP) - the DLL supplied by the USB token manufacturer - which finally communicates to the token through a driver (also supplied by the

What does “Security condition not satisfied” response APDU mean?

北慕城南 提交于 2019-12-02 20:32:01
问题 I am playing with my NFC card with Android NFC API. I am stuck at this APDU response: Security condition not satisfied (SW1=69, SW2=82). Can anyone explain to me what this response means? Here is a related issue: 69 82Security condition not satisfied ADPU resposne with android NFC 回答1: The status word 69 82 ("Security status not satisfied") typically means that your current authentication state is insufficient to access a certain resource on the card. E.g. if you get that in response to an

Difference between verification and authentication?

有些话、适合烂在心里 提交于 2019-12-02 10:27:10
问题 As you know, we prove to the card that we are the authentic user, via INITIAL UPDATE and EXTERNAL AUTHENTICATION commands, as follow : < 80 50 00 00 08 | Host Challenge > ... < 84 82 03 00 10 | Host Cryptogram | MAK > ... I want to know, what is the differece between this authentication process and the VERIFYING process with CLA 20 P1 P2 Lc Data Le APDU? All cards support both? or each card use one of this mechanism? Update: As you see, I upload and install my applet on the card successfully

Difference between verification and authentication?

£可爱£侵袭症+ 提交于 2019-12-02 06:36:28
As you know, we prove to the card that we are the authentic user, via INITIAL UPDATE and EXTERNAL AUTHENTICATION commands, as follow : < 80 50 00 00 08 | Host Challenge > ... < 84 82 03 00 10 | Host Cryptogram | MAK > ... I want to know, what is the differece between this authentication process and the VERIFYING process with CLA 20 P1 P2 Lc Data Le APDU? All cards support both? or each card use one of this mechanism? Update: As you see, I upload and install my applet on the card successfully , [Without using Verification]! So why I need verificatin : C:\Users\ghasemi\Desktop\gpj-20120310>gpj