Skip to content

Commit 03eb755

Browse files
committed
merge in changes from dalek
Signed-off-by: Michael Lodder <[email protected]>
1 parent 4399a02 commit 03eb755

File tree

5 files changed

+43
-44
lines changed

5 files changed

+43
-44
lines changed

curve25519-dalek/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ name = "curve25519-dalek-ml"
44
# - update CHANGELOG
55
# - update README if required by semver
66
# - if README was updated, also update module documentation in src/lib.rs
7-
version = "4.1.3"
7+
version = "4.2.0"
88
edition = "2021"
9-
rust-version = "1.60.0"
109
authors = ["Isis Lovecruft <[email protected]>",
1110
"Henry de Valence <[email protected]>",
1211
"Michael Lodder <[email protected]>"]
@@ -48,7 +47,7 @@ required-features = ["alloc", "rand_core"]
4847

4948
[dependencies]
5049
cfg-if = "1"
51-
elliptic-curve = { version = "0.13.5", features = ["hash2curve"], optional = true }
50+
elliptic-curve = { version = "0.13", features = ["hash2curve"], optional = true }
5251
ff = { version = "0.13", default-features = false, optional = true }
5352
group = { version = "0.13", default-features = false, optional = true }
5453
rand_core = { version = "0.6.4", default-features = false, optional = true }

curve25519-dalek/src/edwards.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// -*- mode: rust; -*-
22
//
3-
// This file is part of curve25519-dalek.
3+
// This file is part of curve25519-dalek_ml.
44
// Copyright (c) 2016-2021 isis lovecruft
55
// Copyright (c) 2016-2020 Henry de Valence
66
// See LICENSE for licensing information.
@@ -85,7 +85,7 @@
8585
//! successful decompression of a compressed point, or else by
8686
//! operations on other (valid) `EdwardsPoint`s.
8787
//!
88-
//! [curve_models]: https://docs.rs/curve25519-dalek/latest/curve25519-dalek/backend/serial/curve_models/index.html
88+
//! [curve_models]: https://docs.rs/curve25519-dalek_ml/latest/curve25519-dalek/backend/serial/curve_models/index.html
8989
9090
// We allow non snake_case names because coordinates in projective space are
9191
// traditionally denoted by the capitalisation of their respective
@@ -1282,7 +1282,7 @@ impl EdwardsPoint {
12821282
/// # Example
12831283
///
12841284
/// ```
1285-
/// use curve25519_dalek::constants;
1285+
/// use curve25519_dalek_ml::constants;
12861286
///
12871287
/// // Generator of the prime-order subgroup
12881288
/// let P = constants::ED25519_BASEPOINT_POINT;
@@ -1312,7 +1312,7 @@ impl EdwardsPoint {
13121312
/// # Example
13131313
///
13141314
/// ```
1315-
/// use curve25519_dalek::constants;
1315+
/// use curve25519_dalek_ml::constants;
13161316
///
13171317
/// // Generator of the prime-order subgroup
13181318
/// let P = constants::ED25519_BASEPOINT_POINT;

curve25519-dalek/src/ristretto.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// -*- mode: rust; -*-
22
//
3-
// This file is part of curve25519-dalek.
3+
// This file is part of curve25519-dalek_ml.
44
// Copyright (c) 2016-2021 isis lovecruft
55
// Copyright (c) 2016-2020 Henry de Valence
66
// See LICENSE for licensing information.
@@ -56,7 +56,7 @@
5656
//! [Why Ristretto?][why_ristretto] section of the Ristretto website.
5757
//!
5858
//! Ristretto
59-
//! points are provided in `curve25519-dalek` by the `RistrettoPoint`
59+
//! points are provided in `curve25519-dalek_ml` by the `RistrettoPoint`
6060
//! struct.
6161
//!
6262
//! ## Encoding and Decoding
@@ -531,7 +531,7 @@ impl RistrettoPoint {
531531
///
532532
#[cfg_attr(feature = "rand_core", doc = "```")]
533533
#[cfg_attr(not(feature = "rand_core"), doc = "```ignore")]
534-
/// # use curve25519_dalek::ristretto::RistrettoPoint;
534+
/// # use curve25519_dalek_ml::ristretto::RistrettoPoint;
535535
/// use rand_core::OsRng;
536536
///
537537
/// # // Need fn main() here in comment so the doctest compiles
@@ -735,7 +735,7 @@ impl RistrettoPoint {
735735
///
736736
#[cfg_attr(feature = "digest", doc = "```")]
737737
#[cfg_attr(not(feature = "digest"), doc = "```ignore")]
738-
/// # use curve25519_dalek::ristretto::RistrettoPoint;
738+
/// # use curve25519_dalek_ml::ristretto::RistrettoPoint;
739739
/// use sha2::Sha512;
740740
///
741741
/// # // Need fn main() here in comment so the doctest compiles
@@ -1070,8 +1070,8 @@ impl RistrettoPoint {
10701070
/// A precomputed table of multiples of the Ristretto basepoint is
10711071
/// available in the `constants` module:
10721072
/// ```
1073-
/// use curve25519_dalek::constants::RISTRETTO_BASEPOINT_TABLE;
1074-
/// use curve25519_dalek::scalar::Scalar;
1073+
/// use curve25519_dalek_ml::constants::RISTRETTO_BASEPOINT_TABLE;
1074+
/// use curve25519_dalek_ml::scalar::Scalar;
10751075
///
10761076
/// let a = Scalar::from(87329482u64);
10771077
/// let P = &a * RISTRETTO_BASEPOINT_TABLE;
@@ -1125,9 +1125,9 @@ impl ConditionallySelectable for RistrettoPoint {
11251125
/// use subtle::ConditionallySelectable;
11261126
/// use subtle::Choice;
11271127
/// #
1128-
/// # use curve25519_dalek::traits::Identity;
1129-
/// # use curve25519_dalek::ristretto::RistrettoPoint;
1130-
/// # use curve25519_dalek::constants;
1128+
/// # use curve25519_dalek_ml::traits::Identity;
1129+
/// # use curve25519_dalek_ml::ristretto::RistrettoPoint;
1130+
/// # use curve25519_dalek_ml::constants;
11311131
/// # fn main() {
11321132
///
11331133
/// let A = RistrettoPoint::identity();

curve25519-dalek/src/scalar.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// -*- mode: rust; -*-
22
//
3-
// This file is part of curve25519-dalek.
3+
// This file is part of curve25519-dalek_ml.
44
// Copyright (c) 2016-2021 isis lovecruft
55
// Copyright (c) 2016-2019 Henry de Valence
66
// Portions Copyright 2017 Brian Smith
@@ -34,7 +34,7 @@
3434
//! `Some(Scalar)` in return:
3535
//!
3636
//! ```
37-
//! use curve25519_dalek::scalar::Scalar;
37+
//! use curve25519_dalek_ml::scalar::Scalar;
3838
//!
3939
//! let one_as_bytes: [u8; 32] = Scalar::ONE.to_bytes();
4040
//! let a: Option<Scalar> = Scalar::from_canonical_bytes(one_as_bytes).into();
@@ -46,7 +46,7 @@
4646
//! (in this case, \\( \ell + 2 \\)), we'll get `None` back:
4747
//!
4848
//! ```
49-
//! use curve25519_dalek::scalar::Scalar;
49+
//! use curve25519_dalek_ml::scalar::Scalar;
5050
//!
5151
//! let l_plus_two_bytes: [u8; 32] = [
5252
//! 0xef, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58,
@@ -66,7 +66,7 @@
6666
//! resultant scalar \\( \mod \ell \\), producing \\( 2 \\):
6767
//!
6868
//! ```
69-
//! use curve25519_dalek::scalar::Scalar;
69+
//! use curve25519_dalek_ml::scalar::Scalar;
7070
//!
7171
//! let l_plus_two_bytes: [u8; 32] = [
7272
//! 0xef, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58,
@@ -92,7 +92,7 @@
9292
#![cfg_attr(not(feature = "digest"), doc = "```ignore")]
9393
//! # fn main() {
9494
//! use sha2::{Digest, Sha512};
95-
//! use curve25519_dalek::scalar::Scalar;
95+
//! use curve25519_dalek_ml::scalar::Scalar;
9696
//!
9797
//! // Hashing a single byte slice
9898
//! let a = Scalar::hash_from_bytes::<Sha512>(b"Abolish ICE");
@@ -527,7 +527,7 @@ impl From<u64> for Scalar {
527527
/// # Example
528528
///
529529
/// ```
530-
/// use curve25519_dalek::scalar::Scalar;
530+
/// use curve25519_dalek_ml::scalar::Scalar;
531531
///
532532
/// let fourtytwo = Scalar::from(42u64);
533533
/// let six = Scalar::from(6u64);
@@ -587,7 +587,7 @@ impl Scalar {
587587
///
588588
/// ```
589589
/// # fn main() {
590-
/// use curve25519_dalek::scalar::Scalar;
590+
/// use curve25519_dalek_ml::scalar::Scalar;
591591
///
592592
/// use rand_core::OsRng;
593593
///
@@ -612,7 +612,7 @@ impl Scalar {
612612
///
613613
#[cfg_attr(feature = "digest", doc = "```")]
614614
#[cfg_attr(not(feature = "digest"), doc = "```ignore")]
615-
/// # use curve25519_dalek::scalar::Scalar;
615+
/// # use curve25519_dalek_ml::scalar::Scalar;
616616
/// use sha2::Sha512;
617617
///
618618
/// # // Need fn main() here in comment so the doctest compiles
@@ -641,8 +641,8 @@ impl Scalar {
641641
/// # Example
642642
///
643643
/// ```
644-
/// # use curve25519_dalek::scalar::Scalar;
645-
/// use curve25519_dalek::digest::Update;
644+
/// use curve25519_dalek_ml::scalar::Scalar;
645+
/// use curve25519_dalek_ml::digest::Update;
646646
///
647647
/// use sha2::Digest;
648648
/// use sha2::Sha512;
@@ -682,7 +682,7 @@ impl Scalar {
682682
/// # Example
683683
///
684684
/// ```
685-
/// use curve25519_dalek::scalar::Scalar;
685+
/// use curve25519_dalek_ml::scalar::Scalar;
686686
///
687687
/// let s: Scalar = Scalar::ZERO;
688688
///
@@ -697,7 +697,7 @@ impl Scalar {
697697
/// # Example
698698
///
699699
/// ```
700-
/// use curve25519_dalek::scalar::Scalar;
700+
/// use curve25519_dalek_ml::scalar::Scalar;
701701
///
702702
/// let s: Scalar = Scalar::ZERO;
703703
///
@@ -722,7 +722,7 @@ impl Scalar {
722722
/// # Example
723723
///
724724
/// ```
725-
/// use curve25519_dalek::scalar::Scalar;
725+
/// use curve25519_dalek_ml::scalar::Scalar;
726726
///
727727
/// // x = 2238329342913194256032495932344128051776374960164957527413114840482143558222
728728
/// let X: Scalar = Scalar::from_bytes_mod_order([
@@ -766,7 +766,7 @@ impl Scalar {
766766
/// # Example
767767
///
768768
/// ```
769-
/// # use curve25519_dalek::scalar::Scalar;
769+
/// # use curve25519_dalek_ml::scalar::Scalar;
770770
/// # fn main() {
771771
/// let mut scalars = [
772772
/// Scalar::from(3u64),

curve25519-dalek/src/traits.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// -*- mode: rust; -*-
22
//
3-
// This file is part of curve25519-dalek.
3+
// This file is part of curve25519-dalek_ml.
44
// Copyright (c) 2016-2021 isis lovecruft
55
// Copyright (c) 2016-2019 Henry de Valence
66
// See LICENSE for licensing information.
@@ -97,10 +97,10 @@ pub trait MultiscalarMul {
9797
/// ```
9898
/// # #[cfg(feature = "alloc")]
9999
/// # {
100-
/// use curve25519_dalek::constants;
101-
/// use curve25519_dalek::traits::MultiscalarMul;
102-
/// use curve25519_dalek::ristretto::RistrettoPoint;
103-
/// use curve25519_dalek::scalar::Scalar;
100+
/// use curve25519_dalek_ml::constants;
101+
/// use curve25519_dalek_ml::traits::MultiscalarMul;
102+
/// use curve25519_dalek_ml::ristretto::RistrettoPoint;
103+
/// use curve25519_dalek_ml::scalar::Scalar;
104104
///
105105
/// // Some scalars
106106
/// let a = Scalar::from(87329482u64);
@@ -152,10 +152,10 @@ pub trait VartimeMultiscalarMul {
152152
/// ```
153153
/// #[cfg(feature = "alloc")]
154154
/// # {
155-
/// use curve25519_dalek::constants;
156-
/// use curve25519_dalek::traits::VartimeMultiscalarMul;
157-
/// use curve25519_dalek::ristretto::RistrettoPoint;
158-
/// use curve25519_dalek::scalar::Scalar;
155+
/// use curve25519_dalek_ml::constants;
156+
/// use curve25519_dalek_ml::traits::VartimeMultiscalarMul;
157+
/// use curve25519_dalek_ml::ristretto::RistrettoPoint;
158+
/// use curve25519_dalek_ml::scalar::Scalar;
159159
///
160160
/// // Some scalars
161161
/// let a = Scalar::from(87329482u64);
@@ -218,10 +218,10 @@ pub trait VartimeMultiscalarMul {
218218
/// ```
219219
/// #[cfg(feature = "alloc")]
220220
/// # {
221-
/// use curve25519_dalek::constants;
222-
/// use curve25519_dalek::traits::VartimeMultiscalarMul;
223-
/// use curve25519_dalek::ristretto::RistrettoPoint;
224-
/// use curve25519_dalek::scalar::Scalar;
221+
/// use curve25519_dalek_ml::constants;
222+
/// use curve25519_dalek_ml::traits::VartimeMultiscalarMul;
223+
/// use curve25519_dalek_ml::ristretto::RistrettoPoint;
224+
/// use curve25519_dalek_ml::scalar::Scalar;
225225
///
226226
/// // Some scalars
227227
/// let a = Scalar::from(87329482u64);
@@ -406,7 +406,7 @@ pub trait VartimePrecomputedMultiscalarMul: Sized {
406406
/// Trait for checking whether a point is on the curve.
407407
///
408408
/// This trait is only for debugging/testing, since it should be
409-
/// impossible for a `curve25519-dalek` user to construct an invalid
409+
/// impossible for a `curve25519-dalek_ml` user to construct an invalid
410410
/// point.
411411
#[allow(dead_code)]
412412
pub(crate) trait ValidityCheck {

0 commit comments

Comments
 (0)