pkcs#11

64 bit alternative to SunPkcs11 implementation [closed]

ⅰ亾dé卋堺 提交于 2019-12-06 02:29:42
We use a middle-ware to build software applications which is installed over JDK 1.6.30 64 bit setup. We recently got a requirement to sign certain requests using USB token. I googled around and found out that an implementation is provided by Sun in the name of SunPKCS11. But, the same is only available in 32 bit JRE until Java 8. I want to know if there are any alternative non commercial implementations available out there which I can make use of. Please note that upgrading Java or changing the architecture is not an option as there is a high dependency on the middleware. Vishnu Its not

PKCS#11. Possibility of performing Ecryption/Decryption in hardware

与世无争的帅哥 提交于 2019-12-05 12:43:56
Cheers. This is a copy of my question on crypto stack exchange. I'm dealing with HSM via PKCS#11 C/Python interface. I'm wondering is it possible to do some C_Encrypt / C_Decrypt in hardware. By saying "in hardware" I mean encryption/decryption without exposing the result to the caller space. This is mostly aboud decryption as I want to call C_Decrypt and leave the result inside the HSM as arbitrary data to do some other transformations on that data later, saying re-encrypting it on some other key. Thank you in advance. PKCS#11 does not provide such methods but certain HSM models allow you to

PKCS#11 Generate AES key

我是研究僧i 提交于 2019-12-05 07:38:36
This question was migrated from Information Security Stack Exchange because it can be answered on Stack Overflow. Migrated 8 years ago . Hei, The question is not really about Ncryptoki but i didnt know anywhere else to ask.. so if anybody can help please help me. Im tryng to generate AES key and heres the code what i have right now: CK_MECHANISM keyGenMech = new CK_MECHANISM(CKM.AES_KEY_GEN); CK_ATTRIBUTE[] template = { new CK_ATTRIBUTE(CKA.CLASS, CKO.SECRET_KEY), new CK_ATTRIBUTE(CKA.TOKEN, CK_BBOOL.TRUE), new CK_ATTRIBUTE(CKA.SENSITIVE, CK_BBOOL.TRUE), new CK_ATTRIBUTE(CKA.VALUE_LEN, 32),

Android SSL with a Smart Card through PKCS#11

半城伤御伤魂 提交于 2019-12-04 19:28:57
The reason that this question was born is that I am totally lost, so please forgive the trivial and senseless parts. I have an Android app, a web-service, a MicroSD smart card (mobile security card). I need to know how can I use the card with ssl to securely communicate with the web-service. Rebuilding and flashing the OS is not an option. What I know: The API used to communicate with the MSC How to write/deploy applets to the MSC How to call a web-service What I don't know: SSL Too much about certificates and cryptography (only shady academic stuff from the university) How things come

PKCS#11 engine for openSSL

吃可爱长大的小学妹 提交于 2019-12-04 19:09:13
I'm trying to setup openSSL under Windows 7 to use a vendor specific security module. From the vendor I got a PKCS#11 API dll (lets say vendor.dll). The PKCS#11 engine has been created according to https://github.com/OpenSC/libp11 As described in the link, for testing, I start openssl engine pkcs11 -t but get: D:\Gateway\openSSL\Win32\Release>openssl engine pkcs11 -t 11020:error:25078067:DSO support routines:WIN32_LOAD:could not load the shared library:.\crypto\dso\dso_win32.c:179:filename(\usr\local\ssl\lib\engines\pkcs11.dll) 11020:error:25070067:DSO support routines:DSO_load:could not load

applet with SunMSCapi not working in linux

微笑、不失礼 提交于 2019-12-04 19:05:40
We have created a new site for our web where we let the users to sign a pdf document using an applet we have designed. The issue is that this applet works fine only in Windows OS and we would like to extend it to linux OS. When we run the applet in linux we get this error message: [opensc-pkcs11] reader-pcsc.c:896:pcsc_detect_readers: SCardListReaders failed: 0x8010002e [opensc-pkcs11] reader-pcsc.c:1015:pcsc_detect_readers: returning with: No readers found [opensc-pkcs11] reader-pcsc.c:896:pcsc_detect_readers: SCardListReaders failed: 0x8010002e [opensc-pkcs11] reader-pcsc.c:1015:pcsc_detect

How to verify signed data with PyKCS11 Library

一笑奈何 提交于 2019-12-04 17:12:20
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 appreciated if anybody could tell me how to fix this problem. That's my script: import PyKCS11 import

Java SSL client not selecting a smartcard key

穿精又带淫゛_ 提交于 2019-12-04 14:25:06
问题 I'm trying to use an Estonian ID card for SSL client authentication in a java program. This works in Chrome/Firefox against both banking sites and test servers (nginx or openssl s_server). However my Java client (okhttp) works fine for a local keystore and fails when trying to use the ID card. I've boiled it down to this test case which reproduces the problem I see in a debugger and with logging (-Djavax.net.debug=ssl:handshake). I can communicate with the card, e.g. I can print out the

Linking error with opensc-pkcs

我的未来我决定 提交于 2019-12-04 05:53:06
问题 I am trying to use opensc-pkcs11.so which I have built on Redhat linux 5. However, when I try to use in a sample program it is giving a linking error: main.cpp:(.text+0x265): undefined reference to `C_Initialize' The sample code snippet is as follows: int main() { CK_RV l_rv = 0; l_rv = C_Initialize(NULL_PTR); //other staffs ... } If I see the nm output of opensc-pkcs11.so it is showing: -bash-3.2$ nm opensc-pkcs11.so |grep C_Initialize 0000000000008c70 t C_Initialize What is the meaning of

Multi-threaded Signature Generation C#

隐身守侯 提交于 2019-12-04 04:48:11
问题 This question was migrated from Cryptography Stack Exchange because it can be answered on Stack Overflow. Migrated 2 years ago . I am using PKCS11 Compliant Crypto Device which secures my Private Key. The Crypto Device is capable of generating 500 RSA-2048 Bit Signings per second. I have written an application in C#.NET interfaced with PKCS11Interop Wrapper. Here is my code: #region Initialization Pkcs11 pkcs11 = new Pkcs11(pkcsLibraryPath, true); Slot slot = pkcs11.GetSlotList(true)