This is largely a save-your-work checkin.
Created p521/arch_ref64 code to make sure E-521 basically works.
Fixed some of the testing code around E-521. It doesn't quite pass
everything yet.
Created p521/arch_x86_64 code with optimized multiply. In this
checkin, the multiply is fast and works, but all the other code in
that directory is the completely unoptimized ref64 build which
reduces after every add and sub. So the whole thing isn't fast yet.
Very experimental Ed480-Ridinghood support is now in. It's not fully optimized,
but in general the current build is 8-15% slower than Goldilocks. It only works on
arch_x86_64, though arch_ref64 support ought to be easy. Support on other arches
will be trickier, which is of course why I chose Goldilocks over Ridinghood in the
first place.
Next up, E-521. Hopefully.
The code is starting to get spread out over a lot of files. Some are per field*arch,
some per field, some per curve, some global. It's hard to do much about this, though,
with a rather ugly .c.inc system.
There's currently no way to make a Ridinghood eBAT. In fact, I haven't tested eBAT
support in this commit. I also haven't tested NEON, but at least ARCH_32 works on
Intel.
Continuing demagication and factoring of field code.
Removing high-level ops from p448.h and putting them in field.h. That way they
won't need rewriting for new fields and architectures.
Create constant_time.h which contains constant-time lookups, condswaps, etc.
That way the code is the same on all architectures, instead of varying depending
on whether the field size is a multiple of the vector register size. I should
still add a constant_time_select to factor out field_cond_negate.
TODO: I need to test this for correctness and performance on various platforms.
It works on my Mac, but since Yosemite the timing is totally unpredictable
(background tasks? variable boost?).
Create new src/arithmetic.c for field-independent arithmetic (eg batch invert, is_square).
Replace p448_ with field_ where possible.
Create constant EDWARDS_D = -39081.
Create inline function field_mulw_scc for multiplying by compile-time signed curve constants.