Skip to main content

Gg18ErrorCode

Enum Gg18ErrorCode 

Source
#[repr(u32)]
pub enum Gg18ErrorCode { BAD_SHARE = 20_481, VSS_VERIFY_FAILED = 20_482, BELOW_THRESHOLD = 20_496, BAD_ROUND_MESSAGE = 20_512, BAD_PARTIAL_SIGNATURE = 20_528, INTERNAL = 20_735, }
Expand description

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

Variants§

§

BAD_SHARE = 20_481

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 = 20_482

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 = 20_496

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 = 20_512

A round message failed to deserialize or had an unexpected sender / round number. GG18 has 4 rounds; a message from the wrong round indicates protocol desynchronization or a buggy peer. Caller action: abort the session; do not retry with the same message feed.

§

BAD_PARTIAL_SIGNATURE = 20_528

A partial signature was malformed (wrong length, out-of-range scalar). GG18 does not support identifiable abort; if you need to attribute the failure to a specific peer, use CMP20 instead.

§

INTERNAL = 20_735

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

Trait Implementations§

Source§

impl From<Gg18ErrorCode> for u32

Source§

fn from(c: Gg18ErrorCode) -> 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