Michael Hamburg
ce75aee929
move various arch things to word.h or their arch files
9 years ago
Michael Hamburg
bdf4375b52
normalize some of the word and limb size declarations, still not entirely happy on that front
9 years ago
Michael Hamburg
493508f7c3
clear an include ordering fixme
9 years ago
Michael Hamburg
36b54ca3db
clear an include ordering fixme
9 years ago
Michael Hamburg
23726f4f73
clear a todo from f_arithmetic.c
9 years ago
Michael Hamburg
49629216f8
simplify elligator (todo: test more? eg 1/(1-d) on 25519)
9 years ago
Michael Hamburg
3f1c687f5e
add point_cond_sel and scalar_cond_sel; avoid asserting on direct_scalarmul when given garbage
9 years ago
Michael Hamburg
3ba3edc418
fix bench /0; some effort to bzero stack variables
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
bc252f835a
whups public_include
9 years ago
Michael Hamburg
0f78ec28fc
fix bug in tagforget
9 years ago
Michael Hamburg
4bff4f743a
add a FIXME; also big perf regr in verify for some reason
9 years ago
Michael Hamburg
d30a160bbb
bench with ++ crypto
9 years ago
Michael Hamburg
b35f966cf4
add serializable class, though i might repent of this because i dont want a vtable
9 years ago
Michael Hamburg
4dd77e0149
switch SecureBuffer to vector
9 years ago
Mike Hamburg
2162dbe78d
add crypto.hxx that doesnt work yet
9 years ago
Mike Hamburg
b849d2cd91
working on securebuffer problems, might just switch things to vector
9 years ago
Mike Hamburg
1bda5ed34a
XOPEN_SOURCE defines fixed
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
Michael Hamburg
de735c77e2
knock out a couple TODOs
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
eab2a41d13
switch from xy positive to 1/xy positive; this is because it can make laddered direct_scalarmul almost sane. almost.
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
Mike Hamburg
36380f3e2a
one more namespacing change
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
Mike Hamburg
f825fd9b75
gcc compat changes
9 years ago
Michael Hamburg
e273155e35
switch to 64-bit shift; still slower than donna?
9 years ago
Michael Hamburg
ba9f201901
faster mulw?
9 years ago
Michael Hamburg
8202c43eba
remove ah = a*19
9 years ago
Michael Hamburg
42a561d018
some accel in for curve25519
9 years ago
Michael Hamburg
2705bd26af
another few TODOs down
9 years ago
Michael Hamburg
f8c32ba53f
knock out some TODOs
9 years ago
Michael Hamburg
d501753648
factor common routines and data decls out into decaf_common.h. Now leaking NONNULL etc
9 years ago
Michael Hamburg
02449ed54b
encoding is no longer EXPLICIT_CON
9 years ago
Michael Hamburg
db0a12de2a
working on breaking up include files
9 years ago
Michael Hamburg
629a782fff
Elligator now passes tests, but there are likely still missing preimages of rotations of the identity point. Also, projscaling elligator probably works, but it needs testing
9 years ago
Michael Hamburg
89dfab34a8
remove hinting from forward elligator, at least in 25519. leaving test in broken state because, well, it is broken
9 years ago
Michael Hamburg
a53f9876f5
OK, most tests are now passing. Remaining known problems:
1) Elligator inversion fails on 0. Also there may be corner cases
here which ought to be probed but are a pain, such as sqrt(id/(1-d))
and similar.
2) Elligator doesn't return the right hint, because I haven't coded
the rotation hints. Probable solution: make Elligator not return a
hint, because there's no realistic scenario where it's useful anyway.
Alternative possible solution: can compute the right hint, but why
bother?
3) Elligator inversion doesn't set the high bit of the buffer at
random, because 2^255-19 isn't close to 2^256. Possible solution:
preserve the high bit(s) of the buffer?
4) Elligator doesn't map [1] to the identity, I think.
5) Not enough corner case testing.
6) Probably some other non-Elligator problems
9 years ago
Michael Hamburg
5a3fe27c03
more rigorous tests. elligator still fails. problem: extracting xy is quite technical
9 years ago
Michael Hamburg
202ed7fea2
change 2torque to torque, which is 4torque in ed25519 case
9 years ago
Michael Hamburg
f68833cd1e
passing everything but elligator with curve25519! though there are probably some lurking bugs...
9 years ago
Michael Hamburg
092bbfd9a0
swap over to Curve25519 from PinkBikeShed. Elligator still doesnt work (closer than with pinkbikeshed tho...). Need to deal with the sign T to make EC tests pass. Somehow the high level crypto all passes .. i guess because everything stays in the subgroup
9 years ago
Michael Hamburg
d974612404
restore test which got clobbered somehow
9 years ago