1/* 2 * Copyright 2019 Google LLC. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * https://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16syntax = "proto2"; 17 18package private_join_and_compute; 19 20import "private_join_and_compute/match.proto"; 21 22// Client Messages 23 24message PrivateIntersectionSumClientMessage { 25 oneof message_content { 26 StartProtocolRequest start_protocol_request = 1; 27 ClientRoundOne client_round_one = 2; 28 } 29 30 // For initiating the protocol. 31 message StartProtocolRequest {} 32 33 // Message containing the client's set encrypted under the client's keys, and 34 // the server's set re-encrypted with the client's key, and shuffled. 35 message ClientRoundOne { 36 optional bytes public_key = 1; 37 optional EncryptedSet encrypted_set = 2; 38 optional EncryptedSet reencrypted_set = 3; 39 } 40} 41 42// Server Messages. 43 44message PrivateIntersectionSumServerMessage { 45 oneof message_content { 46 ServerRoundOne server_round_one = 1; 47 ServerRoundTwo server_round_two = 2; 48 } 49 50 message ServerRoundOne { 51 optional EncryptedSet encrypted_set = 1; 52 } 53 54 message ServerRoundTwo { 55 optional int64 intersection_size = 1; 56 optional bytes encrypted_sum = 2; 57 } 58} 59