Commit graph

2425 commits

Author SHA1 Message Date
Rob Ede
b93ace8c7f
Address Clippy lints (#543) 2023-08-27 12:47:12 -06:00
Matt Johnston
c66973c823
ed: ConstantTimeEq and PartialEq for SigningKey (#557) 2023-08-12 01:49:16 -04:00
moiseev-signal
bf2c4eea23
curve: Mark scalar::clamp_integer as must_use (#558) 2023-08-12 01:44:09 -04:00
Elichai Turkel
6dd17b2836
x: Mark x25519-dalek version 2 as stable (#554) 2023-08-11 18:18:15 -04:00
Michael Rosenberg
42b55fd117
ed: Bump ed25519-dalek to 2.0.0 (#559)
* Made clippy happy
2023-08-11 11:38:43 -04:00
Tony Arcieri
345364d4ec
Update README.md
Use non-breaking hyphens in crate names in table
2023-07-27 18:17:00 -06:00
Michael Rosenberg
e44d4b5903
curve,ed,x: Bump curve version to 4.0.0 (#550) 2023-07-22 12:52:24 -04:00
Tony Arcieri
1ac254fb1c
Remove old Cargo.lock files (#549)
These are from before the members were merged into a workspace
2023-07-22 12:30:10 -04:00
Michael Rosenberg
0d1bc975d5
Fixed CI badges in workspaces 2023-07-22 12:22:31 -04:00
Tony Arcieri
20d1346841
Fix CI failures (#548)
There are various small CI failures that are addressed in this PR.
2023-07-22 12:13:10 -04:00
Tony Arcieri
d671fc2720
README.md: fix crate table 2023-07-20 11:37:03 -06:00
Tony Arcieri
5f0d41fcec
ed25519-dalek: remove ExpandedSecretKey::to_bytes (#545)
* ed25519-dalek: remove `ExpandedSecretKey::to_bytes`

The reason `ExpandedSecretKey` needs a private `scalar_bytes` field is
to retain the canonical scalar bytes as output by SHA-512 during key
expansion so they can be serialized by the `to_bytes` method.

However, `ExpandedSecretKey`s should not be serialized to the wire.

Removing this method allows the private field to be removed, which
allows `ExpandedSecretKey` to be constructed entirely from public
fields. This provides an alternative to #544 for use cases like
Ed25519-BIP32 where the private scalar is derived rather than clamped
from bytes.

One other change is needed: `to_scalar_bytes` was changed to `to_scalar`
as the canonical scalar bytes are no longer retained, however this has
no impact on its main use case, X25519 Diffie-Hellman exchanges, where
the `Scalar` should NOT be written to the wire anyway.

* Added scalar byte comparison back to ed25519-dalek x25519 test

---------

Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
2023-07-10 22:09:40 -04:00
Michael Rosenberg
76e193415b
Merge pull request #540 from pinkforest/bump-quote
Bump `quote` and `syn`
2023-06-30 00:17:19 -04:00
pinkforest
e17a0e771a
Bump quote and syn 2023-06-30 04:07:19 +00:00
Michael Rosenberg
f789810e33
Merge pull request #536 from pinkforest/monorepo-t1
Pulls ed25519-dalek and x25519-dalek in. We're now one happy monorepo.
2023-06-29 23:48:46 -04:00
Michael Rosenberg
98a0a6f2ef
Moved code of conduct 2023-06-29 23:35:29 -04:00
pinkforest
bf8b21c439
Add new workspace README and CONTRIBUTING
Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
2023-06-28 09:40:52 +00:00
pinkforest
7db9981a7f
Re-work CI around workspace
Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
2023-06-28 09:38:56 +00:00
pinkforest
6e422d96d7
Re-organize Cargo manifests to workspace 2023-06-28 09:38:06 +00:00
pinkforest
2cc52c216e
Move CI & assets into workspace
Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
2023-06-28 08:59:51 +00:00
pinkforest
bf0e37d3ed
Workspace x25519 under x25519-dalek 2023-06-27 04:09:32 +00:00
pinkforest
e7ecb74ed0
Merge remote-tracking branch 'x/main' into monorepo-t1 2023-06-27 04:06:50 +00:00
pinkforest
d62def9c22
Workspace ed25519 under ed25519-dalek 2023-06-27 04:04:09 +00:00
pinkforest
52742e7864
Merge remote-tracking branch 'ed/main' into monorepo-t1 2023-06-27 04:01:16 +00:00
pinkforest
40cf5aff99
Workspace curve25519 under curve25519-dalek 2023-06-27 04:00:12 +00:00
pinkforest(she/her)
8613b5a809
chore: Release 2.0.0-rc.3 (#128)
* chore: Release 2.0.0-rc.3

* cargo update -p curve25519-dalek

* Added note about backends

* Fixed docs broken link

---------

Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
2023-06-23 23:54:38 -04:00
pinkforest(she/her)
58a967f6fb
chore: Release 2.0.0-rc.3 (#307)
* chore: Release 2.0.0-rc.3

* cargo update -p curve25519-dalek

* Removed some old backend selection prose and env vars

---------

Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
2023-06-23 23:53:10 -04:00
pinkforest(she/her)
2e3212b8cc
chore: Release 4.0.0-rc.3 (#535) 2023-06-23 17:13:20 -04:00
pinkforest(she/her)
e429bde88d
Clean up backend features and vendor curve25519_dalek_derive (#531)
* Vendor import unsafe_target_features as curve25519-dalek-derive

Co-authored-by: Jan Bujak <jan@parity.io>

* Remove feature gates from avx2/ifma

* Add buildtime compile diagnostics about backend selection

* Add build script tests

* Documentation changes

* Disable simd related features unless simd was determined via build

* Add note and test about the override warning when unsuccesful

* Reduce complexity in build gating via compile_error

---------

Co-authored-by: Jan Bujak <jan@parity.io>
Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
2023-06-22 01:46:27 -04:00
Michael Rosenberg
9b166b75e0
Update to new Scalar API (#293)
* Updated to new curve25519 scalar API

* Made ExpandedSecretKey.scalar_bytes unclamped; clamping occurs in all scalar-point multiplication

* Added legacy compat deprecation notice

* Removed deprecation notice on check_scalar

* Removed unnecessary unwraps
2023-06-12 00:06:00 -04:00
Michael Rosenberg
e111b5d913
Merge pull request #523 from koute/main_runtime_simd
Runtime backend autodetection
2023-06-10 22:01:03 -04:00
Jan Bujak
50aa63532b
Fix the doc comment in packed_simd.rs 2023-06-05 16:42:45 +09:00
Jan Bujak
502897109c Pin the version of unsafe_target_feature 2023-06-05 16:40:31 +09:00
Jan Bujak
94247a79d1
Revert "(work-in-progress) Partially remove unsafe_target_feature"
This reverts commit c67e430cfd.
2023-06-05 16:38:58 +09:00
Tony Arcieri
618c5081f1
Replace unwrap_u8 with into (#528)
* Replace `unwrap_u8` with `into`

Leverages the `From<Choice>` impl for `bool` where applicable instead,
which results in clearer logic which more closely matches `bool`.
2023-05-30 21:49:13 -04:00
Marek
6c2233bc45
Fix the upper bound in the description of mods (#525) 2023-05-29 15:24:45 -06:00
Tony Arcieri
267961b7ee
README.md: use buildstats.info crate badge (#526)
Includes both version and download count
2023-05-20 13:26:05 -06:00
Jan Bujak
c67e430cfd
(work-in-progress) Partially remove unsafe_target_feature 2023-05-17 14:39:09 +09:00
Jan Bujak
a7df9c7918
Remove Selfs which don't compile anymore 2023-05-17 13:22:11 +09:00
Michael Rosenberg
4afbf09e1c
Add hazmat module with ExpandedSecretKey, raw_sign, raw_sign_prehashed (#299)
* Added raw_sign() and raw_sign_prehashed() functions

* Renamed `nonce` to `hash_prefix` in signing because it's really not a nonce

* Moved raw signing to hazmat module

* impl From<EdwardsPoint> for VerifyingKey

* Brought back ExpandedSecretKey; made raw_* functions take it as input

* Added remaining features to docs.rs feature set

* Removed redundant ExpandedSecretKey def; made raw signing use a generic CtxDigest

* Implemented raw_verify with generic CtxDigest

* Implemented raw_verify_prehashed with generic MsgDigest and CtxDigest

* Wrote hazmat tests; fixed errors; switched ordering of MsgDigest and CtxDigest

* Updated changelog

* ExpandedSecretKey::from_bytes takes an array and is now infallible

* Add TODO comment for split_array_ref

* Added from_slice and TryFrom<&[u8]> for ExpandedSecretKey

---------

Co-authored-by: Tony Arcieri <bascule@gmail.com>
2023-05-15 00:50:38 -04:00
Tony Arcieri
f683cf4d50
Merge pull request #125 from eaon/crypto_box_url
Update `crypto_box` URL
2023-05-09 07:05:03 -06:00
eaon
d828434d60
Update crypto_box URL 2023-05-08 18:56:43 -04:00
Damir Jelić
90f10ed096
Fix a typo (#300) 2023-04-11 11:19:36 -06:00
Jan Bujak
738cfee020
Get rid of the unused_unsafe warning on old versions of Rust. 2023-04-11 21:01:55 +09:00
Jan Bujak
996b1e9077
Make cargodoc happy 2023-04-11 20:49:06 +09:00
Jan Bujak
1b6fee354d
Make clippy happy 2023-04-11 20:44:37 +09:00
Jan Bujak
219995dbc9
rustfmt src/backend/vector/scalar_mul (no changes besides formatting) 2023-04-11 20:13:31 +09:00
Jan Bujak
0db8783be8
Runtime backend autodetection 2023-04-11 20:13:20 +09:00
Jan Bujak
91e839aae5
Add extra #[inline]; this speeds up the avx2 backend slightly 2023-04-11 20:09:21 +09:00
Michael Rosenberg
25fa593df2
Update to new Scalar API (#120)
* Updated to new curve25519 scalar API

* Removed clamping from constructors; clamping is always done during scalar-point multiplication

* Updated test to reflect new functionality

* Updated changelog
2023-03-31 16:58:35 -04:00