encryp/decryp with sca6000

Darren J Moffat darrenm at opensolaris.org
Tue Jul 1 06:12:26 PDT 2008


Redharing wrote:
> Hi All,
> 
> I've got an SCA6000 and a Sun T2000 server. I'm a new in pkcs11 and sun user. Now I have problem for help.
> How can I use sca6000 for encrypt and decrypt with triple des and use local key in sca6000.
> Plase someone provide example code or resource for solve this problem.

Using the docs.sun.com documentation start here:

Solaris 10 Software Developer Collection
	>> Solaris Security for Developers Guide
	>> 9.  Writing User–Level Cryptographic Applications

http://docs.sun.com/app/docs/doc/816-4863/pkcs-2?a=view

PKCS#11 is not unique to Solaris and you should be able to find plenty 
examples complete or partial.  The PKCS#11 specification from 
http://www.rsasecurity.com has examples that show exactly what you want 
to do.

An example showing how to do encryption/decryption can be found here:

http://docs.sun.com/app/docs/doc/816-4863/6mb20lvgv?a=view#chapter2-14

For information on how to search for and find objects stored in a 
PKCS#11 token you can look at the source code to the OpenSolaris 
encrypt(1) command here:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/cmd-crypto/decrypt/decrypt.c

-- 
Darren J Moffat


More information about the crypto-discuss mailing list