Skip to content

Commit df51df4

Browse files
authored
Use elliptic_curve::CurveGroup (#1905)
Where these missed in #1902? If not feel free to close.
1 parent d4a01b1 commit df51df4

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

elliptic-curve/src/point/non_identity.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use core::ops::{Deref, Mul};
44

5-
use group::{Curve, Group, GroupEncoding, prime::PrimeCurveAffine};
5+
use group::{Group, GroupEncoding, prime::PrimeCurveAffine};
66
use rand_core::CryptoRng;
77
use subtle::{Choice, ConditionallySelectable, ConstantTimeEq, CtOption};
88

@@ -13,7 +13,7 @@ use alloc::vec::Vec;
1313
use serdect::serde::{Deserialize, Serialize, de, ser};
1414
use zeroize::Zeroize;
1515

16-
use crate::{BatchNormalize, CurveArithmetic, NonZeroScalar, Scalar};
16+
use crate::{BatchNormalize, CurveArithmetic, CurveGroup, NonZeroScalar, Scalar};
1717

1818
/// Non-identity point type.
1919
///
@@ -83,7 +83,7 @@ impl<P: Copy> NonIdentity<P> {
8383

8484
impl<P> NonIdentity<P>
8585
where
86-
P: ConditionallySelectable + ConstantTimeEq + Curve + Default,
86+
P: ConditionallySelectable + ConstantTimeEq + CurveGroup + Default,
8787
{
8888
/// Generate a random `NonIdentity<ProjectivePoint>`.
8989
pub fn random<R: CryptoRng + ?Sized>(rng: &mut R) -> Self {
@@ -132,7 +132,7 @@ impl<P> AsRef<P> for NonIdentity<P> {
132132

133133
impl<const N: usize, P> BatchNormalize<[Self; N]> for NonIdentity<P>
134134
where
135-
P: Curve + BatchNormalize<[P; N], Output = [P::AffineRepr; N]>,
135+
P: CurveGroup + BatchNormalize<[P; N], Output = [P::AffineRepr; N]>,
136136
{
137137
type Output = [NonIdentity<P::AffineRepr>; N];
138138

@@ -146,7 +146,7 @@ where
146146
#[cfg(feature = "alloc")]
147147
impl<P> BatchNormalize<[Self]> for NonIdentity<P>
148148
where
149-
P: Curve + BatchNormalize<[P], Output = Vec<P::AffineRepr>>,
149+
P: CurveGroup + BatchNormalize<[P], Output = Vec<P::AffineRepr>>,
150150
{
151151
type Output = Vec<NonIdentity<P::AffineRepr>>;
152152

elliptic-curve/src/public_key.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
//! Elliptic curve public keys.
22
33
use crate::{
4-
AffinePoint, CurveArithmetic, Error, NonZeroScalar, ProjectivePoint, Result, point::NonIdentity,
4+
AffinePoint, CurveArithmetic, CurveGroup, Error, NonZeroScalar, ProjectivePoint, Result,
5+
point::NonIdentity,
56
};
67
use core::fmt::Debug;
7-
use group::{Curve, Group};
8+
use group::Group;
89

910
#[cfg(feature = "jwk")]
1011
use crate::{JwkEcKey, JwkParameters};

0 commit comments

Comments
 (0)