[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: tor plus openssl hardware?
- To: or-talk@xxxxxxxxxxxxx
- Subject: Re: tor plus openssl hardware?
- From: coderman <coderman@xxxxxxxxx>
- Date: Fri, 18 May 2007 14:04:58 -0700
- Cc: or-talk@xxxxxxxx
- Delivered-to: archiver@seul.org
- Delivered-to: or-talk-outgoing@seul.org
- Delivered-to: or-talk@seul.org
- Delivery-date: Fri, 18 May 2007 17:05:22 -0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cvNIJEVPvMK9/Pfsvud/YuVHfYA4h9lMA+iLzLnLjrqwjGxXHS4Yr7IwnDsSuB56zF9Xo2kvmAOMMKT9f03+uXc8aVXOkig85DzetnHua1joqGz5w4TXYzSrsiONS05sEzuYT5mzzqcBX9vjf4GIaUxLlmry622ZYjV9mhV5h0s=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BFQGAgG0UhhUNPNS6vAkQorbROnWephUNcvymjESm//0ItX05XTKwI9s5watSJvs062YEsq7bZZkgC7jU06id03DQHezL6w8qYp3QgqVDQtfAni5cVcWjKIYUJBritv17Nhe9J7+n2HvLoZPk2YH/350iwyI3IPhKikX+8futa0=
- In-reply-to: <45C8A9B6.6090009@xs4all.nl>
- References: <45C8A9B6.6090009@xs4all.nl>
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-talk@xxxxxxxxxxxxx
On 2/6/07, Udo van den Heuvel <udovdh@xxxxxxxxx> wrote:
Hello,
Anybody here got some experience with tor and openssl hardware
accelleration?
seems to work great, but i've only used it as a client.
I run a tiny tor server on my ADSL line, on a VIA EK8000 board which
supports VIA PadLock (no-RNG, ACE). (i.e. AES support and a hardware RNG)
I compiled support in the kernel and patched openssl with patches from
http://www.logix.cz/michal/devel/padlock/ to make padlock static and
default, etc.
as Nick mentioned, Tor can handle engines in openssl with the config
option. if you have a C7 with PHE and MONTMULT i've got a temporary
patch here:
https://peertech.org/pub/openssl-0.9.8e_to_padlock-openssl-0.9.8e.patch
that includes RSA/DSA acceleration via the new bn_mont_mult extension
backported from 0.9.9 and includes the above patches. use at your own
risk.
you will need a kernel that recognizes the phe_en instruction for the
config to work:
grep flags /proc/cpuinfo
flags : [...] rng rng_en ace ace_en ace2 ace2_en phe phe_en pmm pmm_en
and simply patch against 0.9.8e and configure via:
./config --prefix=/usr --openssldir=/etc/ssl threads shared
you'll probably need to manually copy the .so*'s into
/usr/lib/i686/cmov/ or appropriate location in your system. this does
include the patches with so versioning so various debian like systems
won't complain when dynamic linking to these new libs.
BIG WARNING: these binaries are using asm optimized montgomery
multiplication, not as engine, but as platform native optimizations.
this means they will absolutely die on any non-montmult enabled
processor. C7 only, sorry.
the speed up is impressive:
1.5Ghz C7 with patched openssl speed test:
SHA-1 throughput 268,405.03kB/sec with 8k blocks
SHA2-256 throughput 263,643.08kB/sec with 8k blocks
AES-128-CBC throughput 1,029,006.84kB/sec with 8k blocks
AES-256-CBC throughput 779,103.35kB/sec with 8k blocks
[ montmult accel via openssl 0.9.9 bn_mont_mult via-mont.pl asm optimization ]
rsa 1024 394.1 sign/sec, 8710.6 verify/sec
rsa 2048 84.0 sign/sec, 2973.4 verify/sec
rsa 4096 14.2 sign/sec, 866.8 verify/sec
dsa 1024 1024.0 sign/sec, 852.5 verify/sec
dsa 2048 349.2 sign/sec, 294.6 verify/sec
[ to gather your own stats invoke "openssl speed" ]
best regards,