Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions elliptic-curve/src/point/non_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use core::ops::{Deref, Mul};

use group::{Curve, Group, GroupEncoding, prime::PrimeCurveAffine};
use group::{Group, GroupEncoding, prime::PrimeCurveAffine};
use rand_core::CryptoRng;
use subtle::{Choice, ConditionallySelectable, ConstantTimeEq, CtOption};

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

use crate::{BatchNormalize, CurveArithmetic, NonZeroScalar, Scalar};
use crate::{BatchNormalize, CurveArithmetic, CurveGroup, NonZeroScalar, Scalar};

/// Non-identity point type.
///
Expand Down Expand Up @@ -83,7 +83,7 @@ impl<P: Copy> NonIdentity<P> {

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

impl<const N: usize, P> BatchNormalize<[Self; N]> for NonIdentity<P>
where
P: Curve + BatchNormalize<[P; N], Output = [P::AffineRepr; N]>,
P: CurveGroup + BatchNormalize<[P; N], Output = [P::AffineRepr; N]>,
{
type Output = [NonIdentity<P::AffineRepr>; N];

Expand All @@ -146,7 +146,7 @@ where
#[cfg(feature = "alloc")]
impl<P> BatchNormalize<[Self]> for NonIdentity<P>
where
P: Curve + BatchNormalize<[P], Output = Vec<P::AffineRepr>>,
P: CurveGroup + BatchNormalize<[P], Output = Vec<P::AffineRepr>>,
{
type Output = Vec<NonIdentity<P::AffineRepr>>;

Expand Down
5 changes: 3 additions & 2 deletions elliptic-curve/src/public_key.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
//! Elliptic curve public keys.

use crate::{
AffinePoint, CurveArithmetic, Error, NonZeroScalar, ProjectivePoint, Result, point::NonIdentity,
AffinePoint, CurveArithmetic, CurveGroup, Error, NonZeroScalar, ProjectivePoint, Result,
point::NonIdentity,
};
use core::fmt::Debug;
use group::{Curve, Group};
use group::Group;

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