#[cfg(feature = "curve25519")]
pub mod curve25519;
#[cfg(feature = "ed25519")]
pub mod ed25519;
pub mod elliptic_curve;
#[cfg(feature = "ristretto255")]
pub mod ristretto255;
use generic_array::{ArrayLength, GenericArray};
use rand::{CryptoRng, RngCore};
use zeroize::ZeroizeOnDrop;
use crate::errors::{InternalError, ProtocolError};
const STR_OPAQUE_DERIVE_AUTH_KEY_PAIR: [u8; 33] = *b"OPAQUE-DeriveDiffieHellmanKeyPair";
pub trait Group {
type Pk: Clone;
type PkLen: ArrayLength<u8>;
type Sk: Clone + ZeroizeOnDrop;
type SkLen: ArrayLength<u8>;
fn serialize_pk(pk: &Self::Pk) -> GenericArray<u8, Self::PkLen>;
fn deserialize_take_pk(bytes: &mut &[u8]) -> Result<Self::Pk, ProtocolError>;
fn random_sk<R: RngCore + CryptoRng>(rng: &mut R) -> Self::Sk;
fn derive_scalar(seed: GenericArray<u8, Self::SkLen>) -> Result<Self::Sk, InternalError>;
fn public_key(sk: &Self::Sk) -> Self::Pk;
fn serialize_sk(sk: &Self::Sk) -> GenericArray<u8, Self::SkLen>;
fn deserialize_take_sk(bytes: &mut &[u8]) -> Result<Self::Sk, ProtocolError>;
}