---
name: "tssgetrandom"
section: "1"
platform: "linux"
package: "tss2"
version: "1045-2"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/tssgetrandom"
---

# tssgetrandom(1)

Runs TPM2\_GetRandom

## NAME

getrandom - Runs TPM2\_GetRandom

## DESCRIPTION

**--version-string**=*v1045* is not a valid option

getrandom

Runs TPM2\_GetRandom

**-by** bytes requested

-

  \[-of output file, with **-nz**, appends nul terminator (default do not save)\] \[-nz get random number with no zero bytes (for authorization value)\] \[-ns no space, no text, no newlines\]

-

  just a string of hexascii suitable for a symmetric key

**-se\[0-2\]** session handle / attributes

-

  01 continue 20 command decrypt 40 response encrypt

**--version** is not a valid option

getrandom

Runs TPM2\_GetRandom

**-by** bytes requested

-

  \[-of output file, with **-nz**, appends nul terminator (default do not save)\] \[-nz get random number with no zero bytes (for authorization value)\] \[-ns no space, no text, no newlines\]

-

  just a string of hexascii suitable for a symmetric key

**-se\[0-2\]** session handle / attributes

-

  01 continue 20 command decrypt 40 response encrypt

## SEE ALSO

The full documentation for **getrandom** is maintained as a Texinfo manual.  If the **info** and **getrandom** programs are properly installed at your site, the command

-

  **info getrandom**

should give you access to the complete manual.
