Commit graph

2349 commits

Author SHA1 Message Date
Isis Lovecruft
8c432ef78a
Another obsessive compulsive whitespace fix. 2017-02-21 01:46:01 +00:00
Henry de Valence
dc5621f527 Use conditional_negate in select_precomputed_point 2017-02-20 15:30:59 -08:00
Henry de Valence
8a1c13ef49 Make a CTNegateable trait with a generic impl for better ergonomics 2017-02-20 15:30:59 -08:00
Henry de Valence
5f4de0074d Add a conditional negation function. 2017-02-20 15:30:59 -08:00
Isis Lovecruft
57884ecefa
Merge remote-tracking branch 'hdevalence/feature/derive-eq-partialeq-compressededwardsy' into develop 2017-02-20 02:14:37 +00:00
Isis Lovecruft
90cbe8b0e0
Merge remote-tracking branch 'tarcieri/categories' into develop 2017-02-20 02:00:35 +00:00
Isis Lovecruft
5f70ab55f8
Obsessive compulsive whitespace fix. 2017-02-20 01:58:56 +00:00
Henry de Valence
eaa5d3e595 Derive Eq, PartialEq for CompressedEdwardsY 2017-02-19 17:39:48 -05:00
Tony Arcieri
90baaba591 Add "cryptography" and "no-std" categories 2017-02-14 08:34:24 -08:00
Isis Lovecruft
635d71fac7
Merge branch 'master' into develop 2017-02-08 20:16:55 +00:00
Isis Lovecruft
3cb7aa6124
Merge branch 'release/0.2.0' 2017-02-08 20:16:39 +00:00
Isis Lovecruft
4b12789bcc
Bump version to 0.2.0. 2017-02-08 20:13:35 +00:00
Isis Lovecruft
9d7d919c27
Merge remote-tracking branch 'chain/no-std' into develop 2017-02-08 19:53:36 +00:00
Tony Arcieri
4f81231dc2 Add #![no_std]
Use ::core in lieu of ::std, allowing this crate to be usable in #![no_std]
environments.

Gates features that presently depend on ::std (presently just rand) behind a
"std" cargo feature, which is enabled by default.

Switches from the "rust-crypto" crate (which is not #![no_std] compatible) to
the sha2 crate, which is factored out of the original "rust-crypto" project
and being actively maintained.
2017-02-06 13:48:35 -08:00
Tony Arcieri
6269edb266 Update to curve25519-dalek v0.3.0
Changes `curve25519_dalek::curve::CompressedPoint` -> `CompressedEdwardsY`
2017-02-06 13:43:37 -08:00
Isis Lovecruft
46d2ee0520
Merge branch 'master' into develop 2017-01-27 02:31:14 +00:00
Isis Lovecruft
7034a875bd
Merge branch 'release/0.3.0' 2017-01-27 02:31:04 +00:00
Isis Lovecruft
7d434f2d37
Bump curve25519-dalek version to 0.3.0 in Cargo.toml. 2017-01-27 02:23:10 +00:00
Isis Lovecruft
1e7199dcc4
Remove now unused core::clone::Clone from scalar. 2017-01-27 02:16:30 +00:00
Isis Lovecruft
366e9029bf
Rename a CompressedPoint from #17 to CompressedEdwardsY (from #6). 2017-01-27 02:15:31 +00:00
Isis Lovecruft
d88b6c01c4
Merge remote-tracking branch 'tarcieri/no-std' into develop 2017-01-27 02:13:04 +00:00
Isis Lovecruft
d4cccbc4d8
Whitespace cleanup in constants module. 2017-01-27 01:38:56 +00:00
Isis Lovecruft
0c14f58797
Merge remote-tracking branch 'burdges/patch-1' into develop 2017-01-27 00:40:32 +00:00
Isis Lovecruft
8c986fb3da
Allow non-snakecase in constants.
We follow the standard mathematical naming convention of lowercase to
denote affine coordinates and uppercase to for projective.
2017-01-27 00:34:38 +00:00
Isis Lovecruft
3f900e60bd
Change CompressedPoint in constants module to CompressedEdwardsY. 2017-01-27 00:33:59 +00:00
Isis Lovecruft
1d964fa4b7
Merge remote-tracking branch 'hdevalence/feature/seperate-constants-file' into develop 2017-01-27 00:15:31 +00:00
Jeff Burdges
b96281ab12 Link needs http://www. 2017-01-23 00:29:02 -05:00
Isis Lovecruft
39f417f75e
Merge remote-tracking branch 'hdevalence/feature/move-ct-traits' into develop 2017-01-20 21:51:19 +00:00
Isis Lovecruft
6d2ab84d38
Merge remote-tracking branch 'hdevalence/feature/add-mult-cofactor-fn' into develop 2017-01-19 23:37:50 +00:00
Isis Lovecruft
761ef304d4
Merge remote-tracking branch 'hdevalence/feature/rename-compressed-point' into develop 2017-01-19 23:33:58 +00:00
Isis Lovecruft
99344b5f7e
Merge remote-tracking branch 'hdevalence/feature/split-scalar-type' into develop 2017-01-19 23:30:38 +00:00
Tony Arcieri
d08bc7395e Add #![no_std] (fixes #16)
Use ::core in lieu of ::std, allowing this crate to be usable in #![no_std]
environments.

Gates features that presently depend on ::std (presently just rand) behind a
"std" cargo feature, which is enabled by default.
2017-01-18 15:16:01 -08:00
Henry de Valence
46bf69b80e Test basepoint multiple generation 2017-01-09 16:15:23 -05:00
Henry de Valence
187d4d3c09 Make some conversions public 2017-01-09 16:15:23 -05:00
Henry de Valence
6559e1de37 Derive Eq for PreComputedPoints 2017-01-09 16:15:22 -05:00
Henry de Valence
d94edc6a36 Move compressed basepoint into constants
Would be good to have the basepoint itself, but this doesn't seem possible: the
fields of an ExtendedPoint are not public, so we can't construct them outside
of curve.rs (by design, to prevent constructing invalid points).  Maybe const
fn support could change this.
2017-01-09 16:15:22 -05:00
Henry de Valence
ff9e78572c Add a way to construct precomputed points 2017-01-09 16:15:22 -05:00
Henry de Valence
16b4be6663 Add fixme on SQRT_MINUS_A 2017-01-08 15:11:16 -05:00
Henry de Valence
7ee568780b Shorten docstring on monty A value 2017-01-08 15:11:16 -05:00
Henry de Valence
8a5332b220 Remove unused, incorrect a value
This was presumably added for use with formulas that use two multiplications by
small constants (i.e., 121665 and 121666) instead of one multiplication by a
large constant (i.e., -121665/121666), but we don't use those formulas.
2017-01-08 15:11:16 -05:00
Henry de Valence
8fb9e44dd2 Test that d = -121665/121666 2017-01-08 15:11:16 -05:00
Henry de Valence
3f7d06138a Test that SQRT_M1 is a square root of -1 2017-01-08 15:11:15 -05:00
Henry de Valence
a9e3c330a6 Move constants into its own module 2017-01-08 14:39:25 -05:00
Henry de Valence
63e7e9f8de Implement CTAssignable for Scalar 2017-01-06 12:56:53 -05:00
Henry de Valence
74049e039e Make FieldElement's conditional_assign a trait impl 2017-01-06 12:34:57 -05:00
Henry de Valence
c92ebdd0ac Remove unused conditional_choose function 2017-01-06 12:29:24 -05:00
Henry de Valence
098ff2ffca Move CTAssignable trait to util.rs from curve.rs 2017-01-06 12:26:43 -05:00
Henry de Valence
4a5d7052a9 Add convenience wrapper around mult_by_pow_2 to clear cofactor 2017-01-06 10:47:05 -05:00
Henry de Valence
d1599410ee Rename CompressedPoint -> CompressedEdwardsY
This allows other compression formats (e.g., CompressedMontgomeryX).
2016-12-23 17:50:24 -08:00
Henry de Valence
ef2987349f Add bench for unpacked multiply_add 2016-12-23 13:01:16 -08:00