📄 tss_bind.3
字号:
.\" Copyright 2004 IBM (Jeff Kravitz).\".\" Written Feb 11 2004, Jeff Kravitz.\".TH "TSS_Bind" 3 2004-02-11 "IBM" "TPM Library".SH NAMETSS_Bind.SH SYNOPSIS.nf.B #include <tpmfunc.h>.sp.BR "uint32_t TSS_Bind" "(RSA *key," unsigned char *data, unsigned int datalen, unsigned char *blob, unsigned int *bloblen).fi.SH DESCRIPTIONThe \fBTSS_Bind()\fP function performs a public key encryption operationusing a public RSA Key. The resulting encrypted data can onlybe recovered via a \fBTPM_Unbind\fP operation on a TPM that containsthe private key corresponding to the public key..SH ARGUMENTSThe arguments include....TP 10keyA pointer to an OpenSSL RSA public key structure. This can be obtainedvia the \fBTPM_GetPubKey()\fP function, or via the \fBTSS_convpubkey()\fPfunction..TP 10dataA pointer to the data to be encrypted. .TP 10datalenAn integer containing the length of the data to be encrypted..TP 10blobA pointer to an area to receive the encrypted data..TP 10bloblenA pointer to an integer which will receive the length of the encrypted data..SH NOTESThe \fBTSS_Bind\fP functiondoes not perform blocking of data, so the data to be encrypted hasto be shorter than the public key modulus. Blocking and unblockingof data longer than this must be performed by the calling program..PThe area receiving the encrypted data must be the size of the maximum key modulus,as no buffer overflow checking is performed. For current TPM usage, a lengthof 256 bytes is the maximum..SH RESTRICTIONSThe TPM supports binding of data with either no RSA padding, or OAEP + SHA1 + MGF1padding, using a OAEP parameter value of 'TCPA'. The \fBTSS_Bind()\fP and\fBTPM_Unbind()\fP functions only support the latter. This means that themaximum size of the encrypted data is somewhat less than the public key modulus,to leave space for the padding overhead..SH "RETURN VALUE"0 if the operation is successful. non-zero otherwise.The non zero value can be converted to an error message via the function \fBTPM_GetErrMsg()\fP..SH "SEE ALSO".BR TPM_Unbind(3) , TPM_GetPubKey(3) , TSS_convpubkey(3) , TPM_GetErrMsg(3) ..SH AUTHORJeff Kravitz, IBM T.J. Watson Research Center
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -