pqc/ntru_8h_source.html
travis-ci 7ab70a5d04 Lastest doxygen docs updated
travis build: 30
	commit: f76429b24b
	auto-pushed to gh-pages
2014-06-09 00:26:41 +00:00

193 lines
21 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>post quantum cryptography: ntru.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">post quantum cryptography
</div>
<div id="projectbrief">Highly optimized implementation of the NTRUEncrypt algorithm</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">ntru.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="ntru_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright (C) 2014 FH Bielefeld</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * This file is part of a FH Bielefeld project.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * This library is free software; you can redistribute it and/or</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * modify it under the terms of the GNU Lesser General Public</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * License as published by the Free Software Foundation; either</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * This library is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Lesser General Public License for more details.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * You should have received a copy of the GNU Lesser General Public</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * License along with this library; if not, write to the Free Software</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> * MA 02110-1301 USA</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#ifndef PUBLIC_NTRU_NTRU_H_</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#define PUBLIC_NTRU_NTRU_H_</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &lt;fmpz_poly.h&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &lt;fmpz.h&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="ntru_8h.html#a2f326c88fc033eca78a47ee8d387c592"> 39</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structntru__params.html">ntru_params</a> <a class="code" href="structntru__params.html">ntru_params</a>;</div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="ntru_8h.html#a63e2e3ee7db5274c6a3929edfc07c6c9"> 40</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structstring.html">string</a> <a class="code" href="structstring.html">string</a>;</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="structntru__params.html"> 47</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structntru__params.html">ntru_params</a> {</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structntru__params.html#afb8425ee3db2b917b3c4e8d9b75bd3ff"> 52</a></span>&#160; uint32_t <a class="code" href="structntru__params.html#afb8425ee3db2b917b3c4e8d9b75bd3ff">N</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structntru__params.html#a29680750bda49dc93e61a752b2f2a0f7"> 56</a></span>&#160; uint32_t <a class="code" href="structntru__params.html#a29680750bda49dc93e61a752b2f2a0f7">q</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="structntru__params.html#a41b368825e1eb126604e13e8f549ec8f"> 60</a></span>&#160; uint32_t <a class="code" href="structntru__params.html#a41b368825e1eb126604e13e8f549ec8f">p</a>;</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;};</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="structstring.html"> 66</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structstring.html">string</a> {</div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="structstring.html#aa1b2f3a2ddd1ed38245b8d4590aadf93"> 74</a></span>&#160; <span class="keywordtype">char</span> *<a class="code" href="structstring.html#aa1b2f3a2ddd1ed38245b8d4590aadf93">ptr</a>;</div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="structstring.html#aa6bcf0353fd5cf2f374a9b1dd0e4a73a"> 78</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structstring.html#aa6bcf0353fd5cf2f374a9b1dd0e4a73a">len</a>;</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;};</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<a class="code" href="ntru_8h.html#a55d4ce182c335ff6cca360909a7be395">prints</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> *print_string);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;<a class="code" href="ntru_8h.html#ac1b5f66fbbbdfc7901357ddcfec52e5a">string_delete</a>(<span class="keywordtype">string</span> *del_string);</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;<a class="code" href="ntru_8h.html#a20f86085d5eb5372fd25dc270069d38c">poly_new</a>(fmpz_poly_t new_poly,</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keywordtype">int</span> <span class="keyword">const</span> * <span class="keyword">const</span> c,</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> len);</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;<a class="code" href="ntru_8h.html#a27ff2116f70bcbf5028219adcae4c5f0">poly_delete</a>(fmpz_poly_t poly);</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;<a class="code" href="ntru_8h.html#a3f53c63383ff301b20dcede0783869a7">poly_delete_array</a>(fmpz_poly_t **poly_array);</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;<a class="code" href="ntru_8h.html#a83297bc2ab5b6e7ce42553570dd8268f">poly_delete_all</a>(fmpz_poly_t poly, ...);</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;<a class="code" href="ntru_8h.html#a80a8ce0f2944bc3df94291ef2f781498">poly_draw</a>(<span class="keyword">const</span> fmpz_poly_t poly);</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;<a class="code" href="ntru_8h.html#aec098d00160d2d502eb1f8a7c3fa5453">poly_draw_pretty</a>(<span class="keyword">const</span> fmpz_poly_t poly);</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;<span class="keywordtype">string</span> *</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;<a class="code" href="ntru_8h.html#a348c2a56837571f410d44631abc09dc4">read_file</a>(<span class="keywordtype">char</span> <span class="keyword">const</span> * <span class="keyword">const</span> filename);</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;<a class="code" href="ntru_8h.html#af2a0fc4dd4109749d8f3100a913cc304">write_file</a>(<span class="keywordtype">string</span> <span class="keyword">const</span> *wstring, <span class="keywordtype">char</span> <span class="keyword">const</span> * <span class="keyword">const</span> filename);</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* NTRU_NTRU_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="ntru_8h_html_ac1b5f66fbbbdfc7901357ddcfec52e5a"><div class="ttname"><a href="ntru_8h.html#ac1b5f66fbbbdfc7901357ddcfec52e5a">string_delete</a></div><div class="ttdeci">void string_delete(string *del_string)</div></div>
<div class="ttc" id="ntru_8h_html_a20f86085d5eb5372fd25dc270069d38c"><div class="ttname"><a href="ntru_8h.html#a20f86085d5eb5372fd25dc270069d38c">poly_new</a></div><div class="ttdeci">void poly_new(fmpz_poly_t new_poly, int const *const c, const size_t len)</div></div>
<div class="ttc" id="structstring_html_aa6bcf0353fd5cf2f374a9b1dd0e4a73a"><div class="ttname"><a href="structstring.html#aa6bcf0353fd5cf2f374a9b1dd0e4a73a">string::len</a></div><div class="ttdeci">size_t len</div><div class="ttdef"><b>Definition:</b> <a href="ntru_8h_source.html#l00078">ntru.h:78</a></div></div>
<div class="ttc" id="structstring_html_aa1b2f3a2ddd1ed38245b8d4590aadf93"><div class="ttname"><a href="structstring.html#aa1b2f3a2ddd1ed38245b8d4590aadf93">string::ptr</a></div><div class="ttdeci">char * ptr</div><div class="ttdef"><b>Definition:</b> <a href="ntru_8h_source.html#l00074">ntru.h:74</a></div></div>
<div class="ttc" id="ntru_8h_html_a3f53c63383ff301b20dcede0783869a7"><div class="ttname"><a href="ntru_8h.html#a3f53c63383ff301b20dcede0783869a7">poly_delete_array</a></div><div class="ttdeci">void poly_delete_array(fmpz_poly_t **poly_array)</div></div>
<div class="ttc" id="structntru__params_html_afb8425ee3db2b917b3c4e8d9b75bd3ff"><div class="ttname"><a href="structntru__params.html#afb8425ee3db2b917b3c4e8d9b75bd3ff">ntru_params::N</a></div><div class="ttdeci">uint32_t N</div><div class="ttdef"><b>Definition:</b> <a href="ntru_8h_source.html#l00052">ntru.h:52</a></div></div>
<div class="ttc" id="ntru_8h_html_a80a8ce0f2944bc3df94291ef2f781498"><div class="ttname"><a href="ntru_8h.html#a80a8ce0f2944bc3df94291ef2f781498">poly_draw</a></div><div class="ttdeci">void poly_draw(const fmpz_poly_t poly)</div></div>
<div class="ttc" id="ntru_8h_html_a83297bc2ab5b6e7ce42553570dd8268f"><div class="ttname"><a href="ntru_8h.html#a83297bc2ab5b6e7ce42553570dd8268f">poly_delete_all</a></div><div class="ttdeci">void poly_delete_all(fmpz_poly_t poly,...)</div></div>
<div class="ttc" id="structntru__params_html_a41b368825e1eb126604e13e8f549ec8f"><div class="ttname"><a href="structntru__params.html#a41b368825e1eb126604e13e8f549ec8f">ntru_params::p</a></div><div class="ttdeci">uint32_t p</div><div class="ttdef"><b>Definition:</b> <a href="ntru_8h_source.html#l00060">ntru.h:60</a></div></div>
<div class="ttc" id="structntru__params_html"><div class="ttname"><a href="structntru__params.html">ntru_params</a></div><div class="ttdef"><b>Definition:</b> <a href="ntru_8h_source.html#l00047">ntru.h:47</a></div></div>
<div class="ttc" id="ntru_8h_html_af2a0fc4dd4109749d8f3100a913cc304"><div class="ttname"><a href="ntru_8h.html#af2a0fc4dd4109749d8f3100a913cc304">write_file</a></div><div class="ttdeci">void write_file(string const *wstring, char const *const filename)</div></div>
<div class="ttc" id="ntru_8h_html_a55d4ce182c335ff6cca360909a7be395"><div class="ttname"><a href="ntru_8h.html#a55d4ce182c335ff6cca360909a7be395">prints</a></div><div class="ttdeci">void prints(const string *print_string)</div></div>
<div class="ttc" id="structstring_html"><div class="ttname"><a href="structstring.html">string</a></div><div class="ttdef"><b>Definition:</b> <a href="ntru_8h_source.html#l00066">ntru.h:66</a></div></div>
<div class="ttc" id="structntru__params_html_a29680750bda49dc93e61a752b2f2a0f7"><div class="ttname"><a href="structntru__params.html#a29680750bda49dc93e61a752b2f2a0f7">ntru_params::q</a></div><div class="ttdeci">uint32_t q</div><div class="ttdef"><b>Definition:</b> <a href="ntru_8h_source.html#l00056">ntru.h:56</a></div></div>
<div class="ttc" id="ntru_8h_html_a348c2a56837571f410d44631abc09dc4"><div class="ttname"><a href="ntru_8h.html#a348c2a56837571f410d44631abc09dc4">read_file</a></div><div class="ttdeci">string * read_file(char const *const filename)</div></div>
<div class="ttc" id="ntru_8h_html_a27ff2116f70bcbf5028219adcae4c5f0"><div class="ttname"><a href="ntru_8h.html#a27ff2116f70bcbf5028219adcae4c5f0">poly_delete</a></div><div class="ttdeci">void poly_delete(fmpz_poly_t poly)</div></div>
<div class="ttc" id="ntru_8h_html_aec098d00160d2d502eb1f8a7c3fa5453"><div class="ttname"><a href="ntru_8h.html#aec098d00160d2d502eb1f8a7c3fa5453">poly_draw_pretty</a></div><div class="ttdeci">void poly_draw_pretty(const fmpz_poly_t poly)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Jun 9 2014 00:26:38 for post quantum cryptography by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.7
</small></address>
</body>
</html>