<?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 sgx_create_pse_session fails in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071584#M321</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I have been trying to use sgx_get_trusted_time function for which I need to create a pse session before calling. Whenever I call sgx_create_pse_session() I get &lt;B&gt;SGX_ERROR_SERVICE_UNAVAILABLE error. &lt;/B&gt;&lt;/P&gt;

&lt;P&gt;I have several doubts regarding PSE session :&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;I'm not entirely sure what PSE session is for&lt;/LI&gt;
	&lt;LI&gt;Why would some platforms support it and some don't. Is it hardware depended? Can I make my platform support it?&lt;/LI&gt;
	&lt;LI&gt;I tried using sgx_get_ps_cap(), but it return &lt;B&gt;SGX_ERROR_SERVICE_UNAVAILABLE. &lt;/B&gt;How can I resolve that?&lt;/LI&gt;
	&lt;LI&gt;If Remote Attestation makes use of Platform Services, what difference does that make. Exactly what services does it refer to.&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Fri, 09 Sep 2016 17:00:17 GMT</pubDate>
    <dc:creator>shivani_g_</dc:creator>
    <dc:date>2016-09-09T17:00:17Z</dc:date>
    <item>
      <title>sgx_create_pse_session fails</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071584#M321</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I have been trying to use sgx_get_trusted_time function for which I need to create a pse session before calling. Whenever I call sgx_create_pse_session() I get &lt;B&gt;SGX_ERROR_SERVICE_UNAVAILABLE error. &lt;/B&gt;&lt;/P&gt;

&lt;P&gt;I have several doubts regarding PSE session :&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;I'm not entirely sure what PSE session is for&lt;/LI&gt;
	&lt;LI&gt;Why would some platforms support it and some don't. Is it hardware depended? Can I make my platform support it?&lt;/LI&gt;
	&lt;LI&gt;I tried using sgx_get_ps_cap(), but it return &lt;B&gt;SGX_ERROR_SERVICE_UNAVAILABLE. &lt;/B&gt;How can I resolve that?&lt;/LI&gt;
	&lt;LI&gt;If Remote Attestation makes use of Platform Services, what difference does that make. Exactly what services does it refer to.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 09 Sep 2016 17:00:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071584#M321</guid>
      <dc:creator>shivani_g_</dc:creator>
      <dc:date>2016-09-09T17:00:17Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071585#M322</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;#1. I'm not entirely sure what PSE session is for&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The caller should make sure a PSE session has been established using sgx_create_pse_session before attempting to establish a&lt;BR /&gt;
	remote attestation and key exchange session involving platform service information.&lt;/P&gt;

&lt;P&gt;#2. Why would some platforms support it and some don't. Is it hardware depended? Can I make my platform support it?&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Some platforms do not have firmware support for platform services enclave, which would cause this function to fail. In this case, you should set b_pse=false and call enclave_init_ra again and make a code path where sgx_create_pse_session() is not called.&lt;/P&gt;

&lt;P&gt;#3. I tried using sgx_get_ps_cap(), but it return SGX_ERROR_SERVICE_UNAVAILABLE. How can I resolve that?&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; There seems something wrong with the platform service configuration. And this problem is solved after I reinstalled the Intel management engine component and sgx platform service.&lt;/P&gt;

&lt;P&gt;#4. If Remote Attestation makes use of Platform Services, what difference does that make. Exactly what services does it refer to.&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;sgx_create_pse_session creates a session with the PSE.&lt;/LI&gt;
	&lt;LI&gt;Syntax: &amp;nbsp; &amp;nbsp;sgx_status_t sgx_create_pse_session(void);&lt;/LI&gt;
	&lt;LI&gt;Description: &amp;nbsp;An Intel® SGX enclave first calls sgx_create_pse_session()in the process to request platform service. It's suggested that the caller should wait (typically several seconds to tens of seconds) and retry this API if SGX_ERROR_BUSY is returned.&amp;nbsp;Refer page no 168 in Intel-SGX-SDK-Users-Guide-for-Windows-OS.pdf&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;The PSE is an architectural enclave provided by the SDK. It supplies useful services, specifically trusted time and a monotonic counter. These can be used for replay protection during nonce generation and for securely calculating the length of time for which a secret shall be valid. To use the PSE, the enclave function should call the trusted SDK functions sgx_create_pse_session() and sgx_close_pse_session() before and after sgx_ra_init() respectively.&lt;/P&gt;

&lt;P&gt;-Surenthar&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2016 11:40:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071585#M322</guid>
      <dc:creator>Surenthar_S_Intel</dc:creator>
      <dc:date>2016-09-10T11:40:36Z</dc:date>
    </item>
    <item>
      <title>Thank You Surenthar</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071586#M323</link>
      <description>&lt;P&gt;Thank You Surenthar&lt;/P&gt;

&lt;P&gt;I just realized that Platform Services are not available for Linux OS (mentioned at- &lt;A href="https://01.org/sites/default/files/downloads/intelr-software-guard-extensions-linux-os/sgx-psw-release-notes-linux-os.pdf)" target="_blank"&gt;https://01.org/sites/default/files/downloads/intelr-software-guard-extensions-linux-os/sgx-psw-release-notes-linux-os.pdf)&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;I need to calculate the time or clock cycles taken by a particular instruction inside the enclave, but I'm unable to use trusted time function (which anyway returns time in second, whereas execution time is in nanoseconds). The trusted time.h library does not support clock_gettime() and I'm also not able to use rdtsc instruction inside enclave (it gives error - Illegal instruction (core dumped)). Can you suggest me any other way to measure inside the enclave.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 00:07:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071586#M323</guid>
      <dc:creator>shivani_g_</dc:creator>
      <dc:date>2016-09-14T00:07:27Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071587#M324</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have the same problem and also can´t figure out why it isn´t working.&lt;/P&gt;

&lt;P&gt;Setup:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;- System: Windows 10 on a Lenovo Thinkpad T470s&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;- SGX: SGX was enabled in BIOS, PSW and SDK version 1.9.100.41172 are installed&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp;DEV Environment: Visual Studio 2015 Enterprise, set to prerelease mode&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Minimal Example Routine:&lt;/P&gt;

&lt;P&gt;1. call sgx_create_enclave in APP (result: SGX_SUCESS)&lt;BR /&gt;
	2. call sgx_enable_device in App (result: SGX_SUCESS, output: SGX_ENABLED)&lt;BR /&gt;
	3. call sgx_create_pse_session in Enclave (result:&amp;nbsp;0x4001 SGX_ERROR_SERVICE_UNAVAILABLE)&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	I already have re-installed PSW, SDK and the "I&lt;SPAN style="font-size: 12px;"&gt;ntel management engine component" (from this source:&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.dell.com/support/home/de/de/debsdt1/drivers/driversdetails?driverId=X37VM)" target="_blank"&gt;https://www.dell.com/support/home/de/de/debsdt1/drivers/driversdetails?driverId=X37VM)&lt;/A&gt; and rebootet my device, however, the problem persists&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Same result in debug mode.&amp;nbsp;&lt;SPAN style="font-size: 1em;"&gt;It does work in Simulation mode, however, this should be expected as the PSE enclave is not really called here.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Any suggestions for a reason for this behaviour / solution to the problem would be appreciated.&lt;/P&gt;

&lt;P&gt;edit: I tested the exact same program on a Thinkpad T570 and another T470 and it worked without problems there, which confuses me even more, but at least shows that the error is not in the calling routine itself..&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 17:36:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071587#M324</guid>
      <dc:creator>greubel__andre</dc:creator>
      <dc:date>2017-11-28T17:36:44Z</dc:date>
    </item>
    <item>
      <title>I have the same problem on HP</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071588#M325</link>
      <description>&lt;P&gt;I have the same problem on HP EliteDesk i7 6700 running windows 7.&lt;/P&gt;

&lt;P&gt;I try to create monotonic counter so I call first sgx_create_pse_session()&amp;nbsp; but I'm always getting error code&amp;nbsp;&lt;SPAN style="font-size: 1em;"&gt;ERROR_SERVICE_UNAVAILABLE&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Any ideas ?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 14:59:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071588#M325</guid>
      <dc:creator>David_Z_3</dc:creator>
      <dc:date>2017-11-29T14:59:53Z</dc:date>
    </item>
    <item>
      <title>Running the Lenovo System</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071589#M326</link>
      <description>Running the Lenovo System Update Tool updated some drivers including the Intel Management Enginge to 11.7 (the linked version above was 1.5). Though it didn´t work with IME 1.7 at the point the system was set up, but now it does somehow...
Anyway, problem is fixed.</description>
      <pubDate>Thu, 30 Nov 2017 11:04:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071589#M326</guid>
      <dc:creator>greubel__andre</dc:creator>
      <dc:date>2017-11-30T11:04:33Z</dc:date>
    </item>
    <item>
      <title>after  installation of Intel</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071590#M327</link>
      <description>&lt;P&gt;after&amp;nbsp; installation of Intel Management Engine Component the error&amp;nbsp;&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;ERROR_SERVICE_UNAVAILABLE sgx_create_pse_session disappear BUT now I got a new one "SGX_ERROR_NETWORK_FAILURE"&amp;nbsp; does it mean that in order to use monotonic counter we must have internet connection ??&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;If yes it's seems to be a big constraint&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Any help will be welcome&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 11:44:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071590#M327</guid>
      <dc:creator>David_Z_3</dc:creator>
      <dc:date>2017-11-30T11:44:30Z</dc:date>
    </item>
    <item>
      <title> </title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071591#M328</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I also got the same &lt;STRONG&gt;SGX_ERROR_NETWORK_FAILURE &lt;/STRONG&gt;while using &lt;STRONG&gt;sgx_create_pse_session()&lt;/STRONG&gt; in order to use &lt;STRONG&gt;sgx_get_trusted_time()&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;Why should I need an internet connection to get a trusted time from within the enclave?&lt;/P&gt;

&lt;P&gt;Thanks in advance for any help!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 16:32:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071591#M328</guid>
      <dc:creator>André_E_</dc:creator>
      <dc:date>2018-01-31T16:32:02Z</dc:date>
    </item>
    <item>
      <title>Before you call Trusted Time</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071592#M329</link>
      <description>&lt;P&gt;Before you call Trusted Time or Monotonic Counter service, you need establish the session between PSE and CSME, and an ephemeral session between PSE and App enclave&amp;nbsp;. And during the session establish(between PSE and PSE)&amp;nbsp;process, need make sure the enclave and CSME are in good security status. To make sure it, it is need to involve the Intel Attestation Server. So you need access the internet.&amp;nbsp; And only the first time, the internet access is needed during session established between PSE and CSME.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 10:38:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/sgx-create-pse-session-fails/m-p/1071592#M329</guid>
      <dc:creator>Junli_S_Intel</dc:creator>
      <dc:date>2020-02-04T10:38:23Z</dc:date>
    </item>
  </channel>
</rss>

