Henry de Valence
8ad02e2f57
Move curve.rs to edwards.rs
2017-08-02 22:35:12 -07:00
Isis Lovecruft
f2883028dc
Use subtle version 0.2.0.
...
* CLOSES PR#66 https://github.com/isislovecruft/curve25519-dalek/pull/66
2017-08-01 02:22:43 +00:00
Henry de Valence
d2ce1ce5dc
Revert "Add size checking to multiscalar multiplication."
...
This reverts commit 720da348c0 .
Unfortunately, iter::chain on two ExactSizeIterators does not produce an ExactSizeIterator, for reasons described here: https://github.com/rust-lang/rust/issues/34433 .
2017-07-31 18:23:26 -07:00
Henry de Valence
720da348c0
Add size checking to multiscalar multiplication.
2017-07-30 23:54:13 -07:00
Henry de Valence
2d01aa1bf7
Add fixme note on cache awareness
2017-07-30 22:26:18 -07:00
Henry de Valence
63ee9d21ae
tweak code arrangement to keep comments together
2017-07-30 22:24:58 -07:00
Henry de Valence
aaefb90ed3
Rename k_fold_scalar_mult to multiscalar_mult
2017-07-30 22:16:22 -07:00
Henry de Valence
9c4046c3d9
Add constant-time k-fold scalar multiplication
2017-07-30 21:13:56 -07:00
Isis Lovecruft
4e63cbfe4c
Merge remote-tracking branch 'chain/no_std-fix' into develop
2017-06-26 20:14:38 +00:00
Tony Arcieri
d9742c2367
Switch from libcollections to liballoc (gated on an "alloc" feature)
...
libcollections was recently merged into liballoc:
https://github.com/rust-lang/rust/pull/42648
I went ahead and also added an "alloc" feature which no_std users can use to opt
into liballoc features (i.e. any code using Vec). This should have no effect on
anything but no_std usage. It does make it possible for people without
allocators to use curve25519-dalek if they want though. Might be nice for
"bare metal" development.
All that said, from what I can gather liballoc, while not "stable", should
likely stick around for the forseeable future.
Some backstory on the liballoc/libcollections merge here:
https://github.com/rust-lang/rust/pull/42565
2017-06-19 16:59:45 -07:00
Isis Lovecruft
674a00df5b
Some rustfmt fixes. I disagreed with all the other ones.
2017-05-28 22:42:09 +00:00
Isis Lovecruft
648f95887a
Rename subtle::bytes_equal_ct() to bytes_equal().
2017-05-27 18:35:34 +00:00
Isis Lovecruft
60692ce891
Put math/code in a docstring in ticks.
2017-05-27 18:24:08 +00:00
Isis Lovecruft
2485472023
Remove explicit lifetime, caught by clippy.
2017-05-27 18:23:31 +00:00
Isis Lovecruft
044128dc58
Remove excessive clone() on Copy, caught by clippy.
2017-05-27 18:21:37 +00:00
Isis Lovecruft
0c38718346
Rename subtle::arrays_equal_ct() to subtle::arrays_equal().
...
It's already obvious that it's constant-time because it's in the subtle
module.
2017-05-26 22:35:45 +00:00
Isis Lovecruft
c6057cb2d0
Merge remote-tracking branch 'hdevalence/feature/fast-decaf' into develop
2017-05-25 21:51:57 +00:00
Henry de Valence
273db53cfd
Benchmark Edwards decompression and compression
2017-05-20 21:39:58 -07:00
Isis Lovecruft
27e4ea5181
Add a divider to separate Neg code from Add/Sub.
2017-05-18 23:01:31 +00:00
Isis Lovecruft
ed315ffcae
Implement {AddAssign, SubAssign} for ExtendedPoint.
2017-05-18 23:00:55 +00:00
Isis Lovecruft
cc86091224
Remove unused import of DecafPoint in curve module.
2017-05-18 03:43:42 +00:00
Isis Lovecruft
891cf76aab
Remove unused imports in curve::bench module.
2017-05-18 03:42:31 +00:00
Isis Lovecruft
0b70ab3638
Move DecafPoint * Scalar definition to decaf module.
2017-05-18 02:57:10 +00:00
Isis Lovecruft
e3adf3eea3
Merge remote-tracking branch 'hdevalence/feature/decaf_elligator_hash_to_point' into develop
2017-05-18 02:50:28 +00:00
Henry de Valence
aea15e8612
remove debugging println!s
2017-05-15 22:40:09 -07:00
Henry de Valence
d3515e8cbf
Add test that decompressing an invalid point with serde fails
2017-05-15 22:40:09 -07:00
Henry de Valence
69fd268aa4
Make serde an optional feature
2017-05-15 22:40:09 -07:00
Henry de Valence
7c32271346
Initial work on Serde support
2017-05-15 22:37:50 -07:00
Henry de Valence
608634a7bd
Implement DecafPoint::{random, hash_from_bytes, from_hash} using Decaf-flavoured elligator
2017-05-15 21:06:26 -07:00
Isis Lovecruft
fe58e81bbc
Add missing conditional import for collection::Vec.
2017-05-14 11:16:07 +00:00
Isis Lovecruft
4a646806b8
Merge branch 'feature/scalarmult-lhs' into develop
2017-05-14 09:35:15 +00:00
Isis Lovecruft
61d07693ec
Merge remote-tracking branch 'hdevalence/feature/operator_scalar_mult_r2' into develop
2017-05-14 09:34:45 +00:00
Isis Lovecruft
ae11d4bc76
Merge remote-tracking branch 'hdevalence/feature/vartime-module' into develop
2017-05-14 09:34:14 +00:00
Isis Lovecruft
1b7b57c351
Make basepoint multiplication for precomputed tables go both ways.
2017-05-14 03:10:26 +00:00
Isis Lovecruft
b6faf7c05e
Implement CTAssignable for ExtendedPoint.
2017-05-14 02:31:36 +00:00
Isis Lovecruft
738049619b
Also make scalar multiplication with DecafPoints go both ways.
2017-05-09 02:04:22 +00:00
Isis Lovecruft
4da1d795a1
Make scalar multiplication go both ways.
...
Being able to do `P * s`, but not `s * P`, is slightly annoying, particularly
with longer equations when it is desired to be able to glance at the maths and
see that the code is the same.
Now either syntax is allowed.
2017-05-09 00:01:48 +00:00
Isis Lovecruft
9a9959061d
Merge remote-tracking branch 'hdevalence/feature/clippy-fixes' into develop
2017-05-06 00:16:09 +00:00
Henry de Valence
c18627f7c2
Generalize k_fold_scalar_mult
2017-05-04 00:02:29 -07:00
Henry de Valence
0ae0d2b72a
Add function to get the basepoint from a basepoint table
2017-05-03 19:32:30 -07:00
Henry de Valence
127169c151
Remove boxes
2017-05-03 19:32:30 -07:00
Henry de Valence
0678e619cc
Implement Mul for basepoint tables
2017-05-03 19:32:30 -07:00
Henry de Valence
59453d755d
Implement Mul for scalar multiplication
2017-05-03 19:32:30 -07:00
Henry de Valence
5100ba4a07
Move variable time code into a module
2017-05-03 17:31:16 -07:00
Henry de Valence
68f74d9b22
Merge branch 'feature/vartime_k_fold_scalarmult' into feature/vartime-module
2017-05-03 16:27:43 -07:00
Henry de Valence
60ad000609
Remove redundant &
2017-04-25 15:56:36 -07:00
Henry de Valence
3705346afa
Remove unnecessary returns
2017-04-02 23:39:45 +02:00
Henry de Valence
7f4b96150d
Remove explicit lifetimes
2017-04-02 23:36:05 +02:00
Henry de Valence
b3041f2adc
Remove unnecessary if statements
2017-04-02 23:27:38 +02:00
Henry de Valence
e74bf8e789
Remove unnecessary if statement
2017-04-02 23:15:26 +02:00