Jean-Daniel wrote, On 2009-01-22 05:39: > Unfortunately it doesn't use gas. > > I have modified the mpi_x86.s to use be able to compile it using gcc, > but I have a question.
Congratulations. You're well on your way to the fame and glory of becoming a contributor to NSS. :) Seriously, it sounds like you have the beginnings of a valuable contribution. > The darwin mpi library is configured to use 64bits mp_digit (as > ULONG_LONG_MAX is defined and long long are 64 bits), and so, the > assembly file does not works. > Now, if I use the MP_USE_UINT_DIGIT preprocessor flag, I can force it > to defined mp_digit as 32 bits value, and it compiles fine (using the > same sse2 assembly than linux). Yup, we define MP_USE_UINT_DIGIT on all x86_32 platforms where we use that assembler code in any of its various forms. > My first test shows a significant improvement: > > average: 1371 ms > min: 389 ms, max: 2648 That's more like what's expected. > > Is there a simple way to test if the generated values are correct ? Two ways come to mind. 1) Run NSS's cipher tests. cd mozilla/security/nss/tests/cipher cipher.sh > /tmp/cipher.sh.log 2>&1 Then look at results.html in the generated directory mozilla/tests_results/security/HOST.N 2) Run NSS's FIPS mode self test. cd mozilla/security/nss/tests/fips fips.sh > /tmp/fips.sh.log 2>&1 Then look at results.html in the generated directory mozilla/tests_results/security/HOST.N where HOST is your host name and N is an integer that increments with each test run. -- dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto