<?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 cryptsetup is open source. So in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084500#M660</link>
    <description>&lt;P&gt;cryptsetup is open source. So you may extend it and potentially upstream it. E.G.:&lt;/P&gt;

&lt;P&gt;- check whether system supports SGX&lt;/P&gt;

&lt;P&gt;- if SGX is supported: send password to enclave and run all encrypt&amp;amp;decrypt operations within enclave&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Not sure whether you'd want/need sealing.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2017 11:04:35 GMT</pubDate>
    <dc:creator>Matthias_H_Intel</dc:creator>
    <dc:date>2017-02-03T11:04:35Z</dc:date>
    <item>
      <title>Can we execute linux commands inside enclave</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084493#M653</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can we execute various Linux commands inside SGX enclave like below:&lt;/P&gt;

&lt;P&gt;cryptsetup&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;ln&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;and so on.&lt;/P&gt;

&lt;P&gt;How to do file IO inside enclave?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Rajendra&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 08:50:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084493#M653</guid>
      <dc:creator>Rajendra_K_</dc:creator>
      <dc:date>2017-02-01T08:50:37Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084494#M654</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;The Intel SGX SDK includes trusted cryptography library named sgx_tcrypto. You can refer it for the functions implemented in that library.&amp;nbsp;&lt;SPAN style="font-size: 1em;"&gt;You can check the supported functions and Un Supported standard functions here:(Page 92) :&lt;/SPAN&gt;&lt;A href="https://download.01.org/intel-sgx/linux-1.7/docs/Intel_SGX_SDK_Developer_Reference_Linux_1.7_Open_Source.pdf" id="LPlnk549840" previewremoved="true" style="font-size: 1em;"&gt;https://download.01.org/intel-sgx/linux-1.7/docs/Intel_SGX_SDK_Developer_Reference_Linux_1.7_Open_Source.pdf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;For doing File IO inside enclave, you can use OCALLS .&amp;nbsp; You need to add trusted and untrusted headers in edl file .&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 1em;"&gt;For ex:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;enclave {&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;include "sgx_stdio_stubs.h" //for FILE and other definitions&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;trusted {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void test_file_io(void);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;};&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;untrusted {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FILE * fopen([in,string] const char * filename, [in,string] const char * mode) propagate_errno;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int fclose([user_check] FILE * stream) propagate_errno;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_t fwrite([in, size=size, count=count] const void * buf-fer,size_t size,size_t count, [user_check]FILE * stream) propagate_errno;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;};&lt;BR /&gt;
	};&lt;/P&gt;

&lt;P&gt;-Surenthar&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 09:39:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084494#M654</guid>
      <dc:creator>Surenthar_S_Intel</dc:creator>
      <dc:date>2017-02-02T09:39:23Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084495#M655</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Thanks for your reply. I understood the File IO.&lt;/P&gt;

&lt;P&gt;Can we run linux commands inside enclave like &lt;STRONG&gt;ln&lt;/STRONG&gt;&lt;STRONG&gt;, find, grep&lt;/STRONG&gt; and so on?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Rajendra&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 11:53:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084495#M655</guid>
      <dc:creator>Rajendra_K_</dc:creator>
      <dc:date>2017-02-02T11:53:56Z</dc:date>
    </item>
    <item>
      <title>Hi, Rajendra.</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084496#M656</link>
      <description>&lt;P&gt;Hi, Rajendra.&lt;/P&gt;

&lt;P&gt;You can't execute any system calls or I/O operations inside an enclave, therefore you can't execute the abovementioned commands inside an enclave. The workaround is, as pointed by Surenthar, to use OCALLs.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Rodolfo&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 13:06:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084496#M656</guid>
      <dc:creator>Rodolfo_S_</dc:creator>
      <dc:date>2017-02-02T13:06:52Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084497#M657</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;In my case, I would be getting key from key manager and I have to pass this key to cryptsetup&amp;nbsp;command to encrypt the volume inside the&amp;nbsp;enclave.&lt;/P&gt;

&lt;P&gt;If I can't run the&amp;nbsp;cryptsetup&amp;nbsp;command inside the enclave then I have to send plain key to OCALL function to encrypt the volume using cryptsetup command outside the&amp;nbsp;enclave.&lt;/P&gt;

&lt;P&gt;Then what is the use of enclave in this particular case?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Rajendra&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 13:26:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084497#M657</guid>
      <dc:creator>Rajendra_K_</dc:creator>
      <dc:date>2017-02-02T13:26:58Z</dc:date>
    </item>
    <item>
      <title>If you really need to use</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084498#M658</link>
      <description>&lt;P&gt;If you really need to use cryptsetup, I'm afraid an enclave won't be very useful.&lt;/P&gt;

&lt;P&gt;To the best of my knowledge, there are still no similar programs that make use of SGX to achieve this goal.&lt;/P&gt;

&lt;P&gt;One alternative would be to develop "your own cryptsetup" which makes use of the&amp;nbsp;&lt;EM&gt;sgx_seal_data&lt;/EM&gt;&amp;nbsp;and &lt;EM&gt;sgx_unseal_data&lt;/EM&gt;&amp;nbsp;functions.&lt;/P&gt;

&lt;P&gt;Rodolfo&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 13:44:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084498#M658</guid>
      <dc:creator>Rodolfo_S_</dc:creator>
      <dc:date>2017-02-02T13:44:42Z</dc:date>
    </item>
    <item>
      <title>Hi Rodolfo,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084499#M659</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;Rodolfo,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Thanks for quick reply.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Even I also thinking of the same solution that you have suggested.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;As anyway, we have to use cryptsetup&amp;nbsp;command for volume encryption.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Rajendra&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 13:49:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084499#M659</guid>
      <dc:creator>Rajendra_K_</dc:creator>
      <dc:date>2017-02-02T13:49:23Z</dc:date>
    </item>
    <item>
      <title>cryptsetup is open source. So</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084500#M660</link>
      <description>&lt;P&gt;cryptsetup is open source. So you may extend it and potentially upstream it. E.G.:&lt;/P&gt;

&lt;P&gt;- check whether system supports SGX&lt;/P&gt;

&lt;P&gt;- if SGX is supported: send password to enclave and run all encrypt&amp;amp;decrypt operations within enclave&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Not sure whether you'd want/need sealing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 11:04:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084500#M660</guid>
      <dc:creator>Matthias_H_Intel</dc:creator>
      <dc:date>2017-02-03T11:04:35Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084501#M661</link>
      <description>Hi,
Even though we implement cryptsetup inside the enclave we have to make OS calls to dm-crypt kernal module .
So again SGX does not support OS calls. So  in my view either implement dm-crypt and cryptsetup inside enclave or else we can't use SGX in this case.
Please suggest.
Thanks,
Rajendra</description>
      <pubDate>Fri, 03 Feb 2017 12:07:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084501#M661</guid>
      <dc:creator>Rajendra_K_</dc:creator>
      <dc:date>2017-02-03T12:07:16Z</dc:date>
    </item>
    <item>
      <title>Hi Surenthar,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084502#M662</link>
      <description>&lt;P&gt;Hi Surenthar,&lt;/P&gt;

&lt;P&gt;Is there a real sgx_stdio_stubs.h file in the SDK? &amp;nbsp;Is it just mentioned in the Developer Reference as an example for propagating errno? &amp;nbsp;Do we need to CREATE our own OCALLs to call the FILE IO operations?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;/P&gt;

&lt;P&gt;Elephant&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Selvaraj, Surenthar (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;The Intel SGX SDK includes trusted cryptography library named sgx_tcrypto. You can refer it for the functions implemented in that library.&amp;nbsp;You can check the supported functions and Un Supported standard functions here:(Page 92) :&lt;A href="https://download.01.org/intel-sgx/linux-1.7/docs/Intel_SGX_SDK_Developer_Reference_Linux_1.7_Open_Source.pdf" rel="nofollow"&gt;https://download.01.org/intel-sgx/linux-1.7/docs/Intel_SGX_SDK_Developer_Reference_Linux_1.7_Open_Source.pdf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;For doing File IO inside enclave, you can use OCALLS .&amp;nbsp; You need to add trusted and untrusted headers in edl file .&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;For ex:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;enclave {&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;include "sgx_stdio_stubs.h" //for FILE and other definitions&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;trusted {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void test_file_io(void);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;};&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;untrusted {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FILE * fopen([in,string] const char * filename, [in,string] const char * mode) propagate_errno;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int fclose([user_check] FILE * stream) propagate_errno;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_t fwrite([in, size=size, count=count] const void * buf-fer,size_t size,size_t count, [user_check]FILE * stream) propagate_errno;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;};&lt;BR /&gt;
	};&lt;/P&gt;

&lt;P&gt;-Surenthar&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 04:25:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084502#M662</guid>
      <dc:creator>Elephant</dc:creator>
      <dc:date>2017-07-25T04:25:58Z</dc:date>
    </item>
    <item>
      <title>Hi:</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084503#M663</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;

&lt;P&gt;As I know, there isn't a &lt;A class="no-outline" href="https://software.intel.com/system/files/managed/72/a3/IntelProtectedFileSystem_Reference.pdf" id="file-link" is="action-link" role="link" style="cursor: var(--cr-actionable_-_cursor); display: inline-block; color: rgb(51, 103, 214); outline: none; max-width: 100%; word-break: break-all; font-family: Roboto, &amp;quot;Segoe UI&amp;quot;, Arial, &amp;quot;Microsoft Yahei&amp;quot;, sans-serif; font-size: 13px;" tabindex="0"&gt;IntelProtectedFileSystem&lt;/A&gt;&amp;nbsp;on linux. On linux you need to create Ocall functions to do such operation. And the mentioned header file is some struct and typedefs which you need to write by yourself.&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;you&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 06:45:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084503#M663</guid>
      <dc:creator>you_w_</dc:creator>
      <dc:date>2017-07-25T06:45:51Z</dc:date>
    </item>
    <item>
      <title>Hi You,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084504#M664</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi You,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thanks for this information. &amp;nbsp;I will take note. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;/P&gt;

&lt;P&gt;Elephant&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 06:51:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Can-we-execute-linux-commands-inside-enclave/m-p/1084504#M664</guid>
      <dc:creator>Elephant</dc:creator>
      <dc:date>2017-07-25T06:51:04Z</dc:date>
    </item>
  </channel>
</rss>

