VIA PadLock ACE benchmarks

Here are some numbers that show the speed difference between PadLock AES and software AES in different applications.
The appropriate patches are of course available for download and your own testing.

PadLock in the linux kernel

Results of a simple benchmark that measured disk access speed with bonnie and 2GB files with ext2 filesystem on Seagate Barracuda ST3120022A (7200 r.p.m., UDMA100).
The CPU used was VIA C3 Nehemiah with integrated PadLock Advanced Crypto Engine.
Linux kernel 2.6.10-bk1

The tests were run always on the same partition - either mounted directly or using the device mapper crypto module and cryptsetup command. The partition was reformated before each test to ensure the same start conditions for file allocation.

Five tests were run:

The slowdown is computed relative to the non-encrypted case (which is 100%).

No encryption PadLock AES
(multiblock)
PadLock AES
(singleblock)
Software AES
(aes-i586.ko)
Software AES
(aes.ko)
Writing with putc() 10454 kB/s100% 9353 kB/s89% 7479 kB/s72% 5930 kB/s57% 5383 kB/s51%
Rewriting 16510 kB/s100% 10611 kB/s64% 7628 kB/s46% 4642 kB/s28% 4062 kB/s25%
Writing intelligently 61128 kB/s100% 48103 kB/s79% 21132 kB/s35% 12215 kB/s20% 10068 kB/s16%
Reading with getc() 9406 kB/s100% 8801 kB/s94% 6916 kB/s74% 5529 kB/s59% 4816 kB/s51%
Reading intelligently 35885 kB/s100% 23202 kB/s65% 15271 kB/s43% 9785 kB/s27% 7657 kB/s21%

Yes, I know this "benchmark" is far from ideal, but it shows that the hardware crypto engine easily overrules the software AES implementation.

PadLock speeds up IPsec

In this test I was transferring 100MB file of random numbers over 100Mbps network. The server side was the same system as above: VIA C3 Nehemiah with VIA Rhine-II network card. The client side was AMD Athlon XP 1600+ with PCnet/FAST+ 79C972 network card. Both computers were connected over a crosslink cable.

Server side used vsftpd 2.0.1 and kernel vanilla 2.6.9 with my PadLock patches applied. The throughput speed was measured using wget 1.9.1. The maximum throughput without IPsec was 11.22 MB/s.

For setting up IPsec I used setkey tool from IPsec-tools 0.4rc1. I have run the tests with AES encryption in all available key lengths (128, 192, 256 bits) both with and without HMAC-SHA256 hashing. Here are the results:

AES without HMAC AES with HMAC-SHA256
128 bit 192 bit 256 bit 128 bit 192 bit 256 bit
aes.ko 8.24 MB/s 7.33 MB/s 6.37 MB/s 4.43 MB/s 4.17 MB/s 3.93 MB/s
aes-i586.ko 9.84 MB/s 8.69 MB/s 8.01 MB/s 4.94 MB/s 4.69 MB/s 4.45 MB/s
padlock.ko 11.00 MB/s 10.99 MB/s 10.99 MB/s 8.08 MB/s 8.06 MB/s 8.06 MB/s

As you can see in the last row with PadLock you can get the IPsec security for free as there is almost no slowdown. I was running the tests on a VIA Nehemiah CPU that doesn't have the SHA engine, i.e. the hashing was done in software. With VIA Esther CPU I believe the hashing will be as fast as the encryption, i.e. almost no slowdown. Once I get VIA Esther CPU I will update the results of course.

PadLock in OpenSSL

Results with CVS version of OpenSSL library (from 2004-09-21). So far it only works with EVP_*() functions.
Command used:
openssl speed -evp aes-128-ecb [-engine padlock]

The 'numbers' are in 1000s of bytes per second processed.

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-128-ecb      11274.53k    14327.79k    14608.64k    14672.55k    14693.72k (software)
aes-128-ecb      66892.82k   346583.52k   910704.21k  1489932.59k  1832151.72k (PadLock)

aes-128-cbc       8276.27k    12915.75k    13264.13k    13313.02k    13322.92k (software)
aes-128-cbc      48542.30k   241898.79k   523706.28k   745157.61k   846402.90k (PadLock)


Place for your feedback...
May 16   9:31 via padlock support (by daniel w.)
Jun 25   22:18 Re: via padlock support (by anonymous)
Jun 8   17:17 Why is it so slow? (by john)
Jun 8   17:23 Re: Why is it so slow? (by Michal Ludvig)
Jan 26   14:37 Re: Re: Why is it so slow? (by Frank)
Aug 8   20:24 Updates? (by Sadara)
Oct 2   19:51 I like it (by Markus)
Oct 3   22:13 Re: I like it (by Michal Ludvig)
Oct 26   22:09 padlock gentoo (by flipstar)
Oct 27   18:52 hardware entropy support (by coderman)
Mar 14   17:16 Via padlock transparent (by Ben Jones)
Mar 14   21:25 Re: Via padlock transparent (by Michal Ludvig)
Mar 15   17:01 Re: Re: Via padlock transparent (by Ben Jones)
Apr 8   18:16 multiblock vs. singleblock (by Arnd)
Apr 10   18:13 Re: multiblock vs. singleblock (by Arnd)
Apr 10   22:17 Re: Re: multiblock vs. singleblock (by Michal Ludvig)
May 15   10:43 HD encryption performance insights (by EvilOverlord)
Nov 29   4:35 Re: HD encryption performance insights (by klaus_kleber)
Jun 29   13:25 How can I confirm.. (by james c)
Apr 17   23:34 Re: How can I confirm.. (by Fabien Wernli)
Apr 17   23:52 Re: Re: How can I confirm.. (by Michal)
Dec 17   13:26 Re: Re: How can I confirm.. (by Arnd Hannemann)
Jul 10   22:43 padlock detection failed (by padlock detection failed)
Jul 10   22:45 Re: padlock detection failed (by padlock detection failed)
Jul 10   22:50 Re: padlock detection failed (by Michal Ludvig)
Jul 11   20:02 Re: padlock detection failed (by padlock detection failed)
Jul 11   21:10 Re: Re: padlock detection failed (by padlock detection failed)
Jul 11   23:39 Re: Re: Re: padlock detection failed (by Michal Ludvig)
Jul 14   14:48 no-RNG, ACE (by Goetz Bock)
Jul 24   21:11 Re: no-RNG, ACE (by Michal Ludvig)
Aug 3   3:30 Re: Re: no-RNG, ACE (by ET Tan)
Feb 16   21:50 Re: Re: no-RNG, ACE--openssl (by anonymous)
Sep 15   21:40 Re: Re: Re: no-RNG, ACE--openssl (by anonymous)
Oct 9   5:27 Padlock vpn support? (by Matt S)
Jan 10   16:57 xstore in etherboot (by Robert Hamilton)
Jan 10   21:05 Re: xstore in etherboot (by Robert Hamilton)
Jan 11   0:12 Re: Re: xstore in etherboot (by Robert Hamilton)
Feb 6   4:56 new DP-310 dual-cpu-boards (by Stephan)
Feb 6   9:24 Re: new DP-310 dual-cpu-boards (by Michal)
Feb 24   3:02 Re: Re: new DP-310 dual-cpu-boards (by Stephan)
Dec 21   11:28 Re: Re: new DP-310 dual-cpu-boards (by Witek Baryluk)
Feb 17   7:36 selecting aes type (by udo)
Feb 17   12:50 patching OpenSSL 0.9.7f (by udo)
Sep 16   0:56 Re: patching OpenSSL 0.9.7f (by anonymous)
Feb 17   16:34 Further openssl investigations (by udo)
Mar 24   17:20 openssl 0.9.8a-5.2 on FC5 (by udo)
Mar 26   14:22 openssl on FC5 (by udo)
Apr 27   15:28 optimisation - large blocks (by peter)
Apr 27   22:59 Re: optimisation - large blocks (by Michal Ludvig)
May 8   15:57 Padlock by default (by anonymous)
Jul 25   2:50 Re: Padlock by default (by Michal Ludvig)
Sep 13   11:28 OpenSSH Patch (by Michael)
Sep 17   15:23 Re: OpenSSH Patch (by anonymous)
Sep 29   19:30 Re: OpenSSH Patch (by G.)
Sep 23   19:08 Buggy OpenSSL AES-CFB decryption? (by François)
Oct 19   2:37 Re: Buggy OpenSSL AES-CFB decryption? (by eloj)
Oct 23   17:31 Re: Re: Buggy OpenSSL AES-CFB decryption? (by Lasse Bigum)
Jun 5   20:04 Re: Re: Re: Buggy OpenSSL AES-CFB decryption? (by TzyWPcKrZdNJNZaPMA)
Jul 3   23:37 Re: Re: Re: Buggy OpenSSL AES-CFB decryption? (by NcrPuYBjIAjrt)
Jul 9   6:45 Re: Re: Re: Buggy OpenSSL AES-CFB decryption? (by MjXRPpVkySfyWdQfl)
Jul 19   4:00 Re: Re: Re: Buggy OpenSSL AES-CFB decryption? (by QIZjmgzdbGJHqzjbD)
Jul 25   1:34 Re: Re: Re: Buggy OpenSSL AES-CFB decryption? (by CuyhSfENyKKojT)
Nov 27   12:42 Re: Re: Buggy OpenSSL AES-CFB decryption? (by honx)
Dec 22   20:23 libpadlock.so missing (by Markus Koetter)
Dec 28   11:33 Re: libpadlock.so missing (by Michal)
Dec 29   7:52 Re: Re: libpadlock.so missing (by Markus)
Dec 25   11:30 missing engine (by Franz Wudy)
Dec 26   18:34 Re: missing engine (by Markus)
Dec 28   7:58 patches online :) (by Markus)
Apr 9   14:32 Re: patches online :) (by Markus Kötter)
Jan 14   20:35 openssl -engine padlock is somewhat slow (by ONes)
Jan 22   0:27 Re: openssl -engine padlock is somewhat slow (by Zoidberg)
Jan 22   0:48 Re: Re: openssl -engine padlock is somewhat slow (by Michal Ludvig)
Aug 13   23:42 Re: Re: Re: openssl -engine padlock is somewhat slow (by Ove Andersen)
Mar 26   15:51 Re: openssl -engine padlock is somewhat slow (by Daniele)
Jan 18   22:47 Apply benchmark to "real world" file encryption (by H. Latzko)
Feb 3   18:11 gpg can use padlock ace? (by udo)
Feb 4   13:58 Re: gpg can use padlock ace? (by Michal Ludvig)
Feb 4   13:41 VIA PadLock: RNG ACE2 PHE(8192) PMM (by udo)
Feb 4   13:56 Re: VIA PadLock: RNG ACE2 PHE(8192) PMM (by Michal Ludvig)
Jun 20   12:21 Re: Re: VIA PadLock: RNG ACE2 PHE(8192) PMM (by Daniel Kalchev)
May 13   9:59 aes-types when using cryptsetup-luks? (by udo)
May 13   11:33 Re: aes-types when using cryptsetup-luks? (by Michal)
May 23   8:02 OpenVPN/padlock.so (by Prasanna)
Oct 2   1:22 openssl 0.9.8e is horrible slow (by Markus Kötter)
May 26   1:35 latest patch for ssh (by Tofu)
May 26   7:55 Re: latest patch for ssh (by Michal Ludvig)
Jun 8   20:29 Re: latest patch for ssh (by eloj)
Aug 4   0:50 OpenSSH SCP no speed diff (by Justin)
Aug 13   0:30 Re: OpenSSH SCP no speed diff (by horst)
Oct 15   2:40 Re: OpenSSH SCP no speed diff (by Denny)
Aug 6   9:07 Error in FC7 (by warren)
Aug 6   17:24 Re: Error in FC7 (by warren)
Aug 28   22:02 RNG Hack (by henric)
Feb 8   23:43 Re: RNG Hack (by eloj)
Sep 2   10:45 patch for Linux 2.4? (by dennis khoo)
Nov 17   16:57 rng difference? (by udo)
Nov 18   22:43 Re: rng difference? (by Michal)
Nov 24   14:46 Re: Re: rng difference? (by udo)
Nov 24   14:36 phe_sum (by udo)
Jan 25   18:37 padlock in squid (by Konstantin Gavrilenko)
Jun 3   4:31 Re: padlock in squid (by Wade Mealing)
Aug 3   15:38 VIA releases PadLock documentation (by Lasse Bigum)
Aug 3   17:12 Re: VIA releases PadLock documentation (by Michal Ludvig)
Dec 1   9:22 speed differences not understood (by Paul)
Dec 1   9:27 Re: speed differences not understood (by Paul)
Jun 20   2:05 padlock_sha_copy(): malloc() failed (by udovdh)
Dec 21   11:14 HMAC slowdown, AES in Core i9 (by Witek Baryluk)
Feb 8   5:40 64 bit (by Carsten)
Sep 15   3:47 padlock for ubuntu 10.04 (source + binary) (by Ciaby)