Skip to content

Commit

Permalink
Combine data and seed for HMSS requisition fulfillment. (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
renjiezh authored Feb 8, 2024
1 parent 4ea9cf7 commit 7bd3df0
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 5 deletions.
7 changes: 7 additions & 0 deletions src/main/proto/wfa/measurement/api/v2alpha/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
)

proto_library(
name = "random_seed_proto",
srcs = ["random_seed.proto"],
strip_import_prefix = IMPORT_PREFIX,
)

proto_library(
name = "measurement_spec_proto",
srcs = ["measurement_spec.proto"],
Expand Down Expand Up @@ -496,6 +502,7 @@ proto_library(
srcs = ["requisition_fulfillment_service.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
":crypto_proto",
":protocol_config_proto",
":requisition_proto",
"@com_google_googleapis//google/api:client_proto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ message ProtocolConfig {
ReachOnlyLiquidLegionsV2 reach_only_liquid_legions_v2 = 3;

// Honest Majority Shuffle Based Secret Sharing protocol.
//
// `Requisition`s using this protocol can be fulfilled by calling
// RequisitionFulfillment/FulfillRequisition with a sketch and a secret
// seed. The Requisition should be fulfilled at the Duchy that does not
// have HonestMajorityShareShuffle.public_key in DuchyEntry.
HonestMajorityShareShuffle honest_majority_share_shuffle = 4;
}
}
Expand Down
28 changes: 28 additions & 0 deletions src/main/proto/wfa/measurement/api/v2alpha/random_seed.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright 2024 The Cross-Media Measurement Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package wfa.measurement.api.v2alpha;

option java_package = "org.wfanet.measurement.api.v2alpha";
option java_multiple_files = true;
option java_outer_classname = "RandomSeedProto";

// A random seed that can be expanded into a deterministic blob using a
// specific PRNG function.
message RandomSeed {
// The content of the seed.
bytes data = 1;
}
13 changes: 13 additions & 0 deletions src/main/proto/wfa/measurement/api/v2alpha/requisition.proto
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ message Requisition {
[(google.api.field_behavior) = REQUIRED];
}

// Information for the Honest Majority Share Shuffle protocol.
message HonestMajorityShareShuffle {
// The `EncryptionPublicKey` generated by the `Duchy`.
//
// For HonestMajorityShareShuffle protocol, if public_key is specified,
// DataProvider should use this public key to encrypt the signed
// RandomSeed and fulfill the requisition at the other Duchy.
SignedMessage public_key = 1;
}

// Value of a map entry.
message Value {
// Resource name of the `Certificate` belonging to the `Duchy`.
Expand All @@ -148,6 +158,9 @@ message Requisition {

// Information for the Reach-Only Liquid Legions v2 protocol.
LiquidLegionsV2 reach_only_liquid_legions_v2 = 3;

// Information for the Honest Majority Share Shuffle protocol.
HonestMajorityShareShuffle honest_majority_share_shuffle = 4;
}
}
// Value of the map entry.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package wfa.measurement.api.v2alpha;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "wfa/measurement/api/v2alpha/crypto.proto";
import "wfa/measurement/api/v2alpha/protocol_config.proto";
import "wfa/measurement/api/v2alpha/requisition.proto";

Expand Down Expand Up @@ -69,13 +70,14 @@ message FulfillRequisitionRequest {
// A Requisition of HonestMajorityShareShuffle protocol is fulfilled by
// either a seed or a blob of `BodyChunk`s.
message HonestMajorityShareShuffle {
// A random seed which is sampled by the DataProvider and can be expanded
// into a deterministic blob using the same PRNG function.
// An encrypted SignedMessage of RandomSeed.
//
// If the seed is not specified, it means the requisition is
// fulfilled by a blob of `BodyChunk`s.
bytes seed = 1;
// The RandomSeed is signed by DataProvider, and encrypted using peer
// worker's public key in
// Requisition.DuchyEntry.HonestMajorityShareShuffle.
EncryptedMessage secret_seed = 1;
}

// Protocol specified values.
oneof protocol {
// Honest Majority Shuffle based secret sharing protocol. Fulfilled by
Expand Down

0 comments on commit 7bd3df0

Please sign in to comment.