Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Wang__Huibo
Beginner
121 Views

Key exchange failed by using sgx_ecc256

Hi,

I am running into a problem when I am calling sgx_ecc256_compute_shared_dhkey by using a public key from sever.

I build a sever outside which is using dh algorithm, do key exchange with enclave. The function of sgx_ecc256_compute_shared_dhkey inside enclave wont take the public key transmitted from sever as the right input.

Is there any idea how could I generate the right public key from server to satisfy the requirement?

 

Thanks a lot for anyone's help!

0 Kudos
1 Reply
121 Views

Hi,

The inputs and outputs of the crypto functions in the SGX SDK are in little endian format.  For sgx_ecc256_compute_shared_dhkey, the x and y components of sgx_ec256_dh_shared512_t public_key need to be inputted in little endian format.  If the server libraries crypto library outputs the public key in big endian format, be sure to reverse the endianness.

-Surenthar

Reply