Struct openssl::ec::EcPoint [−][src]
Represents a point on the curve
OpenSSL documentation at EC_POINT_new
Implementations
impl EcPoint
[src]
pub fn new(group: &EcGroupRef) -> Result<EcPoint, ErrorStack>
[src]
Creates a new point on the specified curve.
OpenSSL documentation at EC_POINT_new
pub fn from_bytes(
group: &EcGroupRef,
buf: &[u8],
ctx: &mut BigNumContextRef
) -> Result<EcPoint, ErrorStack>
[src]
group: &EcGroupRef,
buf: &[u8],
ctx: &mut BigNumContextRef
) -> Result<EcPoint, ErrorStack>
Creates point from a binary representation
OpenSSL documentation at EC_POINT_oct2point
Methods from Deref<Target = EcPointRef>
pub fn add(
&mut self,
group: &EcGroupRef,
a: &EcPointRef,
b: &EcPointRef,
ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>
[src]
&mut self,
group: &EcGroupRef,
a: &EcPointRef,
b: &EcPointRef,
ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>
Computes a + b
, storing the result in self
.
OpenSSL documentation at EC_POINT_add
pub fn mul(
&mut self,
group: &EcGroupRef,
q: &EcPointRef,
m: &BigNumRef,
ctx: &BigNumContextRef
) -> Result<(), ErrorStack>
[src]
&mut self,
group: &EcGroupRef,
q: &EcPointRef,
m: &BigNumRef,
ctx: &BigNumContextRef
) -> Result<(), ErrorStack>
Computes q * m
, storing the result in self
.
OpenSSL documentation at EC_POINT_mul
pub fn mul_generator(
&mut self,
group: &EcGroupRef,
n: &BigNumRef,
ctx: &BigNumContextRef
) -> Result<(), ErrorStack>
[src]
&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>
[src]
&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>
[src]
&mut self,
group: &EcGroupRef,
ctx: &BigNumContextRef
) -> Result<(), ErrorStack>
Inverts self
.
OpenSSL documentation at EC_POINT_invert
pub fn to_bytes(
&self,
group: &EcGroupRef,
form: PointConversionForm,
ctx: &mut BigNumContextRef
) -> Result<Vec<u8>, ErrorStack>
[src]
&self,
group: &EcGroupRef,
form: PointConversionForm,
ctx: &mut BigNumContextRef
) -> Result<Vec<u8>, ErrorStack>
Serializes the point to a binary representation.
OpenSSL documentation at EC_POINT_point2oct
pub fn to_owned(&self, group: &EcGroupRef) -> Result<EcPoint, ErrorStack>
[src]
Creates a new point on the specified curve with the same value.
OpenSSL documentation at EC_POINT_dup
pub fn eq(
&self,
group: &EcGroupRef,
other: &EcPointRef,
ctx: &mut BigNumContextRef
) -> Result<bool, ErrorStack>
[src]
&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>
[src]
&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
OpenSSL documentation at EC_POINT_get_affine_coordinates_GFp
pub fn affine_coordinates_gf2m(
&self,
group: &EcGroupRef,
x: &mut BigNumRef,
y: &mut BigNumRef,
ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>
[src]
&self,
group: &EcGroupRef,
x: &mut BigNumRef,
y: &mut BigNumRef,
ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>
Place affine coordinates of a curve over a binary field in the provided
x
and y
BigNum
s
OpenSSL documentation at EC_POINT_get_affine_coordinates_GF2m
pub fn is_infinity(&self, group: &EcGroupRef) -> bool
[src]
Checks if point is infinity
OpenSSL documentation at EC_POINT_is_at_infinity
pub fn is_on_curve(
&self,
group: &EcGroupRef,
ctx: &mut BigNumContextRef
) -> Result<bool, ErrorStack>
[src]
&self,
group: &EcGroupRef,
ctx: &mut BigNumContextRef
) -> Result<bool, ErrorStack>
Checks if point is on a given curve
OpenSSL documentation at EC_POINT_is_on_curve
Trait Implementations
impl AsRef<EcPointRef> for EcPoint
[src]
fn as_ref(&self) -> &EcPointRef
[src]
impl Borrow<EcPointRef> for EcPoint
[src]
fn borrow(&self) -> &EcPointRef
[src]
impl Deref for EcPoint
[src]
impl DerefMut for EcPoint
[src]
fn deref_mut(&mut self) -> &mut EcPointRef
[src]
impl Drop for EcPoint
[src]
impl ForeignType for EcPoint
[src]
type CType = EC_POINT
The raw C type.
type Ref = EcPointRef
The type representing a reference to this type.
unsafe fn from_ptr(ptr: *mut EC_POINT) -> EcPoint
[src]
fn as_ptr(&self) -> *mut EC_POINT
[src]
impl Send for EcPoint
[src]
impl Sync for EcPoint
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,