Hello,
I'm trying to use hardware acceleration for my ECDHE implementation. With the SDK-supplied functions, this should be pretty straightforward, however, the functions just fill the output with zeros and return OK. The documentation is pretty thin and I could not find any other resource online. There's this piece of code from mbed: https://github.com/HackerDom/mbed-os/blob/master/features/cryptocell/FEATURE_CRYPTOCELL310/ecdh_alt.c#L202-L226 however, to get to this point, I need to be able to generate at least 1 public key, which I cannot:
CRYS_ECMONT_TempBuff_t tmp{};
uint8_t pub[32];
size_t pubsz = sizeof pub;
uint8_t priva[32];
size_t privasz = sizeof priva;
uint8_t seed[32] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
int gen_res = CRYS_ECMONT_SeedKeyPair(pub, &pubsz, priva, &privasz, seed, sizeof seed, &tmp);
This snippet fills out priva with a correct looking key, but pub is filled with zeros. I expect pub to have the corresponding public key.
I'm initializing cryptocell before this snippet and I am able to use other parts of it (HMAC, AES etc), so I don't think it's an initialization issue.
Am I missing something?