Skip to content

Commit f191603

Browse files
committed
docs: clarify include_hash_inputs returns hex-encoded bytes
The previous proto comment described v2 hash_input as "canonical JSON content", which would suggest the field holds a raw JSON string. hash_input is actually hex-encoded bytes of the digest pre-image, so clients must hex-decode first before interpreting the payload (UTF-8 JSON for v2, the v1 binary concat for v1). Spell out the encoding and the verification recipe so relying parties don't guess wrong.
1 parent 270aaf8 commit f191603

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

guest-agent/rpc/proto/agent_rpc.proto

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ message RawQuoteArgs {
171171
// 64 bytes of report data
172172
bytes report_data = 1;
173173
// If true, include the digest hash input for each event in the response.
174-
// For v2 runtime events this is the canonical JSON content; for v1 it's
175-
// the binary concatenation of event_type, name, and payload.
174+
// The hash_input is hex-encoded bytes of the digest pre-image:
175+
// - v2 runtime events: hex of UTF-8 JCS canonical JSON
176+
// - v1 runtime events: hex of binary concat (event_type_le || ":" || name || ":" || payload)
177+
// Clients can verify: sha384(hex_decode(hash_input)) == event.digest
176178
// Enables relying parties to verify digests or inspect claims without
177179
// knowing the dstack event schema.
178180
bool include_hash_inputs = 2;

0 commit comments

Comments
 (0)