pub struct EcGroup { /* private fields */ }
Implementations§
source§impl EcGroup
impl EcGroup
pub fn new(group: EcGroupId) -> Result<EcGroup>
sourcepub fn from_parameters(
p: Mpi,
a: Mpi,
b: Mpi,
g_x: Mpi,
g_y: Mpi,
order: Mpi
) -> Result<EcGroup>
pub fn from_parameters( p: Mpi, a: Mpi, b: Mpi, g_x: Mpi, g_y: Mpi, order: Mpi ) -> Result<EcGroup>
Initialize an EcGroup with custom group parameters.
HAZMAT: This function DOES NOT perform a full check on parameters against all known attacks. The caller MUST make sure that parameters are trusted. Failing to comply with this requirement may result in the use of INSECURE curves. Prefer EcGroup::new with known curves listed in EcGroupId.
pub fn group_id(&self) -> Result<EcGroupId>
pub fn p(&self) -> Result<Mpi>
pub fn a(&self) -> Result<Mpi>
pub fn b(&self) -> Result<Mpi>
pub fn order(&self) -> Result<Mpi>
pub fn cofactor(&self) -> Result<u32>
pub fn generator(&self) -> Result<EcPoint>
pub fn contains_point(&self, point: &EcPoint) -> Result<bool>
Trait Implementations§
source§impl PartialEq for EcGroup
impl PartialEq for EcGroup
impl Eq for EcGroup
impl Send for EcGroup
Auto Trait Implementations§
impl RefUnwindSafe for EcGroup
impl !Sync for EcGroup
impl Unpin for EcGroup
impl UnwindSafe for EcGroup
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more