use crate::error::PakeError;
use alloc::vec::Vec;
use rand_core::CryptoRng;
use zeroize::Zeroize;
pub trait CpaceGroup: Clone + PartialEq {
type Scalar: Clone + Zeroize;
fn scalar_mul(&self, scalar: &Self::Scalar) -> Self;
fn is_identity(&self) -> bool;
fn to_bytes(&self) -> Vec<u8>;
fn from_bytes(bytes: &[u8]) -> Result<Self, PakeError>;
fn from_uniform_bytes(bytes: &[u8]) -> Result<Self, PakeError>;
fn random_scalar(rng: &mut impl CryptoRng) -> Self::Scalar;
fn add(&self, other: &Self) -> Self;
fn negate(&self) -> Self;
fn basepoint_mul(scalar: &Self::Scalar) -> Self;
fn scalar_from_wide_bytes(bytes: &[u8]) -> Result<Self::Scalar, PakeError>;
fn scalar_to_bytes(scalar: &Self::Scalar) -> Vec<u8>;
}