Struct snarkvm_curves::templates::twisted_edwards_extended::GroupAffine [−][src]
pub struct GroupAffine<P: Parameters> { pub x: P::BaseField, pub y: P::BaseField, // some fields omitted }
Fields
x: P::BaseField
y: P::BaseField
Implementations
Checks that the current point is on the elliptic curve.
Trait Implementations
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 = GroupProjective<P>
type ScalarField = P::ScalarField
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
Performs the standard addition operation of this element with a given other element.
fn mul<S: Into<<Self::ScalarField as PrimeField>::BigInteger>>(
&self,
by: S
) -> GroupProjective<P>
[src]
fn mul<S: Into<<Self::ScalarField as PrimeField>::BigInteger>>(
&self,
by: S
) -> GroupProjective<P>
[src]Performs scalar multiplication of this element with mixed addition.
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 GroupAffine<P> where
P::BaseField: Deserialize<'de>,
P::BaseField: Deserialize<'de>,
[src]
impl<'de, P: Parameters> Deserialize<'de> for GroupAffine<P> where
P::BaseField: Deserialize<'de>,
P::BaseField: Deserialize<'de>,
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
type ScalarField = P::ScalarField
Sets self := self + self
.
Performs the *=
operation. Read more
impl<P: Parameters> Serialize for GroupAffine<P> where
P::BaseField: Serialize,
P::BaseField: Serialize,
[src]
impl<P: Parameters> Serialize for GroupAffine<P> where
P::BaseField: Serialize,
P::BaseField: Serialize,
[src]Performs the -=
operation. Read more
impl<M: TEModelParameters, F: Field> ToConstraintField<F> for TEAffine<M> where
M::BaseField: ToConstraintField<F>,
[src]
impl<M: TEModelParameters, F: Field> ToConstraintField<F> for TEAffine<M> where
M::BaseField: ToConstraintField<F>,
[src]Auto Trait Implementations
impl<P> RefUnwindSafe for GroupAffine<P> where
P: RefUnwindSafe,
<P as ModelParameters>::BaseField: RefUnwindSafe,
impl<P> Send for GroupAffine<P>
impl<P> Sync for GroupAffine<P>
impl<P> Unpin for GroupAffine<P> where
P: Unpin,
<P as ModelParameters>::BaseField: Unpin,
impl<P> UnwindSafe for GroupAffine<P> where
P: UnwindSafe,
<P as ModelParameters>::BaseField: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V