blob: ef93bb5ec40dd99542d333c4ffb392169c44ed18 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto2";
package cryptohome;
// Container for the signature-sealed data, including the additional non-secret
// information required for unsealing.
message SignatureSealedData {
// Index and value of a TPM Platform Configuration Register (PCR).
message PcrValue {
optional uint32 pcr_index = 1;
optional bytes pcr_value = 2;
}
// Information about a single set of PCR restrictions for TPM 2.0.
message Tpm2PcrRestriction {
// List of PCR values that must be all satisfied for this restriction.
repeated PcrValue pcr_values = 1;
// TPM policy digest for the TPM2_PolicyPCR command executed with the PCR
// values specified by |pcr_values|.
optional bytes policy_digest = 2;
}
// Data for the TPM 2.0 method based on the "TPM2_PolicySigned" feature.
message Tpm2PolicySignedData {
// DER-encoded blob of the X.509 Subject Public Key Info of the key that
// should be used for unsealing.
optional bytes public_key_spki_der = 1;
// The secret blob, wrapped by the TPM's Storage Root Key.
optional bytes srk_wrapped_secret = 2;
// The signature scheme (TPM_ALG_ID) that should be used for unsealing.
optional int32 scheme = 3;
// The signature hash algorithm (TPM_ALG_ID) that should be used for
// unsealing.
optional int32 hash_alg = 4;
// Multiple alternative sets of PCR restrictions that are applied to the
// wrapped secret. For unsealing, it's enough to satisfy only one of those
// restrictions.
// Note that the order of items here is important: it defines the order of
// arguments when building the TPM policy digest.
repeated Tpm2PcrRestriction pcr_restrictions = 5;
}
// Data for the TPM 1.2 method based on the "Certified Migratable Key"
// functionality.
message Tpm12CertifiedMigratableKeyData {
// DER-encoded blob of the X.509 Subject Public Key Info of the key that
// should be used for unsealing.
optional bytes public_key_spki_der = 1;
// The blob of the Certified Migratable Key wrapped by the TPM's Storage
// Root Key.
optional bytes srk_wrapped_cmk = 2;
// The TPM_PUBKEY blob of the Certified Migratable Key.
optional bytes cmk_pubkey = 3;
}
// The union containing the data depending on the sealing method.
oneof data {
Tpm2PolicySignedData tpm2_policy_signed_data = 1;
Tpm12CertifiedMigratableKeyData tpm12_certified_migratable_key_data = 2;
}
}