Skip to main content

SsaPartCommitment

Struct SsaPartCommitment 

Source
pub struct SsaPartCommitment<S: PixSpec, P = <S as PixSpec>::Pseudonym> {
    pub(crate) spi: SsaPolynomialId<P>,
    pub(crate) constant_term: PixGroup<S>,
}
Expand description

Commitment to the constant term of the polynomial with the given SsaPolynomialId.

§Why only the constant term

This used to be a full Feldman verifier — a commitment to every coefficient — so that each individual share could be checked the moment it arrived. Classic VSS needs that, because its shares sit with mutually distrusting parties that reconstruct later. PIX has exactly one shareholder: the Exit holds every share, reconstructs locally, is the whole quorum, and consumes only the recovered constant term. Checking a₀·G == C₀ once, on the reconstructed part, is therefore deterministic and exact for the property actually relied upon — and costs one scalar multiplication per polynomial instead of threshold per share.

What the per-coefficient commitments did buy was fault isolation: one bad share could be rejected on arrival and its slot refilled from the surplus. That is given up. A share that fails to reconstruct implies a dishonest or broken Entry — it travels inside a Sphinx-authenticated SURB, and its decryption key is fixed by the very acknowledgement challenge it is filed under, so there is no benign path to a corrupt one — and such an Entry has already funded the deposit it thereby forfeits. The price paid is detection latency: a dishonest Entry is caught on the threshold-th share of a polynomial rather than the first.

surplus_shares still absorbs lost shares, since reconstruction starts at the first threshold distinct shares that arrive.

Fields§

§spi: SsaPolynomialId<P>§constant_term: PixGroup<S>

Implementations§

Source§

impl<S: PixSpec> SsaPartCommitment<S, S::Pseudonym>

Source

pub fn from_decoded_commitment( spi: SsaPolynomialId<S::Pseudonym>, constant_term: PixGroup<S>, ) -> Self

Creates a commitment from an already decoded and subgroup-checked group element.

The only decode is decode_commitment, performed once when the commitment arrives on the wire. Decompression requires a modular square root and is the dominant per-commitment cost, so nothing here decodes a second time.

Source

pub fn spi(&self) -> &SsaPolynomialId<S::Pseudonym>

Returns the SsaPolynomialId of the polynomial this commitment belongs to.

Source

pub fn constant_term(&self) -> &PixGroup<S>

Returns the commitment to the constant term of the polynomial.

Source

pub fn verify_reconstructed(&self, secret: &PixScalar<S>) -> bool

Checks a reconstructed constant term against this commitment.

This is the entire verification the Exit performs on a polynomial, and it happens once, after threshold shares have been interpolated. A mismatch means at least one of those shares did not come from the committed polynomial; it does not say which.

Source

pub fn decode_commitment( commitment: &PixGroupRepr<S>, ) -> Result<PixGroup<S>, S::Pseudonym>

Decodes a single serialized coefficient commitment into a group element.

Rejects bytes that do not decode, and points outside the prime-order subgroup: Baby JubJub has cofactor 8, so small-order points can pass the plain on-curve check.

No value-based filtering is applied — a coefficient commitment equal to the generator validly represents scalar coefficient 1 and must be preserved.

Trait Implementations§

Source§

impl<S: Clone + PixSpec, P: Clone> Clone for SsaPartCommitment<S, P>

Source§

fn clone(&self) -> SsaPartCommitment<S, P>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<S: Debug + PixSpec, P: Debug> Debug for SsaPartCommitment<S, P>

Source§

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

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

impl<'de, S: PixSpec, P> Deserialize<'de> for SsaPartCommitment<S, P>
where P: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<S: Eq + PixSpec, P: Eq> Eq for SsaPartCommitment<S, P>

Source§

impl<S: PartialEq + PixSpec, P: PartialEq> PartialEq for SsaPartCommitment<S, P>

Source§

fn eq(&self, other: &SsaPartCommitment<S, P>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl<S: PixSpec, P> Serialize for SsaPartCommitment<S, P>
where P: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<S: PartialEq + PixSpec, P: PartialEq> StructuralPartialEq for SsaPartCommitment<S, P>

Auto Trait Implementations§

§

impl<S, P> Freeze for SsaPartCommitment<S, P>
where <<S as PixSpec>::Curve as CurveArithmetic>::ProjectivePoint: Freeze, P: Freeze,

§

impl<S, P> RefUnwindSafe for SsaPartCommitment<S, P>
where <<S as PixSpec>::Curve as CurveArithmetic>::ProjectivePoint: RefUnwindSafe, P: RefUnwindSafe,

§

impl<S, P> Send for SsaPartCommitment<S, P>
where P: Send,

§

impl<S, P> Sync for SsaPartCommitment<S, P>
where P: Sync,

§

impl<S, P> Unpin for SsaPartCommitment<S, P>
where <<S as PixSpec>::Curve as CurveArithmetic>::ProjectivePoint: Unpin, P: Unpin,

§

impl<S, P> UnsafeUnpin for SsaPartCommitment<S, P>
where <<S as PixSpec>::Curve as CurveArithmetic>::ProjectivePoint: UnsafeUnpin, P: UnsafeUnpin,

§

impl<S, P> UnwindSafe for SsaPartCommitment<S, P>
where <<S as PixSpec>::Curve as CurveArithmetic>::ProjectivePoint: UnwindSafe, P: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
§

impl<'de, T> BorrowedRpcObject<'de> for T
where T: RpcBorrow<'de> + RpcSend,

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

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

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

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

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

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

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

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<'de, T> RpcBorrow<'de> for T
where T: Deserialize<'de> + Debug + Send + Sync + Unpin,

§

impl<T> RpcObject for T
where T: RpcSend + RpcRecv,

§

impl<T> RpcRecv for T
where T: DeserializeOwned + Debug + Send + Sync + Unpin + 'static,

§

impl<T> RpcSend for T
where T: Serialize + Clone + Debug + Send + Sync + Unpin,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

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

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
§

impl<V, T> VZip<V> for T
where 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