Struct EcGroupRef
pub struct EcGroupRef(/* private fields */);
Expand description
A borrowed reference to a EcGroup
.
Implementations§
§impl EcGroupRef
impl EcGroupRef
pub fn components_gfp(
&self,
p: &mut BigNumRef,
a: &mut BigNumRef,
b: &mut BigNumRef,
ctx: &mut BigNumContextRef,
) -> Result<(), ErrorStack>
pub fn components_gfp( &self, p: &mut BigNumRef, a: &mut BigNumRef, b: &mut BigNumRef, ctx: &mut BigNumContextRef, ) -> Result<(), ErrorStack>
Places the components of a curve over a prime field in the provided BigNum
s.
The components make up the formula y^2 mod p = x^3 + ax + b mod p
.
OpenSSL documentation available at EC_GROUP_get_curve_GFp
pub fn cofactor(
&self,
cofactor: &mut BigNumRef,
ctx: &mut BigNumContextRef,
) -> Result<(), ErrorStack>
pub fn cofactor( &self, cofactor: &mut BigNumRef, ctx: &mut BigNumContextRef, ) -> Result<(), ErrorStack>
Places the cofactor of the group in the provided BigNum
.
This corresponds to EC_GROUP_get_cofactor
.
pub fn degree(&self) -> u32
pub fn degree(&self) -> u32
Returns the degree of the curve.
This corresponds to EC_GROUP_get_degree
.
pub fn order_bits(&self) -> u32
pub fn order_bits(&self) -> u32
Returns the number of bits in the group order.
This corresponds to EC_GROUP_order_bits
.
pub fn generator(&self) -> &EcPointRef
pub fn generator(&self) -> &EcPointRef
Returns the generator for the given curve as a EcPoint
.
This corresponds to EC_GROUP_get0_generator
.
pub fn order(
&self,
order: &mut BigNumRef,
ctx: &mut BigNumContextRef,
) -> Result<(), ErrorStack>
pub fn order( &self, order: &mut BigNumRef, ctx: &mut BigNumContextRef, ) -> Result<(), ErrorStack>
Places the order of the curve in the provided BigNum
.
This corresponds to EC_GROUP_get_order
.
pub fn set_asn1_flag(&mut self, flag: Asn1Flag)
pub fn set_asn1_flag(&mut self, flag: Asn1Flag)
Sets the flag determining if the group corresponds to a named curve or must be explicitly parameterized.
This defaults to EXPLICIT_CURVE
in OpenSSL 1.0.1 and 1.0.2, but NAMED_CURVE
in OpenSSL
1.1.0.
pub fn curve_name(&self) -> Option<Nid>
pub fn curve_name(&self) -> Option<Nid>
Returns the name of the curve, if a name is associated.
This corresponds to EC_GROUP_get_curve_name
.
Trait Implementations§
§impl AsMut<EcGroupRef> for EcGroup
impl AsMut<EcGroupRef> for EcGroup
§fn as_mut(&mut self) -> &mut EcGroupRef
fn as_mut(&mut self) -> &mut EcGroupRef
§impl AsRef<EcGroupRef> for EcGroup
impl AsRef<EcGroupRef> for EcGroup
§fn as_ref(&self) -> &EcGroupRef
fn as_ref(&self) -> &EcGroupRef
§impl Borrow<EcGroupRef> for EcGroup
impl Borrow<EcGroupRef> for EcGroup
§fn borrow(&self) -> &EcGroupRef
fn borrow(&self) -> &EcGroupRef
§impl BorrowMut<EcGroupRef> for EcGroup
impl BorrowMut<EcGroupRef> for EcGroup
§fn borrow_mut(&mut self) -> &mut EcGroupRef
fn borrow_mut(&mut self) -> &mut EcGroupRef
§impl ForeignTypeRef for EcGroupRef
impl ForeignTypeRef for EcGroupRef
impl Send for EcGroupRef
impl Sync for EcGroupRef
Auto Trait Implementations§
impl Freeze for EcGroupRef
impl !RefUnwindSafe for EcGroupRef
impl Unpin for EcGroupRef
impl UnwindSafe for EcGroupRef
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more