Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a tpm_send.exe #2619

Closed
AndreasFuchsTPM opened this issue May 23, 2023 · 3 comments
Closed

Implement a tpm_send.exe #2619

AndreasFuchsTPM opened this issue May 23, 2023 · 3 comments

Comments

@AndreasFuchsTPM
Copy link
Member

In order to support access to TPMs from WSL2, we can implement a tpm_send.exe Windows version, that is then opened via the tcti-cmd using stdin/stdout in order to transfer commands.

@joholl
Copy link
Collaborator

joholl commented May 31, 2023

Why take a detour like that? Wouldn't it be better to have a tcti-wsl2 instead (without extra process, pipes and the need to compile another binary). This would probably be less work.

Any idea on how to access the TPM on Windows/WSL2?

EDIT: Ok, WSL does not support the TPM. I guess we are looking at something like eltt2 for Windows.

@joholl
Copy link
Collaborator

joholl commented Jun 15, 2023

@AndreasFuchsTPM I did a thing.

Currently, this uses static 4k buffers (stdin handling in linux didn't let me fseek and than malloc easily). There are other things, which can be improved, but for now it should serve our needs. I did test it on WSL2, but not in combination with the TSS. Let me know if it works for you.

Also, we can move this to the tpm2-software namespace, if you want.

@joholl
Copy link
Collaborator

joholl commented Nov 7, 2023

Ok, we have tpm2-send-tbs now. Granted, it still has limitations, but it is a start.

Example:

tpm2_getrandom -T "cmd: build/hex | build/tpm2-send-tbs.exe | build/unhex" --hex 4

@joholl joholl closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants