Skip to content

This experimental repository for tpm API investigation

Notifications You must be signed in to change notification settings

Michael89/tpmsandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TPM2 sandbox

This experimental repository for tpm API investigation

TPM API implementations (tpm software stack) consists of 3 lvl of complexity, the easiest one is Feature API (FAPI), Enhanced System API (ESAPI), System API (SAPI) is low level api. https://github.com/tpm2-software/tpm2-tss

Useful resources:

Software implementation of TPM emulator (best to use in order to not mess up your hardware): https://github.com/stefanberger/swtpm

When using software emulation disable EK in fapi configs /usr/local/etc/tpm2-tss/fapi-config.json

"profile_name": "P_ECCP256SHA256",
"profile_dir": "/usr/local/etc/tpm2-tss/fapi-profiles/",
"user_dir": "~/.local/share/tpm2-tss/user/keystore",
"system_dir": "/usr/local/var/lib/tpm2-tss/system/keystore",
"tcti": "",
"system_pcrs" : [],
"log_dir" : "/usr/local/var/run/tpm2-tss/eventlog/",
"ek_cert_less": "yes"
}

Also tpm is emulated for user by name and group tss/tss so be aware of it. (I didn't figure out how to change user)

Example of running in chardev mode sudo swtpm chardev --vtpm-proxy --tpmstate dir=/tmp/myvtpm --tpm2 --ctrl type=tcp,port=2322 got from this issue stefanberger/swtpm#427

Python bindings https://pypi.org/project/tpm2-pytss/

About

This experimental repository for tpm API investigation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published