tpm2_rsadecrypt(1) (NAME) tpm2_rsadecrypt - RSA TPM (SYNOPSIS) tpm2_rsadecrypt [OPTIONS] [ARGUMENT] (DESCRIPTION) tpm2_rsadecrypt(1) RSA (padding scheme) IETF RFC 3447 (PKCS#1) . stdin . key-context : 1. RSA 2. decrypt (SET) . (OPTIONS) o -c, --key-context=OBJECT: RSA . (handle) . " (Context Object Format)" . o -p, --auth=AUTH: -c. o -o, --output=FILE: . STDOUT . o -s, --scheme=FORMAT: ( rsaes ). o null - TPM_ALG_NULL . o rsaes - TPM_ALG_RSAES RSAES_PKCSV1.5 . o oaep - TPM_ALG_OAEP RSAES_OAEP . o -l, --label=FILE STRING: (label) . TPM . TPM (truncate) . o --cphash=FILE . cpHash . : cpHash . o ARGUMENT . (REFERENCES) (Context Object Format) (handle) : o (transient object) TPM . o (prefix) : o owner: (owner hierarchy) o platform: (platform hierarchy) o endorsement: (endorsement hierarchy) o lockout: (lockout control persistent object) o ( 0x81010013) ._OBJECT_..SH " (Authorization Formatting)" TPM2.0 : . (Password) . HMAC . (Sessions) : " (EMPTY PASSWORD) ". auth HMAC . . . HMAC ( tpm2_startauthsession(1)). (Passwords) . : (string) . (String) "str:" ( ) . (Examples) foobar str:foobar (Hex-string) (hex-string) "hex:" . (Example) hex:1122334455667788 (File) "file:" "-" stdin . . (Examples) # stdin file:- # file:path/to/password/file # echo stdin: echo foobar | tpm2_tool -p file:- # here-string bash stdin: tpm2_tool -p file:- <<< foobar (Sessions) (policy session) session . tpm2_startauthsession(1) . auth ( policy password) + (Passwords) . (Examples) (context) session.ctx: session:session.ctx session.ctx authvalue mypassword: session:session.ctx+mypassword session.ctx authvalue HEX 0x11223344: session:session.ctx+hex:11223344 "pcr:" PCR PCR . PCR : = PCR "PCR bank specifiers" . raw-pcr-file PCR tpm2_pcrread(1) . PCR (EXAMPLES) PCR sha256 0 1 2 3 : pcr:sha256:0,1,2,3 AUTH. (COMMON OPTIONS) . o -h, --help=[man|no-man]: (manpage) . (manpager) . "man" "man" man stderr . "no-man" manpager stdout . MANPATH man(1) . o -v, --version: tcti . o -V, --verbose: . . o -Q, --quiet: stdout. o -Z, --enable-errata: (errata fixups). TPM . TPM2TOOLS_ENABLE_ERRATA . o -z, --pwd-session: (password session) HMAC . (clear text) TPM . (unsalted) OpenSSL FIPS . auth (salted) . o -R, --autoflush: (autoflush) (transient objects) . (context) . TPM2TOOLS_AUTOFLUSH yes true . . TCTI (TCTI Configuration) TCTI "Transmission Interface" TPM . TCTI TPM . TCTI : 1. -T --tcti 2. : TPM2TOOLS_TCTI. : . TCTI : o tabrmd - tabrmd . tabrmd abrmd tcti . o mssim - TPM . o device - TPM . o none - TPM . TPM (off-tpm) TCTI . TCTI . "none" . : : ..SS TCTI TCTI TCTI dlopen(3) . TCTI tabrmd device mssim . -v TCTI . - "default-tcti" TCTI . TCTI TCTI TCTI . dlopen(3) tcti-name . dlopen(3) . TCTI (TCTI OPTIONS) TCTI : o device: TCTI device TPM TCTI . /dev/tpm0 . : -T device:/dev/tpm0 export TPM2TOOLS_TCTI="device:/dev/tpm0" o mssim: TCTI mssim IP . 127.0.0.1 2321 . : -T mssim:host=localhost,port=2321 export TPM2TOOLS_TCTI="mssim:host=localhost,port=2321" o abrmd: TCTI abrmd - <<,>> . <<=>> . o TCTI abrmd : 1. `bus_name' : tabrmd ( ). 2. `bus_type' : dbus ( ) `session' `system' . tcti tabrmd bus_name=com.example.FooBar: \--tcti=tabrmd:bus_name=com.example.FooBar tcti (abrmd) bus_type=session: \--tcti:bus_type=session : abrmd tabrmd . TCTI. (EXAMPLES) RSA tpm2_createprimary -c primary.ctx tpm2_create -C primary.ctx -Grsa2048 -u key.pub -r key.priv tpm2_load -C primary.ctx -u key.pub -r key.priv -c key.ctx RSA echo "my message" > msg.dat tpm2_rsaencrypt -c key.ctx -o msg.enc msg.dat tpm2_rsadecrypt -c key.ctx -o msg.ptext msg.enc cat msg.ptext my message (RETURNS) : o 0 - . o 1 - . o 2 - . o 3 - . o 4 - TCTI. o 5 - . tpm2_testparams. (BUGS) (Github Issues) (HELP) (Mailing List) (LICENSE) Creative Commons Attribution 4.0 (CC BY 4.0) . tpm2-tools tpm2_rsadecrypt(1)