EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Generate Keypair using PKCS11 token

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#13746
Posted: 06/24/2010 18:43:21
by Michael Ferrar (Basic support level)
Joined: 06/24/2010
Posts: 1

Hi. I'm evaluating PKIBlackBox for a project we've got on using RSA SID800 tokens.I'm trying to access to access the token functions using PKCS11 to generate an RSA key pair. Documentation seems a little light and I can't find any examples in the sample code.

When I try to instantiate a TElRSAKeyMaterial, providing a TElPKCS11CryptoProvider instance as a parameter to the constructor, I get a null reference exception .

Cheers
#13748
Posted: 06/25/2010 00:45:49
by Ken Ivanov (EldoS Corp.)

Thank you for your interest in our products.

Please use the following sequence of operations to generate a keypair on the token:
1) Set up TElPKCS11CertStorage component appropriately (providing a path to the PKCS#11 driver is usually enough),
2) Open the storage with Open() method,
3) Find the slot corresponding to the inserted token, then do OpenSession() on this slot; login into the session with the Login() method,
4) Generate the keypair in the following way:
Code
TElRSAKeyMaterial km = new TElRSAKeyMaterial(session.CryptoProvider); // session is the object you've obtained from OpenSession()
km.KeyID = new byte[] { 1, 2, 3, 4 }; // specify some key id here
km.Generate(1024);
#33828
Posted: 06/29/2015 09:53:57
by Lawrence Hughes (Standard support level)
Joined: 11/23/2013
Posts: 8

worked like a champ - thanks - now closing

Reply

Statistics

Topic viewed 1757 times

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




|

Back to top

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

Got it!