sshbn.c: Turn the bignum arithmetic internals back-to-front. mdw/ec
authorMark Wooding <mdw@distorted.org.uk>
Mon, 29 Jul 2013 22:09:33 +0000 (23:09 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 29 Jul 2013 22:36:35 +0000 (23:36 +0100)
commit1c618c6cae52fcdb0aadceb5a8f0ece34df5555e
tree399c3a1a129d01eb3147d3ba96f9e25edabfae25
parentaca5132bdf53bf0d7983c09b3b95c8bbec559580
sshbn.c: Turn the bignum arithmetic internals back-to-front.

The internal arithmetic used to be done on a big-endian representation
of the integers, while the external format was defined to be
little-endian.  This causes a bunch of indexing operations to be more
complicated than they really need to be, and, more importantly,
introduces an unfortunate mismatch between the two different strata of
the bignum library, which will be annoying later.  Finally, and least
important of all, in my very brief testing, the bignum test runs about
4.7% faster with this new version.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
sshbn.c