Struct openssl::ec::EcPoint [−]
pub struct EcPoint(_);
Represents a point on the curve
OpenSSL documentation at EC_POINT_new
Methods
impl EcPoint
[src]
impl EcPoint
pub fn new(group: &EcGroupRef) -> Result<EcPoint, ErrorStack>
[src]
pub fn new(group: &EcGroupRef) -> Result<EcPoint, ErrorStack>
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]
pub fn from_bytes(
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]
pub fn add(
&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]
pub fn mul(
&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]
pub fn mul_generator(
&mut self,
group: &EcGroupRef,
n: &BigNumRef,
ctx: &BigNumContextRef
) -> Result<(), ErrorStack>
Computes generator * n
, storing the result ing self
.
pub fn mul_full(
&mut self,
group: &EcGroupRef,
n: &BigNumRef,
q: &EcPointRef,
m: &BigNumRef,
ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>
[src]
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>
[src]
pub fn invert(
&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]
pub fn to_bytes(
&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 eq(
&self,
group: &EcGroupRef,
other: &EcPointRef,
ctx: &mut BigNumContextRef
) -> Result<bool, ErrorStack>
[src]
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>
[src]
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
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]
pub fn affine_coordinates_gf2m(
&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
Trait Implementations
impl ForeignType for EcPoint
impl ForeignType for EcPoint
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
unsafe fn from_ptr(ptr: *mut EC_POINT) -> EcPoint
Constructs an instance of this type from its raw type.
fn as_ptr(&self) -> *mut EC_POINT
fn as_ptr(&self) -> *mut EC_POINT
Returns a raw pointer to the wrapped value.
impl Drop for EcPoint
impl Drop for EcPoint
impl Deref for EcPoint
impl Deref for EcPoint
type Target = EcPointRef
The resulting type after dereferencing.
fn deref(&self) -> &EcPointRef
fn deref(&self) -> &EcPointRef
Dereferences the value.
impl DerefMut for EcPoint
impl DerefMut for EcPoint
fn deref_mut(&mut self) -> &mut EcPointRef
fn deref_mut(&mut self) -> &mut EcPointRef
Mutably dereferences the value.
impl Borrow<EcPointRef> for EcPoint
impl Borrow<EcPointRef> for EcPoint
fn borrow(&self) -> &EcPointRef
fn borrow(&self) -> &EcPointRef
Immutably borrows from an owned value. Read more
impl AsRef<EcPointRef> for EcPoint
impl AsRef<EcPointRef> for EcPoint
fn as_ref(&self) -> &EcPointRef
fn as_ref(&self) -> &EcPointRef
Performs the conversion.
impl Send for EcPoint
[src]
impl Send for EcPoint
impl Sync for EcPoint
[src]
impl Sync for EcPoint