tpm2_rsaencrypt(1) General Commands Manual tpm2_rsaencrypt(1) (NAME) tpm2_rsaencrypt - RSA TPM (SYNOPSIS) tpm2_rsaencrypt [OPTIONS] [ARGUMENT] (DESCRIPTION) tpm2_rsaencrypt(1) RSA IETF RFC 3447 (PKCS#1) . STDIN . key-context : 1. RSA 2. encrypt (SET) . (OPTIONS) o -c, --key-context=OBJECT: RSA . 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: . . TPM . TPM . o ARGUMENT . (REFERENCES) (CONTEXT OBJECT FORMAT) (handle) : o (transient object) TPM . o : 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 : . . HMAC . (Sessions) : " (EMPTY PASSWORD) ". auth HMAC . . . HMAC ( tpm2_startauthsession(1)). (Passwords) . : (string) . (String) "str:" ( ) . foobar str:foobar (Hex-string) "hex:" / . hex:1122334455667788 (File) "file:" "-" stdin . (option) . # stdin file:- # file:path/to/password/file # echo stdin: echo foobar | tpm2_tool -p file:- # bash here-string stdin: tpm2_tool -p file:- <<< foobar (Sessions) (policy session) session . tpm2_startauthsession(1) . auth ( policy password) + (Passwords) . 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:" (minilanguage) PCR . PCR : = PCR "PCR bank specifiers" . raw-pcr-file PCR tpm2_pcrread(1) . PCR (EXAMPLES) PCR sha256 : 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 . manpages 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: HMAC . (clear text) TPM . unsalted OpenSSL FIPS . auth salted . o -R --autoflush: (autoflush) (transient objects) . (context) . TPM2TOOLS_AUTOFLUSH yes true autoflush . . 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 - (scheme) . tpm2_testparams. (BUGS) (Github Issues) (HELP) . (LICENSE) Creative Commons Attribution 4.0 (CC BY 4.0) . tpm2-tools tpm2_rsaencrypt(1)