Two_Steps_Sign_Enclave.htm 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!--------------------------------------------------------------------------->
  2. <!-- Copyright (c) 2016 Intel Corporation. -->
  3. <!-- -->
  4. <!-- All rights reserved. This program and the accompanying materials -->
  5. <!-- are made available under the terms of the Eclipse Public License v1.0 -->
  6. <!-- which accompanies this distribution, and is available at -->
  7. <!-- http://www.eclipse.org/legal/epl-v10.html -->
  8. <!-- -->
  9. <!-- Contributors: -->
  10. <!-- Intel Corporation - initial implementation and documentation -->
  11. <!--------------------------------------------------------------------------->
  12. <?xml version="1.0" encoding="utf-8"?>
  13. <html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="1991" MadCap:lastWidth="680">
  14. <head><title>Two Steps Sign Enclave</title>
  15. <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <h2>Two Steps Sign Enclave</h2>
  19. <p>To help you develop enclaves, Intel(R) Software Guard Extensions Eclipse Plug-in generates all required structure including:</p>
  20. <ul>
  21. <li>c/c++ files and header files</li>
  22. <li><code>.edl</code> file</li>
  23. <li><code>*.config.xml</code> file</li>
  24. <li>a sample Makefile</li>
  25. <li>a sample signing key</li>
  26. </ul>
  27. <p>While these structure might be appropriate for development and debugging, you need a 2-step process to integrate your own signing schema for generating production enclaves.</p>
  28. <ol>
  29. <li>Generate hash: the signer tool generates signing material from the unsigned compiled enclave and from the configuration file for the enclave. The signed material comes as an opaque sequence of bytes which are put in a file with extension <code>.hex</code>. This file is used with the external signing facility. You come back with a signature for the <code>.hex</code> file plus the public key of your signing facility, and proceed to Step 2.</li>
  30. <li>Generate signed enclaves : the signer tool generates the final signed enclave.</li>
  31. </ol>
  32. <p>To complete this task, provide the following input parameters:</p>
  33. <ul>
  34. <li>The unsigned enclave</li>
  35. <li>The configuration file</li>
  36. <li>The output file produced when you generate hash (the <code>.hex</code> file)</li>
  37. <li>The files produced by the external signing facility: the signature of the .hex file and public key for it</li>
  38. <li>The plugin checks if the input parameters are consistent:</li>
  39. <li>The <code>.hex</code> file matches the unsigned enclave and the configuration file,</li>
  40. <li>The signed material is verified with the public key</li>
  41. </ul>
  42. <p>If the parameters are consistenet, the production signed enclave is produced.</p>
  43. <div class="NoteCont">
  44. <p class="NoteTipHead">NOTE:</p>
  45. <p>If you generate signed enclave right after generating hash, you can only enter the parameters specific for generating signed enclave.</p>
  46. </div>
  47. <p>To use the two-step signing function, activate the configuration <b>SGX Hardware Release mode</b>. When this configuration is active, the compilation does not produce a signed enclave, as in the other SGX configurations; the process only produces unsigned enclaves.</p>
  48. <p>
  49. <img src="Resources/Images/Configure_SGX_Hardware_Release_Mode.png" />
  50. </p>
  51. <p class="figcap">Configure SGX Hardware Release Mode</p>
  52. <p>When you configure the plugin in the <b>SGX Hardware Release Mode</b>, you can see the <b>Generate Hash</b> and <b>Generate Signed Enclave</b> options through <b>Software Guard Extension Tools-&gt;Two Step Sign Enclave</b>.</p>
  53. <p>
  54. <img src="Resources/Images/Two_Step_Sign_Enclave_Menu.png" />
  55. </p>
  56. <p class="figcap">Two Step Sign Enclave Menu</p>
  57. </body>
  58. </html>