Struct Bn256Point
pub struct Bn256Point {
pub x: Fq,
pub y: Fq,
pub z: Fq,
}Fields§
§x: Fq§y: Fq§z: FqImplementations§
Trait Implementations§
§impl<'b> AddAssign<&'b G1> for G1
impl<'b> AddAssign<&'b G1> for G1
§fn add_assign(&mut self, rhs: &'b G1)
fn add_assign(&mut self, rhs: &'b G1)
+= operation. Read more§impl<'b> AddAssign<&'b G1Affine> for G1
impl<'b> AddAssign<&'b G1Affine> for G1
§fn add_assign(&mut self, rhs: &'b G1Affine)
fn add_assign(&mut self, rhs: &'b G1Affine)
+= operation. Read more§impl AddAssign<G1Affine> for G1
impl AddAssign<G1Affine> for G1
§fn add_assign(&mut self, rhs: G1Affine)
fn add_assign(&mut self, rhs: G1Affine)
+= operation. Read more§impl CofactorGroup for G1
impl CofactorGroup for G1
§type Subgroup = G1
type Subgroup = G1
Self implements PrimeGroup, then Self::Subgroup may be Self.§fn clear_cofactor(&self) -> G1
fn clear_cofactor(&self) -> G1
self to the prime-order subgroup by multiplying this element by some
k-multiple of the cofactor. Read more§fn into_subgroup(self) -> CtOption<<G1 as CofactorGroup>::Subgroup>
fn into_subgroup(self) -> CtOption<<G1 as CofactorGroup>::Subgroup>
self if it is contained in the prime-order subgroup. Read more§fn is_torsion_free(&self) -> Choice
fn is_torsion_free(&self) -> Choice
§fn is_small_order(&self) -> Choice
fn is_small_order(&self) -> Choice
§impl ConditionallySelectable for G1
impl ConditionallySelectable for G1
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
self and other if choice == 1; otherwise,
reassign both unto themselves. Read more§impl ConstantTimeEq for G1
impl ConstantTimeEq for G1
§impl Curve for G1
impl Curve for G1
§type AffineRepr = G1Affine
type AffineRepr = G1Affine
§fn batch_normalize(p: &[G1], q: &mut [<G1 as Curve>::AffineRepr])
fn batch_normalize(p: &[G1], q: &mut [<G1 as Curve>::AffineRepr])
p.len() != q.len().§impl CurveExt for G1
impl CurveExt for G1
§fn endo(&self) -> G1
fn endo(&self) -> G1
§fn jacobian_coordinates(&self) -> (Fq, Fq, Fq)
fn jacobian_coordinates(&self) -> (Fq, Fq, Fq)
§fn hash_to_curve<'a>(domain_prefix: &'a str) -> Box<dyn Fn(&[u8]) -> G1 + 'a>
fn hash_to_curve<'a>(domain_prefix: &'a str) -> Box<dyn Fn(&[u8]) -> G1 + 'a>
domain_prefix. Read more§fn is_on_curve(&self) -> Choice
fn is_on_curve(&self) -> Choice
§impl<'de> Deserialize<'de> for G1
impl<'de> Deserialize<'de> for G1
§fn deserialize<D>(
deserializer: D,
) -> Result<G1, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<G1, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl Group for G1
impl Group for G1
§impl GroupEncoding for G1
impl GroupEncoding for G1
§impl<'b> MulAssign<&'b Fr> for G1
impl<'b> MulAssign<&'b Fr> for G1
§fn mul_assign(&mut self, rhs: &'b Fr)
fn mul_assign(&mut self, rhs: &'b Fr)
*= operation. Read moreSource§impl PrimeOrderCurve for G1
impl PrimeOrderCurve for G1
Source§fn to_bytes_uncompressed(&self) -> Vec<u8> ⓘ
fn to_bytes_uncompressed(&self) -> Vec<u8> ⓘ
The bytestring representation of the BN256 curve is a [u8; 65] with
the following semantic representation:
- The first
u8byte represents whether the point is a point at infinity (in affine coordinates). 1 if it is at infinity, 0 otherwise. - The next 32
u8bytes represent the x-coordinate of the point in little endian. - The next 32
u8bytes represent the y-coordinate of the point in little endian.
Source§fn to_bytes_compressed(&self) -> Vec<u8> ⓘ
fn to_bytes_compressed(&self) -> Vec<u8> ⓘ
The bytestring representation of the BN256 curve is a [u8; 34] with
the following semantic representation:
- The first
u8byte represents whether the point is a point at infinity (in affine coordinates). - The next 32
u8bytes represent the x-coordinate of the point in little endian. - The final
u8byte represents the sign of the y-coordinate of the point.
Source§fn from_bytes_uncompressed(bytes: &[u8]) -> Self
fn from_bytes_uncompressed(bytes: &[u8]) -> Self
will return the elliptic curve point corresponding to an array of bytes that represent an uncompressed point. we represent it as a a normalized projective curve point (ie, the x and y coordinates are directly the affine coordinates) so the z coordinate is always 1.
Source§fn from_bytes_compressed(bytes: &[u8]) -> Self
fn from_bytes_compressed(bytes: &[u8]) -> Self
will return the elliptic curve point corresponding to an array of bytes that represent a compressed point. we represent it as a a normalized projective curve point (ie, the x and y coordinates are directly the affine coordinates) so the z coordinate is always 1.
Source§fn from_xy(x: Self::Base, y: Self::Base) -> Self
fn from_xy(x: Self::Base, y: Self::Base) -> Self
Returns an elliptic curve point from the x and y coordinates.
Source§fn scalar_mult_unsigned_integer<T: Unsigned + Zero + ToBytes>(
&self,
scalar: &T,
) -> Self
fn scalar_mult_unsigned_integer<T: Unsigned + Zero + ToBytes>( &self, scalar: &T, ) -> Self
Simple double-and-add method for scalar multiplication, optimized for when the scalar is representable as an unsigned integer (u8, u16, u32, u64, or u128).
Source§const UNCOMPRESSED_CURVE_POINT_BYTEWIDTH: usize = 65
const UNCOMPRESSED_CURVE_POINT_BYTEWIDTH: usize = 65
const COMPRESSED_CURVE_POINT_BYTEWIDTH: usize = 34
const SCALAR_ELEM_BYTEWIDTH: usize = 32
Source§fn projective_coordinates(&self) -> (Self::Base, Self::Base, Self::Base)
fn projective_coordinates(&self) -> (Self::Base, Self::Base, Self::Base)
Source§fn affine_coordinates(&self) -> Option<(Self::Base, Self::Base)>
fn affine_coordinates(&self) -> Option<(Self::Base, Self::Base)>
Source§fn from_x_and_sign_y(x: Self::Base, y_sign: u8) -> Self
fn from_x_and_sign_y(x: Self::Base, y_sign: u8) -> Self
§impl SerdeObject for G1
impl SerdeObject for G1
§fn from_raw_bytes_unchecked(bytes: &[u8]) -> G1
fn from_raw_bytes_unchecked(bytes: &[u8]) -> G1
fn from_raw_bytes(bytes: &[u8]) -> Option<G1>
fn to_raw_bytes(&self) -> Vec<u8> ⓘ
§fn read_raw_unchecked<R>(reader: &mut R) -> G1where
R: Read,
fn read_raw_unchecked<R>(reader: &mut R) -> G1where
R: Read,
fn read_raw<R>(reader: &mut R) -> Result<G1, Error>where
R: Read,
fn write_raw<W>(&self, writer: &mut W) -> Result<(), Error>where
W: Write,
§impl Serialize for G1
impl Serialize for G1
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
§impl<'b> SubAssign<&'b G1> for G1
impl<'b> SubAssign<&'b G1> for G1
§fn sub_assign(&mut self, rhs: &'b G1)
fn sub_assign(&mut self, rhs: &'b G1)
-= operation. Read more§impl<'b> SubAssign<&'b G1Affine> for G1
impl<'b> SubAssign<&'b G1Affine> for G1
§fn sub_assign(&mut self, rhs: &'b G1Affine)
fn sub_assign(&mut self, rhs: &'b G1Affine)
-= operation. Read more§impl SubAssign<G1Affine> for G1
impl SubAssign<G1Affine> for G1
§fn sub_assign(&mut self, rhs: G1Affine)
fn sub_assign(&mut self, rhs: G1Affine)
-= operation. Read moreimpl Copy for G1
impl Eq for G1
impl PrimeGroup for G1
Auto Trait Implementations§
impl Freeze for G1
impl RefUnwindSafe for G1
impl Send for G1
impl Sync for G1
impl Unpin for G1
impl UnwindSafe for G1
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ConditionallyNegatable for T
impl<T> ConditionallyNegatable for T
Source§fn conditional_negate(&mut self, choice: Choice)
fn conditional_negate(&mut self, choice: Choice)
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.