Skip to main content

EccBackendOperation

Struct EccBackendOperation 

Source
pub struct EccBackendOperation<'op, O: EccOperation> { /* private fields */ }
Expand description

An ECC operation that can be enqueued on the work queue.

Implementations§

Source§

impl<'op, O: EccOperation> EccBackendOperation<'op, O>

Source

pub fn with_scalar_result( self, out: &'op mut [u8], ) -> Result<Self, OperationError>

Designate a buffer for the scalar result of the operation.

Once the operation is processed, the result can be retrieved from the designated buffer.

§Errors

OperationError::ParameterLengthMismatch when out is not the correct size.

Source

pub fn with_affine_point_result( self, px: &'op mut [u8], py: &'op mut [u8], ) -> Result<Self, OperationError>

Designate buffers for the affine point result of the operation.

Once the operation is processed, the result can be retrieved from the designated buffers.

§Errors

OperationError::ParameterLengthMismatch when x or y are not the correct size.

Source

pub fn with_jacobian_point_result( self, qx: &'op mut [u8], qy: &'op mut [u8], qz: &'op mut [u8], ) -> Result<Self, OperationError>

Designate buffers for the Jacobian point result of the operation.

Once the operation is processed, the result can be retrieved from the designated buffers.

§Errors

OperationError::ParameterLengthMismatch when x, y, or z are not the correct size.

Source

pub fn point_on_curve(&self) -> bool

Returns whether the input point is on the curve.

The operation must be processed before this method returns a meaningful value.

Source

pub fn process(&mut self) -> EccHandle<'_>

Starts processing the operation.

The returned EccHandle must be polled to completion before the operation is considered complete.

Auto Trait Implementations§

§

impl<'op, O> !Send for EccBackendOperation<'op, O>

§

impl<'op, O> !Sync for EccBackendOperation<'op, O>

§

impl<'op, O> !UnwindSafe for EccBackendOperation<'op, O>

§

impl<'op, O> Freeze for EccBackendOperation<'op, O>
where PhantomData<(&'op mut (), O)>: Freeze,

§

impl<'op, O> RefUnwindSafe for EccBackendOperation<'op, O>
where PhantomData<(&'op mut (), O)>: RefUnwindSafe,

§

impl<'op, O> Unpin for EccBackendOperation<'op, O>
where PhantomData<(&'op mut (), O)>: Unpin,

§

impl<'op, O> UnsafeUnpin for EccBackendOperation<'op, O>
where PhantomData<(&'op mut (), O)>: UnsafeUnpin,

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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> Same for T

Source§

type Output = T

Should always be Self
§

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

§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.