<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re:getting SGX_ERROR_UNEXPECTED in sgx_ra_proc_msg2 in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1227119#M4088</link>
    <description>&lt;P&gt;Hello user14,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It is expected that trying to do a remote attestation with an enclave in simulation mode will fail.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You can find this note in the sgx-ra-sample, &lt;A href="https://github.com/intel/sgx-ra-sample" target="_blank"&gt;https://github.com/intel/sgx-ra-sample&lt;/A&gt;: &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;"Note that Remote Attestation will fail for clients running in simulation mode, as this mode has no hardware protection."&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 10 Nov 2020 19:42:09 GMT</pubDate>
    <dc:creator>JesusG_Intel</dc:creator>
    <dc:date>2020-11-10T19:42:09Z</dc:date>
    <item>
      <title>getting SGX_ERROR_UNEXPECTED in sgx_ra_proc_msg2</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1226799#M4086</link>
      <description>&lt;DIV class="lia-quilt-row lia-quilt-row-message-subject"&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-message-subject-content"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;
&lt;DIV class="topic-subject-wrapper"&gt;
&lt;DIV class="lia-message-subject lia-component-message-view-widget-subject"&gt;
&lt;DIV class="MessageSubject"&gt;
&lt;DIV class="MessageSubjectIcons "&gt;
&lt;DIV class="lia-message-subject"&gt;&lt;SPAN style="font-family: inherit;"&gt;---- Msg2 Details ----------------------------------------------------------&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="lia-quilt-row lia-quilt-row-message-body"&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-message-body-content"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;
&lt;DIV id="bodyDisplay" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;msg2.g_b.gx = 71f76c3a1b06cc702b66cd21626bf1f6d7d894be5941282384ce80cdb845eae5&lt;BR /&gt;msg2.g_b.gy = 5f5f250493ec7e8fc68e0ef0055d0065532b5a14e8fb1f6748e6b19e7cebb9c4&lt;BR /&gt;msg2.spid = 1718b04d7fc5d48bd1eb9a6465b36c0d&lt;BR /&gt;msg2.quote_type = 0100&lt;BR /&gt;msg2.kdf_id = 0100&lt;BR /&gt;msg2.sign_ga_gb = 04583fcdfb5fa1aad7af60aa69eb55d506aa46ef05bb223c507f026d283e4f2156d35352713c6bd0dfc7739a46b22f97f15d596e6663f75360ea1660d61aedbd&lt;BR /&gt;msg2.mac = aa40bfa3b0647d7e6eab166017a01afd&lt;BR /&gt;msg2.sig_rl_size = 00000000&lt;BR /&gt;msg2.sig_rl =&lt;BR /&gt;----------------------------------------------------------------------------&lt;BR /&gt;+++ msg2_size = 168&lt;BR /&gt;sgx_ra_proc_msg2: 00000001&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached the msg2 that my client receives from the RP. I am getting an error while processing the msg2. What could be the possible reasons for the error? Also, is there any recommended way to debug such errors?&lt;/P&gt;
&lt;DIV class="lia-quilt-row lia-quilt-row-message-body"&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-message-body-content"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;
&lt;DIV id="bodyDisplay_1" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;I built upon&amp;nbsp;&lt;A href="https://github.com/intel/sgx-ra-sample" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer"&gt;https://github.com/intel/sgx-ra-sample&lt;/A&gt;&amp;nbsp; for my application. I am using hardware-debug mode. I tried sgx-gdb but was not able to make sense out of it, as it's not letting me step into sgx_ra_proc_msg2 properly. Maybe I am not understanding it properly. Is there another way to find the problem?&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp;I have previously asked this question but is closed due to my lack of response. Sorry about that.&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Nov 2020 00:37:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1226799#M4086</guid>
      <dc:creator>user14</dc:creator>
      <dc:date>2020-11-10T00:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: getting SGX_ERROR_UNEXPECTED in sgx_ra_proc_msg2</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1226824#M4087</link>
      <description>&lt;P&gt;I am using&amp;nbsp;&lt;SPAN&gt;SIM-debug mode instead of hardware.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 01:54:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1226824#M4087</guid>
      <dc:creator>user14</dc:creator>
      <dc:date>2020-11-10T01:54:14Z</dc:date>
    </item>
    <item>
      <title>Re:getting SGX_ERROR_UNEXPECTED in sgx_ra_proc_msg2</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1227119#M4088</link>
      <description>&lt;P&gt;Hello user14,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It is expected that trying to do a remote attestation with an enclave in simulation mode will fail.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You can find this note in the sgx-ra-sample, &lt;A href="https://github.com/intel/sgx-ra-sample" target="_blank"&gt;https://github.com/intel/sgx-ra-sample&lt;/A&gt;: &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;"Note that Remote Attestation will fail for clients running in simulation mode, as this mode has no hardware protection."&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Nov 2020 19:42:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1227119#M4088</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2020-11-10T19:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Re:getting SGX_ERROR_UNEXPECTED in sgx_ra_proc_msg2</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1227178#M4089</link>
      <description>&lt;P&gt;Thanks for the quick reply. I am getting the same error while running in the Hardware debug mode.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 22:26:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1227178#M4089</guid>
      <dc:creator>user14</dc:creator>
      <dc:date>2020-11-10T22:26:54Z</dc:date>
    </item>
    <item>
      <title>Re:getting SGX_ERROR_UNEXPECTED in sgx_ra_proc_msg2</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1227511#M4090</link>
      <description>&lt;P&gt;Hello user14,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please double-check that you indeed have a linkable subscription and a linkable signature since your quote type is linkable.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You may also want to look at the section, Debugging a Remote Attestation Service Provider, in the&lt;SPAN style="font-family: Calibri; font-size: 11pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;Intel SGX Developer Reference Guide for&lt;SPAN style="font-family: intel-clear; font-size: 12pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/download/sgx-sdk-developer-reference-windows.html" rel="noopener noreferrer" target="_blank" style="font-size: 12px;"&gt;Windows&lt;/A&gt;&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp;or&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://download.01.org/intel-sgx/sgx-linux/2.11/docs/Intel_SGX_Developer_Reference_Linux_2.11_Open_Source.pdf" rel="noopener noreferrer" target="_blank" style="font-size: 12px;"&gt;Linux.&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Nov 2020 17:27:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1227511#M4090</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2020-11-11T17:27:17Z</dc:date>
    </item>
    <item>
      <title>Re:getting SGX_ERROR_UNEXPECTED in sgx_ra_proc_msg2</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1228773#M4097</link>
      <description>&lt;P&gt;Hello user14,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Do you still need help with this issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jesus G.&lt;/P&gt;&lt;P&gt;Intel Customer Support&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Nov 2020 18:37:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1228773#M4097</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2020-11-16T18:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Re:getting SGX_ERROR_UNEXPECTED in sgx_ra_proc_msg2</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1228811#M4098</link>
      <description>&lt;P&gt;Yes! I think I would need some help.&amp;nbsp;&lt;SPAN&gt;I am trying to debug the program using sgx-gdb, but no luck, will get back to you if I find something.&amp;nbsp;&lt;/SPAN&gt; I double-checked for a&amp;nbsp;&lt;SPAN&gt;linkable subscription and a linkable signature.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 21:10:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1228811#M4098</guid>
      <dc:creator>user14</dc:creator>
      <dc:date>2020-11-16T21:10:25Z</dc:date>
    </item>
    <item>
      <title>Re:getting SGX_ERROR_UNEXPECTED in sgx_ra_proc_msg2</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1229105#M4099</link>
      <description>&lt;P&gt;Hello user14,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The SGX Developer Reference gives this advice for helping debug your Remote Attestation Service Provider:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As an ISV writing the remote attestation service provider, you may want to debug the message flow. One way to do this would be to provide pre-generated messages that can be replayed and verified. However, not that S1 message = (GID || ga) includes the random component ga generated inside an enclave. Also, the remote attestation service provider generates a&lt;/P&gt;&lt;P&gt;random public+private key pair as part of its msg2 generation, but without any interaction with Intel® SGX. Finally, each of these has state or context that is associated with cryptographic operations and is used to ensure that certain calls being made are in the correct order and that the state is consistent. These characteristics help protect the remote attestation flow against attacks, but also make it more difficult to replay pre-generated messages.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;To overcome these, the cryptographic library is modified and used (only) by the sample service provider. Any time that key generation, signing, or other operation requests a random number, the number 9 is returned. This means that the crypto functions from sample_libcrypto.lib are predictable and cryptographically weak. If we can replay msg1 send from the isv_app,&lt;/P&gt;&lt;P&gt;the sample service_provider.dll will always generate the exact same msg2. We now have a sufficient system to replay messages sent by the isv_app and have it verify that the responses sent by the remote service are the&lt;/P&gt;&lt;P&gt;expected ones.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;To replay messages and exercise this verification flow, pass in 1 or 2 as a command-line argument when running the sample application isv_app. The isv_app will ignore errors generated by the built-in checks in the Intel SGX.&lt;/P&gt;&lt;P&gt;Developers wishing to debug their remote attestation service provider should be able to temporarily modify their cryptographic subsystem to behave in a similar manner as the sample_libcrypto.lib and replay the pre-computed messages stored in sample_messages.h. The responses from their own remote attestation service provider should match the ones generated by ours, which are also stored in sample_messages.h.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Nov 2020 17:04:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1229105#M4099</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2020-11-17T17:04:15Z</dc:date>
    </item>
    <item>
      <title>Re:getting SGX_ERROR_UNEXPECTED in sgx_ra_proc_msg2</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1230968#M4120</link>
      <description>&lt;P&gt;Hello user14,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have you made any progress?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jesus G.&lt;/P&gt;&lt;P&gt;Intel Customer Support&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Nov 2020 22:31:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1230968#M4120</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2020-11-23T22:31:42Z</dc:date>
    </item>
    <item>
      <title>Re:getting SGX_ERROR_UNEXPECTED in sgx_ra_proc_msg2</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1231693#M4135</link>
      <description>&lt;P&gt;&lt;B&gt;Intel is no longer monitoring this thread. If you want a response from Intel in a follow-up question, please open a new thread.&lt;/B&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2020 20:06:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/getting-SGX-ERROR-UNEXPECTED-in-sgx-ra-proc-msg2/m-p/1231693#M4135</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2020-11-25T20:06:41Z</dc:date>
    </item>
  </channel>
</rss>

