Skip to content

[KeyManager] Add KeyClaims proto and generation script.#671

Merged
atulpatildbz merged 4 commits intogoogle:mainfrom
atulpatildbz:keyclaims_proto
Feb 28, 2026
Merged

[KeyManager] Add KeyClaims proto and generation script.#671
atulpatildbz merged 4 commits intogoogle:mainfrom
atulpatildbz:keyclaims_proto

Conversation

@atulpatildbz
Copy link
Collaborator

adds the KeyClaims proto definition in keymanager/km_common/proto/ which includes VmAttestation, KeyAttestation, and related messages for key protection and attestation.

It also adds proto/gen_keymanager.sh to generate Go code for keymanager protos.

Copy link
Contributor

@alexmwu alexmwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VM Attestation message and dependencies belong in https://github.com/GoogleCloudPlatform/confidential-space/tree/main/server not here.


// The key is held by the Key Protection Services VM, and is endorsed by a pair of CVM
// attestations, from the Workload Services Daemon and Key Protection VM.
KEY_PROTECTION_VM = 2;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need the KEY_PROTECTION_VM_EMULATED mode here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added


message KeyClaims {
// The following two messages are used for keys whose protection mechanism is
// KEY_PROTECTION_VM.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or KEY_PROTECTION_VM_EMULATED

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Comment on lines +42 to +58
message KemCiphertext {
KemAlgorithm algorithm = 1;
bytes ciphertext = 2; // `Nenc` bytes long.
}

// The results of a Decaps operation.
message KemSharedSecret {
KemAlgorithm algorithm = 1;
bytes secret = 2; // `Nsecret` bytes long.
}

message HpkePayload {
HpkeAlgorithm algorithm = 1;
bytes kem_ciphertext = 2; // `Nenc` bytes long.
bytes payload_ciphertext = 3; // Encrypted data.
bytes authentication_tag = 4; // `Nt` bytes long.
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not really involved with key_claims, should we either move these definitions or rename the file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to keymanager/km_common/proto/payload.proto

adds the `KeyClaims` proto definition in `keymanager/km_common/proto/`
which includes `VmAttestation`, `KeyAttestation`, and related messages
for key protection and attestation.

It also adds `proto/gen_keymanager.sh` to generate Go code for
keymanager protos.
…for algorithms.proto

Removed VM attestation related messages from key_claims.proto, they will
be added in github.com/GoogleCloudPlatform/confidential-space separately

Since 2 proto files are in the same directory, i changed the package
name in algorithms.proto to keymanager
moved operational payload structures (KemCiphertext, KemSharedSecret,
HpkePayload) out of key_claims.proto, which should only be used for
attestation identity claims.
@atulpatildbz atulpatildbz merged commit 0c7c4a6 into google:main Feb 28, 2026
12 checks passed
mayafleischer pushed a commit to mayafleischer/go-tpm-tools that referenced this pull request Mar 4, 2026
Adds Protobufs for KeyClaims

**Key Changes:**
* **Protobuf Definitions:** Adds `algorithms.proto`, `key_claims.proto`, and `payload.proto` to `keymanager/km_common/proto/`
* **Generation script:** `proto/gen_keymanager.sh` to easily build and update the corresponding Go bindings (`.pb.go`).
* Rename the package algorithms to keymanager.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants