pub struct SecureAggregationConfig {
pub enabled: bool,
pub min_clients: usize,
pub max_dropouts: usize,
pub masking_dimension: usize,
pub seed_sharing: SeedSharingMethod,
pub quantization_bits: Option<u8>,
pub quantization_scale: f64,
pub max_update_magnitude: f64,
pub aggregate_dp: bool,
}Expand description
Secure aggregation configuration
Fields§
§enabled: boolWhether the protocol is active. Protocol operations error when this is false rather than quietly aggregating in the clear.
min_clients: usizeMinimum number of received submissions required to aggregate.
max_dropouts: usizeMaximum number of dropouts a round may tolerate. A round with more dropouts than this is refused.
masking_dimension: usizeDimension of the update vectors being aggregated.
seed_sharing: SeedSharingMethodHow pairwise seeds are established.
quantization_bits: Option<u8>Width, in bits, of the additive group Z_(2^bits) used for masking.
None selects DEFAULT_MODULUS_BITS.
quantization_scale: f64Fixed-point scale: an update coordinate g is encoded as
round(g * quantization_scale).
max_update_magnitude: f64Declared per-coordinate bound on client updates. Enforced when a client masks its update, and used to prove that the cohort’s summed fixed-point value cannot wrap the group.
aggregate_dp: boolAdd differential privacy noise to the aggregate. Not implemented here; setting it is an error (see the module documentation).
Implementations§
Source§impl SecureAggregationConfig
impl SecureAggregationConfig
Sourcepub fn validate_protocol(&self) -> Result<i64>
pub fn validate_protocol(&self) -> Result<i64>
Validate the protocol parameters and return the modulus they select.
This is the single source of truth for “is this secure-aggregation
configuration deliverable?”. SecureAggregator::new calls it, and so
does the federated-privacy configuration validator
(SecureAggregationConfig::validate_for_federation), so a federation
cannot be accepted at the configuration layer and then rejected when the
aggregator is built.
Trait Implementations§
Source§impl Clone for SecureAggregationConfig
impl Clone for SecureAggregationConfig
Source§fn clone(&self) -> SecureAggregationConfig
fn clone(&self) -> SecureAggregationConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SecureAggregationConfig
impl Debug for SecureAggregationConfig
Auto Trait Implementations§
impl Freeze for SecureAggregationConfig
impl RefUnwindSafe for SecureAggregationConfig
impl Send for SecureAggregationConfig
impl Sync for SecureAggregationConfig
impl Unpin for SecureAggregationConfig
impl UnsafeUnpin for SecureAggregationConfig
impl UnwindSafe for SecureAggregationConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.