#[cfg(feature = "ecdsa")]
pub mod ecdsa;
#[cfg(feature = "arithmetic")]
mod arithmetic;
#[cfg(feature = "arithmetic")]
pub use {
self::arithmetic::{AffinePoint, NonZeroScalar, ProjectivePoint, ScalarValue},
crate::Scalar,
};
use crate::ORDER;
use elliptic_curve::{
bigint::{Odd, U384},
consts::U48,
};
#[cfg(feature = "pkcs8")]
use crate::pkcs8;
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, PartialOrd, Ord)]
pub struct BrainpoolP384r1;
impl elliptic_curve::Curve for BrainpoolP384r1 {
type FieldBytesSize = U48;
type Uint = U384;
const ORDER: Odd<U384> = ORDER;
}
impl elliptic_curve::PrimeCurve for BrainpoolP384r1 {}
impl elliptic_curve::point::PointCompression for BrainpoolP384r1 {
const COMPRESS_POINTS: bool = false;
}
#[cfg(feature = "pkcs8")]
impl pkcs8::AssociatedOid for BrainpoolP384r1 {
const OID: pkcs8::ObjectIdentifier =
pkcs8::ObjectIdentifier::new_unwrap("1.3.36.3.3.2.8.1.1.11");
}
pub type Sec1Point = elliptic_curve::sec1::Sec1Point<BrainpoolP384r1>;
pub type FieldBytes = elliptic_curve::FieldBytes<BrainpoolP384r1>;
pub type SecretKey = elliptic_curve::SecretKey<BrainpoolP384r1>;
#[cfg(not(feature = "arithmetic"))]
impl elliptic_curve::sec1::ValidatePublicKey for BrainpoolP384r1 {}