Struct sp1_lib::utils::AffinePoint
source · pub struct AffinePoint<C: CurveOperations<NUM_WORDS>, const NUM_WORDS: usize> { /* private fields */ }Implementations§
source§impl<C: CurveOperations<NUM_WORDS> + Copy, const NUM_WORDS: usize> AffinePoint<C, NUM_WORDS>
impl<C: CurveOperations<NUM_WORDS> + Copy, const NUM_WORDS: usize> AffinePoint<C, NUM_WORDS>
pub const fn generator_in_affine() -> Self
pub const fn new(limbs: [u32; NUM_WORDS]) -> Self
sourcepub fn from(x_bytes: &[u8], y_bytes: &[u8]) -> Self
pub fn from(x_bytes: &[u8], y_bytes: &[u8]) -> Self
x_bytes and y_bytes are the concatenated little endian representations of the x and y coordinates. The length of x_bytes and y_bytes must each be NUM_WORDS * 2.
pub fn add_assign(&mut self, other: &AffinePoint<C, NUM_WORDS>)
pub fn double(&mut self)
pub fn mul_assign(&mut self, scalar: &[u32]) -> Result<(), MulAssignError>
pub fn from_le_bytes(limbs: &[u8]) -> Self
pub fn to_le_bytes(&self) -> Vec<u8>
Trait Implementations§
source§impl<C: Clone + CurveOperations<NUM_WORDS>, const NUM_WORDS: usize> Clone for AffinePoint<C, NUM_WORDS>
impl<C: Clone + CurveOperations<NUM_WORDS>, const NUM_WORDS: usize> Clone for AffinePoint<C, NUM_WORDS>
source§fn clone(&self) -> AffinePoint<C, NUM_WORDS>
fn clone(&self) -> AffinePoint<C, NUM_WORDS>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<C: Debug + CurveOperations<NUM_WORDS>, const NUM_WORDS: usize> Debug for AffinePoint<C, NUM_WORDS>
impl<C: Debug + CurveOperations<NUM_WORDS>, const NUM_WORDS: usize> Debug for AffinePoint<C, NUM_WORDS>
source§impl<C: PartialEq + CurveOperations<NUM_WORDS>, const NUM_WORDS: usize> PartialEq for AffinePoint<C, NUM_WORDS>
impl<C: PartialEq + CurveOperations<NUM_WORDS>, const NUM_WORDS: usize> PartialEq for AffinePoint<C, NUM_WORDS>
source§fn eq(&self, other: &AffinePoint<C, NUM_WORDS>) -> bool
fn eq(&self, other: &AffinePoint<C, NUM_WORDS>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<C: Copy + CurveOperations<NUM_WORDS>, const NUM_WORDS: usize> Copy for AffinePoint<C, NUM_WORDS>
impl<C: Eq + CurveOperations<NUM_WORDS>, const NUM_WORDS: usize> Eq for AffinePoint<C, NUM_WORDS>
impl<C: CurveOperations<NUM_WORDS>, const NUM_WORDS: usize> StructuralPartialEq for AffinePoint<C, NUM_WORDS>
Auto Trait Implementations§
impl<C, const NUM_WORDS: usize> Freeze for AffinePoint<C, NUM_WORDS>
impl<C, const NUM_WORDS: usize> RefUnwindSafe for AffinePoint<C, NUM_WORDS>where
C: RefUnwindSafe,
impl<C, const NUM_WORDS: usize> Send for AffinePoint<C, NUM_WORDS>where
C: Send,
impl<C, const NUM_WORDS: usize> Sync for AffinePoint<C, NUM_WORDS>where
C: Sync,
impl<C, const NUM_WORDS: usize> Unpin for AffinePoint<C, NUM_WORDS>where
C: Unpin,
impl<C, const NUM_WORDS: usize> UnwindSafe for AffinePoint<C, NUM_WORDS>where
C: UnwindSafe,
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)