[−][src]Struct xaynet::client::Participant
A participant in the PET protocol layer.
Fields
pk: ParticipantPublicKey
sk: ParticipantSecretKey
sum_signature: ParticipantTaskSignature
Implementations
impl Participant
[src]
pub fn new() -> Result<Self, InitError>
[src]
pub fn compute_signatures(&mut self, round_seed: &[u8])
[src]
Compute the sum and update signatures for the given round seed.
pub fn check_task(&mut self, round_sum: f64, round_update: f64) -> Task
[src]
Check eligibility for a task given probabilities for Sum
and Update
selection in this round.
Returns the Task
selected for this round.
pub fn compose_sum_message(&mut self, pk: &CoordinatorPublicKey) -> MessageOwned
[src]
Compose a sum message given the coordinator public key.
pub fn compose_update_message(
&self,
pk: CoordinatorPublicKey,
sum_dict: &SumDict,
scalar: f64,
local_model: Model
) -> MessageOwned
[src]
&self,
pk: CoordinatorPublicKey,
sum_dict: &SumDict,
scalar: f64,
local_model: Model
) -> MessageOwned
Compose an update message given the coordinator public key, sum dictionary, model scalar and local model update.
pub fn compose_sum2_message(
&self,
pk: CoordinatorPublicKey,
seed_dict: &UpdateSeedDict,
mask_len: usize
) -> Result<MessageOwned, PetError>
[src]
&self,
pk: CoordinatorPublicKey,
seed_dict: &UpdateSeedDict,
mask_len: usize
) -> Result<MessageOwned, PetError>
Compose a sum2 message given the coordinator public key, seed dictionary and mask length.
Errors
Returns a PetError
if there is a problem extracting the
seed dictionary, or computing the global mask.
pub fn seal_message(
&self,
pk: &CoordinatorPublicKey,
message: &MessageOwned
) -> Vec<u8>
[src]
&self,
pk: &CoordinatorPublicKey,
message: &MessageOwned
) -> Vec<u8>
Sign the given message with the participant secret key, and encrypt the signed message with the given public key.
Trait Implementations
impl Debug for Participant
[src]
impl Default for Participant
[src]
Auto Trait Implementations
impl RefUnwindSafe for Participant
impl Send for Participant
impl Sync for Participant
impl Unpin for Participant
impl UnwindSafe for Participant
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,