math/f25519.c: Implementation for arithmetic in GF(2^255 - 19).
authorMark Wooding <mdw@distorted.org.uk>
Mon, 17 Apr 2017 23:39:24 +0000 (00:39 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 29 Apr 2017 11:29:22 +0000 (12:29 +0100)
There's both a fast implementation for platforms with 64-bit arithmetic,
and a slow baseline for minimal C89 platforms.  The code works better on
two's complement systems with arithmetic right shifts, but it works
portably.

  * Arithmetic shifts are implemented with hairy masking and exact
    division, but GCC notices and optimizes accordingly.

  * Two's complement is used in the conditional-swap machinery, but
    there's a fallback using multiplication if the `configure' script
    can't detect it.


No differences found