diff --git a/halo2_gadgets/ecc/chip/enum.BaseFieldElem.html b/halo2_gadgets/ecc/chip/enum.BaseFieldElem.html index 04590fdabf..f94526af8d 100644 --- a/halo2_gadgets/ecc/chip/enum.BaseFieldElem.html +++ b/halo2_gadgets/ecc/chip/enum.BaseFieldElem.html @@ -110,5 +110,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/chip/enum.FullScalar.html b/halo2_gadgets/ecc/chip/enum.FullScalar.html index e8c883698c..7ceb30bdd9 100644 --- a/halo2_gadgets/ecc/chip/enum.FullScalar.html +++ b/halo2_gadgets/ecc/chip/enum.FullScalar.html @@ -110,5 +110,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/chip/enum.ScalarVar.html b/halo2_gadgets/ecc/chip/enum.ScalarVar.html index 3f1d687905..f714d57559 100644 --- a/halo2_gadgets/ecc/chip/enum.ScalarVar.html +++ b/halo2_gadgets/ecc/chip/enum.ScalarVar.html @@ -14,11 +14,11 @@ });
pub enum ScalarVar {
-    BaseFieldElem(AssignedCell<Base, Base>),
+    BaseFieldElem(AssignedCell<Base, Base>),
     FullWidth,
 }
Expand description

An enumeration of the possible types of scalars used in variable-base multiplication.

-

Variants§

§

BaseFieldElem(AssignedCell<Base, Base>)

An element of the elliptic curve’s base field, that is used as a scalar +

Variants§

§

BaseFieldElem(AssignedCell<Base, Base>)

An element of the elliptic curve’s base field, that is used as a scalar in variable-base scalar mul.

It is not true in general that a scalar field element fits in a curve’s base field, and in particular it is untrue for the Pallas curve, whose @@ -124,5 +124,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/chip/enum.ShortScalar.html b/halo2_gadgets/ecc/chip/enum.ShortScalar.html index 13143e0651..2deec966db 100644 --- a/halo2_gadgets/ecc/chip/enum.ShortScalar.html +++ b/halo2_gadgets/ecc/chip/enum.ShortScalar.html @@ -110,5 +110,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/chip/struct.EccChip.html b/halo2_gadgets/ecc/chip/struct.EccChip.html index b34ebd97fd..94490e492c 100644 --- a/halo2_gadgets/ecc/chip/struct.EccChip.html +++ b/halo2_gadgets/ecc/chip/struct.EccChip.html @@ -14,104 +14,104 @@ });

Struct halo2_gadgets::ecc::chip::EccChip

source ·
pub struct EccChip<FixedPoints: FixedPoints<Affine>> { /* private fields */ }
Expand description

An EccInstructions chip that uses 10 advice columns.

-

Implementations§

source§

impl<FixedPoints: FixedPoints<Affine>> EccChip<FixedPoints>

source

pub fn construct(config: <Self as Chip<Base>>::Config) -> Self

Reconstructs this chip from the given config.

+

Implementations§

source§

impl<FixedPoints: FixedPoints<Affine>> EccChip<FixedPoints>

source

pub fn construct(config: <Self as Chip<Base>>::Config) -> Self

Reconstructs this chip from the given config.

source

pub fn configure( - meta: &mut ConstraintSystem<Base>, - advices: [Column<Advice>; 10], - lagrange_coeffs: [Column<Fixed>; 8], + meta: &mut ConstraintSystem<Base>, + advices: [Column<Advice>; 10], + lagrange_coeffs: [Column<Fixed>; 8], range_check: LookupRangeCheckConfig<Base, { sinsemilla::K }> -) -> <Self as Chip<Base>>::Config

Side effects
+) -> <Self as Chip<Base>>::Config
Side effects

All columns in advices will be equality-enabled.

Trait Implementations§

source§

impl<Fixed: FixedPoints<Affine>> BaseFitsInScalarInstructions<EpAffine> for EccChip<Fixed>where <Fixed as FixedPoints<Affine>>::Base: FixedPoint<Affine, FixedScalarKind = BaseFieldElem>, <Fixed as FixedPoints<Affine>>::FullScalar: FixedPoint<Affine, FixedScalarKind = FullScalar>, <Fixed as FixedPoints<Affine>>::ShortScalar: FixedPoint<Affine, FixedScalarKind = ShortScalar>,

source§

fn scalar_var_from_base( &self, - _layouter: &mut impl Layouter<Base>, + _layouter: &mut impl Layouter<Base>, base: &Self::Var -) -> Result<Self::ScalarVar, Error>

Converts a base field element that exists as a variable in the circuit -into a scalar to be used in variable-base scalar multiplication.
source§

impl<FixedPoints: FixedPoints<Affine>> Chip<Fp> for EccChip<FixedPoints>

§

type Config = EccConfig<FixedPoints>

A type that holds the configuration for this chip, and any other state it may need -during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of -Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit -synthesis. Read more
source§

impl<FixedPoints: Clone + FixedPoints<Affine>> Clone for EccChip<FixedPoints>

source§

fn clone(&self) -> EccChip<FixedPoints>

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<FixedPoints: Debug + FixedPoints<Affine>> Debug for EccChip<FixedPoints>

source§

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

Formats the value using the given formatter. Read more
source§

impl<Fixed: FixedPoints<Affine>> EccInstructions<EpAffine> for EccChip<Fixed>where +) -> Result<Self::ScalarVar, Error>

Converts a base field element that exists as a variable in the circuit +into a scalar to be used in variable-base scalar multiplication.
source§

impl<FixedPoints: FixedPoints<Affine>> Chip<Fp> for EccChip<FixedPoints>

§

type Config = EccConfig<FixedPoints>

A type that holds the configuration for this chip, and any other state it may need +during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of +Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit +synthesis. Read more
source§

impl<FixedPoints: Clone + FixedPoints<Affine>> Clone for EccChip<FixedPoints>

source§

fn clone(&self) -> EccChip<FixedPoints>

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<FixedPoints: Debug + FixedPoints<Affine>> Debug for EccChip<FixedPoints>

source§

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

Formats the value using the given formatter. Read more
source§

impl<Fixed: FixedPoints<Affine>> EccInstructions<EpAffine> for EccChip<Fixed>where <Fixed as FixedPoints<Affine>>::Base: FixedPoint<Affine, FixedScalarKind = BaseFieldElem>, <Fixed as FixedPoints<Affine>>::FullScalar: FixedPoint<Affine, FixedScalarKind = FullScalar>, <Fixed as FixedPoints<Affine>>::ShortScalar: FixedPoint<Affine, FixedScalarKind = ShortScalar>,

§

type ScalarFixed = EccScalarFixed

Variable representing a full-width element of the elliptic curve’s scalar field, to be used for fixed-base scalar mul.
§

type ScalarFixedShort = EccScalarFixedShort

Variable representing a signed short element of the elliptic curve’s -scalar field, to be used for fixed-base scalar mul. Read more
§

type ScalarVar = ScalarVar

Variable representing a scalar used in variable-base scalar mul. Read more
§

type Point = EccPoint

Variable representing an elliptic curve point.
§

type NonIdentityPoint = NonIdentityEccPoint

Variable representing a non-identity elliptic curve point.
§

type X = AssignedCell<Fp, Fp>

Variable representing the affine short Weierstrass x-coordinate of an +scalar field, to be used for fixed-base scalar mul. Read more
§

type ScalarVar = ScalarVar

Variable representing a scalar used in variable-base scalar mul. Read more
§

type Point = EccPoint

Variable representing an elliptic curve point.
§

type NonIdentityPoint = NonIdentityEccPoint

Variable representing a non-identity elliptic curve point.
§

type X = AssignedCell<Fp, Fp>

Variable representing the affine short Weierstrass x-coordinate of an elliptic curve point.
§

type FixedPoints = Fixed

Enumeration of the set of fixed bases to be used in scalar mul. TODO: When associated consts can be used as const generics, introduce Self::NUM_WINDOWS, Self::NUM_WINDOWS_BASE_FIELD, Self::NUM_WINDOWS_SHORT and use them to differentiate FixedPoints types.
source§

fn constrain_equal( &self, - layouter: &mut impl Layouter<Base>, + layouter: &mut impl Layouter<Base>, a: &Self::Point, b: &Self::Point -) -> Result<(), Error>

Constrains point a to be equal in value to point b.
source§

fn witness_point( +) -> Result<(), Error>

Constrains point a to be equal in value to point b.
source§

fn witness_point( &self, - layouter: &mut impl Layouter<Base>, - value: Value<Affine> -) -> Result<Self::Point, Error>

Witnesses the given point as a private input to the circuit. + layouter: &mut impl Layouter<Base>, + value: Value<Affine> +) -> Result<Self::Point, Error>
Witnesses the given point as a private input to the circuit. This allows the point to be the identity, mapped to (0, 0) in affine coordinates.
source§

fn witness_point_non_id( &self, - layouter: &mut impl Layouter<Base>, - value: Value<Affine> -) -> Result<Self::NonIdentityPoint, Error>

Witnesses the given point as a private input to the circuit. + layouter: &mut impl Layouter<Base>, + value: Value<Affine> +) -> Result<Self::NonIdentityPoint, Error>
Witnesses the given point as a private input to the circuit. This returns an error if the point is the identity.
source§

fn witness_scalar_var( &self, - _layouter: &mut impl Layouter<Base>, - _value: Value<Scalar> -) -> Result<Self::ScalarVar, Error>

Witnesses a full-width scalar to be used in variable-base multiplication.
source§

fn witness_scalar_fixed( + _layouter: &mut impl Layouter<Base>, + _value: Value<Scalar> +) -> Result<Self::ScalarVar, Error>

Witnesses a full-width scalar to be used in variable-base multiplication.
source§

fn witness_scalar_fixed( &self, - _layouter: &mut impl Layouter<Base>, - value: Value<Scalar> -) -> Result<Self::ScalarFixed, Error>

Witnesses a full-width scalar to be used in fixed-base multiplication.
source§

fn scalar_fixed_from_signed_short( + _layouter: &mut impl Layouter<Base>, + value: Value<Scalar> +) -> Result<Self::ScalarFixed, Error>

Witnesses a full-width scalar to be used in fixed-base multiplication.
source§

fn scalar_fixed_from_signed_short( &self, - _layouter: &mut impl Layouter<Base>, - (magnitude, sign): (AssignedCell<Base, Base>, AssignedCell<Base, Base>) -) -> Result<Self::ScalarFixedShort, Error>

Converts a magnitude and sign that exists as variables in the circuit into a + _layouter: &mut impl Layouter<Base>, + (magnitude, sign): (AssignedCell<Base, Base>, AssignedCell<Base, Base>) +) -> Result<Self::ScalarFixedShort, Error>
Converts a magnitude and sign that exists as variables in the circuit into a signed short scalar to be used in fixed-base scalar multiplication.
source§

fn extract_p<Point: Into<Self::Point> + Clone>(point: &Point) -> Self::X

Extracts the x-coordinate of a point.
source§

fn add_incomplete( &self, - layouter: &mut impl Layouter<Base>, + layouter: &mut impl Layouter<Base>, a: &Self::NonIdentityPoint, b: &Self::NonIdentityPoint -) -> Result<Self::NonIdentityPoint, Error>

Performs incomplete point addition, returning a + b. Read more
source§

fn add<A: Into<Self::Point> + Clone, B: Into<Self::Point> + Clone>( +) -> Result<Self::NonIdentityPoint, Error>

Performs incomplete point addition, returning a + b. Read more
source§

fn add<A: Into<Self::Point> + Clone, B: Into<Self::Point> + Clone>( &self, - layouter: &mut impl Layouter<Base>, + layouter: &mut impl Layouter<Base>, a: &A, b: &B -) -> Result<Self::Point, Error>

Performs complete point addition, returning a + b.
source§

fn mul( +) -> Result<Self::Point, Error>

Performs complete point addition, returning a + b.
source§

fn mul( &self, - layouter: &mut impl Layouter<Base>, + layouter: &mut impl Layouter<Base>, scalar: &Self::ScalarVar, base: &Self::NonIdentityPoint -) -> Result<(Self::Point, Self::ScalarVar), Error>

Performs variable-base scalar multiplication, returning [scalar] base.
source§

fn mul_fixed( +) -> Result<(Self::Point, Self::ScalarVar), Error>

Performs variable-base scalar multiplication, returning [scalar] base.
source§

fn mul_fixed( &self, - layouter: &mut impl Layouter<Base>, + layouter: &mut impl Layouter<Base>, scalar: &Self::ScalarFixed, base: &<Self::FixedPoints as FixedPoints<Affine>>::FullScalar -) -> Result<(Self::Point, Self::ScalarFixed), Error>

Performs fixed-base scalar multiplication using a full-width scalar, returning [scalar] base.
source§

fn mul_fixed_short( +) -> Result<(Self::Point, Self::ScalarFixed), Error>

Performs fixed-base scalar multiplication using a full-width scalar, returning [scalar] base.
source§

fn mul_fixed_short( &self, - layouter: &mut impl Layouter<Base>, + layouter: &mut impl Layouter<Base>, scalar: &Self::ScalarFixedShort, base: &<Self::FixedPoints as FixedPoints<Affine>>::ShortScalar -) -> Result<(Self::Point, Self::ScalarFixedShort), Error>

Performs fixed-base scalar multiplication using a short signed scalar, returning +) -> Result<(Self::Point, Self::ScalarFixedShort), Error>
Performs fixed-base scalar multiplication using a short signed scalar, returning [scalar] base.
source§

fn mul_fixed_base_field_elem( &self, - layouter: &mut impl Layouter<Base>, - base_field_elem: AssignedCell<Base, Base>, + layouter: &mut impl Layouter<Base>, + base_field_elem: AssignedCell<Base, Base>, base: &<Self::FixedPoints as FixedPoints<Affine>>::Base -) -> Result<Self::Point, Error>

Performs fixed-base scalar multiplication using a base field element as the scalar. +) -> Result<Self::Point, Error>
Performs fixed-base scalar multiplication using a base field element as the scalar. In the current implementation, this base field element must be output from another instruction.
source§

impl<FixedPoints: PartialEq + FixedPoints<Affine>> PartialEq for EccChip<FixedPoints>

source§

fn eq(&self, other: &EccChip<FixedPoints>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<Fixed: FixedPoints<Affine>> UtilitiesInstructions<Fp> for EccChip<Fixed>

§

type Var = AssignedCell<Fp, Fp>

Variable in the circuit.
source§

fn load_private( +sufficient, and should not be overridden without very good reason.

source§

impl<Fixed: FixedPoints<Affine>> UtilitiesInstructions<Fp> for EccChip<Fixed>

§

type Var = AssignedCell<Fp, Fp>

Variable in the circuit.
source§

fn load_private( &self, - layouter: impl Layouter<F>, - column: Column<Advice>, - value: Value<F> -) -> Result<Self::Var, Error>

Load a variable.
source§

impl<FixedPoints: Eq + FixedPoints<Affine>> Eq for EccChip<FixedPoints>

source§

impl<FixedPoints: FixedPoints<Affine>> StructuralEq for EccChip<FixedPoints>

source§

impl<FixedPoints: FixedPoints<Affine>> StructuralPartialEq for EccChip<FixedPoints>

Auto Trait Implementations§

§

impl<FixedPoints> RefUnwindSafe for EccChip<FixedPoints>where + layouter: impl Layouter<F>, + column: Column<Advice>, + value: Value<F> +) -> Result<Self::Var, Error>

Load a variable.
source§

impl<FixedPoints: Eq + FixedPoints<Affine>> Eq for EccChip<FixedPoints>

source§

impl<FixedPoints: FixedPoints<Affine>> StructuralEq for EccChip<FixedPoints>

source§

impl<FixedPoints: FixedPoints<Affine>> StructuralPartialEq for EccChip<FixedPoints>

Auto Trait Implementations§

§

impl<FixedPoints> RefUnwindSafe for EccChip<FixedPoints>where FixedPoints: RefUnwindSafe,

§

impl<FixedPoints> Send for EccChip<FixedPoints>where FixedPoints: Send,

§

impl<FixedPoints> Sync for EccChip<FixedPoints>where FixedPoints: Sync,

§

impl<FixedPoints> Unpin for EccChip<FixedPoints>where @@ -212,5 +212,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/chip/struct.EccConfig.html b/halo2_gadgets/ecc/chip/struct.EccConfig.html index 9972c28bec..32ed947696 100644 --- a/halo2_gadgets/ecc/chip/struct.EccConfig.html +++ b/halo2_gadgets/ecc/chip/struct.EccConfig.html @@ -14,11 +14,11 @@ });
pub struct EccConfig<FixedPoints: FixedPoints<Affine>> {
-    pub advices: [Column<Advice>; 10],
+    pub advices: [Column<Advice>; 10],
     pub lookup_config: LookupRangeCheckConfig<Base, { sinsemilla::K }>,
     /* private fields */
 }
Expand description

Configuration for EccChip.

-

Fields§

§advices: [Column<Advice>; 10]

Advice columns needed by instructions in the ECC chip.

+

Fields§

§advices: [Column<Advice>; 10]

Advice columns needed by instructions in the ECC chip.

§lookup_config: LookupRangeCheckConfig<Base, { sinsemilla::K }>

Lookup range check using 10-bit lookup table

Trait Implementations§

source§

impl<FixedPoints: Clone + FixedPoints<Affine>> Clone for EccConfig<FixedPoints>

source§

fn clone(&self) -> EccConfig<FixedPoints>

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<FixedPoints: Debug + FixedPoints<Affine>> Debug for EccConfig<FixedPoints>

source§

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

Formats the value using the given formatter. Read more
source§

impl<FixedPoints: PartialEq + FixedPoints<Affine>> PartialEq for EccConfig<FixedPoints>

source§

fn eq(&self, other: &EccConfig<FixedPoints>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always @@ -123,5 +123,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/chip/struct.EccPoint.html b/halo2_gadgets/ecc/chip/struct.EccPoint.html index cdf6347555..11af497a60 100644 --- a/halo2_gadgets/ecc/chip/struct.EccPoint.html +++ b/halo2_gadgets/ecc/chip/struct.EccPoint.html @@ -16,10 +16,10 @@
pub struct EccPoint { /* private fields */ }
Expand description

A curve point represented in affine (x, y) coordinates, or the identity represented as (0, 0). Each coordinate is assigned to a cell.

-

Implementations§

source§

impl EccPoint

source

pub fn point(&self) -> Value<Affine>

Returns the value of this curve point, if known.

-
source

pub fn x(&self) -> AssignedCell<Base, Base>

The cell containing the affine short-Weierstrass x-coordinate, +

Implementations§

source§

impl EccPoint

source

pub fn point(&self) -> Value<Affine>

Returns the value of this curve point, if known.

+
source

pub fn x(&self) -> AssignedCell<Base, Base>

The cell containing the affine short-Weierstrass x-coordinate, or 0 for the zero point.

-
source

pub fn y(&self) -> AssignedCell<Base, Base>

The cell containing the affine short-Weierstrass y-coordinate, +

source

pub fn y(&self) -> AssignedCell<Base, Base>

The cell containing the affine short-Weierstrass y-coordinate, or 0 for the zero point.

Trait Implementations§

source§

impl Clone for EccPoint

source§

fn clone(&self) -> EccPoint

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 Debug for EccPoint

source§

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

Formats the value using the given formatter. Read more
source§

impl From<NonIdentityEccPoint> for EccPoint

source§

fn from(non_id_point: NonIdentityEccPoint) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere @@ -117,5 +117,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/chip/struct.EccScalarFixed.html b/halo2_gadgets/ecc/chip/struct.EccScalarFixed.html index edd52fb46c..a9de2c49cb 100644 --- a/halo2_gadgets/ecc/chip/struct.EccScalarFixed.html +++ b/halo2_gadgets/ecc/chip/struct.EccScalarFixed.html @@ -114,5 +114,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/chip/struct.EccScalarFixedShort.html b/halo2_gadgets/ecc/chip/struct.EccScalarFixedShort.html index 0ae1fe89e6..c26d8f7709 100644 --- a/halo2_gadgets/ecc/chip/struct.EccScalarFixedShort.html +++ b/halo2_gadgets/ecc/chip/struct.EccScalarFixedShort.html @@ -120,5 +120,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/chip/struct.NonIdentityEccPoint.html b/halo2_gadgets/ecc/chip/struct.NonIdentityEccPoint.html index 48ac19ae3a..2ac73528a5 100644 --- a/halo2_gadgets/ecc/chip/struct.NonIdentityEccPoint.html +++ b/halo2_gadgets/ecc/chip/struct.NonIdentityEccPoint.html @@ -15,9 +15,9 @@
pub struct NonIdentityEccPoint { /* private fields */ }
Expand description

A non-identity point represented in affine (x, y) coordinates. Each coordinate is assigned to a cell.

-

Implementations§

source§

impl NonIdentityEccPoint

source

pub fn point(&self) -> Value<Affine>

Returns the value of this curve point, if known.

-
source

pub fn x(&self) -> AssignedCell<Base, Base>

The cell containing the affine short-Weierstrass x-coordinate.

-
source

pub fn y(&self) -> AssignedCell<Base, Base>

The cell containing the affine short-Weierstrass y-coordinate.

+

Implementations§

source§

impl NonIdentityEccPoint

source

pub fn point(&self) -> Value<Affine>

Returns the value of this curve point, if known.

+
source

pub fn x(&self) -> AssignedCell<Base, Base>

The cell containing the affine short-Weierstrass x-coordinate.

+
source

pub fn y(&self) -> AssignedCell<Base, Base>

The cell containing the affine short-Weierstrass y-coordinate.

Trait Implementations§

source§

impl Clone for NonIdentityEccPoint

source§

fn clone(&self) -> NonIdentityEccPoint

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 Debug for NonIdentityEccPoint

source§

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

Formats the value using the given formatter. Read more
source§

impl From<NonIdentityEccPoint> for EccPoint

source§

fn from(non_id_point: NonIdentityEccPoint) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere @@ -114,5 +114,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/struct.FixedPoint.html b/halo2_gadgets/ecc/struct.FixedPoint.html index 185ae9dc5e..e5bfa38092 100644 --- a/halo2_gadgets/ecc/struct.FixedPoint.html +++ b/halo2_gadgets/ecc/struct.FixedPoint.html @@ -19,9 +19,9 @@ scalar multiplication.

Implementations§

source§

impl<C: CurveAffine, EccChip: EccInstructions<C>> FixedPoint<C, EccChip>

source

pub fn mul( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, by: ScalarFixed<C, EccChip> -) -> Result<(Point<C, EccChip>, ScalarFixed<C, EccChip>), Error>

Returns [by] self.

+) -> Result<(Point<C, EccChip>, ScalarFixed<C, EccChip>), Error>

Returns [by] self.

source

pub fn from_inner( chip: EccChip, inner: <EccChip::FixedPoints as FixedPoints<C>>::FullScalar @@ -134,5 +134,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/struct.FixedPointBaseField.html b/halo2_gadgets/ecc/struct.FixedPointBaseField.html index 072e9c247e..876dca3462 100644 --- a/halo2_gadgets/ecc/struct.FixedPointBaseField.html +++ b/halo2_gadgets/ecc/struct.FixedPointBaseField.html @@ -19,9 +19,9 @@ multiplication by base-field elements.

Implementations§

source§

impl<C: CurveAffine, EccChip: EccInstructions<C>> FixedPointBaseField<C, EccChip>

source

pub fn mul( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, by: EccChip::Var -) -> Result<Point<C, EccChip>, Error>

Returns [by] self.

+) -> Result<Point<C, EccChip>, Error>

Returns [by] self.

source

pub fn from_inner( chip: EccChip, inner: <EccChip::FixedPoints as FixedPoints<C>>::Base @@ -134,5 +134,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/struct.FixedPointShort.html b/halo2_gadgets/ecc/struct.FixedPointShort.html index e6e956a38c..c19c7af3f6 100644 --- a/halo2_gadgets/ecc/struct.FixedPointShort.html +++ b/halo2_gadgets/ecc/struct.FixedPointShort.html @@ -16,9 +16,9 @@
pub struct FixedPointShort<C: CurveAffine, EccChip: EccInstructions<C>> { /* private fields */ }
Expand description

Precomputed multiples of a fixed point, for short signed scalar multiplication.

Implementations§

source§

impl<C: CurveAffine, EccChip: EccInstructions<C>> FixedPointShort<C, EccChip>

source

pub fn mul( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, by: ScalarFixedShort<C, EccChip> -) -> Result<(Point<C, EccChip>, ScalarFixedShort<C, EccChip>), Error>

Returns [by] self.

+) -> Result<(Point<C, EccChip>, ScalarFixedShort<C, EccChip>), Error>

Returns [by] self.

source

pub fn from_inner( chip: EccChip, inner: <EccChip::FixedPoints as FixedPoints<C>>::ShortScalar @@ -131,5 +131,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/struct.NonIdentityPoint.html b/halo2_gadgets/ecc/struct.NonIdentityPoint.html index 889642ec80..da63637866 100644 --- a/halo2_gadgets/ecc/struct.NonIdentityPoint.html +++ b/halo2_gadgets/ecc/struct.NonIdentityPoint.html @@ -16,35 +16,35 @@
pub struct NonIdentityPoint<C: CurveAffine, EccChip: EccInstructions<C>> { /* private fields */ }
Expand description

A point on a specific elliptic curve that is guaranteed to not be the identity.

Implementations§

source§

impl<C: CurveAffine, EccChip: EccInstructions<C>> NonIdentityPoint<C, EccChip>

source

pub fn new( chip: EccChip, - layouter: impl Layouter<C::Base>, - value: Value<C> -) -> Result<Self, Error>

Constructs a new point with the given value.

+ layouter: impl Layouter<C::Base>, + value: Value<C> +) -> Result<Self, Error>

Constructs a new point with the given value.

source

pub fn constrain_equal<Other: Into<Point<C, EccChip>> + Clone>( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, other: &Other -) -> Result<(), Error>

Constrains this point to be equal in value to another point.

+) -> Result<(), Error>

Constrains this point to be equal in value to another point.

source

pub fn inner(&self) -> &EccChip::NonIdentityPoint

Returns the inner point.

source

pub fn extract_p(&self) -> X<C, EccChip>

Extracts the x-coordinate of a point.

source

pub fn from_inner(chip: EccChip, inner: EccChip::NonIdentityPoint) -> Self

Wraps the given point (obtained directly from an instruction) in a gadget.

source

pub fn add<Other: Into<Point<C, EccChip>> + Clone>( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, other: &Other -) -> Result<Point<C, EccChip>, Error>

Returns self + other using complete addition.

+) -> Result<Point<C, EccChip>, Error>

Returns self + other using complete addition.

source

pub fn add_incomplete( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, other: &Self -) -> Result<Self, Error>

Returns self + other using incomplete addition. +) -> Result<Self, Error>

Returns self + other using incomplete addition. The arguments are type-constrained not to be the identity point, and since exceptional cases return an Error, the result also cannot be the identity point.

source

pub fn mul( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, by: ScalarVar<C, EccChip> -) -> Result<(Point<C, EccChip>, ScalarVar<C, EccChip>), Error>

Returns [by] self.

+) -> Result<(Point<C, EccChip>, ScalarVar<C, EccChip>), Error>

Returns [by] self.

Trait Implementations§

source§

impl<C: Clone + CurveAffine, EccChip: Clone + EccInstructions<C>> Clone for NonIdentityPoint<C, EccChip>where EccChip::NonIdentityPoint: Clone,

source§

fn clone(&self) -> NonIdentityPoint<C, EccChip>

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<C: Debug + CurveAffine, EccChip: Debug + EccInstructions<C>> Debug for NonIdentityPoint<C, EccChip>where EccChip::NonIdentityPoint: Debug,

source§

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

Formats the value using the given formatter. Read more
source§

impl<C: CurveAffine, EccChip: EccInstructions<C> + Clone + Debug + Eq> From<NonIdentityPoint<C, EccChip>> for Point<C, EccChip>

source§

fn from(non_id_point: NonIdentityPoint<C, EccChip>) -> Self

Converts to this type from the input type.
source§

impl<C: Copy + CurveAffine, EccChip: Copy + EccInstructions<C>> Copy for NonIdentityPoint<C, EccChip>where @@ -154,5 +154,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/struct.Point.html b/halo2_gadgets/ecc/struct.Point.html index 62c5b30729..93c18e59a5 100644 --- a/halo2_gadgets/ecc/struct.Point.html +++ b/halo2_gadgets/ecc/struct.Point.html @@ -16,22 +16,22 @@

Struct halo2_gadgets::ecc::Point

source ·
pub struct Point<C: CurveAffine, EccChip: EccInstructions<C> + Clone + Debug + Eq> { /* private fields */ }
Expand description

A point on a specific elliptic curve.

Implementations§

source§

impl<C: CurveAffine, EccChip: EccInstructions<C> + Clone + Debug + Eq> Point<C, EccChip>

source

pub fn new( chip: EccChip, - layouter: impl Layouter<C::Base>, - value: Value<C> -) -> Result<Self, Error>

Constructs a new point with the given value.

+ layouter: impl Layouter<C::Base>, + value: Value<C> +) -> Result<Self, Error>

Constructs a new point with the given value.

source

pub fn constrain_equal<Other: Into<Point<C, EccChip>> + Clone>( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, other: &Other -) -> Result<(), Error>

Constrains this point to be equal in value to another point.

+) -> Result<(), Error>

Constrains this point to be equal in value to another point.

source

pub fn inner(&self) -> &EccChip::Point

Returns the inner point.

source

pub fn extract_p(&self) -> X<C, EccChip>

Extracts the x-coordinate of a point.

source

pub fn from_inner(chip: EccChip, inner: EccChip::Point) -> Self

Wraps the given point (obtained directly from an instruction) in a gadget.

source

pub fn add<Other: Into<Point<C, EccChip>> + Clone>( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, other: &Other -) -> Result<Point<C, EccChip>, Error>

Returns self + other using complete addition.

+) -> Result<Point<C, EccChip>, Error>

Returns self + other using complete addition.

Trait Implementations§

source§

impl<C: Clone + CurveAffine, EccChip: Clone + EccInstructions<C> + Clone + Debug + Eq> Clone for Point<C, EccChip>where EccChip::Point: Clone,

source§

fn clone(&self) -> Point<C, EccChip>

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<C: Debug + CurveAffine, EccChip: Debug + EccInstructions<C> + Clone + Debug + Eq> Debug for Point<C, EccChip>where EccChip::Point: Debug,

source§

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

Formats the value using the given formatter. Read more
source§

impl<C: CurveAffine, EccChip: EccInstructions<C> + Clone + Debug + Eq> From<NonIdentityPoint<C, EccChip>> for Point<C, EccChip>

source§

fn from(non_id_point: NonIdentityPoint<C, EccChip>) -> Self

Converts to this type from the input type.
source§

impl<C: Copy + CurveAffine, EccChip: Copy + EccInstructions<C> + Clone + Debug + Eq> Copy for Point<C, EccChip>where @@ -141,5 +141,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/struct.ScalarFixed.html b/halo2_gadgets/ecc/struct.ScalarFixed.html index 7c496da0c7..3a9a3a4944 100644 --- a/halo2_gadgets/ecc/struct.ScalarFixed.html +++ b/halo2_gadgets/ecc/struct.ScalarFixed.html @@ -17,9 +17,9 @@ for FixedPoint scalar multiplication.

Implementations§

source§

impl<C: CurveAffine, EccChip: EccInstructions<C>> ScalarFixed<C, EccChip>

source

pub fn new( chip: EccChip, - layouter: impl Layouter<C::Base>, - value: Value<C::Scalar> -) -> Result<Self, Error>

Witnesses the given full-width scalar.

+ layouter: impl Layouter<C::Base>, + value: Value<C::Scalar> +) -> Result<Self, Error>

Witnesses the given full-width scalar.

Depending on the EccChip implementation, this may either witness the scalar immediately, or delay witnessing until its first use in FixedPoint::mul.

Trait Implementations§

source§

impl<C: Debug + CurveAffine, EccChip: Debug + EccInstructions<C>> Debug for ScalarFixed<C, EccChip>where @@ -128,5 +128,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/struct.ScalarFixedShort.html b/halo2_gadgets/ecc/struct.ScalarFixedShort.html index 1518d4cb37..34928853d6 100644 --- a/halo2_gadgets/ecc/struct.ScalarFixedShort.html +++ b/halo2_gadgets/ecc/struct.ScalarFixedShort.html @@ -17,9 +17,9 @@ specific elliptic curve, to be used for FixedPointShort scalar multiplication.

Implementations§

source§

impl<C: CurveAffine, EccChip: EccInstructions<C>> ScalarFixedShort<C, EccChip>

source

pub fn new( chip: EccChip, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, magnitude_sign: (EccChip::Var, EccChip::Var) -) -> Result<Self, Error>

Converts the given signed short scalar.

+) -> Result<Self, Error>

Converts the given signed short scalar.

magnitude_sign must be a tuple of two circuit-assigned values:

  • An unsigned integer of at most 64 bits.
  • @@ -134,5 +134,5 @@ V: MultiLane<T>,
    §

    fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/struct.ScalarVar.html b/halo2_gadgets/ecc/struct.ScalarVar.html index 0ba1776490..f2701bcf51 100644 --- a/halo2_gadgets/ecc/struct.ScalarVar.html +++ b/halo2_gadgets/ecc/struct.ScalarVar.html @@ -16,16 +16,16 @@
pub struct ScalarVar<C: CurveAffine, EccChip: EccInstructions<C>> { /* private fields */ }
Expand description

An integer representing an element of the scalar field for a specific elliptic curve.

Implementations§

source§

impl<C: CurveAffine, EccChip: EccInstructions<C>> ScalarVar<C, EccChip>

source

pub fn new( chip: EccChip, - layouter: impl Layouter<C::Base>, - value: Value<C::Scalar> -) -> Result<Self, Error>

Witnesses the given full-width scalar.

+ layouter: impl Layouter<C::Base>, + value: Value<C::Scalar> +) -> Result<Self, Error>

Witnesses the given full-width scalar.

Depending on the EccChip implementation, this may either witness the scalar immediately, or delay witnessing until its first use in NonIdentityPoint::mul.

source§

impl<C: CurveAffine, EccChip: BaseFitsInScalarInstructions<C>> ScalarVar<C, EccChip>

source

pub fn from_base( chip: EccChip, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, base: &EccChip::Var -) -> Result<Self, Error>

Constructs a scalar from an existing base-field element.

+) -> Result<Self, Error>

Constructs a scalar from an existing base-field element.

Trait Implementations§

source§

impl<C: Debug + CurveAffine, EccChip: Debug + EccInstructions<C>> Debug for ScalarVar<C, EccChip>where EccChip::ScalarVar: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<C, EccChip> RefUnwindSafe for ScalarVar<C, EccChip>where EccChip: RefUnwindSafe, @@ -132,5 +132,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/struct.X.html b/halo2_gadgets/ecc/struct.X.html index f3eaa6bee2..087895ebc2 100644 --- a/halo2_gadgets/ecc/struct.X.html +++ b/halo2_gadgets/ecc/struct.X.html @@ -122,5 +122,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/ecc/trait.BaseFitsInScalarInstructions.html b/halo2_gadgets/ecc/trait.BaseFitsInScalarInstructions.html index fd6338cf60..89e746f4ac 100644 --- a/halo2_gadgets/ecc/trait.BaseFitsInScalarInstructions.html +++ b/halo2_gadgets/ecc/trait.BaseFitsInScalarInstructions.html @@ -17,16 +17,16 @@ // Required method fn scalar_var_from_base( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, base: &Self::Var - ) -> Result<Self::ScalarVar, Error>; + ) -> Result<Self::ScalarVar, Error>; }
Expand description

Instructions that can be implemented for a curve whose base field fits into its scalar field.

Required Methods§

source

fn scalar_var_from_base( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, base: &Self::Var -) -> Result<Self::ScalarVar, Error>

Converts a base field element that exists as a variable in the circuit +) -> Result<Self::ScalarVar, Error>

Converts a base field element that exists as a variable in the circuit into a scalar to be used in variable-base scalar multiplication.

Implementors§

source§

impl<Fixed: FixedPoints<Affine>> BaseFitsInScalarInstructions<EpAffine> for EccChip<Fixed>where <Fixed as FixedPoints<Affine>>::Base: FixedPoint<Affine, FixedScalarKind = BaseFieldElem>, diff --git a/halo2_gadgets/ecc/trait.EccInstructions.html b/halo2_gadgets/ecc/trait.EccInstructions.html index 2b3c19512a..e38302f77e 100644 --- a/halo2_gadgets/ecc/trait.EccInstructions.html +++ b/halo2_gadgets/ecc/trait.EccInstructions.html @@ -13,7 +13,7 @@ }); }); -
pub trait EccInstructions<C: CurveAffine>: Chip<C::Base> + UtilitiesInstructions<C::Base> + Clone + Debug + Eq {
+
pub trait EccInstructions<C: CurveAffine>: Chip<C::Base> + UtilitiesInstructions<C::Base> + Clone + Debug + Eq {
     type ScalarVar: Clone + Debug;
     type ScalarFixed: Clone + Debug;
     type ScalarFixedShort: Clone + Debug;
@@ -25,72 +25,72 @@
 
Show 13 methods // Required methods fn constrain_equal( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, a: &Self::Point, b: &Self::Point - ) -> Result<(), Error>; + ) -> Result<(), Error>; fn witness_point( &self, - layouter: &mut impl Layouter<C::Base>, - value: Value<C> - ) -> Result<Self::Point, Error>; + layouter: &mut impl Layouter<C::Base>, + value: Value<C> + ) -> Result<Self::Point, Error>; fn witness_point_non_id( &self, - layouter: &mut impl Layouter<C::Base>, - value: Value<C> - ) -> Result<Self::NonIdentityPoint, Error>; + layouter: &mut impl Layouter<C::Base>, + value: Value<C> + ) -> Result<Self::NonIdentityPoint, Error>; fn witness_scalar_var( &self, - layouter: &mut impl Layouter<C::Base>, - value: Value<C::Scalar> - ) -> Result<Self::ScalarVar, Error>; + layouter: &mut impl Layouter<C::Base>, + value: Value<C::Scalar> + ) -> Result<Self::ScalarVar, Error>; fn witness_scalar_fixed( &self, - layouter: &mut impl Layouter<C::Base>, - value: Value<C::Scalar> - ) -> Result<Self::ScalarFixed, Error>; + layouter: &mut impl Layouter<C::Base>, + value: Value<C::Scalar> + ) -> Result<Self::ScalarFixed, Error>; fn scalar_fixed_from_signed_short( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, magnitude_sign: (Self::Var, Self::Var) - ) -> Result<Self::ScalarFixedShort, Error>; + ) -> Result<Self::ScalarFixedShort, Error>; fn extract_p<Point: Into<Self::Point> + Clone>(point: &Point) -> Self::X; fn add_incomplete( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, a: &Self::NonIdentityPoint, b: &Self::NonIdentityPoint - ) -> Result<Self::NonIdentityPoint, Error>; + ) -> Result<Self::NonIdentityPoint, Error>; fn add<A: Into<Self::Point> + Clone, B: Into<Self::Point> + Clone>( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, a: &A, b: &B - ) -> Result<Self::Point, Error>; + ) -> Result<Self::Point, Error>; fn mul( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, scalar: &Self::ScalarVar, base: &Self::NonIdentityPoint - ) -> Result<(Self::Point, Self::ScalarVar), Error>; + ) -> Result<(Self::Point, Self::ScalarVar), Error>; fn mul_fixed( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, scalar: &Self::ScalarFixed, base: &<Self::FixedPoints as FixedPoints<C>>::FullScalar - ) -> Result<(Self::Point, Self::ScalarFixed), Error>; + ) -> Result<(Self::Point, Self::ScalarFixed), Error>; fn mul_fixed_short( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, scalar: &Self::ScalarFixedShort, base: &<Self::FixedPoints as FixedPoints<C>>::ShortScalar - ) -> Result<(Self::Point, Self::ScalarFixedShort), Error>; + ) -> Result<(Self::Point, Self::ScalarFixedShort), Error>; fn mul_fixed_base_field_elem( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, base_field_elem: Self::Var, base: &<Self::FixedPoints as FixedPoints<C>>::Base - ) -> Result<Self::Point, Error>; + ) -> Result<Self::Point, Error>;
}
Expand description

The set of circuit instructions required to use the ECC gadgets.

Required Associated Types§

source

type ScalarVar: Clone + Debug

Variable representing a scalar used in variable-base scalar mul.

This type is treated as a full-width scalar. However, if Self implements @@ -111,81 +111,81 @@ and use them to differentiate FixedPoints types.

Required Methods§

source

fn constrain_equal( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, a: &Self::Point, b: &Self::Point -) -> Result<(), Error>

Constrains point a to be equal in value to point b.

+) -> Result<(), Error>

Constrains point a to be equal in value to point b.

source

fn witness_point( &self, - layouter: &mut impl Layouter<C::Base>, - value: Value<C> -) -> Result<Self::Point, Error>

Witnesses the given point as a private input to the circuit. + layouter: &mut impl Layouter<C::Base>, + value: Value<C> +) -> Result<Self::Point, Error>

Witnesses the given point as a private input to the circuit. This allows the point to be the identity, mapped to (0, 0) in affine coordinates.

source

fn witness_point_non_id( &self, - layouter: &mut impl Layouter<C::Base>, - value: Value<C> -) -> Result<Self::NonIdentityPoint, Error>

Witnesses the given point as a private input to the circuit. + layouter: &mut impl Layouter<C::Base>, + value: Value<C> +) -> Result<Self::NonIdentityPoint, Error>

Witnesses the given point as a private input to the circuit. This returns an error if the point is the identity.

source

fn witness_scalar_var( &self, - layouter: &mut impl Layouter<C::Base>, - value: Value<C::Scalar> -) -> Result<Self::ScalarVar, Error>

Witnesses a full-width scalar to be used in variable-base multiplication.

+ layouter: &mut impl Layouter<C::Base>, + value: Value<C::Scalar> +) -> Result<Self::ScalarVar, Error>

Witnesses a full-width scalar to be used in variable-base multiplication.

source

fn witness_scalar_fixed( &self, - layouter: &mut impl Layouter<C::Base>, - value: Value<C::Scalar> -) -> Result<Self::ScalarFixed, Error>

Witnesses a full-width scalar to be used in fixed-base multiplication.

+ layouter: &mut impl Layouter<C::Base>, + value: Value<C::Scalar> +) -> Result<Self::ScalarFixed, Error>

Witnesses a full-width scalar to be used in fixed-base multiplication.

source

fn scalar_fixed_from_signed_short( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, magnitude_sign: (Self::Var, Self::Var) -) -> Result<Self::ScalarFixedShort, Error>

Converts a magnitude and sign that exists as variables in the circuit into a +) -> Result<Self::ScalarFixedShort, Error>

Converts a magnitude and sign that exists as variables in the circuit into a signed short scalar to be used in fixed-base scalar multiplication.

source

fn extract_p<Point: Into<Self::Point> + Clone>(point: &Point) -> Self::X

Extracts the x-coordinate of a point.

source

fn add_incomplete( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, a: &Self::NonIdentityPoint, b: &Self::NonIdentityPoint -) -> Result<Self::NonIdentityPoint, Error>

Performs incomplete point addition, returning a + b.

+) -> Result<Self::NonIdentityPoint, Error>

Performs incomplete point addition, returning a + b.

This returns an error in exceptional cases.

source

fn add<A: Into<Self::Point> + Clone, B: Into<Self::Point> + Clone>( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, a: &A, b: &B -) -> Result<Self::Point, Error>

Performs complete point addition, returning a + b.

+) -> Result<Self::Point, Error>

Performs complete point addition, returning a + b.

source

fn mul( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, scalar: &Self::ScalarVar, base: &Self::NonIdentityPoint -) -> Result<(Self::Point, Self::ScalarVar), Error>

Performs variable-base scalar multiplication, returning [scalar] base.

+) -> Result<(Self::Point, Self::ScalarVar), Error>

Performs variable-base scalar multiplication, returning [scalar] base.

source

fn mul_fixed( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, scalar: &Self::ScalarFixed, base: &<Self::FixedPoints as FixedPoints<C>>::FullScalar -) -> Result<(Self::Point, Self::ScalarFixed), Error>

Performs fixed-base scalar multiplication using a full-width scalar, returning [scalar] base.

+) -> Result<(Self::Point, Self::ScalarFixed), Error>

Performs fixed-base scalar multiplication using a full-width scalar, returning [scalar] base.

source

fn mul_fixed_short( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, scalar: &Self::ScalarFixedShort, base: &<Self::FixedPoints as FixedPoints<C>>::ShortScalar -) -> Result<(Self::Point, Self::ScalarFixedShort), Error>

Performs fixed-base scalar multiplication using a short signed scalar, returning +) -> Result<(Self::Point, Self::ScalarFixedShort), Error>

Performs fixed-base scalar multiplication using a short signed scalar, returning [scalar] base.

source

fn mul_fixed_base_field_elem( &self, - layouter: &mut impl Layouter<C::Base>, + layouter: &mut impl Layouter<C::Base>, base_field_elem: Self::Var, base: &<Self::FixedPoints as FixedPoints<C>>::Base -) -> Result<Self::Point, Error>

Performs fixed-base scalar multiplication using a base field element as the scalar. +) -> Result<Self::Point, Error>

Performs fixed-base scalar multiplication using a base field element as the scalar. In the current implementation, this base field element must be output from another instruction.

Implementors§

source§

impl<Fixed: FixedPoints<Affine>> EccInstructions<EpAffine> for EccChip<Fixed>where <Fixed as FixedPoints<Affine>>::Base: FixedPoint<Affine, FixedScalarKind = BaseFieldElem>, <Fixed as FixedPoints<Affine>>::FullScalar: FixedPoint<Affine, FixedScalarKind = FullScalar>, - <Fixed as FixedPoints<Affine>>::ShortScalar: FixedPoint<Affine, FixedScalarKind = ShortScalar>,

\ No newline at end of file + <Fixed as FixedPoints<Affine>>::ShortScalar: FixedPoint<Affine, FixedScalarKind = ShortScalar>,
§

type ScalarFixed = EccScalarFixed

§

type ScalarFixedShort = EccScalarFixedShort

§

type ScalarVar = ScalarVar

§

type Point = EccPoint

§

type NonIdentityPoint = NonIdentityEccPoint

§

type X = AssignedCell<Fp, Fp>

§

type FixedPoints = Fixed

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/enum.PaddedWord.html b/halo2_gadgets/poseidon/enum.PaddedWord.html index 9ba0662f96..b0398ec2a8 100644 --- a/halo2_gadgets/poseidon/enum.PaddedWord.html +++ b/halo2_gadgets/poseidon/enum.PaddedWord.html @@ -14,10 +14,10 @@ });
pub enum PaddedWord<F: Field> {
-    Message(AssignedCell<F, F>),
+    Message(AssignedCell<F, F>),
     Padding(F),
 }
Expand description

A word from the padded input to a Poseidon sponge.

-

Variants§

§

Message(AssignedCell<F, F>)

A message word provided by the prover.

+

Variants§

§

Message(AssignedCell<F, F>)

A message word provided by the prover.

§

Padding(F)

A padding word, that will be fixed in the circuit parameters.

Trait Implementations§

source§

impl<F: Clone + Field> Clone for PaddedWord<F>

source§

fn clone(&self) -> PaddedWord<F>

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<F: Debug + Field> Debug for PaddedWord<F>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for PaddedWord<F>where F: RefUnwindSafe,

§

impl<F> Send for PaddedWord<F>

§

impl<F> Sync for PaddedWord<F>

§

impl<F> Unpin for PaddedWord<F>where @@ -118,5 +118,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/primitives/struct.Absorbing.html b/halo2_gadgets/poseidon/primitives/struct.Absorbing.html index 871e7df7cb..312bc2a91b 100644 --- a/halo2_gadgets/poseidon/primitives/struct.Absorbing.html +++ b/halo2_gadgets/poseidon/primitives/struct.Absorbing.html @@ -115,5 +115,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/primitives/struct.ConstantLength.html b/halo2_gadgets/poseidon/primitives/struct.ConstantLength.html index 6ebef21826..4c7c5981f6 100644 --- a/halo2_gadgets/poseidon/primitives/struct.ConstantLength.html +++ b/halo2_gadgets/poseidon/primitives/struct.ConstantLength.html @@ -111,5 +111,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/primitives/struct.Hash.html b/halo2_gadgets/poseidon/primitives/struct.Hash.html index 571818f7ab..4b1bce40ad 100644 --- a/halo2_gadgets/poseidon/primitives/struct.Hash.html +++ b/halo2_gadgets/poseidon/primitives/struct.Hash.html @@ -125,5 +125,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/primitives/struct.P128Pow5T3.html b/halo2_gadgets/poseidon/primitives/struct.P128Pow5T3.html index 9225b01221..cc7dc824ce 100644 --- a/halo2_gadgets/poseidon/primitives/struct.P128Pow5T3.html +++ b/halo2_gadgets/poseidon/primitives/struct.P128Pow5T3.html @@ -115,5 +115,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/primitives/struct.Squeezing.html b/halo2_gadgets/poseidon/primitives/struct.Squeezing.html index f83a7c69de..dc313e5a53 100644 --- a/halo2_gadgets/poseidon/primitives/struct.Squeezing.html +++ b/halo2_gadgets/poseidon/primitives/struct.Squeezing.html @@ -114,5 +114,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/struct.Hash.html b/halo2_gadgets/poseidon/struct.Hash.html index 62c98cc98b..649d792c36 100644 --- a/halo2_gadgets/poseidon/struct.Hash.html +++ b/halo2_gadgets/poseidon/struct.Hash.html @@ -16,13 +16,13 @@
pub struct Hash<F: Field, PoseidonChip: PoseidonSpongeInstructions<F, S, D, T, RATE>, S: Spec<F, T, RATE>, D: Domain<F, RATE>, const T: usize, const RATE: usize> { /* private fields */ }
Expand description

A Poseidon hash function, built around a sponge.

Implementations§

source§

impl<F: Field, PoseidonChip: PoseidonSpongeInstructions<F, S, D, T, RATE>, S: Spec<F, T, RATE>, D: Domain<F, RATE>, const T: usize, const RATE: usize> Hash<F, PoseidonChip, S, D, T, RATE>

source

pub fn init( chip: PoseidonChip, - layouter: impl Layouter<F> -) -> Result<Self, Error>

Initializes a new hasher.

+ layouter: impl Layouter<F> +) -> Result<Self, Error>

Initializes a new hasher.

source§

impl<F: PrimeField, PoseidonChip: PoseidonSpongeInstructions<F, S, ConstantLength<L>, T, RATE>, S: Spec<F, T, RATE>, const T: usize, const RATE: usize, const L: usize> Hash<F, PoseidonChip, S, ConstantLength<L>, T, RATE>

source

pub fn hash( self, - layouter: impl Layouter<F>, - message: [AssignedCell<F, F>; L] -) -> Result<AssignedCell<F, F>, Error>

Hashes the given input.

+ layouter: impl Layouter<F>, + message: [AssignedCell<F, F>; L] +) -> Result<AssignedCell<F, F>, Error>

Hashes the given input.

Trait Implementations§

source§

impl<F: Debug + Field, PoseidonChip: Debug + PoseidonSpongeInstructions<F, S, D, T, RATE>, S: Debug + Spec<F, T, RATE>, D: Debug + Domain<F, RATE>, const T: usize, const RATE: usize> Debug for Hash<F, PoseidonChip, S, D, T, RATE>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F, PoseidonChip, S, D, const T: usize, const RATE: usize> RefUnwindSafe for Hash<F, PoseidonChip, S, D, T, RATE>where D: RefUnwindSafe, F: RefUnwindSafe, @@ -136,5 +136,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/struct.Pow5Chip.html b/halo2_gadgets/poseidon/struct.Pow5Chip.html index 1c6e5a5c4b..685b89d2c3 100644 --- a/halo2_gadgets/poseidon/struct.Pow5Chip.html +++ b/halo2_gadgets/poseidon/struct.Pow5Chip.html @@ -17,31 +17,31 @@

The chip is implemented using a single round per row for full rounds, and two rounds per row for partial rounds.

Implementations§

source§

impl<F: Field, const WIDTH: usize, const RATE: usize> Pow5Chip<F, WIDTH, RATE>

source

pub fn configure<S: Spec<F, WIDTH, RATE>>( - meta: &mut ConstraintSystem<F>, - state: [Column<Advice>; WIDTH], - partial_sbox: Column<Advice>, - rc_a: [Column<Fixed>; WIDTH], - rc_b: [Column<Fixed>; WIDTH] + meta: &mut ConstraintSystem<F>, + state: [Column<Advice>; WIDTH], + partial_sbox: Column<Advice>, + rc_a: [Column<Fixed>; WIDTH], + rc_b: [Column<Fixed>; WIDTH] ) -> Pow5Config<F, WIDTH, RATE>

Configures this chip for use in a circuit.

Side-effects

All columns in state will be equality-enabled.

source

pub fn construct(config: Pow5Config<F, WIDTH, RATE>) -> Self

Construct a Pow5Chip.

-

Trait Implementations§

source§

impl<F: Field, const WIDTH: usize, const RATE: usize> Chip<F> for Pow5Chip<F, WIDTH, RATE>

§

type Config = Pow5Config<F, WIDTH, RATE>

A type that holds the configuration for this chip, and any other state it may need -during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of -Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit -synthesis. Read more
source§

impl<F: Debug + Field, const WIDTH: usize, const RATE: usize> Debug for Pow5Chip<F, WIDTH, RATE>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: Field, S: Spec<F, WIDTH, RATE>, const WIDTH: usize, const RATE: usize> PoseidonInstructions<F, S, WIDTH, RATE> for Pow5Chip<F, WIDTH, RATE>

§

type Word = StateWord<F>

Variable representing the word over which the Poseidon permutation operates.
source§

fn permute( +

Trait Implementations§

source§

impl<F: Field, const WIDTH: usize, const RATE: usize> Chip<F> for Pow5Chip<F, WIDTH, RATE>

§

type Config = Pow5Config<F, WIDTH, RATE>

A type that holds the configuration for this chip, and any other state it may need +during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of +Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit +synthesis. Read more
source§

impl<F: Debug + Field, const WIDTH: usize, const RATE: usize> Debug for Pow5Chip<F, WIDTH, RATE>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: Field, S: Spec<F, WIDTH, RATE>, const WIDTH: usize, const RATE: usize> PoseidonInstructions<F, S, WIDTH, RATE> for Pow5Chip<F, WIDTH, RATE>

§

type Word = StateWord<F>

Variable representing the word over which the Poseidon permutation operates.
source§

fn permute( &self, - layouter: &mut impl Layouter<F>, + layouter: &mut impl Layouter<F>, initial_state: &[Self::Word; T] -) -> Result<[Self::Word; T], Error>

Applies the Poseidon permutation to the given state.
source§

impl<F: Field, S: Spec<F, WIDTH, RATE>, D: Domain<F, RATE>, const WIDTH: usize, const RATE: usize> PoseidonSpongeInstructions<F, S, D, WIDTH, RATE> for Pow5Chip<F, WIDTH, RATE>

source§

fn initial_state( +) -> Result<[Self::Word; T], Error>

Applies the Poseidon permutation to the given state.
source§

impl<F: Field, S: Spec<F, WIDTH, RATE>, D: Domain<F, RATE>, const WIDTH: usize, const RATE: usize> PoseidonSpongeInstructions<F, S, D, WIDTH, RATE> for Pow5Chip<F, WIDTH, RATE>

source§

fn initial_state( &self, - layouter: &mut impl Layouter<F> -) -> Result<[Self::Word; T], Error>

Returns the initial empty state for the given domain.
source§

fn add_input( + layouter: &mut impl Layouter<F> +) -> Result<[Self::Word; T], Error>

Returns the initial empty state for the given domain.
source§

fn add_input( &self, - layouter: &mut impl Layouter<F>, + layouter: &mut impl Layouter<F>, initial_state: &[Self::Word; T], input: &Absorbing<PaddedWord<F>, RATE> -) -> Result<[Self::Word; T], Error>

Adds the given input to the state.
source§

fn get_output(state: &[Self::Word; T]) -> Squeezing<Self::Word, RATE>

Extracts sponge output from the given state.

Auto Trait Implementations§

§

impl<F, const WIDTH: usize, const RATE: usize> RefUnwindSafe for Pow5Chip<F, WIDTH, RATE>where +) -> Result<[Self::Word; T], Error>

Adds the given input to the state.
source§

fn get_output(state: &[Self::Word; T]) -> Squeezing<Self::Word, RATE>

Extracts sponge output from the given state.

Auto Trait Implementations§

§

impl<F, const WIDTH: usize, const RATE: usize> RefUnwindSafe for Pow5Chip<F, WIDTH, RATE>where F: RefUnwindSafe,

§

impl<F, const WIDTH: usize, const RATE: usize> Send for Pow5Chip<F, WIDTH, RATE>

§

impl<F, const WIDTH: usize, const RATE: usize> Sync for Pow5Chip<F, WIDTH, RATE>

§

impl<F, const WIDTH: usize, const RATE: usize> Unpin for Pow5Chip<F, WIDTH, RATE>where F: Unpin,

§

impl<F, const WIDTH: usize, const RATE: usize> UnwindSafe for Pow5Chip<F, WIDTH, RATE>where F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere @@ -139,5 +139,5 @@
Side-effects
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/struct.Pow5Config.html b/halo2_gadgets/poseidon/struct.Pow5Config.html index 08e261ab38..b659e11ee2 100644 --- a/halo2_gadgets/poseidon/struct.Pow5Config.html +++ b/halo2_gadgets/poseidon/struct.Pow5Config.html @@ -113,5 +113,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/struct.Sponge.html b/halo2_gadgets/poseidon/struct.Sponge.html index 4c9a81c8b5..da4627a738 100644 --- a/halo2_gadgets/poseidon/struct.Sponge.html +++ b/halo2_gadgets/poseidon/struct.Sponge.html @@ -16,21 +16,21 @@
pub struct Sponge<F: Field, PoseidonChip: PoseidonSpongeInstructions<F, S, D, T, RATE>, S: Spec<F, T, RATE>, M: SpongeMode, D: Domain<F, RATE>, const T: usize, const RATE: usize> { /* private fields */ }
Expand description

A Poseidon sponge.

Implementations§

source§

impl<F: Field, PoseidonChip: PoseidonSpongeInstructions<F, S, D, T, RATE>, S: Spec<F, T, RATE>, D: Domain<F, RATE>, const T: usize, const RATE: usize> Sponge<F, PoseidonChip, S, Absorbing<PaddedWord<F>, RATE>, D, T, RATE>

source

pub fn new( chip: PoseidonChip, - layouter: impl Layouter<F> -) -> Result<Self, Error>

Constructs a new duplex sponge for the given Poseidon specification.

+ layouter: impl Layouter<F> +) -> Result<Self, Error>

Constructs a new duplex sponge for the given Poseidon specification.

source

pub fn absorb( &mut self, - layouter: impl Layouter<F>, + layouter: impl Layouter<F>, value: PaddedWord<F> -) -> Result<(), Error>

Absorbs an element into the sponge.

+) -> Result<(), Error>

Absorbs an element into the sponge.

source

pub fn finish_absorbing( self, - layouter: impl Layouter<F> -) -> Result<Sponge<F, PoseidonChip, S, Squeezing<PoseidonChip::Word, RATE>, D, T, RATE>, Error>

Transitions the sponge into its squeezing state.

+ layouter: impl Layouter<F> +) -> Result<Sponge<F, PoseidonChip, S, Squeezing<PoseidonChip::Word, RATE>, D, T, RATE>, Error>

Transitions the sponge into its squeezing state.

source§

impl<F: Field, PoseidonChip: PoseidonSpongeInstructions<F, S, D, T, RATE>, S: Spec<F, T, RATE>, D: Domain<F, RATE>, const T: usize, const RATE: usize> Sponge<F, PoseidonChip, S, Squeezing<PoseidonChip::Word, RATE>, D, T, RATE>

source

pub fn squeeze( &mut self, - layouter: impl Layouter<F> -) -> Result<AssignedCell<F, F>, Error>

Squeezes an element from the sponge.

+ layouter: impl Layouter<F> +) -> Result<AssignedCell<F, F>, Error>

Squeezes an element from the sponge.

Trait Implementations§

source§

impl<F: Debug + Field, PoseidonChip: Debug + PoseidonSpongeInstructions<F, S, D, T, RATE>, S: Debug + Spec<F, T, RATE>, M: Debug + SpongeMode, D: Debug + Domain<F, RATE>, const T: usize, const RATE: usize> Debug for Sponge<F, PoseidonChip, S, M, D, T, RATE>where PoseidonChip::Word: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F, PoseidonChip, S, M, D, const T: usize, const RATE: usize> RefUnwindSafe for Sponge<F, PoseidonChip, S, M, D, T, RATE>where D: RefUnwindSafe, @@ -147,5 +147,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/struct.StateWord.html b/halo2_gadgets/poseidon/struct.StateWord.html index 7ce1dc75d5..cd6479ed7b 100644 --- a/halo2_gadgets/poseidon/struct.StateWord.html +++ b/halo2_gadgets/poseidon/struct.StateWord.html @@ -14,7 +14,7 @@ });
pub struct StateWord<F: Field>(/* private fields */);
Expand description

A word in the Poseidon state.

-

Trait Implementations§

source§

impl<F: Clone + Field> Clone for StateWord<F>

source§

fn clone(&self) -> StateWord<F>

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<F: Debug + Field> Debug for StateWord<F>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: Field> From<AssignedCell<F, F>> for StateWord<F>

source§

fn from(cell_value: AssignedCell<F, F>) -> StateWord<F>

Converts to this type from the input type.
source§

impl<F: Field> From<StateWord<F>> for AssignedCell<F, F>

source§

fn from(state_word: StateWord<F>) -> AssignedCell<F, F>

Converts to this type from the input type.
source§

impl<F: Field> Var<F> for StateWord<F>

source§

fn cell(&self) -> Cell

The cell at which this variable was allocated.
source§

fn value(&self) -> Value<F>

The value allocated to this variable.

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for StateWord<F>where +

Trait Implementations§

source§

impl<F: Clone + Field> Clone for StateWord<F>

source§

fn clone(&self) -> StateWord<F>

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<F: Debug + Field> Debug for StateWord<F>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: Field> From<AssignedCell<F, F>> for StateWord<F>

source§

fn from(cell_value: AssignedCell<F, F>) -> StateWord<F>

Converts to this type from the input type.
source§

impl<F: Field> From<StateWord<F>> for AssignedCell<F, F>

source§

fn from(state_word: StateWord<F>) -> AssignedCell<F, F>

Converts to this type from the input type.
source§

impl<F: Field> Var<F> for StateWord<F>

source§

fn cell(&self) -> Cell

The cell at which this variable was allocated.
source§

fn value(&self) -> Value<F>

The value allocated to this variable.

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for StateWord<F>where F: RefUnwindSafe,

§

impl<F> Send for StateWord<F>

§

impl<F> Sync for StateWord<F>

§

impl<F> Unpin for StateWord<F>where F: Unpin,

§

impl<F> UnwindSafe for StateWord<F>where F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere @@ -113,5 +113,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/struct.Word.html b/halo2_gadgets/poseidon/struct.Word.html index d8d3c04984..e2af990714 100644 --- a/halo2_gadgets/poseidon/struct.Word.html +++ b/halo2_gadgets/poseidon/struct.Word.html @@ -117,5 +117,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/trait.PoseidonInstructions.html b/halo2_gadgets/poseidon/trait.PoseidonInstructions.html index 37c9de8650..7faeedac83 100644 --- a/halo2_gadgets/poseidon/trait.PoseidonInstructions.html +++ b/halo2_gadgets/poseidon/trait.PoseidonInstructions.html @@ -13,20 +13,20 @@ }); }); -
pub trait PoseidonInstructions<F: Field, S: Spec<F, T, RATE>, const T: usize, const RATE: usize>: Chip<F> {
-    type Word: Clone + Debug + From<AssignedCell<F, F>> + Into<AssignedCell<F, F>>;
+
pub trait PoseidonInstructions<F: Field, S: Spec<F, T, RATE>, const T: usize, const RATE: usize>: Chip<F> {
+    type Word: Clone + Debug + From<AssignedCell<F, F>> + Into<AssignedCell<F, F>>;
 
     // Required method
     fn permute(
         &self,
-        layouter: &mut impl Layouter<F>,
+        layouter: &mut impl Layouter<F>,
         initial_state: &[Self::Word; T]
-    ) -> Result<[Self::Word; T], Error>;
+    ) -> Result<[Self::Word; T], Error>;
 }
Expand description

The set of circuit instructions required to use the Poseidon permutation.

-

Required Associated Types§

source

type Word: Clone + Debug + From<AssignedCell<F, F>> + Into<AssignedCell<F, F>>

Variable representing the word over which the Poseidon permutation operates.

+

Required Associated Types§

source

type Word: Clone + Debug + From<AssignedCell<F, F>> + Into<AssignedCell<F, F>>

Variable representing the word over which the Poseidon permutation operates.

Required Methods§

source

fn permute( &self, - layouter: &mut impl Layouter<F>, + layouter: &mut impl Layouter<F>, initial_state: &[Self::Word; T] -) -> Result<[Self::Word; T], Error>

Applies the Poseidon permutation to the given state.

+) -> Result<[Self::Word; T], Error>

Applies the Poseidon permutation to the given state.

Implementors§

source§

impl<F: Field, S: Spec<F, WIDTH, RATE>, const WIDTH: usize, const RATE: usize> PoseidonInstructions<F, S, WIDTH, RATE> for Pow5Chip<F, WIDTH, RATE>

§

type Word = StateWord<F>

\ No newline at end of file diff --git a/halo2_gadgets/poseidon/trait.PoseidonSpongeInstructions.html b/halo2_gadgets/poseidon/trait.PoseidonSpongeInstructions.html index 3d02d46e9a..e7057ca7b0 100644 --- a/halo2_gadgets/poseidon/trait.PoseidonSpongeInstructions.html +++ b/halo2_gadgets/poseidon/trait.PoseidonSpongeInstructions.html @@ -17,25 +17,25 @@ // Required methods fn initial_state( &self, - layouter: &mut impl Layouter<F> - ) -> Result<[Self::Word; T], Error>; + layouter: &mut impl Layouter<F> + ) -> Result<[Self::Word; T], Error>; fn add_input( &self, - layouter: &mut impl Layouter<F>, + layouter: &mut impl Layouter<F>, initial_state: &[Self::Word; T], input: &Absorbing<PaddedWord<F>, RATE> - ) -> Result<[Self::Word; T], Error>; + ) -> Result<[Self::Word; T], Error>; fn get_output(state: &[Self::Word; T]) -> Squeezing<Self::Word, RATE>; }
Expand description

The set of circuit instructions required to use the Sponge and Hash gadgets.

Required Methods§

source

fn initial_state( &self, - layouter: &mut impl Layouter<F> -) -> Result<[Self::Word; T], Error>

Returns the initial empty state for the given domain.

+ layouter: &mut impl Layouter<F> +) -> Result<[Self::Word; T], Error>

Returns the initial empty state for the given domain.

source

fn add_input( &self, - layouter: &mut impl Layouter<F>, + layouter: &mut impl Layouter<F>, initial_state: &[Self::Word; T], input: &Absorbing<PaddedWord<F>, RATE> -) -> Result<[Self::Word; T], Error>

Adds the given input to the state.

+) -> Result<[Self::Word; T], Error>

Adds the given input to the state.

source

fn get_output(state: &[Self::Word; T]) -> Squeezing<Self::Word, RATE>

Extracts sponge output from the given state.

Implementors§

source§

impl<F: Field, S: Spec<F, WIDTH, RATE>, D: Domain<F, RATE>, const WIDTH: usize, const RATE: usize> PoseidonSpongeInstructions<F, S, D, WIDTH, RATE> for Pow5Chip<F, WIDTH, RATE>

\ No newline at end of file diff --git a/halo2_gadgets/sha256/struct.BlockWord.html b/halo2_gadgets/sha256/struct.BlockWord.html index 7a13da17eb..ba26b469d5 100644 --- a/halo2_gadgets/sha256/struct.BlockWord.html +++ b/halo2_gadgets/sha256/struct.BlockWord.html @@ -13,8 +13,8 @@ }); }); -
pub struct BlockWord(pub Value<u32>);
Available on crate feature unstable only.
Expand description

A word in a Table16 message block.

-

Tuple Fields§

§0: Value<u32>

Trait Implementations§

source§

impl Clone for BlockWord

source§

fn clone(&self) -> BlockWord

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 Debug for BlockWord

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for BlockWord

source§

fn default() -> BlockWord

Returns the “default value” for a type. Read more
source§

impl Copy for BlockWord

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +
pub struct BlockWord(pub Value<u32>);
Available on crate feature unstable only.
Expand description

A word in a Table16 message block.

+

Tuple Fields§

§0: Value<u32>

Trait Implementations§

source§

impl Clone for BlockWord

source§

fn clone(&self) -> BlockWord

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 Debug for BlockWord

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for BlockWord

source§

fn default() -> BlockWord

Returns the “default value” for a type. Read more
source§

impl Copy for BlockWord

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere @@ -110,5 +110,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sha256/struct.Sha256.html b/halo2_gadgets/sha256/struct.Sha256.html index 55d6a50c5c..e03a84e80a 100644 --- a/halo2_gadgets/sha256/struct.Sha256.html +++ b/halo2_gadgets/sha256/struct.Sha256.html @@ -15,21 +15,21 @@
pub struct Sha256<F: Field, CS: Sha256Instructions<F>> { /* private fields */ }
Available on crate feature unstable only.
Expand description

A gadget that constrains a SHA-256 invocation. It supports input at a granularity of 32 bits.

-

Implementations§

source§

impl<F: Field, Sha256Chip: Sha256Instructions<F>> Sha256<F, Sha256Chip>

source

pub fn new(chip: Sha256Chip, layouter: impl Layouter<F>) -> Result<Self, Error>

Create a new hasher instance.

+

Implementations§

source§

impl<F: Field, Sha256Chip: Sha256Instructions<F>> Sha256<F, Sha256Chip>

source

pub fn new(chip: Sha256Chip, layouter: impl Layouter<F>) -> Result<Self, Error>

Create a new hasher instance.

source

pub fn update( &mut self, - layouter: impl Layouter<F>, + layouter: impl Layouter<F>, data: &[Sha256Chip::BlockWord] -) -> Result<(), Error>

Digest data, updating the internal state.

+) -> Result<(), Error>

Digest data, updating the internal state.

source

pub fn finalize( self, - layouter: impl Layouter<F> -) -> Result<Sha256Digest<Sha256Chip::BlockWord>, Error>

Retrieve result and consume hasher instance.

+ layouter: impl Layouter<F> +) -> Result<Sha256Digest<Sha256Chip::BlockWord>, Error>

Retrieve result and consume hasher instance.

source

pub fn digest( chip: Sha256Chip, - layouter: impl Layouter<F>, + layouter: impl Layouter<F>, data: &[Sha256Chip::BlockWord] -) -> Result<Sha256Digest<Sha256Chip::BlockWord>, Error>

Convenience function to compute hash of the data. It will handle hasher creation, +) -> Result<Sha256Digest<Sha256Chip::BlockWord>, Error>

Convenience function to compute hash of the data. It will handle hasher creation, data feeding and finalization.

Trait Implementations§

source§

impl<F: Debug + Field, CS: Debug + Sha256Instructions<F>> Debug for Sha256<F, CS>where CS::State: Debug, @@ -143,5 +143,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sha256/struct.Sha256Digest.html b/halo2_gadgets/sha256/struct.Sha256Digest.html index 206e559721..6ddf16dd5b 100644 --- a/halo2_gadgets/sha256/struct.Sha256Digest.html +++ b/halo2_gadgets/sha256/struct.Sha256Digest.html @@ -114,5 +114,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sha256/struct.Table16Chip.html b/halo2_gadgets/sha256/struct.Table16Chip.html index 279f7411cd..65ae091b2a 100644 --- a/halo2_gadgets/sha256/struct.Table16Chip.html +++ b/halo2_gadgets/sha256/struct.Table16Chip.html @@ -14,36 +14,36 @@ });
pub struct Table16Chip { /* private fields */ }
Available on crate feature unstable only.
Expand description

A chip that implements SHA-256 with a maximum lookup table size of $2^16$.

-

Implementations§

source§

impl Table16Chip

source

pub fn construct(config: <Self as Chip<Base>>::Config) -> Self

Reconstructs this chip from the given config.

+

Implementations§

source§

impl Table16Chip

source

pub fn construct(config: <Self as Chip<Base>>::Config) -> Self

Reconstructs this chip from the given config.

source

pub fn configure( - meta: &mut ConstraintSystem<Base> -) -> <Self as Chip<Base>>::Config

Configures a circuit to include this chip.

+ meta: &mut ConstraintSystem<Base> +) -> <Self as Chip<Base>>::Config

Configures a circuit to include this chip.

source

pub fn load( config: Table16Config, - layouter: &mut impl Layouter<Base> -) -> Result<(), Error>

Loads the lookup table required by this chip into the circuit.

-

Trait Implementations§

source§

impl Chip<Fp> for Table16Chip

§

type Config = Table16Config

A type that holds the configuration for this chip, and any other state it may need -during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of -Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit -synthesis. Read more
source§

impl Clone for Table16Chip

source§

fn clone(&self) -> Table16Chip

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 Debug for Table16Chip

source§

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

Formats the value using the given formatter. Read more
source§

impl Sha256Instructions<Fp> for Table16Chip

§

type State = State

Variable representing the SHA-256 internal state.
§

type BlockWord = BlockWord

Variable representing a 32-bit word of the input block to the SHA-256 compression + layouter: &mut impl Layouter<Base> +) -> Result<(), Error>

Loads the lookup table required by this chip into the circuit.

+

Trait Implementations§

source§

impl Chip<Fp> for Table16Chip

§

type Config = Table16Config

A type that holds the configuration for this chip, and any other state it may need +during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of +Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit +synthesis. Read more
source§

impl Clone for Table16Chip

source§

fn clone(&self) -> Table16Chip

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 Debug for Table16Chip

source§

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

Formats the value using the given formatter. Read more
source§

impl Sha256Instructions<Fp> for Table16Chip

§

type State = State

Variable representing the SHA-256 internal state.
§

type BlockWord = BlockWord

Variable representing a 32-bit word of the input block to the SHA-256 compression function.
source§

fn initialization_vector( &self, - layouter: &mut impl Layouter<Base> -) -> Result<State, Error>

Places the SHA-256 IV in the circuit, returning the initial state variable.
source§

fn initialization( + layouter: &mut impl Layouter<Base> +) -> Result<State, Error>

Places the SHA-256 IV in the circuit, returning the initial state variable.
source§

fn initialization( &self, - layouter: &mut impl Layouter<Base>, + layouter: &mut impl Layouter<Base>, init_state: &Self::State -) -> Result<Self::State, Error>

Creates an initial state from the output state of a previous block
source§

fn compress( +) -> Result<Self::State, Error>

Creates an initial state from the output state of a previous block
source§

fn compress( &self, - layouter: &mut impl Layouter<Base>, + layouter: &mut impl Layouter<Base>, initialized_state: &Self::State, input: [Self::BlockWord; 16] -) -> Result<Self::State, Error>

Starting from the given initialized state, processes a block of input and returns the +) -> Result<Self::State, Error>
Starting from the given initialized state, processes a block of input and returns the final state.
source§

fn digest( &self, - layouter: &mut impl Layouter<Base>, + layouter: &mut impl Layouter<Base>, state: &Self::State -) -> Result<[Self::BlockWord; 8], Error>

Converts the given state into a message digest.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +) -> Result<[Self::BlockWord; 8], Error>

Converts the given state into a message digest.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere @@ -139,5 +139,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sha256/struct.Table16Config.html b/halo2_gadgets/sha256/struct.Table16Config.html index 0f5649f88b..39665cda73 100644 --- a/halo2_gadgets/sha256/struct.Table16Config.html +++ b/halo2_gadgets/sha256/struct.Table16Config.html @@ -110,5 +110,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sha256/trait.Sha256Instructions.html b/halo2_gadgets/sha256/trait.Sha256Instructions.html index 6b190748a0..dbc94437a1 100644 --- a/halo2_gadgets/sha256/trait.Sha256Instructions.html +++ b/halo2_gadgets/sha256/trait.Sha256Instructions.html @@ -13,54 +13,54 @@ }); }); -
pub trait Sha256Instructions<F: Field>: Chip<F> {
+
pub trait Sha256Instructions<F: Field>: Chip<F> {
     type State: Clone + Debug;
     type BlockWord: Copy + Debug + Default;
 
     // Required methods
     fn initialization_vector(
         &self,
-        layouter: &mut impl Layouter<F>
-    ) -> Result<Self::State, Error>;
+        layouter: &mut impl Layouter<F>
+    ) -> Result<Self::State, Error>;
     fn initialization(
         &self,
-        layouter: &mut impl Layouter<F>,
+        layouter: &mut impl Layouter<F>,
         init_state: &Self::State
-    ) -> Result<Self::State, Error>;
+    ) -> Result<Self::State, Error>;
     fn compress(
         &self,
-        layouter: &mut impl Layouter<F>,
+        layouter: &mut impl Layouter<F>,
         initialized_state: &Self::State,
         input: [Self::BlockWord; 16]
-    ) -> Result<Self::State, Error>;
+    ) -> Result<Self::State, Error>;
     fn digest(
         &self,
-        layouter: &mut impl Layouter<F>,
+        layouter: &mut impl Layouter<F>,
         state: &Self::State
-    ) -> Result<[Self::BlockWord; 8], Error>;
+    ) -> Result<[Self::BlockWord; 8], Error>;
 }
Available on crate feature unstable only.
Expand description

The set of circuit instructions required to use the Sha256 gadget.

Required Associated Types§

source

type State: Clone + Debug

Variable representing the SHA-256 internal state.

source

type BlockWord: Copy + Debug + Default

Variable representing a 32-bit word of the input block to the SHA-256 compression function.

Required Methods§

source

fn initialization_vector( &self, - layouter: &mut impl Layouter<F> -) -> Result<Self::State, Error>

Places the SHA-256 IV in the circuit, returning the initial state variable.

+ layouter: &mut impl Layouter<F> +) -> Result<Self::State, Error>

Places the SHA-256 IV in the circuit, returning the initial state variable.

source

fn initialization( &self, - layouter: &mut impl Layouter<F>, + layouter: &mut impl Layouter<F>, init_state: &Self::State -) -> Result<Self::State, Error>

Creates an initial state from the output state of a previous block

+) -> Result<Self::State, Error>

Creates an initial state from the output state of a previous block

source

fn compress( &self, - layouter: &mut impl Layouter<F>, + layouter: &mut impl Layouter<F>, initialized_state: &Self::State, input: [Self::BlockWord; 16] -) -> Result<Self::State, Error>

Starting from the given initialized state, processes a block of input and returns the +) -> Result<Self::State, Error>

Starting from the given initialized state, processes a block of input and returns the final state.

source

fn digest( &self, - layouter: &mut impl Layouter<F>, + layouter: &mut impl Layouter<F>, state: &Self::State -) -> Result<[Self::BlockWord; 8], Error>

Converts the given state into a message digest.

+) -> Result<[Self::BlockWord; 8], Error>

Converts the given state into a message digest.

Implementors§

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/chip/struct.SinsemillaChip.html b/halo2_gadgets/sinsemilla/chip/struct.SinsemillaChip.html index 1966e65eb8..2363da57e8 100644 --- a/halo2_gadgets/sinsemilla/chip/struct.SinsemillaChip.html +++ b/halo2_gadgets/sinsemilla/chip/struct.SinsemillaChip.html @@ -21,27 +21,27 @@

Implementations§

source§

impl<Hash, Commit, F> SinsemillaChip<Hash, Commit, F>where Hash: HashDomains<Affine>, F: FixedPoints<Affine>, - Commit: CommitDomains<Affine, F, Hash>,

source

pub fn construct(config: <Self as Chip<Base>>::Config) -> Self

Reconstructs this chip from the given config.

+ Commit: CommitDomains<Affine, F, Hash>,
source

pub fn construct(config: <Self as Chip<Base>>::Config) -> Self

Reconstructs this chip from the given config.

source

pub fn load( config: SinsemillaConfig<Hash, Commit, F>, - layouter: &mut impl Layouter<Base> -) -> Result<<Self as Chip<Base>>::Loaded, Error>

Loads the lookup table required by this chip into the circuit.

+ layouter: &mut impl Layouter<Base> +) -> Result<<Self as Chip<Base>>::Loaded, Error>

Loads the lookup table required by this chip into the circuit.

source

pub fn configure( - meta: &mut ConstraintSystem<Base>, - advices: [Column<Advice>; 5], - witness_pieces: Column<Advice>, - fixed_y_q: Column<Fixed>, - lookup: (TableColumn, TableColumn, TableColumn), + meta: &mut ConstraintSystem<Base>, + advices: [Column<Advice>; 5], + witness_pieces: Column<Advice>, + fixed_y_q: Column<Fixed>, + lookup: (TableColumn, TableColumn, TableColumn), range_check: LookupRangeCheckConfig<Base, { sinsemilla::K }> -) -> <Self as Chip<Base>>::Config

Side-effects
+) -> <Self as Chip<Base>>::Config
Side-effects

All columns in advices and will be equality-enabled.

-

Trait Implementations§

source§

impl<Hash, Commit, Fixed> Chip<Fp> for SinsemillaChip<Hash, Commit, Fixed>where +

Trait Implementations§

source§

impl<Hash, Commit, Fixed> Chip<Fp> for SinsemillaChip<Hash, Commit, Fixed>where Hash: HashDomains<Affine>, Fixed: FixedPoints<Affine>, - Commit: CommitDomains<Affine, Fixed, Hash>,

§

type Config = SinsemillaConfig<Hash, Commit, Fixed>

A type that holds the configuration for this chip, and any other state it may need -during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of -Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit -synthesis. Read more
source§

impl<Hash, Commit, Fixed> Clone for SinsemillaChip<Hash, Commit, Fixed>where + Commit: CommitDomains<Affine, Fixed, Hash>,

§

type Config = SinsemillaConfig<Hash, Commit, Fixed>

A type that holds the configuration for this chip, and any other state it may need +during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of +Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit +synthesis. Read more
source§

impl<Hash, Commit, Fixed> Clone for SinsemillaChip<Hash, Commit, Fixed>where Hash: HashDomains<Affine> + Clone, Fixed: FixedPoints<Affine> + Clone, Commit: CommitDomains<Affine, Fixed, Hash> + Clone,

source§

fn clone(&self) -> SinsemillaChip<Hash, Commit, Fixed>

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<Hash, Commit, Fixed> Debug for SinsemillaChip<Hash, Commit, Fixed>where @@ -55,23 +55,23 @@ sufficient, and should not be overridden without very good reason.

source§

impl<Hash, Commit, F> SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }> for SinsemillaChip<Hash, Commit, F>where Hash: HashDomains<Affine>, F: FixedPoints<Affine>, - Commit: CommitDomains<Affine, F, Hash>,

§

type CellValue = AssignedCell<Fp, Fp>

A variable in the circuit.
§

type Message = Message<Fp, { sinsemilla::K }, { sinsemilla::C }>

A message composed of Self::MessagePieces.
§

type MessagePiece = MessagePiece<Fp, { sinsemilla::K }>

A piece in a message containing a number of K-bit words. + Commit: CommitDomains<Affine, F, Hash>,
§

type CellValue = AssignedCell<Fp, Fp>

A variable in the circuit.
§

type Message = Message<Fp, { sinsemilla::K }, { sinsemilla::C }>

A message composed of Self::MessagePieces.
§

type MessagePiece = MessagePiece<Fp, { sinsemilla::K }>

A piece in a message containing a number of K-bit words. A Self::MessagePiece fits in a single base field element, which means it can only contain up to N words, where N*K <= C::Base::CAPACITY. Read more
§

type RunningSum = Vec<<SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::CellValue>

A cumulative sum z is used to decompose a Sinsemilla message. It produces intermediate values for each word in the message, such -that z_next = (z_cur - word_next) / 2^K. Read more
§

type X = AssignedCell<Fp, Fp>

The x-coordinate of a point output of Self::hash_to_point.
§

type NonIdentityPoint = NonIdentityEccPoint

A point output of Self::hash_to_point.
§

type FixedPoints = F

A type enumerating the fixed points used in CommitDomains.
§

type HashDomains = Hash

HashDomains used in this instruction.
§

type CommitDomains = Commit

CommitDomains used in this instruction.
source§

fn witness_message_piece( +that z_next = (z_cur - word_next) / 2^K. Read more

§

type X = AssignedCell<Fp, Fp>

The x-coordinate of a point output of Self::hash_to_point.
§

type NonIdentityPoint = NonIdentityEccPoint

A point output of Self::hash_to_point.
§

type FixedPoints = F

A type enumerating the fixed points used in CommitDomains.
§

type HashDomains = Hash

HashDomains used in this instruction.
§

type CommitDomains = Commit

CommitDomains used in this instruction.
source§

fn witness_message_piece( &self, - layouter: impl Layouter<Base>, - field_elem: Value<Base>, + layouter: impl Layouter<Base>, + field_elem: Value<Base>, num_words: usize -) -> Result<Self::MessagePiece, Error>

Witness a message piece given a field element. Returns a Self::MessagePiece +) -> Result<Self::MessagePiece, Error>
Witness a message piece given a field element. Returns a Self::MessagePiece encoding the given message. Read more
source§

fn hash_to_point( &self, - layouter: impl Layouter<Base>, + layouter: impl Layouter<Base>, Q: Affine, message: Self::Message -) -> Result<(Self::NonIdentityPoint, Vec<Self::RunningSum>), Error>

Hashes a message to an ECC curve point. +) -> Result<(Self::NonIdentityPoint, Vec<Self::RunningSum>), Error>
Hashes a message to an ECC curve point. This returns both the resulting point, as well as the message decomposition in the form of intermediate values in a cumulative sum.
source§

fn extract(point: &Self::NonIdentityPoint) -> Self::X

Extracts the x-coordinate of the output of a Sinsemilla hash.
source§

impl<Hash, Commit, Fixed> Eq for SinsemillaChip<Hash, Commit, Fixed>where @@ -194,5 +194,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/chip/struct.SinsemillaConfig.html b/halo2_gadgets/sinsemilla/chip/struct.SinsemillaConfig.html index 75a7bbef97..92cd53ad1c 100644 --- a/halo2_gadgets/sinsemilla/chip/struct.SinsemillaConfig.html +++ b/halo2_gadgets/sinsemilla/chip/struct.SinsemillaConfig.html @@ -152,5 +152,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/merkle/chip/struct.MerkleChip.html b/halo2_gadgets/sinsemilla/merkle/chip/struct.MerkleChip.html index b3877f09be..0a3a7d35a6 100644 --- a/halo2_gadgets/sinsemilla/merkle/chip/struct.MerkleChip.html +++ b/halo2_gadgets/sinsemilla/merkle/chip/struct.MerkleChip.html @@ -30,17 +30,17 @@ Hash: HashDomains<Affine>, F: FixedPoints<Affine>, Commit: CommitDomains<Affine, F, Hash>,
source

pub fn configure( - meta: &mut ConstraintSystem<Base>, + meta: &mut ConstraintSystem<Base>, sinsemilla_config: SinsemillaConfig<Hash, Commit, F> ) -> MerkleConfig<Hash, Commit, F>

Configures the MerkleChip.

source

pub fn construct(config: MerkleConfig<Hash, Commit, F>) -> Self

Constructs a MerkleChip given a MerkleConfig.

-

Trait Implementations§

source§

impl<Hash, Commit, Fixed> Chip<Fp> for MerkleChip<Hash, Commit, Fixed>where +

Trait Implementations§

source§

impl<Hash, Commit, Fixed> Chip<Fp> for MerkleChip<Hash, Commit, Fixed>where Hash: HashDomains<Affine>, Fixed: FixedPoints<Affine>, - Commit: CommitDomains<Affine, Fixed, Hash>,

§

type Config = MerkleConfig<Hash, Commit, Fixed>

A type that holds the configuration for this chip, and any other state it may need -during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of -Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit -synthesis. Read more
source§

impl<Hash, Commit, Fixed> Clone for MerkleChip<Hash, Commit, Fixed>where + Commit: CommitDomains<Affine, Fixed, Hash>,

§

type Config = MerkleConfig<Hash, Commit, Fixed>

A type that holds the configuration for this chip, and any other state it may need +during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of +Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit +synthesis. Read more
source§

impl<Hash, Commit, Fixed> Clone for MerkleChip<Hash, Commit, Fixed>where Hash: HashDomains<Affine> + Clone, Fixed: FixedPoints<Affine> + Clone, Commit: CommitDomains<Affine, Fixed, Hash> + Clone,

source§

fn clone(&self) -> MerkleChip<Hash, Commit, Fixed>

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<Hash, Commit, F> CondSwapInstructions<Fp> for MerkleChip<Hash, Commit, F>where @@ -48,10 +48,10 @@ F: FixedPoints<Affine>, Commit: CommitDomains<Affine, F, Hash>,

source§

fn swap( &self, - layouter: impl Layouter<Base>, - pair: (Self::Var, Value<Base>), - swap: Value<bool> -) -> Result<(Self::Var, Self::Var), Error>

Given an input pair (a,b) and a swap boolean flag, returns + layouter: impl Layouter<Base>, + pair: (Self::Var, Value<Base>), + swap: Value<bool> +) -> Result<(Self::Var, Self::Var), Error>
Given an input pair (a,b) and a swap boolean flag, returns (b,a) if swap is set, else (a,b) if swap is not set. Read more
source§

impl<Hash, Commit, Fixed> Debug for MerkleChip<Hash, Commit, Fixed>where Hash: HashDomains<Affine> + Debug, Fixed: FixedPoints<Affine> + Debug, @@ -60,12 +60,12 @@ F: FixedPoints<Affine>, Commit: CommitDomains<Affine, F, Hash> + Eq,

source§

fn hash_layer( &self, - layouter: impl Layouter<Base>, + layouter: impl Layouter<Base>, Q: Affine, l: usize, left: Self::Var, right: Self::Var -) -> Result<Self::Var, Error>

Compute MerkleCRH for a given layer. The hash that computes the root +) -> Result<Self::Var, Error>
Compute MerkleCRH for a given layer. The hash that computes the root is at layer 0, and the hashes that are applied to two leaves are at layer MERKLE_DEPTH - 1 = layer 31.
source§

impl<Hash, Commit, Fixed> PartialEq for MerkleChip<Hash, Commit, Fixed>where Hash: HashDomains<Affine> + PartialEq, @@ -82,27 +82,27 @@ produces intermediate values for each word in the message, such that z_next = (z_cur - word_next) / 2^K. Read more

§

type X = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::X

The x-coordinate of a point output of Self::hash_to_point.
§

type NonIdentityPoint = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::NonIdentityPoint

A point output of Self::hash_to_point.
§

type FixedPoints = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::FixedPoints

A type enumerating the fixed points used in CommitDomains.
§

type HashDomains = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::HashDomains

HashDomains used in this instruction.
§

type CommitDomains = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::CommitDomains

CommitDomains used in this instruction.
source§

fn witness_message_piece( &self, - layouter: impl Layouter<Base>, - value: Value<Base>, + layouter: impl Layouter<Base>, + value: Value<Base>, num_words: usize -) -> Result<Self::MessagePiece, Error>

Witness a message piece given a field element. Returns a Self::MessagePiece +) -> Result<Self::MessagePiece, Error>
Witness a message piece given a field element. Returns a Self::MessagePiece encoding the given message. Read more
source§

fn hash_to_point( &self, - layouter: impl Layouter<Base>, + layouter: impl Layouter<Base>, Q: Affine, message: Self::Message -) -> Result<(Self::NonIdentityPoint, Vec<Vec<Self::CellValue>>), Error>

Hashes a message to an ECC curve point. +) -> Result<(Self::NonIdentityPoint, Vec<Vec<Self::CellValue>>), Error>
Hashes a message to an ECC curve point. This returns both the resulting point, as well as the message decomposition in the form of intermediate values in a cumulative sum.
source§

fn extract(point: &Self::NonIdentityPoint) -> Self::X

Extracts the x-coordinate of the output of a Sinsemilla hash.
source§

impl<Hash, Commit, F> UtilitiesInstructions<Fp> for MerkleChip<Hash, Commit, F>where Hash: HashDomains<Affine>, F: FixedPoints<Affine>, - Commit: CommitDomains<Affine, F, Hash>,

§

type Var = AssignedCell<Fp, Fp>

Variable in the circuit.
source§

fn load_private( + Commit: CommitDomains<Affine, F, Hash>,

§

type Var = AssignedCell<Fp, Fp>

Variable in the circuit.
source§

fn load_private( &self, - layouter: impl Layouter<F>, - column: Column<Advice>, - value: Value<F> -) -> Result<Self::Var, Error>

Load a variable.
source§

impl<Hash, Commit, Fixed> Eq for MerkleChip<Hash, Commit, Fixed>where + layouter: impl Layouter<F>, + column: Column<Advice>, + value: Value<F> +) -> Result<Self::Var, Error>

Load a variable.
source§

impl<Hash, Commit, Fixed> Eq for MerkleChip<Hash, Commit, Fixed>where Hash: HashDomains<Affine> + Eq, Fixed: FixedPoints<Affine> + Eq, Commit: CommitDomains<Affine, Fixed, Hash> + Eq,

source§

impl<Hash, Commit, Fixed> StructuralEq for MerkleChip<Hash, Commit, Fixed>where @@ -222,5 +222,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/merkle/chip/struct.MerkleConfig.html b/halo2_gadgets/sinsemilla/merkle/chip/struct.MerkleConfig.html index edf587706c..967c48ed9b 100644 --- a/halo2_gadgets/sinsemilla/merkle/chip/struct.MerkleConfig.html +++ b/halo2_gadgets/sinsemilla/merkle/chip/struct.MerkleConfig.html @@ -148,5 +148,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/merkle/struct.MerklePath.html b/halo2_gadgets/sinsemilla/merkle/struct.MerklePath.html index 5fc95085ae..a1c549bb07 100644 --- a/halo2_gadgets/sinsemilla/merkle/struct.MerklePath.html +++ b/halo2_gadgets/sinsemilla/merkle/struct.MerklePath.html @@ -20,8 +20,8 @@ MerkleChip: MerkleInstructions<C, PATH_LENGTH, K, MAX_WORDS> + Clone,
source

pub fn construct( chips: [MerkleChip; PAR], domain: MerkleChip::HashDomains, - leaf_pos: Value<u32>, - path: Value<[C::Base; PATH_LENGTH]> + leaf_pos: Value<u32>, + path: Value<[C::Base; PATH_LENGTH]> ) -> Self

Constructs a MerklePath.

A circuit may have many more columns available than are required by a single MerkleChip. To make better use of the available circuit area, the MerklePath @@ -31,9 +31,9 @@

source§

impl<C: CurveAffine, MerkleChip, const PATH_LENGTH: usize, const K: usize, const MAX_WORDS: usize, const PAR: usize> MerklePath<C, MerkleChip, PATH_LENGTH, K, MAX_WORDS, PAR>where MerkleChip: MerkleInstructions<C, PATH_LENGTH, K, MAX_WORDS> + Clone,

source

pub fn calculate_root( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, leaf: MerkleChip::Var -) -> Result<MerkleChip::Var, Error>

Calculates the root of the tree containing the given leaf at this Merkle path.

+) -> Result<MerkleChip::Var, Error>

Calculates the root of the tree containing the given leaf at this Merkle path.

Implements Zcash Protocol Specification Section 4.9: Merkle Path Validity.

Trait Implementations§

source§

impl<C: Clone + CurveAffine, MerkleChip, const PATH_LENGTH: usize, const K: usize, const MAX_WORDS: usize, const PAR: usize> Clone for MerklePath<C, MerkleChip, PATH_LENGTH, K, MAX_WORDS, PAR>where MerkleChip: MerkleInstructions<C, PATH_LENGTH, K, MAX_WORDS> + Clone + Clone, @@ -150,5 +150,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/merkle/trait.MerkleInstructions.html b/halo2_gadgets/sinsemilla/merkle/trait.MerkleInstructions.html index 79722ff540..03d2c440b6 100644 --- a/halo2_gadgets/sinsemilla/merkle/trait.MerkleInstructions.html +++ b/halo2_gadgets/sinsemilla/merkle/trait.MerkleInstructions.html @@ -13,27 +13,27 @@ }); }); -
pub trait MerkleInstructions<C: CurveAffine, const PATH_LENGTH: usize, const K: usize, const MAX_WORDS: usize>: SinsemillaInstructions<C, K, MAX_WORDS> + CondSwapInstructions<C::Base> + UtilitiesInstructions<C::Base> + Chip<C::Base> {
+
pub trait MerkleInstructions<C: CurveAffine, const PATH_LENGTH: usize, const K: usize, const MAX_WORDS: usize>: SinsemillaInstructions<C, K, MAX_WORDS> + CondSwapInstructions<C::Base> + UtilitiesInstructions<C::Base> + Chip<C::Base> {
     // Required method
     fn hash_layer(
         &self,
-        layouter: impl Layouter<C::Base>,
+        layouter: impl Layouter<C::Base>,
         Q: C,
         l: usize,
         left: Self::Var,
         right: Self::Var
-    ) -> Result<Self::Var, Error>;
+    ) -> Result<Self::Var, Error>;
 }
Expand description

Instructions to check the validity of a Merkle path of a given PATH_LENGTH. The hash function used is a Sinsemilla instance with K-bit words. The hash function can process MAX_WORDS words.

Required Methods§

source

fn hash_layer( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, Q: C, l: usize, left: Self::Var, right: Self::Var -) -> Result<Self::Var, Error>

Compute MerkleCRH for a given layer. The hash that computes the root +) -> Result<Self::Var, Error>

Compute MerkleCRH for a given layer. The hash that computes the root is at layer 0, and the hashes that are applied to two leaves are at layer MERKLE_DEPTH - 1 = layer 31.

Implementors§

source§

impl<Hash, Commit, F, const MERKLE_DEPTH: usize> MerkleInstructions<EpAffine, MERKLE_DEPTH, { sinsemilla::K }, { sinsemilla::C }> for MerkleChip<Hash, Commit, F>where diff --git a/halo2_gadgets/sinsemilla/primitives/struct.CommitDomain.html b/halo2_gadgets/sinsemilla/primitives/struct.CommitDomain.html index 2169485d1d..203c6b3f6e 100644 --- a/halo2_gadgets/sinsemilla/primitives/struct.CommitDomain.html +++ b/halo2_gadgets/sinsemilla/primitives/struct.CommitDomain.html @@ -123,5 +123,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/primitives/struct.HashDomain.html b/halo2_gadgets/sinsemilla/primitives/struct.HashDomain.html index aed45334a7..b96b84db1a 100644 --- a/halo2_gadgets/sinsemilla/primitives/struct.HashDomain.html +++ b/halo2_gadgets/sinsemilla/primitives/struct.HashDomain.html @@ -117,5 +117,5 @@
Panics
V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/struct.CommitDomain.html b/halo2_gadgets/sinsemilla/struct.CommitDomain.html index f8a2762ce0..085d72125b 100644 --- a/halo2_gadgets/sinsemilla/struct.CommitDomain.html +++ b/halo2_gadgets/sinsemilla/struct.CommitDomain.html @@ -26,16 +26,16 @@ ) -> Self

Constructs a new CommitDomain for the given domain.

source

pub fn commit( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, message: Message<C, SinsemillaChip, K, MAX_WORDS>, r: ScalarFixed<C, EccChip> -) -> Result<(Point<C, EccChip>, Vec<SinsemillaChip::RunningSum>), Error>

$\mathsf{SinsemillaCommit}$ from § 5.4.8.4.

+) -> Result<(Point<C, EccChip>, Vec<SinsemillaChip::RunningSum>), Error>

$\mathsf{SinsemillaCommit}$ from § 5.4.8.4.

source

pub fn short_commit( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, message: Message<C, SinsemillaChip, K, MAX_WORDS>, r: ScalarFixed<C, EccChip> -) -> Result<(X<C, EccChip>, Vec<SinsemillaChip::RunningSum>), Error>

$\mathsf{SinsemillaShortCommit}$ from § 5.4.8.4.

+) -> Result<(X<C, EccChip>, Vec<SinsemillaChip::RunningSum>), Error>

$\mathsf{SinsemillaShortCommit}$ from § 5.4.8.4.

Trait Implementations§

source§

impl<C: Debug + CurveAffine, SinsemillaChip, EccChip, const K: usize, const MAX_WORDS: usize> Debug for CommitDomain<C, SinsemillaChip, EccChip, K, MAX_WORDS>where SinsemillaChip: SinsemillaInstructions<C, K, MAX_WORDS> + Clone + Debug + Eq + Debug, EccChip: EccInstructions<C, NonIdentityPoint = <SinsemillaChip as SinsemillaInstructions<C, K, MAX_WORDS>>::NonIdentityPoint, FixedPoints = <SinsemillaChip as SinsemillaInstructions<C, K, MAX_WORDS>>::FixedPoints> + Clone + Debug + Eq + Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<C, SinsemillaChip, EccChip, const K: usize, const MAX_WORDS: usize> RefUnwindSafe for CommitDomain<C, SinsemillaChip, EccChip, K, MAX_WORDS>where @@ -151,5 +151,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/struct.HashDomain.html b/halo2_gadgets/sinsemilla/struct.HashDomain.html index a4a6da3db3..391e8dfd0e 100644 --- a/halo2_gadgets/sinsemilla/struct.HashDomain.html +++ b/halo2_gadgets/sinsemilla/struct.HashDomain.html @@ -26,14 +26,14 @@ ) -> Self

Constructs a new HashDomain for the given domain.

source

pub fn hash_to_point( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, message: Message<C, SinsemillaChip, K, MAX_WORDS> -) -> Result<(NonIdentityPoint<C, EccChip>, Vec<SinsemillaChip::RunningSum>), Error>

$\mathsf{SinsemillaHashToPoint}$ from § 5.4.1.9.

+) -> Result<(NonIdentityPoint<C, EccChip>, Vec<SinsemillaChip::RunningSum>), Error>

$\mathsf{SinsemillaHashToPoint}$ from § 5.4.1.9.

source

pub fn hash( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, message: Message<C, SinsemillaChip, K, MAX_WORDS> -) -> Result<(X<C, EccChip>, Vec<SinsemillaChip::RunningSum>), Error>

$\mathsf{SinsemillaHash}$ from § 5.4.1.9.

+) -> Result<(X<C, EccChip>, Vec<SinsemillaChip::RunningSum>), Error>

$\mathsf{SinsemillaHash}$ from § 5.4.1.9.

Trait Implementations§

source§

impl<C: Debug + CurveAffine, SinsemillaChip, EccChip, const K: usize, const MAX_WORDS: usize> Debug for HashDomain<C, SinsemillaChip, EccChip, K, MAX_WORDS>where SinsemillaChip: SinsemillaInstructions<C, K, MAX_WORDS> + Clone + Debug + Eq + Debug, EccChip: EccInstructions<C, NonIdentityPoint = <SinsemillaChip as SinsemillaInstructions<C, K, MAX_WORDS>>::NonIdentityPoint, FixedPoints = <SinsemillaChip as SinsemillaInstructions<C, K, MAX_WORDS>>::FixedPoints> + Clone + Debug + Eq + Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<C, SinsemillaChip, EccChip, const K: usize, const MAX_WORDS: usize> RefUnwindSafe for HashDomain<C, SinsemillaChip, EccChip, K, MAX_WORDS>where @@ -144,5 +144,5 @@ V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/struct.Message.html b/halo2_gadgets/sinsemilla/struct.Message.html index b72c48f418..36ecb5577e 100644 --- a/halo2_gadgets/sinsemilla/struct.Message.html +++ b/halo2_gadgets/sinsemilla/struct.Message.html @@ -131,5 +131,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/struct.MessagePiece.html b/halo2_gadgets/sinsemilla/struct.MessagePiece.html index 562419ee09..a074e0c2c2 100644 --- a/halo2_gadgets/sinsemilla/struct.MessagePiece.html +++ b/halo2_gadgets/sinsemilla/struct.MessagePiece.html @@ -20,15 +20,15 @@
source§

impl<C: CurveAffine, SinsemillaChip, const K: usize, const MAX_WORDS: usize> MessagePiece<C, SinsemillaChip, K, MAX_WORDS>where SinsemillaChip: SinsemillaInstructions<C, K, MAX_WORDS> + Clone + Debug + Eq,

source

pub fn from_field_elem( chip: SinsemillaChip, - layouter: impl Layouter<C::Base>, - field_elem: Value<C::Base>, + layouter: impl Layouter<C::Base>, + field_elem: Value<C::Base>, num_words: usize -) -> Result<Self, Error>

Constructs a MessagePiece from a field element.

+) -> Result<Self, Error>

Constructs a MessagePiece from a field element.

source

pub fn from_subpieces( chip: SinsemillaChip, - layouter: impl Layouter<C::Base>, - subpieces: impl IntoIterator<Item = RangeConstrained<C::Base, Value<C::Base>>> -) -> Result<Self, Error>

Constructs a MessagePiece by concatenating a sequence of RangeConstrained + layouter: impl Layouter<C::Base>, + subpieces: impl IntoIterator<Item = RangeConstrained<C::Base, Value<C::Base>>> +) -> Result<Self, Error>

Constructs a MessagePiece by concatenating a sequence of RangeConstrained subpiece values.

The MessagePiece is assigned to the circuit, but not constrained in any way.

Panics
@@ -146,5 +146,5 @@
Panics
V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/sinsemilla/trait.SinsemillaInstructions.html b/halo2_gadgets/sinsemilla/trait.SinsemillaInstructions.html index b8ec28ee7c..2280b20e73 100644 --- a/halo2_gadgets/sinsemilla/trait.SinsemillaInstructions.html +++ b/halo2_gadgets/sinsemilla/trait.SinsemillaInstructions.html @@ -27,16 +27,16 @@ // Required methods fn witness_message_piece( &self, - layouter: impl Layouter<C::Base>, - value: Value<C::Base>, + layouter: impl Layouter<C::Base>, + value: Value<C::Base>, num_words: usize - ) -> Result<Self::MessagePiece, Error>; + ) -> Result<Self::MessagePiece, Error>; fn hash_to_point( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, Q: C, message: Self::Message - ) -> Result<(Self::NonIdentityPoint, Vec<Self::RunningSum>), Error>; + ) -> Result<(Self::NonIdentityPoint, Vec<Self::RunningSum>), Error>; fn extract(point: &Self::NonIdentityPoint) -> Self::X; }
Expand description

The set of circuit instructions required to use the Sinsemilla gadget. This trait is bounded on two constant parameters: K, the number of bits @@ -64,20 +64,20 @@

source

type CommitDomains: CommitDomains<C, Self::FixedPoints, Self::HashDomains>

CommitDomains used in this instruction.

Required Methods§

source

fn witness_message_piece( &self, - layouter: impl Layouter<C::Base>, - value: Value<C::Base>, + layouter: impl Layouter<C::Base>, + value: Value<C::Base>, num_words: usize -) -> Result<Self::MessagePiece, Error>

Witness a message piece given a field element. Returns a Self::MessagePiece +) -> Result<Self::MessagePiece, Error>

Witness a message piece given a field element. Returns a Self::MessagePiece encoding the given message.

Panics

Panics if num_words exceed the maximum number of K-bit words that can fit into a single base field element.

source

fn hash_to_point( &self, - layouter: impl Layouter<C::Base>, + layouter: impl Layouter<C::Base>, Q: C, message: Self::Message -) -> Result<(Self::NonIdentityPoint, Vec<Self::RunningSum>), Error>

Hashes a message to an ECC curve point. +) -> Result<(Self::NonIdentityPoint, Vec<Self::RunningSum>), Error>

Hashes a message to an ECC curve point. This returns both the resulting point, as well as the message decomposition in the form of intermediate values in a cumulative sum.

@@ -85,7 +85,7 @@
Panics

Implementors§

source§

impl<Hash, Commit, F> SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }> for SinsemillaChip<Hash, Commit, F>where Hash: HashDomains<Affine>, F: FixedPoints<Affine>, - Commit: CommitDomains<Affine, F, Hash>,

§

type CellValue = AssignedCell<Fp, Fp>

§

type Message = Message<Fp, { sinsemilla::K }, { sinsemilla::C }>

§

type MessagePiece = MessagePiece<Fp, { sinsemilla::K }>

§

type RunningSum = Vec<<SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::CellValue>

§

type X = AssignedCell<Fp, Fp>

§

type NonIdentityPoint = NonIdentityEccPoint

§

type FixedPoints = F

§

type HashDomains = Hash

§

type CommitDomains = Commit

source§

impl<Hash, Commit, F> SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }> for MerkleChip<Hash, Commit, F>where + Commit: CommitDomains<Affine, F, Hash>,

§

type CellValue = AssignedCell<Fp, Fp>

§

type Message = Message<Fp, { sinsemilla::K }, { sinsemilla::C }>

§

type MessagePiece = MessagePiece<Fp, { sinsemilla::K }>

§

type RunningSum = Vec<<SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::CellValue>

§

type X = AssignedCell<Fp, Fp>

§

type NonIdentityPoint = NonIdentityEccPoint

§

type FixedPoints = F

§

type HashDomains = Hash

§

type CommitDomains = Commit

source§

impl<Hash, Commit, F> SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }> for MerkleChip<Hash, Commit, F>where Hash: HashDomains<Affine>, F: FixedPoints<Affine>, Commit: CommitDomains<Affine, F, Hash>,

§

type CellValue = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::CellValue

§

type Message = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::Message

§

type MessagePiece = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::MessagePiece

§

type RunningSum = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::RunningSum

§

type X = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::X

§

type NonIdentityPoint = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::NonIdentityPoint

§

type FixedPoints = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::FixedPoints

§

type HashDomains = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::HashDomains

§

type CommitDomains = <SinsemillaChip<Hash, Commit, F> as SinsemillaInstructions<EpAffine, { sinsemilla::K }, { sinsemilla::C }>>::CommitDomains

\ No newline at end of file diff --git a/halo2_gadgets/utilities/cond_swap/struct.CondSwapChip.html b/halo2_gadgets/utilities/cond_swap/struct.CondSwapChip.html index 32926d2654..99f4125c84 100644 --- a/halo2_gadgets/utilities/cond_swap/struct.CondSwapChip.html +++ b/halo2_gadgets/utilities/cond_swap/struct.CondSwapChip.html @@ -15,27 +15,27 @@
pub struct CondSwapChip<F> { /* private fields */ }
Expand description

A chip implementing a conditional swap.

Implementations§

source§

impl<F: PrimeField> CondSwapChip<F>

source

pub fn configure( - meta: &mut ConstraintSystem<F>, - advices: [Column<Advice>; 5] + meta: &mut ConstraintSystem<F>, + advices: [Column<Advice>; 5] ) -> CondSwapConfig

Configures this chip for use in a circuit.

Side-effects

advices[0] will be equality-enabled.

source

pub fn construct(config: CondSwapConfig) -> Self

Constructs a CondSwapChip given a CondSwapConfig.

-

Trait Implementations§

source§

impl<F: Field> Chip<F> for CondSwapChip<F>

§

type Config = CondSwapConfig

A type that holds the configuration for this chip, and any other state it may need -during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of -Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit -synthesis. Read more
source§

impl<F: Clone> Clone for CondSwapChip<F>

source§

fn clone(&self) -> CondSwapChip<F>

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<F: PrimeField> CondSwapInstructions<F> for CondSwapChip<F>

Trait Implementations§

source§

impl<F: Field> Chip<F> for CondSwapChip<F>

§

type Config = CondSwapConfig

A type that holds the configuration for this chip, and any other state it may need +during circuit synthesis, that can be derived during Circuit::configure.
§

type Loaded = ()

A type that holds any general chip state that needs to be loaded at the start of +Circuit::synthesize. This might simply be () for some chips.
source§

fn config(&self) -> &Self::Config

The chip holds its own configuration.
source§

fn loaded(&self) -> &Self::Loaded

Provides access to general chip state loaded at the beginning of circuit +synthesis. Read more
source§

impl<F: Clone> Clone for CondSwapChip<F>

source§

fn clone(&self) -> CondSwapChip<F>

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<F: PrimeField> CondSwapInstructions<F> for CondSwapChip<F>

source§

fn swap( &self, - layouter: impl Layouter<F>, - pair: (Self::Var, Value<F>), - swap: Value<bool> -) -> Result<(Self::Var, Self::Var), Error>

Given an input pair (a,b) and a swap boolean flag, returns -(b,a) if swap is set, else (a,b) if swap is not set. Read more
source§

impl<F: Debug> Debug for CondSwapChip<F>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: Field> UtilitiesInstructions<F> for CondSwapChip<F>

§

type Var = AssignedCell<F, F>

Variable in the circuit.
source§

fn load_private( + layouter: impl Layouter<F>, + pair: (Self::Var, Value<F>), + swap: Value<bool> +) -> Result<(Self::Var, Self::Var), Error>

Given an input pair (a,b) and a swap boolean flag, returns +(b,a) if swap is set, else (a,b) if swap is not set. Read more
source§

impl<F: Debug> Debug for CondSwapChip<F>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: Field> UtilitiesInstructions<F> for CondSwapChip<F>

§

type Var = AssignedCell<F, F>

Variable in the circuit.
source§

fn load_private( &self, - layouter: impl Layouter<F>, - column: Column<Advice>, - value: Value<F> -) -> Result<Self::Var, Error>

Load a variable.

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for CondSwapChip<F>where + layouter: impl Layouter<F>, + column: Column<Advice>, + value: Value<F> +) -> Result<Self::Var, Error>

Load a variable.

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for CondSwapChip<F>where F: RefUnwindSafe,

§

impl<F> Send for CondSwapChip<F>where F: Send,

§

impl<F> Sync for CondSwapChip<F>where F: Sync,

§

impl<F> Unpin for CondSwapChip<F>where @@ -136,5 +136,5 @@
Side-effects
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/utilities/cond_swap/struct.CondSwapConfig.html b/halo2_gadgets/utilities/cond_swap/struct.CondSwapConfig.html index c6a27cb95b..eb2f1c2138 100644 --- a/halo2_gadgets/utilities/cond_swap/struct.CondSwapConfig.html +++ b/halo2_gadgets/utilities/cond_swap/struct.CondSwapConfig.html @@ -112,5 +112,5 @@ V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more
source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/utilities/cond_swap/trait.CondSwapInstructions.html b/halo2_gadgets/utilities/cond_swap/trait.CondSwapInstructions.html index a0e3878473..9b1c16b331 100644 --- a/halo2_gadgets/utilities/cond_swap/trait.CondSwapInstructions.html +++ b/halo2_gadgets/utilities/cond_swap/trait.CondSwapInstructions.html @@ -17,17 +17,17 @@ // Required method fn swap( &self, - layouter: impl Layouter<F>, - pair: (Self::Var, Value<F>), - swap: Value<bool> - ) -> Result<(Self::Var, Self::Var), Error>; + layouter: impl Layouter<F>, + pair: (Self::Var, Value<F>), + swap: Value<bool> + ) -> Result<(Self::Var, Self::Var), Error>; }
Expand description

Instructions for a conditional swap gadget.

Required Methods§

source

fn swap( &self, - layouter: impl Layouter<F>, - pair: (Self::Var, Value<F>), - swap: Value<bool> -) -> Result<(Self::Var, Self::Var), Error>

Given an input pair (a,b) and a swap boolean flag, returns + layouter: impl Layouter<F>, + pair: (Self::Var, Value<F>), + swap: Value<bool> +) -> Result<(Self::Var, Self::Var), Error>

Given an input pair (a,b) and a swap boolean flag, returns (b,a) if swap is set, else (a,b) if swap is not set.

The second element of the pair is required to be a witnessed value, not a variable that already exists in the circuit.

diff --git a/halo2_gadgets/utilities/decompose_running_sum/struct.RunningSum.html b/halo2_gadgets/utilities/decompose_running_sum/struct.RunningSum.html index 0a46a1dde2..e2c2cd011c 100644 --- a/halo2_gadgets/utilities/decompose_running_sum/struct.RunningSum.html +++ b/halo2_gadgets/utilities/decompose_running_sum/struct.RunningSum.html @@ -14,7 +14,7 @@ });
pub struct RunningSum<F: PrimeFieldBits>(/* private fields */);
Expand description

The running sum $[z_0, …, z_W]$. If created in strict mode, $z_W = 0$.

-

Methods from Deref<Target = Vec<AssignedCell<F, F>>>§

1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without +

Methods from Deref<Target = Vec<AssignedCell<F, F>>>§

1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without reallocating.

Examples
let mut vec: Vec<i32> = Vec::with_capacity(10);
@@ -2444,7 +2444,7 @@ 
Examples
Examples
assert_eq!(["hello", "world"].connect(" "), "hello world");
 assert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
-

Trait Implementations§

source§

impl<F: Debug + PrimeFieldBits> Debug for RunningSum<F>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: PrimeFieldBits> Deref for RunningSum<F>

§

type Target = Vec<AssignedCell<F, F>>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Vec<AssignedCell<F, F>>

Dereferences the value.

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for RunningSum<F>where +

Trait Implementations§

source§

impl<F: Debug + PrimeFieldBits> Debug for RunningSum<F>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: PrimeFieldBits> Deref for RunningSum<F>

§

type Target = Vec<AssignedCell<F, F>>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Vec<AssignedCell<F, F>>

Dereferences the value.

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for RunningSum<F>where F: RefUnwindSafe,

§

impl<F> Send for RunningSum<F>

§

impl<F> Sync for RunningSum<F>

§

impl<F> Unpin for RunningSum<F>where F: Unpin,

§

impl<F> UnwindSafe for RunningSum<F>where F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere @@ -2542,5 +2542,5 @@
Examples
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/utilities/decompose_running_sum/struct.RunningSumConfig.html b/halo2_gadgets/utilities/decompose_running_sum/struct.RunningSumConfig.html index 31964e9836..34b3af4d90 100644 --- a/halo2_gadgets/utilities/decompose_running_sum/struct.RunningSumConfig.html +++ b/halo2_gadgets/utilities/decompose_running_sum/struct.RunningSumConfig.html @@ -15,9 +15,9 @@
pub struct RunningSumConfig<F: PrimeFieldBits, const WINDOW_NUM_BITS: usize> { /* private fields */ }
Expand description

Configuration that provides methods for running sum decomposition.

Implementations§

source§

impl<F: PrimeFieldBits, const WINDOW_NUM_BITS: usize> RunningSumConfig<F, WINDOW_NUM_BITS>

source

pub fn configure( - meta: &mut ConstraintSystem<F>, - q_range_check: Selector, - z: Column<Advice> + meta: &mut ConstraintSystem<F>, + q_range_check: Selector, + z: Column<Advice> ) -> Self

perm MUST include the advice column z.

Panics

Panics if WINDOW_NUM_BITS > 3.

@@ -25,24 +25,24 @@
Side-effects

z will be equality-enabled.

source

pub fn witness_decompose( &self, - region: &mut Region<'_, F>, + region: &mut Region<'_, F>, offset: usize, - alpha: Value<F>, + alpha: Value<F>, strict: bool, word_num_bits: usize, num_windows: usize -) -> Result<RunningSum<F>, Error>

Decompose a field element alpha that is witnessed in this helper.

+) -> Result<RunningSum<F>, Error>

Decompose a field element alpha that is witnessed in this helper.

strict = true constrains the final running sum to be zero, i.e. constrains alpha to be within WINDOW_NUM_BITS * num_windows bits.

source

pub fn copy_decompose( &self, - region: &mut Region<'_, F>, + region: &mut Region<'_, F>, offset: usize, - alpha: AssignedCell<F, F>, + alpha: AssignedCell<F, F>, strict: bool, word_num_bits: usize, num_windows: usize -) -> Result<RunningSum<F>, Error>

Decompose an existing variable alpha that is copied into this helper.

+) -> Result<RunningSum<F>, Error>

Decompose an existing variable alpha that is copied into this helper.

strict = true constrains the final running sum to be zero, i.e. constrains alpha to be within WINDOW_NUM_BITS * num_windows bits.

Trait Implementations§

source§

impl<F: Clone + PrimeFieldBits, const WINDOW_NUM_BITS: usize> Clone for RunningSumConfig<F, WINDOW_NUM_BITS>

source§

fn clone(&self) -> RunningSumConfig<F, WINDOW_NUM_BITS>

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<F: Debug + PrimeFieldBits, const WINDOW_NUM_BITS: usize> Debug for RunningSumConfig<F, WINDOW_NUM_BITS>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: PartialEq + PrimeFieldBits, const WINDOW_NUM_BITS: usize> PartialEq for RunningSumConfig<F, WINDOW_NUM_BITS>

source§

fn eq(&self, other: &RunningSumConfig<F, WINDOW_NUM_BITS>) -> bool

This method tests for self and other values to be equal, and is used @@ -146,5 +146,5 @@
Side-effects
V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/utilities/fn.bool_check.html b/halo2_gadgets/utilities/fn.bool_check.html index 53dc4386a4..0efe34fae9 100644 --- a/halo2_gadgets/utilities/fn.bool_check.html +++ b/halo2_gadgets/utilities/fn.bool_check.html @@ -13,5 +13,5 @@ }); }); -
pub fn bool_check<F: PrimeField>(value: Expression<F>) -> Expression<F>
Expand description

Checks that an expression is either 1 or 0.

+
pub fn bool_check<F: PrimeField>(value: Expression<F>) -> Expression<F>
Expand description

Checks that an expression is either 1 or 0.

\ No newline at end of file diff --git a/halo2_gadgets/utilities/fn.range_check.html b/halo2_gadgets/utilities/fn.range_check.html index 6847b83908..bdfef8ca7c 100644 --- a/halo2_gadgets/utilities/fn.range_check.html +++ b/halo2_gadgets/utilities/fn.range_check.html @@ -14,8 +14,8 @@ });
pub fn range_check<F: PrimeField>(
-    word: Expression<F>,
+    word: Expression<F>,
     range: usize
-) -> Expression<F>
Expand description

Check that an expression is in the small range [0..range), +) -> Expression<F>

Expand description

Check that an expression is in the small range [0..range), i.e. 0 ≤ word < range.

\ No newline at end of file diff --git a/halo2_gadgets/utilities/fn.ternary.html b/halo2_gadgets/utilities/fn.ternary.html index 268afeff9a..afa022fafc 100644 --- a/halo2_gadgets/utilities/fn.ternary.html +++ b/halo2_gadgets/utilities/fn.ternary.html @@ -14,9 +14,9 @@ });
pub fn ternary<F: Field>(
-    a: Expression<F>,
-    b: Expression<F>,
-    c: Expression<F>
-) -> Expression<F>
Expand description

If a then b, else c. Returns (a * b) + (1 - a) * c.

+ a: Expression<F>, + b: Expression<F>, + c: Expression<F> +) -> Expression<F>
Expand description

If a then b, else c. Returns (a * b) + (1 - a) * c.

a must be a boolean-constrained expression.

\ No newline at end of file diff --git a/halo2_gadgets/utilities/lookup_range_check/struct.LookupRangeCheckConfig.html b/halo2_gadgets/utilities/lookup_range_check/struct.LookupRangeCheckConfig.html index 47f987054d..3203172206 100644 --- a/halo2_gadgets/utilities/lookup_range_check/struct.LookupRangeCheckConfig.html +++ b/halo2_gadgets/utilities/lookup_range_check/struct.LookupRangeCheckConfig.html @@ -15,9 +15,9 @@
pub struct LookupRangeCheckConfig<F: PrimeFieldBits, const K: usize> { /* private fields */ }
Expand description

Configuration that provides methods for a lookup range check.

Implementations§

source§

impl<F: PrimeFieldBits, const K: usize> LookupRangeCheckConfig<F, K>

source

pub fn configure( - meta: &mut ConstraintSystem<F>, - running_sum: Column<Advice>, - table_idx: TableColumn + meta: &mut ConstraintSystem<F>, + running_sum: Column<Advice>, + table_idx: TableColumn ) -> Self

The running_sum advice column breaks the field element into K-bit words. It is used to construct the input expression to the lookup argument.

@@ -28,34 +28,34 @@
Side-effects

Both the running_sum and constants columns will be equality-enabled.

source

pub fn copy_check( &self, - layouter: impl Layouter<F>, - element: AssignedCell<F, F>, + layouter: impl Layouter<F>, + element: AssignedCell<F, F>, num_words: usize, strict: bool -) -> Result<RunningSum<F>, Error>

Range check on an existing cell that is copied into this helper.

+) -> Result<RunningSum<F>, Error>

Range check on an existing cell that is copied into this helper.

Returns an error if element is not in a column that was passed to -[ConstraintSystem::enable_equality] during circuit configuration.

+ConstraintSystem::enable_equality during circuit configuration.

source

pub fn witness_check( &self, - layouter: impl Layouter<F>, - value: Value<F>, + layouter: impl Layouter<F>, + value: Value<F>, num_words: usize, strict: bool -) -> Result<RunningSum<F>, Error>

Range check on a value that is witnessed in this helper.

+) -> Result<RunningSum<F>, Error>

Range check on a value that is witnessed in this helper.

source

pub fn copy_short_check( &self, - layouter: impl Layouter<F>, - element: AssignedCell<F, F>, + layouter: impl Layouter<F>, + element: AssignedCell<F, F>, num_bits: usize -) -> Result<(), Error>

Short range check on an existing cell that is copied into this helper.

+) -> Result<(), Error>

Short range check on an existing cell that is copied into this helper.

Panics

Panics if NUM_BITS is equal to or larger than K.

source

pub fn witness_short_check( &self, - layouter: impl Layouter<F>, - element: Value<F>, + layouter: impl Layouter<F>, + element: Value<F>, num_bits: usize -) -> Result<AssignedCell<F, F>, Error>

Short range check on value that is witnessed in this helper.

+) -> Result<AssignedCell<F, F>, Error>

Short range check on value that is witnessed in this helper.

Panics

Panics if num_bits is larger than K.

Trait Implementations§

source§

impl<F: Clone + PrimeFieldBits, const K: usize> Clone for LookupRangeCheckConfig<F, K>

source§

fn clone(&self) -> LookupRangeCheckConfig<F, K>

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<F: Debug + PrimeFieldBits, const K: usize> Debug for LookupRangeCheckConfig<F, K>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: PartialEq + PrimeFieldBits, const K: usize> PartialEq for LookupRangeCheckConfig<F, K>

source§

fn eq(&self, other: &LookupRangeCheckConfig<F, K>) -> bool

This method tests for self and other values to be equal, and is used @@ -159,5 +159,5 @@
Panics
V: MultiLane<T>,
§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/utilities/lookup_range_check/struct.RunningSum.html b/halo2_gadgets/utilities/lookup_range_check/struct.RunningSum.html index ef18d6a95d..84fe2df76d 100644 --- a/halo2_gadgets/utilities/lookup_range_check/struct.RunningSum.html +++ b/halo2_gadgets/utilities/lookup_range_check/struct.RunningSum.html @@ -14,7 +14,7 @@ });
pub struct RunningSum<F: PrimeFieldBits>(/* private fields */);
Expand description

The running sum $[z_0, …, z_W]$. If created in strict mode, $z_W = 0$.

-

Methods from Deref<Target = Vec<AssignedCell<F, F>>>§

1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without +

Methods from Deref<Target = Vec<AssignedCell<F, F>>>§

1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without reallocating.

Examples
let mut vec: Vec<i32> = Vec::with_capacity(10);
@@ -2444,7 +2444,7 @@ 
Examples
Examples
assert_eq!(["hello", "world"].connect(" "), "hello world");
 assert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
-

Trait Implementations§

source§

impl<F: Debug + PrimeFieldBits> Debug for RunningSum<F>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: PrimeFieldBits> Deref for RunningSum<F>

§

type Target = Vec<AssignedCell<F, F>>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Vec<AssignedCell<F, F>>

Dereferences the value.

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for RunningSum<F>where +

Trait Implementations§

source§

impl<F: Debug + PrimeFieldBits> Debug for RunningSum<F>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: PrimeFieldBits> Deref for RunningSum<F>

§

type Target = Vec<AssignedCell<F, F>>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Vec<AssignedCell<F, F>>

Dereferences the value.

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for RunningSum<F>where F: RefUnwindSafe,

§

impl<F> Send for RunningSum<F>

§

impl<F> Sync for RunningSum<F>

§

impl<F> Unpin for RunningSum<F>where F: Unpin,

§

impl<F> UnwindSafe for RunningSum<F>where F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere @@ -2542,5 +2542,5 @@
Examples
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/utilities/struct.RangeConstrained.html b/halo2_gadgets/utilities/struct.RangeConstrained.html index 89711163a0..e99cf37083 100644 --- a/halo2_gadgets/utilities/struct.RangeConstrained.html +++ b/halo2_gadgets/utilities/struct.RangeConstrained.html @@ -14,23 +14,23 @@ });
pub struct RangeConstrained<F: Field, T: FieldValue<F>> { /* private fields */ }
Expand description

A type representing a range-constrained field element.

-

Implementations§

source§

impl<F: PrimeFieldBits> RangeConstrained<F, AssignedCell<F, F>>

source

pub fn witness_short<const K: usize>( +

Implementations§

source§

impl<F: PrimeFieldBits> RangeConstrained<F, AssignedCell<F, F>>

source

pub fn witness_short<const K: usize>( lookup_config: &LookupRangeCheckConfig<F, K>, - layouter: impl Layouter<F>, - value: Value<&F>, + layouter: impl Layouter<F>, + value: Value<&F>, bitrange: Range<usize> -) -> Result<Self, Error>

Witnesses a subset of the bits in value and constrains them to be the correct +) -> Result<Self, Error>

Witnesses a subset of the bits in value and constrains them to be the correct number of bits.

Panics

Panics if bitrange.len() >= K.

source§

impl<F: Field, T: FieldValue<F>> RangeConstrained<F, T>

source

pub fn inner(&self) -> &T

Returns the range-constrained inner type.

source

pub fn num_bits(&self) -> usize

Returns the number of bits to which this cell is constrained.

-
source§

impl<F: PrimeFieldBits> RangeConstrained<F, Value<F>>

source

pub fn bitrange_of(value: Value<&F>, bitrange: Range<usize>) -> Self

Constructs a RangeConstrained<Value<F>> as a bitrange of the given value.

-
source§

impl<F: Field> RangeConstrained<F, AssignedCell<F, F>>

source

pub fn unsound_unchecked(cell: AssignedCell<F, F>, num_bits: usize) -> Self

Constructs a RangeConstrained<AssignedCell<F, F>> without verifying that the +

source§

impl<F: PrimeFieldBits> RangeConstrained<F, Value<F>>

source

pub fn bitrange_of(value: Value<&F>, bitrange: Range<usize>) -> Self

Constructs a RangeConstrained<Value<F>> as a bitrange of the given value.

+
source§

impl<F: Field> RangeConstrained<F, AssignedCell<F, F>>

source

pub fn unsound_unchecked(cell: AssignedCell<F, F>, num_bits: usize) -> Self

Constructs a RangeConstrained<AssignedCell<F, F>> without verifying that the cell is correctly range constrained.

This API only exists to ease with integrating this type into existing circuits, and will likely be removed in future.

-
source

pub fn value(&self) -> RangeConstrained<F, Value<F>>

Extracts the range-constrained value from this range-constrained cell.

+
source

pub fn value(&self) -> RangeConstrained<F, Value<F>>

Extracts the range-constrained value from this range-constrained cell.

Trait Implementations§

source§

impl<F: Clone + Field, T: Clone + FieldValue<F>> Clone for RangeConstrained<F, T>

source§

fn clone(&self) -> RangeConstrained<F, T>

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<F: Debug + Field, T: Debug + FieldValue<F>> Debug for RangeConstrained<F, T>

source§

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

Formats the value using the given formatter. Read more
source§

impl<F: Copy + Field, T: Copy + FieldValue<F>> Copy for RangeConstrained<F, T>

Auto Trait Implementations§

§

impl<F, T> RefUnwindSafe for RangeConstrained<F, T>where F: RefUnwindSafe, T: RefUnwindSafe,

§

impl<F, T> Send for RangeConstrained<F, T>where @@ -135,5 +135,5 @@
Panics
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> SyncDeps for Twhere +[WithDispatch] wrapper. Read more

source§

impl<T> SyncDeps for Twhere T: Send + Sync,

\ No newline at end of file diff --git a/halo2_gadgets/utilities/trait.FieldValue.html b/halo2_gadgets/utilities/trait.FieldValue.html index dcc6bf67de..016fadb765 100644 --- a/halo2_gadgets/utilities/trait.FieldValue.html +++ b/halo2_gadgets/utilities/trait.FieldValue.html @@ -15,7 +15,7 @@
pub trait FieldValue<F: Field> {
     // Required method
-    fn value(&self) -> Value<&F>;
+    fn value(&self) -> Value<&F>;
 }
Expand description

A type that has a value at either keygen or proving time.

-

Required Methods§

source

fn value(&self) -> Value<&F>

Returns the value of this type.

-

Implementations on Foreign Types§

source§

impl<F: Field> FieldValue<F> for Value<F>

source§

fn value(&self) -> Value<&F>

source§

impl<F: Field> FieldValue<F> for AssignedCell<F, F>

source§

fn value(&self) -> Value<&F>

Implementors§

\ No newline at end of file +

Required Methods§

source

fn value(&self) -> Value<&F>

Returns the value of this type.

+

Implementations on Foreign Types§

source§

impl<F: Field> FieldValue<F> for Value<F>

source§

fn value(&self) -> Value<&F>

source§

impl<F: Field> FieldValue<F> for AssignedCell<F, F>

source§

fn value(&self) -> Value<&F>

Implementors§

\ No newline at end of file diff --git a/halo2_gadgets/utilities/trait.UtilitiesInstructions.html b/halo2_gadgets/utilities/trait.UtilitiesInstructions.html index 5ec4a3b932..089be03941 100644 --- a/halo2_gadgets/utilities/trait.UtilitiesInstructions.html +++ b/halo2_gadgets/utilities/trait.UtilitiesInstructions.html @@ -19,19 +19,19 @@ // Provided method fn load_private( &self, - layouter: impl Layouter<F>, - column: Column<Advice>, - value: Value<F> - ) -> Result<Self::Var, Error> { ... } + layouter: impl Layouter<F>, + column: Column<Advice>, + value: Value<F> + ) -> Result<Self::Var, Error> { ... } }
Expand description

Trait for utilities used across circuits.

Required Associated Types§

source

type Var: Var<F>

Variable in the circuit.

Provided Methods§

source

fn load_private( &self, - layouter: impl Layouter<F>, - column: Column<Advice>, - value: Value<F> -) -> Result<Self::Var, Error>

Load a variable.

-

Implementors§

source§

impl<F: Field> UtilitiesInstructions<F> for CondSwapChip<F>

§

type Var = AssignedCell<F, F>

source§

impl<Fixed: FixedPoints<Affine>> UtilitiesInstructions<Fp> for EccChip<Fixed>

§

type Var = AssignedCell<Fp, Fp>

source§

impl<Hash, Commit, F> UtilitiesInstructions<Fp> for MerkleChip<Hash, Commit, F>where + layouter: impl Layouter<F>, + column: Column<Advice>, + value: Value<F> +) -> Result<Self::Var, Error>

Load a variable.

+

Implementors§

source§

impl<F: Field> UtilitiesInstructions<F> for CondSwapChip<F>

§

type Var = AssignedCell<F, F>

source§

impl<Fixed: FixedPoints<Affine>> UtilitiesInstructions<Fp> for EccChip<Fixed>

§

type Var = AssignedCell<Fp, Fp>

source§

impl<Hash, Commit, F> UtilitiesInstructions<Fp> for MerkleChip<Hash, Commit, F>where Hash: HashDomains<Affine>, F: FixedPoints<Affine>, - Commit: CommitDomains<Affine, F, Hash>,

§

type Var = AssignedCell<Fp, Fp>

\ No newline at end of file + Commit: CommitDomains<Affine, F, Hash>,
§

type Var = AssignedCell<Fp, Fp>

\ No newline at end of file diff --git a/halo2_gadgets/utilities/trait.Var.html b/halo2_gadgets/utilities/trait.Var.html index e24333077f..bc21d44fb8 100644 --- a/halo2_gadgets/utilities/trait.Var.html +++ b/halo2_gadgets/utilities/trait.Var.html @@ -13,11 +13,11 @@ }); }); -
pub trait Var<F: Field>: Clone + Debug + From<AssignedCell<F, F>> {
+
pub trait Var<F: Field>: Clone + Debug + From<AssignedCell<F, F>> {
     // Required methods
-    fn cell(&self) -> Cell;
-    fn value(&self) -> Value<F>;
+    fn cell(&self) -> Cell;
+    fn value(&self) -> Value<F>;
 }
Expand description

Trait for a variable in the circuit.

-

Required Methods§

source

fn cell(&self) -> Cell

The cell at which this variable was allocated.

-
source

fn value(&self) -> Value<F>

The value allocated to this variable.

-

Implementations on Foreign Types§

source§

impl<F: Field> Var<F> for AssignedCell<F, F>

source§

fn cell(&self) -> Cell

source§

fn value(&self) -> Value<F>

Implementors§

source§

impl<F: Field> Var<F> for StateWord<F>

\ No newline at end of file +

Required Methods§

source

fn cell(&self) -> Cell

The cell at which this variable was allocated.

+
source

fn value(&self) -> Value<F>

The value allocated to this variable.

+

Implementations on Foreign Types§

source§

impl<F: Field> Var<F> for AssignedCell<F, F>

source§

fn cell(&self) -> Cell

source§

fn value(&self) -> Value<F>

Implementors§

source§

impl<F: Field> Var<F> for StateWord<F>

\ No newline at end of file diff --git a/halo2_proofs/poly/commitment/index.html b/halo2_proofs/poly/commitment/index.html index df26f8a17d..959da675c8 100644 --- a/halo2_proofs/poly/commitment/index.html +++ b/halo2_proofs/poly/commitment/index.html @@ -14,4 +14,4 @@ });
Expand description

Generic commitment scheme structures

-

Structs

  • Wrapper type around a blinding factor.

Traits

  • Defines components of a commitment scheme.
  • Multi scalar multiplication engine
  • Parameters for circuit sysnthesis and prover parameters.
  • Parameters for circuit sysnthesis and prover parameters.
  • Verifier specific functionality with circuit constaints
  • Common multi-open prover interface for various commitment schemes
  • Common multi-open verifier interface for various commitment schemes
\ No newline at end of file +

Structs

Traits

\ No newline at end of file diff --git a/halo2_proofs/poly/commitment/trait.ParamsVerifier.html b/halo2_proofs/poly/commitment/trait.ParamsVerifier.html index a70829e24b..19be278642 100644 --- a/halo2_proofs/poly/commitment/trait.ParamsVerifier.html +++ b/halo2_proofs/poly/commitment/trait.ParamsVerifier.html @@ -1,4 +1,4 @@ -ParamsVerifier in halo2_proofs::poly::commitment - Rust +ParamsVerifier in halo2_proofs::poly::commitment - Rust -
pub trait ParamsVerifier<'params, C: CurveAffine>: Params<'params, C> { }
Expand description

Verifier specific functionality with circuit constaints

+
pub trait ParamsVerifier<'params, C: CurveAffine>: Params<'params, C> { }
Expand description

Verifier specific functionality with circuit constraints

Implementors§

source§

impl<'params, C: CurveAffine> ParamsVerifier<'params, C> for ParamsIPA<C>

source§

impl<'params, E: Engine + Debug> ParamsVerifier<'params, <E as Engine>::G1Affine> for ParamsKZG<E>where E::Scalar: PrimeField, E::G1Affine: SerdeCurveAffine, diff --git a/halo2_proofs/transcript/index.html b/halo2_proofs/transcript/index.html index 8c0b7a70ee..6b03aa2dcf 100644 --- a/halo2_proofs/transcript/index.html +++ b/halo2_proofs/transcript/index.html @@ -19,4 +19,4 @@ that is used to derive the challenge encoding and get_challenge obtains the real C::Scalar that the challenge encoding represents.

  • Generic transcript view (from either the prover or verifier’s perspective)
  • Transcript view from the perspective of a verifier that has access to an input stream of data from the prover to the verifier.
  • Initializes transcript at verifier side.
  • Transcript view from the perspective of a prover that has access to an -output stream of messages from the prover to the verifier.
  • Manages begining and finising of transcript pipeline.
  • \ No newline at end of file +output stream of messages from the prover to the verifier.
  • Manages beginning and finishing of transcript pipeline.
  • \ No newline at end of file diff --git a/halo2_proofs/transcript/trait.TranscriptWriterBuffer.html b/halo2_proofs/transcript/trait.TranscriptWriterBuffer.html index a9a80dfb56..0e7c82305c 100644 --- a/halo2_proofs/transcript/trait.TranscriptWriterBuffer.html +++ b/halo2_proofs/transcript/trait.TranscriptWriterBuffer.html @@ -1,4 +1,4 @@ -TranscriptWriterBuffer in halo2_proofs::transcript - Rust +TranscriptWriterBuffer in halo2_proofs::transcript - Rust