diff --git a/api/gen/proto/go/kmsintercom/kmsintercom.pb.go b/api/gen/proto/go/kmsintercom/kmsintercom.pb.go index c68ea38a3932ac85f31f42d3c0a67f5fc1f2c1ba..d990f2d156f73a47bcc5b969c900de9e89d96a9f 100644 --- a/api/gen/proto/go/kmsintercom/kmsintercom.pb.go +++ b/api/gen/proto/go/kmsintercom/kmsintercom.pb.go @@ -196,6 +196,124 @@ func (x *SyncQkdBulkRequest) GetBulkId() []int64 { return nil } +type SyncKeyIdsForBulkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + InterComAddr string `protobuf:"bytes,2,opt,name=interComAddr,proto3" json:"interComAddr,omitempty"` + BulkId int64 `protobuf:"varint,3,opt,name=bulkId,proto3" json:"bulkId,omitempty"` + KeyId []string `protobuf:"bytes,4,rep,name=keyId,proto3" json:"keyId,omitempty"` +} + +func (x *SyncKeyIdsForBulkRequest) Reset() { + *x = SyncKeyIdsForBulkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncKeyIdsForBulkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncKeyIdsForBulkRequest) ProtoMessage() {} + +func (x *SyncKeyIdsForBulkRequest) ProtoReflect() protoreflect.Message { + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncKeyIdsForBulkRequest.ProtoReflect.Descriptor instead. +func (*SyncKeyIdsForBulkRequest) Descriptor() ([]byte, []int) { + return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{3} +} + +func (x *SyncKeyIdsForBulkRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *SyncKeyIdsForBulkRequest) GetInterComAddr() string { + if x != nil { + return x.InterComAddr + } + return "" +} + +func (x *SyncKeyIdsForBulkRequest) GetBulkId() int64 { + if x != nil { + return x.BulkId + } + return 0 +} + +func (x *SyncKeyIdsForBulkRequest) GetKeyId() []string { + if x != nil { + return x.KeyId + } + return nil +} + +type SyncKeyIdsForBulkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *SyncKeyIdsForBulkResponse) Reset() { + *x = SyncKeyIdsForBulkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncKeyIdsForBulkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncKeyIdsForBulkResponse) ProtoMessage() {} + +func (x *SyncKeyIdsForBulkResponse) ProtoReflect() protoreflect.Message { + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncKeyIdsForBulkResponse.ProtoReflect.Descriptor instead. +func (*SyncKeyIdsForBulkResponse) Descriptor() ([]byte, []int) { + return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{4} +} + +func (x *SyncKeyIdsForBulkResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + type SyncQkdBulkResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -208,7 +326,7 @@ type SyncQkdBulkResponse struct { func (x *SyncQkdBulkResponse) Reset() { *x = SyncQkdBulkResponse{} if protoimpl.UnsafeEnabled { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[3] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -221,7 +339,7 @@ func (x *SyncQkdBulkResponse) String() string { func (*SyncQkdBulkResponse) ProtoMessage() {} func (x *SyncQkdBulkResponse) ProtoReflect() protoreflect.Message { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[3] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -234,7 +352,7 @@ func (x *SyncQkdBulkResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncQkdBulkResponse.ProtoReflect.Descriptor instead. func (*SyncQkdBulkResponse) Descriptor() ([]byte, []int) { - return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{3} + return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{5} } func (x *SyncQkdBulkResponse) GetTimestamp() int64 { @@ -259,13 +377,13 @@ type InterComTransportKeyNegotiationRequest struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` PathID string `protobuf:"bytes,2,opt,name=pathID,proto3" json:"pathID,omitempty"` - KeyToUse uint64 `protobuf:"varint,3,opt,name=keyToUse,proto3" json:"keyToUse,omitempty"` + KeyToUse string `protobuf:"bytes,3,opt,name=keyToUse,proto3" json:"keyToUse,omitempty"` } func (x *InterComTransportKeyNegotiationRequest) Reset() { *x = InterComTransportKeyNegotiationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[4] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -278,7 +396,7 @@ func (x *InterComTransportKeyNegotiationRequest) String() string { func (*InterComTransportKeyNegotiationRequest) ProtoMessage() {} func (x *InterComTransportKeyNegotiationRequest) ProtoReflect() protoreflect.Message { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[4] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -291,7 +409,7 @@ func (x *InterComTransportKeyNegotiationRequest) ProtoReflect() protoreflect.Mes // Deprecated: Use InterComTransportKeyNegotiationRequest.ProtoReflect.Descriptor instead. func (*InterComTransportKeyNegotiationRequest) Descriptor() ([]byte, []int) { - return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{4} + return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{6} } func (x *InterComTransportKeyNegotiationRequest) GetTimestamp() int64 { @@ -308,11 +426,11 @@ func (x *InterComTransportKeyNegotiationRequest) GetPathID() string { return "" } -func (x *InterComTransportKeyNegotiationRequest) GetKeyToUse() uint64 { +func (x *InterComTransportKeyNegotiationRequest) GetKeyToUse() string { if x != nil { return x.KeyToUse } - return 0 + return "" } type InterComTransportKeyNegotiationResponse struct { @@ -326,7 +444,7 @@ type InterComTransportKeyNegotiationResponse struct { func (x *InterComTransportKeyNegotiationResponse) Reset() { *x = InterComTransportKeyNegotiationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[5] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -339,7 +457,7 @@ func (x *InterComTransportKeyNegotiationResponse) String() string { func (*InterComTransportKeyNegotiationResponse) ProtoMessage() {} func (x *InterComTransportKeyNegotiationResponse) ProtoReflect() protoreflect.Message { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[5] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -352,7 +470,7 @@ func (x *InterComTransportKeyNegotiationResponse) ProtoReflect() protoreflect.Me // Deprecated: Use InterComTransportKeyNegotiationResponse.ProtoReflect.Descriptor instead. func (*InterComTransportKeyNegotiationResponse) Descriptor() ([]byte, []int) { - return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{5} + return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{7} } func (x *InterComTransportKeyNegotiationResponse) GetTimestamp() int64 { @@ -375,7 +493,7 @@ type KeyForwardingRequest struct { func (x *KeyForwardingRequest) Reset() { *x = KeyForwardingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[6] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -388,7 +506,7 @@ func (x *KeyForwardingRequest) String() string { func (*KeyForwardingRequest) ProtoMessage() {} func (x *KeyForwardingRequest) ProtoReflect() protoreflect.Message { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[6] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -401,7 +519,7 @@ func (x *KeyForwardingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyForwardingRequest.ProtoReflect.Descriptor instead. func (*KeyForwardingRequest) Descriptor() ([]byte, []int) { - return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{6} + return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{8} } func (x *KeyForwardingRequest) GetTimestamp() int64 { @@ -436,7 +554,7 @@ type KeyForwardingResponse struct { func (x *KeyForwardingResponse) Reset() { *x = KeyForwardingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[7] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -449,7 +567,7 @@ func (x *KeyForwardingResponse) String() string { func (*KeyForwardingResponse) ProtoMessage() {} func (x *KeyForwardingResponse) ProtoReflect() protoreflect.Message { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[7] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -462,7 +580,7 @@ func (x *KeyForwardingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyForwardingResponse.ProtoReflect.Descriptor instead. func (*KeyForwardingResponse) Descriptor() ([]byte, []int) { - return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{7} + return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{9} } func (x *KeyForwardingResponse) GetTimestamp() int64 { @@ -485,7 +603,7 @@ type KeyIdNotificationRequest struct { func (x *KeyIdNotificationRequest) Reset() { *x = KeyIdNotificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[8] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -498,7 +616,7 @@ func (x *KeyIdNotificationRequest) String() string { func (*KeyIdNotificationRequest) ProtoMessage() {} func (x *KeyIdNotificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[8] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -511,7 +629,7 @@ func (x *KeyIdNotificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyIdNotificationRequest.ProtoReflect.Descriptor instead. func (*KeyIdNotificationRequest) Descriptor() ([]byte, []int) { - return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{8} + return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{10} } func (x *KeyIdNotificationRequest) GetTimestamp() int64 { @@ -546,7 +664,7 @@ type KeyIdNotificationResponse struct { func (x *KeyIdNotificationResponse) Reset() { *x = KeyIdNotificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[9] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -559,7 +677,7 @@ func (x *KeyIdNotificationResponse) String() string { func (*KeyIdNotificationResponse) ProtoMessage() {} func (x *KeyIdNotificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_kmsintercom_kmsintercom_proto_msgTypes[9] + mi := &file_kmsintercom_kmsintercom_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -572,7 +690,7 @@ func (x *KeyIdNotificationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyIdNotificationResponse.ProtoReflect.Descriptor instead. func (*KeyIdNotificationResponse) Descriptor() ([]byte, []int) { - return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{9} + return file_kmsintercom_kmsintercom_proto_rawDescGZIP(), []int{11} } func (x *KeyIdNotificationResponse) GetTimestamp() int64 { @@ -606,90 +724,109 @@ var file_kmsintercom_kmsintercom_proto_rawDesc = []byte{ 0x72, 0x43, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x62, 0x75, - 0x6c, 0x6b, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x13, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, - 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6c, - 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, - 0x64, 0x22, 0x7a, 0x0a, 0x26, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x74, - 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, - 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x22, 0x47, 0x0a, - 0x27, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x66, 0x0a, 0x14, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, - 0x74, 0x68, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x35, - 0x0a, 0x15, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x74, 0x0a, 0x18, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x6c, 0x6b, 0x49, 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x18, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79, + 0x49, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x41, - 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x22, 0x39, 0x0a, 0x19, 0x4b, - 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0x9c, 0x04, 0x0a, 0x09, 0x4b, 0x6d, 0x73, 0x54, 0x61, - 0x6c, 0x6b, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, - 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x6b, - 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, - 0x12, 0x52, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x75, 0x6c, 0x6b, 0x12, - 0x1f, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x53, 0x79, - 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x8e, 0x01, 0x0a, 0x1f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, + 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6b, + 0x65, 0x79, 0x49, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, + 0x64, 0x22, 0x39, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x46, + 0x6f, 0x72, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x4b, 0x0a, 0x13, + 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x62, 0x75, 0x6c, 0x6b, 0x49, 0x64, 0x22, 0x7a, 0x0a, 0x26, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, + 0x79, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x54, 0x6f, 0x55, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, + 0x54, 0x6f, 0x55, 0x73, 0x65, 0x22, 0x47, 0x0a, 0x27, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67, - 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, + 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x66, + 0x0a, 0x14, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x35, 0x0a, 0x15, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, + 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x74, 0x0a, + 0x18, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x43, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6b, + 0x65, 0x79, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79, + 0x49, 0x64, 0x73, 0x22, 0x39, 0x0a, 0x19, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0x82, + 0x05, 0x0a, 0x09, 0x4b, 0x6d, 0x73, 0x54, 0x61, 0x6c, 0x6b, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x14, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, + 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, + 0x51, 0x6b, 0x64, 0x42, 0x75, 0x6c, 0x6b, 0x12, 0x1f, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x75, 0x6c, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x6b, 0x64, 0x42, 0x75, + 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x11, + 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x42, 0x75, 0x6c, + 0x6b, 0x12, 0x25, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x42, 0x75, 0x6c, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, + 0x73, 0x46, 0x6f, 0x72, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x8e, 0x01, 0x0a, 0x1f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67, 0x6f, 0x74, - 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, - 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, - 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, - 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6b, 0x6d, 0x73, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, - 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x64, 0x0a, 0x11, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, - 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6b, 0x6d, - 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, - 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xaf, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6b, 0x6d, - 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x42, 0x10, 0x4b, 0x6d, 0x73, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x63, - 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, - 0x64, 0x65, 0x6d, 0x6f, 0x71, 0x75, 0x61, 0x6e, 0x64, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2d, 0x6b, 0x6d, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x2f, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0xa2, 0x02, 0x03, - 0x4b, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, - 0x6d, 0xca, 0x02, 0x0b, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0xe2, - 0x02, 0x17, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4b, 0x6d, 0x73, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6b, 0x6d, + 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, + 0x6f, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x4e, 0x65, + 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, + 0x64, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, + 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, + 0x11, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, + 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6b, 0x6d, 0x73, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x4e, 0x6f, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0xaf, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6b, 0x6d, 0x73, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x42, 0x10, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x63, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x63, 0x6f, 0x64, + 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x65, + 0x6d, 0x6f, 0x71, 0x75, 0x61, 0x6e, 0x64, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x6b, + 0x6d, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, + 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0xa2, 0x02, 0x03, 0x4b, 0x58, + 0x58, 0xaa, 0x02, 0x0b, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0xca, + 0x02, 0x0b, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0xe2, 0x02, 0x17, + 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4b, 0x6d, 0x73, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -704,35 +841,39 @@ func file_kmsintercom_kmsintercom_proto_rawDescGZIP() []byte { return file_kmsintercom_kmsintercom_proto_rawDescData } -var file_kmsintercom_kmsintercom_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_kmsintercom_kmsintercom_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_kmsintercom_kmsintercom_proto_goTypes = []interface{}{ (*InterComCapabilitiesRequest)(nil), // 0: kmsintercom.InterComCapabilitiesRequest (*InterComCapabilitiesReply)(nil), // 1: kmsintercom.InterComCapabilitiesReply (*SyncQkdBulkRequest)(nil), // 2: kmsintercom.SyncQkdBulkRequest - (*SyncQkdBulkResponse)(nil), // 3: kmsintercom.SyncQkdBulkResponse - (*InterComTransportKeyNegotiationRequest)(nil), // 4: kmsintercom.InterComTransportKeyNegotiationRequest - (*InterComTransportKeyNegotiationResponse)(nil), // 5: kmsintercom.InterComTransportKeyNegotiationResponse - (*KeyForwardingRequest)(nil), // 6: kmsintercom.KeyForwardingRequest - (*KeyForwardingResponse)(nil), // 7: kmsintercom.KeyForwardingResponse - (*KeyIdNotificationRequest)(nil), // 8: kmsintercom.KeyIdNotificationRequest - (*KeyIdNotificationResponse)(nil), // 9: kmsintercom.KeyIdNotificationResponse + (*SyncKeyIdsForBulkRequest)(nil), // 3: kmsintercom.SyncKeyIdsForBulkRequest + (*SyncKeyIdsForBulkResponse)(nil), // 4: kmsintercom.SyncKeyIdsForBulkResponse + (*SyncQkdBulkResponse)(nil), // 5: kmsintercom.SyncQkdBulkResponse + (*InterComTransportKeyNegotiationRequest)(nil), // 6: kmsintercom.InterComTransportKeyNegotiationRequest + (*InterComTransportKeyNegotiationResponse)(nil), // 7: kmsintercom.InterComTransportKeyNegotiationResponse + (*KeyForwardingRequest)(nil), // 8: kmsintercom.KeyForwardingRequest + (*KeyForwardingResponse)(nil), // 9: kmsintercom.KeyForwardingResponse + (*KeyIdNotificationRequest)(nil), // 10: kmsintercom.KeyIdNotificationRequest + (*KeyIdNotificationResponse)(nil), // 11: kmsintercom.KeyIdNotificationResponse } var file_kmsintercom_kmsintercom_proto_depIdxs = []int32{ - 0, // 0: kmsintercom.KmsTalker.InterComCapabilities:input_type -> kmsintercom.InterComCapabilitiesRequest - 2, // 1: kmsintercom.KmsTalker.SyncQkdBulk:input_type -> kmsintercom.SyncQkdBulkRequest - 4, // 2: kmsintercom.KmsTalker.InterComTransportKeyNegotiation:input_type -> kmsintercom.InterComTransportKeyNegotiationRequest - 6, // 3: kmsintercom.KmsTalker.KeyForwarding:input_type -> kmsintercom.KeyForwardingRequest - 8, // 4: kmsintercom.KmsTalker.KeyIdNotification:input_type -> kmsintercom.KeyIdNotificationRequest - 1, // 5: kmsintercom.KmsTalker.InterComCapabilities:output_type -> kmsintercom.InterComCapabilitiesReply - 3, // 6: kmsintercom.KmsTalker.SyncQkdBulk:output_type -> kmsintercom.SyncQkdBulkResponse - 5, // 7: kmsintercom.KmsTalker.InterComTransportKeyNegotiation:output_type -> kmsintercom.InterComTransportKeyNegotiationResponse - 7, // 8: kmsintercom.KmsTalker.KeyForwarding:output_type -> kmsintercom.KeyForwardingResponse - 9, // 9: kmsintercom.KmsTalker.KeyIdNotification:output_type -> kmsintercom.KeyIdNotificationResponse - 5, // [5:10] is the sub-list for method output_type - 0, // [0:5] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 0, // 0: kmsintercom.KmsTalker.InterComCapabilities:input_type -> kmsintercom.InterComCapabilitiesRequest + 2, // 1: kmsintercom.KmsTalker.SyncQkdBulk:input_type -> kmsintercom.SyncQkdBulkRequest + 3, // 2: kmsintercom.KmsTalker.SyncKeyIdsForBulk:input_type -> kmsintercom.SyncKeyIdsForBulkRequest + 6, // 3: kmsintercom.KmsTalker.InterComTransportKeyNegotiation:input_type -> kmsintercom.InterComTransportKeyNegotiationRequest + 8, // 4: kmsintercom.KmsTalker.KeyForwarding:input_type -> kmsintercom.KeyForwardingRequest + 10, // 5: kmsintercom.KmsTalker.KeyIdNotification:input_type -> kmsintercom.KeyIdNotificationRequest + 1, // 6: kmsintercom.KmsTalker.InterComCapabilities:output_type -> kmsintercom.InterComCapabilitiesReply + 5, // 7: kmsintercom.KmsTalker.SyncQkdBulk:output_type -> kmsintercom.SyncQkdBulkResponse + 4, // 8: kmsintercom.KmsTalker.SyncKeyIdsForBulk:output_type -> kmsintercom.SyncKeyIdsForBulkResponse + 7, // 9: kmsintercom.KmsTalker.InterComTransportKeyNegotiation:output_type -> kmsintercom.InterComTransportKeyNegotiationResponse + 9, // 10: kmsintercom.KmsTalker.KeyForwarding:output_type -> kmsintercom.KeyForwardingResponse + 11, // 11: kmsintercom.KmsTalker.KeyIdNotification:output_type -> kmsintercom.KeyIdNotificationResponse + 6, // [6:12] is the sub-list for method output_type + 0, // [0:6] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_kmsintercom_kmsintercom_proto_init() } @@ -778,7 +919,7 @@ func file_kmsintercom_kmsintercom_proto_init() { } } file_kmsintercom_kmsintercom_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncQkdBulkResponse); i { + switch v := v.(*SyncKeyIdsForBulkRequest); i { case 0: return &v.state case 1: @@ -790,7 +931,7 @@ func file_kmsintercom_kmsintercom_proto_init() { } } file_kmsintercom_kmsintercom_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterComTransportKeyNegotiationRequest); i { + switch v := v.(*SyncKeyIdsForBulkResponse); i { case 0: return &v.state case 1: @@ -802,7 +943,7 @@ func file_kmsintercom_kmsintercom_proto_init() { } } file_kmsintercom_kmsintercom_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InterComTransportKeyNegotiationResponse); i { + switch v := v.(*SyncQkdBulkResponse); i { case 0: return &v.state case 1: @@ -814,7 +955,7 @@ func file_kmsintercom_kmsintercom_proto_init() { } } file_kmsintercom_kmsintercom_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyForwardingRequest); i { + switch v := v.(*InterComTransportKeyNegotiationRequest); i { case 0: return &v.state case 1: @@ -826,7 +967,7 @@ func file_kmsintercom_kmsintercom_proto_init() { } } file_kmsintercom_kmsintercom_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyForwardingResponse); i { + switch v := v.(*InterComTransportKeyNegotiationResponse); i { case 0: return &v.state case 1: @@ -838,7 +979,7 @@ func file_kmsintercom_kmsintercom_proto_init() { } } file_kmsintercom_kmsintercom_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyIdNotificationRequest); i { + switch v := v.(*KeyForwardingRequest); i { case 0: return &v.state case 1: @@ -850,6 +991,30 @@ func file_kmsintercom_kmsintercom_proto_init() { } } file_kmsintercom_kmsintercom_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyForwardingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kmsintercom_kmsintercom_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyIdNotificationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kmsintercom_kmsintercom_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KeyIdNotificationResponse); i { case 0: return &v.state @@ -868,7 +1033,7 @@ func file_kmsintercom_kmsintercom_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_kmsintercom_kmsintercom_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/api/gen/proto/go/kmsintercom/kmsintercom_grpc.pb.go b/api/gen/proto/go/kmsintercom/kmsintercom_grpc.pb.go index d0868b93608661290c9c89e220fe8248794cbcbb..5ae671cc190549cd16de5c9bef5bbe9822623d50 100644 --- a/api/gen/proto/go/kmsintercom/kmsintercom_grpc.pb.go +++ b/api/gen/proto/go/kmsintercom/kmsintercom_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( KmsTalker_InterComCapabilities_FullMethodName = "/kmsintercom.KmsTalker/InterComCapabilities" KmsTalker_SyncQkdBulk_FullMethodName = "/kmsintercom.KmsTalker/SyncQkdBulk" + KmsTalker_SyncKeyIdsForBulk_FullMethodName = "/kmsintercom.KmsTalker/SyncKeyIdsForBulk" KmsTalker_InterComTransportKeyNegotiation_FullMethodName = "/kmsintercom.KmsTalker/InterComTransportKeyNegotiation" KmsTalker_KeyForwarding_FullMethodName = "/kmsintercom.KmsTalker/KeyForwarding" KmsTalker_KeyIdNotification_FullMethodName = "/kmsintercom.KmsTalker/KeyIdNotification" @@ -32,6 +33,7 @@ const ( type KmsTalkerClient interface { InterComCapabilities(ctx context.Context, in *InterComCapabilitiesRequest, opts ...grpc.CallOption) (*InterComCapabilitiesReply, error) SyncQkdBulk(ctx context.Context, in *SyncQkdBulkRequest, opts ...grpc.CallOption) (*SyncQkdBulkResponse, error) + SyncKeyIdsForBulk(ctx context.Context, in *SyncKeyIdsForBulkRequest, opts ...grpc.CallOption) (*SyncKeyIdsForBulkResponse, error) InterComTransportKeyNegotiation(ctx context.Context, in *InterComTransportKeyNegotiationRequest, opts ...grpc.CallOption) (*InterComTransportKeyNegotiationResponse, error) KeyForwarding(ctx context.Context, in *KeyForwardingRequest, opts ...grpc.CallOption) (*KeyForwardingResponse, error) // KeyIDNotification is used for ETSI GS QKD 014 @@ -64,6 +66,15 @@ func (c *kmsTalkerClient) SyncQkdBulk(ctx context.Context, in *SyncQkdBulkReques return out, nil } +func (c *kmsTalkerClient) SyncKeyIdsForBulk(ctx context.Context, in *SyncKeyIdsForBulkRequest, opts ...grpc.CallOption) (*SyncKeyIdsForBulkResponse, error) { + out := new(SyncKeyIdsForBulkResponse) + err := c.cc.Invoke(ctx, KmsTalker_SyncKeyIdsForBulk_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *kmsTalkerClient) InterComTransportKeyNegotiation(ctx context.Context, in *InterComTransportKeyNegotiationRequest, opts ...grpc.CallOption) (*InterComTransportKeyNegotiationResponse, error) { out := new(InterComTransportKeyNegotiationResponse) err := c.cc.Invoke(ctx, KmsTalker_InterComTransportKeyNegotiation_FullMethodName, in, out, opts...) @@ -97,6 +108,7 @@ func (c *kmsTalkerClient) KeyIdNotification(ctx context.Context, in *KeyIdNotifi type KmsTalkerServer interface { InterComCapabilities(context.Context, *InterComCapabilitiesRequest) (*InterComCapabilitiesReply, error) SyncQkdBulk(context.Context, *SyncQkdBulkRequest) (*SyncQkdBulkResponse, error) + SyncKeyIdsForBulk(context.Context, *SyncKeyIdsForBulkRequest) (*SyncKeyIdsForBulkResponse, error) InterComTransportKeyNegotiation(context.Context, *InterComTransportKeyNegotiationRequest) (*InterComTransportKeyNegotiationResponse, error) KeyForwarding(context.Context, *KeyForwardingRequest) (*KeyForwardingResponse, error) // KeyIDNotification is used for ETSI GS QKD 014 @@ -114,6 +126,9 @@ func (UnimplementedKmsTalkerServer) InterComCapabilities(context.Context, *Inter func (UnimplementedKmsTalkerServer) SyncQkdBulk(context.Context, *SyncQkdBulkRequest) (*SyncQkdBulkResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SyncQkdBulk not implemented") } +func (UnimplementedKmsTalkerServer) SyncKeyIdsForBulk(context.Context, *SyncKeyIdsForBulkRequest) (*SyncKeyIdsForBulkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncKeyIdsForBulk not implemented") +} func (UnimplementedKmsTalkerServer) InterComTransportKeyNegotiation(context.Context, *InterComTransportKeyNegotiationRequest) (*InterComTransportKeyNegotiationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InterComTransportKeyNegotiation not implemented") } @@ -172,6 +187,24 @@ func _KmsTalker_SyncQkdBulk_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _KmsTalker_SyncKeyIdsForBulk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncKeyIdsForBulkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KmsTalkerServer).SyncKeyIdsForBulk(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KmsTalker_SyncKeyIdsForBulk_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KmsTalkerServer).SyncKeyIdsForBulk(ctx, req.(*SyncKeyIdsForBulkRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _KmsTalker_InterComTransportKeyNegotiation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InterComTransportKeyNegotiationRequest) if err := dec(in); err != nil { @@ -241,6 +274,10 @@ var KmsTalker_ServiceDesc = grpc.ServiceDesc{ MethodName: "SyncQkdBulk", Handler: _KmsTalker_SyncQkdBulk_Handler, }, + { + MethodName: "SyncKeyIdsForBulk", + Handler: _KmsTalker_SyncKeyIdsForBulk_Handler, + }, { MethodName: "InterComTransportKeyNegotiation", Handler: _KmsTalker_InterComTransportKeyNegotiation_Handler, diff --git a/api/kmsintercom/kmsintercom/kmsintercom.proto b/api/kmsintercom/kmsintercom/kmsintercom.proto index 2b61a3211ebc604c86009c96df98d25f01955f30..845742ad9d188953b8b839fe11b70038e4dcbbf8 100644 --- a/api/kmsintercom/kmsintercom/kmsintercom.proto +++ b/api/kmsintercom/kmsintercom/kmsintercom.proto @@ -6,6 +6,7 @@ package kmsintercom; service KmsTalker { rpc InterComCapabilities (InterComCapabilitiesRequest) returns (InterComCapabilitiesReply) {} rpc SyncQkdBulk(SyncQkdBulkRequest) returns (SyncQkdBulkResponse) {} + rpc SyncKeyIdsForBulk(SyncKeyIdsForBulkRequest) returns (SyncKeyIdsForBulkResponse) {} rpc InterComTransportKeyNegotiation(InterComTransportKeyNegotiationRequest) returns (InterComTransportKeyNegotiationResponse) {} rpc KeyForwarding(KeyForwardingRequest) returns (KeyForwardingResponse) {} // KeyIDNotification is used for ETSI GS QKD 014 @@ -32,6 +33,17 @@ message SyncQkdBulkRequest { //string bulkHash = 4; } +message SyncKeyIdsForBulkRequest { + int64 timestamp = 1; + string interComAddr = 2; + int64 bulkId = 3; + repeated string keyId = 4; +} + +message SyncKeyIdsForBulkResponse { + int64 timestamp = 1; +} + message SyncQkdBulkResponse { int64 timestamp = 1; int64 bulkId = 2; @@ -41,7 +53,7 @@ message SyncQkdBulkResponse { message InterComTransportKeyNegotiationRequest { int64 timestamp = 1; string pathID = 2; - uint64 keyToUse = 3; + string keyToUse = 3; } message InterComTransportKeyNegotiationResponse { diff --git a/kms/kms-keystore.go b/kms/kms-keystore.go index 93a29b740a1f4da5ff0077ab8365e54a41f5b7bc..466d1ea62c351cb86a6402c94bf99214a41ead2a 100644 --- a/kms/kms-keystore.go +++ b/kms/kms-keystore.go @@ -4,9 +4,8 @@ import ( "fmt" "sync" + "github.com/google/uuid" log "github.com/sirupsen/logrus" - - "code.fbi.h-da.de/danet/proto-kms/quantumlayer" ) type Status int @@ -18,35 +17,28 @@ const ( USED ) -type kmsKS interface { - KeyChopper(bulkKey *quantumlayer.QuantumLayerBulkKey) (err error) - addKey(int64, [8]byte) -} - // holds a single ready to bit key, length can be configured type kmsKSElement struct { - keyID uint64 + keyID uuid.UUID key []byte // a key status Status } type kmsKeyStore struct { keyStoreMutex sync.Mutex - keyStore map[uint64]*kmsKSElement + keyStore map[uuid.UUID]*kmsKSElement keySingleSize uint // the size of a single key, given as unit of bits - indexCounter uint64 } func NewKmsKeyStore(desiredkeySingleSizeLength uint) *kmsKeyStore { return &kmsKeyStore{ // NOTE: could be useful to use something like a ordered map here - keyStore: make(map[uint64]*kmsKSElement), + keyStore: make(map[uuid.UUID]*kmsKSElement), keySingleSize: desiredkeySingleSizeLength, - indexCounter: 0, } } -func (ks *kmsKeyStore) addKey(keyId uint64, keyToadd []byte) { +func (ks *kmsKeyStore) addKey(keyId uuid.UUID, keyToadd []byte) { ks.keyStoreMutex.Lock() defer ks.keyStoreMutex.Unlock() @@ -69,41 +61,34 @@ func (ks *kmsKeyStore) GetKey() (*kmsKSElement, error) { ks.keyStoreMutex.Lock() defer ks.keyStoreMutex.Unlock() - key, ok := ks.keyStore[ks.indexCounter] - if !ok { - return nil, fmt.Errorf("Could not find a key for id: %d", ks.indexCounter) + // TODO: if we want random here, then we have to take a different approach + for _, key := range ks.keyStore { + if key.status == AVAILABLE { + // change status of key to reserved + key.status = RESERVED + return key, nil + } } - if key.status == AVAILABLE { - // change status of key to reserved - key.status = RESERVED - // increase index counter - ks.indexCounter = ks.indexCounter + 1 - - return key, nil - } - return nil, fmt.Errorf("Key with index: %d is already reserved.", ks.indexCounter) + return nil, fmt.Errorf("could not find a key to use") } -func (ks *kmsKeyStore) GetKeyWithID(id uint64) (*kmsKSElement, error) { +func (ks *kmsKeyStore) GetKeyWithID(id uuid.UUID) (*kmsKSElement, error) { ks.keyStoreMutex.Lock() defer ks.keyStoreMutex.Unlock() key, ok := ks.keyStore[id] if !ok { - return nil, fmt.Errorf("Could not find a key for id: %d", ks.indexCounter) + return nil, fmt.Errorf("Could not find a key for id: %v", id) } if key.status == AVAILABLE { // change status of key to reserved key.status = RESERVED - // increase index counter - ks.indexCounter = ks.indexCounter + 1 - return key, nil } - return nil, fmt.Errorf("Key with index: %d is already reserved.", ks.indexCounter) + return nil, fmt.Errorf("Key with index: %v is already reserved.", id) } -func (ks *kmsKeyStore) DeleteKey(keyId uint64) { +func (ks *kmsKeyStore) DeleteKey(keyId uuid.UUID) { ks.keyStoreMutex.Lock() delete(ks.keyStore, keyId) ks.keyStoreMutex.Unlock() diff --git a/kms/kmsetsi.go b/kms/kmsetsi.go index aa5013d368b396e3f554608e632c7c1b1b6b80d5..8e907c8f0828e7e951bec9c05ecf5d83155c6ac0 100644 --- a/kms/kmsetsi.go +++ b/kms/kmsetsi.go @@ -25,7 +25,6 @@ var ( type etsiServer struct { pb.UnimplementedKmsETSIServer handlingEkms *EKMS - visitedKeys map[*kmsKSElement]bool } func (es *etsiServer) ETSICapabilities(ctx context.Context, in *pb.ETSICapabilitiesRequest) (capReply *pb.ETSICapabilitiesReply, err error) { @@ -181,7 +180,6 @@ func StartETSI(listenAddr string, callingKMS *EKMS) { s := grpc.NewServer() pb.RegisterKmsETSIServer(s, &etsiServer{ handlingEkms: callingKMS, - visitedKeys: make(map[*kmsKSElement]bool), }) log.Infof("server listening at %v", lis.Addr()) if err := s.Serve(lis); err != nil { diff --git a/kms/kmsintercom.go b/kms/kmsintercom.go index 7076f2782ac1a43349906703d5dde62ced521824..c7ec9ebbd2421208f360f400cf00a4eea96d2a11 100644 --- a/kms/kmsintercom.go +++ b/kms/kmsintercom.go @@ -104,19 +104,7 @@ func (s *kmsTalkerServer) SyncQkdBulk(ctx context.Context, in *pb.SyncQkdBulkReq } for _, bulkId := range in.BulkId { - rawBulkKeyIds := keysOfMap[int64](eqm.rawBulkKeys) - log.Info("PEER BULK KEYS: ", rawBulkKeyIds) - if bulk, ok := eqm.rawBulkKeys[bulkId]; ok { - eqm.keyStore = NewKmsKeyStore(256) - if err := eqm.KeyChopper(bulk); err != nil { - //TODO: proper error message - return nil, status.Errorf(codes.Internal, "chopping failed") - } - - eqm.rawBulkKeysMutex.Lock() - delete(eqm.rawBulkKeys, bulkId) - eqm.rawBulkKeysMutex.Unlock() - + if _, ok := eqm.rawBulkKeys[bulkId]; ok { return &pb.SyncQkdBulkResponse{ Timestamp: time.Now().Unix(), BulkId: bulkId, @@ -124,6 +112,41 @@ func (s *kmsTalkerServer) SyncQkdBulk(ctx context.Context, in *pb.SyncQkdBulkReq } } + return nil, status.Errorf(codes.Unimplemented, "method SyncQkdBulk not implemented") +} + +func (s *kmsTalkerServer) SyncKeyIdsForBulk(ctx context.Context, in *pb.SyncKeyIdsForBulkRequest) (*pb.SyncKeyIdsForBulkResponse, error) { + peer, ok := s.eKMS.KmsPeers[in.GetInterComAddr()] + if !ok { + return nil, status.Errorf(codes.Internal, "For address: %s, no peer exists", in.GetInterComAddr()) + } + + eqm, ok := peer.servingQuantumModul.(*EmulatedQuantumModule) + if !ok { + return nil, status.Errorf(codes.Internal, "expected a emulated quantum module") + } + + eqm.rawBulkKeysMutex.Lock() + bulk, ok := eqm.rawBulkKeys[in.GetBulkId()] + if !ok { + return nil, status.Errorf(codes.Internal, "bulk key with id: %d not found", in.GetBulkId()) + } + eqm.rawBulkKeysMutex.Unlock() + + eqm.keyStore = NewKmsKeyStore(256) + _, keyData, err := eqm.KeyChopper(bulk, in.GetKeyId()) + if err != nil { + return nil, status.Errorf(codes.Internal, "%v", err) + } + + for keyId, key := range keyData { + eqm.keyStore.addKey(keyId, key) + } + + eqm.rawBulkKeysMutex.Lock() + delete(eqm.rawBulkKeys, in.GetBulkId()) + eqm.rawBulkKeysMutex.Unlock() + // update the peer status to up peer.peerStatus = KmsPeerUp // Send notification about change @@ -131,17 +154,22 @@ func (s *kmsTalkerServer) SyncQkdBulk(ctx context.Context, in *pb.SyncQkdBulkReq peer.externalNotifierKMSPeer <- peer.tcpSocketStr } - return nil, status.Errorf(codes.Unimplemented, "method SyncQkdBulk not implemented") + return &pb.SyncKeyIdsForBulkResponse{ + Timestamp: time.Now().Unix(), + }, nil } func (s *kmsTalkerServer) InterComTransportKeyNegotiation(ctx context.Context, in *pb.InterComTransportKeyNegotiationRequest) (capReply *pb.InterComTransportKeyNegotiationResponse, err error) { // NOTE: For the current prototype it is assumed that a negotiation request // is always valid. In the future an incoming negotiation request should // also check for a suitable forwarding assignment from the controller. - keyID := in.KeyToUse - pathId, err := uuid.Parse(in.PathID) + keyID, err := uuid.Parse(in.GetKeyToUse()) if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "") + return nil, status.Errorf(codes.InvalidArgument, "key with id: %s can not be parsed to uuid", in.GetKeyToUse()) + } + pathId, err := uuid.Parse(in.GetPathID()) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "path id: %s can not be parsed to uuid", in.GetPathID()) } route, ok := s.eKMS.routingTable[pathId] @@ -165,6 +193,8 @@ func (s *kmsTalkerServer) InterComTransportKeyNegotiation(ctx context.Context, i // TODO: mutex s.keyNegotiationMap[pathId] = key + quantumModuleKeyStore.DeleteKey(keyID) + return &pb.InterComTransportKeyNegotiationResponse{Timestamp: time.Now().Unix()}, nil } @@ -200,7 +230,7 @@ func (s *kmsTalkerServer) KeyForwarding(ctx context.Context, in *pb.KeyForwardin log.Infof("%s forwards payload to : %s", s.eKMS.kmsName, route.Next.tcpSocketStr) go route.Next.SendPayload(decryptedPayload, pathId) } else { - log.Infof("%s received the final payload: ", s.eKMS.kmsName, string(decryptedPayload)) + log.Infof("%s received the final payload: %s", s.eKMS.kmsName, string(decryptedPayload)) } //// NOTE: For demo purpose only diff --git a/kms/kmspeers.go b/kms/kmspeers.go index 30f3e2ca51d3445b17016b6553c432fdc026e68f..05bda9fb812301751c82a632ab6c082ef248181d 100644 --- a/kms/kmspeers.go +++ b/kms/kmspeers.go @@ -96,7 +96,7 @@ func (ph *kmsPeer) TransportKeyNegotiation() error { func (ph *kmsPeer) SendPayload(payload []byte, pathId uuid.UUID) error { // NOTE: It should be assumed that there are keys available if we try to // send. - if len(ph.servingQuantumModul.KeyStore().keyStore) <= int(ph.servingQuantumModul.KeyStore().indexCounter) { + if len(ph.servingQuantumModul.KeyStore().keyStore) == 0 { log.Debug("Syncing bulk keys before sending the payload") err := ph.SyncBulkKeys() if err != nil { @@ -118,12 +118,13 @@ func (ph *kmsPeer) SendPayload(payload []byte, pathId uuid.UUID) error { _, err = ph.peerClient.InterComTransportKeyNegotiation(ctx, &pbIC.InterComTransportKeyNegotiationRequest{ Timestamp: time.Now().Unix(), PathID: pathId.String(), - KeyToUse: key.keyID, + KeyToUse: key.keyID.String(), }) if err != nil { return err } - // TODO: delete key? + + ph.servingQuantumModul.KeyStore().DeleteKey(key.keyID) // TODO: would be better to update the index counter here (to keep it // synchronized). diff --git a/kms/module.go b/kms/module.go index dd0a5a23790cbf19563678676703943b8316f6ca..14fff0f02f7fb548091cfb2b652dc81a464d9e37 100644 --- a/kms/module.go +++ b/kms/module.go @@ -25,8 +25,8 @@ type QuantumModule interface { Initialize() error // NOTE: Sync will be removed as soon as the emulated quantum module has been // changed to push a constant byte stream. - Sync() error KeyStore() *kmsKeyStore + Sync() error Peer() *kmsPeer SetPeer(*kmsPeer) Address() net.Addr @@ -71,10 +71,6 @@ func (eqe *EmulatedQuantumModule) Address() net.Addr { return eqe.QuantumElementLink.GetLocalQLPort() } -func (eqe *EmulatedQuantumModule) KeyStore() *kmsKeyStore { - return eqe.keyStore -} - func (eqe *EmulatedQuantumModule) Sync() error { rawBulkKeyIds := keysOfMap[int64](eqe.rawBulkKeys) logrus.Info("Found the following bulk key ids for usage: ", rawBulkKeyIds) @@ -100,10 +96,25 @@ func (eqe *EmulatedQuantumModule) Sync() error { // for now it is hardcoded. eqe.keyStore = NewKmsKeyStore(256) - if err := eqe.KeyChopper(bulkKey); err != nil { + keyIds, keyData, err := eqe.KeyChopper(bulkKey, []string{}) + if err != nil { + return err + } + + _, err = eqe.peer.peerClient.SyncKeyIdsForBulk(ctx, &pbIC.SyncKeyIdsForBulkRequest{ + Timestamp: time.Now().Unix(), + InterComAddr: eqe.peer.interComAddr, + BulkId: initialPeerSetupResponse.BulkId, + KeyId: keyIds, + }) + if err != nil { return err } + for keyId, key := range keyData { + eqe.keyStore.addKey(keyId, key) + } + eqe.rawBulkKeysMutex.Lock() delete(eqe.rawBulkKeys, initialPeerSetupResponse.BulkId) eqe.rawBulkKeysMutex.Unlock() @@ -118,6 +129,10 @@ func (eqe *EmulatedQuantumModule) Sync() error { return nil } +func (eqe *EmulatedQuantumModule) KeyStore() *kmsKeyStore { + return eqe.keyStore +} + func (eqe *EmulatedQuantumModule) Peer() *kmsPeer { return eqe.peer } @@ -147,33 +162,44 @@ func (eqe *EmulatedQuantumModule) keyHandler() { // Takes a bulk of keys and chops them in chopFactor keys each // Any remainder is discarded -func (eqe *EmulatedQuantumModule) KeyChopper(bulkKey *quantumlayer.QuantumLayerBulkKey) error { +// If keyIds is empty, uuids are generated +func (eqe *EmulatedQuantumModule) KeyChopper(bulkKey *quantumlayer.QuantumLayerBulkKey, keyIds []string) ([]string, map[uuid.UUID][]byte, error) { if eqe.keyStore.keySingleSize == 0 { - return errors.New("KeyChopper: no keySingleSize set") + return nil, nil, errors.New("KeyChopper: no keySingleSize set") } // TODO check if multiple of 8 (1 Byte) if bulkKey.BulkKeyLength != len(*bulkKey.BulkKey) { - return errors.New("bulkKey length mismatch") + return nil, nil, errors.New("bulkKey length mismatch") } - // reset indexCounter - eqe.keyStore.indexCounter = 0 - - var keyId uint64 - keyId = 0 + initialKeyIdsLen := len(keyIds) // Let's chop! + keyData := make(map[uuid.UUID][]byte) chopFactor := eqe.keyStore.keySingleSize >> 3 key := *bulkKey.BulkKey + counter := 0 for len(key) > int(chopFactor) { + var keyId uuid.UUID + var err error + if initialKeyIdsLen == 0 { + keyId = uuid.New() + keyIds = append(keyIds, keyId.String()) + } else { + keyId, err = uuid.Parse(keyIds[counter]) + if err != nil { + return nil, nil, fmt.Errorf("The provided ID: %s can not be parsed as UUID.", keyIds[counter]) + } + counter++ + } tmpkey := key[:chopFactor] - eqe.keyStore.addKey(keyId, tmpkey) - keyId++ + keyData[keyId] = tmpkey + // shorten the key storage key = key[chopFactor:] } - return nil + return keyIds, keyData, nil } type ETSI014HTTPQuantumModule struct { diff --git a/kms/util.go b/kms/util.go index c17bf87f27edd757c57e11ad9cebabe6d0f02a44..3857dfe8c2f002bdb97bf2e50e792908fa670c28 100644 --- a/kms/util.go +++ b/kms/util.go @@ -5,9 +5,9 @@ import ( "encoding/base64" "fmt" "net/http" - "strconv" etsi14 "code.fbi.h-da.de/danet/ekms/api/go/rest/etsi/client" + "github.com/google/uuid" ) func randomItemFromMap[T comparable, M any](m map[T]M) (M, error) { @@ -48,18 +48,12 @@ func addETSIKeysToKeystore(keyStore *kmsKeyStore, keyContainer []etsi14.KeyConta if err != nil { return err } - - // key id to uint - keyId := keyItem.GetKeyID() - keyIdUint, err := strconv.ParseUint(keyId, 10, 64) + keyId, err := uuid.Parse(keyItem.GetKeyID()) if err != nil { return err } - // add to keystore - keyStore.keyStoreMutex.Lock() - keyStore.addKey(keyIdUint, key) - keyStore.keyStoreMutex.Unlock() + keyStore.addKey(keyId, key) } return nil }