cancel
Showing results for 
Search instead for 
Did you mean: 

ECC key decompression in X-CUBE-CRYPTOLIB

ncat1
Visitor

I am using the X-CUBE-CRYPTOLIB (V4.2.0) in a project for STM32F207.

I am successfully able to generate ECC key pair using cmox_ecdsa_keyGen() and generate ECDSA signature using cmox_ecdsa_sign() but I am now needing to generate a shared secret using cmox_ecdh() function. 

The problem I have is that the cmox_ecdh() function expects the public key in raw data format (64 bytes) but I only have the public key available in compressed format (33 bytes) where 32 bytes is the x component and the other byte indicates if the y component is odd or even. The y component can be derived from this information but I could not find a function within the  X-CUBE-CRYPTOLIB that does this which means I am unable to generate the shared secret.

Is there a way of achieving this with the  X-CUBE-CRYPTOLIB?

0 REPLIES 0