pub(crate) mod field;
pub(crate) mod scalar;
use self::{field::FieldElement, scalar::Scalar};
use crate::NistP192;
use elliptic_curve::{CurveArithmetic, PrimeCurveArithmetic};
use primeorder::{point_arithmetic, PrimeCurveParams};
pub type AffinePoint = primeorder::AffinePoint<NistP192>;
pub type ProjectivePoint = primeorder::ProjectivePoint<NistP192>;
impl CurveArithmetic for NistP192 {
type AffinePoint = AffinePoint;
type ProjectivePoint = ProjectivePoint;
type Scalar = Scalar;
}
impl PrimeCurveArithmetic for NistP192 {
type CurveGroup = ProjectivePoint;
}
impl PrimeCurveParams for NistP192 {
type FieldElement = FieldElement;
type PointArithmetic = point_arithmetic::EquationAIsMinusThree;
const EQUATION_A: FieldElement = FieldElement::from_u64(3).neg();
const EQUATION_B: FieldElement =
FieldElement::from_hex("64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1");
const GENERATOR: (FieldElement, FieldElement) = (
FieldElement::from_hex("188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012"),
FieldElement::from_hex("07192b95ffc8da78631011ed6b24cdd573f977a11e794811"),
);
}