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
Henry de Valence
1f7d48fe36
Merge pull request #278 from 3for/comment-fix
...
README.md parallel_doc link fix
2019-08-09 09:35:26 -07:00
root
801bbff563
parallel_doc link fix
2019-08-09 16:19:18 +08:00
Henry de Valence
dc2df3cb70
Merge branch 'master' into develop
2019-08-07 13:25:57 -07:00
Henry de Valence
cf03d39f0f
Merge branch 'release/1.2.3'
2019-08-07 13:25:41 -07:00
Henry de Valence
4dc8073330
Update CHANGELOG and bump version
2019-08-07 13:24:36 -07:00
Henry de Valence
b01888a929
Merge pull request #260 from fabric-and-ink/ed-decompress-simplify
...
Remove unneeded check for negativity in edwards point decompression
2019-08-07 12:57:24 -07:00
Fabian Drinck
26ae185bc9
Apply suggestion by @hdevalence
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2019-08-07 19:43:10 +02:00
Henry de Valence
d86bf15781
Merge pull request #257 from dalek-cryptography/use_upstream_intrinsics
...
Use upstream intrinsics
2019-08-06 17:24:02 -07:00
Henry de Valence
cfa09d859f
Use upstream IFMA intrinsics now that they exist.
2019-08-06 17:14:31 -07:00
Henry de Valence
4bbcc28cdc
Merge pull request #275 from Pratyush/fix-docs-link-on-avx2
...
Fix link to AVX2 docs
2019-08-06 17:08:30 -07:00
Pratyush Mishra
912fe4794f
Fix link to AVX2 and IFMA docs
2019-08-06 16:53:54 -07:00
Henry de Valence
4bc2ec0082
Merge pull request #276 from dalek-cryptography/quarkslab
...
Fix issues found in Quarkslab audit
2019-08-06 16:08:23 -07:00
Henry de Valence
68b71578af
Merge pull request #274 from 3for/comment-fix
...
`curve_models` Comment fix
2019-08-06 16:07:13 -07:00
Henry de Valence
a480844992
Tighten a too-permissive debug_assert in NafLookupTable8.
...
This issue was found by Laurent Grémy & Nicolas Surbayrole of Quarkslab.
2019-08-06 15:21:06 -07:00
Henry de Valence
90baabe50b
Ensure Scalar Add and Sub produce canonical results.
...
Closes #238 .
This issue was discovered independently by both Jack "str4d" Grigg
(issue #238 ), who noted that reduction was not performed on addition, and
Laurent Grémy & Nicolas Surbayrole of Quarkslab, who noted that it was possible
to cause an overflow and compute incorrect results.
2019-08-06 15:20:19 -07:00
Jack Grigg
a3246d82e5
Tests showing that scalar addition and subtraction don't reduce mod l
2019-08-06 15:18:46 -07:00
root
ccaf86ea86
curve_models link in comment mismatch
2019-08-06 16:40:47 +08:00
Henry de Valence
542a7b54a3
Merge pull request #273 from dalek-cryptography/fix-width-7-naf
...
Add a missing wrapping_sub in NAF computation.
2019-08-05 19:24:46 -07:00
Henry de Valence
01d9e904e1
Add a missing wrapping_sub in NAF computation.
...
Found by @3for; this only affected width-7 NAF computations, which were never
used in the source tree (only width 5, optimal for dynamic cases, and 8, better
for static cases).
Closes #272
2019-08-05 15:56:56 -07:00
root
2a46cd3b20
add non-zero assert in field batch_invert
2019-08-01 15:02:15 +08:00
Henry de Valence
a174911c2b
Merge branch 'master' into develop
2019-07-31 15:27:34 -07:00
Henry de Valence
c6d8bfb48b
Merge branch 'release/1.2.2'
2019-07-31 15:26:58 -07:00
Henry de Valence
e6d580b0cf
Bump version to 1.2.2
2019-07-31 15:25:22 -07:00
Henry de Valence
cbbdbfb67f
Merge pull request #269 from dalek-cryptography/update-doc-include-paths
...
Update doc(include) paths.
2019-07-31 15:19:25 -07:00
Henry de Valence
5c18bfb6a7
Update doc(include) paths.
...
Since https://github.com/rust-lang/rust/pull/60938 the path root changed and
these new paths are required to compile on nightly.
Closes #268 .
2019-07-31 14:54:24 -07:00
Henry de Valence
09e2615589
Merge pull request #267 from dalek-cryptography/add-crypto-tag
...
'crypto' means 'cryptography'
2019-07-30 12:54:28 -07:00
Henry de Valence
78d9804bf9
'crypto' means 'cryptography'
2019-07-30 12:43:56 -07:00
Henry de Valence
526ce175d9
Merge pull request #266 from dsprenkels/patch-1
...
Fix a typo in AVX2
2019-07-22 10:05:55 -07:00