<?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 How to use crypto-api-toolkit in SIM mode in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1266910#M4395</link>
    <description>&lt;P&gt;I am using &lt;A href="https://github.com/intel/crypto-api-toolkit" target="_blank"&gt;https://github.com/intel/crypto-api-toolkit&lt;/A&gt; repo to learn PKCS#11, my current SGX_SDK version is 2.13 , on Ubuntu 18.04 &lt;BR /&gt;&lt;BR /&gt;I build the above using $ sh autogen.sh; $ ./configure; $ make SGX_MODE=SIM; $ sudo make install&lt;BR /&gt;&lt;BR /&gt;Question : Does the repo supports SIM mode build? In the above build I did not face any error message. &lt;BR /&gt;&lt;BR /&gt;Got following error when executing&lt;BR /&gt;&lt;BR /&gt;$./p11test&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;76) test: UnsupportedAPITests::testWaitForSlotEvent (F) line: 120 TestsNoPINInitBase.cpp&lt;BR /&gt;setUp() failed&lt;BR /&gt;- equality assertion failed&lt;BR /&gt;- Expected: 0&lt;BR /&gt;- Actual : 48&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;77) test: UnsupportedAPITests::testGetFunctionStatus (F) line: 120 TestsNoPINInitBase.cpp&lt;BR /&gt;setUp() failed&lt;BR /&gt;- equality assertion failed&lt;BR /&gt;- Expected: 0&lt;BR /&gt;- Actual : 48&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;78) test: UnsupportedAPITests::testCancelFunction (F) line: 120 TestsNoPINInitBase.cpp&lt;BR /&gt;setUp() failed&lt;BR /&gt;- equality assertion failed&lt;BR /&gt;- Expected: 0&lt;BR /&gt;- Actual : 48&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Also got this error&lt;/P&gt;
&lt;P&gt;$pkcs11-tool --module /usr/local/lib/libp11sgx.so --init-token --label "ctk" --slot 0 --so-pin 1234 --init-pin --pin 1234&lt;/P&gt;
&lt;P&gt;error: PKCS11 function C_Initialize failed: rv = CKR_DEVICE_ERROR (0x30)&lt;BR /&gt;Aborting.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Any help on what I am missing will be appreciated.&lt;/P&gt;
&lt;P&gt;--Batsayan&lt;/P&gt;</description>
    <pubDate>Tue, 23 Mar 2021 11:25:22 GMT</pubDate>
    <dc:creator>das__batsayan</dc:creator>
    <dc:date>2021-03-23T11:25:22Z</dc:date>
    <item>
      <title>How to use crypto-api-toolkit in SIM mode</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1266910#M4395</link>
      <description>&lt;P&gt;I am using &lt;A href="https://github.com/intel/crypto-api-toolkit" target="_blank"&gt;https://github.com/intel/crypto-api-toolkit&lt;/A&gt; repo to learn PKCS#11, my current SGX_SDK version is 2.13 , on Ubuntu 18.04 &lt;BR /&gt;&lt;BR /&gt;I build the above using $ sh autogen.sh; $ ./configure; $ make SGX_MODE=SIM; $ sudo make install&lt;BR /&gt;&lt;BR /&gt;Question : Does the repo supports SIM mode build? In the above build I did not face any error message. &lt;BR /&gt;&lt;BR /&gt;Got following error when executing&lt;BR /&gt;&lt;BR /&gt;$./p11test&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;76) test: UnsupportedAPITests::testWaitForSlotEvent (F) line: 120 TestsNoPINInitBase.cpp&lt;BR /&gt;setUp() failed&lt;BR /&gt;- equality assertion failed&lt;BR /&gt;- Expected: 0&lt;BR /&gt;- Actual : 48&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;77) test: UnsupportedAPITests::testGetFunctionStatus (F) line: 120 TestsNoPINInitBase.cpp&lt;BR /&gt;setUp() failed&lt;BR /&gt;- equality assertion failed&lt;BR /&gt;- Expected: 0&lt;BR /&gt;- Actual : 48&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;78) test: UnsupportedAPITests::testCancelFunction (F) line: 120 TestsNoPINInitBase.cpp&lt;BR /&gt;setUp() failed&lt;BR /&gt;- equality assertion failed&lt;BR /&gt;- Expected: 0&lt;BR /&gt;- Actual : 48&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Also got this error&lt;/P&gt;
&lt;P&gt;$pkcs11-tool --module /usr/local/lib/libp11sgx.so --init-token --label "ctk" --slot 0 --so-pin 1234 --init-pin --pin 1234&lt;/P&gt;
&lt;P&gt;error: PKCS11 function C_Initialize failed: rv = CKR_DEVICE_ERROR (0x30)&lt;BR /&gt;Aborting.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Any help on what I am missing will be appreciated.&lt;/P&gt;
&lt;P&gt;--Batsayan&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 11:25:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1266910#M4395</guid>
      <dc:creator>das__batsayan</dc:creator>
      <dc:date>2021-03-23T11:25:22Z</dc:date>
    </item>
    <item>
      <title>Re:How to use crypto-api-toolkit in SIM mode</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1267101#M4401</link>
      <description>&lt;P&gt;Hello Batsayan,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The Crypto API Toolkit for Intel SGX &lt;I&gt;does not&lt;/I&gt; support Intel SGX Simulation mode. Refer to the &lt;A href="https://github.com/intel/crypto-api-toolkit#prerequisites" rel="noopener noreferrer" target="_blank"&gt;Prerequisites&lt;/A&gt; section for a full list of system and software requirements to run the Crypto API Toolkit.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&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>Wed, 24 Mar 2021 00:23:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1267101#M4401</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-03-24T00:23:24Z</dc:date>
    </item>
    <item>
      <title>Re:How to use crypto-api-toolkit in SIM mode</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1267123#M4402</link>
      <description>&lt;P&gt;Hello Batsayan,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I just received an update from engineering:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10.5pt;"&gt;Yes, Crypto API Toolkit will work in the simulation mode, but we have not explicitly enabled the Makefile for it (but we don’t test it).  We have to make changes manually."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10.5pt;"&gt;We will soon have a response for you on what needs to be done in the Makefile.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10.5pt;"&gt;Sincerely,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10.5pt;"&gt;Jesus G.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10.5pt;"&gt;Intel Customer Support&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Mar 2021 01:20:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1267123#M4402</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-03-24T01:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Re:How to use crypto-api-toolkit in SIM mode</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1267230#M4403</link>
      <description>&lt;P&gt;You can make the below change to enable simulation mode runs:&lt;/P&gt;
&lt;P&gt;In src/p11/trusted/Makefile.am&lt;/P&gt;
&lt;P&gt;&lt;U&gt;HW&lt;/U&gt;:&lt;/P&gt;
&lt;P&gt;-m64 -Wall -O2 -D_FORTIFY_SOURCE=2 -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -pie -L$(SGXSSLDIR)/lib64 -Wl,--whole-archive -lsgx_tsgxssl -Wl,--no-whole-archive -lsgx_tsgxssl_crypto -L$(SGXSDKDIR)/lib64 -Wl,--whole-archive &lt;STRONG&gt;-lsgx_trts&lt;/STRONG&gt; -Wl,--no-whole-archive -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -lsgx_tcrypto &lt;STRONG&gt;-lsgx_tservice&lt;/STRONG&gt; -lsgx_tprotected_fs -Wl,--end-group -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-pie,-eenclave_entry -Wl,--export-dynamic -Wl,--defsym,__ImageBase=0 -Wpragmas -Wl,-soname -Wl,libp11SgxEnclave.so.0 -o .libs/libp11SgxEnclave.so.0.0.0&lt;/P&gt;
&lt;P&gt;&lt;U&gt;SIM&lt;/U&gt;:&lt;/P&gt;
&lt;P&gt;-m64 -Wall -O2 -D_FORTIFY_SOURCE=2 -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -pie -L$(SGXSSLDIR)/lib64 -Wl,--whole-archive -lsgx_tsgxssl -Wl,--no-whole-archive -lsgx_tsgxssl_crypto -L$(SGXSDKDIR)/lib64 -Wl,--whole-archive &lt;STRONG&gt;-lsgx_trts_sim&lt;/STRONG&gt; -Wl,--no-whole-archive -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -lsgx_tcrypto &lt;STRONG&gt;-lsgx_tservice_sim&lt;/STRONG&gt; -lsgx_tprotected_fs -Wl,--end-group -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-pie,-eenclave_entry -Wl,--export-dynamic -Wl,--defsym,__ImageBase=0 -Wpragmas -Wl,-soname -Wl,libp11SgxEnclave.so.0 -o .libs/libp11SgxEnclave.so.0.0.0&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 07:17:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1267230#M4403</guid>
      <dc:creator>Sankar_V</dc:creator>
      <dc:date>2021-03-24T07:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Re:How to use crypto-api-toolkit in SIM mode</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1267294#M4405</link>
      <description>&lt;P&gt;&lt;BR /&gt;What I did&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;git clone &lt;A href="https://github.com/intel/crypto-api-toolkit" target="_blank"&gt;https://github.com/intel/crypto-api-toolkit&lt;/A&gt;&lt;BR /&gt;cd crypto-api-toolkit&lt;BR /&gt;changed src/p11/trusted/Makefile.am for SIM as suggested above&lt;BR /&gt;sh autogen.sh&lt;BR /&gt;make SGX_MODE=SIM&lt;BR /&gt;sudo make install&lt;BR /&gt;cd src/test&lt;BR /&gt;./p11test&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;$ ./p11test &lt;BR /&gt;.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;!!!FAILURES!!!&lt;BR /&gt;Test Results:&lt;BR /&gt;Run: 78 Failures: 78 Errors: 0&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;1) test: SymmetricAlgorithmTests::testAesEncryptDecrypt (F) line: 120 TestsNoPINInitBase.cpp&lt;BR /&gt;setUp() failed&lt;BR /&gt;- equality assertion failed&lt;BR /&gt;- Expected: 0&lt;BR /&gt;- Actual : 48&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2) test: SymmetricAlgorithmTests::testAesWrapUnwrap (F) line: 120 TestsNoPINInitBase.cpp&lt;BR /&gt;setUp() failed&lt;BR /&gt;- equality assertion failed&lt;BR /&gt;- Expected: 0&lt;BR /&gt;- Actual : 48&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 10:48:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1267294#M4405</guid>
      <dc:creator>das__batsayan</dc:creator>
      <dc:date>2021-03-24T10:48:50Z</dc:date>
    </item>
    <item>
      <title>Re:How to use crypto-api-toolkit in SIM mode</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1267886#M4408</link>
      <description>&lt;P&gt;Hello Batsayan,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I reproduced your issue. Engineering is investigating this issue. We will respond to this thread as soon as we have an update.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&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>Thu, 25 Mar 2021 18:32:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1267886#M4408</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-03-25T18:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Re:How to use crypto-api-toolkit in SIM mode</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1268136#M4413</link>
      <description>&lt;P&gt;In addition to the other file, please also make the below change in src/p11/untrusted/Makefile.am&lt;/P&gt;
&lt;P&gt;HW:&lt;BR /&gt;-AM_LDFLAGS = -L$(SGXSSLDIR)/lib64 -lsgx_usgxssl -L$(SGXSDKDIR)/lib64 $(DCAP_LIB) -lsgx_urts -lsgx_uprotected_fs \&lt;/P&gt;
&lt;P&gt;SIM:&lt;BR /&gt;+AM_LDFLAGS = -L$(SGXSSLDIR)/lib64 -lsgx_usgxssl -L$(SGXSDKDIR)/lib64 $(DCAP_LIB) -lsgx_urts_sim -lsgx_uae_service_sim -lsgx_uprotected_fs \&lt;BR /&gt;&lt;BR /&gt;And, please also delete the /opt/intel/cryptoapitoolkit directory before you do a sudo make install. I just checked, and it worked.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 11:08:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1268136#M4413</guid>
      <dc:creator>Sankar_V</dc:creator>
      <dc:date>2021-03-26T11:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Re:How to use crypto-api-toolkit in SIM mode</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1268628#M4418</link>
      <description>&lt;P&gt;Thanks for quick reply, the SIM build issue is solved by the methods mentioned by you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Batsayan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 04:50:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1268628#M4418</guid>
      <dc:creator>das__batsayan</dc:creator>
      <dc:date>2021-03-29T04:50:45Z</dc:date>
    </item>
    <item>
      <title>Re:How to use crypto-api-toolkit in SIM mode</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1268984#M4420</link>
      <description>&lt;P&gt;&lt;B&gt;This thread has been marked as answered and Intel will no longer monitor 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>Mon, 29 Mar 2021 23:38:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/How-to-use-crypto-api-toolkit-in-SIM-mode/m-p/1268984#M4420</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-03-29T23:38:35Z</dc:date>
    </item>
  </channel>
</rss>

