Struct prio::pcp::types::MeanVarUnsignedVector[][src]

pub struct MeanVarUnsignedVector<F: FieldElement> { /* fields omitted */ }
Expand description

This type is used to compute the mean and variance of a sequence of integers in range [0, 2^bits) for some length parameter bits.

Each integer is encoded using bits + 1 field elements. The encoding has two parts: x_vec, the representation of the integer as a boolean vector (i.e., a sequence of 0s and 1s); and xx, which is the integer raised to the power of two. The validity circuit checks that the integer represented by x_vec is the square root of xx. It is based on the SIMD circuit of [BBG+19, Theorem 5.3].

Implementations

Encodes measurement as an instance of the MeanVarUnsignedVector type. bits specifies the maximum length of each integer in bits.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

The finite field used for this type.

Parameters used to construct a value of this type from a vector of field elements.

Evaluates the validity circuit on the given input (i.e., self) and returns the output. joint_rand is the joint randomness shared by the prover and verifier. g is the sequence of gadgets called by the circuit. Read more

The number of calls to the gadget made when evaluating the validity circuit.

The length of the random input used by both the prover and the verifier.

The length of the random input consumed by the prover to generate a proof. This is the same as the sum of the arity of each gadget in the validity circuit. Read more

The length of the random input consumed by the verifier to make queries against inputs and proofs. This is the same as the number of gadgets in the validity circuit. Read more

Returns the sequence of gadgets associated with the validity circuit. Read more

Returns a reference to the underlying data.

Returns a copy of the associated type parameters for this value.

When verifying a proof over secret shared data, this method may be used to distinguish the “leader” share from the others. This is useful, for example, when some of the gadget inputs are constants used for both proof generation and verification. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.