Struct EcPointRef
pub struct EcPointRef(/* private fields */);
Expand description
A borrowed reference to a EcPoint
.
Implementations§
§impl EcPointRef
impl EcPointRef
pub fn add(
&mut self,
group: &EcGroupRef,
a: &EcPointRef,
b: &EcPointRef,
ctx: &mut BigNumContextRef,
) -> Result<(), ErrorStack>
pub fn add( &mut self, group: &EcGroupRef, a: &EcPointRef, b: &EcPointRef, ctx: &mut BigNumContextRef, ) -> Result<(), ErrorStack>
Computes a + b
, storing the result in self
.
This corresponds to EC_POINT_add
.
pub fn mul(
&mut self,
group: &EcGroupRef,
q: &EcPointRef,
m: &BigNumRef,
ctx: &BigNumContextRef,
) -> Result<(), ErrorStack>
pub fn mul( &mut self, group: &EcGroupRef, q: &EcPointRef, m: &BigNumRef, ctx: &BigNumContextRef, ) -> Result<(), ErrorStack>
Computes q * m
, storing the result in self
.
This corresponds to EC_POINT_mul
.
pub fn mul_generator(
&mut self,
group: &EcGroupRef,
n: &BigNumRef,
ctx: &BigNumContextRef,
) -> Result<(), ErrorStack>
pub fn mul_generator( &mut self, group: &EcGroupRef, n: &BigNumRef, ctx: &BigNumContextRef, ) -> Result<(), ErrorStack>
Computes generator * n
, storing the result in self
.
pub fn mul_full(
&mut self,
group: &EcGroupRef,
n: &BigNumRef,
q: &EcPointRef,
m: &BigNumRef,
ctx: &mut BigNumContextRef,
) -> Result<(), ErrorStack>
pub fn mul_full( &mut self, group: &EcGroupRef, n: &BigNumRef, q: &EcPointRef, m: &BigNumRef, ctx: &mut BigNumContextRef, ) -> Result<(), ErrorStack>
Computes generator * n + q * m
, storing the result in self
.
pub fn invert(
&mut self,
group: &EcGroupRef,
ctx: &BigNumContextRef,
) -> Result<(), ErrorStack>
pub fn invert( &mut self, group: &EcGroupRef, ctx: &BigNumContextRef, ) -> Result<(), ErrorStack>
Inverts self
.
This corresponds to EC_POINT_invert
.
pub fn to_bytes(
&self,
group: &EcGroupRef,
form: PointConversionForm,
ctx: &mut BigNumContextRef,
) -> Result<Vec<u8>, ErrorStack>
pub fn to_bytes( &self, group: &EcGroupRef, form: PointConversionForm, ctx: &mut BigNumContextRef, ) -> Result<Vec<u8>, ErrorStack>
Serializes the point to a binary representation.
This corresponds to EC_POINT_point2oct
.
pub fn to_owned(&self, group: &EcGroupRef) -> Result<EcPoint, ErrorStack>
pub fn to_owned(&self, group: &EcGroupRef) -> Result<EcPoint, ErrorStack>
Creates a new point on the specified curve with the same value.
This corresponds to EC_POINT_dup
.
pub fn eq(
&self,
group: &EcGroupRef,
other: &EcPointRef,
ctx: &mut BigNumContextRef,
) -> Result<bool, ErrorStack>
pub fn eq( &self, group: &EcGroupRef, other: &EcPointRef, ctx: &mut BigNumContextRef, ) -> Result<bool, ErrorStack>
Determines if this point is equal to another.
OpenSSL doucmentation at EC_POINT_cmp
pub fn affine_coordinates_gfp(
&self,
group: &EcGroupRef,
x: &mut BigNumRef,
y: &mut BigNumRef,
ctx: &mut BigNumContextRef,
) -> Result<(), ErrorStack>
pub fn affine_coordinates_gfp( &self, group: &EcGroupRef, x: &mut BigNumRef, y: &mut BigNumRef, ctx: &mut BigNumContextRef, ) -> Result<(), ErrorStack>
Place affine coordinates of a curve over a prime field in the provided
x
and y
BigNum
s
This corresponds to EC_POINT_get_affine_coordinates_GFp
.
Trait Implementations§
§impl AsMut<EcPointRef> for EcPoint
impl AsMut<EcPointRef> for EcPoint
§fn as_mut(&mut self) -> &mut EcPointRef
fn as_mut(&mut self) -> &mut EcPointRef
§impl AsRef<EcPointRef> for EcPoint
impl AsRef<EcPointRef> for EcPoint
§fn as_ref(&self) -> &EcPointRef
fn as_ref(&self) -> &EcPointRef
§impl Borrow<EcPointRef> for EcPoint
impl Borrow<EcPointRef> for EcPoint
§fn borrow(&self) -> &EcPointRef
fn borrow(&self) -> &EcPointRef
§impl BorrowMut<EcPointRef> for EcPoint
impl BorrowMut<EcPointRef> for EcPoint
§fn borrow_mut(&mut self) -> &mut EcPointRef
fn borrow_mut(&mut self) -> &mut EcPointRef
§impl ForeignTypeRef for EcPointRef
impl ForeignTypeRef for EcPointRef
impl Send for EcPointRef
impl Sync for EcPointRef
Auto Trait Implementations§
impl Freeze for EcPointRef
impl !RefUnwindSafe for EcPointRef
impl Unpin for EcPointRef
impl UnwindSafe for EcPointRef
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