1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef FCP_SECAGG_SERVER_GRAPH_PARAMETER_FINDER_H_ 18 #define FCP_SECAGG_SERVER_GRAPH_PARAMETER_FINDER_H_ 19 20 #include "fcp/base/monitoring.h" 21 #include "fcp/secagg/server/secagg_server_enums.pb.h" 22 #include "fcp/secagg/server/secagg_server_messages.pb.h" 23 24 namespace fcp { 25 namespace secagg { 26 27 // Represents the parameters that define a SecretSharingHararyGraph: its 28 // size, its degree (as Harary graphs are regular), and the threshold for 29 // reconstruction 30 struct HararyGraphParameters { 31 int number_of_nodes; 32 int degree; 33 int threshold; 34 }; 35 36 // Returns the HararyGraphParameters that result in an instance of 37 // subgraph-secagg with statistical security [kSecurityParameter] and failure 38 // probability less that 2**(-[kCorrectnessParameter]), assuming 39 // [number_of_clients_] participants and the threat model (adversarial rate, 40 // dropout rate, and adversary class) defined in [threat_model]. 41 StatusOr<HararyGraphParameters> ComputeHararyGraphParameters( 42 int number_of_clients, SecureAggregationRequirements threat_model); 43 44 // Check if the provided threshold [threshold] results in a secure protocol with 45 // [number_of_clients] clients and the parameters and adversary specified in 46 // [threat_model] 47 Status CheckFullGraphParameters(int number_of_clients, int threshold, 48 SecureAggregationRequirements threat_model); 49 50 } // namespace secagg 51 } // namespace fcp 52 53 #endif // FCP_SECAGG_SERVER_GRAPH_PARAMETER_FINDER_H_ 54