Henry de Valence
58d32ea27f
Merge branch 'release/2.0.0-alpha.2'
2019-11-15 15:02:37 -08:00
Henry de Valence
69d72f92d6
Bump version to 2.0.0-alpha.2 and update changelog.
2019-11-15 15:00:15 -08:00
Henry de Valence
0168816f04
Merge pull request #307 from dalek-cryptography/update-nightly-note-subtle
...
Remove nightly recommendation now that subtle has stable optimization barriers.
2019-11-15 14:54:28 -08:00
Henry de Valence
2b51978553
Remove nightly recommendation now that subtle has stable opt barriers.
...
This bumps the required `subtle` version to `2.2.1`, which contains those changes.
2019-11-15 14:29:14 -08:00
isis agora lovecruft
77203aa1cb
Merge pull request #306 from isislovecruft/feature/236-merge-rebase
...
Implement Zeroize for Scalar and MontgomeryPoint
2019-10-28 20:28:34 +00:00
isis agora lovecruft
4d1dfbaf03
Merge pull request #305 from isislovecruft/fix/unused-tmp2-warning
...
Fix a warning that a temporary value isn't used.
2019-10-28 20:20:06 +00:00
Isis Lovecruft
4423394ed8
Fix warning that a temporary value isn't used.
2019-10-28 19:12:00 +00:00
Isis Lovecruft
57f19e018f
Merge remote-tracking branch 'DebugSteven/zeroize' into feature/236-merge-rebase
2019-10-28 19:09:39 +00:00
isis agora lovecruft
b3add72bcd
Merge pull request #304 from isislovecruft/fix/remove-rand_os
...
Remove dev-dependency on deprecated rand_os crate.
2019-10-28 18:38:29 +00:00
Isis Lovecruft
409ebd94c0
Remove dev-dependency on deprecated rand_os crate.
...
The functionality we were using is now contained in the `rand_core` crate, which
we already depend upon. As far as testing code goes, only benchmarks still
depend upon `rand`, as they use `thread_rng`.
2019-10-28 18:06:29 +00:00
Isis Lovecruft
9ae2e3b482
Change all from_slice() constructors to return Option<T>s.
...
We due this in lieu of implementing `TryFrom` to allow for API
consumers to use the `?` operator to convert potential `None`s into
their own `Result<T, CustomError>` types for better error handling
with less boilerplate.
Note that this is a breaking API change.
2019-10-28 17:29:15 +00:00
Henry de Valence
4cc0afdcfc
Merge pull request #302 from isislovecruft/fix/228-remove-ristretto-random-test
...
Remove test for validity of randomly generated RistrettoPoints.
2019-10-28 10:29:11 -07:00
Isis Lovecruft
c21224170a
Remove optional failure dependency and impl std::error::Error.
2019-10-28 17:29:04 +00:00
Isis Lovecruft
1d8b3995c9
Add custom error types, currently only used in TryFrom impls.
2019-10-28 17:28:40 +00:00
Isis Lovecruft
1fa0048262
Implement TryFrom<&[u8]> and ValidityCheck for MontgomeryPoint.
2019-10-28 17:26:23 +00:00
Isis Lovecruft
db3d26f4b9
Fix typo in TryFrom docstring.
2019-10-28 17:26:23 +00:00
Isis Lovecruft
a7f317a2b8
Impl TryFrom<&[u8]> for all compressed point types.
...
This reduces copy-pasta in downstream users to check the length of the
slice beforehand.
2019-10-28 17:26:23 +00:00
isis agora lovecruft
4023b9143f
Merge pull request #301 from VictorKoenders/develop
...
Added constants to reduce recalculations in elligator_risteretto_flavor
2019-10-28 17:08:50 +00:00
Trangar
ae4bf40e28
Added constants to reduce recalculations in elligator_risteretto_flavor
2019-10-28 11:48:33 +01:00
Isis Lovecruft
0709a27e46
Remove test for validity of randomly generated RistrettoPoints.
...
This test is no longer necessary as it originally had a possibility of
failure due to the original implementation of the invsqrt() function
in the decompression algorithm. The failure with the current API is
nonexistent.
* FIXES #288 .
2019-10-26 04:27:30 +00:00
Henry de Valence
82ea371b19
Merge branch 'master' into develop
2019-10-25 16:42:51 -07:00
Henry de Valence
5820adcc11
Merge branch 'release/2.0.0-alpha.1'
2019-10-25 16:42:33 -07:00
Henry de Valence
6b71cd863a
Update CHANGELOG and bump version
2019-10-25 16:07:19 -07:00
Henry de Valence
db8d859f0c
Merge pull request #300 from dalek-cryptography/update-readme
...
Update README.md for 2.x series.
2019-10-25 16:05:03 -07:00
Henry de Valence
1bd18de291
Add note on 2.x breaking changes.
2019-10-25 16:03:45 -07:00
Henry de Valence
8e6b646e64
Remove extern crate instructions.
...
This is no longer required in Rust 2018, which is the default.
2019-10-25 15:59:19 -07:00
Henry de Valence
be4cbe2af3
Update README.md with 2.x changes.
2019-10-25 15:58:41 -07:00
Henry de Valence
4d735ed27a
Merge pull request #299 from dalek-cryptography/fix-avx2-zeroize
...
Fix broken build with AVX2.
2019-10-25 15:50:11 -07:00
Henry de Valence
d0ea313e99
Remove broken impl Zeroize for FieldElement2625x4.
...
This implementation is broken because the packed_simd types don't implement `Zeroize`.
2019-10-25 15:38:50 -07:00
Henry de Valence
7989fe54f8
Merge branch 'master' into develop
2019-10-24 13:37:10 -07:00
Henry de Valence
17698df9d4
Merge branch 'release/2.0.0-alpha.0'
2019-10-24 13:36:58 -07:00
Henry de Valence
2fc38a31e7
Add changelog entry for 2.0.0-alpha.0
2019-10-24 13:35:07 -07:00
Henry de Valence
a4125eecf7
Merge pull request #298 from dalek-cryptography/update-rand
...
Update rand_core, rand, rand_os.
2019-10-24 13:17:44 -07:00
Henry de Valence
6739399ec2
Upgrade to current rand_core, rand, rand_os.
...
Of these only `rand_core` is included in the public API; regardless of `rand`
semver tricks, this is a breaking API change, but the major version is already
bumped to include the Serde serialization fixes.
2019-10-24 12:29:01 -07:00
Henry de Valence
018fccfe8c
Avoid over-specific version specifiers.
...
By default, Cargo treats version specifiers as semver-compatible ranges, so the
version specifiers we include should only have the components that are actually
meaningful, e.g., "1" instead of "1.0.0" (which actually means "1").
2019-10-24 12:25:50 -07:00
Henry de Valence
a79459a1c8
Merge pull request #289 from tarcieri/zeroize
...
Switch from `clear_on_drop` to `zeroize` (fixes #281 )
2019-10-23 20:17:14 -07:00
Henry de Valence
f2e1f43b5c
Merge pull request #297 from dalek-cryptography/fix-serde
...
Fix serde data modeling.
2019-10-23 16:42:14 -07:00
Tony Arcieri
9480844b8d
Switch from clear_on_drop to zeroize ( fixes #281 )
...
`zeroize` is WASM-friendly as it has no dependencies on C compilers.
Instead uses Rust's own volatile write semantics and compiler fences to
ensure zeroization is not elided by the compiler.
2019-10-23 16:39:21 -07:00
Henry de Valence
70e46c9826
Fill in missing Serde impl for MontgomeryPoint.
2019-10-23 15:55:03 -07:00
Henry de Valence
0fc534d989
Use "tuples" instead of "bytes" in the Serde datamodel.
...
This is a breaking change to the serialization format. It fixes it so that the
Serde encoding can match the conventional encoding of each type of object, and
so that Serde can be used with no overhead -- when using serde-bincode, the
Serde encoding now matches the manual encoding.
2019-10-23 15:40:50 -07:00
Henry de Valence
29ce0d4fe9
Add length checks to serde-bincode tests.
...
This ensures that the serde Serialize and Deserialize implementations use
fixed-length Serde tuples, rather than variable-length byte arrays. This flaw
in data modeling was pointed out by Trevor Perrin.
2019-10-23 15:28:48 -07:00
Henry de Valence
620d17ef40
Merge pull request #293 from dalek-cryptography/remove-build-rs
...
Remove build.rs constants generation.
2019-10-23 14:44:46 -07:00
Henry de Valence
574217694e
Remove build.rs.
...
This was more useful at the time when we were determining, e.g., optimal lookup
table sizes and could regenerate them more easily, but it came at a massive
complexity cost. It also meant that we were unable to implement backend
autoselection. This commit removes the `build.rs` entirely. In the future, a
different `build.rs` could be added that auto-selects a backend, but it seems
like the current default-u64 setup has been working fine.
2019-10-23 14:20:38 -07:00
Isis Lovecruft
019b81aa20
Clarify docs for the choice of sign for MontgomeryPoint.to_edwards().
2019-10-23 19:49:06 +00:00
Isis Lovecruft
7c5ba69491
Update copyright year.
2019-10-23 19:43:56 +00:00
Isis Lovecruft
028c0b9d4d
Fix typo in 64-bit scalar implementation code comment.
2019-10-23 19:35:57 +00:00
Henry de Valence
8602ec0724
Merge pull request #290 from huitseeker/option_operator
...
Small rust fixes
2019-10-07 13:56:16 -07:00
François Garillot
9785f56c0f
Rust fixes for some clippy warnings
...
Clippy lints with instances in the project but NOT applied here, since they seem consistently at odds with the projects' style:
- [unreadable literal](https://rust-lang.github.io/rust-clippy/master/#unreadable_literal )
- [cast lossless](https://rust-lang.github.io/rust-clippy/master/#cast_lossless )
- [assign op pattern](https://rust-lang.github.io/rust-clippy/master/#assign_op_pattern )
2019-10-05 12:02:08 -07:00
François Garillot
023fdf2a2c
Rust added support for the ? operator on Option in 1.22
...
This converts a few instances of an early-returning unwrap to it.
2019-10-05 11:44:36 -07:00
root
2d0c5323cb
errata and basepoint_odd_lookup_table test for better understanding
2019-09-04 13:15:09 +08:00