Struct snarkvm_curves::templates::short_weierstrass_jacobian::affine::Affine [−][src]
pub struct Affine<P: Parameters> { pub x: P::BaseField, pub y: P::BaseField, pub infinity: bool, }
Fields
x: P::BaseField
y: P::BaseField
infinity: bool
Implementations
Trait Implementations
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Attempts to construct an affine point given an x-coordinate. The point is not guaranteed to be in the prime order subgroup.
If and only if greatest
is set will the lexicographically
largest y-coordinate be selected.
Attempts to construct an affine point given a y-coordinate. The point is not guaranteed to be in the prime order subgroup.
If and only if greatest
is set will the lexicographically
largest y-coordinate be selected.
Checks that the current point is on the elliptic curve.
type Projective = Projective<P>
Returns a fixed generator of unknown exponent.
Returns a group element if the set of bytes forms a valid group element, otherwise returns None. This function is primarily intended for sampling random group elements from a hash-function or RNG output. Read more
Multiply this element by a scalar field element in BigInteger form.
Multiply this element by the cofactor and output the resulting projective element. Read more
Multiply this element by the inverse of the cofactor modulo the size of
Self::ScalarField
. Read more
Converts this element into its projective representation.
Checks that the point is in the prime order subgroup given the point on the curve.
Returns the x-coordinate of the point.
Returns the y-coordinate of the point.
Multiply this element by the cofactor.
Reads Self
from reader
.
Reads Self
from reader
without compression.
Serializes self
into writer
.
Serializes self
into writer
without compression.
impl<'de, P: Parameters> Deserialize<'de> for Affine<P> where
P::BaseField: Deserialize<'de>,
P::BaseField: Deserialize<'de>,
impl<'de, P: Parameters> Deserialize<'de> for Affine<P> where
P::BaseField: Deserialize<'de>,
P::BaseField: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Generate a random value of T
, using rng
as the source of randomness.
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
The affine point X, Y is represented in the Jacobian coordinates with Z = 1.
Performs the conversion.
Performs the conversion.
type ScalarField = P::ScalarField
Sets self := self + self
.
Performs the *=
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
impl<M: ShortWeierstrassParameters, F: Field> ToConstraintField<F> for SWAffine<M> where
M::BaseField: ToConstraintField<F>,
impl<M: ShortWeierstrassParameters, F: Field> ToConstraintField<F> for SWAffine<M> where
M::BaseField: ToConstraintField<F>,
Auto Trait Implementations
impl<P> RefUnwindSafe for Affine<P> where
<P as ModelParameters>::BaseField: RefUnwindSafe,
impl<P> Unpin for Affine<P> where
<P as ModelParameters>::BaseField: Unpin,
impl<P> UnwindSafe for Affine<P> where
<P as ModelParameters>::BaseField: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more