Skip to content

Commit 82be0f8

Browse files
committed
merge in changes from dalek
Signed-off-by: Michael Lodder <[email protected]>
1 parent bd285cc commit 82be0f8

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.2"
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]>"]
@@ -49,7 +48,7 @@ required-features = ["alloc", "rand_core"]
4948

5049
[dependencies]
5150
cfg-if = "1"
52-
elliptic-curve = { version = "0.13.5", features = ["hash2curve"], optional = true }
51+
elliptic-curve = { version = "0.13", features = ["hash2curve"], optional = true }
5352
ff = { version = "0.13", default-features = false, optional = true }
5453
group = { version = "0.13", default-features = false, optional = true }
5554
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
@@ -1281,7 +1281,7 @@ impl EdwardsPoint {
12811281
/// # Example
12821282
///
12831283
/// ```
1284-
/// use curve25519_dalek::constants;
1284+
/// use curve25519_dalek_ml::constants;
12851285
///
12861286
/// // Generator of the prime-order subgroup
12871287
/// let P = constants::ED25519_BASEPOINT_POINT;
@@ -1311,7 +1311,7 @@ impl EdwardsPoint {
13111311
/// # Example
13121312
///
13131313
/// ```
1314-
/// use curve25519_dalek::constants;
1314+
/// use curve25519_dalek_ml::constants;
13151315
///
13161316
/// // Generator of the prime-order subgroup
13171317
/// 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");
@@ -529,7 +529,7 @@ impl From<u64> for Scalar {
529529
/// # Example
530530
///
531531
/// ```
532-
/// use curve25519_dalek::scalar::Scalar;
532+
/// use curve25519_dalek_ml::scalar::Scalar;
533533
///
534534
/// let fourtytwo = Scalar::from(42u64);
535535
/// let six = Scalar::from(6u64);
@@ -589,7 +589,7 @@ impl Scalar {
589589
///
590590
/// ```
591591
/// # fn main() {
592-
/// use curve25519_dalek::scalar::Scalar;
592+
/// use curve25519_dalek_ml::scalar::Scalar;
593593
///
594594
/// use rand_core::OsRng;
595595
///
@@ -614,7 +614,7 @@ impl Scalar {
614614
///
615615
#[cfg_attr(feature = "digest", doc = "```")]
616616
#[cfg_attr(not(feature = "digest"), doc = "```ignore")]
617-
/// # use curve25519_dalek::scalar::Scalar;
617+
/// # use curve25519_dalek_ml::scalar::Scalar;
618618
/// use sha2::Sha512;
619619
///
620620
/// # // Need fn main() here in comment so the doctest compiles
@@ -643,8 +643,8 @@ impl Scalar {
643643
/// # Example
644644
///
645645
/// ```
646-
/// # use curve25519_dalek::scalar::Scalar;
647-
/// use curve25519_dalek::digest::Update;
646+
/// use curve25519_dalek_ml::scalar::Scalar;
647+
/// use curve25519_dalek_ml::digest::Update;
648648
///
649649
/// use sha2::Digest;
650650
/// use sha2::Sha512;
@@ -684,7 +684,7 @@ impl Scalar {
684684
/// # Example
685685
///
686686
/// ```
687-
/// use curve25519_dalek::scalar::Scalar;
687+
/// use curve25519_dalek_ml::scalar::Scalar;
688688
///
689689
/// let s: Scalar = Scalar::ZERO;
690690
///
@@ -699,7 +699,7 @@ impl Scalar {
699699
/// # Example
700700
///
701701
/// ```
702-
/// use curve25519_dalek::scalar::Scalar;
702+
/// use curve25519_dalek_ml::scalar::Scalar;
703703
///
704704
/// let s: Scalar = Scalar::ZERO;
705705
///
@@ -724,7 +724,7 @@ impl Scalar {
724724
/// # Example
725725
///
726726
/// ```
727-
/// use curve25519_dalek::scalar::Scalar;
727+
/// use curve25519_dalek_ml::scalar::Scalar;
728728
///
729729
/// // x = 2238329342913194256032495932344128051776374960164957527413114840482143558222
730730
/// let X: Scalar = Scalar::from_bytes_mod_order([
@@ -768,7 +768,7 @@ impl Scalar {
768768
/// # Example
769769
///
770770
/// ```
771-
/// # use curve25519_dalek::scalar::Scalar;
771+
/// # use curve25519_dalek_ml::scalar::Scalar;
772772
/// # fn main() {
773773
/// let mut scalars = [
774774
/// 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.
@@ -98,10 +98,10 @@ pub trait MultiscalarMul {
9898
/// ```
9999
/// # #[cfg(feature = "alloc")]
100100
/// # {
101-
/// use curve25519_dalek::constants;
102-
/// use curve25519_dalek::traits::MultiscalarMul;
103-
/// use curve25519_dalek::ristretto::RistrettoPoint;
104-
/// use curve25519_dalek::scalar::Scalar;
101+
/// use curve25519_dalek_ml::constants;
102+
/// use curve25519_dalek_ml::traits::MultiscalarMul;
103+
/// use curve25519_dalek_ml::ristretto::RistrettoPoint;
104+
/// use curve25519_dalek_ml::scalar::Scalar;
105105
///
106106
/// // Some scalars
107107
/// let a = Scalar::from(87329482u64);
@@ -153,10 +153,10 @@ pub trait VartimeMultiscalarMul {
153153
/// ```
154154
/// #[cfg(feature = "alloc")]
155155
/// # {
156-
/// use curve25519_dalek::constants;
157-
/// use curve25519_dalek::traits::VartimeMultiscalarMul;
158-
/// use curve25519_dalek::ristretto::RistrettoPoint;
159-
/// use curve25519_dalek::scalar::Scalar;
156+
/// use curve25519_dalek_ml::constants;
157+
/// use curve25519_dalek_ml::traits::VartimeMultiscalarMul;
158+
/// use curve25519_dalek_ml::ristretto::RistrettoPoint;
159+
/// use curve25519_dalek_ml::scalar::Scalar;
160160
///
161161
/// // Some scalars
162162
/// let a = Scalar::from(87329482u64);
@@ -219,10 +219,10 @@ pub trait VartimeMultiscalarMul {
219219
/// ```
220220
/// #[cfg(feature = "alloc")]
221221
/// # {
222-
/// use curve25519_dalek::constants;
223-
/// use curve25519_dalek::traits::VartimeMultiscalarMul;
224-
/// use curve25519_dalek::ristretto::RistrettoPoint;
225-
/// use curve25519_dalek::scalar::Scalar;
222+
/// use curve25519_dalek_ml::constants;
223+
/// use curve25519_dalek_ml::traits::VartimeMultiscalarMul;
224+
/// use curve25519_dalek_ml::ristretto::RistrettoPoint;
225+
/// use curve25519_dalek_ml::scalar::Scalar;
226226
///
227227
/// // Some scalars
228228
/// let a = Scalar::from(87329482u64);
@@ -407,7 +407,7 @@ pub trait VartimePrecomputedMultiscalarMul: Sized {
407407
/// Trait for checking whether a point is on the curve.
408408
///
409409
/// This trait is only for debugging/testing, since it should be
410-
/// impossible for a `curve25519-dalek` user to construct an invalid
410+
/// impossible for a `curve25519-dalek_ml` user to construct an invalid
411411
/// point.
412412
#[allow(dead_code)]
413413
pub(crate) trait ValidityCheck {

0 commit comments

Comments
 (0)