Skip to main content

RoastCoordinator

Struct RoastCoordinator 

Source
pub struct RoastCoordinator {
    pub threshold: usize,
    pub pubkey_package: PublicKeyPackage,
    pub message: Vec<u8>,
    pub responsive_signers: BTreeSet<Identifier>,
    pub commitment_queues: BTreeMap<Identifier, VecDeque<(NonceSlotId, SigningCommitments)>>,
    pub active_sessions: BTreeMap<u128, RoastSession>,
    pub signer_to_session: BTreeMap<Identifier, u128>,
    pub banished_signers: BTreeSet<Identifier>,
    /* private fields */
}
Expand description

ROAST Coordinator (Ruffing et al., CCS 2022) wrapping preprocessed FROST(Ed25519, SHA-512). Automatically spawns parallel sessions with available signers so up to n-t stalling or malicious signers cannot delay certificate issuance.

Fields§

§threshold: usize§pubkey_package: PublicKeyPackage§message: Vec<u8>§responsive_signers: BTreeSet<Identifier>

Signers currently available (not busy in an in-flight session).

§commitment_queues: BTreeMap<Identifier, VecDeque<(NonceSlotId, SigningCommitments)>>

Preprocessed commitments per signer.

§active_sessions: BTreeMap<u128, RoastSession>

Active concurrent sessions.

§signer_to_session: BTreeMap<Identifier, u128>

Maps a busy signer to the session_id it is currently serving.

§banished_signers: BTreeSet<Identifier>

Malicious signers detected via verify_signature_share failure.

Implementations§

Source§

impl RoastCoordinator

Source

pub fn new( threshold: usize, pubkey_package: PublicKeyPackage, message: Vec<u8>, ) -> Self

Creates a fresh ROAST coordinator for a target message buffer.

Source

pub fn register_commitments( &mut self, signer_id: Identifier, commitments: Vec<(NonceSlotId, SigningCommitments)>, )

Registers a batch of preprocessed commitments from a signer and marks it responsive.

Source

pub fn try_spawn_session( &mut self, ) -> Option<(u128, SigningPackage, BTreeMap<Identifier, NonceSlotId>)>

Attempts to spawn a new parallel FROST session if responsive_signers has at least threshold signers with available preprocessed commitments.

Source

pub fn receive_share( &mut self, session_id: u128, signer_id: Identifier, share: SignatureShare, replenish: Option<(NonceSlotId, SigningCommitments)>, ) -> Result<Option<Signature>, Error>

Receives and verifies a partial SignatureShare from signer_id. Immediately isolates culprits via verify_signature_share, returns honest signers to the responsive pool, and completes signing as soon as any session gathers threshold shares.

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
Source§

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

Source§

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.

Source§

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V