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, KeyLengthMismatch>

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

Returns an error if out is not the correct size.

Source

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

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

Returns an error if 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, KeyLengthMismatch>

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

Returns an error if x, y, or z are not the correct size.

Source

pub fn point_on_curve(&self) -> bool

Returns true if 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> Freeze for EccBackendOperation<'op, O>

§

impl<'op, O> RefUnwindSafe for EccBackendOperation<'op, O>
where O: RefUnwindSafe,

§

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

§

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

§

impl<'op, O> Unpin for EccBackendOperation<'op, O>
where O: Unpin,

§

impl<'op, O> UnsafeUnpin for EccBackendOperation<'op, O>

§

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

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.