Intel® Software Guard Extensions (Intel® SGX)
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

Key exchange failed by using sgx_ecc256

Wang__Huibo
Beginner
248 Views

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
Surenthar_S_Intel
248 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