Skip to contentSkip to conversation

Any way to change NVRAM index password?

tpm2 Scheie 1 participant 5 messages Sep 19, 2018 – Sep 21, 2018

lore
Share & tools
lore

Scheie

#0 lore raw

When I define an NVRAM index using tpm2_nvdefine, one thing I set is the index password with the -I option. I'm also setting the attribute ownerwrite for the index so the index can be written only if one knows the index password. Is there any way to change this password after I've set it, or do I have to remove the whole index (tpm2_nvrelease) and recreate it with the new password?

Peter

#1 lore raw

The normal anser:
It's complicated and requires quite some thought, so release+define is probably easier.

The TPM-nerd answer:
The TPM-function for this is TPM2_NV_ChangeAuth, but it requires a policy-session and you must have defined a policy with PolicyCommandCode(TPM2_CC_NV_CHANGEAUTH), since it's an admin auth.

Cheers,
Andreas

________________________________
From: tpm2 [tpm2-bounces(a)lists.01.org] on behalf of Scheie, Peter M [Petre.Scheie(a)gd-ms.com]
Sent: Wednesday, September 19, 2018 14:47
To: tpm2(a)lists.01.org
Subject: [tpm2] Any way to change NVRAM index password?

When I define an NVRAM index using tpm2_nvdefine, one thing I set is the index password with the –I option. I’m also setting the attribute ownerwrite for the index so the index can be written only if one knows the index password. Is there any way to change this password after I’ve set it, or do I have to remove the whole index (tpm2_nvrelease) and recreate it with the new password?

Peter

#2 lore raw

Peter,
What does "the -I option" mean? https://github.com/tpm2-software/tpm2-tools/commit/e105149f07c9b944f69599ab67cd8b018ad880d2

I believe you created an index with both ownerwrite/authwrite set, right?

This below is incorrect, if you're setting ownerwrite attribute, then you don't need to provide index auth/password. You can directly write it if you have owner auth value.

Quoted 1 line
Quoted 1 line

. I'm also setting the attribute ownerwrite for the index so the index can be written only if one knows the index password

Andreas answer is correct, TPM2_NV_ChangeAuth() is used to change index auth/password.

From: tpm2 [mailto:tpm2-bounces(a)lists.01.org] On Behalf Of Fuchs, Andreas
Sent: Wednesday, September 19, 2018 10:37 PM
To: Scheie, Peter M <Petre.Scheie(a)gd-ms.com>; tpm2(a)lists.01.org
Subject: Re: [tpm2] Any way to change NVRAM index password?

The normal anser:
It's complicated and requires quite some thought, so release+define is probably easier.

The TPM-nerd answer:
The TPM-function for this is TPM2_NV_ChangeAuth, but it requires a policy-session and you must have defined a policy with PolicyCommandCode(TPM2_CC_NV_CHANGEAUTH), since it's an admin auth.

Cheers,
Andreas

________________________________
From: tpm2 [tpm2-bounces(a)lists.01.org] on behalf of Scheie, Peter M [Petre.Scheie(a)gd-ms.com]
Sent: Wednesday, September 19, 2018 14:47
To: tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org>
Subject: [tpm2] Any way to change NVRAM index password?
When I define an NVRAM index using tpm2_nvdefine, one thing I set is the index password with the -I option. I'm also setting the attribute ownerwrite for the index so the index can be written only if one knows the index password. Is there any way to change this password after I've set it, or do I have to remove the whole index (tpm2_nvrelease) and recreate it with the new password?

Peter

#3 lore raw

Oops, my mistake. I'm setting only authwrite (and policyread but that's unrelated).

But Bing & Andreas bring up an interesting idea. The context is that while we set the NVRAM password when we create the index, our customer may want to change that. But if I use the ownerwrite attribute instead of authwrite, the customer will effectively be able to change the password when they change the Storage password (tpm2_takeownership), right?

Peter

From: Zhu, Bing [mailto:bing.zhu(a)intel.com]
Sent: Wednesday, September 19, 2018 11:50 PM
To: Fuchs, Andreas; Scheie, Peter M; tpm2(a)lists.01.org
Subject: RE: Any way to change NVRAM index password?

Peter,
What does "the -I option" mean? https://github.com/tpm2-software/tpm2-tools/commit/e105149f07c9b944f69599ab67cd8b018ad880d2

I believe you created an index with both ownerwrite/authwrite set, right?

This below is incorrect, if you're setting ownerwrite attribute, then you don't need to provide index auth/password. You can directly write it if you have owner auth value.

Quoted 1 line
Quoted 1 line

. I'm also setting the attribute ownerwrite for the index so the index can be written only if one knows the index password

Andreas answer is correct, TPM2_NV_ChangeAuth() is used to change index auth/password.

From: tpm2 [mailto:tpm2-bounces(a)lists.01.org] On Behalf Of Fuchs, Andreas
Sent: Wednesday, September 19, 2018 10:37 PM
To: Scheie, Peter M <Petre.Scheie(a)gd-ms.com>; tpm2(a)lists.01.org
Subject: Re: [tpm2] Any way to change NVRAM index password?

The normal anser:
It's complicated and requires quite some thought, so release+define is probably easier.

The TPM-nerd answer:
The TPM-function for this is TPM2_NV_ChangeAuth, but it requires a policy-session and you must have defined a policy with PolicyCommandCode(TPM2_CC_NV_CHANGEAUTH), since it's an admin auth.

Cheers,
Andreas

________________________________
From: tpm2 [tpm2-bounces(a)lists.01.org] on behalf of Scheie, Peter M [Petre.Scheie(a)gd-ms.com]
Sent: Wednesday, September 19, 2018 14:47
To: tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org>
Subject: [tpm2] Any way to change NVRAM index password?
When I define an NVRAM index using tpm2_nvdefine, one thing I set is the index password with the -I option. I'm also setting the attribute ownerwrite for the index so the index can be written only if one knows the index password. Is there any way to change this password after I've set it, or do I have to remove the whole index (tpm2_nvrelease) and recreate it with the new password?

Peter

#4 lore raw

Right, if we're using ownerwrite, then we can change the owner auth/password instead (the API TPM2_HierarchyChangeAuth(), used by tpm2_takeownership?)

From: Scheie, Peter M [mailto:Petre.Scheie(a)gd-ms.com]
Sent: Thursday, September 20, 2018 8:28 PM
To: Zhu, Bing <bing.zhu(a)intel.com>; Fuchs, Andreas <andreas.fuchs(a)sit.fraunhofer.de>; tpm2(a)lists.01.org
Subject: RE: Any way to change NVRAM index password?

Oops, my mistake. I'm setting only authwrite (and policyread but that's unrelated).

But Bing & Andreas bring up an interesting idea. The context is that while we set the NVRAM password when we create the index, our customer may want to change that. But if I use the ownerwrite attribute instead of authwrite, the customer will effectively be able to change the password when they change the Storage password (tpm2_takeownership), right?

Peter

From: Zhu, Bing [mailto:bing.zhu(a)intel.com]
Sent: Wednesday, September 19, 2018 11:50 PM
To: Fuchs, Andreas; Scheie, Peter M; tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org>
Subject: RE: Any way to change NVRAM index password?

Peter,
What does "the -I option" mean? https://github.com/tpm2-software/tpm2-tools/commit/e105149f07c9b944f69599ab67cd8b018ad880d2

I believe you created an index with both ownerwrite/authwrite set, right?

This below is incorrect, if you're setting ownerwrite attribute, then you don't need to provide index auth/password. You can directly write it if you have owner auth value.

Quoted 1 line
Quoted 1 line

. I'm also setting the attribute ownerwrite for the index so the index can be written only if one knows the index password

Andreas answer is correct, TPM2_NV_ChangeAuth() is used to change index auth/password.

From: tpm2 [mailto:tpm2-bounces(a)lists.01.org] On Behalf Of Fuchs, Andreas
Sent: Wednesday, September 19, 2018 10:37 PM
To: Scheie, Peter M <Petre.Scheie(a)gd-ms.com<mailto:Petre.Scheie(a)gd-ms.com>>; tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org>
Subject: Re: [tpm2] Any way to change NVRAM index password?

The normal anser:
It's complicated and requires quite some thought, so release+define is probably easier.

The TPM-nerd answer:
The TPM-function for this is TPM2_NV_ChangeAuth, but it requires a policy-session and you must have defined a policy with PolicyCommandCode(TPM2_CC_NV_CHANGEAUTH), since it's an admin auth.

Cheers,
Andreas

________________________________
From: tpm2 [tpm2-bounces(a)lists.01.org] on behalf of Scheie, Peter M [Petre.Scheie(a)gd-ms.com]
Sent: Wednesday, September 19, 2018 14:47
To: tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org>
Subject: [tpm2] Any way to change NVRAM index password?
When I define an NVRAM index using tpm2_nvdefine, one thing I set is the index password with the -I option. I'm also setting the attribute ownerwrite for the index so the index can be written only if one knows the index password. Is there any way to change this password after I've set it, or do I have to remove the whole index (tpm2_nvrelease) and recreate it with the new password?

Peter