hsm

Getting java IAIK PKCS11 wrapper work for nfast

橙三吉。 提交于 2019-12-08 05:06:26
问题 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! 回答1: You need to configure the path to the IAIK pkcs11wrapper, either on the LD_LIBRARY_PATH, java.library.path (-Djava.library

Pkcs11Interop read key value from HSM

旧时模样 提交于 2019-12-08 01:01:48
问题 I'm trying to use Pkcs11Interop to extract the value of the key from the HSM. I know, the key has to stay in the HSM, but I need it, so... I already do it with NCryptoki and I'd like to do it also with Pkcs11Interop I tried this code: // Prepare attribute template that defines search criteria List<ObjectAttribute> objectAttributes = new List<ObjectAttribute>(); objectAttributes.Add(new ObjectAttribute(CKA.CKA_CLASS, CKO.CKO_SECRET_KEY)); objectAttributes.Add(new ObjectAttribute(CKA.CKA_KEY

Threadsafe usage of PKCS11Interop library in C# [closed]

…衆ロ難τιáo~ 提交于 2019-12-07 19:53:19
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I am using PKCS11Interop to perform Key Management operations inside an HSM. The HSM I am using is Thales PCI Express. Below is the class that wraps all operations being performed in HSM: public sealed class KeyStoreOperations { private KeyStoreContext m_keyStoreContext; private static Pkcs11 m_Pkcs11; private

Connect SafeNet HSM using Java remotely

五迷三道 提交于 2019-12-07 15:37:39
问题 Our application needs to interact with SafeNet HSM through Luna JSP api using java. We tried the following and were able to connect LunaSlotManager slotManager = LunaSlotManager.getInstance(); slotManager.login(password); But my question is that in my program I didn't give any IP Address of the HSM device. Then how does it detect and connect? 回答1: Any API calls to the Safenet Luna API will interact with the Safenet client software which is installed on your local machine. This client software

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

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

SSL with private key on an HSM

╄→尐↘猪︶ㄣ 提交于 2019-12-06 10:43:08
问题 I have a client-server architecture in my application that uses SSL. Currently, the private key is stored in CAPI's key store location. For security reasons, I'd like to store the key in a safer place, ideally a hardware signing module (HSM) that is built for this purpose. Unfortunately, with the private key stored on such a device, I can't figure out how to use it in my application. On the server, I am simply using the SslStream class and the AuthenticateAsServer(...) call. This method takes

Pkcs11Interop read key value from HSM

↘锁芯ラ 提交于 2019-12-06 09:40:02
I'm trying to use Pkcs11Interop to extract the value of the key from the HSM. I know, the key has to stay in the HSM, but I need it, so... I already do it with NCryptoki and I'd like to do it also with Pkcs11Interop I tried this code: // Prepare attribute template that defines search criteria List<ObjectAttribute> objectAttributes = new List<ObjectAttribute>(); objectAttributes.Add(new ObjectAttribute(CKA.CKA_CLASS, CKO.CKO_SECRET_KEY)); objectAttributes.Add(new ObjectAttribute(CKA.CKA_KEY_TYPE, CKK.CKK_DES)); objectAttributes.Add(new ObjectAttribute(CKA.CKA_LABEL, "MY_KEY")); // Find all

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

Create a PKCS#7 signed message in c# with a precomputed signature

我们两清 提交于 2019-12-06 05:26:45
I'm trying to create a PKCS#7 signed message in C#. The digital signature is being computed separately in an HSM so I already have the value of the signature, I just want to create a PKCS#7 structure that contains it. I've looked into using the SignedCms in the System.Security.Cryptography.Pkcs namespace but this doesn't seem to have an option for providing a precomputed signature. What is the best way to generate a PKCS#7 structure in C# when I already have the value of the digital signature? AFAIK you cannot do that with "built-in" .NET classes. However I have created an example application