Michael Rosenberg
a32f56ba36
Undid the bad reformatting job from 5758b8c
2022-10-28 13:22:49 -04:00
Michael Rosenberg
8fa201639a
Fix AVX2 and AVX-512 builds ( #419 )
...
Build was broken by 5758b8c .
This adds a regression test to CI so it doesn't happen again
2022-10-28 13:10:44 -04:00
Hugo Tunius
c000957bae
Remove byteorder ( #418 )
...
Instead of having a dependency on `byteorder`, use methods from the
standard library(`{to,from}_le_bytes`).
2022-10-22 03:42:23 -04:00
Michael Rosenberg
5758b8cce1
Updated to edition 2021 ( #413 )
2022-10-18 13:45:59 -04:00
Isis Lovecruft
c3ed99bf93
Bump curve25519-dalek version to 4.0.0-pre.2.
2022-02-16 21:26:01 +00:00
Isis Lovecruft
f9f0384aee
Bump sha2 and digest dependencies to 0.10.
2022-02-01 23:48:11 +00:00
Isis Lovecruft
df4e2fa129
Bump alpha curve25519-dalek version to 4.0.0-pre.1.
2021-08-17 00:40:38 +00:00
Isis Lovecruft
9f80197f05
Merge branch 'develop' into release/4.0
2021-08-04 01:09:38 +00:00
Isis Lovecruft
09a726cc8c
Merge branch 'develop' into release/3.2
2021-08-04 00:26:47 +00:00
Isis Lovecruft
2d40d2d923
Merge branch 'main' into develop
2021-08-04 00:24:45 +00:00
Isis Lovecruft
90aab8423c
Update CHANGELOG and bump version to 3.1.2.
2021-08-03 23:33:33 +00:00
Isis Lovecruft
74210d28fc
Update copyright years.
2021-08-03 23:13:45 +00:00
Isis Lovecruft
52986bc3ec
Revert "Update copyright years."
...
This reverts commit 1491f0db36 .
This is due to code which was erroneously deleted during the commit,
due to being based off the wrong version, see
https://github.com/dalek-cryptography/curve25519-dalek/pull/361 .
2021-08-03 23:10:35 +00:00
Isis Lovecruft
396d26e463
Merge branch 'develop' into release/4.0
2021-08-03 23:06:58 +00:00
Isis Lovecruft
a7f4f0ec14
Merge branch 'develop' into release/3.2
2021-08-03 23:04:34 +00:00
Isis Lovecruft
9f93a5c0f5
Merge branch 'main' into develop
2021-08-03 22:53:58 +00:00
Isis Lovecruft
b9710d59f2
Minor documentation fixes.
2021-08-03 22:49:09 +00:00
Isis Lovecruft
f8cb7197f9
Fix error introduced in 59a8616 merge.
2021-07-20 03:22:27 +00:00
Isis Lovecruft
fccc5d54f8
Bump version for html_root_url.
2021-07-20 02:56:44 +00:00
Isis Lovecruft
59a8616e7a
Release curve25519-dalek version 3.0.3.
...
-----BEGIN PGP SIGNATURE-----
iQB1BAAWCAAdFiEEOy1KvpA7Nj5/r96Eq0ExNTPo6BIFAmD2LGkACgkQq0ExNTPo6BJcpQD9HeDu
PNtHRcAA6/OI1rko+PNScTUa4wRFJ9nIov8lXJwA/i/c2k0MX3Gms55wjWhdaTrFgsC+m+6F/Cmq
xChOaPUN
=L+SN
-----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
iQB1BAAWCAAdFiEEOy1KvpA7Nj5/r96Eq0ExNTPo6BIFAmD2OpIACgkQq0ExNTPo6BLEHwEAk4Ax
pUxJ1axcVriU3CrQANmvfJafSUU1HvUF/15HA70A/3uVJUzT5vDdb0CKNhFtar3as/zZw+pimcXb
KvnrB54G
=6fZN
-----END PGP SIGNATURE-----
Merge tag '3.0.3' into release/3.1.1
Release curve25519-dalek version 3.0.3.
2021-07-20 02:53:03 +00:00
Isis Lovecruft
6ea874cb31
Bump curve25519-dalek version to 3.0.3.
2021-07-13 06:44:49 +00:00
Isis Lovecruft
dc87de0073
Release curve25519-dalek version 2.1.3.
...
-----BEGIN PGP SIGNATURE-----
iQB1BAAWCAAdFiEEOy1KvpA7Nj5/r96Eq0ExNTPo6BIFAmDtLDQACgkQq0ExNTPo6BJG2QEAqYkN
LL4I8XGFs7HiaUmafT5ROWh3J+tl6+1F0dxDfAwA/2N7TFpuBr9Ij9xL9Z1QOxO5Tj3A2pcTsbg3
f4i/D30B
=MsLB
-----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
iQB1BAAWCAAdFiEEOy1KvpA7Nj5/r96Eq0ExNTPo6BIFAmDtMT4ACgkQq0ExNTPo6BJoJQD+PHTb
ol7DCvSX4zr5WP38vrf5kvqg++90SGR0b6rZKxMBAMi1gpV0kaVNsY31bJSVBD89Qi+jcZXcxqkI
PwVovFAI
=U/np
-----END PGP SIGNATURE-----
Merge tag '2.1.3' into HEAD
Release curve25519-dalek version 2.1.3.
2021-07-13 06:22:52 +00:00
Isis Lovecruft
ff25109f25
Bump curve25519-dalek version to 2.1.3.
2021-07-13 05:57:44 +00:00
Isis Lovecruft
43e454ce1d
Fix documentation build errors due to doc(inlude) on nightly.
2021-07-13 05:40:28 +00:00
Isis Lovecruft
1ee5c4defb
Update CHANGELOG and bump version to 3.2.
2021-07-13 05:32:36 +00:00
Isis Lovecruft
d7c2a1394f
Add another test for equivalence with the Edwards identity.
2021-04-21 00:06:44 +00:00
Isis Lovecruft
0d8f33153c
Implement Identity for MontgomeryPoint.
...
This can be used in checks for non-contributory behaviour in protocols
where that is a concern.
2021-04-21 00:02:22 +00:00
Isis Lovecruft
9b36bcfc5f
Revert "Maintain legacy 3.x support for lookup tables."
...
This reverts commit 0da8f08d65 .
2021-04-14 02:30:22 +00:00
Isis Lovecruft
53b4ed3098
Update CHANGELOG and README for 4.x alpha.
2021-04-14 02:28:21 +00:00
Isis Lovecruft
2ea17d554a
Update CHANGELOG and README; bump to 3.1.0.
2021-04-14 01:30:57 +00:00
isis agora lovecruft
5eca140010
Merge pull request #351 from isislovecruft/fix/cleanup-elligator
...
Trivial cleanups to Elligator2 encoding
2021-04-13 23:31:14 +00:00
isis agora lovecruft
cecc821f40
Merge pull request #342 from huitseeker/fiat4_with_u32
...
Serial backends w/formally-verified field arithmetic for 32 & 64 bits
2021-04-13 23:23:41 +00:00
Isis Lovecruft
0da8f08d65
Maintain legacy 3.x support for lookup tables.
2021-04-13 22:23:34 +00:00
Isis Lovecruft
ee90202a58
Trivial cleanups to Elligator2 encoding.
...
cf. https://github.com/dalek-cryptography/curve25519-dalek/pull/336
2021-04-13 00:24:50 +00:00
Isis Lovecruft
cc0c444fae
Merge branch 'feature/dynamic-table-sizes' into develop
2021-03-25 04:34:08 +00:00
Isis Lovecruft
1491f0db36
Update copyright years.
2021-03-25 04:10:55 +00:00
isis agora lovecruft
b79a276806
Merge pull request #336 from huitseeker/elligator2
...
Elligator2 mapping for curve25519
2021-03-25 03:13:41 +00:00
Isis Lovecruft
d0014f6d87
Merge remote-tracking branch 'zgfzgf/feat-unused-import' into develop
2021-03-25 02:30:05 +00:00
Isis Lovecruft
ab468cd24c
Fix copyright years in some of the files I touched.
2021-03-25 02:29:37 +00:00
Isis Lovecruft
4a1fc3c66e
Implement Zeroize for points as the identity element.
2021-03-25 01:45:54 +00:00
Isis Lovecruft
5482c76d16
Merge remote-tracking branch 'garbageslam/zeroize_ristretto' into develop
2021-03-24 18:35:46 +00:00
Isis Lovecruft
da0c49985c
Merge remote-tracking branch 'gedigi/zeroize_ristrettopoint' into develop
2021-03-24 18:12:22 +00:00
Chris Beck
0154ebbfaf
implement Zeroize trait on Ristretto curve point types
...
This is helpful for hardening some of our cryptographic implementations
that use Ristretto curve points
2021-02-10 12:14:32 -07:00
zgfzgf
08bf6ebf08
fix build warning
2021-02-03 17:46:01 +08:00
François Garillot
d1ed427af5
add fiat backends to Travis tests
2021-01-21 08:58:21 -05:00
François Garillot
e2651cceb6
Rename elligator_map -> elligator_encode
...
leaves an obvious name open for the reverse mapping
2021-01-12 13:46:04 -08:00
François Garillot
abd1922456
Add a fiat_u32 backend based on fiat-crypto as well.
...
Renames fiat backend directory to fiat_u64 and does the additional plumbing required to make fiat_{u32, u64}_backend equal alternatives.
Adds a few comments.
2021-01-11 15:45:24 -08:00
François Garillot
a9e50eab36
implement conditional assign with fiat__25519_cmovznz_u64
2021-01-11 09:30:30 -08:00
François Garillot
4ce680d3aa
Update the fiat backend to use the fiat-crypto package
...
https://crates.io/crates/fiat-crypto
2021-01-11 09:30:30 -08:00
François Garillot
d684e13f09
Add a fiat_u64_backend option to curve25519-dalek
...
This uses https://github.com/calibra/rust-curve25519-fiat/ to implement a new 64bit serial backend for dalek.
Co-authored-by: Zoe Parakevopoulou <zoopar@fb.com>
2021-01-11 09:30:07 -08:00
Isis Lovecruft
55e0db7cf6
Bump curve25519-dalek version to 3.0.2.
2021-01-08 03:32:42 +00:00
Isis Lovecruft
e852e97d2d
Bump curve25519-dalek version to 2.1.2.
2021-01-08 03:25:44 +00:00
Isis Lovecruft
ab5af2e47c
Whitespace fixes for 3267a5d merge.
...
(cherry picked from commit 77ec974212 )
Signed-off-by: Isis Lovecruft <isis@patternsinthevoid.net>
2021-01-08 00:40:00 +00:00
root
5ba95b13e4
errata and basepoint_odd_lookup_table test for better understanding
...
(cherry picked from commit 2d0c5323cb )
Signed-off-by: Isis Lovecruft <isis@patternsinthevoid.net>
2021-01-08 00:39:46 +00:00
root
4b268a9d7e
errata and basepoint_odd_lookup_table test for better understanding
...
(cherry picked from commit 8da05f7e90 )
Signed-off-by: Isis Lovecruft <isis@patternsinthevoid.net>
2021-01-08 00:39:20 +00:00
root
87a5ed78b7
errata for comment
...
(cherry picked from commit f6015c66c2 )
Signed-off-by: Isis Lovecruft <isis@patternsinthevoid.net>
2021-01-08 00:38:20 +00:00
Isis Lovecruft
77ec974212
Whitespace fixes for 3267a5d merge.
2021-01-08 00:33:37 +00:00
Isis Lovecruft
3267a5d75d
Merge remote-tracking branch '3for/comment-fix' into develop
2021-01-08 00:27:34 +00:00
Stephane Raux
4269b39f13
Make crate feature alloc work with stable Rust
...
`println!` was removed in the test as the corresponding test for `u32` does not have it.
(cherry picked from commit 608f8cd594 )
Signed-off-by: Isis Lovecruft <isis@patternsinthevoid.net>
2021-01-07 23:30:42 +00:00
Isis Lovecruft
0f07443c2d
Bump curve25519-dalek to 2.1.1.
2021-01-07 22:21:37 +00:00
François Garillot
8aa1458941
Implements an Elligator2 map for Curve25519
...
This implementation:
- is agnostic on the hash used to pick a field element, even though SHA512 is commonly used,
- follows https://tools.ietf.org/id/draft-irtf-cfrg-hash-to-curve-10.html closely
- tests the outputs of the function using libsignal's implementation.
2020-10-21 17:38:22 -04:00
Stephane Raux
608f8cd594
Make crate feature alloc work with stable Rust
...
`println!` was removed in the test as the corresponding test for `u32` does not have it.
2020-10-20 18:15:00 -07:00
Henry de Valence
6d96eb7796
Bump version to 3.0.0.
2020-08-17 18:20:26 -07:00
Henry de Valence
2ee61938ee
Merge pull request #327 from huitseeker/digests-0.9
...
Update sha2, digest to 0.9
2020-08-17 18:11:32 -07:00
isis agora lovecruft
5038fcf50a
Merge pull request #308 from isislovecruft/fix/pippenger-typo
...
Fix typo of Pippenger's name.
2020-07-01 01:14:10 +00:00
François Garillot
6afd8ff212
Update sha2, digest to 0.9
2020-06-15 07:16:04 -04:00
Henry de Valence
3fc47ef867
Bump version to 2.1.0
2020-05-29 12:39:39 -07:00
Henry de Valence
f04b83055c
Merge branch 'master' into develop
2020-05-29 12:36:16 -07:00
Ruben De Smet
3a61a0b70c
Make Scalar::from_bits a const fn.
...
const_fn is stable since Rust 1.31
(https://github.com/rust-lang/rust/pull/54835 ) and enables calling
`Scalar::from_bits(..)` from other const fn contexts, potentially
saving some overhead here and there.
Especially useful in contexts where constants are being built from a bit
pattern.
2020-05-28 10:28:28 +02:00
gedigi
c9fe6c5533
implemented Zeroize for CompressedRistretto and RistrettoPoint
2020-03-19 14:16:06 -07:00
Rui Morais
6a8e466063
add derive Hash to Scalar, MontgomeryPoint and CompressedEdwardsY
2020-02-25 22:39:19 +00:00
Rui Morais
d57fb6caeb
Derive of Hash trait to CompressedRistretto
2020-02-25 18:16:06 +00:00
Isis Lovecruft
e82910d215
Add test for basepoint table multiplication by unreduced scalar.
2020-01-07 08:06:27 +00:00
Isis Lovecruft
1f8a19a753
Fix an attempted overflow on absolute value computation for radix-256 tables.
...
Found by the fuzzer in 4f5d2d4.
2020-01-07 08:04:46 +00:00
Isis Lovecruft
ca1f730790
Fix debug_assert! range in Scalar::to_radix_2w_size_hint().
2020-01-03 23:56:30 +00:00
Isis Lovecruft
c01bd780dc
Implement radix-32 precomputed scalar multiplication tables.
2019-12-31 02:26:03 +00:00
Isis Lovecruft
cfbcb6ca61
Implement conversions between basepoint table sizes.
...
This is useful for programs/protocol which can do some heuristics or
learning-based approach towards optimising the table size based on the number of
uses of e.g. a public key, the second basepoint in a Pedersen commitment, etc.,
i.e. the first time a public key is used to verify a signature, the usual
variable-time basepoint multiscalar multiplication is used, however after 1000
verifications, the table size is upgraded, and again after 10000 verifications,
etc.
2019-12-31 02:26:03 +00:00
Isis Lovecruft
8a9e09ba34
Implement larger sizes of basepoint tables.
...
This implements a macro for implementing the BasepointTable trait, and
uses the macro to create basepoint table types. The default table
still uses radix-16 representation and is ~30KB in size. The new
table types, and their memory usage and additions required per
basepoint multiplication are:
* `EdwardsBasepointTableRadix64`: ~120KB, 43 additions
* `EdwardsBasepointTableRadix128`: ~240KB, 37 additions
* `EdwardsBasepointTableRadix256`: ~480KB, 32 additions
2019-12-31 02:26:03 +00:00
Isis Lovecruft
383e65f6bd
Add a trait for implementing a basepoint table.
2019-12-27 12:54:52 +00:00
Isis Lovecruft
4f29935c2c
Create macro for generating different sized LookupTable<T>s.
2019-12-27 12:49:32 +00:00
Henry de Valence
6a44f31702
Revert "Merge pull request #296 from isislovecruft/feature/compressed-try-from"
...
This reverts commit 46f56f91ee , reversing
changes made to a9b1d50c5a .
These changes are not semver-compatible with the 2.0.0 release.
2019-12-10 14:16:24 -08:00
Isis Lovecruft
7e2aed3943
Fix typo of Pippenger's name.
2019-12-10 20:33:53 +00:00
isis agora lovecruft
d52ab8bb6f
Merge branch 'develop' into feature/compressed-try-from
2019-11-26 21:21:14 +00: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 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
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
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
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
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