tpm2_hash − program to make a hash for some data
tpm2_hash [{−H | −−hierarchy} {e | o | p | n}] [{−g | −−halg} hexAlg] [{−I | −−infile} inputFilename] [{−o | −−outfile} hashFilename] [{−t | −−ticket} ticketFilename] [{−p | −−port} portNumber] [{−d | −−debugLevel} {0 | 1 | 2 | 3}] |
|
tpm2_hash [{−h | −−help} | {−v | −−version}] |
This manual page documents briefly the tpm2_hash command.
This manual page was written for the Debian distribution because the original program does not have a manual page.
tpm2_hash is a program to hash some data and output the hash value
The program follows the usual GNU command line syntax, with long options starting with two dashes (‘−'). A summary of options is included below.
−H {e | o | p | n}, −−hierarchy= {e | o | p | n}
hierarchy to use for the ticket
• e − TPM_RH_ENDORSEMENT
• o − TPM_RH_OWNER
• p − TPM_RH_PLATFORM
• n − TPM_RH_NULL
−g hexAlg, −−halg=hexAlg
algorithm for the hash being computed.
• 0x0004 − TPM_ALG_SHA1
• 0x000B − TPM_ALG_SHA256
• 0x000C − TPM_ALG_SHA384
• 0x000D − TPM_ALG_SHA512
• 0x0012 − TPM_ALG_SM3_256
−I inputFilename, −−infile=inputFilename
file containning the data to be hashed.
−o hashFilename, −−outfile=hashFilename
file record the hash result
−t ticketFilename, −−ticket=ticketFilename
file record the ticket.
−p portNumber, −−port=portNumber
The Port number, default is 2323, optional.
−d {0 | 1 | 2 | 3}, −−debugLevel= {0 | 1 | 2 | 3}
The level of debug message, default is 0, optional
• 0 − (high level test results)
• 1 − (test app send/receive byte streams)
• 2 − (resource manager send/receive byte streams)
• 3 − (resource manager tables)
−h, −−help
Show summary of options.
−v, −−version
Show version of program.
tpm2_hash provides some return codes, that can be used in scripts:
The upstreams BTS can be found at https://github.com/01org/tpm2.0-tools/issues.
tpm2_activatecredential(8), tpm2_akparse(8), tpm2_certify(8), tpm2_create(8), tpm2_createprimary(8), tpm2_encryptdecrypt(8), tpm2_evictcontrol(8), tpm2_getmanufec(8), tpm2_getpubak(8), tpm2_getpubek(8), tpm2_getrandom(8), tpm2_hmac(8), tpm2_listpcrs(8), tpm2_listpersistent(8), tpm2_load(8), tpm2_loadexternal(8), tpm2_makecredential(8), tpm2_nvdefine(8), tpm2_nvlist(8), tpm2_nvread(8), tpm2_nvreadlock(8), tpm2_nvrelease(8), tpm2_nvwrite(8), tpm2_quote(8), tpm2_rc_decode(8), tpm2_readpublic(8), tpm2_rsadecrypt(8), tpm2_rsaencrypt(8), tpm2_sign(8), tpm2_takeownership(8), tpm2_unseal(8), tpm2_verifysignature(8)
Ying−Chun Liu <paulliu@debian.org>
Wrote this manpage for the Debian system.
Copyright © 2017 Ying-Chun Liu (PaulLiu)
This manual page was written for the Debian system (and may be used by others).
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or (at your option) any later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common−licenses/GPL−3.