#![no_std]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc = include_str!("../README.md")]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg"
)]
#![forbid(unsafe_code)]
#![warn(
clippy::mod_module_files,
clippy::unwrap_used,
missing_docs,
rust_2018_idioms,
unused_lifetimes,
unused_qualifications
)]
#[cfg(feature = "arithmetic")]
mod arithmetic;
#[cfg(feature = "ecdsa-core")]
pub mod ecdsa;
#[cfg(any(feature = "test-vectors", test))]
pub mod test_vectors;
pub use elliptic_curve;
#[cfg(feature = "arithmetic")]
pub use arithmetic::{AffinePoint, ProjectivePoint, scalar::Scalar};
#[cfg(feature = "pkcs8")]
pub use elliptic_curve::pkcs8;
use elliptic_curve::{
array::Array,
bigint::{Odd, U192},
consts::{U24, U25},
};
const ORDER_HEX: &str = "ffffffffffffffffffffffff99def836146bc9b1b4d22831";
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, PartialOrd, Ord)]
pub struct NistP192;
impl elliptic_curve::Curve for NistP192 {
type FieldBytesSize = U24;
type Uint = U192;
const ORDER: Odd<U192> = Odd::<U192>::from_be_hex(ORDER_HEX);
}
impl elliptic_curve::PrimeCurve for NistP192 {}
impl elliptic_curve::point::PointCompression for NistP192 {
const COMPRESS_POINTS: bool = false;
}
#[cfg(feature = "pkcs8")]
impl pkcs8::AssociatedOid for NistP192 {
const OID: pkcs8::ObjectIdentifier = pkcs8::ObjectIdentifier::new_unwrap("1.2.840.10045.3.1.1");
}
pub type CompressedPoint = Array<u8, U25>;
pub type Sec1Point = elliptic_curve::sec1::Sec1Point<NistP192>;
pub type FieldBytes = elliptic_curve::FieldBytes<NistP192>;
#[cfg(feature = "arithmetic")]
pub type NonZeroScalar = elliptic_curve::NonZeroScalar<NistP192>;
#[cfg(not(feature = "arithmetic"))]
impl elliptic_curve::sec1::ValidatePublicKey for NistP192 {}