| 1 |
syntax = "proto3"; |
| 2 |
|
| 3 |
package tpm; |
| 4 |
option go_package = "github.com/google/go-tpm-tools/proto/tpm"; |
| 5 |
|
| 6 |
// Enum values come from TCG Algorithm Registry - v1.27 - Table 3 |
| 7 |
enum ObjectType { |
| 8 |
OBJECT_INVALID = 0x0000; |
| 9 |
RSA = 0x0001; |
| 10 |
ECC = 0x0023; |
| 11 |
} |
| 12 |
|
| 13 |
enum HashAlgo { |
| 14 |
HASH_INVALID = 0x0000; |
| 15 |
SHA1 = 0x0004; |
| 16 |
SHA256 = 0x000B; |
| 17 |
SHA384 = 0x000C; |
| 18 |
SHA512 = 0x000D; |
| 19 |
} |
| 20 |
|
| 21 |
// SealedBytes stores the result of a TPM2_Seal. The private portion (priv) has |
| 22 |
// already been encrypted and is no longer sensitive. The hash algorithm is |
| 23 |
// assumed to be SHA256. |
| 24 |
message SealedBytes { |
| 25 |
bytes priv = 1; |
| 26 |
bytes pub = 2; |
| 27 |
repeated uint32 pcrs = 3; |
| 28 |
HashAlgo hash = 4; |
| 29 |
ObjectType srk = 5; |
| 30 |
PCRs certified_pcrs = 6; |
| 31 |
bytes creation_data = 7; |
| 32 |
bytes ticket = 8; |
| 33 |
} |
| 34 |
|
| 35 |
message ImportBlob { |
| 36 |
bytes duplicate = 1; |
| 37 |
bytes encrypted_seed = 2; |
| 38 |
bytes public_area = 3; |
| 39 |
PCRs pcrs = 4; |
| 40 |
} |
| 41 |
|
| 42 |
message Quote { |
| 43 |
// TPM2 quote, encoded as a TPMS_ATTEST |
| 44 |
bytes quote = 1; |
| 45 |
// TPM2 signature, encoded as a TPMT_SIGNATURE |
| 46 |
bytes raw_sig = 2; |
| 47 |
// PCR values of the bank being quoted |
| 48 |
PCRs pcrs = 3; |
| 49 |
} |
| 50 |
|
| 51 |
message PCRs { |
| 52 |
HashAlgo hash = 1; |
| 53 |
map<uint32, bytes> pcrs = 2; |
| 54 |
} |
| 55 |
|
| 56 |
// Contains information corresponding an object certified with TPM2_Certify. |
| 57 |
message CertifiedBlob { |
| 58 |
// Public area of certified object, encoded as a TPMT_PUBLIC |
| 59 |
bytes pub_area = 1; |
| 60 |
// TPM2 certification, encoded as a TPMS_ATTEST |
| 61 |
bytes certify_info = 2; |
| 62 |
// TPM2 signature, encoded as a TPMT_Signature |
| 63 |
bytes raw_sig = 3; |
| 64 |
} |