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

Use crypto/ecdh for tpmdirect #327

Open
Foxboron opened this issue May 5, 2023 · 5 comments
Open

Use crypto/ecdh for tpmdirect #327

Foxboron opened this issue May 5, 2023 · 5 comments

Comments

@Foxboron
Copy link
Contributor

Foxboron commented May 5, 2023

It seems like tpmdirect is dealing with a bit of low-level stuff to accomplish ECDH which is mostly solved with the new crypto/ecdh package.

Would it be a good idea to consider using this package maybe?

Currently the only missing part is TPMECCNistP224 which crypot/ecdh doesn't implement.

@chrisfenner
Copy link
Member

Thanks for this issue! Yes, we should use this.

@Foxboron
Copy link
Contributor Author

Foxboron commented May 5, 2023

I can write up a suggestion if we are fine with loosing support for a few curves.

@chrisfenner
Copy link
Member

Hmm, more than P224? I think we'd have to discuss this in our team but if you sent a PR it would prompt such discussion, thanks!

@Foxboron
Copy link
Contributor Author

Foxboron commented May 5, 2023

We'll largely be limited to the supported curves in crypto/ecdh which would be P256, P384 and P521 which is a small subset of what TPMs intend to provide support for.

Alternatively one can implement the ecdh.Curve interface on the stuff that would need it in the future.

@chrisfenner
Copy link
Member

Yeah, I will also take a look on my side to see if the Go crypto team would be receptive to adding those curves.

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