Michael Hamburg
c82e7ae7a7
add ristretto widget. elligator is correct, but inverse is not yet
7 years ago
Michael Hamburg
17a77a5820
replace default -mavx2 -mbmi2 with -march=native
7 years ago
Michael Hamburg
5717005809
dont look for immintrin on GCC pre-4.4. Also dont build with -maes; need to autoconfig other flags
7 years ago
Michael Hamburg
9ca05bc0fa
separate warnflags for c,c++
7 years ago
Michael Hamburg
35f7e2ccf8
gen_code now actually generates the code
7 years ago
Michael Hamburg
bd2a516210
generator should now be python3 clean
7 years ago
Michael Hamburg
bb1eef3712
tear out STROBE. Probably will re-introduce later
7 years ago
Michael Hamburg
bc80c744bf
decaf/decaf_[field].h[xx] -> decaf/point_[field].h[xx]
8 years ago
Michael Hamburg
a01e875d4a
move strobe and crypto to TOY areas
8 years ago
Michael Hamburg
28086a96d1
remove python dependency by checking in generated code
8 years ago
Andrew Bennett
c558c0ecdb
x86_64/i386 and illumos/solaris/SunOS compatibility fixes.
* SunOS linker doesn't support --gc-sections
* Add portable_endian.h with __sun version of htole64 and le64toh
* Replace portable endian code in shake.c with inclusion of portable_endian.h
* Replace portable endian code in word.h with inclusion of portable_endian.h
* Add explicit extern reference to word.h for posix_memalign when __sun defined
* Replace references to u_int*_t with uint*_t
* rdtsc call in shake.c was only working on 32-bit i386
* rdtsc call in bench_decaf.cxx was inaccurate on 64-bit x86_64 when clang absent
* Fix two signed/unsigned comparison errors in test_decaf.cxx
8 years ago
Mike Hamburg
a673fbfc63
test_ct broke because of renaming; fix it
8 years ago
Michael Hamburg
83cfd6cae1
change x### function names again, this time to decaf_x###, decaf_x###_generate_key
8 years ago
Michael Hamburg
3b9ffc4cc7
separate Ed25519ph from Ed25519 with awful CRTP hack
8 years ago
Michael Hamburg
595855b434
move eddsa.hxx to its own header. sha512.hxx; rework shake.hxx header; create prehash object. TODO: test prehash
8 years ago
Michael Hamburg
0fa687437f
sha512
8 years ago
Michael Hamburg
9d0bac672f
move context arguments to the end of hash functions. Ed25519 doesnt support contexts.
9 years ago
Michael Hamburg
d0e74a585a
eddsa key generation, at least for goldilocks. needs parameterized hash function; sign/verify; rename; put in right place
9 years ago
Michael Hamburg
a585d7f148
factor out elligator, decaf, scalar code. scalar_halve is now public
9 years ago
Michael Hamburg
55766b76c9
homogenize invsqrt code
9 years ago
Michael Hamburg
08bbb567de
dont go via asm anymore. also reduce the number of templated expressions
9 years ago
Michael Hamburg
d94a147194
move everything over to more-tolerable templating
9 years ago
Michael Hamburg
2e9512292e
template curve_data
9 years ago
Michael Hamburg
f6ec8b2fc8
moving to a much simpler templating system
9 years ago
Michael Hamburg
5311dd5863
auto-gen more field arithmetic data
9 years ago
Mike Hamburg
9f1cc0e2af
some more ct tests; serializeInto -> serialize_into. still need more ct tests, unification of snake vs camel case
9 years ago
Michael Hamburg
d81592ba71
make test_ct, except it probably doesnt work; definitely not on a mac with no memcheck.h installed
9 years ago
Michael Hamburg
64efd989d6
use SC_LIMB in generated tables. Add a new "TODO" category, UNIFY for code that might be unified with other code
9 years ago
Michael Hamburg
2e23ac747b
move (some of the?) per-field code to src/per_field.c
9 years ago
Mike Hamburg
a5bed6b351
Working on getting cross-arch working again. Several TODOs.
Currently compiles and passes tests on x86_64 with arch_32 and
DECAF_FORCE_32_BIT=1 (as well as the native settigs of course),
so that's a start.
Want to make serialization routine cross-arch. Need to check that
perf is good enough (likely). Current routine in p25519/arch_32
is almost cross-arch, but has known bugs (FIXMEs). Needs to take
into account separate p and, for NEON, the LIMBPERM.
Want to decouple arches for each curve/field. Currently the split
between decaf_word_t and word_t makes this fraught with peril. Fix
is probably to rename decaf_word_t to decaf_api_word_t and fix it
to either uint32 or uint64, then make internal things separate per
field. That way we don't have to try arch detection in the header,
which is nice.
Need to make decaf_gen_tables use SC_LIMB. Might as well get rid
of API_NS there too.
9 years ago
Michael Hamburg
6bc97fb756
need an include/arch_*/arch_intrinsics.h for other arches
9 years ago
Michael Hamburg
294eabaec7
generate f_field.h
9 years ago
Michael Hamburg
1a14abb4dd
Separate .h files for SHA/SHAKE, STROBE and sponge RNG. TODO: .hxx. Also add a lot of docs
9 years ago
Michael Hamburg
e5491b67c1
some fixes to "make todo"
9 years ago
Michael Hamburg
838fe2aa17
fix a makefile interaction on cxx headers?
9 years ago
Michael Hamburg
48aa8215f2
only include public includes now
9 years ago
Michael Hamburg
28ab1d592b
prevent regenerating all headers every make
9 years ago
Michael Hamburg
98be9a0820
now generating some headers for real
9 years ago
Michael Hamburg
26b5917bbf
remove decaf.c, to be restored later maybe
9 years ago
Michael Hamburg
facad6c2ac
unify decaf_crypto c versions, still need to unify with c++
9 years ago
Michael Hamburg
64adbd1082
split c crypto routines for now (a bit of a hack :-/)
9 years ago
Michael Hamburg
49629216f8
simplify elligator (todo: test more? eg 1/(1-d) on 25519)
9 years ago
Michael Hamburg
e95b7c7f0e
made scalar inverse WARN_UNUSED and made it throw. Small fix to sagetest. Changed some places that assumed that success is true, in case I want to adopt the proposal that success is 0
9 years ago
Michael Hamburg
cdab495338
Cross-curve compilation working! Still a bunch of FIXMEs though
9 years ago
Michael Hamburg
d703b31062
fix some PRECIOUS
9 years ago
Michael Hamburg
719fcacc58
working on multicurve build system
9 years ago
Mike Hamburg
60b14fb0f1
add FixedBuffer
9 years ago
Mike Hamburg
538fe68866
OwnedOrUnowned as base for Precomputed
9 years ago
Mike Hamburg
6bc7a3db3b
rework build hierarchy to prepare for generated headers
9 years ago
Michael Hamburg
42a561d018
some accel in for curve25519
9 years ago