Struct distrand::Reveal[][src]

pub struct Reveal<T, I, M> where
    M: Mac
{ /* fields omitted */ }

Collects Secret instances from participants and verifies them against previously collected Commit instances.

Methods

impl<T, I, M> Reveal<T, I, M> where
    M: Mac,
    I: Eq + Hash
[src]

Insert a Secret that came from a participant identified with id.

id is a unique identifier for a participant. An example might be a std::net::SocketAddr for participants using sockets to communicate.

impl<T, I, M> Reveal<T, I, M> where
    M: Mac,
    I: Eq + Hash,
    T: Serialize + BitXorAssign
[src]

Get the random value generated by XORing all participants' contributions.

Security Information

If the operation fails, the result will contain the identifiers given for the failing participants. If desired, the operation can be retried, but without those participants.

Allowing malicious participants to continue retrying random value generation will allow them to abort any outcome that disadvantages them.

Auto Trait Implementations

impl<T, I, M> Send for Reveal<T, I, M> where
    I: Send,
    T: Send,
    <M as Mac>::KeySize: ArrayLength<u8>,
    <M as Mac>::OutputSize: ArrayLength<u8>, 

impl<T, I, M> Sync for Reveal<T, I, M> where
    I: Sync,
    T: Sync,
    <M as Mac>::KeySize: ArrayLength<u8>,
    <M as Mac>::OutputSize: ArrayLength<u8>,