Michael Hamburg
8b906e1d44
remove unused PRIXWORD macros
9 years ago
Michael Hamburg
86e44e69c6
fixed the mixed-arch bug, but it comes from a long-standing todo
9 years ago
Michael Hamburg
a69002875c
reverse convention for constant_time_select, resolving a TODO
9 years ago
Michael Hamburg
37e0886300
simplify elligator, in a way that shouldnt change its output. I think it uses the opposite convention from the paper for sign(s) though.
9 years ago
Michael Hamburg
4de70b837c
separate out strobe and spongerng from shake. strobe is experimental. spongerng is experimental internally but the interface should be pretty good (except for any camelCase vs snake_case issues). shake should be stable
9 years ago
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.
9 years ago
Mike Hamburg
0016b2675c
arm asm -> __asm__
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
Mike Hamburg
7b7a27eac8
move (non-hot) add/sub to per_field.c and make them not inline
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
facad6c2ac
unify decaf_crypto c versions, still need to unify with c++
9 years ago
Mike Hamburg
704b424982
dual scalarmul because of TLS discussion
9 years ago
Mike Hamburg
c6d7fdec35
some alignment and gcc-related fixes. Unfortunately, the python ffi still dies for alignment-related reasons :-(
9 years ago
Michael Hamburg
a1f5348e18
beginning to separate errors from bools. not there yet though
9 years ago
Michael Hamburg
196e9a85f8
cleanup word.h
9 years ago
Michael Hamburg
ab9060636f
remove unused gf_subx_RAW
9 years ago
Michael Hamburg
ce75aee929
move various arch things to word.h or their arch files
9 years ago
Michael Hamburg
23726f4f73
clear a todo from f_arithmetic.c
9 years ago
Michael Hamburg
5af980b85a
wipe out the multiple layers of rename between decaf_fast and field. still some serious HACKs in the include prio to avoid multiple definition of struct gf
9 years ago
Michael Hamburg
b6c12d7e38
doh
9 years ago
Mike Hamburg
8a1315e15f
get rid of unchecked isqrt. will be a tiny slowdown for p448 invert, called only in batch_invert
9 years ago
Mike Hamburg
93edb223bb
remove inverse from f_field.h
9 years ago
Mike Hamburg
0b59ddc2bf
move config to prime directories
9 years ago
Michael Hamburg
8202c43eba
remove ah = a*19
9 years ago
Michael Hamburg
03ecad0551
it compiles, but it certainly doesnt work yet
9 years ago
Michael Hamburg
b5f7c2eff8
tidy up
9 years ago
Michael Hamburg
f18cf359c6
remove files used by goldilocks/master, leaving only decaf
9 years ago
Mike Hamburg
d675971fee
demagication header and general cleanup
10 years ago
Mike Hamburg
edb25d093c
perf improvement in keygen, sign; fix perf regression for decaf versions of these
10 years ago
Mike Hamburg
7681070015
more factoring and bug fixes. Need to put direct_scalarmul in pathological test cases and then simplify it
10 years ago
Mike Hamburg
c7daa6d74b
going to change this branch to be decaf-only, with the main branch being main-goldilocks-only. but first, remove irrelelevant sqrt(-d)
10 years ago
Michael Hamburg
294efc87f3
fuse crandom seed+buffer because they are accessed as a single object. probably needs a bit more testing though
10 years ago
Michael Hamburg
3988b1ad7f
decaf first cut
10 years ago
Mike Hamburg
e251453d15
simple extended form is in. Probably simplify it more...
10 years ago
Mike Hamburg
812163ff60
decaf uses high bit instead of low bit
10 years ago
Michael Hamburg
12a5d0890c
decaf seems to work for monty; needs more testing, negative testing. Now should match sage script exactly.
10 years ago
Michael Hamburg
4f27b22a1d
decaf ladder is "correct", but not yet serializing to decaf
10 years ago
Michael Hamburg
93e866bb8c
gmp-style foo_t[1] for points too
Conflicts:
src/include/ec_point.h
10 years ago
Michael Hamburg
64ccdaf977
field_t * -> field_a_t
10 years ago
Michael Hamburg
d383dfe91e
going to GMP-style element[1] types
Conflicts:
src/include/ec_point.h
src/p448/magic.c
src/p480/magic.c
src/p521/magic.c
test/bench.c
10 years ago
Michael Hamburg
b0a2110717
remove probably-unnecessary optimizations (still needs benching to make sure)
Conflicts:
src/include/field.h
10 years ago
Michael Hamburg
825dd2128b
sync with master
10 years ago
Michael Hamburg
8abc24f4c6
montgomery aux step is defined; probably doesnt work
10 years ago
Michael Hamburg
ebb6b4db6d
both edwards and twisted edwards are in, and agree with one another. point comparison is in.
10 years ago
Michael Hamburg
8e3ed52dd3
sqrt(-d)
10 years ago
Michael Hamburg
a9e16440a2
decaf in and working for untwisted curve
10 years ago
Michael Hamburg
de113cbdb0
working on experimental, cofactor-removing compression code
10 years ago
Mike Hamburg
1d07343067
p521 testing, 803kcy ecdh
10 years ago