I'm designing remote attestation. When I look into the ra sample provided by Intel. The quote is generated by the sgx_ra_proc_msg2() (actually a library trusted function sgx_ra_get_msg3_trusted(). It seems that I cannot put custom data into the report_data of the report body in the quote with sgx_ra_proc_msg2(). So I write a new ecall function in the enclave to call sgx_create_report() to generate a report with custom report_data and write the report to the application buffer. And the application call sgx_get_quote() to get the quote of the report just created by sgx_create_report(). Is this the right way to do that? Thanks.
It seems I should also generate the other fields of the message3. Is there any easier way to do that?
I second this question. It's a basic feature of most attestation protocols to allow the attesting entity to add additional data to the attestation report, and there is no obvious way to do this with SGX.
I am also wondering how this is supposed to be done. The question has also been asked here: https://github.com/intel/sgx-ra-sample/issues/53, on the repository of the sgx-ra-sample, which is the code for the example at https://software.intel.com/content/www/us/en/develop/articles/code-sample-intel-software-guard-exten....