Skip to main content

group/
prime.rs

1use crate::{Curve, CurveAffine, Group, GroupEncoding};
2
3/// This trait represents an element of a prime-order cryptographic group.
4pub trait PrimeGroup: Group + GroupEncoding {}
5
6/// Efficient representation of an elliptic curve point guaranteed to be
7/// in the correct prime order subgroup.
8pub trait PrimeCurve: Curve + PrimeGroup {}
9
10/// Affine representation of an elliptic curve point guaranteed to be
11/// in the correct prime order subgroup.
12pub trait PrimeCurveAffine: CurveAffine {}
13
14impl<C: CurveAffine> PrimeCurveAffine for C where C::Curve: PrimeCurve {}