franklin_crypto::plonk::circuit::curve::sw_affine

Struct AffinePoint

Source
pub struct AffinePoint<'a, E: Engine, G: GenericCurveAffine>{
    pub x: FieldElement<'a, E, G::Base>,
    pub y: FieldElement<'a, E, G::Base>,
    pub value: Option<G>,
}

Fields§

§x: FieldElement<'a, E, G::Base>§y: FieldElement<'a, E, G::Base>§value: Option<G>

Implementations§

Source§

impl<'a, E: Engine, G: GenericCurveAffine> AffinePoint<'a, E, G>

Source

pub fn get_x(&self) -> FieldElement<'a, E, G::Base>

Source

pub fn get_y(&self) -> FieldElement<'a, E, G::Base>

Source

pub fn alloc<CS: ConstraintSystem<E>>( cs: &mut CS, value: Option<G>, params: &'a RnsParameters<E, G::Base>, ) -> Result<Self, SynthesisError>

Source

pub fn from_xy_unchecked( x: FieldElement<'a, E, G::Base>, y: FieldElement<'a, E, G::Base>, ) -> Self

Source

pub fn constant(value: G, params: &'a RnsParameters<E, G::Base>) -> Self

Source

pub fn zero(params: &'a RnsParameters<E, G::Base>) -> Self

Source

pub fn is_constant(&self) -> bool

Source

pub fn get_value(&self) -> Option<G>

Source

pub fn equals<CS: ConstraintSystem<E>>( cs: &mut CS, this: Self, other: Self, ) -> Result<(Boolean, (Self, Self)), SynthesisError>

Source

pub fn negate<CS: ConstraintSystem<E>>( self, cs: &mut CS, ) -> Result<(Self, Self), SynthesisError>

Source

pub fn conditionally_negate<CS: ConstraintSystem<E>>( self, cs: &mut CS, flag: &Boolean, ) -> Result<(Self, (Self, Self)), SynthesisError>

Source

pub fn add_unequal<CS: ConstraintSystem<E>>( self, cs: &mut CS, other: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>

Source

pub fn add_unequal_unchecked<CS: ConstraintSystem<E>>( self, cs: &mut CS, other: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>

Source

pub fn sub_unequal<CS: ConstraintSystem<E>>( self, cs: &mut CS, other: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>

Source

pub fn double<CS: ConstraintSystem<E>>( self, cs: &mut CS, ) -> Result<(Self, Self), SynthesisError>

Source

pub fn double_and_add<CS: ConstraintSystem<E>>( self, cs: &mut CS, other: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>

Source

pub fn double_and_add_unchecked<CS: ConstraintSystem<E>>( self, cs: &mut CS, other: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>

Source

pub fn mul_by_fixed_scalar<CS: ConstraintSystem<E>>( self, _cs: &mut CS, _scalar: &G::Scalar, ) -> Result<(Self, Self), SynthesisError>

Source

pub fn select<CS: ConstraintSystem<E>>( cs: &mut CS, flag: &Boolean, first: Self, second: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>

Source

pub fn is_on_curve_for_zero_a<CS: ConstraintSystem<E>>( self, cs: &mut CS, curve_b: G::Base, ) -> Result<(Boolean, Self), SynthesisError>

Source

pub fn mul_by_skewed_scalar_decomposition<CS: ConstraintSystem<E>>( self, cs: &mut CS, entries: &[Boolean], offset_generator: G, ) -> Result<(Self, Self), SynthesisError>

Source§

impl<'a, E: Engine> AffinePoint<'a, E, E::G1Affine>

Source

pub fn mul<CS: ConstraintSystem<E>>( self, cs: &mut CS, scalar: &Num<E>, bit_limit: Option<usize>, ) -> Result<(Self, Self), SynthesisError>

Source

pub fn multiexp<CS: ConstraintSystem<E>>( cs: &mut CS, scalars: &[Num<E>], points: &[Self], bit_limit: Option<usize>, ) -> Result<Self, SynthesisError>

Source

pub fn multiexp_using_endomorphism<CS: ConstraintSystem<E>>( cs: &mut CS, scalars: &[Num<E>], points: &[Self], endo_parameters: &EndomorphismParameters<E>, ) -> Result<Self, SynthesisError>

Trait Implementations§

Source§

impl<'a, E: Clone + Engine, G: Clone + GenericCurveAffine> Clone for AffinePoint<'a, E, G>

Source§

fn clone(&self) -> AffinePoint<'a, E, G>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, E: Debug + Engine, G: Debug + GenericCurveAffine> Debug for AffinePoint<'a, E, G>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, E, G> Freeze for AffinePoint<'a, E, G>

§

impl<'a, E, G> RefUnwindSafe for AffinePoint<'a, E, G>

§

impl<'a, E, G> Send for AffinePoint<'a, E, G>
where <G as GenericCurveAffine>::Base: Sized,

§

impl<'a, E, G> Sync for AffinePoint<'a, E, G>
where <G as GenericCurveAffine>::Base: Sized,

§

impl<'a, E, G> Unpin for AffinePoint<'a, E, G>
where <G as GenericCurveAffine>::Base: Sized + Unpin, G: Unpin, <E as ScalarEngine>::Fr: Unpin,

§

impl<'a, E, G> UnwindSafe for AffinePoint<'a, E, G>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PipeOp<T> for T

Source§

fn to<F, U>(self, f: F) -> U
where F: FnOnce(T) -> U,

Source§

fn op<F>(self, f: F) -> T
where F: FnOnce(&mut T),

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V