* Fixes cfg with target from env
* Derive cleanup
* Default to curve25519_dalek_bits="32" on unknown target
* Give out warning (thanks @jcape)
Co-authored-by: ryan <ryankurte@users.noreply.github.com>
Co-authored-by: James Cape <james@mobilecoin.com>
The `ed25519` v2.2.0 crate bumps the `pkcs8` dependency to v0.10.
This updates `ed25519` to the latest version and updates the PKCS#8
support to use the new API.
Previously it was a 2-tuple containing a `CompressedEdwardsY`
serialization and a decompressed `EdwardsPoint`, however using
`.0` and `.1` for these respectively makes the code hard to read.
This commit changes them to `compressed` and `point`, which as it were
are the names of the local variables used when constructing a
`VerifyingKey`, which improves clarity.
* Added items to changelog for 2.0 release
* Removed unnecessary uses of std in doctests
* Gated `Context` behind `digest`
* Fixed noncompiling doctest when only `digest` is enabled
* README feature flag list mostly done
* Copied changelog to readme
* Redid the malleability section in README
* Added CONTRIBUTING.md
* Bumped version number to 2.0.0-pre.0; small changes to README
* Updated changelog for #277
* Added pem feature description
Co-authored-by: pinkforest(she/her) <36498018+pinkforest@users.noreply.github.com>
* Fixed-based Montgomery scalar multiplication
Adds `MontgomeryPoint::mul_base` as an API for fixed-base scalar
multiplication which allows for potential future optimizations.
As a baseline implementation, it uses the variable base scalar
multiplication implementation.
This follows the existing `EdwardsPoint::mul_base` and
`RistrettoPoint::mul_base` APIs.
* Added Montgomery mul_base bench
* Switched MontgomeryPoint::mul_base to use EdwardsPoint::mul_base
---------
Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
Re-exports the following commonly used types from their respective
modules to the toplevel of the crate, which makes them easier to access:
- `EdwardsPoint`
- `MontgomeryPoint`
- `RistrettoPoint`
- `Scalar`
* Add `Context` type
Adds a generic type which can be used with `SigningKey` and
`VerifyingKey` for storing a context string value along with the key for
use with `DigestSigner` and `DigestVerifier`.
* Added Context tests, docs, and re-exports
* Added docs about SHA-512 for prehashing; re-re-exported Sha512
Co-authored-by: Tony Arcieri <bascule@gmail.com>
Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
The original v2.0.0 release has been yanked.
This release includes a different infallible parsing API which can be
used to eliminate some usages of `unwrap()`.
* Made all signature R comparisons byte-wise
* Use Scalar::from_bits_clamped rather than manually clamping
* Added clippy lints and comments for use of unwrap()
* Clarify use of unused