sshbn.c: Turn the bignum arithmetic internals back-to-front.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 29 Jul 2013 22:09:33 +0000 (23:09 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 3 Aug 2013 20:40:13 +0000 (21:40 +0100)
commitc40be1ada3f1f69a36d0f6f149ee23b0389b78d2
tree862974811dfb385ea5687e7ea8793220779ef23a
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