Skip to main content

Cmp20ErrorCode

Enum Cmp20ErrorCode 

Source
#[repr(u32)]
pub enum Cmp20ErrorCode { BAD_SHARE = 24_577, VSS_VERIFY_FAILED = 24_578, BELOW_THRESHOLD = 24_592, BAD_ROUND_MESSAGE = 24_608, BAD_PARTIAL_SIGNATURE = 24_624, IDENTIFIED_BYZANTINE = 24_640, INTERNAL = 24_831, }
Expand description

CMP20 sub-codes (0x60xx). Distinct from GG18’s 0x50xx so callers can disambiguate the source scheme from a numeric code alone.

Variants§

§

BAD_SHARE = 24_577

A share blob failed to deserialize or had the wrong magic / version. Caller action: regenerate shares via DKG; the on-disk format may have been corrupted or written by a different scheme.

§

VSS_VERIFY_FAILED = 24_578

A party’s VSS commitment did not verify against the polynomial shares it claims to distribute. Indicates a malformed or malicious share submission. Caller action: treat the contributing party as Byzantine.

§

BELOW_THRESHOLD = 24_592

Fewer than T shares were supplied for a sign / decapsulation session. The threshold was set during DKG; supplying fewer shares is a programming error, not a network fault. Caller action: collect more shares before retrying.

§

BAD_ROUND_MESSAGE = 24_608

A round message failed to deserialize or had an unexpected sender / round number. Indicates protocol desynchronization (one party is on a different round than the others) or a buggy / malicious peer. Caller action: abort the session; do not retry with the same message feed.

§

BAD_PARTIAL_SIGNATURE = 24_624

A partial signature was malformed (wrong length, out-of-range scalar) but the offending party is not identified. This is the non-identifiable-abort path; if identifiable abort is enabled, IDENTIFIED_BYZANTINE is emitted instead.

§

IDENTIFIED_BYZANTINE = 24_640

Identifiable abort: a specific peer posted an inconsistent partial signature. The carry payload identifies the offending party by its 1-based roster index in the low byte.

§

INTERNAL = 24_831

Internal error — a panic-equivalent condition was caught and converted to an error return. Indicates a bug in the CMP20 implementation; please open an issue.

Trait Implementations§

Source§

impl From<Cmp20ErrorCode> for u32

Source§

fn from(c: Cmp20ErrorCode) -> u32

Converts to this type from the input type.

Auto Trait Implementations§

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

§

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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