|
| 1 | +// Copyright 2026 Google LLC |
| 2 | +// |
| 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 | +// http://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 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package secure_aggregation.willow; |
| 18 | + |
| 19 | +import "google/protobuf/any.proto"; |
| 20 | +import "google/protobuf/timestamp.proto"; |
| 21 | + |
| 22 | + |
| 23 | +option java_multiple_files = true; |
| 24 | +option java_outer_classname = "CommitteeSelectorProto"; |
| 25 | + |
| 26 | + |
| 27 | +message CreateCommitteeRequest {} |
| 28 | + |
| 29 | +message CreateCommitteeResponse { |
| 30 | + int64 committee_id = 1; |
| 31 | +} |
| 32 | + |
| 33 | +// Represents a member or volunteer's status within a committee selection. |
| 34 | +enum MemberStatus { |
| 35 | + MEMBER_STATUS_UNKNOWN = 0; |
| 36 | + MEMBER_STATUS_VOLUNTEERED = 1; // Waiting for committee assignment. |
| 37 | + MEMBER_STATUS_ASSIGNED = 2; // Assigned to an active committee but |
| 38 | + // not yet acknowledged. |
| 39 | + MEMBER_STATUS_NOT_SELECTED = 3; // Member was not selected for the committee. |
| 40 | + MEMBER_STATUS_COMPLETED = 4; // Acknowledged committee assignment. |
| 41 | + MEMBER_STATUS_FAILED = 5; // Encountered an error. |
| 42 | +} |
| 43 | + |
| 44 | +// The method and state of the endorsement of the client’s public key. |
| 45 | +enum EndorsementStatus { |
| 46 | + ENDORSEMENT_UNKNOWN = 0; |
| 47 | + ENDORSEMENT_FAILED = 1; |
| 48 | + ENDORSEMENT_ANDROID_KEY_ATTESTATION_VALID = 2; |
| 49 | +} |
| 50 | + |
| 51 | +// A message sent from client to untrusted frontend signaling intent to |
| 52 | +// volunteer for the committee. |
| 53 | +message VolunteerForCommitteeRequest { |
| 54 | + // Member's public key used to uniquely identify the member. |
| 55 | + bytes member_public_key = 1; |
| 56 | + |
| 57 | + // An endorsement of the client's public key, for example: |
| 58 | + // an Android Key Attestation X.509 certificate. |
| 59 | + google.protobuf.Any key_endorsement = 2; |
| 60 | +} |
| 61 | + |
| 62 | +// A record of a client who volunteered for a committee. |
| 63 | +message VolunteerRecord { |
| 64 | + // A short digest of the member's public key used to uniquely identify the |
| 65 | + // member. |
| 66 | + int64 member_public_key_digest = 1; |
| 67 | + |
| 68 | + // The committee ID the member is volunteering for. |
| 69 | + int64 committee_id = 2; |
| 70 | + |
| 71 | + // The status of the endorsement of the member's public key. |
| 72 | + EndorsementStatus key_endorsement_status = 3; |
| 73 | +} |
| 74 | + |
| 75 | +// A response from the untrusted frontend to the client after recording it's |
| 76 | +// volunteer request for the committee. |
| 77 | +message VolunteerForCommitteeResponse { |
| 78 | + VolunteerRecord volunteer_record = 1; |
| 79 | + |
| 80 | + // An acknowledgement that the request was handled. |
| 81 | + // For example, a measurement and endorsement from a TEE. |
| 82 | + google.protobuf.Any volunteer_recorded_attestation = 2; |
| 83 | + |
| 84 | + // Suggested time after which clients can return to check the status of their |
| 85 | + // volunteer request. |
| 86 | + google.protobuf.Timestamp check_status_after = 3; |
| 87 | +} |
| 88 | + |
| 89 | +// A message passed from the untrusted frontend to a TEE to record a batch of |
| 90 | +// committee volunteers. |
| 91 | +message VolunteerBatchForCommitteeRequest { |
| 92 | + // A batch of volunteers signaling intent to join the cohort. |
| 93 | + repeated VolunteerForCommitteeRequest volunteers = 1; |
| 94 | +} |
| 95 | + |
| 96 | +// A response from the TEE to the untrusted frontend after recording a batch of |
| 97 | +// committee volunteers. |
| 98 | +message VolunteerBatchForCommitteeResponse { |
| 99 | + repeated VolunteerRecord volunteer_records = 1; |
| 100 | +} |
| 101 | + |
| 102 | +// A message passed from the untrusted frontend to a TEE to sample a committee |
| 103 | +// from the cohort. Returns CommitteeStatusResponse. |
| 104 | +message SampleCommitteeRequest { |
| 105 | + int64 committee_id = 1; |
| 106 | +} |
| 107 | + |
| 108 | +// Request from the untrusted frontend to a TEE to check the status of a |
| 109 | +// committee. Returns CommitteeStatusResponse. |
| 110 | +message CheckCommitteeStatusRequest { |
| 111 | + int64 committee_id = 1; |
| 112 | +} |
| 113 | + |
| 114 | +// A response from the TEE to untrusted frontend with the output of the |
| 115 | +// committee selection process. |
| 116 | +message CommitteeStatusResponse { |
| 117 | + int64 committee_id = 1; |
| 118 | + |
| 119 | + // The status of the committee selection process. |
| 120 | + enum SampleCommitteeStatus { |
| 121 | + SAMPLE_COMMITTEE_STATUS_UNKNOWN = 0; |
| 122 | + SAMPLE_COMMITTEE_STATUS_PENDING = 1; |
| 123 | + SAMPLE_COMMITTEE_STATUS_SUCCESS = 2; |
| 124 | + SAMPLE_COMMITTEE_STATUS_FAILURE = 3; |
| 125 | + } |
| 126 | + SampleCommitteeStatus status = 2; |
| 127 | + |
| 128 | + // Optional: The public keys of the committee members if the selection process |
| 129 | + // succeeded. |
| 130 | + repeated int64 committee_members_public_key_digests = 3; |
| 131 | +} |
| 132 | + |
| 133 | +// Request from a client to untrusted frontend to check their committee |
| 134 | +// selection status. |
| 135 | +message CheckVolunteerStatusRequest { |
| 136 | + // Member's public key used to uniquely identify the member. |
| 137 | + bytes member_public_key = 1; |
| 138 | + |
| 139 | + // The committee ID the member volunteered for and is checking the status of. |
| 140 | + int64 committee_id = 2; |
| 141 | +} |
| 142 | + |
| 143 | +// Response from the untrusted frontend to a client with their committee |
| 144 | +// selection status. |
| 145 | +message CheckVolunteerStatusResponse { |
| 146 | + MemberStatus status = 1; |
| 147 | + |
| 148 | + // An acknowledgement that the CheckVolunteerStatusRequest was handled. |
| 149 | + // For example, a measurement and endorsement from a TEE. |
| 150 | + google.protobuf.Any committee_selection_attestation = 2; |
| 151 | + |
| 152 | + // Optional: If the member was selected, the size of the committee that the |
| 153 | + // member was selected for is returned. |
| 154 | + int32 committee_size = 3; |
| 155 | +} |
| 156 | + |
| 157 | +// Generic error status returned from the TEE to the untrusted frontend for the |
| 158 | +// CommitteeSelector. |
| 159 | +message CommitteeSelectorStatus { |
| 160 | + int32 code = 1; |
| 161 | + string message = 2; |
| 162 | +} |
| 163 | + |
| 164 | +// CommitteeSelectorRequest and CommitteeSelectorResponse wrap the individual |
| 165 | +// request and response messages above, and are used by the replicated |
| 166 | +// implementation of the CommitteeSelector. |
| 167 | +message CommitteeSelectorRequest { |
| 168 | + oneof msg { |
| 169 | + CreateCommitteeRequest create_committee = 1; |
| 170 | + VolunteerForCommitteeRequest volunteer_for_committee = 2; |
| 171 | + SampleCommitteeRequest sample_committee = 3; |
| 172 | + CheckCommitteeStatusRequest check_committee_status = 4; |
| 173 | + CheckVolunteerStatusRequest check_volunteer_status = 5; |
| 174 | + VolunteerBatchForCommitteeRequest volunteer_batch_for_committee = 6; |
| 175 | + } |
| 176 | +} |
| 177 | + |
| 178 | +message CommitteeSelectorResponse { |
| 179 | + oneof msg { |
| 180 | + CreateCommitteeResponse create_committee = 1; |
| 181 | + VolunteerForCommitteeResponse volunteer_for_committee = 2; |
| 182 | + CommitteeStatusResponse check_committee_status = 3; |
| 183 | + CheckVolunteerStatusResponse check_volunteer_status = 4; |
| 184 | + VolunteerBatchForCommitteeResponse volunteer_batch_for_committee = 5; |
| 185 | + CommitteeSelectorStatus error = 6; |
| 186 | + } |
| 187 | +} |
0 commit comments