Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions willow/proto/willow/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# TODO(itester): Consider hiding the micro_rpc targets from open source.
# Same as in https://source.corp.google.com/piper///depot/google3/third_party/fcp/protos/confidentialcompute/BUILD

load("//net/grpc:cc_grpc_library.bzl", "cc_grpc_library")
load("//net/proto2/compiler/stubby/cc:cc_stubby_library.bzl", "cc_stubby_library")
load("//security/oak/micro_rpc/codegen/build_defs:micro_rpc.bzl", "cc_micro_rpc_library") # fcp:google-only(internal use only)
load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
load("@protobuf//bazel:proto_library.bzl", "proto_library")
load("@protobuf//rust:defs.bzl", "rust_proto_library")
Expand Down Expand Up @@ -42,13 +48,33 @@ rust_proto_library(
proto_library(
name = "decryptor_proto",
srcs = ["decryptor.proto"],
has_services = True,
deps = ["//third_party/oak/proto/micro_rpc:options_proto"],
)

cc_proto_library(
name = "decryptor_cc_proto",
deps = [":decryptor_proto"],
)

cc_stubby_library(
name = "decryptor_cc_stubby",
srcs = [":decryptor_proto"],
deps = [":decryptor_cc_proto"],
)

cc_grpc_library(
name = "decryptor_cc_grpc_proto",
srcs = [":decryptor_proto"],
deps = [":decryptor_cc_proto"],
)

cc_micro_rpc_library(
name = "decryptor_cc_micro_proto",
srcs = [":decryptor_proto"],
deps = [":decryptor_cc_proto"],
)

proto_library(
name = "key_proto",
srcs = ["key.proto"],
Expand Down
21 changes: 21 additions & 0 deletions willow/proto/willow/decryptor.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,26 @@ syntax = "proto3";

package secure_aggregation.willow;

import "third_party/oak/proto/micro_rpc/options.proto";

option java_multiple_files = true;

// DecryptorService is the service that implements the Willow Decryptor.
service DecryptorService {
// Generates a new AHE key pair and returns the public key.
rpc GenerateKey(GenerateKeyRequest) returns (GenerateKeyResponse) {
option deadline = 60.0;
option (.oak.micro_rpc.method_id) = 1;
}

// Decrypts the content of the given request using the keys maintained in the
// state.
rpc Decrypt(DecryptRequest) returns (DecryptResponse) {
option deadline = 60.0;
option (.oak.micro_rpc.method_id) = 2;
}
}

message GenerateKeyRequest {
// The key ID to use for the generated key. If the key with the given ID
// already exists, it will be returned instead.
Expand Down Expand Up @@ -72,3 +90,6 @@ message DecryptorResponse {
Status error = 3;
}
}

// Decryptor configuration - used to configure replicated Decryptor job.
message DecryptorConfig {}
Loading