tpm2_getrandom man page

tpm2_getrandom(1) — Retrieves random bytes from the TPM.

Synopsis

tpm2_getrandom [Options] SIZE

Description

tpm2_getrandom(1) - Returns the next SIZE octets from the random number generator. The SIZE parameter is expected as the only argument to the tool.

Options

Common Options

This collection of options are common to many programs and provide information that many users may expect.

This collection of environment variables that may be used to configure the various TCTI modules available.

The values passed through these variables can be overridden on a per-command basis using the available command line options, see the TCTI_OPTIONS section.

The variables respected depend on how the software was configured.

Tcti Options

This collection of options are used to configure the varous TCTI modules available. They override any environment variables.

Examples

Generate a random 20 bytes and output the binary data to a file:

tpm2_getrandom -o random.out 20

Generate a random 8 bytes and output the hex formated data to stdout:

tpm2_getrandom 8

Returns

0 on success or 1 on failure.

Bugs

Github Issues (https://github.com/01org/tpm2-tools/issues)

Help

See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)

Info

SEPTEMBER 2017 tpm2-tools General Commands Manual