tpm2_encryptdecrypt(8)

NAME
tpm2_encryptdecrypt - performs symmetric encryption or decryption. keyHandle shall reference a symmetric cipher object.

SYNOPSIS
tpm2_encryptdecrypt[ COMMON OPTIONS ] [ TCTI OPTIONS ] [ --keyHandle|--keyContext|--pwdk|--decrypt|--inFile|--outFile|--passwdInHex| ]

performs symmetric encryption or decryption. keyHandle shall reference a symmetric cipher object.

DESCRIPTION
tpm2_encryptdecrypt performs symmetric encryption or decryption. keyHandle shall reference a symmetric cipher object.

OPTIONS

-k ,--keyHandle
    the symmetric key used for the operation (encryption/decryption)

-c ,--keyContext
    filename of the key context used for the operation

-P ,--pwdk
    the password of key, optional

-D ,--decrypt
    the operation type, default NO, optional YES the operation is decryption NO the operation is encryption

-I ,--inFile
    Input file path, containing the data to be operated

-o ,--outFile
    Output file path, record the operated data

-X ,--passwdInHex
    passwords given by any options are hex format. @COMMON_OPTIONS_INCLUDE@ @TCTI_OPTIONS_INCLUDE@

ENVIRONMENT@TCTI_ENVIRONMENT_INCLUDE@

EXAMPLES
tpm2_encryptdecrypt

    tpm2_encryptdecrypt -k 0x81010001 -P abc123 -D NO -I <filePath> -o <filePath>
    tpm2_encryptdecrypt -c key.context -P abc123 -D NO -I <filePath> -o <filePath>
    tpm2_encryptdecrypt -k 0x81010001 -P 123abca -X -D NO -I <filePath> -o <filePath>