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]
impl<T, I, M> Reveal<T, I, M> where
M: Mac,
I: Eq + Hash,
pub fn insert(&mut self, id: I, secret: Secret<T, M>) -> Result<()>
[src]
pub fn insert(&mut self, id: I, secret: Secret<T, M>) -> Result<()>
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]
impl<T, I, M> Reveal<T, I, M> where
M: Mac,
I: Eq + Hash,
T: Serialize + BitXorAssign,
pub fn get(self) -> RevealResult<T, I>
[src]
pub fn get(self) -> RevealResult<T, I>
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.