Commit graph

2359 commits

Author SHA1 Message Date
Henry de Valence
e27bcd0057 Merge remote-tracking branch 'briansmith/addition-chain' into develop 2017-09-15 16:16:11 -07:00
Isis Lovecruft
d86fcd4e17
Use subtle branch with ConditionallySwappable trait for now. 2017-09-14 04:55:12 +00:00
Isis Lovecruft
6be10341e2
Add benchmarks for Mongomery point (de)compression and laddering. 2017-09-14 04:55:11 +00:00
Isis Lovecruft
2939d26b5c
Remove direct compression methods between points in curve models.
compress_edwards() is now named compress() and works only on points
which are in Edwards form.  Similarly, compress_montgomery() is now
also called compress(), and it only works on point already in
Mongomery form.

To switch between forms, use to_montgomery().

Conversion from Montgomery directly to Edwards is not yet implemented.

 * CHANGE the API requested in
   https://github.com/isislovecruft/curve25519-dalek/issues/47,
   hopefully for the better.
2017-09-14 04:55:11 +00:00
Isis Lovecruft
acd3826fe2 Implement Montgomery arithmetic and laddering.
* ADDs part of https://github.com/isislovecruft/curve25519-dalek/issues/47
2017-09-14 02:09:14 +00:00
greyspectrum
52ecf1669e Fix a small typo in the license url. 2017-09-06 13:31:52 -04:00
Brian Smith
7ed9eb8617 Replace one multiplication with a squaring in scalar inversion.
This brings the code up to date with the 2017-09-04 version of
the source article.
2017-09-04 09:45:13 -10:00
Brian Smith
028140bb33 Reformat addition chain window building code to better show pattern.
Make the 2 digit, `_10`, the first argument to more closely match the
Haskell code in the source article. Align the code into columns to
further clarify the patterns.
2017-09-04 09:23:27 -10:00
Brian Smith
91a7c641c2 Use more efficient addition chain for scalar inversion.
Use the addition chain from
https://briansmith.org/ecc-inversion-addition-chains-01#curve25519_scalar_inversion.

In my benchmarking, this consistently runs at least 20% faster.
2017-09-03 17:00:42 -10:00
Henry de Valence
5494648718 Merge remote-tracking branch 'khyperia/invert_using_square' into develop 2017-08-24 20:54:40 -07:00
khyperia
6747133519 Optimize scalar inversion by implementing square()
This shows an 11% speedup for invert()
2017-08-21 21:35:26 -07:00
Isis Lovecruft
2fade021aa
Merge branch 'master' into develop 2017-08-16 04:29:45 +00:00
Isis Lovecruft
2f4dd71eed
Merge branch 'release/0.4.2' 2017-08-16 04:29:40 +00:00
Isis Lovecruft
2ae13d75a0
Bump ed25519-dalek version to 0.4.2. 2017-08-16 04:22:50 +00:00
Isis Lovecruft
039533d349
Add additional benchmark for further comparison with ed25519-donna.
ed25519-donna includes a "curved25519_scalarmult_basepoint" [sic]
function. See https://github.com/isislovecruft/dalek-benchmarks.
2017-08-16 04:19:04 +00:00
Isis Lovecruft
be06f5339b
Merge branch 'master' into develop 2017-08-16 02:33:22 +00:00
Isis Lovecruft
2d7dfc919d
Merge branch 'release/0.4.1' 2017-08-16 02:33:13 +00:00
Isis Lovecruft
bc63dcb315
Bump ed25519-dalek version to 0.4.1. 2017-08-16 02:29:24 +00:00
Isis Lovecruft
178ebba08e
Bump arrayref dependency to 0.3.4. 2017-08-15 05:39:50 +00:00
Isis Lovecruft
07dc9f4ba7
Bump curve25519-dalek dependency to 0.11.0. 2017-08-15 05:30:53 +00:00
Isis Lovecruft
f6483697d6
Merge branch 'master' into develop 2017-08-15 05:15:42 +00:00
Isis Lovecruft
ae4660db3e
Merge branch 'release/0.11.0' 2017-08-15 05:14:54 +00:00
Isis Lovecruft
17290db44c
Update copyright/license headers in source files. 2017-08-15 05:09:20 +00:00
Isis Lovecruft
463b64f8d3
Merge branch 'master' into develop 2017-08-15 05:00:33 +00:00
Isis Lovecruft
84b7d8698f
Merge branch 'release/0.11.0' 2017-08-15 05:00:25 +00:00
Isis Lovecruft
f1a1886d96
Bump dalek to 0.11.0. 2017-08-15 04:53:28 +00:00
Isis Lovecruft
911b71ae27
Bump arrayref to 0.3.4. 2017-08-15 04:47:19 +00:00
Henry de Valence
f2dddcd469 Merge branch 'feature/differentiated-names-for-points-and-tables' into develop 2017-08-14 00:22:44 -07:00
Henry de Valence
c29103d109 Rename _BASEPOINT to _BASEPOINT_POINT.
Having _BASEPOINT_TABLE and _BASEPOINT_POINT means that it's not possible to
use the slow, generic scalar mult in place of the fast, precomputed scalar
mults.
2017-08-14 00:20:18 -07:00
Henry de Valence
9c7f419ead Merge branch 'bugfix/pub-ify-to-extended' into develop 2017-08-14 00:01:27 -07:00
Henry de Valence
afecd4f438 Fixup types and publication 2017-08-13 23:57:57 -07:00
Henry de Valence
829e6a6453 Merge branch 'feature/split-edwards-montgomery-modules' into develop 2017-08-02 23:08:58 -07:00
Henry de Valence
ea845b4163 Fix missing import in tests 2017-08-02 23:08:46 -07:00
Henry de Valence
75c436bd36 Merge branch 'feature/split-edwards-montgomery-modules' into develop 2017-08-02 23:03:18 -07:00
Henry de Valence
3dddecb4a8 Move Montgomery code to a montgomery.rs module 2017-08-02 22:58:15 -07:00
Henry de Valence
8ad02e2f57 Move curve.rs to edwards.rs 2017-08-02 22:35:12 -07:00
Henry de Valence
9d20a4aca0 Merge remote-tracking branch 'isis/develop' into develop 2017-08-02 18:03:59 -07:00
Isis Lovecruft
c79f08d0a4
Merge branch 'master' into develop 2017-08-02 19:43:57 +00:00
Isis Lovecruft
dcdd76b45e
Merge branch 'release/0.4.0' 2017-08-02 19:43:48 +00:00
Isis Lovecruft
23756b4c74
Bump ed25519-dalek version to 0.4.0. 2017-08-02 19:39:28 +00:00
Isis Lovecruft
a6e5333cb5
Add Cargo.toml feature to optionally use sha2-asm. 2017-08-01 22:21:59 +00:00
Isis Lovecruft
2d15619c6c
Add DecafPoint.to_bytes(). 2017-08-01 19:30:51 +00:00
Isis Lovecruft
6146a55845
Merge branch 'feature/curve25519-dalek-0.10' into develop 2017-08-01 18:17:26 +00:00
Isis Lovecruft
27753235ae
Upgrade curve25519-dalek, generic-array, and digest dependencies.
As well as adding a dependency on subtle and upgrading dev-dependency sha2.
2017-08-01 18:05:58 +00:00
Isis Lovecruft
18999ec386
Merge branch 'feature/key-separation' into develop 2017-08-01 06:24:16 +00:00
Isis Lovecruft
df3834c03d
Change SecretKey bytes to only include the secret, not also public, key. 2017-08-01 06:23:46 +00:00
Isis Lovecruft
fa481903d3
Merge branch 'master' into develop 2017-08-01 03:07:16 +00:00
Isis Lovecruft
4e5ae5ef36
Merge branch 'release/0.10.0' 2017-08-01 03:06:35 +00:00
Isis Lovecruft
65525313e8
Update TODO section of README. 2017-08-01 03:03:11 +00:00
Isis Lovecruft
cbf3f6d8c2
Bump dalek version to 0.10.0. 2017-08-01 03:02:47 +00:00