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

Add asymmetric encryption support to TPM provider #225

Merged
merged 1 commit into from
Aug 18, 2020

Conversation

ionut-arm
Copy link
Member

This commit adds support for asymmetric encryption to the TPM provider.

Signed-off-by: Ionut Mihalcea [email protected]

Implements #217

@ionut-arm ionut-arm added the enhancement New feature or request label Aug 17, 2020
@ionut-arm ionut-arm requested a review from hug-dev August 17, 2020 14:20
@ionut-arm ionut-arm self-assigned this Aug 17, 2020
@hug-dev hug-dev linked an issue Aug 17, 2020 that may be closed by this pull request
Copy link
Member

@hug-dev hug-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding support for asymmetric encryption!

Comment on lines +76 to +78
// Test is ignored as TPMs do not support labels that don't end in a 0 byte
// A resolution for this has not been reached yet, so keeping as is
// See: https://github.com/parallaxsecond/parsec/issues/217
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also add a 0 at the end of the salt just to make the test pass on all providers?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one that does asym encrypt and decrypt with Parsec would work, but the other one won't unless we build a &str label that ends with a 0 byte UTF-8 character (I actually tried that, it worked). Don't know which path is better, whether they should be ignored or not, @paulhowardarm was saying that we should have some tests that prove the problem and they should be disabled for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I see. I was thinking it would be nice to have some tests activated (even if TPM specific) to make sure that it is working end-to-end.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add an integration test just for that (the kind that only use the provider, not the whole service)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm adding an integration test but I'll raise an issue to refactor those integration tests into the e2e_tests, think I have an easy way of doing it.

This commit adds support for asymmetric encryption to the TPM provider.

Signed-off-by: Ionut Mihalcea <[email protected]>
Copy link
Member

@hug-dev hug-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

�Thanks for adding the test!

Comment on lines +52 to +54
rsa = "0.3.0"
rand = "0.7.3"
sha2 = "0.9.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add that in a future PR to the README.md

@hug-dev hug-dev merged commit 92216ee into parallaxsecond:master Aug 18, 2020
@ionut-arm ionut-arm deleted the tpm-async-enc branch January 19, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement asymmetric encrypting/decrypting for TPM provider
2 participants