Struct sp1_lib::bn254::Bn254AffinePoint
source · #[repr(align(4))]pub struct Bn254AffinePoint(pub [u32; 16]);
Expand description
An affine point on the Bn254 curve.
Tuple Fields§
§0: [u32; 16]
Trait Implementations§
source§impl AffinePoint<N> for Bn254AffinePoint
impl AffinePoint<N> for Bn254AffinePoint
source§const GENERATOR: [u32; 16] = _
const GENERATOR: [u32; 16] = _
The generator has been taken from py_pairing python library by the Ethereum Foundation:
https://github.com/ethereum/py_pairing/blob/5f609da/py_ecc/bn128/bn128_field_elements.py
source§fn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Adds the given
AffinePoint
to self
.source§fn from(x: &[u8], y: &[u8]) -> Self
fn from(x: &[u8], y: &[u8]) -> Self
Creates a new
AffinePoint
from the given x and y coordinates. Read moresource§fn from_le_bytes(bytes: &[u8]) -> Self
fn from_le_bytes(bytes: &[u8]) -> Self
Creates a new
AffinePoint
from the given bytes in little endian.source§fn to_le_bytes(&self) -> Vec<u8>
fn to_le_bytes(&self) -> Vec<u8>
Creates a new
AffinePoint
from the given bytes in big endian.source§fn mul_assign(&mut self, scalar: &[u32]) -> Result<(), MulAssignError>
fn mul_assign(&mut self, scalar: &[u32]) -> Result<(), MulAssignError>
Multiplies
self
by the given scalar.source§impl Clone for Bn254AffinePoint
impl Clone for Bn254AffinePoint
source§fn clone(&self) -> Bn254AffinePoint
fn clone(&self) -> Bn254AffinePoint
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 moreimpl Copy for Bn254AffinePoint
Auto Trait Implementations§
impl Freeze for Bn254AffinePoint
impl RefUnwindSafe for Bn254AffinePoint
impl Send for Bn254AffinePoint
impl Sync for Bn254AffinePoint
impl Unpin for Bn254AffinePoint
impl UnwindSafe for Bn254AffinePoint
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§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
)