Hi,

I have some questions/observations:

1) In openssl-0.9.8/crypto/des/cfb_enc.c line 170 there is "memcpy
(ovec,ovec+num,8);" and since ovec and ovec+num will overlap sometimes,
this function relies on undocumented/undefined behavior of memcpy?

If I use the Intel C++ Compiler 9.0 for EM64T with /O2 or higher, it
replaces the above memcpy with the optimized function __intel_fast_memcpy,
which breaks DES in OpenSSL.

It seems like memcpy should be replaced with memmove here?

2) On Win64 platforms, a socket is now a 64-bit pointer but SSL_set_fd and
BIO_set_fd accept only 32-bit integers. Can't this cause problems if the
pointer points higher than the lowest 4 gig address space?

3) Is AES really a lot faster on Win64/x64 compared to the i586 asm
version or am I doing something wrong? I get:

Microsoft VC6 + MASM:

The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128 cbc 55420.65k 57962.40k 58913.94k 58436.84k
58513.27k
aes-192 cbc 46281.98k 49366.53k 48806.45k 47196.61k
47934.90k
aes-256 cbc 43472.74k 43560.21k 43515.02k 43427.73k
43515.02k

Microsoft AMD64 compiler:

type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128 cbc 91404.06k 98055.03k 98951.44k 99420.54k
100342.20k
aes-192 cbc 81049.35k 86236.01k 88023.17k 87290.41k
88370.90k
aes-256 cbc 72801.98k 76695.84k 77243.17k 77798.36k
78088.04k

Intel C++ Compiler 9.0 for EM64T, OpenSSL compiled with SSE3
optimizations:

type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128 cbc 106319.49k 116085.22k 119304.65k 120634.31k
120655.99k
aes-192 cbc 95869.81k 103739.16k 105783.20k 106319.49k
104238.68k
aes-256 cbc 87301.76k 93976.84k 95651.17k 95664.81k
96075.68k

All tests using OpenSSL 0.9.8 on a P4 3.6 GHz with EM64T and 2MB L2-cache.

-Tomas

__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majordomo@openssl.org