Struct fullcodec_jubjub::JubJubAffine [−][src]
pub struct JubJubAffine { /* fields omitted */ }
Expand description
This represents a Jubjub point in the affine (x, y)
coordinates.
Implementations
Multiplies this point by the cofactor, producing an
JubJubExtended
Determines if this point is of small order.
Determines if this point is torsion free and so is in the prime order subgroup.
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.
Performs a pre-processing step that produces an AffineNielsPoint
for use in multiple additions.
Constructs an JubJubAffine given x
and y
without checking
that the point is on the curve.
Trait Implementations
type Output = JubJubExtended
type Output = JubJubExtended
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = JubJubExtended
type Output = JubJubExtended
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = JubJubExtended
type Output = JubJubExtended
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = JubJubExtended
type Output = JubJubExtended
The resulting type after applying the +
operator.
Performs the +
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Returns the identity.
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.
Constructs an extended point (with Z = 1
) from
an affine point using the map (x, y) => (x, y, 1, x, y)
.
Performs the conversion.
This computes the negation of a point P = (x, y)
as -P = (-x, y)
.
type Output = JubJubAffine
type Output = JubJubAffine
The resulting type after applying the -
operator.
Attempts to interpret a byte representation of an affine point, failing if the element is not on the curve or non-canonical.
NOTE: ZIP 216 is enabled by default and the only way to interact with serialization. See: https://zips.z.cash/zip-0216 for more details.
type Error = BytesError
type Error = BytesError
The type returned in the event of a conversion error.
type Output = JubJubExtended
type Output = JubJubExtended
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = JubJubExtended
type Output = JubJubExtended
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = JubJubExtended
type Output = JubJubExtended
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = JubJubExtended
type Output = JubJubExtended
The resulting type after applying the -
operator.
Performs the -
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Auto Trait Implementations
impl RefUnwindSafe for JubJubAffine
impl Send for JubJubAffine
impl Sync for JubJubAffine
impl Unpin for JubJubAffine
impl UnwindSafe for JubJubAffine
Blanket Implementations
Mutably borrows from an owned value. Read more
fn from_hex_str(s: &str) -> Result<Self, Self::Error> where
Self::Error: BadLength,
Self::Error: InvalidChar,
fn from_hex_str(s: &str) -> Result<Self, Self::Error> where
Self::Error: BadLength,
Self::Error: InvalidChar,
Parse a string slice as bytes hex representation and returns `