2024-08-07 01:20 AM
I am currently developing with SPC5STUDIO and want to verify a signed message using ECDSA.
To do this, I am studying the example in ecc.h.
When I ran the example code:
retval = ECCinitEC(&ECparams, &mb);
retval = ECCinitPoint(&G, &ECparams, &mb);
retval = ECCsetPointGenerator(G, &ECparams);
retval = ECCinitPoint(&PubKey, &ECparams, &mb);
retval = ECCinitPrivKey(&privkey, &ECparams, &mb);
retval = ECCsetPrivKeyValue(privkey, ecc_160_privkey, sizeof(ecc_160_privkey));
These functions executed without any issues, and I confirmed that the keys and parameters were correctly set in each variable.
However, when I call the function retval = ECCscalarMul(G, privkey, PubKey, &ECparams, &mb);, the system stops working and crashes.
If you have any insights or comments on this issue, I would greatly appreciate it.
Thank you.
best regrds.