Mike Hamburg
9af4850a18
Merge branch 'curve25519-work' of ssh://git.code.sf.net/p/ed448goldilocks/code into curve25519-work
8 vuotta sitten
Mike Hamburg
8d6c51ee28
Separate API word size from arch word size. This enables compiling
a 32-bit arch on a 64-bit platform, eg NEON on AARCH64. It's probably
more useful for cross-platform testing, though.
The breakdown is as follows:
* decaf_bool_t, decaf_word_t and decaf_error_t are as defined in the API.
* DECAF_WORD_BITS is the size of a decaf_word_t.
* decaf_word_t is used for scalars, so on every curve the scalar impls are the same
(i.e. they follow the API's word size).
* SC_LIMB macro always takes a 64-bit word.
* non-prefixed word_t, mask_t, etc are as defined by the per-curve arch.
* ARCH_WORD_BITS is the size of a word_t.
* word_t is used for gf elements, so the curves may have different guts.
8 vuotta sitten
Michael Hamburg
9be017366a
update HISTORY and TODO
8 vuotta sitten
Mike Hamburg
0016b2675c
arm asm -> __asm__
8 vuotta sitten
Michael Hamburg
64efd989d6
use SC_LIMB in generated tables. Add a new "TODO" category, UNIFY for code that might be unified with other code
8 vuotta sitten
Mike Hamburg
7b7a27eac8
move (non-hot) add/sub to per_field.c and make them not inline
8 vuotta sitten
Michael Hamburg
7587ea91e7
a couple of LIMBPERM related fixes
8 vuotta sitten
Michael Hamburg
94262dbecb
minor
8 vuotta sitten
Michael Hamburg
2e23ac747b
move (some of the?) per-field code to src/per_field.c
8 vuotta sitten
Michael Hamburg
825751d034
one gf_strong_reduce to rule them all
8 vuotta sitten
Michael Hamburg
38455f34f2
one ser/deser to rule them all (TODO test on NEON and other places with LIMBPERM)
8 vuotta sitten
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.
8 vuotta sitten
Michael Hamburg
6bc97fb756
need an include/arch_*/arch_intrinsics.h for other arches
8 vuotta sitten
Michael Hamburg
233f8453c7
further reduce the code in f_impl.h
8 vuotta sitten
Michael Hamburg
b4c402c238
further reduce the code in f_impl.h
8 vuotta sitten
Michael Hamburg
2402788996
further reduce the code in f_impl.h
8 vuotta sitten
Michael Hamburg
4218223dd7
generate most of f_impl.h. Not tested on most arches yet :-(
8 vuotta sitten
Michael Hamburg
294eabaec7
generate f_field.h
8 vuotta sitten
Michael Hamburg
55126adc06
separate c wrapper struct for strobe and spongerng
8 vuotta sitten
Michael Hamburg
81403de10c
knock out a couple TODOs
8 vuotta sitten
Michael Hamburg
1a14abb4dd
Separate .h files for SHA/SHAKE, STROBE and sponge RNG. TODO: .hxx. Also add a lot of docs
8 vuotta sitten
Michael Hamburg
957ec6cd2c
restore shared secret benchmarks
8 vuotta sitten
Michael Hamburg
f92d14e08a
crypto.hxx is now a thin wrapper around crypto.h
8 vuotta sitten
Michael Hamburg
ca68bb3689
autogenerate decaf/crypto.h
8 vuotta sitten
Michael Hamburg
e5491b67c1
some fixes to "make todo"
8 vuotta sitten
Michael Hamburg
838fe2aa17
fix a makefile interaction on cxx headers?
8 vuotta sitten
Michael Hamburg
48aa8215f2
only include public includes now
8 vuotta sitten
Michael Hamburg
a9dcd153df
auto-generate metaheaders
8 vuotta sitten
Michael Hamburg
c1306c75dc
actually generate some headers
8 vuotta sitten
Michael Hamburg
28ab1d592b
prevent regenerating all headers every make
8 vuotta sitten
Michael Hamburg
98be9a0820
now generating some headers for real
8 vuotta sitten
Michael Hamburg
47d4b080e9
generator is almost ready to drop in
8 vuotta sitten
Michael Hamburg
1c97140893
working on python generation
8 vuotta sitten
Michael Hamburg
e167aad7e4
working on python generation
8 vuotta sitten
Michael Hamburg
72399d53d7
working on python generation
8 vuotta sitten
Michael Hamburg
a0b4bc5099
beginning of header generation technology
8 vuotta sitten
Michael Hamburg
55450fa852
respace
8 vuotta sitten
Michael Hamburg
6e95e69368
trying to make C++ headers the same, for future unified generation
8 vuotta sitten
Michael Hamburg
a3b094eb99
trying to make headers the same, for future unified generation
8 vuotta sitten
Michael Hamburg
26b5917bbf
remove decaf.c, to be restored later maybe
8 vuotta sitten
Michael Hamburg
ee076bcc3d
usage is static void
8 vuotta sitten
Michael Hamburg
facad6c2ac
unify decaf_crypto c versions, still need to unify with c++
8 vuotta sitten
Michael Hamburg
21c1fe75a0
going to branch here
8 vuotta sitten
Michael Hamburg
b5a2757f21
clear a couple fixmes
8 vuotta sitten
Michael Hamburg
ff463c8b9b
keyed tracker is added
8 vuotta sitten
Michael Hamburg
64adbd1082
split c crypto routines for now (a bit of a hack :-/)
8 vuotta sitten
Mike Hamburg
27f1b4f697
gcc is sad about my control word code
8 vuotta sitten
Mike Hamburg
5c4a6d86f0
sponge is now restrict for strobe_duplex, for all the difference that makes :-/
8 vuotta sitten
Michael Hamburg
565522ffdf
trying to update to the latest version of strobe. lots of stuff in flux though
8 vuotta sitten
Mike Hamburg
2d85bbf727
dual scalarmul because of TLS discussion
port some changes to decaf.c
8 vuotta sitten