Support for tpm persistent handles in TSS2 privkey#165
Open
royalsreafer wants to merge 1 commit into
Open
Conversation
a82ff3e to
d68463f
Compare
Signed-off-by: RoyalReafer <royalsmods@hotmail.com>
Contributor
|
@royalsreafer I've just seen your approach to use persistent handles. Integrates much nicer into the existing ASN1 structure. |
|
Is there anything we can do to move this PR along? We're currently using a forked version of tpm2-openssl with this patch, which isn't a big deal on its own, but having it in the upstream release is even better. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds support for encoding and decoding of TSS2 pem files which contain references to persistent handles. The handle is stored in the same privkey area as the keyblob. The length(4 bytes) and the first byte(0x81 for persistent handles) distinguishes it as a persistent key stored in the TPM. This approach keeps true to the ASN1 structure defined in OID "2.23.133.10.1.3" .
I've used this patch for a while now and has been working out for our use-case. The use-case being adding support for TPM2 keys without changing the code of applications. Many applications supporting OpenSSL, do not support loading TPM keys with the handle:81xxxxxx due to the ossl_store_ex not being called. TSS2 pem keys circumvent this and adding persistent key handle support to this format solved the issue with TPM2 persistent key support.
Another pull request with a different approach #162