Struct dusk_jubjub::JubJubExtended [−][src]
pub struct JubJubExtended { /* fields omitted */ }
This represents an extended point (X, Y, Z, T1, T2)
with Z
nonzero, corresponding to the affine point
(X/Z, Y/Z)
. We always have T1 * T2 = XY/Z
.
You can do the following things with a point in this form:
- Convert it into a point in the affine form.
- Add it to an
JubJubExtended
,AffineNielsPoint
orExtendedNielsPoint
. - Double it using
double()
. - Compare it with another extended point using
PartialEq
orct_eq()
.
Implementations
impl JubJubExtended
[src]
impl JubJubExtended
[src]pub fn get_x(&self) -> BlsScalar
[src]
Returns the x
-coordinate of this point.
pub fn get_y(&self) -> BlsScalar
[src]
Returns the y
-coordinate of this point.
pub fn get_z(&self) -> BlsScalar
[src]
Returns the z
-coordinate of this point.
pub fn get_t1(&self) -> BlsScalar
[src]
Returns the t1
-coordinate of this point.
pub fn get_t2(&self) -> BlsScalar
[src]
Returns the t2
-coordinate of this point.
pub const fn identity() -> Self
[src]
Constructs an extended point from the neutral element (0, 1)
.
pub fn is_identity(&self) -> Choice
[src]
Determines if this point is the identity.
pub fn is_small_order(&self) -> Choice
[src]
Determines if this point is of small order.
pub fn is_torsion_free(&self) -> Choice
[src]
Determines if this point is torsion free and so is contained in the prime order subgroup.
pub fn is_prime_order(&self) -> Choice
[src]
Determines if this point is prime order, or in other words that
the smallest scalar multiplied by this point that produces the
identity is r
. This is equivalent to checking that the point
is both torsion free and not the identity.
pub fn mul_by_cofactor(&self) -> JubJubExtended
[src]
Multiplies this element by the cofactor 8
.
pub fn to_niels(&self) -> ExtendedNielsPoint
[src]
Performs a pre-processing step that produces an ExtendedNielsPoint
for use in multiple additions.
pub fn to_hash_inputs(&self) -> [BlsScalar; 2]
[src]
Returns two scalars suitable for hashing that represent the Extended Point.
pub fn double(&self) -> JubJubExtended
[src]
Computes the doubling of a point more efficiently than a point can be added to itself.
Trait Implementations
impl<'a, 'b> Add<&'b AffineNielsPoint> for &'a JubJubExtended
[src]
impl<'a, 'b> Add<&'b AffineNielsPoint> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, other: &'b AffineNielsPoint) -> JubJubExtended
[src]
impl<'b> Add<&'b AffineNielsPoint> for JubJubExtended
[src]
impl<'b> Add<&'b AffineNielsPoint> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: &'b AffineNielsPoint) -> JubJubExtended
[src]
impl<'a, 'b> Add<&'b ExtendedNielsPoint> for &'a JubJubExtended
[src]
impl<'a, 'b> Add<&'b ExtendedNielsPoint> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, other: &'b ExtendedNielsPoint) -> JubJubExtended
[src]
impl<'b> Add<&'b ExtendedNielsPoint> for JubJubExtended
[src]
impl<'b> Add<&'b ExtendedNielsPoint> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: &'b ExtendedNielsPoint) -> JubJubExtended
[src]
impl<'a, 'b> Add<&'b JubJubAffine> for &'a JubJubExtended
[src]
impl<'a, 'b> Add<&'b JubJubAffine> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, other: &'b JubJubAffine) -> JubJubExtended
[src]
impl<'b> Add<&'b JubJubAffine> for JubJubExtended
[src]
impl<'b> Add<&'b JubJubAffine> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: &'b JubJubAffine) -> JubJubExtended
[src]
impl<'a, 'b> Add<&'b JubJubExtended> for &'a JubJubExtended
[src]
impl<'a, 'b> Add<&'b JubJubExtended> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, other: &'b JubJubExtended) -> JubJubExtended
[src]
impl<'b> Add<&'b JubJubExtended> for JubJubExtended
[src]
impl<'b> Add<&'b JubJubExtended> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: &'b JubJubExtended) -> JubJubExtended
[src]
impl<'a> Add<AffineNielsPoint> for &'a JubJubExtended
[src]
impl<'a> Add<AffineNielsPoint> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: AffineNielsPoint) -> JubJubExtended
[src]
impl Add<AffineNielsPoint> for JubJubExtended
[src]
impl Add<AffineNielsPoint> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: AffineNielsPoint) -> JubJubExtended
[src]
impl<'a> Add<ExtendedNielsPoint> for &'a JubJubExtended
[src]
impl<'a> Add<ExtendedNielsPoint> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: ExtendedNielsPoint) -> JubJubExtended
[src]
impl Add<ExtendedNielsPoint> for JubJubExtended
[src]
impl Add<ExtendedNielsPoint> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: ExtendedNielsPoint) -> JubJubExtended
[src]
impl<'a> Add<JubJubAffine> for &'a JubJubExtended
[src]
impl<'a> Add<JubJubAffine> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: JubJubAffine) -> JubJubExtended
[src]
impl Add<JubJubAffine> for JubJubExtended
[src]
impl Add<JubJubAffine> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: JubJubAffine) -> JubJubExtended
[src]
impl<'a> Add<JubJubExtended> for &'a JubJubExtended
[src]
impl<'a> Add<JubJubExtended> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: JubJubExtended) -> JubJubExtended
[src]
impl Add<JubJubExtended> for JubJubExtended
[src]
impl Add<JubJubExtended> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the +
operator.
fn add(self, rhs: JubJubExtended) -> JubJubExtended
[src]
impl<'b> AddAssign<&'b AffineNielsPoint> for JubJubExtended
[src]
impl<'b> AddAssign<&'b AffineNielsPoint> for JubJubExtended
[src]fn add_assign(&mut self, rhs: &'b AffineNielsPoint)
[src]
impl<'b> AddAssign<&'b ExtendedNielsPoint> for JubJubExtended
[src]
impl<'b> AddAssign<&'b ExtendedNielsPoint> for JubJubExtended
[src]fn add_assign(&mut self, rhs: &'b ExtendedNielsPoint)
[src]
impl<'b> AddAssign<&'b JubJubAffine> for JubJubExtended
[src]
impl<'b> AddAssign<&'b JubJubAffine> for JubJubExtended
[src]fn add_assign(&mut self, rhs: &'b JubJubAffine)
[src]
impl<'b> AddAssign<&'b JubJubExtended> for JubJubExtended
[src]
impl<'b> AddAssign<&'b JubJubExtended> for JubJubExtended
[src]fn add_assign(&mut self, rhs: &'b JubJubExtended)
[src]
impl AddAssign<AffineNielsPoint> for JubJubExtended
[src]
impl AddAssign<AffineNielsPoint> for JubJubExtended
[src]fn add_assign(&mut self, rhs: AffineNielsPoint)
[src]
impl AddAssign<ExtendedNielsPoint> for JubJubExtended
[src]
impl AddAssign<ExtendedNielsPoint> for JubJubExtended
[src]fn add_assign(&mut self, rhs: ExtendedNielsPoint)
[src]
impl AddAssign<JubJubAffine> for JubJubExtended
[src]
impl AddAssign<JubJubAffine> for JubJubExtended
[src]fn add_assign(&mut self, rhs: JubJubAffine)
[src]
impl AddAssign<JubJubExtended> for JubJubExtended
[src]
impl AddAssign<JubJubExtended> for JubJubExtended
[src]fn add_assign(&mut self, rhs: JubJubExtended)
[src]
impl Clone for JubJubExtended
[src]
impl Clone for JubJubExtended
[src]fn clone(&self) -> JubJubExtended
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl ConditionallySelectable for JubJubExtended
[src]
impl ConditionallySelectable for JubJubExtended
[src]fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
[src]
pub fn conditional_assign(&mut self, other: &Self, choice: Choice)
[src]
pub fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
[src]
impl ConstantTimeEq for JubJubExtended
[src]
impl ConstantTimeEq for JubJubExtended
[src]impl Copy for JubJubExtended
[src]
impl Copy for JubJubExtended
[src]impl Default for JubJubExtended
[src]
impl Default for JubJubExtended
[src]fn default() -> JubJubExtended
[src]
Returns the identity.
impl<'a> From<&'a JubJubExtended> for JubJubAffine
[src]
impl<'a> From<&'a JubJubExtended> for JubJubAffine
[src]fn from(extended: &'a JubJubExtended) -> JubJubAffine
[src]
Constructs an affine point from an extended point
using the map (X, Y, Z, T1, T2) => (XZ, Y/Z)
as Z is always nonzero. This requires a field inversion
and so it is recommended to perform these in a batch
using batch_normalize
instead.
impl From<JubJubAffine> for JubJubExtended
[src]
impl From<JubJubAffine> for JubJubExtended
[src]fn from(affine: JubJubAffine) -> JubJubExtended
[src]
Constructs an extended point (with Z = 1
) from
an affine point using the map (x, y) => (x, y, 1, x, y)
.
impl From<JubJubExtended> for JubJubAffine
[src]
impl From<JubJubExtended> for JubJubAffine
[src]fn from(extended: JubJubExtended) -> JubJubAffine
[src]
impl<'a, 'b> Mul<&'b Fr> for &'a JubJubExtended
[src]
impl<'a, 'b> Mul<&'b Fr> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the *
operator.
fn mul(self, other: &'b Fr) -> JubJubExtended
[src]
impl<'b> Mul<&'b Fr> for JubJubExtended
[src]
impl<'b> Mul<&'b Fr> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Fr) -> JubJubExtended
[src]
impl<'a> Mul<Fr> for &'a JubJubExtended
[src]
impl<'a> Mul<Fr> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the *
operator.
fn mul(self, rhs: Fr) -> JubJubExtended
[src]
impl Mul<Fr> for JubJubExtended
[src]
impl Mul<Fr> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the *
operator.
fn mul(self, rhs: Fr) -> JubJubExtended
[src]
impl<'b> MulAssign<&'b Fr> for JubJubExtended
[src]
impl<'b> MulAssign<&'b Fr> for JubJubExtended
[src]fn mul_assign(&mut self, rhs: &'b Fr)
[src]
impl MulAssign<Fr> for JubJubExtended
[src]
impl MulAssign<Fr> for JubJubExtended
[src]fn mul_assign(&mut self, rhs: Fr)
[src]
impl Neg for JubJubExtended
[src]
impl Neg for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn neg(self) -> JubJubExtended
[src]
Computes the negation of a point P = (X, Y, Z, T)
as -P = (-X, Y, Z, -T1, T2)
. The choice of T1
is made without loss of generality.
impl PartialEq<JubJubExtended> for JubJubExtended
[src]
impl PartialEq<JubJubExtended> for JubJubExtended
[src]impl<'a, 'b> Sub<&'b AffineNielsPoint> for &'a JubJubExtended
[src]
impl<'a, 'b> Sub<&'b AffineNielsPoint> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, other: &'b AffineNielsPoint) -> JubJubExtended
[src]
impl<'b> Sub<&'b AffineNielsPoint> for JubJubExtended
[src]
impl<'b> Sub<&'b AffineNielsPoint> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b AffineNielsPoint) -> JubJubExtended
[src]
impl<'a, 'b> Sub<&'b ExtendedNielsPoint> for &'a JubJubExtended
[src]
impl<'a, 'b> Sub<&'b ExtendedNielsPoint> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, other: &'b ExtendedNielsPoint) -> JubJubExtended
[src]
impl<'b> Sub<&'b ExtendedNielsPoint> for JubJubExtended
[src]
impl<'b> Sub<&'b ExtendedNielsPoint> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b ExtendedNielsPoint) -> JubJubExtended
[src]
impl<'a, 'b> Sub<&'b JubJubAffine> for &'a JubJubExtended
[src]
impl<'a, 'b> Sub<&'b JubJubAffine> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, other: &'b JubJubAffine) -> JubJubExtended
[src]
impl<'b> Sub<&'b JubJubAffine> for JubJubExtended
[src]
impl<'b> Sub<&'b JubJubAffine> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b JubJubAffine) -> JubJubExtended
[src]
impl<'a, 'b> Sub<&'b JubJubExtended> for &'a JubJubExtended
[src]
impl<'a, 'b> Sub<&'b JubJubExtended> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, other: &'b JubJubExtended) -> JubJubExtended
[src]
impl<'b> Sub<&'b JubJubExtended> for JubJubExtended
[src]
impl<'b> Sub<&'b JubJubExtended> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b JubJubExtended) -> JubJubExtended
[src]
impl<'a> Sub<AffineNielsPoint> for &'a JubJubExtended
[src]
impl<'a> Sub<AffineNielsPoint> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: AffineNielsPoint) -> JubJubExtended
[src]
impl Sub<AffineNielsPoint> for JubJubExtended
[src]
impl Sub<AffineNielsPoint> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: AffineNielsPoint) -> JubJubExtended
[src]
impl<'a> Sub<ExtendedNielsPoint> for &'a JubJubExtended
[src]
impl<'a> Sub<ExtendedNielsPoint> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: ExtendedNielsPoint) -> JubJubExtended
[src]
impl Sub<ExtendedNielsPoint> for JubJubExtended
[src]
impl Sub<ExtendedNielsPoint> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: ExtendedNielsPoint) -> JubJubExtended
[src]
impl<'a> Sub<JubJubAffine> for &'a JubJubExtended
[src]
impl<'a> Sub<JubJubAffine> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: JubJubAffine) -> JubJubExtended
[src]
impl Sub<JubJubAffine> for JubJubExtended
[src]
impl Sub<JubJubAffine> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: JubJubAffine) -> JubJubExtended
[src]
impl<'a> Sub<JubJubExtended> for &'a JubJubExtended
[src]
impl<'a> Sub<JubJubExtended> for &'a JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: JubJubExtended) -> JubJubExtended
[src]
impl Sub<JubJubExtended> for JubJubExtended
[src]
impl Sub<JubJubExtended> for JubJubExtended
[src]type Output = JubJubExtended
The resulting type after applying the -
operator.
fn sub(self, rhs: JubJubExtended) -> JubJubExtended
[src]
impl<'b> SubAssign<&'b AffineNielsPoint> for JubJubExtended
[src]
impl<'b> SubAssign<&'b AffineNielsPoint> for JubJubExtended
[src]fn sub_assign(&mut self, rhs: &'b AffineNielsPoint)
[src]
impl<'b> SubAssign<&'b ExtendedNielsPoint> for JubJubExtended
[src]
impl<'b> SubAssign<&'b ExtendedNielsPoint> for JubJubExtended
[src]fn sub_assign(&mut self, rhs: &'b ExtendedNielsPoint)
[src]
impl<'b> SubAssign<&'b JubJubAffine> for JubJubExtended
[src]
impl<'b> SubAssign<&'b JubJubAffine> for JubJubExtended
[src]fn sub_assign(&mut self, rhs: &'b JubJubAffine)
[src]
impl<'b> SubAssign<&'b JubJubExtended> for JubJubExtended
[src]
impl<'b> SubAssign<&'b JubJubExtended> for JubJubExtended
[src]fn sub_assign(&mut self, rhs: &'b JubJubExtended)
[src]
impl SubAssign<AffineNielsPoint> for JubJubExtended
[src]
impl SubAssign<AffineNielsPoint> for JubJubExtended
[src]fn sub_assign(&mut self, rhs: AffineNielsPoint)
[src]
impl SubAssign<ExtendedNielsPoint> for JubJubExtended
[src]
impl SubAssign<ExtendedNielsPoint> for JubJubExtended
[src]fn sub_assign(&mut self, rhs: ExtendedNielsPoint)
[src]
impl SubAssign<JubJubAffine> for JubJubExtended
[src]
impl SubAssign<JubJubAffine> for JubJubExtended
[src]fn sub_assign(&mut self, rhs: JubJubAffine)
[src]
impl SubAssign<JubJubExtended> for JubJubExtended
[src]
impl SubAssign<JubJubExtended> for JubJubExtended
[src]fn sub_assign(&mut self, rhs: JubJubExtended)
[src]
Auto Trait Implementations
impl RefUnwindSafe for JubJubExtended
impl RefUnwindSafe for JubJubExtended
impl Send for JubJubExtended
impl Send for JubJubExtended
impl Sync for JubJubExtended
impl Sync for JubJubExtended
impl Unpin for JubJubExtended
impl Unpin for JubJubExtended
impl UnwindSafe for JubJubExtended
impl UnwindSafe for JubJubExtended