mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
Merge branch 'release/3.2' into main
This commit is contained in:
commit
4f2a2e0319
5 changed files with 36 additions and 4 deletions
|
|
@ -5,6 +5,12 @@ major series.
|
||||||
|
|
||||||
## 3.x series
|
## 3.x series
|
||||||
|
|
||||||
|
### 3.2.0
|
||||||
|
|
||||||
|
* Add support for getting the identity element for the Montgomery
|
||||||
|
form of curve25519, which is useful in certain protocols for
|
||||||
|
checking contributory behaviour in derivation of shared secrets.
|
||||||
|
|
||||||
### 3.1.2
|
### 3.1.2
|
||||||
|
|
||||||
* Revert a commit which mistakenly removed support for `zeroize` traits
|
* Revert a commit which mistakenly removed support for `zeroize` traits
|
||||||
|
|
@ -37,7 +43,7 @@ major series.
|
||||||
|
|
||||||
### 3.0.2
|
### 3.0.2
|
||||||
|
|
||||||
* Multiple documenation typo fixes.
|
* Multiple documentation typo fixes.
|
||||||
* Fixes to make using `alloc`+`no_std` possible for stable Rust.
|
* Fixes to make using `alloc`+`no_std` possible for stable Rust.
|
||||||
|
|
||||||
### 3.0.1
|
### 3.0.1
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ name = "curve25519-dalek"
|
||||||
# - update html_root_url
|
# - update html_root_url
|
||||||
# - update README if required by semver
|
# - update README if required by semver
|
||||||
# - if README was updated, also update module documentation in src/lib.rs
|
# - if README was updated, also update module documentation in src/lib.rs
|
||||||
version = "3.1.2"
|
version = "3.2.0"
|
||||||
authors = ["Isis Lovecruft <isis@patternsinthevoid.net>",
|
authors = ["Isis Lovecruft <isis@patternsinthevoid.net>",
|
||||||
"Henry de Valence <hdevalence@hdevalence.ca>"]
|
"Henry de Valence <hdevalence@hdevalence.ca>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,13 @@ optimised batch inversion was contributed by Sean Bowe and Daira Hopwood.
|
||||||
|
|
||||||
The `no_std` and `zeroize` support was contributed by Tony Arcieri.
|
The `no_std` and `zeroize` support was contributed by Tony Arcieri.
|
||||||
|
|
||||||
Thanks also to Ashley Hauck, Lucas Salibian, and Manish Goregaokar for their
|
The formally verified backends, `fiat_u32_backend` and `fiat_u64_backend`, which
|
||||||
|
integrate with the Rust generated by the
|
||||||
|
[Fiat Crypto project](https://github.com/mit-plv/fiat-crypto) were contributed
|
||||||
|
by François Garillot.
|
||||||
|
|
||||||
|
Thanks also to Ashley Hauck, Lucas Salibian, Manish Goregaokar, Jack Grigg,
|
||||||
|
Pratyush Mishra, Michael Rosenberg, and countless others for their
|
||||||
contributions.
|
contributions.
|
||||||
|
|
||||||
[ed25519-dalek]: https://github.com/dalek-cryptography/ed25519-dalek
|
[ed25519-dalek]: https://github.com/dalek-cryptography/ed25519-dalek
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
#![doc(html_logo_url = "https://doc.dalek.rs/assets/dalek-logo-clear.png")]
|
#![doc(html_logo_url = "https://doc.dalek.rs/assets/dalek-logo-clear.png")]
|
||||||
#![doc(html_root_url = "https://docs.rs/curve25519-dalek/3.1.2")]
|
#![doc(html_root_url = "https://docs.rs/curve25519-dalek/3.2.0")]
|
||||||
|
|
||||||
//! # curve25519-dalek [](https://crates.io/crates/curve25519-dalek) [](https://doc.dalek.rs) [](https://travis-ci.org/dalek-cryptography/curve25519-dalek)
|
//! # curve25519-dalek [](https://crates.io/crates/curve25519-dalek) [](https://doc.dalek.rs) [](https://travis-ci.org/dalek-cryptography/curve25519-dalek)
|
||||||
//!
|
//!
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,13 @@ impl PartialEq for MontgomeryPoint {
|
||||||
|
|
||||||
impl Eq for MontgomeryPoint {}
|
impl Eq for MontgomeryPoint {}
|
||||||
|
|
||||||
|
impl Identity for MontgomeryPoint {
|
||||||
|
/// Return the group identity element, which has order 4.
|
||||||
|
fn identity() -> MontgomeryPoint {
|
||||||
|
MontgomeryPoint([0u8; 32])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Zeroize for MontgomeryPoint {
|
impl Zeroize for MontgomeryPoint {
|
||||||
fn zeroize(&mut self) {
|
fn zeroize(&mut self) {
|
||||||
self.0.zeroize();
|
self.0.zeroize();
|
||||||
|
|
@ -351,6 +358,19 @@ mod test {
|
||||||
|
|
||||||
use rand_core::OsRng;
|
use rand_core::OsRng;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn identity_in_different_coordinates() {
|
||||||
|
let id_projective = ProjectivePoint::identity();
|
||||||
|
let id_montgomery = id_projective.to_affine();
|
||||||
|
|
||||||
|
assert!(id_montgomery == MontgomeryPoint::identity());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn identity_in_different_models() {
|
||||||
|
assert!(EdwardsPoint::identity().to_montgomery() == MontgomeryPoint::identity());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
fn serde_bincode_basepoint_roundtrip() {
|
fn serde_bincode_basepoint_roundtrip() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue