11.12.3.4.122. Function Se05x_API_RSAVerify¶
Defined in File se05x_APDU_apis.h
11.12.3.4.122.1. Function Documentation¶
-
smStatus_t
Se05x_API_RSAVerify
(pSe05xSession_t session_ctx, uint32_t objectID, SE05x_RSASignatureAlgo_t rsaSigningAlgo, const uint8_t *inputData, size_t inputDataLen, const uint8_t *signature, size_t signatureLen, SE05x_Result_t *presult)¶ Se05x_API_RSAVerify
The RSAVerify command verifies the given signature and returns the result.
The key cannot be passed externally to the command directly. In case users want to use the command to verify signatures using different public keys or the public key value regularly changes, the user should create a transient key object to which the key value is written and then the identifier of that transient secure object can be used by this RSAVerify command.
Command to Applet
Field
Value
Description
CLA
0x80
INS
INS_CRYPTO
P1
P1_SIGNATURE
See
SE05x_P1_t
P2
P2_VERIFY
See
SE05x_P2_t
Lc
#(Payload)
Payload
TLV[TAG_1]
4-byte identifier of the key pair or public key.
TLV[TAG_2]
1-byte
SE05x_RSASignAlgo_t
TLV[TAG_3]
Byte array containing data to be verified.
TLV[TAG_5]
Byte array containing ASN.1 signature.
Le
0x03
Expecting Result in TLV
R-APDU Body
Value
Description
TLV[TAG_1]
SE05x_Result_t
: Verification resultR-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] rsaSigningAlgo
: rsaSigningAlgo [2:kSE05x_TAG_2][in] inputData
: inputData [3:kSE05x_TAG_3][in] inputDataLen
: Length of inputData[in] signature
: signature [4:kSE05x_TAG_5][in] signatureLen
: Length of signature[out] presult
: [0:kSE05x_TAG_1]