1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
// Copyright 2020 Contributors to the Parsec project.
// SPDX-License-Identifier: Apache-2.0

/// The structures module attempts as far as possible to
/// reflect the specifications way of defining structures
/// see:
///
/// Trusted Platform Module Library
/// Part 2: Structures
/// Family “2.0”
/// Level 00 Revision 01.59
/// November 8, 2019
/// Published
///
/// Chapter 10: Structure Definitions

/////////////////////////////////////////////////////////
/// The capabilitydata section
/////////////////////////////////////////////////////////
mod capability_data;
pub use self::capability_data::CapabilityData;
/////////////////////////////////////////////////////////
/// The names section
/////////////////////////////////////////////////////////
mod names;
pub use names::name::Name;
/////////////////////////////////////////////////////////
/// The result section
/////////////////////////////////////////////////////////
mod result;
pub use result::CreateKeyResult;
pub use result::CreatePrimaryKeyResult;
/////////////////////////////////////////////////////////
/// The sized buffers section
/////////////////////////////////////////////////////////
mod buffers;
pub use self::buffers::{
    attest::AttestBuffer, auth::Auth, data::Data, digest::Digest, ecc_parameter::EccParameter,
    encrypted_secret::EncryptedSecret, id_object::IdObject, initial_value::InitialValue,
    max_buffer::MaxBuffer, max_nv_buffer::MaxNvBuffer, nonce::Nonce, private::Private,
    private_key_rsa::PrivateKeyRsa, private_vendor_specific::PrivateVendorSpecific,
    public::PublicBuffer, public_key_rsa::PublicKeyRsa, sensitive::SensitiveBuffer,
    sensitive_data::SensitiveData, symmetric_key::SymmetricKey, timeout::Timeout,
};
/////////////////////////////////////////////////////////
/// The creation section
/////////////////////////////////////////////////////////
mod creation;
pub use self::creation::CreationData;
/////////////////////////////////////////////////////////
/// The hash section
/////////////////////////////////////////////////////////
mod hash;
pub use self::hash::agile::HashAgile;
/////////////////////////////////////////////////////////
/// The pcr section
/////////////////////////////////////////////////////////
mod pcr;

pub use self::pcr_slot::PcrSlot;
pub mod pcr_slot {
    pub use super::pcr::slot::*;
}

pub use self::pcr_select::PcrSelect;
pub mod pcr_select {
    pub use super::pcr::select::*;
}

pub use self::pcr_selection::PcrSelection;
pub mod pcr_selection {
    pub use super::pcr::selection::*;
}

pub use self::pcr_select_size::PcrSelectSize;
pub mod pcr_select_size {
    pub use super::pcr::select_size::*;
}
/////////////////////////////////////////////////////////
/// The lists section
/////////////////////////////////////////////////////////
mod lists;
pub use self::digest_list::DigestList;
pub mod digest_list {
    pub use super::lists::digest::*;
}

pub use self::digest_values::DigestValues;
pub mod digest_values {
    pub use super::lists::digest_values::*;
}

pub use self::ecc_curves::EccCurveList;
pub mod ecc_curves {
    pub use super::lists::ecc_curves::*;
}

pub use self::handle_list::HandleList;
pub mod handle_list {
    pub use super::lists::handles::*;
}

pub use self::pcr_selection_list::PcrSelectionList;
pub use self::pcr_selection_list::PcrSelectionListBuilder;
pub mod pcr_selection_list {
    pub use super::lists::pcr_selection::*;
}

pub use self::command_code_list::CommandCodeList;
pub mod command_code_list {
    pub use super::lists::command_code::*;
}

pub use self::tagged_tpm_property_list::TaggedTpmPropertyList;
pub mod tagged_tpm_property_list {
    pub use super::lists::tagged_tpm_property::*;
}

pub use algorithm_property_list::AlgorithmPropertyList;
pub mod algorithm_property_list {
    pub use super::lists::algorithm_property::*;
}

pub use tagged_pcr_property_list::TaggedPcrPropertyList;
pub mod tagged_pcr_property_list {
    pub use super::lists::tagged_pcr_property::*;
}

pub use self::command_code_attributes_list::CommandCodeAttributesList;
pub mod command_code_attributes_list {
    pub use super::lists::command_code_attributes::*;
}

pub(crate) use pcr::slot_collection::PcrSlotCollection;
/////////////////////////////////////////////////////////
/// The parameters section
/////////////////////////////////////////////////////////
mod parameters;
pub use self::parameters::SymmetricCipherParameters;
/////////////////////////////////////////////////////////
/// The tickets section
/////////////////////////////////////////////////////////
mod tickets;
pub use tickets::AuthTicket;
pub use tickets::CreationTicket;
pub use tickets::HashcheckTicket;
pub use tickets::Ticket;
pub use tickets::VerifiedTicket;

mod schemes;
pub use schemes::{EcDaaScheme, HashScheme, HmacScheme, XorScheme};

mod tagged;
pub use tagged::{
    parameters::PublicParameters,
    public::{
        ecc::{PublicEccParameters, PublicEccParametersBuilder},
        keyed_hash::PublicKeyedHashParameters,
        rsa::{PublicRsaParameters, PublicRsaParametersBuilder, RsaExponent},
        Public, PublicBuilder,
    },
    schemes::{
        EccScheme, KeyDerivationFunctionScheme, KeyedHashScheme, RsaDecryptionScheme, RsaScheme,
        SignatureScheme,
    },
    sensitive::Sensitive,
    signature::Signature,
    symmetric::{SymmetricDefinition, SymmetricDefinitionObject},
};
/////////////////////////////////////////////////////////
/// ECC structures
/////////////////////////////////////////////////////////
mod ecc;
pub use ecc::point::EccPoint;
/////////////////////////////////////////////////////////
/// Signatures structures
/////////////////////////////////////////////////////////
mod signatures;
pub use signatures::{EccSignature, RsaSignature};
/////////////////////////////////////////////////////////
/// Attestation Structures
/////////////////////////////////////////////////////////
mod attestation;
pub use attestation::{
    attest::Attest, attest_info::AttestInfo, certify_info::CertifyInfo,
    command_audit_info::CommandAuditInfo, creation_info::CreationInfo,
    nv_certify_info::NvCertifyInfo, nv_digest_certify_info::NvDigestCertifyInfo,
    quote_info::QuoteInfo, session_audit_info::SessionAuditInfo, time_attest_info::TimeAttestInfo,
};
/////////////////////////////////////////////////////////
/// Clock/Time Structures
/////////////////////////////////////////////////////////
mod clock;
pub use clock::{clock_info::ClockInfo, time_info::TimeInfo};
/////////////////////////////////////////////////////////
/// Property Structures
/////////////////////////////////////////////////////////
mod property;
pub use property::{
    algorithm_property::AlgorithmProperty, tagged_pcr_select::TaggedPcrSelect,
    tagged_property::TaggedProperty,
};

/////////////////////////////////////////////////////////
/// NV structures
/////////////////////////////////////////////////////////
mod nv;
pub use nv::storage::{NvPublic, NvPublicBuilder};