pkcs#11

PKCS#11 engine does not work in openssl on centos 6

只谈情不闲聊 提交于 2019-12-07 06:11:06
问题 I want to add a PKCS#11 engine to OpenSSL and I use CentOS 6.2. I actually load engine with no problem as you can see below: [root@localhost 05:06:18 openssl-1.0.1e]$ openssl engine -t dynamic -pre SO_PATH:/usr/lib/openssl/engines/engine_pkcs11.so -pre ID:pkcs11 -pre LIST_ADD:1 -pre LOAD -pre MODULE_PATH:/usr/local/lib/libsst.so (dynamic) Dynamic engine loading support [Success]: SO_PATH:/usr/lib/openssl/engines/engine_pkcs11.so [Success]: ID:pkcs11 [Success]: LIST_ADD:1 [Success]: LOAD

Getting java IAIK PKCS11 wrapper work for nfast

夙愿已清 提交于 2019-12-07 03:21:24
I am trying to get IAIK PKCS11 wrapper to work with nfast. It is always expecting pkcs11wrapper library file and throws an error - java.lang.UnsatisfiedLinkError: pkcs11wrapper (Not found in java.library.path) How do I get it to use the library file ( /opt/nfast/toolkits/pkcs11/libcknfast.so ) provided by the HSM? Any help is greatly appreciated and forgotten about! You need to configure the path to the IAIK pkcs11wrapper, either on the LD_LIBRARY_PATH, java.library.path (-Djava.library.path=java.library.path:/path/to/pkcs11wrapper) or via the iaik properties file using PKCS11_WRAPPER_PATH

Is it possible to connect with a HSM without PIN using PKCS11INTEROP library?

核能气质少年 提交于 2019-12-06 16:54:05
We are using PKCS11INTEROP library to connect with the NShield HSM. To perform any operation(generate/encrypt/decrypt) inside the HSM you need to first get the slot and then login to the slot using the PIN. This is all working as expected. NShield HSM allows your keys to be protected in two ways Module Protection and Token Protection. The NShield client software provides you a utility KSAFE to manage keys in the HSM. If you are using KSAFE utility and you want to protect your keys by module protection then you do not have to provide a PIN whereas PIN becomes mandatory if the key is to

HSM - cryptoki - Sessions - Timeout

Deadly 提交于 2019-12-06 15:18:10
My application access the HSM via a ASP.NET web service through PKCS#11. I initialise the cryptoki library and obtain a session handle. Web-service hold on to this handle to perform encryption/decryption/signing/verifying in a batch mode. The problem i am facing is The ASP.NET web service time-outs' after 20 minutes. This act- i think, unloads the cryptoki library and the session handle held by the web-service becomes invalid. Yes, i agree that the ASP.NET web-service can be reconfigured not to time-out, which will keep the cryptoki library always loaded. My question is What happens to the

PKCS#11 engine for openSSL

六月ゝ 毕业季﹏ 提交于 2019-12-06 13:27:40
问题 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(

applet with SunMSCapi not working in linux

时光毁灭记忆、已成空白 提交于 2019-12-06 13:09:35
问题 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

I'm trying to create GOSTR3410 public key. CKR_ATTRIBUTE_TYPE_INVALID exeption

老子叫甜甜 提交于 2019-12-06 09:12:26
Good day! I'm trying to create public key ObjectHandle based on hex string that comes from client via post request. I'm doing it according to the documentation, but it returns me CKR_ATTRIBUTE_TYPE_INVALID exeption. Full exeption message: Net.Pkcs11Interop.Common.Pkcs11Exception: 'Method C_CreateObject returned CKR_ATTRIBUTE_VALUE_INVALID' Inner exeption is null Can you please help me to figure out what i'm doing wrong? Here is my code: using (Pkcs11 pkcs11 = new Pkcs11(Settings.RutokenEcpDllDefaultPath, AppType.MultiThreaded)) { Slot slot = GetSlot(pkcs11); // This public key comes from

Keys created from one HSM client are not available for use in another client

試著忘記壹切 提交于 2019-12-06 07:25:45
I am building a solution to store keys and encrypt\decrypt data using an HSM. I am using a network HSM manufactured by Thales. The thing I have noticed is that a key generated in client machine 1 is inaccessible in client machine 2. The key can only be used to encrypt\decrypt data in client machine 1. Is there any thing that needs to be changed in my implementation or is there something to be changed in net-HSM configuration to enable this. I am using PKCS11Iterop library for all the key management operations. I am using token based OCS protection. I suppose your client machine 1 has a new

Java - PKCS11 and MSKeyStore

空扰寡人 提交于 2019-12-06 06:09:58
I'm trying to sign a string with different certs from MS-KeyStore. But, I know there are imported keys from a token in MS-Keystore. So, my problem is - if I go through the Keystore and try to sign with a cert which has a reference to pkcs11 I get a pop up to enter the pkcs11 password. How can I check if the cert is from my token? Thanks in advance!!! This is my code for now: String alias; byte[] data = "test".getBytes(); char[] pin = "pass".toCharArray(); try { KeyStore ks = KeyStore.getInstance("Windows-MY"); ks.load(null, pin); System.out.println("Provider: "+ks.getProvider()); System.out

How to use Pkcs11Interop with an NitroKey HSM to derive an shared secret with an EC

自作多情 提交于 2019-12-06 04:59:59
I bought a NitroKey HSM and manged to create an EC on it. Now I want to derive a shared secret. I found Pkcs11Interop , which seems to be the right tool for the job, but the handling is unclear. A code snipplet or link to a working project would be very appreciated. You can take a look at Pkcs11Admin application for a real world sample using Pkcs11Interop library. As far as I remember NitroKey HSM should be used with OpenSC middleware so your unmanaged library implementing PKCS#11 API will be opensc-pkcs11.dll . I believe these resources might be helpful for you: Getting started with