#[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.