[−][src]Struct dusk_jubjub::AffinePoint
This represents a Jubjub point in the affine (x, y)
coordinates.
Implementations
impl AffinePoint
[src]
pub const fn identity() -> Self
[src]
Constructs the neutral element (0, 1)
.
pub fn mul_by_cofactor(&self) -> ExtendedPoint
[src]
Multiplies this point by the cofactor, producing an
ExtendedPoint
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 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 to_bytes(&self) -> [u8; 32]
[src]
Converts this element into its byte representation.
pub fn from_bytes(b: [u8; 32]) -> CtOption<Self>
[src]
Attempts to interpret a byte representation of an affine point, failing if the element is not on the curve or non-canonical.
pub fn get_x(&self) -> Fq
[src]
Returns the x
-coordinate of this point.
pub fn get_y(&self) -> Fq
[src]
Returns the y
-coordinate of this point.
pub const fn to_niels(&self) -> AffineNielsPoint
[src]
Performs a pre-processing step that produces an AffineNielsPoint
for use in multiple additions.
pub const fn from_raw_unchecked(x: Fq, y: Fq) -> AffinePoint
[src]
Constructs an AffinePoint given x
and y
without checking
that the point is on the curve.
Trait Implementations
impl<'a, 'b> Add<&'b AffinePoint> for &'a ExtendedPoint
[src]
type Output = ExtendedPoint
The resulting type after applying the +
operator.
fn add(self, other: &'b AffinePoint) -> ExtendedPoint
[src]
impl<'b> Add<&'b AffinePoint> for ExtendedPoint
[src]
type Output = ExtendedPoint
The resulting type after applying the +
operator.
fn add(self, rhs: &'b AffinePoint) -> ExtendedPoint
[src]
impl<'a> Add<AffinePoint> for &'a ExtendedPoint
[src]
type Output = ExtendedPoint
The resulting type after applying the +
operator.
fn add(self, rhs: AffinePoint) -> ExtendedPoint
[src]
impl Add<AffinePoint> for ExtendedPoint
[src]
type Output = ExtendedPoint
The resulting type after applying the +
operator.
fn add(self, rhs: AffinePoint) -> ExtendedPoint
[src]
impl<'b> AddAssign<&'b AffinePoint> for ExtendedPoint
[src]
fn add_assign(&mut self, rhs: &'b AffinePoint)
[src]
impl AddAssign<AffinePoint> for ExtendedPoint
[src]
fn add_assign(&mut self, rhs: AffinePoint)
[src]
impl Clone for AffinePoint
[src]
fn clone(&self) -> AffinePoint
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl ConditionallySelectable for AffinePoint
[src]
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
[src]
fn conditional_assign(&mut self, other: &Self, choice: Choice)
[src]
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
[src]
impl ConstantTimeEq for AffinePoint
[src]
impl Copy for AffinePoint
[src]
impl Debug for AffinePoint
[src]
impl Default for AffinePoint
[src]
fn default() -> AffinePoint
[src]
Returns the identity.
impl<'a> From<&'a ExtendedPoint> for AffinePoint
[src]
fn from(extended: &'a ExtendedPoint) -> AffinePoint
[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<AffinePoint> for ExtendedPoint
[src]
fn from(affine: AffinePoint) -> ExtendedPoint
[src]
Constructs an extended point (with Z = 1
) from
an affine point using the map (x, y) => (x, y, 1, x, y)
.
impl From<ExtendedPoint> for AffinePoint
[src]
fn from(extended: ExtendedPoint) -> AffinePoint
[src]
impl Neg for AffinePoint
[src]
type Output = AffinePoint
The resulting type after applying the -
operator.
fn neg(self) -> AffinePoint
[src]
This computes the negation of a point P = (x, y)
as -P = (-x, y)
.
impl PartialEq<AffinePoint> for AffinePoint
[src]
impl<'a, 'b> Sub<&'b AffinePoint> for &'a ExtendedPoint
[src]
type Output = ExtendedPoint
The resulting type after applying the -
operator.
fn sub(self, other: &'b AffinePoint) -> ExtendedPoint
[src]
impl<'b> Sub<&'b AffinePoint> for ExtendedPoint
[src]
type Output = ExtendedPoint
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b AffinePoint) -> ExtendedPoint
[src]
impl<'a> Sub<AffinePoint> for &'a ExtendedPoint
[src]
type Output = ExtendedPoint
The resulting type after applying the -
operator.
fn sub(self, rhs: AffinePoint) -> ExtendedPoint
[src]
impl Sub<AffinePoint> for ExtendedPoint
[src]
type Output = ExtendedPoint
The resulting type after applying the -
operator.
fn sub(self, rhs: AffinePoint) -> ExtendedPoint
[src]
impl<'b> SubAssign<&'b AffinePoint> for ExtendedPoint
[src]
fn sub_assign(&mut self, rhs: &'b AffinePoint)
[src]
impl SubAssign<AffinePoint> for ExtendedPoint
[src]
fn sub_assign(&mut self, rhs: AffinePoint)
[src]
Auto Trait Implementations
impl RefUnwindSafe for AffinePoint
impl Send for AffinePoint
impl Sync for AffinePoint
impl Unpin for AffinePoint
impl UnwindSafe for AffinePoint
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,