Skip to content

Commit ffe03d0

Browse files
SecAgg Teamcopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 818296015
1 parent 7965712 commit ffe03d0

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

willow/proto/willow/BUILD

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# TODO(itester): Consider hiding the micro_rpc targets from open source.
16+
# Same as in https://source.corp.google.com/piper///depot/google3/third_party/fcp/protos/confidentialcompute/BUILD
17+
18+
load("//net/grpc:cc_grpc_library.bzl", "cc_grpc_library")
19+
load("//net/proto2/compiler/stubby/cc:cc_stubby_library.bzl", "cc_stubby_library")
20+
load("//security/oak/micro_rpc/codegen/build_defs:micro_rpc.bzl", "cc_micro_rpc_library") # fcp:google-only(internal use only)
1521
load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
1622
load("@protobuf//bazel:proto_library.bzl", "proto_library")
1723
load("@protobuf//rust:defs.bzl", "rust_proto_library")
@@ -42,13 +48,33 @@ rust_proto_library(
4248
proto_library(
4349
name = "decryptor_proto",
4450
srcs = ["decryptor.proto"],
51+
has_services = True,
52+
deps = ["//third_party/oak/proto/micro_rpc:options_proto"],
4553
)
4654

4755
cc_proto_library(
4856
name = "decryptor_cc_proto",
4957
deps = [":decryptor_proto"],
5058
)
5159

60+
cc_stubby_library(
61+
name = "decryptor_cc_stubby",
62+
srcs = [":decryptor_proto"],
63+
deps = [":decryptor_cc_proto"],
64+
)
65+
66+
cc_grpc_library(
67+
name = "decryptor_cc_grpc_proto",
68+
srcs = [":decryptor_proto"],
69+
deps = [":decryptor_cc_proto"],
70+
)
71+
72+
cc_micro_rpc_library(
73+
name = "decryptor_cc_micro_proto",
74+
srcs = [":decryptor_proto"],
75+
deps = [":decryptor_cc_proto"],
76+
)
77+
5278
proto_library(
5379
name = "key_proto",
5480
srcs = ["key.proto"],

willow/proto/willow/decryptor.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,26 @@ syntax = "proto3";
1616

1717
package secure_aggregation.willow;
1818

19+
import "third_party/oak/proto/micro_rpc/options.proto";
20+
1921
option java_multiple_files = true;
2022

23+
// DecryptorService is the service that implements the Willow Decryptor.
24+
service DecryptorService {
25+
// Generates a new AHE key pair and returns the public key.
26+
rpc GenerateKey(GenerateKeyRequest) returns (GenerateKeyResponse) {
27+
option deadline = 60.0;
28+
option (.oak.micro_rpc.method_id) = 1;
29+
}
30+
31+
// Decrypts the content of the given request using the keys maintained in the
32+
// state.
33+
rpc Decrypt(DecryptRequest) returns (DecryptResponse) {
34+
option deadline = 60.0;
35+
option (.oak.micro_rpc.method_id) = 2;
36+
}
37+
}
38+
2139
message GenerateKeyRequest {
2240
// The key ID to use for the generated key. If the key with the given ID
2341
// already exists, it will be returned instead.
@@ -72,3 +90,6 @@ message DecryptorResponse {
7290
Status error = 3;
7391
}
7492
}
93+
94+
// Decryptor configuration - used to configure replicated Decryptor job.
95+
message DecryptorConfig {}

0 commit comments

Comments
 (0)