• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!-- HTML header for doxygen 1.8.10-->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6<meta http-equiv="X-UA-Compatible" content="IE=9"/>
7<meta name="generator" content="Doxygen 1.8.14"/>
8<title>Intel&reg; Enhanced Privacy ID SDK: Building from Source</title>
9<link href="tabs.css" rel="stylesheet" type="text/css"/>
10<script type="text/javascript" src="jquery.js"></script>
11<script type="text/javascript" src="dynsections.js"></script>
12<link href="navtree.css" rel="stylesheet" type="text/css"/>
13<script type="text/javascript" src="resize.js"></script>
14<script type="text/javascript" src="navtreedata.js"></script>
15<script type="text/javascript" src="navtree.js"></script>
16<script type="text/javascript">
17/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
18  $(document).ready(initResizable);
19/* @license-end */</script>
20<link href="doxygen.css" rel="stylesheet" type="text/css" />
21<link href="epidstyle.css" rel="stylesheet" type="text/css"/>
22</head>
23<body>
24<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
25<div id="titlearea">
26<table cellspacing="0" cellpadding="0">
27 <tbody>
28 <tr style="height: 56px;">
29  <td id="projectalign" style="padding-left: 0.5em;">
30   <div id="projectname"><a
31                            onclick="storeLink('index.html')"
32                            id="projectlink"
33                            class="index.html"
34                            href="index.html">Intel&reg; Enhanced Privacy ID SDK</a>
35&#160;<span id="projectnumber">6.0.1</span>
36</div>
37  </td>
38 </tr>
39 </tbody>
40</table>
41</div>
42<!-- end header part -->
43<!-- Generated by Doxygen 1.8.14 -->
44</div><!-- top -->
45<div id="side-nav" class="ui-resizable side-nav-resizable">
46  <div id="nav-tree">
47    <div id="nav-tree-contents">
48      <div id="nav-sync" class="sync"></div>
49    </div>
50  </div>
51  <div id="splitbar" style="-moz-user-select:none;"
52       class="ui-resizable-handle">
53  </div>
54</div>
55<script type="text/javascript">
56/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
57$(document).ready(function(){initNavTree('_building_sdk.html','');});
58/* @license-end */
59</script>
60<div id="doc-content">
61<div class="header">
62  <div class="headertitle">
63<div class="title">Building from Source </div>  </div>
64</div><!--header-->
65<div class="contents">
66<div class="toc"><h3>Table of Contents</h3>
67<ul><li class="level1"><a href="#BuildingSdk_Prerequisites">Prerequisites</a></li>
68<li class="level1"><a href="#BuildingSdk_Building_SCons">Building SDK with SCons</a></li>
69<li class="level1"><a href="#BuildingSdk_Building_Makefile">Alternate Makefile Based Build Approach</a></li>
70<li class="level1"><a href="#BuildingSdk_CommercialIpp">Improving Performance with Commercial IPP</a></li>
71<li class="level1"><a href="#BuildingSdk_Tiny">Optimizing for Code Size</a><ul><li class="level2"><a href="#implementation_TinyLimitations">Limitations</a></li>
72</ul>
73</li>
74<li class="level1"><a href="#BuildingSdk_Examples">Example Programs</a></li>
75<li class="level1"><a href="#BuildingSdk_PortingBuildSystem">Building with Other Build Systems</a></li>
76</ul>
77</div>
78<div class="textblock"><p>To use the SDK in a project, the code from the SDK must be included in that project. The easiest way to do this is to link to static libraries. The SDK comes with build scripts to build static libraries for common environments.</p>
79<h1><a class="anchor" id="BuildingSdk_Prerequisites"></a>
80Prerequisites</h1>
81<p>Building SDK code out of the box requires a number of tools. This section lists the tools used to build the SDK.</p>
82<p>For more information on how to install these tools, refer to <a class="el" href="_build_tools_installation.html">Guide to Installing Build Tools</a>.</p>
83<p>For a list of compilers and libraries that the SDK was validated on, refer to <a class="el" href="_how_validated.html#validated_supported_compilers">Tested Libraries and Compilers</a>.</p>
84<table class="markdownTable">
85<tr class="markdownTableHead">
86<th class="markdownTableHeadNone">Prerequisite  </th><th class="markdownTableHeadNone">Notes -----------------------------&mdash;   </th></tr>
87<tr class="markdownTableBody" class="markdownTableRowOdd">
88<td class="markdownTableBodyNone">A C/C++ compiler  </td><td class="markdownTableBodyNone">Core code in C. Unit tests need C++11 support.   </td></tr>
89<tr class="markdownTableBody" class="markdownTableRowEven">
90<td class="markdownTableBodyNone"><a href="http://www.python.org">Python</a>  </td><td class="markdownTableBodyNone">Validated with v2.7.12   </td></tr>
91<tr class="markdownTableBody" class="markdownTableRowOdd">
92<td class="markdownTableBodyNone"><a href="http://www.scons.org">SCons</a>  </td><td class="markdownTableBodyNone">Validated with v2.4.1   </td></tr>
93<tr class="markdownTableBody" class="markdownTableRowEven">
94<td class="markdownTableBodyNone"><a href="https://bitbucket.org/sconsparts/parts">Parts</a>  </td><td class="markdownTableBodyNone">0.11.0 or later   </td></tr>
95</table>
96<h1><a class="anchor" id="BuildingSdk_Building_SCons"></a>
97Building SDK with SCons</h1>
98<p>To use the SDK, you need to build it to generate libraries compatible with your build environment.</p>
99<p>To build based on the default SConstruct file in the root directory of the SDK, invoke scons with no arguments. </p><pre class="fragment">cd &lt;path/to/sdk-root&gt;
100scons
101</pre><p>By default, this performs a release build of the SDK with unit tests for the current platform and runs unit tests.</p>
102<p>To skip unit test execution when doing cross platform build use: </p><pre class="fragment">scons build:: utest::
103</pre><p>Built components appear in the <code>_install</code> directory of the SDK root.</p>
104<p>Potentially useful command line options:</p>
105<table class="markdownTable">
106<tr class="markdownTableHead">
107<th class="markdownTableHeadNone">Option  </th><th class="markdownTableHeadNone">Action -----------------------&mdash;   </th></tr>
108<tr class="markdownTableBody" class="markdownTableRowOdd">
109<td class="markdownTableBodyNone"><code>--cfg=debug</code>  </td><td class="markdownTableBodyNone">Build in debug mode   </td></tr>
110<tr class="markdownTableBody" class="markdownTableRowEven">
111<td class="markdownTableBodyNone"><code>--cfg=release</code>  </td><td class="markdownTableBodyNone">Build in release mode   </td></tr>
112<tr class="markdownTableBody" class="markdownTableRowOdd">
113<td class="markdownTableBodyNone"><code>--target=x86</code>  </td><td class="markdownTableBodyNone">Target x86 (i386) architecture   </td></tr>
114<tr class="markdownTableBody" class="markdownTableRowEven">
115<td class="markdownTableBodyNone"><code>--target=x86_64</code>  </td><td class="markdownTableBodyNone">Target x86-64 architecture   </td></tr>
116<tr class="markdownTableBody" class="markdownTableRowOdd">
117<td class="markdownTableBodyNone"><code>--target=arm</code>  </td><td class="markdownTableBodyNone">Target 32-bit ARM architecture   </td></tr>
118<tr class="markdownTableBody" class="markdownTableRowEven">
119<td class="markdownTableBodyNone"><code>--target=arm_hf</code>  </td><td class="markdownTableBodyNone">Target 32-bit ARM architecture with hard float ABI   </td></tr>
120<tr class="markdownTableBody" class="markdownTableRowOdd">
121<td class="markdownTableBodyNone"><code>--target=aarch64</code>  </td><td class="markdownTableBodyNone">Target AArch64 (64-bit ARM) architecture   </td></tr>
122<tr class="markdownTableBody" class="markdownTableRowEven">
123<td class="markdownTableBodyNone"><code>--tc=cl</code>  </td><td class="markdownTableBodyNone">Use MSVC to compile (Microsoft&reg;* C/C++ Compiler)   </td></tr>
124<tr class="markdownTableBody" class="markdownTableRowOdd">
125<td class="markdownTableBodyNone"><code>--tc=gcc</code>  </td><td class="markdownTableBodyNone">Use GCC to compile (GNU* Compiler Collection)   </td></tr>
126<tr class="markdownTableBody" class="markdownTableRowEven">
127<td class="markdownTableBodyNone"><code>--tc=icl,mstools</code>  </td><td class="markdownTableBodyNone">Use Intel&reg; C++ compiler for Windows   </td></tr>
128<tr class="markdownTableBody" class="markdownTableRowOdd">
129<td class="markdownTableBodyNone"><code>--tc=icc,gnutools</code>  </td><td class="markdownTableBodyNone">Use Intel&reg; C++ compiler for Linux   </td></tr>
130<tr class="markdownTableBody" class="markdownTableRowEven">
131<td class="markdownTableBodyNone"><code>build::</code>  </td><td class="markdownTableBodyNone">Build the SDK (does not build unit tests)   </td></tr>
132<tr class="markdownTableBody" class="markdownTableRowOdd">
133<td class="markdownTableBodyNone"><code>utest::</code>  </td><td class="markdownTableBodyNone">Build unit tests   </td></tr>
134<tr class="markdownTableBody" class="markdownTableRowEven">
135<td class="markdownTableBodyNone"><code>run_utest::</code>  </td><td class="markdownTableBodyNone">Run unit tests (builds tests if needed)   </td></tr>
136<tr class="markdownTableBody" class="markdownTableRowOdd">
137<td class="markdownTableBodyNone"><code>-c</code>  </td><td class="markdownTableBodyNone">Clean the build   </td></tr>
138<tr class="markdownTableBody" class="markdownTableRowEven">
139<td class="markdownTableBodyNone"><code>-j N</code> or <code>--jobs=N</code>  </td><td class="markdownTableBodyNone">Allow N jobs at once   </td></tr>
140</table>
141<h1><a class="anchor" id="BuildingSdk_Building_Makefile"></a>
142Alternate Makefile Based Build Approach</h1>
143<p>You can build with the <code>make</code> command on platforms that support Make/Autoconf.</p>
144<p>In the root directory of the SDK, run: </p><pre class="fragment">./configure
145make all
146make check
147make install
148</pre><p><code>./configure</code> sets up the default settings:</p>
149<ul>
150<li>The default compilers are GCC/G++. You can specify compilers via the CC and CXX variables. For example, <code>./configure CC=/opt/intel/bin/icc CXX=/opt/intel/bin/icpc</code></li>
151<li>The default installation directory is <code>./_install</code>. You can specify the installation directory by using <code>./configure --prefix=/usr/local/epid_install</code></li>
152<li>The default target matches the current environment. You may change it with the CFLAGS parameter. For example, <code>./configure CFLAGS=-m32</code> when run on x86_64 environment configures compilation to target x86.</li>
153</ul>
154<p><code>make check</code> is optional. It builds and runs the unit tests.</p>
155<p>Alternatively, you can use <code>make build</code> as a shortcut to replace <code>make all</code>, <code>make check</code>, and <code>make install</code>.</p>
156<p>To run N jobs at once use the <code>-j N</code> or <code>--jobs=N</code> option with the <code>make</code> command, e.g. <code>make all -j 4</code> will allow make to create 4 jobs at once.</p>
157<p>To clean the build, run <code>make clean</code>.</p>
158<p>To remove the install directory, run <code>make uninstall</code>.</p>
159<p>To configure cross compilation use <code>--host</code> option. For example, <code>./configure --host=arm-linux-gnueabi</code> configures cross compilation build targeting ARM architecture. Cross compiled tests will not run on the build machine so <code>make check</code> should be replaced to <code>make utest</code>. A typical build sequence for cross compilation is as follows: </p><pre class="fragment">./configure --host=&lt;target system&gt;
160make all
161make utest
162make install
163</pre><h1><a class="anchor" id="BuildingSdk_CommercialIpp"></a>
164Improving Performance with Commercial IPP</h1>
165<p>For higher performance, you can use the commercial version of Cryptography for Intel&reg; Integrated Performance Primitives, available at <a href="https://software.intel.com/get-ipp-cryptography-libraries">https://software.intel.com/get-ipp-cryptography-libraries</a>.</p>
166<dl class="section note"><dt>Note</dt><dd>The SDK has been validated with version 2018 (Update 2.1) of the cryptography library.</dd></dl>
167<p>To build the SDK using a commercial Intel&reg; IPP installation, the <code>IPPCRYPTOROOT</code> environment variable must be properly configured to point to the IPP installation directory, as described in <em>Setting Environment Variables</em> in the <a href="https://software.intel.com/ipp-crypto-dev-guide-setting-environment-variables">Intel&reg; IPP Crypto Developer Guide</a>.</p>
168<p>Once the environment is configured, you can build using commercial IPP by specifying <code>--use-commercial-ipp</code> as a command line option.</p>
169<h1><a class="anchor" id="BuildingSdk_Tiny"></a>
170Optimizing for Code Size</h1>
171<p>To build the SDK with a member with substantially reduced code size, you can use tiny mode.</p>
172<p>To build with SCons, go to the root directory of the SDK and run: </p><pre class="fragment">scons --prod-var=tiny
173</pre><p>To build with Make, go to the root directory of the SDK and run: </p><pre class="fragment">./configure --enable-tiny
174make all
175make check
176make install
177</pre><h2><a class="anchor" id="implementation_TinyLimitations"></a>
178Limitations</h2>
179<p>By design, a member built in tiny mode has the following limitations:</p>
180<ul>
181<li>TPM mode is not supported.</li>
182<li>Only SHA-256 and SHA-512 are supported.</li>
183<li>Signature pre-computation is not supported.</li>
184<li>Compressed keys are not supported.</li>
185<li>Commercial IPP cannot be used.</li>
186<li>The implementation prioritizes size over performance.</li>
187</ul>
188<h1><a class="anchor" id="BuildingSdk_Examples"></a>
189Example Programs</h1>
190<p>The SDK includes several examples that show you different aspects of how the Intel&reg; EPID scheme works. In the SDK build, these examples are located in <code>_install/epid-sdk/example</code>.</p>
191<table class="markdownTable">
192<tr class="markdownTableHead">
193<th class="markdownTableHeadNone">Name  </th><th class="markdownTableHeadNone">Description ----------&mdash;   </th></tr>
194<tr class="markdownTableBody" class="markdownTableRowOdd">
195<td class="markdownTableBodyNone"><code>signmsg</code>  </td><td class="markdownTableBodyNone">Create Intel&reg; EPID signature of message   </td></tr>
196<tr class="markdownTableBody" class="markdownTableRowEven">
197<td class="markdownTableBodyNone"><code>verifysig</code>  </td><td class="markdownTableBodyNone">Verify signature is from a group member in good standing   </td></tr>
198</table>
199<h1><a class="anchor" id="BuildingSdk_PortingBuildSystem"></a>
200Building with Other Build Systems</h1>
201<p>It is relatively straightforward to port the SDK to your build system of choice. The following dependency diagram shows the relationship between components and the sources used to build them.</p>
202<div class="image">
203<img src="basicdoc.png" alt="basicdoc.png"/>
204</div>
205<p><br />
206</p>
207<p>*Other names and brands may be claimed as the property of others. </p>
208</div></div><!-- contents -->
209</div><!-- doc-content -->
210<!-- HTML footer for doxygen 1.8.10-->
211<!-- start footer part -->
212<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
213  <ul>
214    <li class="footer">
215      &copy; 2016-2017 Intel Corporation
216    </li>
217  </ul>
218</div>
219</body>
220</html>
221