tech-crypto archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: glxsb(4) doesn't appear to be working for me (was: AMD Geode LX Security Block)



Le Thu, 29 Oct 2009 22:30:23 -0400,
Thor Lancelot Simon <tls%panix.com@localhost> a écrit :

Hello,

> openssl speed -engine cryptodev -elapsed -evp aes-128-cbc

I always prefer to measure the throughput with dd and openssl enc 

dd if=/dev/zero bs=1k count=100000 | openssl enc -e -aes-128-cbc -k
abcd -out /dev/null [-engine cryptodev]

here (FreeBSD 8) without cryptodev:
102400000 bytes transferred in 19.881321 secs (5150563 bytes/sec)
=> 39 MBytes/s

With cryptodev => 120 MBytes/s

> FWIW, glxsb is not very efficient and the syscall overhead will just
> kill you for all but very large requests.  You may see better results
> with -multi 32 to get some parallelism going to hide the latency.

Yes but it's not so bad IMHO. The throughput of 40 Mbytes/s (ie the
same as without glxsb on openssl) is reached very fast with requests >
256 bytes.

http://user.lamaiziere.net/patrick/glxsb-171108/glxsb-perf.pdf


While I'm here there is a small mistake in glxsb.c in NetBSD (and
OpenBSD), but this does not hurt.

#define SB_AI_AES_A_COMPLETE    0x0100          
#define SB_AI_AES_B_COMPLETE    0x0200
#define SB_AI_EEPROM_COMPLETE   0x0400

Should be:
#define SB_AI_AES_A_COMPLETE   0x10000
#define SB_AI_AES_B_COMPLETE   0x20000
#define SB_AI_EEPROM_COMPLETE  0x40000

Source:
http://support.amd.com/us/Embedded_TechDocs/33234H_LX_databook.pdf
6.12.3.3 SB AES Interrupt (SB_AES_INT) (page 522)

(I've sent a bug report to OpenBSD)

Regards.


Home | Main Index | Thread Index | Old Index