>    I've spent a good bit of time looking at source code, forums, and 
> archives and am still having trouble.  I'm running an OpenBSD 3.8 
> GENERIC#138 i386 server with a Soekris card with hifn drivers.
> 
> dmesg says:
> hifn0 at pci0 dev 14 function 0 "Hifn 7955/7954" rev 0x00: LZS 3DES ARC4 
> MD5 SHA1 RNG AES PK, 32KB dram, irq 11
> 
>    The drivers support modular exponentiation, but I'm having trouble 
> finding documentation or figuring out how to perform it (it's a "key 
> operation") using the interface to /dev/crypto.
>
[...]
> 
>    I'm really looking for code examples that do modular exponentation or 
> pointers to documentation I'm missing.

If you really want to know how to do the operations, look inside
the OpenSSL src at /usr/src/lib/libssl/src/crypto/engine/hw_cryptodev.c

But you should not do what these functions do yourself.  You should
just call the standard OpenSSL high-level functions that will need
to do these low-level operations on the hardware, and they will end
up calling the actual ioctl's and passing the operations to the
hardware ... if hardware exists.  Otherwise, OpenSSL will continue
to use the software paths.

Reply via email to