#![no_std]
#![warn(unsafe_code, missing_docs)]
#![cfg_attr(feature = "fuzzing", allow(dead_code))]
//! ECMQV key exchange protocol implementation (RFC 5656, draft-sullivan-tls-ecmqv-01)
//!
//! This crate provides two modes:
//! - `EphemeralOnly`: one‑time ephemeral keys, suitable for “one‑time pad” style
//! - `EphemeralStatic`: ephemeral + static keys for authenticated key exchange
//!
//! All operations are constant‑time and `no_std` compatible.

extern crate alloc;

#[cfg(feature = "std")]
extern crate std;

// Public modules
pub mod error;
pub mod params;
pub mod key;
pub mod kdf;
pub mod agreement;
pub mod key_exchange;
pub mod ephemeral_only;
pub mod ephemeral_static;
mod util; // internal helpers, not part of public API

#[cfg(feature = "async")]
pub mod async_impl;

// Re-export commonly used types from their respective modules
pub use error::AgreementError;
pub use key::{EphemeralKey, PublicKey, StaticKey};
pub use params::{CurveId, CurveParameters};

// Key exchange trait and modes
pub use key_exchange::KeyExchange;
pub use ephemeral_only::EphemeralOnly;
pub use ephemeral_static::EphemeralStatic;

// KDF types and function (domain separation, HKDF)
pub use kdf::{derive_shared_secret, HashFunction, KdfParams, SharedInfo};

// Low-level point computation (advanced users)
pub use agreement::compute_shared_point;

// Re-export `rand_core` traits for convenience
#[doc(no_inline)]
pub use rand_core::{CryptoRng, RngCore};