| 1 |
// Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 |
// versions: |
| 3 |
// protoc-gen-go v1.36.11 |
| 4 |
// protoc v3.21.12 |
| 5 |
// source: keymanager/km_common/proto/key_claims.proto |
| 6 |
|
| 7 |
package keymanager |
| 8 |
|
| 9 |
import ( |
| 10 |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 11 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 12 |
durationpb "google.golang.org/protobuf/types/known/durationpb" |
| 13 |
reflect "reflect" |
| 14 |
sync "sync" |
| 15 |
unsafe "unsafe" |
| 16 |
) |
| 17 |
|
| 18 |
const ( |
| 19 |
// Verify that this generated code is sufficiently up-to-date. |
| 20 |
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 21 |
// Verify that runtime/protoimpl is sufficiently up-to-date. |
| 22 |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 23 |
) |
| 24 |
|
| 25 |
type KeyType int32 |
| 26 |
|
| 27 |
const ( |
| 28 |
KeyType_KEY_TYPE_UNSPECIFIED KeyType = 0 |
| 29 |
// A standard HPKE binding key-pair used for internal isolation. |
| 30 |
KeyType_KEY_TYPE_VM_PROTECTION_BINDING KeyType = 1 |
| 31 |
// A KEM key-pair managed by the Key Protection Service. |
| 32 |
KeyType_KEY_TYPE_VM_PROTECTION_KEY KeyType = 2 |
| 33 |
) |
| 34 |
|
| 35 |
// Enum value maps for KeyType. |
| 36 |
var ( |
| 37 |
KeyType_name = map[int32]string{ |
| 38 |
0: "KEY_TYPE_UNSPECIFIED", |
| 39 |
1: "KEY_TYPE_VM_PROTECTION_BINDING", |
| 40 |
2: "KEY_TYPE_VM_PROTECTION_KEY", |
| 41 |
} |
| 42 |
KeyType_value = map[string]int32{ |
| 43 |
"KEY_TYPE_UNSPECIFIED": 0, |
| 44 |
"KEY_TYPE_VM_PROTECTION_BINDING": 1, |
| 45 |
"KEY_TYPE_VM_PROTECTION_KEY": 2, |
| 46 |
} |
| 47 |
) |
| 48 |
|
| 49 |
func (x KeyType) Enum() *KeyType { |
| 50 |
p := new(KeyType) |
| 51 |
*p = x |
| 52 |
return p |
| 53 |
} |
| 54 |
|
| 55 |
func (x KeyType) String() string { |
| 56 |
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 57 |
} |
| 58 |
|
| 59 |
func (KeyType) Descriptor() protoreflect.EnumDescriptor { |
| 60 |
return file_keymanager_km_common_proto_key_claims_proto_enumTypes[0].Descriptor() |
| 61 |
} |
| 62 |
|
| 63 |
func (KeyType) Type() protoreflect.EnumType { |
| 64 |
return &file_keymanager_km_common_proto_key_claims_proto_enumTypes[0] |
| 65 |
} |
| 66 |
|
| 67 |
func (x KeyType) Number() protoreflect.EnumNumber { |
| 68 |
return protoreflect.EnumNumber(x) |
| 69 |
} |
| 70 |
|
| 71 |
// Deprecated: Use KeyType.Descriptor instead. |
| 72 |
func (KeyType) EnumDescriptor() ([]byte, []int) { |
| 73 |
return file_keymanager_km_common_proto_key_claims_proto_rawDescGZIP(), []int{0} |
| 74 |
} |
| 75 |
|
| 76 |
type KeyProtectionMechanism int32 |
| 77 |
|
| 78 |
const ( |
| 79 |
KeyProtectionMechanism_KEY_PROTECTION_MECHANISM_UNSPECIFIED KeyProtectionMechanism = 0 |
| 80 |
// The key is held by the Workload Services Daemon, and is endorsed by a single CVM |
| 81 |
// attestation. |
| 82 |
KeyProtectionMechanism_DEFAULT KeyProtectionMechanism = 1 |
| 83 |
// The key is held by the Key Protection Services VM, and is endorsed by a pair of CVM |
| 84 |
// attestations, from the Workload Services Daemon and Key Protection VM. |
| 85 |
KeyProtectionMechanism_KEY_PROTECTION_VM KeyProtectionMechanism = 2 |
| 86 |
// An interim solution where the key is held by the Workload Services Daemon emulating |
| 87 |
// the Key Protection Service. It is endorsed by a single CVM attestation. |
| 88 |
KeyProtectionMechanism_KEY_PROTECTION_VM_EMULATED KeyProtectionMechanism = 3 |
| 89 |
) |
| 90 |
|
| 91 |
// Enum value maps for KeyProtectionMechanism. |
| 92 |
var ( |
| 93 |
KeyProtectionMechanism_name = map[int32]string{ |
| 94 |
0: "KEY_PROTECTION_MECHANISM_UNSPECIFIED", |
| 95 |
1: "DEFAULT", |
| 96 |
2: "KEY_PROTECTION_VM", |
| 97 |
3: "KEY_PROTECTION_VM_EMULATED", |
| 98 |
} |
| 99 |
KeyProtectionMechanism_value = map[string]int32{ |
| 100 |
"KEY_PROTECTION_MECHANISM_UNSPECIFIED": 0, |
| 101 |
"DEFAULT": 1, |
| 102 |
"KEY_PROTECTION_VM": 2, |
| 103 |
"KEY_PROTECTION_VM_EMULATED": 3, |
| 104 |
} |
| 105 |
) |
| 106 |
|
| 107 |
func (x KeyProtectionMechanism) Enum() *KeyProtectionMechanism { |
| 108 |
p := new(KeyProtectionMechanism) |
| 109 |
*p = x |
| 110 |
return p |
| 111 |
} |
| 112 |
|
| 113 |
func (x KeyProtectionMechanism) String() string { |
| 114 |
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 115 |
} |
| 116 |
|
| 117 |
func (KeyProtectionMechanism) Descriptor() protoreflect.EnumDescriptor { |
| 118 |
return file_keymanager_km_common_proto_key_claims_proto_enumTypes[1].Descriptor() |
| 119 |
} |
| 120 |
|
| 121 |
func (KeyProtectionMechanism) Type() protoreflect.EnumType { |
| 122 |
return &file_keymanager_km_common_proto_key_claims_proto_enumTypes[1] |
| 123 |
} |
| 124 |
|
| 125 |
func (x KeyProtectionMechanism) Number() protoreflect.EnumNumber { |
| 126 |
return protoreflect.EnumNumber(x) |
| 127 |
} |
| 128 |
|
| 129 |
// Deprecated: Use KeyProtectionMechanism.Descriptor instead. |
| 130 |
func (KeyProtectionMechanism) EnumDescriptor() ([]byte, []int) { |
| 131 |
return file_keymanager_km_common_proto_key_claims_proto_rawDescGZIP(), []int{1} |
| 132 |
} |
| 133 |
|
| 134 |
// Used to refer to key instances held by various daemons. |
| 135 |
type KeyHandle struct { |
| 136 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 137 |
Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"` |
| 138 |
unknownFields protoimpl.UnknownFields |
| 139 |
sizeCache protoimpl.SizeCache |
| 140 |
} |
| 141 |
|
| 142 |
func (x *KeyHandle) Reset() { |
| 143 |
*x = KeyHandle{} |
| 144 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[0] |
| 145 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 146 |
ms.StoreMessageInfo(mi) |
| 147 |
} |
| 148 |
|
| 149 |
func (x *KeyHandle) String() string { |
| 150 |
return protoimpl.X.MessageStringOf(x) |
| 151 |
} |
| 152 |
|
| 153 |
func (*KeyHandle) ProtoMessage() {} |
| 154 |
|
| 155 |
func (x *KeyHandle) ProtoReflect() protoreflect.Message { |
| 156 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[0] |
| 157 |
if x != nil { |
| 158 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 159 |
if ms.LoadMessageInfo() == nil { |
| 160 |
ms.StoreMessageInfo(mi) |
| 161 |
} |
| 162 |
return ms |
| 163 |
} |
| 164 |
return mi.MessageOf(x) |
| 165 |
} |
| 166 |
|
| 167 |
// Deprecated: Use KeyHandle.ProtoReflect.Descriptor instead. |
| 168 |
func (*KeyHandle) Descriptor() ([]byte, []int) { |
| 169 |
return file_keymanager_km_common_proto_key_claims_proto_rawDescGZIP(), []int{0} |
| 170 |
} |
| 171 |
|
| 172 |
func (x *KeyHandle) GetHandle() string { |
| 173 |
if x != nil { |
| 174 |
return x.Handle |
| 175 |
} |
| 176 |
return "" |
| 177 |
} |
| 178 |
|
| 179 |
// GetKeyClaimsRequest defines the input required to retrieve claims for a key. |
| 180 |
type GetKeyClaimsRequest struct { |
| 181 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 182 |
// The unique identifier (UUID) for the key. |
| 183 |
KeyHandle *KeyHandle `protobuf:"bytes,1,opt,name=key_handle,json=keyHandle,proto3" json:"key_handle,omitempty"` |
| 184 |
// The type of key (Binding or KEM) which determines the claim format. |
| 185 |
KeyType KeyType `protobuf:"varint,2,opt,name=key_type,json=keyType,proto3,enum=keymanager.KeyType" json:"key_type,omitempty"` |
| 186 |
unknownFields protoimpl.UnknownFields |
| 187 |
sizeCache protoimpl.SizeCache |
| 188 |
} |
| 189 |
|
| 190 |
func (x *GetKeyClaimsRequest) Reset() { |
| 191 |
*x = GetKeyClaimsRequest{} |
| 192 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[1] |
| 193 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 194 |
ms.StoreMessageInfo(mi) |
| 195 |
} |
| 196 |
|
| 197 |
func (x *GetKeyClaimsRequest) String() string { |
| 198 |
return protoimpl.X.MessageStringOf(x) |
| 199 |
} |
| 200 |
|
| 201 |
func (*GetKeyClaimsRequest) ProtoMessage() {} |
| 202 |
|
| 203 |
func (x *GetKeyClaimsRequest) ProtoReflect() protoreflect.Message { |
| 204 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[1] |
| 205 |
if x != nil { |
| 206 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 207 |
if ms.LoadMessageInfo() == nil { |
| 208 |
ms.StoreMessageInfo(mi) |
| 209 |
} |
| 210 |
return ms |
| 211 |
} |
| 212 |
return mi.MessageOf(x) |
| 213 |
} |
| 214 |
|
| 215 |
// Deprecated: Use GetKeyClaimsRequest.ProtoReflect.Descriptor instead. |
| 216 |
func (*GetKeyClaimsRequest) Descriptor() ([]byte, []int) { |
| 217 |
return file_keymanager_km_common_proto_key_claims_proto_rawDescGZIP(), []int{1} |
| 218 |
} |
| 219 |
|
| 220 |
func (x *GetKeyClaimsRequest) GetKeyHandle() *KeyHandle { |
| 221 |
if x != nil { |
| 222 |
return x.KeyHandle |
| 223 |
} |
| 224 |
return nil |
| 225 |
} |
| 226 |
|
| 227 |
func (x *GetKeyClaimsRequest) GetKeyType() KeyType { |
| 228 |
if x != nil { |
| 229 |
return x.KeyType |
| 230 |
} |
| 231 |
return KeyType_KEY_TYPE_UNSPECIFIED |
| 232 |
} |
| 233 |
|
| 234 |
type KemPublicKey struct { |
| 235 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 236 |
Algorithm KemAlgorithm `protobuf:"varint,1,opt,name=algorithm,proto3,enum=keymanager.KemAlgorithm" json:"algorithm,omitempty"` |
| 237 |
PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // `Npk` bytes long; see the KemAlgorithm definition. |
| 238 |
unknownFields protoimpl.UnknownFields |
| 239 |
sizeCache protoimpl.SizeCache |
| 240 |
} |
| 241 |
|
| 242 |
func (x *KemPublicKey) Reset() { |
| 243 |
*x = KemPublicKey{} |
| 244 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[2] |
| 245 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 246 |
ms.StoreMessageInfo(mi) |
| 247 |
} |
| 248 |
|
| 249 |
func (x *KemPublicKey) String() string { |
| 250 |
return protoimpl.X.MessageStringOf(x) |
| 251 |
} |
| 252 |
|
| 253 |
func (*KemPublicKey) ProtoMessage() {} |
| 254 |
|
| 255 |
func (x *KemPublicKey) ProtoReflect() protoreflect.Message { |
| 256 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[2] |
| 257 |
if x != nil { |
| 258 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 259 |
if ms.LoadMessageInfo() == nil { |
| 260 |
ms.StoreMessageInfo(mi) |
| 261 |
} |
| 262 |
return ms |
| 263 |
} |
| 264 |
return mi.MessageOf(x) |
| 265 |
} |
| 266 |
|
| 267 |
// Deprecated: Use KemPublicKey.ProtoReflect.Descriptor instead. |
| 268 |
func (*KemPublicKey) Descriptor() ([]byte, []int) { |
| 269 |
return file_keymanager_km_common_proto_key_claims_proto_rawDescGZIP(), []int{2} |
| 270 |
} |
| 271 |
|
| 272 |
func (x *KemPublicKey) GetAlgorithm() KemAlgorithm { |
| 273 |
if x != nil { |
| 274 |
return x.Algorithm |
| 275 |
} |
| 276 |
return KemAlgorithm_KEM_ALGORITHM_UNSPECIFIED |
| 277 |
} |
| 278 |
|
| 279 |
func (x *KemPublicKey) GetPublicKey() []byte { |
| 280 |
if x != nil { |
| 281 |
return x.PublicKey |
| 282 |
} |
| 283 |
return nil |
| 284 |
} |
| 285 |
|
| 286 |
type HpkePublicKey struct { |
| 287 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 288 |
Algorithm *HpkeAlgorithm `protobuf:"bytes,1,opt,name=algorithm,proto3" json:"algorithm,omitempty"` |
| 289 |
PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // `Npk` bytes long. Raw bytes. |
| 290 |
unknownFields protoimpl.UnknownFields |
| 291 |
sizeCache protoimpl.SizeCache |
| 292 |
} |
| 293 |
|
| 294 |
func (x *HpkePublicKey) Reset() { |
| 295 |
*x = HpkePublicKey{} |
| 296 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[3] |
| 297 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 298 |
ms.StoreMessageInfo(mi) |
| 299 |
} |
| 300 |
|
| 301 |
func (x *HpkePublicKey) String() string { |
| 302 |
return protoimpl.X.MessageStringOf(x) |
| 303 |
} |
| 304 |
|
| 305 |
func (*HpkePublicKey) ProtoMessage() {} |
| 306 |
|
| 307 |
func (x *HpkePublicKey) ProtoReflect() protoreflect.Message { |
| 308 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[3] |
| 309 |
if x != nil { |
| 310 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 311 |
if ms.LoadMessageInfo() == nil { |
| 312 |
ms.StoreMessageInfo(mi) |
| 313 |
} |
| 314 |
return ms |
| 315 |
} |
| 316 |
return mi.MessageOf(x) |
| 317 |
} |
| 318 |
|
| 319 |
// Deprecated: Use HpkePublicKey.ProtoReflect.Descriptor instead. |
| 320 |
func (*HpkePublicKey) Descriptor() ([]byte, []int) { |
| 321 |
return file_keymanager_km_common_proto_key_claims_proto_rawDescGZIP(), []int{3} |
| 322 |
} |
| 323 |
|
| 324 |
func (x *HpkePublicKey) GetAlgorithm() *HpkeAlgorithm { |
| 325 |
if x != nil { |
| 326 |
return x.Algorithm |
| 327 |
} |
| 328 |
return nil |
| 329 |
} |
| 330 |
|
| 331 |
func (x *HpkePublicKey) GetPublicKey() []byte { |
| 332 |
if x != nil { |
| 333 |
return x.PublicKey |
| 334 |
} |
| 335 |
return nil |
| 336 |
} |
| 337 |
|
| 338 |
type KeyClaims struct { |
| 339 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 340 |
// Types that are valid to be assigned to Claims: |
| 341 |
// |
| 342 |
// *KeyClaims_VmBindingClaims |
| 343 |
// *KeyClaims_VmKeyClaims |
| 344 |
Claims isKeyClaims_Claims `protobuf_oneof:"claims"` |
| 345 |
unknownFields protoimpl.UnknownFields |
| 346 |
sizeCache protoimpl.SizeCache |
| 347 |
} |
| 348 |
|
| 349 |
func (x *KeyClaims) Reset() { |
| 350 |
*x = KeyClaims{} |
| 351 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[4] |
| 352 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 353 |
ms.StoreMessageInfo(mi) |
| 354 |
} |
| 355 |
|
| 356 |
func (x *KeyClaims) String() string { |
| 357 |
return protoimpl.X.MessageStringOf(x) |
| 358 |
} |
| 359 |
|
| 360 |
func (*KeyClaims) ProtoMessage() {} |
| 361 |
|
| 362 |
func (x *KeyClaims) ProtoReflect() protoreflect.Message { |
| 363 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[4] |
| 364 |
if x != nil { |
| 365 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 366 |
if ms.LoadMessageInfo() == nil { |
| 367 |
ms.StoreMessageInfo(mi) |
| 368 |
} |
| 369 |
return ms |
| 370 |
} |
| 371 |
return mi.MessageOf(x) |
| 372 |
} |
| 373 |
|
| 374 |
// Deprecated: Use KeyClaims.ProtoReflect.Descriptor instead. |
| 375 |
func (*KeyClaims) Descriptor() ([]byte, []int) { |
| 376 |
return file_keymanager_km_common_proto_key_claims_proto_rawDescGZIP(), []int{4} |
| 377 |
} |
| 378 |
|
| 379 |
func (x *KeyClaims) GetClaims() isKeyClaims_Claims { |
| 380 |
if x != nil { |
| 381 |
return x.Claims |
| 382 |
} |
| 383 |
return nil |
| 384 |
} |
| 385 |
|
| 386 |
func (x *KeyClaims) GetVmBindingClaims() *KeyClaims_VmProtectionBindingClaims { |
| 387 |
if x != nil { |
| 388 |
if x, ok := x.Claims.(*KeyClaims_VmBindingClaims); ok { |
| 389 |
return x.VmBindingClaims |
| 390 |
} |
| 391 |
} |
| 392 |
return nil |
| 393 |
} |
| 394 |
|
| 395 |
func (x *KeyClaims) GetVmKeyClaims() *KeyClaims_VmProtectionKeyClaims { |
| 396 |
if x != nil { |
| 397 |
if x, ok := x.Claims.(*KeyClaims_VmKeyClaims); ok { |
| 398 |
return x.VmKeyClaims |
| 399 |
} |
| 400 |
} |
| 401 |
return nil |
| 402 |
} |
| 403 |
|
| 404 |
type isKeyClaims_Claims interface { |
| 405 |
isKeyClaims_Claims() |
| 406 |
} |
| 407 |
|
| 408 |
type KeyClaims_VmBindingClaims struct { |
| 409 |
VmBindingClaims *KeyClaims_VmProtectionBindingClaims `protobuf:"bytes,1,opt,name=vm_binding_claims,json=vmBindingClaims,proto3,oneof"` |
| 410 |
} |
| 411 |
|
| 412 |
type KeyClaims_VmKeyClaims struct { |
| 413 |
VmKeyClaims *KeyClaims_VmProtectionKeyClaims `protobuf:"bytes,2,opt,name=vm_key_claims,json=vmKeyClaims,proto3,oneof"` |
| 414 |
} |
| 415 |
|
| 416 |
func (*KeyClaims_VmBindingClaims) isKeyClaims_Claims() {} |
| 417 |
|
| 418 |
func (*KeyClaims_VmKeyClaims) isKeyClaims_Claims() {} |
| 419 |
|
| 420 |
type KeyClaims_VmProtectionBindingClaims struct { |
| 421 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 422 |
// The workload attests that it controls the corresponding private key. |
| 423 |
BindingPubKey *HpkePublicKey `protobuf:"bytes,1,opt,name=binding_pub_key,json=bindingPubKey,proto3" json:"binding_pub_key,omitempty"` |
| 424 |
unknownFields protoimpl.UnknownFields |
| 425 |
sizeCache protoimpl.SizeCache |
| 426 |
} |
| 427 |
|
| 428 |
func (x *KeyClaims_VmProtectionBindingClaims) Reset() { |
| 429 |
*x = KeyClaims_VmProtectionBindingClaims{} |
| 430 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[5] |
| 431 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 432 |
ms.StoreMessageInfo(mi) |
| 433 |
} |
| 434 |
|
| 435 |
func (x *KeyClaims_VmProtectionBindingClaims) String() string { |
| 436 |
return protoimpl.X.MessageStringOf(x) |
| 437 |
} |
| 438 |
|
| 439 |
func (*KeyClaims_VmProtectionBindingClaims) ProtoMessage() {} |
| 440 |
|
| 441 |
func (x *KeyClaims_VmProtectionBindingClaims) ProtoReflect() protoreflect.Message { |
| 442 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[5] |
| 443 |
if x != nil { |
| 444 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 445 |
if ms.LoadMessageInfo() == nil { |
| 446 |
ms.StoreMessageInfo(mi) |
| 447 |
} |
| 448 |
return ms |
| 449 |
} |
| 450 |
return mi.MessageOf(x) |
| 451 |
} |
| 452 |
|
| 453 |
// Deprecated: Use KeyClaims_VmProtectionBindingClaims.ProtoReflect.Descriptor instead. |
| 454 |
func (*KeyClaims_VmProtectionBindingClaims) Descriptor() ([]byte, []int) { |
| 455 |
return file_keymanager_km_common_proto_key_claims_proto_rawDescGZIP(), []int{4, 0} |
| 456 |
} |
| 457 |
|
| 458 |
func (x *KeyClaims_VmProtectionBindingClaims) GetBindingPubKey() *HpkePublicKey { |
| 459 |
if x != nil { |
| 460 |
return x.BindingPubKey |
| 461 |
} |
| 462 |
return nil |
| 463 |
} |
| 464 |
|
| 465 |
type KeyClaims_VmProtectionKeyClaims struct { |
| 466 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 467 |
// The Key Protection Service attests that it controls the KEM private key, and that |
| 468 |
// it will encrypt all resulting shared secrets to the binding key. |
| 469 |
KemPubKey *KemPublicKey `protobuf:"bytes,1,opt,name=kem_pub_key,json=kemPubKey,proto3" json:"kem_pub_key,omitempty"` |
| 470 |
BindingPubKey *HpkePublicKey `protobuf:"bytes,2,opt,name=binding_pub_key,json=bindingPubKey,proto3" json:"binding_pub_key,omitempty"` |
| 471 |
// The remaining time until the Key Protection Service will autonomously delete its |
| 472 |
// KEM keypair. |
| 473 |
RemainingLifespan *durationpb.Duration `protobuf:"bytes,3,opt,name=remaining_lifespan,json=remainingLifespan,proto3" json:"remaining_lifespan,omitempty"` |
| 474 |
unknownFields protoimpl.UnknownFields |
| 475 |
sizeCache protoimpl.SizeCache |
| 476 |
} |
| 477 |
|
| 478 |
func (x *KeyClaims_VmProtectionKeyClaims) Reset() { |
| 479 |
*x = KeyClaims_VmProtectionKeyClaims{} |
| 480 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[6] |
| 481 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 482 |
ms.StoreMessageInfo(mi) |
| 483 |
} |
| 484 |
|
| 485 |
func (x *KeyClaims_VmProtectionKeyClaims) String() string { |
| 486 |
return protoimpl.X.MessageStringOf(x) |
| 487 |
} |
| 488 |
|
| 489 |
func (*KeyClaims_VmProtectionKeyClaims) ProtoMessage() {} |
| 490 |
|
| 491 |
func (x *KeyClaims_VmProtectionKeyClaims) ProtoReflect() protoreflect.Message { |
| 492 |
mi := &file_keymanager_km_common_proto_key_claims_proto_msgTypes[6] |
| 493 |
if x != nil { |
| 494 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 495 |
if ms.LoadMessageInfo() == nil { |
| 496 |
ms.StoreMessageInfo(mi) |
| 497 |
} |
| 498 |
return ms |
| 499 |
} |
| 500 |
return mi.MessageOf(x) |
| 501 |
} |
| 502 |
|
| 503 |
// Deprecated: Use KeyClaims_VmProtectionKeyClaims.ProtoReflect.Descriptor instead. |
| 504 |
func (*KeyClaims_VmProtectionKeyClaims) Descriptor() ([]byte, []int) { |
| 505 |
return file_keymanager_km_common_proto_key_claims_proto_rawDescGZIP(), []int{4, 1} |
| 506 |
} |
| 507 |
|
| 508 |
func (x *KeyClaims_VmProtectionKeyClaims) GetKemPubKey() *KemPublicKey { |
| 509 |
if x != nil { |
| 510 |
return x.KemPubKey |
| 511 |
} |
| 512 |
return nil |
| 513 |
} |
| 514 |
|
| 515 |
func (x *KeyClaims_VmProtectionKeyClaims) GetBindingPubKey() *HpkePublicKey { |
| 516 |
if x != nil { |
| 517 |
return x.BindingPubKey |
| 518 |
} |
| 519 |
return nil |
| 520 |
} |
| 521 |
|
| 522 |
func (x *KeyClaims_VmProtectionKeyClaims) GetRemainingLifespan() *durationpb.Duration { |
| 523 |
if x != nil { |
| 524 |
return x.RemainingLifespan |
| 525 |
} |
| 526 |
return nil |
| 527 |
} |
| 528 |
|
| 529 |
var File_keymanager_km_common_proto_key_claims_proto protoreflect.FileDescriptor |
| 530 |
|
| 531 |
const file_keymanager_km_common_proto_key_claims_proto_rawDesc = "" + |
| 532 |
"\n" + |
| 533 |
"+keymanager/km_common/proto/key_claims.proto\x12\n" + |
| 534 |
"keymanager\x1a\x1egoogle/protobuf/duration.proto\x1a+keymanager/km_common/proto/algorithms.proto\"#\n" + |
| 535 |
"\tKeyHandle\x12\x16\n" + |
| 536 |
"\x06handle\x18\x01 \x01(\tR\x06handle\"{\n" + |
| 537 |
"\x13GetKeyClaimsRequest\x124\n" + |
| 538 |
"\n" + |
| 539 |
"key_handle\x18\x01 \x01(\v2\x15.keymanager.KeyHandleR\tkeyHandle\x12.\n" + |
| 540 |
"\bkey_type\x18\x02 \x01(\x0e2\x13.keymanager.KeyTypeR\akeyType\"e\n" + |
| 541 |
"\fKemPublicKey\x126\n" + |
| 542 |
"\talgorithm\x18\x01 \x01(\x0e2\x18.keymanager.KemAlgorithmR\talgorithm\x12\x1d\n" + |
| 543 |
"\n" + |
| 544 |
"public_key\x18\x02 \x01(\fR\tpublicKey\"g\n" + |
| 545 |
"\rHpkePublicKey\x127\n" + |
| 546 |
"\talgorithm\x18\x01 \x01(\v2\x19.keymanager.HpkeAlgorithmR\talgorithm\x12\x1d\n" + |
| 547 |
"\n" + |
| 548 |
"public_key\x18\x02 \x01(\fR\tpublicKey\"\x88\x04\n" + |
| 549 |
"\tKeyClaims\x12]\n" + |
| 550 |
"\x11vm_binding_claims\x18\x01 \x01(\v2/.keymanager.KeyClaims.VmProtectionBindingClaimsH\x00R\x0fvmBindingClaims\x12Q\n" + |
| 551 |
"\rvm_key_claims\x18\x02 \x01(\v2+.keymanager.KeyClaims.VmProtectionKeyClaimsH\x00R\vvmKeyClaims\x1a^\n" + |
| 552 |
"\x19VmProtectionBindingClaims\x12A\n" + |
| 553 |
"\x0fbinding_pub_key\x18\x01 \x01(\v2\x19.keymanager.HpkePublicKeyR\rbindingPubKey\x1a\xde\x01\n" + |
| 554 |
"\x15VmProtectionKeyClaims\x128\n" + |
| 555 |
"\vkem_pub_key\x18\x01 \x01(\v2\x18.keymanager.KemPublicKeyR\tkemPubKey\x12A\n" + |
| 556 |
"\x0fbinding_pub_key\x18\x02 \x01(\v2\x19.keymanager.HpkePublicKeyR\rbindingPubKey\x12H\n" + |
| 557 |
"\x12remaining_lifespan\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x11remainingLifespanB\b\n" + |
| 558 |
"\x06claims*g\n" + |
| 559 |
"\aKeyType\x12\x18\n" + |
| 560 |
"\x14KEY_TYPE_UNSPECIFIED\x10\x00\x12\"\n" + |
| 561 |
"\x1eKEY_TYPE_VM_PROTECTION_BINDING\x10\x01\x12\x1e\n" + |
| 562 |
"\x1aKEY_TYPE_VM_PROTECTION_KEY\x10\x02*\x86\x01\n" + |
| 563 |
"\x16KeyProtectionMechanism\x12(\n" + |
| 564 |
"$KEY_PROTECTION_MECHANISM_UNSPECIFIED\x10\x00\x12\v\n" + |
| 565 |
"\aDEFAULT\x10\x01\x12\x15\n" + |
| 566 |
"\x11KEY_PROTECTION_VM\x10\x02\x12\x1e\n" + |
| 567 |
"\x1aKEY_PROTECTION_VM_EMULATED\x10\x03BFZDgithub.com/google/go-tpm-tools/keymanager/km_common/proto;keymanagerb\x06proto3" |
| 568 |
|
| 569 |
var ( |
| 570 |
file_keymanager_km_common_proto_key_claims_proto_rawDescOnce sync.Once |
| 571 |
file_keymanager_km_common_proto_key_claims_proto_rawDescData []byte |
| 572 |
) |
| 573 |
|
| 574 |
func file_keymanager_km_common_proto_key_claims_proto_rawDescGZIP() []byte { |
| 575 |
file_keymanager_km_common_proto_key_claims_proto_rawDescOnce.Do(func() { |
| 576 |
file_keymanager_km_common_proto_key_claims_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_keymanager_km_common_proto_key_claims_proto_rawDesc), len(file_keymanager_km_common_proto_key_claims_proto_rawDesc))) |
| 577 |
}) |
| 578 |
return file_keymanager_km_common_proto_key_claims_proto_rawDescData |
| 579 |
} |
| 580 |
|
| 581 |
var file_keymanager_km_common_proto_key_claims_proto_enumTypes = make([]protoimpl.EnumInfo, 2) |
| 582 |
var file_keymanager_km_common_proto_key_claims_proto_msgTypes = make([]protoimpl.MessageInfo, 7) |
| 583 |
var file_keymanager_km_common_proto_key_claims_proto_goTypes = []any{ |
| 584 |
(KeyType)(0), // 0: keymanager.KeyType |
| 585 |
(KeyProtectionMechanism)(0), // 1: keymanager.KeyProtectionMechanism |
| 586 |
(*KeyHandle)(nil), // 2: keymanager.KeyHandle |
| 587 |
(*GetKeyClaimsRequest)(nil), // 3: keymanager.GetKeyClaimsRequest |
| 588 |
(*KemPublicKey)(nil), // 4: keymanager.KemPublicKey |
| 589 |
(*HpkePublicKey)(nil), // 5: keymanager.HpkePublicKey |
| 590 |
(*KeyClaims)(nil), // 6: keymanager.KeyClaims |
| 591 |
(*KeyClaims_VmProtectionBindingClaims)(nil), // 7: keymanager.KeyClaims.VmProtectionBindingClaims |
| 592 |
(*KeyClaims_VmProtectionKeyClaims)(nil), // 8: keymanager.KeyClaims.VmProtectionKeyClaims |
| 593 |
(KemAlgorithm)(0), // 9: keymanager.KemAlgorithm |
| 594 |
(*HpkeAlgorithm)(nil), // 10: keymanager.HpkeAlgorithm |
| 595 |
(*durationpb.Duration)(nil), // 11: google.protobuf.Duration |
| 596 |
} |
| 597 |
var file_keymanager_km_common_proto_key_claims_proto_depIdxs = []int32{ |
| 598 |
2, // 0: keymanager.GetKeyClaimsRequest.key_handle:type_name -> keymanager.KeyHandle |
| 599 |
0, // 1: keymanager.GetKeyClaimsRequest.key_type:type_name -> keymanager.KeyType |
| 600 |
9, // 2: keymanager.KemPublicKey.algorithm:type_name -> keymanager.KemAlgorithm |
| 601 |
10, // 3: keymanager.HpkePublicKey.algorithm:type_name -> keymanager.HpkeAlgorithm |
| 602 |
7, // 4: keymanager.KeyClaims.vm_binding_claims:type_name -> keymanager.KeyClaims.VmProtectionBindingClaims |
| 603 |
8, // 5: keymanager.KeyClaims.vm_key_claims:type_name -> keymanager.KeyClaims.VmProtectionKeyClaims |
| 604 |
5, // 6: keymanager.KeyClaims.VmProtectionBindingClaims.binding_pub_key:type_name -> keymanager.HpkePublicKey |
| 605 |
4, // 7: keymanager.KeyClaims.VmProtectionKeyClaims.kem_pub_key:type_name -> keymanager.KemPublicKey |
| 606 |
5, // 8: keymanager.KeyClaims.VmProtectionKeyClaims.binding_pub_key:type_name -> keymanager.HpkePublicKey |
| 607 |
11, // 9: keymanager.KeyClaims.VmProtectionKeyClaims.remaining_lifespan:type_name -> google.protobuf.Duration |
| 608 |
10, // [10:10] is the sub-list for method output_type |
| 609 |
10, // [10:10] is the sub-list for method input_type |
| 610 |
10, // [10:10] is the sub-list for extension type_name |
| 611 |
10, // [10:10] is the sub-list for extension extendee |
| 612 |
0, // [0:10] is the sub-list for field type_name |
| 613 |
} |
| 614 |
|
| 615 |
func init() { file_keymanager_km_common_proto_key_claims_proto_init() } |
| 616 |
func file_keymanager_km_common_proto_key_claims_proto_init() { |
| 617 |
if File_keymanager_km_common_proto_key_claims_proto != nil { |
| 618 |
return |
| 619 |
} |
| 620 |
file_keymanager_km_common_proto_algorithms_proto_init() |
| 621 |
file_keymanager_km_common_proto_key_claims_proto_msgTypes[4].OneofWrappers = []any{ |
| 622 |
(*KeyClaims_VmBindingClaims)(nil), |
| 623 |
(*KeyClaims_VmKeyClaims)(nil), |
| 624 |
} |
| 625 |
type x struct{} |
| 626 |
out := protoimpl.TypeBuilder{ |
| 627 |
File: protoimpl.DescBuilder{ |
| 628 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 629 |
RawDescriptor: unsafe.Slice(unsafe.StringData(file_keymanager_km_common_proto_key_claims_proto_rawDesc), len(file_keymanager_km_common_proto_key_claims_proto_rawDesc)), |
| 630 |
NumEnums: 2, |
| 631 |
NumMessages: 7, |
| 632 |
NumExtensions: 0, |
| 633 |
NumServices: 0, |
| 634 |
}, |
| 635 |
GoTypes: file_keymanager_km_common_proto_key_claims_proto_goTypes, |
| 636 |
DependencyIndexes: file_keymanager_km_common_proto_key_claims_proto_depIdxs, |
| 637 |
EnumInfos: file_keymanager_km_common_proto_key_claims_proto_enumTypes, |
| 638 |
MessageInfos: file_keymanager_km_common_proto_key_claims_proto_msgTypes, |
| 639 |
}.Build() |
| 640 |
File_keymanager_km_common_proto_key_claims_proto = out.File |
| 641 |
file_keymanager_km_common_proto_key_claims_proto_goTypes = nil |
| 642 |
file_keymanager_km_common_proto_key_claims_proto_depIdxs = nil |
| 643 |
} |