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

Require access to owner auth when it isn't necessary #209

Open
scott-cryptosecure opened this issue Apr 16, 2021 · 1 comment
Open

Require access to owner auth when it isn't necessary #209

scott-cryptosecure opened this issue Apr 16, 2021 · 1 comment

Comments

@scott-cryptosecure
Copy link

tpm2-tss-engine requires owner auth passed in as a parameter. The tpm2-tss-engine will use it to create the primary key even though it may already exists and may be in use by other processes. This should not be necessary since owner auth is only used to create primary and primary already exists and is persistent. tpm2-tss-engine should check for ownership or the primary key, and if already configured, it should not attempt to recreate or manage those highly sensitive resources.

I am attempting to use OpenSSL to create TLS connections with a TPM key and wanted to use tpm2-tss-engine. This is one of multiple features on the endpoint that will be using the TPM. As part of the provisioning of the system, ownership of the storage hierarchy will be set and the primary key will be created with multiple child keys. Owner auth is also used to protect items created and stored in NVRAM. Provisioning is performed in a secure environment and auth values used for owner auth and lockout auth are not shared with the runtime users of the system.

Here is a description of the test case that is failing and why we believe it is failing.

start with a TPM 2.0 that is not owned, but it is enabled and activated.

execute test application that uses TSS to perform the following:
1) take ownership of the storage hierarchy with a strong auth value
2) create an ECC primary key for the storage hierarchy, this primary key has null auth.
3) create ECC signing key(s) under the primary key.
4) create objects in NV using owner auth to create and for write auth.

verify created objects exist.

execute test application that uses openssl with tpm2-tss-engine to execute the following:
5) call tpm2tss to create an ECC key

operation fails with bad auth.

This implies, and review of the code seems to confirm, that we must pass tpm2-tss-engine the owner auth or use engine ctrl to allow tpm2-tss-engine to save the owner auth.

@AndreasFuchsTPM
Copy link
Member

Makes sense, I guess.

@AndreasFuchsTPM AndreasFuchsTPM added the bug Something isn't working label Sep 3, 2021
@AndreasFuchsTPM AndreasFuchsTPM removed the bug Something isn't working label Nov 4, 2021
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

3 participants
@AndreasFuchsTPM @scott-cryptosecure and others