OpenSSL & the T2 Crypto accelerators
Interesting blog can be found here on how to simply modify OpenSSL to use the UltraSPARC T2 HW crypto accelerators – assuming, you don't just want to use the version in Solaris 10 that has already been modified to take advantage of the accelerators.
If you doesn't use the EVP functions that are engine aware, but instead use some of the low-level functions, its pretty easy to modify these to use the accelerators too. Just as a simple experiment I modified the latest version of OpenSSL to use the UltraSPARC T2 crypto HW for AES-CBC operations, by modifying AES_cbc_encrypt() in aes_cbc.c. Things work fine – you see a very nice performance improvement! I'll try and clean-up my hacked code and post it in the next few days.
UPDATE (2008/03/11):
Pointers to patches for the latest versions of OpenSSL can be found here. The support provided via the PKCS11 engine can be determined via:
/usr/sfw/bin/openssl engine -c -t

Actually that link talks about the UltraSPARC T1.
Part of the problem with the sun supplied version is that it builds on an openssl that's quite old (or rather, from the old openssl branch).
Posted by Mads on March 08, 2008 at 04:42 AM PST #
I will update the entry to point to a blog which provides details of the location of patches. It provides up to 0.9.8g and will work to provide engine support for a wide range of the ciphers and hashes supported on the T2.
Posted by Lawrence Spracklen on March 11, 2008 at 05:18 PM PDT #