MCPcopy Create free account
hub / github.com/secdev/scapy / TPMT_PUBLIC

Class TPMT_PUBLIC

scapy/layers/tpm.py:183–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181
182
183class TPMT_PUBLIC(_Packet):
184 fields_desc = [
185 ShortEnumField("type", 0x0001, TPM_ALG),
186 ShortEnumField("nameAlg", 0, TPM_ALG),
187 FlagsField(
188 "objectAttributes",
189 0,
190 32,
191 [
192 "reserved1",
193 "fixedTPM",
194 "stClear",
195 "reserved4",
196 "fixedParent",
197 "sensitiveDataOrigin",
198 "userWithAuth",
199 "adminWithPolicy",
200 "reserved8",
201 "reserved9",
202 "noDA",
203 "encryptedDuplication",
204 "reserved12",
205 "reserved13",
206 "reserved14",
207 "reserved15",
208 "restricted",
209 "decrypt",
210 "sign",
211 ],
212 ),
213 PacketField("authPolicy", TPM2B_DIGEST(), TPM2B_DIGEST),
214 MultipleTypeField(
215 [
216 # TPMU_PUBLIC_PARMS
217 (
218 PacketField("parameters", TPMS_RSA_PARMS(), TPMS_RSA_PARMS),
219 lambda pkt: pkt.type == 0x0001,
220 )
221 ],
222 StrFixedLenField("parameters", b"", length=0),
223 ),
224 # TPMU_PUBLIC_ID
225 PacketField("unique", TPM2B_DIGEST(), TPM2B_DIGEST),
226 ]
227
228
229class TPM2B_PUBLIC(_Packet):

Callers 1

TPM2B_PUBLICClass · 0.85

Calls 7

ShortEnumFieldClass · 0.90
FlagsFieldClass · 0.90
PacketFieldClass · 0.90
MultipleTypeFieldClass · 0.90
StrFixedLenFieldClass · 0.90
TPM2B_DIGESTClass · 0.85
TPMS_RSA_PARMSClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…