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!
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.