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

Rewrite to use the new tpmdirect API from go-tpm #9

Merged
merged 18 commits into from
Jul 10, 2023
Merged

Conversation

Foxboron
Copy link
Owner

@Foxboron Foxboron commented Jul 8, 2023

No description provided.

@Foxboron
Copy link
Owner Author

Foxboron commented Jul 8, 2023

@chrisfenner I don't know if you are interested, but here is a rewrite of age-plugin-tpm from the legacy tpm2 API to the new tpmdirect API.

I'm not sure if this works as some form of feedback or if this helps on the API design :)

@Foxboron Foxboron force-pushed the morten/tpmdirect branch from c2d78a3 to 0d904bb Compare July 8, 2023 18:42
@Foxboron
Copy link
Owner Author

Foxboron commented Jul 9, 2023

Hrm, actually I tired running this on my actual TPM instead of the swtpm stuff and it fails to do ECDHZGen. Just blocks without any response from the TPM.

Age interrupting the plugin too quickly it seems(?)

Foxboron added 8 commits July 10, 2023 14:25
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
We get a stanza, and we should reply with a stanza. Previously we would
intermingle this which would probably lead to a couple of subtle bugs

This also implements multiple recipients.
Signed-off-by: Morten Linderud <morten@linderud.pw>
@Foxboron Foxboron force-pushed the morten/tpmdirect branch 2 times, most recently from db93c1c to d26b975 Compare July 10, 2023 14:10
Foxboron added 2 commits July 10, 2023 16:11
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
@chrisfenner
Copy link

definitely interested, thanks for tagging me! I have filed a feature request for go-tpm to add a UnmarshalReader/MarshalReader surface, and left a few other comments on the design of your code here. Thanks for using the new go-tpm API!!

@Foxboron
Copy link
Owner Author

definitely interested, thanks for tagging me! I have filed a feature request for go-tpm to add a UnmarshalReader/MarshalReader surface, and left a few other comments on the design of your code here. Thanks for using the new go-tpm API!!

Thank you very much for taking the time to review the code :)

Foxboron added 8 commits July 10, 2023 20:38
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
…g function

Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
…nderstand

Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
@Foxboron Foxboron deleted the morten/tpmdirect branch February 15, 2025 14:17
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

Successfully merging this pull request may close these issues.

2 participants