Questions tagged [opensc]

OpenSC provides a set of libraries and utilities to work with smart cards.

OpenSC provides a set of libraries and utilities to work with smart cards. Its main focus is on cards that support cryptographic operations, and facilitate their use in security applications such as authentication, mail encryption and digital signatures. OpenSC implements the PKCS#11 API so applications supporting this API (such as Mozilla Firefox and Thunderbird) can use it. On the card OpenSC implements the PKCS#15 standard and aims to be compatible with every software/card that does so, too.

More info on OpenSC project wiki.

55 questions
2
votes
0 answers

Can't decrypt RSA encrypted text using pkcs11-tool

I am trying to decrypt RSA encrypted text using OpenSC's pkcs11-tool. I am using a Siemens CardOS5.0 card. I run the following line in terminal: pkcs11-tool --module cardos11.dll --pin 12345 --login --decrypt --id 99 and it gives me the following…
KSS
  • 147
  • 1
  • 8
2
votes
1 answer

Differences in reading private key with libp11 and pkcs11-engine

I'm trying to implement SSL client authentication in C++ using credentials stored on a smartcard. In essence, this means using the openssl library to initialize an SSL context using a certificate and a private key, then using this context for all…
andrei
  • 339
  • 3
  • 12
2
votes
1 answer

pkcs11 in python Thread

From within a single python thread, as shown below, I get the error "Please insert a token in any slot" and it seems to not see my token. I change the code to not run from inside a multiprocessing Thread and it works. To take the PyKCS11 library…
2
votes
1 answer

OpenSC Program Crash with c0000005 on Windows

All, I am trying to access opensc dll(latest version) on windows 7 64 bit. I am trying to access a ePass2003 token. The opensc-tool is able to detect the token and can get name and other information. So the token is found by OpenSC. Then I am…
Ironluca
  • 3,402
  • 4
  • 25
  • 32
1
vote
0 answers

Where is engine_pkcs11.so?

I'm trying to run openssl in combination with a PKCS#11 hardware security module (currently trying with Yubikey 5). All documentation and tutorials I find tell me that I have to use OpenSC as "engine", and the openssl command always look something…
Georg P.
  • 2,785
  • 2
  • 27
  • 53
1
vote
1 answer

unable to load private key on the virtual smart card

problem description I have used bixVirtualReader with OpenSC-isoApplet but I am unable to load private key on the smart card what I tried I tried this instruction after creating my 2048/rsa key generating pkcs15-init --store-private-key key.pem…
samini
  • 195
  • 11
1
vote
1 answer

Get logs of OpenSC PKCS11 engine for OpenSSL

I'm using OpenSC's PKCS11 engine for OpenSSL. I want to obtain the logs from OpenSC, also I want to force a login. According to https://github.com/OpenSC/libp11/blob/master/README.md I can do so with the VERBOSE and FORCE_LOGIN parameters, but where…
D.R.
  • 20,268
  • 21
  • 102
  • 205
1
vote
0 answers

Compiling OpenSC on Windows

Context: I am following the guide for the open source project OpenSC https://github.com/OpenSC/OpenSC to compile the solution on Windows and get the opensc-pkcs11.dll module to use it for communications (such as OpenSSH) with HSM's via PKCS#11…
ans
  • 31
  • 5
1
vote
0 answers

Signing using openssl with private key on HSM

I am using OpenSC/libp11 to access an HSM. I need to sign some data using private key generated and stored on the HSM. From libp11 I use the function: EVP_PKEY *PKCS11_get_private_key(PKCS11_KEY *key); to get a pointer to the EVP_PKEY structure…
Rogue
  • 73
  • 1
  • 7
1
vote
1 answer

How to interact with multiple javacard applications on the same physical smartcard (like yubikey)

I have installed the popular IsoApplet (https://github.com/philipWendland/IsoApplet) on my 2.2.2 javacard and have been able to use the pkcs11-tool and pkcs15-tool from the OpenSC project to generate private keys on the card and use them to…
Jared
  • 3,651
  • 11
  • 39
  • 64
1
vote
0 answers

Acessing smartcard using Python - PyKCS11 on Windows Operating System - Issue with the lib

Environment : Windows Operating System I am trying to access the smart card using PyKCS11 module and not able to generate the key pair as per the below link. https://pkcs11wrap.sourceforge.io/api/samples.html#generate-a-key-pair I am having…
tanish
  • 11
  • 1
1
vote
1 answer

Is it possible to define PKCS15 structure from scratch?

I'm playing with smartcards and I'm wonderig if it is possible to define pkcs15 structure from scratch. Syntax of https://github.com/OpenSC/OpenSC/blob/master/src/pkcs15init/pkcs15.profile is undocumented, but I think I might achieve what I wan't by…
majkrzak
  • 1,332
  • 3
  • 14
  • 30
1
vote
1 answer

pkcs11-tool does not see card which is identified by pcsc

I am using a REINER SCT cyberJack RFID standard card reader and an estonian ID card. pcsc_scan correctly identifies the card: $ pcsc_scan PC/SC device scanner V 1.5.2 (c) 2001-2017, Ludovic Rousseau Using reader plug'n…
Árpád Magosányi
  • 1,394
  • 2
  • 19
  • 35
1
vote
1 answer

Using a Java Card with Bitlocker

I want to use J2A040 JCOP 21-36k java cards to implement a smart card driven bitlocker-to-go solution using gidsapplet and OpenSC but when attempting to put a certificate on the card (certreq -new) I have not been able to get past the "The smart…
Rnet
  • 21
  • 5
1
vote
1 answer

Why lists pksc11-tool seven Objects but Java Keystore has Only one

When I do in the cmd line: pkcs11-tool --login -O I get seven Objects that are on my smartcard, 3 Public Key Objects, 3 Certificate Objects and one Private Key Object. But when I try to do the same with a small Java Code, I only find one…
conryyy
  • 127
  • 1
  • 9