1/* 2 * Copyright 2023 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 = "proto3"; 17 18package private_join_and_compute.anonymous_counting_tokens; 19 20import "act/act_v0/act_v0.proto"; 21 22option java_multiple_files = true; 23 24// The parameters defining the ACT scheme. 25message SchemeParameters { 26 oneof scheme_parameters_oneof { 27 SchemeParametersV0 scheme_parameters_v0 = 1; 28 } 29} 30 31message ServerParameters { 32 ServerPublicParameters public_parameters = 1; 33 ServerPrivateParameters private_parameters = 2; 34} 35 36// The Server's public parameters for the ACT scheme. 37message ServerPublicParameters { 38 oneof server_public_parameters_oneof { 39 ServerPublicParametersV0 server_public_parameters_v0 = 1; 40 } 41} 42 43// The Server's private parameters for the ACT scheme. 44message ServerPrivateParameters { 45 oneof server_private_parameters_oneof { 46 ServerPrivateParametersV0 server_private_parameters_v0 = 1; 47 } 48} 49 50message ClientParameters { 51 ClientPublicParameters public_parameters = 1; 52 ClientPrivateParameters private_parameters = 2; 53} 54 55// The Client's public parameters for the ACT scheme. 56message ClientPublicParameters { 57 oneof client_public_parameters_oneof { 58 ClientPublicParametersV0 client_public_parameters_v0 = 1; 59 } 60} 61 62// The Client's private parameters for the ACT scheme. 63message ClientPrivateParameters { 64 oneof client_private_parameters_oneof { 65 ClientPrivateParametersV0 client_private_parameters_v0 = 1; 66 } 67} 68 69// The Client's token request. Can correspond to a batch of tokens. 70message TokensRequest { 71 oneof tokens_request_oneof { 72 TokensRequestV0 tokens_request_v0 = 1; 73 } 74} 75 76// Private state corresponding to the Client's token request, needed to recover 77// the tokens from the server's response. 78message TokensRequestPrivateState { 79 oneof tokens_request_private_state_oneof { 80 TokensRequestPrivateStateV0 tokens_request_private_state_v0 = 1; 81 } 82} 83 84// The Server's response to a TokensRequest. Can correspond to a batch of 85// tokens. 86message TokensResponse { 87 oneof tokens_response_oneof { 88 TokensResponseV0 tokens_response_v0 = 1; 89 } 90} 91 92// An actual token recovered from the TokenResponse. 93message Token { 94 reserved 1; 95 96 oneof token_oneof { 97 TokenV0 token_v0 = 2; 98 } 99 100 // Serialized BigNum corresponding to the nonce for this token. 101 bytes nonce_bytes = 3; 102} 103