PKCS#11 software HSM

11/10/2011 3:43:09 PM
Gravatar
Total Posts 13

PKCS#11 software HSM

Hi,

 

I'm planning to use NCryptoki as PKCS#11 wrapper.

I need HSM for DES3 encryption/decryption. Unfortunately I will not have soon native HSM device. 

 

I've tried SoftHSM but it looks like doesn't supports DES/DES3 algorithm.

 

Is there an alternative to SoftHSM which supports DES/DES3 algorithms?

 

Regards,

Robert

 

 

 

 

 

11/10/2011 4:02:40 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: PKCS#11 software HSM

hi you can use our Virtual Cryptoki. It supports DES, 3DES and AES. Download it from the download page. The setup will install the dll vcki.dll that implements the virtual pKCS#11 module. regards, Ugo Chirico
11/10/2011 4:14:04 PM
Gravatar
Total Posts 13

Re: PKCS#11 software HSM

Where i can find vcki.dll file?

In the "C:\Program Files\Cryptware Virtual Cryptoki" folder there is only :

CryptwareAPI.dll

NCryptoki.dll

NCryptokiMngd.dll

 

Thanks,

Robert

11/10/2011 4:36:16 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: PKCS#11 software HSM

it is in system32
11/11/2011 10:44:15 AM
Gravatar
Total Posts 13

Re: PKCS#11 software HSM

Hi Ugo,

I've tried 32-bit and 64-bit version of vcki.dll file but getting the same error on OpenSession function :

ErrorCode: -1879048193
ErrorString: INTERNAL_PKCS11_ERROR

 

With SoftHSM wrapper works fine.

 

Best Regards,

Robert

11/11/2011 11:10:26 AM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: PKCS#11 software HSM

Very strange.

Enable the log by setting in the registry loglevel = 1 as in the picture below.

Then, run your code with the 64bit version and send me the log file virtualcki.log that you find in %TEMP% directory.

11/11/2011 2:50:51 PM
Gravatar
Total Posts 13

Re: PKCS#11 software HSM

[Fri Nov 11 14:49:00 2011],1,0, ************* START LIBRARY ****************,Message
[Fri Nov 11 14:49:00 2011],1,0,-> DLL_PROCESS_ATTACH,Message
[Fri Nov 11 14:49:00 2011],1,0,LX: virtuallx,Message
[Fri Nov 11 14:49:01 2011],1,0,-> C_GetFunctionList(000000001D51D958),Message
[Fri Nov 11 14:49:01 2011],1,0,<- C_GetFunctionList(000000001D51D958),Message
[Fri Nov 11 14:49:01 2011],1,0,-> C_Initialize(0000000000000000),Message
[Fri Nov 11 14:49:01 2011],1,0, * No init args ptr: no multithreading requested, but enabling anyway,Message
[Fri Nov 11 14:49:01 2011],1,0,<- C_Initialize,Message
[Fri Nov 11 14:49:01 2011],1,0,-> C_GetInfo(000000001D51DA60),Message
[Fri Nov 11 14:49:01 2011],1,0,<- C_GetInfo(000000001D51DA60),Message
[Fri Nov 11 14:49:01 2011],1,0,-> C_GetSlotList(0,0000000000000000 000000001D51D928),Message
[Fri Nov 11 14:49:01 2011],1,0,<- C_GetSlotList,Message
[Fri Nov 11 14:49:01 2011],1,0,-> C_GetSlotList(0,000000001C757C80 000000001D51D928),Message
[Fri Nov 11 14:49:01 2011],1,0,<- C_GetSlotList,Message
[Fri Nov 11 14:49:01 2011],1,0,-> C_GetSlotInfo(3565006925,000000001D51D9C0),Message
[Fri Nov 11 14:49:01 2011],1,0,Slot Name is: -729960371 - Virtual Smart Card Reader,Message
[Fri Nov 11 14:49:01 2011],1,0,inserted b ,Message
[Fri Nov 11 14:49:01 2011],1,0,<- C_GetSlotInfo,Message
[Fri Nov 11 14:49:01 2011],1,0,-> C_GetSlotInfo(3565006925,000000001D51D9B0),Message
[Fri Nov 11 14:49:01 2011],1,0,Slot Name is: -729960371 - Virtual Smart Card Reader,Message
[Fri Nov 11 14:49:01 2011],1,0,inserted b ,Message
[Fri Nov 11 14:49:01 2011],1,0,<- C_GetSlotInfo,Message
[Fri Nov 11 14:49:01 2011],1,0,-> C_GetSlotInfo(3565006925,000000001D51D960),Message
[Fri Nov 11 14:49:01 2011],1,0,Slot Name is: -729960371 - Virtual Smart Card Reader,Message
[Fri Nov 11 14:49:01 2011],1,0,inserted b ,Message
[Fri Nov 11 14:49:01 2011],1,0,<- C_GetSlotInfo,Message
[Fri Nov 11 14:49:01 2011],1,0,-> C_GetTokenInfo(3565006925,000000001D51D970),Message
[Fri Nov 11 14:49:01 2011],1,0,Call LX_isInserted 3565006925,Message
[Fri Nov 11 14:49:01 2011],1,0,LX_isInserted OK,Message
[Fri Nov 11 14:49:01 2011],1,0,Call LX_getTokenInfo,Message
[Fri Nov 11 14:49:01 2011],1,0,LX_getTokenInfo OK,Message
[Fri Nov 11 14:49:01 2011],1,0,<- C_GetTokenInfo,Message
[Fri Nov 11 14:49:01 2011],1,0,-> C_OpenSession(3565006925,6,0000000000000000,0000000000000000,000000001D51D9A8),Message
[Fri Nov 11 14:49:01 2011],1,0,Slot ID 3565006925,-729960371,d47db04d),Message
[Fri Nov 11 14:49:01 2011],1,0,CKF_RW_SESSION,Message
[Fri Nov 11 14:49:01 2011],1,0,g_slotTable.size() 1, -729960371,Message
[Fri Nov 11 14:49:01 2011],1,0,Create new Session with slot:-729960371-Virtual Smart Card Reader,Message
[Fri Nov 11 14:49:01 2011],1,0,CSession(), slotid: -729960371, slotname: Virtual Smart Card Reader,Message
[Fri Nov 11 14:49:01 2011],1,0,-> getSessionData, slotID: -729960371,Message
[Fri Nov 11 14:49:01 2011],1,0,s_sessionDataTbl does not contains slot -729960371,Message
[Fri Nov 11 14:49:05 2011],1,0,-> C_Finalize(0000000000000000),Message
[Fri Nov 11 14:49:05 2011],1,0,->e<- LockMutex Error: 80, b7,Message
[Fri Nov 11 14:49:05 2011],1,0, ************* STOP LIBRARY ****************,Message

 

Best regards,

Robert
 

11/11/2011 3:08:49 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: PKCS#11 software HSM

really very strange!

can you find also the file virtuallx.log in %TEMP%?

11/11/2011 3:13:25 PM
Gravatar
Total Posts 13

Re: PKCS#11 software HSM

[Fri Nov 11 15:12:22 2011],1,0, ************* START LIBRARY ****************,Message
[Fri Nov 11 15:12:22 2011],1,0,-> DLL_PROCESS_ATTACH,Message
[Fri Nov 11 15:12:22 2011],1,0,LX: virtuallx,Message
[Fri Nov 11 15:12:22 2011],1,0,-> C_GetFunctionList(000000000023E120),Message
[Fri Nov 11 15:12:22 2011],1,0,<- C_GetFunctionList(000000000023E120),Message
[Fri Nov 11 15:12:22 2011],1,0,-> C_Initialize(0000000000000000),Message
[Fri Nov 11 15:12:22 2011],1,0, * No init args ptr: no multithreading requested, but enabling anyway,Message
[Fri Nov 11 15:12:22 2011],1,0,<- C_Initialize,Message
[Fri Nov 11 15:12:22 2011],1,0,-> C_GetSlotList(0,0000000000000000 000000000023E078),Message
[Fri Nov 11 15:12:22 2011],1,0,<- C_GetSlotList,Message
[Fri Nov 11 15:12:22 2011],1,0,-> C_GetSlotList(0,0000000000DF7DF0 000000000023E078),Message
[Fri Nov 11 15:12:22 2011],1,0,<- C_GetSlotList,Message
[Fri Nov 11 15:12:22 2011],1,0,-> C_GetSlotInfo(3565006925,000000000023E080),Message
[Fri Nov 11 15:12:22 2011],1,0,Slot Name is: -729960371 - Virtual Smart Card Reader,Message
[Fri Nov 11 15:12:22 2011],1,0,inserted b ,Message
[Fri Nov 11 15:12:22 2011],1,0,<- C_GetSlotInfo,Message
[Fri Nov 11 15:12:22 2011],1,0,-> C_GetSlotInfo(3565006925,000000000023DF50),Message
[Fri Nov 11 15:12:22 2011],1,0,Slot Name is: -729960371 - Virtual Smart Card Reader,Message
[Fri Nov 11 15:12:22 2011],1,0,inserted b ,Message
[Fri Nov 11 15:12:22 2011],1,0,<- C_GetSlotInfo,Message
[Fri Nov 11 15:12:22 2011],1,0,-> C_GetSlotInfo(3565006925,000000000023E050),Message
[Fri Nov 11 15:12:22 2011],1,0,Slot Name is: -729960371 - Virtual Smart Card Reader,Message
[Fri Nov 11 15:12:22 2011],1,0,inserted b ,Message
[Fri Nov 11 15:12:22 2011],1,0,<- C_GetSlotInfo,Message
[Fri Nov 11 15:12:22 2011],1,0,-> C_WaitForSlotEvent,Message
[Fri Nov 11 15:12:31 2011],1,0,-> C_GetSlotInfo(3565006925,000000000023DFE0),Message
[Fri Nov 11 15:12:31 2011],1,0,Slot Name is: -729960371 - Virtual Smart Card Reader,Message
[Fri Nov 11 15:12:32 2011],1,0,inserted b ,Message
[Fri Nov 11 15:12:32 2011],1,0,<- C_GetSlotInfo,Message
[Fri Nov 11 15:12:32 2011],1,0,-> C_GetSlotInfo(3565006925,000000000023DFC0),Message
[Fri Nov 11 15:12:32 2011],1,0,Slot Name is: -729960371 - Virtual Smart Card Reader,Message
[Fri Nov 11 15:12:32 2011],1,0,inserted b ,Message
[Fri Nov 11 15:12:32 2011],1,0,<- C_GetSlotInfo,Message
[Fri Nov 11 15:12:32 2011],1,0,-> C_OpenSession(3565006925,6,0000000000000000,0000000000000000,000000000023E028),Message
[Fri Nov 11 15:12:32 2011],1,0,Slot ID 3565006925,-729960371,d47db04d),Message
[Fri Nov 11 15:12:32 2011],1,0,CKF_RW_SESSION,Message
[Fri Nov 11 15:12:32 2011],1,0,g_slotTable.size() 1, -729960371,Message
[Fri Nov 11 15:12:32 2011],1,0,Create new Session with slot:-729960371-Virtual Smart Card Reader,Message
[Fri Nov 11 15:12:32 2011],1,0,CSession(), slotid: -729960371, slotname: Virtual Smart Card Reader,Message
[Fri Nov 11 15:12:32 2011],1,0,-> getSessionData, slotID: -729960371,Message
[Fri Nov 11 15:12:32 2011],1,0,s_sessionDataTbl does not contains slot -729960371,Message
 

 

 

[Fri Nov 11 15:12:22 2011],1,0,--> DLL_PROCESS_ATTACH,dllmain
[Fri Nov 11 15:12:22 2011],1,0,<-- DLL_PROCESS_ATTACH,dllmain
[Fri Nov 11 15:12:22 2011],1,0,,--> GetSlotList
[Fri Nov 11 15:12:22 2011],1,0,--> IsCardInserted,IsCardInserted
[Fri Nov 11 15:12:22 2011],1,0,CARD_INSERTED,IsCardInserted
[Fri Nov 11 15:12:22 2011],1,0,,--> GetSlotList
[Fri Nov 11 15:12:22 2011],1,0,,--> GetSlotList
[Fri Nov 11 15:12:22 2011],1,0,--> IsCardInserted,IsCardInserted
[Fri Nov 11 15:12:22 2011],1,0,CARD_INSERTED,IsCardInserted
[Fri Nov 11 15:12:22 2011],1,0,--> IsCardInserted,IsCardInserted
[Fri Nov 11 15:12:22 2011],1,0,CARD_INSERTED,IsCardInserted
[Fri Nov 11 15:12:22 2011],1,0,--> IsCardInserted,IsCardInserted
[Fri Nov 11 15:12:22 2011],1,0,CARD_INSERTED,IsCardInserted
[Fri Nov 11 15:12:22 2011],1,0,,--> GetSlotList
[Fri Nov 11 15:12:22 2011],1,0,--> IsCardInserted,IsCardInserted
[Fri Nov 11 15:12:22 2011],1,0,CARD_INSERTED,IsCardInserted
[Fri Nov 11 15:12:24 2011],1,0,,--> GetSlotList
[Fri Nov 11 15:12:24 2011],1,0,--> IsCardInserted,IsCardInserted
[Fri Nov 11 15:12:24 2011],1,0,CARD_INSERTED,IsCardInserted
[Fri Nov 11 15:12:26 2011],1,0,,--> GetSlotList
[Fri Nov 11 15:12:26 2011],1,0,--> IsCardInserted,IsCardInserted
[Fri Nov 11 15:12:26 2011],1,0,CARD_INSERTED,IsCardInserted
[Fri Nov 11 15:12:28 2011],1,0,,--> GetSlotList
[Fri Nov 11 15:12:28 2011],1,0,--> IsCardInserted,IsCardInserted
[Fri Nov 11 15:12:28 2011],1,0,CARD_INSERTED,IsCardInserted
[Fri Nov 11 15:12:30 2011],1,0,,--> GetSlotList
[Fri Nov 11 15:12:30 2011],1,0,--> IsCardInserted,IsCardInserted
[Fri Nov 11 15:12:30 2011],1,0,CARD_INSERTED,IsCardInserted
[Fri Nov 11 15:12:32 2011],1,0,--> IsCardInserted,IsCardInserted
[Fri Nov 11 15:12:32 2011],1,0,CARD_INSERTED,IsCardInserted
[Fri Nov 11 15:12:32 2011],1,0,--> IsCardInserted,IsCardInserted
[Fri Nov 11 15:12:32 2011],1,0,CARD_INSERTED,IsCardInserted
 

11/11/2011 3:16:00 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: PKCS#11 software HSM

mmh.

Are you able to use Virtual Cryptoki Explorer?

You find it in Start->Programs->Virtual Cryptoki Explorer

11/11/2011 3:20:25 PM
Gravatar
Total Posts 13

Re: PKCS#11 software HSM

The same error in Virtual Cryptoki Explorer and in sample program.

 

On the second PC the same problem also.

 

Regards,

Robert