smartcard

Verify windows log-in via smart card

元气小坏坏 提交于 2019-12-10 10:57:45
问题 Hi I need to verify in my WPF application if the user log in to his computer via password or via smart-card. Both login options are available in my company clients but my application need to open only in the smart-card login. All the clients are windows 7 OS. I look at some sites: http://technet.microsoft.com/en-us/library/ff404285(v=ws.10).aspx http://www.codeproject.com/Articles/240655/Using-a-Smart-Card-Certificate-with-NET-Security-i and I'm thinking I need to get the enhanced key usage

PKCS11 command flow

*爱你&永不变心* 提交于 2019-12-10 10:47:37
问题 I'm trying to access a PKCS11 cryptographic token (smart card). I was previously using a smart card that had its own proprietary API for card access, so I'm trying to understand how I can map this out to a PKCS11 token. In my previous smart card, I had to connect to the device, then issue API calls for various functions such as Verify PIN, Get card info, Select File, Read File, Write File, perform cryptographic functions (RNG, symmetric/assymmetric encryption, etc), and finally, I would

Stop Screensaver programmatically

走远了吗. 提交于 2019-12-10 10:38:07
问题 How can I stop the screensaver while it's running? without moving the mouse or pressing a key on the keyboard. My applications input is from a card reader, if the screen saver is running my application is still working fine but the screen saver doesn't stop when an input is received on the card reader. I've tried this http://www.codeproject.com/Articles/17067/Controlling-The-Screen-Saver-With-C , doesn't seem to work for me. I tried faking a mouse movement like on this thread How do I turn

Reading Mifare 1k from a WinForm application

依然范特西╮ 提交于 2019-12-10 00:19:54
问题 I have a really weird problem with reading Mifare 1k card from WinForm application. The reader I'm using is a PROMAG PCR-310U smart card reader. I use this code to read the card: MifareReader.CommPort = 4; MifareReader.PortOpen = true; MifareReader.mfRequest(); MessageBox.Show(MifareReader.mfAnticollision().ToString()); MifareReader.mfHalt(); The code is placed inside the backgroundWorkers DoWork method, and the entire method looks like this: private void backgroundWorker1_DoWork(object

How to cache eToken PIN for multiple processes

余生颓废 提交于 2019-12-09 23:31:31
问题 I have a .NET (c#) application which uses the x509Certificate2 in the 'my' Certificate Store, originally coming from an eToken device. When I use the certificate (to decrypt data or use it as a clientcert for web requests), it will ask for the device PIN once. After that, it is cached, the user isn't bothered with the password request every xx minutes. Now, I have multiple processes, that all use the certificate. Each of these processes will request the device PIN. (the cache seems to be per

How to verify signed data with PyKCS11 Library

被刻印的时光 ゝ 提交于 2019-12-09 22:37:53
问题 I wrote a simple Python script which makes a digital signature using my smart card (Rutoken ECP SC), PKCS#11 library (implemented by my vendor) and PyKCS11 wrapper for Python. I already generated the private/public key pair using this card and created a signature using pkcs11 but I don't know how to verify this signed data. The problem is that my pkcs11 library (implemented in c++) has verification methods but PyKCS11 wrapper don't. And now I don't know how to solve this problem. I will be

Some questions about SELECT APDU command in Javacards

痴心易碎 提交于 2019-12-09 20:49:21
问题 The quoted below passage is a part of an article that named How to write a Java Card applet: A developer's guide and written by Zhiqun Chen. I saw it here Once an applet is selected, the JCRE forwards all subsequent APDU commands (including the SELECT command) to the applet's process() method. In the process() method, the applet interprets each APDU command and performs the task specified by the command. For each command APDU, the applet responds to the CAD by sending back a response APDU,

Installing applet in javacard

夙愿已清 提交于 2019-12-09 11:36:41
问题 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

C# - Write in Smartcard using PCSC-Sharp

天大地大妈咪最大 提交于 2019-12-09 07:16:14
问题 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();

Smartcard CMS Decrypt

白昼怎懂夜的黑 提交于 2019-12-09 06:53:15
问题 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);