11.12.3.4.63. Function Se05x_API_CreateCryptoObject¶
Defined in File se05x_APDU_apis.h
11.12.3.4.63.1. Function Documentation¶
-
smStatus_t
Se05x_API_CreateCryptoObject
(pSe05xSession_t session_ctx, SE05x_CryptoObjectID_t cryptoObjectID, SE05x_CryptoContext_t cryptoContext, SE05x_CryptoModeSubType_t subtype)¶ Se05x_API_CreateCryptoObject
Creates a Crypto Object on the SE05X . Once the Crypto Object is created, it is bound to the user who created the Crypto Object.
A CryptoObject is a 2-byte value consisting of a CryptoContext in MSB and one of the following in LSB:
DigestMode in case CryptoContext = CC_DIGEST
CipherMode in case CryptoContext = CC_CIPHER
MACAlgo in case CryptoContext = CC_SIGNATURE
AEADMode in case CryptoContext = CC_AEAD
Command to Applet
Field
Value
Description
CLA
0x80
INS
INS_WRITE
See
SE05x_INS_t
P1
P1_CRYPTO_OBJ
See
SE05x_P1_t
P2
P2_DEFAULT
See
SE05x_P2_t
Lc
#(Payload)
Payload length
Payload
TLV[TAG_1]
2-byte Crypto Object identifier
TLV[TAG_2]
1-byte
SE05x_CryptoObject_t
TLV[TAG_3]
1-byte Crypto Object subtype, either from
DigestModeRef
, CipherMode, MACAlgo (depending on TAG_2) or AEADMode.R-APDU Body
NA
R-APDU Trailer
SW
Description
SW_NO_ERROR
The file is created or updated successfully.
- Parameters
[in] session_ctx
: Session Context [0:kSE05x_pSession][in] cryptoObjectID
: cryptoObjectID [1:kSE05x_TAG_1][in] cryptoContext
: cryptoContext [2:kSE05x_TAG_2][in] subtype
: 1-byte Crypto Object subtype, either from DigestMode, CipherMode or MACAlgo (depending on TAG_2). [3:kSE05x_TAG_3]