Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640
I’m in the process to revive the security code from an older project to the a new project using sdk 4.10.0.10
The older project uses sdk 2.2.0.31 and supports ECC_ECDSA_sign(), ECC_ECDSA_verify() ROM functions.
With the same app building with sdk4.10.0.10, I encountered these link errors below.
Since these are supported in the ROM and using the same device, these functions should be supported but maybe the name has changed to eccRom_signHash(), eccRom_verifyHash() resp. The function prototype for eccRom_verifyHash() seems to match ECC_ECDSA_verify(). Please confirm that to be the case.
If so, I can see an example on eccRom_verifyHash() usage in sign_util.c file - function bimVerifyImage_ecc(), but when I just substitute the name change in my app, the code crashes.
is this large enough for sign and verify ?
uint8_t workZone[288*4];
do we need 2 times for eccWorkzone and tempWorkzone ?
Also, I like to see an example on how to generate an ECC signature by using the eccRom_signHash().
Tony
// this is the sdk2.2.0.31 function prototype
//*****************************************************************************
/*!
* \brief Sign data.
*
* \param secretKey Pointer to the secret key, input.
* \param text Pointer to the message, input.
* \param randString Pointer to random string, input.
* \param sign1 Pointer to signature part 1, output.
* \param sign2 Pointer to signature part 2, output.
*
* \return Status
*/
//*****************************************************************************
extern uint8_t ECC_ECDSA_sign(uint32_t *secretKey, uint32_t *text, uint32_t *randString,
uint32_t *sign1, uint32_t *sign2);
//*****************************************************************************
/*!
* \brief Verify signature.
*
* \param publicKey_x Pointer to public key X-coordinate, input.
* \param publicKey_y Pointer to public key Y-coordinate, input.
* \param text Pointer to message data, input.
* \param sign1 Pointer to signature part 1, input.
* \param sign2 Pointer to signature part 2, input.
*
* \return Status
*/
//*****************************************************************************
extern uint8_t ECC_ECDSA_verify(uint32_t *publicKey_x, uint32_t *publicKey_y,
uint32_t *text, uint32_t *sign1, uint32_t *sign2);
Performing Pre-Build Action
Linking
Error[Li005]: no definition for "ECC_ECDSA_sign" [referenced from
C:\svn\L3_Reader\cc2640\simplelink_cc2640r2_sdk_4_10_00_10\
project\L3_SC_Reader\tirtos\iar\app\FlashROM_StackLibrary\Obj\
cgm_crypto.o]
Error[Li005]: no definition for "ECC_ECDSA_verify" [referenced
from C:\svn\L3_Reader\cc2640\simplelink_cc2640r2_sdk_4_10_00_10\
project\L3_SC_Reader\tirtos\iar\app\FlashROM_StackLibrary\Obj\
cgm_crypto.o]