EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Safenet Luna HSM support

Posted: 11/07/2011 08:30:01
by Ken Ivanov (Team)

Please find the x64 version of the proxy DLL attached.

Returning attached files as text seems to be caused by a bug in the forum engine. Please download the file (Right click on the link, then Save Link/Target As) and then change its extension to .zip.

[ Download ]
Posted: 11/07/2011 09:24:21
by Mike Ardron (Priority Standard support level)
Joined: 11/03/2011
Posts: 8

I have a message saying there is a new post but I cannot see it. The link to the 64 bit varsion gives a file which is not a valid zip file.
Posted: 11/07/2011 09:35:04
by Ken Ivanov (Team)

OK, let's continue the discussion in the Helpdesk, it supports file exchange correctly. I have created a ticket for you and uploaded the driver there.
Posted: 11/07/2011 09:38:00
by J Makin (Basic support level)
Joined: 08/05/2011
Posts: 6


Innokentiy Ivanov wrote:
I think we will be able to provide you with a code snippet within a day or two.

Will it be possible to get this code please?

also, have you any customers with a working connection to a SafeNet device please?

Warm regards, John
Posted: 11/07/2011 10:05:34
by Ken Ivanov (Team)

Sorry for the delay with the sample. Please find it attached. It is a very basic OpenPGP encryptor/signer/processor that takes raw keys from an HSM, converts them to OpenPGP keys and performs the chosen operation.

[ Download ]
Posted: 11/07/2011 10:12:19
by Mike Ardron (Priority Standard support level)
Joined: 11/03/2011
Posts: 8

I have the 64 bit debug version but it does not seem to work correctly. I am running my app in visual studio and vshost.exe stops working.
Posted: 03/27/2012 02:00:12
by Keith Ferguson (Basic support level)
Joined: 03/27/2012
Posts: 2

I am trying to perform a similar function as above using an ncipher HSM via pkcs11. The example above works fine but when I try to export the public key by building it using ImportKeyMaterial() I am unable to import the key to an external app e.g. gpg as it errors with:
key 4B6A1F31: no valid user IDs
this may be caused by a missing self-signature

How do I extend the example above so that I can generate a valid public pgp key from a private key stored on a HSM?
Posted: 03/27/2012 05:10:26
by Ken Ivanov (Team)

You have to add a User ID and a signature to your public key so that it was accepted by "classic" OpenPGP software. This can be done in the following way:

        ' adding self-signature
        Dim selfSig As New SBPGPKeys.TElPGPSignature
        selfSig.KeyExpirationTime = 365
        pgpSecKey.DirectSign(pgpPubKey, selfSig)

        ' adding signed user id
        Dim userID As New SBPGPKeys.TElPGPUserID
        Dim signature As New SBPGPKeys.TElPGPSignature
        signature.CreationTime = DateTime.Now
        signature.PrimaryUserID = True
        signature.HashAlgorithm = 2
        userID.Name = "John Doe <john@doe.com>"

        pgpSecKey.Sign(pgpPubKey, userID, signature, 0)

        ' saving key to file
        pgpPubKey.SaveToFile("PublicKey.pgp", True)



Topic viewed 10268 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!