ConvertToOwnerAuth Method of the Win32_Tpm Class Home
ConvertToOwnerAuth Method of the Win32_Tpm Class

The ConvertToOwnerAuth method of the Win32_Tpm class translates a user-provided passphrase input into a 20-byte owner authorization that can be used to interact with the TPM. Methods such as TakeOwnership and ResetAuthLockOut require the resulting owner authorization value.

The conversion process follows the specifications from the Trusted Computing Group.

Syntax

uint32 ConvertToOwnerAuth(
  [in]   string OwnerPassPhrase,
  [out]  string OwnerAuth
);

Parameters

OwnerPassPhrase [in]

A string to convert to an owner authorization value. The string can contain any number of alphanumeric characters.

OwnerAuth [out]

A string derived from the OwnerPassPhrase parameter. This value is a 20-byte binary value encoded to a 28-byte base64 null-terminated string.

Return Value

All TPM errors as well as errors specific to TPM Base Services can be returned.

The following tables lists some of the common return codes.

Return code/valueDescription
S_OK
0 (0x0)

The method was successful.

 

Remarks

A Unicode UTF-16LE encoded string is converted to the 20-byte TPM owner authorization value by taking the SHA-1 hash of the string's binary representation. The null termination of the Unicode string is not included in the hash. No salt is used in the SHA-1 hash.

For example, to convert the TPM owner passphrase "1Sample" to a TPM owner authorization value, the SHA-1 hash is taken from the following byte stream:

0x31 0x00 0x53 0x00 0x61 0x00 0x6D 0x00 0x70 0x00 0x6C 0x00 0x65 0x00

To convert a zero-length passphrase to an owner authorization value, the SHA-1 hash is taken of the NULL byte stream.

Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Windows SDK. They are installed on the server when you add the associated role by using the Server Manager. For more information about MOF files, see Managed Object Format (MOF).

Requirements

Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
MOFWin32_tpm.mof
DLLWin32_tpm.dll
Namespace\\.\root\CIMV2\Security\MicrosoftTpm

See Also

Win32_Tpm
TakeOwnership

Send comments about this topic to Microsoft

Build date: 11/16/2009

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View