EcGroup

Struct EcGroup 

Source
pub struct EcGroup { /* private fields */ }
Expand description

An elliptic curve group

Implementations§

Source§

impl EcGroup

Source

pub fn supports_application_specific_groups() -> Result<bool>

Does this build configuration support application specific groups

Source

pub fn supports_named_group(name: &str) -> Result<bool>

Check if a specific named group is supported

Source

pub fn from_name(name: &str) -> Result<Self>

Create a group from a named/well known set of parameters

Source

pub fn from_oid(oid: &OID) -> Result<Self>

Create a group from a named/well known set of parameters

Source

pub fn from_pem(pem: &str) -> Result<Self>

Parse the PEM encoding of an EC group

Source

pub fn from_der(ber: &[u8]) -> Result<Self>

Parse the DER encoding of an EC group

Source

pub fn from_params( oid: &OID, p: &MPI, a: &MPI, b: &MPI, g_x: &MPI, g_y: &MPI, order: &MPI, ) -> Result<Self>

Initial an EcGroup from a custom set of parameters

§Warning

Do not use this unless you know what you are doing

Source

pub fn der(&self) -> Result<Vec<u8>>

Return the DER encoding of the group

Source

pub fn pem(&self) -> Result<String>

Return the PEM encoding of the group

Source

pub fn p(&self) -> Result<MPI>

Return the groups parameter p

Source

pub fn a(&self) -> Result<MPI>

Return the groups parameter a

Source

pub fn b(&self) -> Result<MPI>

Return the groups parameter b

Source

pub fn order(&self) -> Result<MPI>

Return the groups order

Source

pub fn g_x(&self) -> Result<MPI>

Return the groups generator x coordinate

Source

pub fn g_y(&self) -> Result<MPI>

Return the groups generator y coordinate

Source

pub fn oid(&self) -> Result<OID>

Return the groups object identifier

Source

pub fn equals(&self, other: &Self) -> Result<bool>

Check two groups for equality

Trait Implementations§

Source§

impl Debug for EcGroup

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for EcGroup

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl PartialEq for EcGroup

Available on botan_ffi_20250506 only.
Source§

fn eq(&self, other: &EcGroup) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for EcGroup

Available on botan_ffi_20250506 only.
Source§

impl Send for EcGroup

Available on botan_ffi_20250506 only.
Source§

impl Sync for EcGroup

Available on botan_ffi_20250506 only.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.