11.12.3.4.88. Function Se05x_API_EdDSASign¶
Defined in File se05x_APDU_apis.h
11.12.3.4.88.1. Function Documentation¶
-
smStatus_t
Se05x_API_EdDSASign
(pSe05xSession_t session_ctx, uint32_t objectID, SE05x_EDSignatureAlgo_t edSignAlgo, const uint8_t *inputData, size_t inputDataLen, uint8_t *signature, size_t *psignatureLen)¶ Se05x_API_EdDSASign
The EdDSASign command signs external data using the indicated key pair or private key (using a Twisted Edwards curve). This is performed according to the EdDSA algorithm as specified in [RFC8032].
The input data need to be the plain data (not hashed).
The signature as returned in the response is a 64-byte array, being the concatenation of the signature r and s component (without leading zeroes for sign indication).
Command to Applet
Field
Value
Description
CLA
0x80
INS
INS_CRYPTO
P1
P1_SIGNATURE
See
SE05x_P1_t
P2
P2_SIGN
See
SE05x_P2_t
Lc
#(Payload)
TLV[TAG_1]
4-byte identifier of EC key pair or private key.
TLV[TAG_2]
1-byte EDSignatureAlgo
TLV[TAG_3]
Byte array containing plain input data.
Le
0x00
Expecting signature
R-APDU Body
Value
Description
TLV[TAG_1]
EdDSA Signature (r concatenated with s).
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] edSignAlgo
: edSignAlgo [2:kSE05x_TAG_2][in] inputData
: inputData [3:kSE05x_TAG_3][in] inputDataLen
: Length of inputData[out] signature
: [0:kSE05x_TAG_1][inout] psignatureLen
: Length for signature