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
10 changes: 6 additions & 4 deletions willow/proto/willow/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ cc_proto_library(
proto_library(
name = "aggregation_config_proto",
srcs = ["aggregation_config.proto"],
deps = [
"//willow/proto/shell:shell_ciphertexts_proto",
"//willow/proto/zk:proofs_proto",
],
)

cc_proto_library(
Expand All @@ -59,6 +55,9 @@ rust_proto_library(
proto_library(
name = "decryptor_proto",
srcs = ["decryptor.proto"],
deps = [
"@protobuf//:timestamp_proto",
],
)

cc_proto_library(
Expand All @@ -69,6 +68,9 @@ cc_proto_library(
proto_library(
name = "key_proto",
srcs = ["key.proto"],
deps = [
"@protobuf//:timestamp_proto",
],
)

cc_proto_library(
Expand Down
17 changes: 17 additions & 0 deletions willow/proto/willow/decryptor.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,32 @@ syntax = "proto3";

package secure_aggregation.willow;

import "google/protobuf/timestamp.proto";

option java_multiple_files = true;
option java_outer_classname = "DecryptorProto";

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.
bytes key_id = 1;

// A permanent session_tag that is shared across all keys mapped to the same
// logical recurring task. To avoid race condition in a potentially costly,
// key generation operation, only one key per session tag can be generated at
// a time.
string session_tag = 2;

// The timestamp that indicates when the key was produced. This is used to
// distinguish keys in the same series.
google.protobuf.Timestamp timestamp = 3;
}

message GenerateKeyResponse {
// The serialized bytes of the public key.
bytes public_key = 1;
// The key_id of the generated key.
bytes key_id = 2;
}

message DecryptRequest {
Expand All @@ -37,6 +51,9 @@ message DecryptRequest {
bytes public_key = 2 [deprecated = true];
// The key ID of the public key that was used in the GenerateKey call.
bytes key_id = 3;
// Session tag associated with the key. Even though this isn't strictly
// required, it is good include this for diagnostic purposes.
string session_tag = 4;
}

message DecryptResponse {
Expand Down
9 changes: 9 additions & 0 deletions willow/proto/willow/key.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ syntax = "proto3";

package secure_aggregation.willow;

import "google/protobuf/timestamp.proto";

option java_multiple_files = true;
option java_outer_classname = "KeyProto";

Expand All @@ -29,4 +31,11 @@ message Key {
// The raw key material. This is the serialized bytes of the key material
// returned by the key generation service.
bytes key_material = 2;

// The timestamp that indicates when the key was produced. This is used to
// distinguish keys in the same series.
google.protobuf.Timestamp timestamp = 3;

// We might consider the original session_tage for diagnostic purposes.
string session_tag = 4;
}