9.13.3.4.68. Function Se05x_API_RSAEncrypt¶
Defined in File se05x_APDU_apis.h
9.13.3.4.68.1. Function Documentation¶
-
smStatus_t
Se05x_API_RSAEncrypt(pSe05xSession_t session_ctx, uint32_t objectID, SE05x_RSAEncryptionAlgo_t rsaEncryptionAlgo, const uint8_t *inputData, size_t inputDataLen, uint8_t *encryptedData, size_t *pencryptedDataLen)¶ Se05x_API_RSAEncrypt
The RSAEncrypt command encrypts data.
Command to Applet
Field
Value
Description
CLA
0x80
INS
INS_CRYPTO
P1
P1_RSA
See
SE05x_P1_tP2
P2_ENCRYPT_ONESHOT
See
SE05x_P2_tLc
#(Payload)
Payload
TLV[TAG_1]
4-byte identifier of the key pair or public key.
TLV[TAG_2]
1-byte
SE05x_RSAEncryptionAlgo_tTLV[TAG_3]
Byte array containing data to be encrypted.
Le
0x00
Expected TLV with encrypted data.
R-APDU Body
Value
Description
TLV[TAG_1]
Encrypted data
R-APDU Trailer
SW
Description
SW_NO_ERROR
The command is handled successfully.
- Parameters
[in] session_ctx: Session Context [0:kSE05x_pSession][in] objectID: objectID [1:kSE05x_TAG_1][in] rsaEncryptionAlgo: rsaEncryptionAlgo [2:kSE05x_TAG_2][in] inputData: inputData [3:kSE05x_TAG_3][in] inputDataLen: Length of inputData[out] encryptedData: [0:kSE05x_TAG_1][inout] pencryptedDataLen: Length for encryptedData
