OpenSSL and hardware acceleration

dcocoyer <>
Wed May 31 12:15:19 CEST 2006


I'm trying to set up Erlang ssl and crypto libraries to make use of my 
motherboard hardware acceleration (VIA padlock engine). OpenSSL (0.9.8b) 
is already using it (I can check it using 'openssl speed -evp 
aes-128-cbc -engine padlock' and it works), but when  I use  the 
accelerated ciphers  under  Erlang, the speed and cpu usage show that 
hardware acceleration is not used at all.
My search on the web lead me to two lines of C code that should be added 
to the application that makes use of OpenSSL. 

#include <openssl/engine.h>

int main ()
	/* Init available hardware crypto engines. */

I tried to add these to esock_openssl.c in the esock_ssl_init(void) 
function, but still no acceleration.
Is there a mean to check the current (openssl) engine used from Erlang 
(exept a small speed test program which I did)?
Is this the correct place to add these lines in esock_openssl.c, will 
they be called by ssl:start() ?
Is esock_openssl.c also called by crypto:start()  ?

Thanks for you help,

Desiré Cocoyer

More information about the erlang-questions mailing list