#[repr(align(4))]pub struct Bls12381Point(pub WeierstrassPoint<N>);
Expand description
A point on the BLS12-381 curve.
Tuple Fields§
§0: WeierstrassPoint<N>
Trait Implementations§
Source§impl AffinePoint<N> for Bls12381Point
impl AffinePoint<N> for Bls12381Point
Source§const GENERATOR: [u32; 24] = _
const GENERATOR: [u32; 24] = _
The generator was taken from “py_ecc” python library by the Ethereum Foundation:
https://github.com/ethereum/py_ecc/blob/7b9e1b3/py_ecc/bls12_381/bls12_381_curve.py#L38-L45
Source§fn limbs_mut(&mut self) -> &mut [u32; 24]
fn limbs_mut(&mut self) -> &mut [u32; 24]
Returns a mutable reference to the limbs. If the point is the infinity point, this will panic.
Source§fn complete_add_assign(&mut self, other: &Self)
fn complete_add_assign(&mut self, other: &Self)
Adds the given
AffinePoint
to self
. Can be optionally overridden to use a different
implementation of addition in multi-scalar multiplication, which is used in secp256k1 recovery.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 Bls12381Point
impl Clone for Bls12381Point
Source§fn clone(&self) -> Bls12381Point
fn clone(&self) -> Bls12381Point
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 WeierstrassAffinePoint<N> for Bls12381Point
impl WeierstrassAffinePoint<N> for Bls12381Point
Source§fn infinity() -> Self
fn infinity() -> Self
The infinity point representation of the Weierstrass curve. Typically an enum variant.
Source§fn is_infinity(&self) -> bool
fn is_infinity(&self) -> bool
Returns true if the point is the infinity point.
Source§fn weierstrass_add_assign(&mut self, other: &Self)
fn weierstrass_add_assign(&mut self, other: &Self)
Performs the complete addition of two
AffinePoint
’s on a Weierstrass curve.
For an addition of two points P1 and P2, the cases are:
1. P1 is infinity
2. P2 is infinity
3. P1 equals P2
4. P1 is the negation of P2
5. Default addition. Read moreimpl Copy for Bls12381Point
Auto Trait Implementations§
impl Freeze for Bls12381Point
impl RefUnwindSafe for Bls12381Point
impl Send for Bls12381Point
impl Sync for Bls12381Point
impl Unpin for Bls12381Point
impl UnwindSafe for Bls12381Point
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
)