[openssl-dev] ARM optimised montgomery multiplication (armv4-mont)

Jonathan Larmour jifl at eCosCentric.com
Mon Jun 15 15:48:32 UTC 2015


Hi,

After the changes to DH requiring longer key lengths, I switched to 2048-bit
keys, but was finding this was now making my test runs on an embedded ARM9
target annoyingly slow; so thought I'd investigate to see if there was
anything to improve.

With some experimentation, it turns out that if I *stop* using the
crypto/bn/asm/bn/armv4-mont.pl generated asm "optimised" version, the time for
a simplish test to establish and close a simple SSL connection went from 28
seconds to 18. (It's quite a slow target at any time).

In other words, this "optimised" version has slowed things down dramatically.
Has anyone queried the value of the asm of armv4-mont.pl any time in the last
few years? Is it just that compilers have become better (I'm only using gcc
4.7.3, so not bleeding edge even).

Anyway, it's uncertain to me whether armv4-mont.pl should remain. Does anyone
care to try it on other ARM cores?

FYI, I couldn't discern any difference whether using armv4-gf2m or not, but
that doesn't mean it's bad.

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine


More information about the openssl-dev mailing list