@@ -1104,6 +1104,84 @@ smStatus_t Se05x_API_DigestOneShot(pSe05xSession_t session_ctx,
11041104 uint8_t * hashValue ,
11051105 size_t * phashValueLen );
11061106
1107+
1108+ /** Se05x_API_MACOneShot_G
1109+ *
1110+ * Generate. See @ref Se05x_API_MACOneShot_V for Verfiication.
1111+ *
1112+ * Performs a MAC operation in one shot (without keeping state).
1113+ *
1114+ * The 4-byte identifier of the key must refer to an AESKey, DESKey or HMACKey.
1115+ *
1116+ * # Command to Applet
1117+ *
1118+ * @rst
1119+ * +---------+------------------------+---------------------------------------------+
1120+ * | Field | Value | Description |
1121+ * +=========+========================+=============================================+
1122+ * | CLA | 0x80 | |
1123+ * +---------+------------------------+---------------------------------------------+
1124+ * | INS | INS_CRYPTO | :cpp:type:`SE05x_INS_t` |
1125+ * +---------+------------------------+---------------------------------------------+
1126+ * | P1 | P1_MAC | See :cpp:type:`SE05x_P1_t` |
1127+ * +---------+------------------------+---------------------------------------------+
1128+ * | P2 | P2_GENERATE_ONESHOT or | See :cpp:type:`SE05x_P2_t` |
1129+ * | | P2_VALIDATE_ONESHOT | |
1130+ * +---------+------------------------+---------------------------------------------+
1131+ * | Lc | #(Payload) | |
1132+ * +---------+------------------------+---------------------------------------------+
1133+ * | Payload | TLV[TAG_1] | 4-byte identifier of the key object. |
1134+ * +---------+------------------------+---------------------------------------------+
1135+ * | | TLV[TAG_2] | 1-byte :cpp:type:`MACAlgoRef` |
1136+ * +---------+------------------------+---------------------------------------------+
1137+ * | | TLV[TAG_3] | Byte array containing data to be taken as |
1138+ * | | | input to MAC. |
1139+ * +---------+------------------------+---------------------------------------------+
1140+ * | | TLV[TAG_5] | MAC to verify (when P2=P2_VALIDATE_ONESHOT) |
1141+ * +---------+------------------------+---------------------------------------------+
1142+ * | Le | 0x00 | Expecting MAC or Result. |
1143+ * +---------+------------------------+---------------------------------------------+
1144+ * @endrst
1145+ *
1146+ * # R-APDU Body
1147+ *
1148+ * @rst
1149+ * +------------+---------------------------------------+
1150+ * | Value | Description |
1151+ * +============+=======================================+
1152+ * | TLV[TAG_1] | MAC value (P2=P2_GENERATE_ONESHOT) or |
1153+ * | | :cpp:type:`SE05x_Result_t` (when |
1154+ * | | p2=P2_VALIDATE_ONESHOT). |
1155+ * +------------+---------------------------------------+
1156+ * @endrst
1157+ *
1158+ * # R-APDU Trailer
1159+ *
1160+ * @rst
1161+ * +-------------+--------------------------------------+
1162+ * | SW | Description |
1163+ * +=============+======================================+
1164+ * | SW_NO_ERROR | The command is handled successfully. |
1165+ * +-------------+--------------------------------------+
1166+ * @endrst
1167+ *
1168+ * @param[in] session_ctx Session Context [0:kSE05x_pSession]
1169+ * @param[in] objectID objectID [1:kSE05x_TAG_1]
1170+ * @param[in] macOperation macOperation [2:kSE05x_TAG_2]
1171+ * @param[in] inputData inputData [3:kSE05x_TAG_3]
1172+ * @param[in] inputDataLen Length of inputData
1173+ * @param[out] macValue [0:kSE05x_TAG_1]
1174+ * @param[in,out] pmacValueLen Length for macValue
1175+ */
1176+ smStatus_t Se05x_API_MACOneShot_G (pSe05xSession_t session_ctx ,
1177+ uint32_t objectID ,
1178+ uint8_t macOperation ,
1179+ const uint8_t * inputData ,
1180+ size_t inputDataLen ,
1181+ uint8_t * macValue ,
1182+ size_t * pmacValueLen );
1183+
1184+
11071185/** Se05x_API_CreateCryptoObject
11081186 *
11091187 * Creates a Crypto Object on the SE05X . Once the Crypto Object is created, it
0 commit comments