11.12.3.4.112. Function Se05x_API_ReadObject_W_Attst¶
Defined in File se05x_APDU_apis.h
11.12.3.4.112.1. Function Documentation¶
-
smStatus_t
Se05x_API_ReadObject_W_Attst
(pSe05xSession_t session_ctx, uint32_t objectID, uint16_t offset, uint16_t length, uint32_t attestID, SE05x_AttestationAlgo_t attestAlgo, const uint8_t *random, size_t randomLen, uint8_t *data, size_t *pdataLen, uint8_t *attribute, size_t *pattributeLen, SE05x_TimeStamp_t *ptimeStamp, uint8_t *outrandom, size_t *poutrandomLen, uint8_t *chipId, size_t *pchipIdLen, uint8_t *signature, size_t *psignatureLen)¶ Se05x_API_ReadObject_W_Attst
Read with attestation.
When INS_ATTEST is set in addition to INS_READ, the secure object is read with attestation. In addition to the response in TLV[TAG_1], there are additional tags:
TLV[TAG_2] will hold the object attributes (see ObjectAttributes).
TLV[TAG_3] relative timestamp when the object has been retrieved
TLV[TAG_4] will hold freshness random data
TLV[TAG_5] will hold the unique ID of the device.
TLV[TAG_6] will hold the signature over all concatenated Value fields tags of the response (TAG_1 until and including TAG_5).
Command to Applet
Field
Value
Description
CLA
0x80
INS
INS_READ
See
SE05x_INS_t
, in addition to INS_READ, users can set the INS_ATTEST flag. In that case, attestation applies.P1
P1_DEFAULT
See
SE05x_P1_t
P2
P2_DEFAULT
See
SE05x_P2_t
Lc
#(Payload)
Payload Length.
TLV[TAG_1]
4-byte object identifier
TLV[TAG_2]
2-byte offset [Optional: default 0] [Conditional: only when the object is a BinaryFile object]
TLV[TAG_3]
2-byte length [Optional: default 0] [Conditional: only when the object is a BinaryFile object]
TLV[TAG_4]
1-byte
SE05x_RSAKeyComponent_t
: either RSA_COMP_MOD or RSA_COMP_PUB_EXP. [Optional] [Conditional: only for RSA key components]TLV[TAG_5]
4-byte attestation object identifier. [Optional] [Conditional: only when INS_ATTEST is set]
TLV[TAG_6]
1-byte
SE05x_AttestationAlgo_t
[Optional] [Conditional: only when INS_ATTEST is set]TLV[TAG_7]
16-byte freshness random [Optional] [Conditional: only when INS_ATTEST is set]
Le
0x00
Value
Description
TLV[TAG_1]
Data read from the secure object.
TLV[TAG_2]
(only when INS_ATTEST is set) Byte array containing the attributes (see
ObjectAttributesRef
).TLV[TAG_3]
(only when INS_ATTEST is set) 12-byte timestamp
TLV[TAG_4]
(only when INS_ATTEST is set) 16-byte freshness random
TLV[TAG_5]
(only when INS_ATTEST is set) 18-byte Chip unique ID
TLV[TAG_6]
(only when INS_ATTEST is set) Signature applied over the value of TLV[TAG_1], TLV[TAG_2], TLV[TAG_3], TLV[TAG_4] and TLV[TAG_5].
R-APDU Body
Value
Description
TLV[TAG_1]
Data read from the secure object.
TLV[TAG_2]
(only when INS_ATTEST is set) Byte array containing the attributes (see
ObjectAttributesRef
).TLV[TAG_3]
(only when INS_ATTEST is set) 12-byte timestamp
TLV[TAG_4]
(only when INS_ATTEST is set) 16-byte freshness random
TLV[TAG_5]
(only when INS_ATTEST is set) 18-byte Chip unique ID
TLV[TAG_6]
(only when INS_ATTEST is set) Signature applied over the value of TLV[TAG_1], TLV[TAG_2], TLV[TAG_3], TLV[TAG_4] and TLV[TAG_5].
- Return
The sm status.
- Parameters
[in] session_ctx
: The session context[in] objectID
: The object id[in] offset
: The offset[in] length
: The length[in] attestID
: The attest id[in] attestAlgo
: The attest algorithm[in] random
: The random[in] randomLen
: The random lengthdata
: The datapdataLen
: The pdata lengthattribute
: The attributepattributeLen
: The pattribute lengthptimeStamp
: The ptime stampoutrandom
: The outrandompoutrandomLen
: The poutrandom lengthchipId
: The chip identifierpchipIdLen
: The pchip identifier lengthsignature
: The signaturepsignatureLen
: The psignature length