> details and a patch are available at
> <http://arctic.org/~dean/crypto/rsa.html>

Being located in U.S. you have to comply with their export
requlations:-( See "HOW TO CONTRIBUTE TO OpenSSL" paragraph in README.

As for submission itself.

I would suggest to introduce commentary section enlightening
implementation details into crypto/bn/asm/bn-586.pl. Alernatively I
would like to reserve the right to add such section on your behalf.

Quoting your page.

"Note that in the implementation, MMX registers are used rather than XMM
registers."

On the other hand quoting IA-32 Manual, Volume 1: Basic Architecture,
Section 11.6.7.

"- Transition from x87 FPU to MMX technology instructions or to SSE or
SSE2 instructions that operate on MMX registers should be preceded by
saving the state of the x87 FPU.
- Transition from MMX technology instructions or from SSE or SSE2
instructions that operate on MMX registers to x87 FPU instructions
should be preceded by execution of the EMMS instruction."

You fulfill the second requirement by issuing EMMS instruction at exit
from loop, but not the first one. Can you comment on this? Does it mean
that if application program linked with your module operates on x87 FPU,
Intel won't be able to guarantee sane results? I mean wouldn't it be
more appropriate to use XMM anyway? As fulfilling first requirement
would have undesirable impact on performance...

If toolkit is to be compiled with shared library support, suggested code
won't come out position independent. But that's easy to fix. I can
arrange for that after final submission makes it to distribution. But in
case you wonder, the code can be PIC-ified by replacing

        &test(&DWP("CRYPTO_cpuid_value","","",0),$cpuid_sse2);

with

        &picmeup("eax","CRYPTO_cpuid_value");
        &test(&DWP(0,"eax","",0),$cpuid_sse2);

I haven't made up my mind about cpuid.c yet... It least it fails to
compile with -fPIC... A.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to