Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
VIA C3 padlock support working for anyone?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Cinquero
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 249

PostPosted: Thu Sep 14, 2006 12:47 am    Post subject: VIA C3 padlock support working for anyone? Reply with quote

Here is my patched ssh version: (4.3_p2-r102)

https://stier.dynu.com/~myportage/net-misc/openssh/

But not even benchmarking works here:

Code:
root@k6 modules.d # openssl speed -evp aes-128-cbc -engine padlock
invalid engine "padlock"
19527:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:162:filename(/usr/lib/engines/libpadlock.so): /usr/lib/engines/libpadlock.so: cannot open shared object file: No such file or directory
19527:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
19527:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450:
19527:error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:415:id=padlock
19527:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:162:filename(libpadlock.so): libpadlock.so: cannot open shared object file: No such file or directory
19527:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
19527:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450:
Doing aes-128-cbc for 3s on 16 size blocks:
...


The problematic point is that it looks for libpadlock.so although openssl 0.9.8c puts the code from crypto/engine into libcrypto and not into separate libs. So what does that mean? I'm really confused here. How do I tell openssl to use the kernel driver?

The kernel padlock module is loaded:

Code:
root@k6 ~ # cat /proc/crypto
name         : deflate
driver       : deflate-generic
module       : kernel
priority     : 0
type         : compression

name         : aes
driver       : aes-padlock
module       : padlock
priority     : 300
type         : cipher
blocksize    : 16
min keysize  : 16
max keysize  : 32


Anyone got any idea why I can't even run the openssl benchmark although eng_padlock.c is compiled into libcrypto.so?

Update:

the VIA padlock engine obviously must be enabled internally by patching the ENGINE_load_builtin_engines function in OpenSSL. See https://stier.dynu.com/~moinmoin/MarksWiki/ViaPadlock

Does anyone have an idea how to do that without requiring to patch OpenSSH and other OpenSSL-dependent apps?

Update 2:

I have released openssl-0.9.8c-r102 which you will find at the aforementioned URL(s). To make applications that depend on OpenSSL use padlock, you have to set the padlock-accelerated cipher implementations as defaults. This is done through an additional patch to the OpenSSL lib: if the padlock engine is found, the default ciphers are set accordingly.

The solution still requires a patched openssh. I have added the "padlock" use flag to openssh and openssl. It will apply the requried patches. On my VIA C3 I can now send (encrypt) SSH streams at 10.0 MB/s with a CPU usage of approx. 63%. On C7 systems, additional openssl patches are avaible to support additional digest algorithms in hardware. That should accelerate OpenSSH even more dramatically.

Additional note: I have remove the AES cryptography modules from the kernel config and only included the AES padlock module directly into the kernel (not as module).
Back to top
View user's profile Send private message
mludvig
n00b
n00b


Joined: 27 Dec 2006
Posts: 1

PostPosted: Wed Dec 27, 2006 2:06 am    Post subject: Try this fix Reply with quote

Please see http://lists.logix.cz/pipermail/padlock/2006/000029.html and
http://www.logix.cz/michal/devel/padlock/#openssl098-static for a
possible fix.

FWIW that patch has been in use since Fedora Core 5 and proved to work
just fine.

Michal (author of the PadLock engine)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum