Compare commits

..

No commits in common. "master" and "gh-pages" have entirely different histories.

199 changed files with 7904 additions and 9585 deletions

48
.gitignore vendored
View File

@ -1,48 +0,0 @@
# doxygen
html/
latex/
# source
*.so*
*.la
*.a
*.o
*.d
# junk
blah.txt
core
html.zip
priv.key
pub.key
.ycm_extra_conf.py
.ycm_extra_conf.pyc
*.orig
vgcore*
core
tags
src/priv*
src/pub*
testfiles/
install/
*.png
*.ods
*.pdf
*.dec
*.enc
tests/test-file.out
tests/ntru_cunit
# tmp files
*~
*.swp
*.swo
# currently masked
src/main.c
src/main
./.settings/org.eclipse*
.project

View File

@ -1,36 +0,0 @@
language: c
compiler: clang
env:
global:
secure: "BB9eiRNXC1PfNRLEifc0yQQZnM25zqaWNGVWN+atzT+NkxhVKyVr8+DoyPYaa8tOKybuSZhVkKnIiCd8iGMe3v+WyuHKFuhdiwdnEQhxbBlUCb9dDLEexI+J8QiYwC8AW/t6H9LWVwSka0RI3GJujJ8HKIBzW45I/j+1NlUte8U="
before_script:
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/usr/local/lib"
- sudo apt-get install -qq libgmp-dev libmpfr-dev doxygen graphviz cmake libcunit1 libcunit1-dev
- sudo apt-get remove doxygen
- wget http://www.flintlib.org/flint-2.4.3.tar.gz
- tar -xzf flint-2.4.3.tar.gz
- cd flint-2.4.3
- ./configure --prefix=/usr --with-gmp=/usr --with-mpfr=/usr CC=gcc CXX=g++
- make
- sudo make install
- cd ..
- wget http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.7.src.tar.gz
- tar -xzf doxygen-1.8.7.src.tar.gz
- cd doxygen-1.8.7
- ./configure
- make
- sudo make install
- cd ..
- wget http://dev.gentoo.org/~ryao/dist/lz4-0_p106.tar.xz
- tar -xJf lz4-0_p106.tar.xz
- cd lz4-0_p106/cmake
- cmake -DBUILD_LIBS=ON -DBUILD_SHARED_LIBS=ON .
- make
- sudo make install
- cd ../..
script:
- make CC=clang
- make CC=clang check
- make doc
after_script:
- ./update-gh-pages.sh

502
COPYING
View File

@ -1,502 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@ -1,42 +0,0 @@
# Hacking
## Coding style
This is more or less kernel coding style, but the light version, see
https://www.kernel.org/doc/Documentation/CodingStyle for a general idea.
Usually you are good to go if you just match the surroundings, but here
are some more details...
### Random rules:
* english only
* no CamelCase
* opening braces for functions are placed on the next line, opening braces for non-functions (such as loops) are placed on the same line
* if all conditions of an if, else if, else clause only have one line of instructions, then we omit the scope-operators {...}
* spaces around stuff like =, +, - etc, as well as keywords (like while, for etc), but not around function names
* no C99-style comments like // foo
* 80 char limit
* no trailing white spaces
* no implicit function declarations, even for static functions
### Differences to kernel coding style:
* fine to use tabs with 4 characters instead of 8 (but never whitespaces)
* newline after return type
## Comments
* comments are in doxygen format
* all functions, all data types, all macros, all typedefs... basically everything
* comments usually at declaration, not definition (structs are an exception for example)
## Good practices
* use const modifiers whenever possible, especially on function parameters
* if unsure whether to make a function static or not, make it static first
* use unsigned ints instead of signed ints whenever possible
## How to contribute
* pull request on github
* email with pull request
* email with patch

View File

@ -1,38 +0,0 @@
include common.mk
all:
$(MAKE) -C src
main:
$(MAKE) -C src main
install:
$(MAKE) -C src install
$(MAKE) -C include install
uninstall:
$(MAKE) -C src uninstall
$(MAKE) -C include uninstall
check:
$(MAKE) -C tests check
test:
$(MAKE) -C tests check
clean:
$(MAKE) -C include clean
$(MAKE) -C src clean
$(MAKE) -C tests clean
doc:
$(MAKE) -C include doc
$(MAKE) -C src doc
doc-pdf: doc
$(MAKE) -C include doc-pdf
$(MAKE) -C src doc-pdf
.PHONY: clean doc doc-pdf install

View File

@ -1,34 +0,0 @@
# Fun C implementation of NTRUEncrypt
Don't use this for any serious purpose, really. This is a fun
implementation with the primary goal of learning.
## Building
### Dependencies
* FLINT (compiled with gmp and mpfr)
* glib-2.0
* lz4 (https://code.google.com/p/lz4)
* cunit (for the tests only)
* doxygen (for the documentation only)
* pkgconfig (for the build only)
### Compiling the library
Run ```make``` to build.
### Running the tests
Run ```make check``` to run the test suite.
### Installing the library
Run ```make install``` to install.
### Building the documentation
Run ```make doc ```. The result will be in the doxygen/html/ subfolder.
### Build Status
[![Build Status](https://travis-ci.org/hasufell/pqc.png)](https://travis-ci.org/hasufell/pqc)

103
annotated.html Normal file
View File

@ -0,0 +1,103 @@
<!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: Data Structures</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 class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><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 class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
<li><a href="functions.html"><span>Data&#160;Fields</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">Data Structures</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
<table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structkeypair.html" target="_self">keypair</a></td><td class="desc"></td></tr>
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structntru__params.html" target="_self">ntru_params</a></td><td class="desc"></td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structstring.html" target="_self">string</a></td><td class="desc"></td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

BIN
bc_s.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

BIN
bdwn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

107
classes.html Normal file
View File

@ -0,0 +1,107 @@
<!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: Data Structure Index</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 class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><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="annotated.html"><span>Data&#160;Structures</span></a></li>
<li class="current"><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
<li><a href="functions.html"><span>Data&#160;Fields</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">Data Structure Index</div> </div>
</div><!--header-->
<div class="contents">
<div class="qindex"><a class="qindex" href="#letter_K">K</a>&#160;|&#160;<a class="qindex" href="#letter_N">N</a>&#160;|&#160;<a class="qindex" href="#letter_S">S</a></div>
<table style="margin: 10px; white-space: nowrap;" align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
<tr><td rowspan="2" valign="bottom"><a name="letter_k"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;k&#160;&#160;</div></td></tr></table>
</td><td rowspan="2" valign="bottom"><a name="letter_n"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;n&#160;&#160;</div></td></tr></table>
</td><td rowspan="2" valign="bottom"><a name="letter_s"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;s&#160;&#160;</div></td></tr></table>
</td><td></td></tr>
<tr><td></td></tr>
<tr><td valign="top"><a class="el" href="structkeypair.html">keypair</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="structntru__params.html">ntru_params</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="structstring.html">string</a>&#160;&#160;&#160;</td><td></td></tr>
<tr><td></td><td></td><td></td><td></td></tr>
</table>
<div class="qindex"><a class="qindex" href="#letter_K">K</a>&#160;|&#160;<a class="qindex" href="#letter_N">N</a>&#160;|&#160;<a class="qindex" href="#letter_S">S</a></div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

BIN
closed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

View File

@ -1,23 +0,0 @@
# compiler, tools
CC = $(shell type -P clang || echo gcc)
PKG_CONFIG ?= pkg-config
# flags
CFLAGS ?= -march=native -O2 -pipe
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror -Wno-unused-variable -Wno-unused-parameter -Wno-unused-function
ifeq ($(CC),gcc)
CFLAGS += -Wno-unused-but-set-variable
endif
LDFLAGS ?= -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu
# install/uninstall variables
RM = rm
LN_S = ln -s
INSTALL = install
INSTALL_BIN = install -m755
INSTALL_DIR = install -d
PREFIX = /usr/local
LIBDIR = lib64
INSTALL_BINDIR = $(PREFIX)/bin
INSTALL_LIBDIR = $(PREFIX)/$(LIBDIR)
INSTALL_INCLUDEDIR = $(PREFIX)/include/ntru

1440
doxygen.css Normal file

File diff suppressed because it is too large Load Diff

BIN
doxygen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

95
doxygen_8dox.html Normal file
View File

@ -0,0 +1,95 @@
<!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: doxygen.dox File Reference</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>
<!-- 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><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">doxygen.dox File Reference</div> </div>
</div><!--header-->
<div class="contents">
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

104
dynsections.js Normal file
View File

@ -0,0 +1,104 @@
function toggleVisibility(linkObj)
{
var base = $(linkObj).attr('id');
var summary = $('#'+base+'-summary');
var content = $('#'+base+'-content');
var trigger = $('#'+base+'-trigger');
var src=$(trigger).attr('src');
if (content.is(':visible')===true) {
content.hide();
summary.show();
$(linkObj).addClass('closed').removeClass('opened');
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
content.show();
summary.hide();
$(linkObj).removeClass('closed').addClass('opened');
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
}
return false;
}
function updateStripes()
{
$('table.directory tr').
removeClass('even').filter(':visible:even').addClass('even');
}
function toggleLevel(level)
{
$('table.directory tr').each(function() {
var l = this.id.split('_').length-1;
var i = $('#img'+this.id.substring(3));
var a = $('#arr'+this.id.substring(3));
if (l<level+1) {
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
a.html('&#9660;');
$(this).show();
} else if (l==level+1) {
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
a.html('&#9658;');
$(this).show();
} else {
$(this).hide();
}
});
updateStripes();
}
function toggleFolder(id)
{
// the clicked row
var currentRow = $('#row_'+id);
// all rows after the clicked row
var rows = currentRow.nextAll("tr");
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
// only match elements AFTER this one (can't hide elements before)
var childRows = rows.filter(function() { return this.id.match(re); });
// first row is visible we are HIDING
if (childRows.filter(':first').is(':visible')===true) {
// replace down arrow by right arrow for current row
var currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
currentRowSpans.filter(".arrow").html('&#9658;');
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
} else { // we are SHOWING
// replace right arrow by down arrow for current row
var currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
currentRowSpans.filter(".arrow").html('&#9660;');
// replace down arrows by right arrows for child rows
var childRowsSpans = childRows.find("span");
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
childRowsSpans.filter(".arrow").html('&#9658;');
childRows.show(); //show all children
}
updateStripes();
}
function toggleInherit(id)
{
var rows = $('tr.inherit.'+id);
var img = $('tr.inherit_header.'+id+' img');
var src = $(img).attr('src');
if (rows.filter(':first').is(':visible')===true) {
rows.css('display','none');
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
rows.css('display','table-row'); // using show() causes jump in firefox
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
}
}
$(document).ready(function() {
$('.code,.codeRef').each(function() {
$(this).data('powertip',$('#'+$(this).attr('href').replace(/.*\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());
$(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });
});
});

104
files.html Normal file
View File

@ -0,0 +1,104 @@
<!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: File List</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 class="current"><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">File List</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory">
<table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a href="ntru_8h_source.html"><span class="icondoc"></span></a><a class="el" href="ntru_8h.html" target="_self">ntru.h</a></td><td class="desc">Public API, basic data types </td></tr>
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a href="ntru__decrypt_8h_source.html"><span class="icondoc"></span></a><a class="el" href="ntru__decrypt_8h.html" target="_self">ntru_decrypt.h</a></td><td class="desc">Public API, decryption </td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a href="ntru__encrypt_8h_source.html"><span class="icondoc"></span></a><a class="el" href="ntru__encrypt_8h.html" target="_self">ntru_encrypt.h</a></td><td class="desc">Public API, encryption </td></tr>
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a href="ntru__keypair_8h_source.html"><span class="icondoc"></span></a><a class="el" href="ntru__keypair_8h.html" target="_self">ntru_keypair.h</a></td><td class="desc">Public API, key handling </td></tr>
<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a href="ntru__rnd_8h_source.html"><span class="icondoc"></span></a><a class="el" href="ntru__rnd_8h.html" target="_self">ntru_rnd.h</a></td><td class="desc">Public API, random polynomials </td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

BIN
ftv2blank.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

BIN
ftv2doc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

BIN
ftv2folderclosed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

BIN
ftv2folderopen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

BIN
ftv2lastnode.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

BIN
ftv2link.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

BIN
ftv2mlastnode.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

BIN
ftv2mnode.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

BIN
ftv2node.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

BIN
ftv2plastnode.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

BIN
ftv2pnode.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

BIN
ftv2splitbar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

BIN
ftv2vertline.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

124
functions.html Normal file
View File

@ -0,0 +1,124 @@
<!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: Data Fields</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 class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><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="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
<li class="current"><a href="functions.html"><span>Data&#160;Fields</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li class="current"><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_vars.html"><span>Variables</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="contents">
<div class="textblock">Here is a list of all struct and union fields with links to the structures/unions they belong to:</div><ul>
<li>len
: <a class="el" href="structstring.html#aa6bcf0353fd5cf2f374a9b1dd0e4a73a">string</a>
</li>
<li>N
: <a class="el" href="structntru__params.html#afb8425ee3db2b917b3c4e8d9b75bd3ff">ntru_params</a>
</li>
<li>p
: <a class="el" href="structntru__params.html#a41b368825e1eb126604e13e8f549ec8f">ntru_params</a>
</li>
<li>priv
: <a class="el" href="structkeypair.html#a9e9805ad001216da53f2c57accb288e1">keypair</a>
</li>
<li>priv_inv
: <a class="el" href="structkeypair.html#a9e63f1d275b91c9d9716fb4069461799">keypair</a>
</li>
<li>ptr
: <a class="el" href="structstring.html#aa1b2f3a2ddd1ed38245b8d4590aadf93">string</a>
</li>
<li>pub
: <a class="el" href="structkeypair.html#afa635c70f233d0b7449b4a17513646c4">keypair</a>
</li>
<li>q
: <a class="el" href="structntru__params.html#a29680750bda49dc93e61a752b2f2a0f7">ntru_params</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

124
functions_vars.html Normal file
View File

@ -0,0 +1,124 @@
<!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: Data Fields - Variables</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 class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><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="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
<li class="current"><a href="functions.html"><span>Data&#160;Fields</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="functions.html"><span>All</span></a></li>
<li class="current"><a href="functions_vars.html"><span>Variables</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="contents">
&#160;<ul>
<li>len
: <a class="el" href="structstring.html#aa6bcf0353fd5cf2f374a9b1dd0e4a73a">string</a>
</li>
<li>N
: <a class="el" href="structntru__params.html#afb8425ee3db2b917b3c4e8d9b75bd3ff">ntru_params</a>
</li>
<li>p
: <a class="el" href="structntru__params.html#a41b368825e1eb126604e13e8f549ec8f">ntru_params</a>
</li>
<li>priv
: <a class="el" href="structkeypair.html#a9e9805ad001216da53f2c57accb288e1">keypair</a>
</li>
<li>priv_inv
: <a class="el" href="structkeypair.html#a9e63f1d275b91c9d9716fb4069461799">keypair</a>
</li>
<li>ptr
: <a class="el" href="structstring.html#aa1b2f3a2ddd1ed38245b8d4590aadf93">string</a>
</li>
<li>pub
: <a class="el" href="structkeypair.html#afa635c70f233d0b7449b4a17513646c4">keypair</a>
</li>
<li>q
: <a class="el" href="structntru__params.html#a29680750bda49dc93e61a752b2f2a0f7">ntru_params</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

172
globals.html Normal file
View File

@ -0,0 +1,172 @@
<!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: Globals</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 class="current"><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li class="current"><a href="globals.html"><span>All</span></a></li>
<li><a href="globals_func.html"><span>Functions</span></a></li>
<li><a href="globals_type.html"><span>Typedefs</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="contents">
<div class="textblock">Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:</div><ul>
<li>export_priv_key()
: <a class="el" href="ntru__keypair_8h.html#ab4fa7bc1bbfb224f02a5aa8c498d7107">ntru_keypair.h</a>
</li>
<li>export_public_key()
: <a class="el" href="ntru__keypair_8h.html#a4c1eb586b7b1c46d1a43147c88e0b25f">ntru_keypair.h</a>
</li>
<li>get_rnd_int()
: <a class="el" href="ntru__rnd_8h.html#ad85ebfb1cb4b4942942213b750812cf0">ntru_rnd.h</a>
</li>
<li>get_urnd_int()
: <a class="el" href="ntru__rnd_8h.html#a99e4820cab7157eb1e16109e21dac81f">ntru_rnd.h</a>
</li>
<li>import_priv_key()
: <a class="el" href="ntru__keypair_8h.html#a0d387f6329b9bf79e4f9e8286a5d3337">ntru_keypair.h</a>
</li>
<li>import_public_key()
: <a class="el" href="ntru__keypair_8h.html#a9fedb1c2bbcec20c67244e91987a7a77">ntru_keypair.h</a>
</li>
<li>keypair
: <a class="el" href="ntru__keypair_8h.html#aacfc9254c7939584924ab9d27ba6f504">ntru_keypair.h</a>
</li>
<li>ntru_create_keypair()
: <a class="el" href="ntru__keypair_8h.html#a2917137d0281aee3157e348581cef3a9">ntru_keypair.h</a>
</li>
<li>ntru_decrypt_string()
: <a class="el" href="ntru__decrypt_8h.html#aa9cc61eec0c119e48762f6078a14527b">ntru_decrypt.h</a>
</li>
<li>ntru_delete_keypair()
: <a class="el" href="ntru__keypair_8h.html#a5279c4990bc22bb9e735fe36372a6786">ntru_keypair.h</a>
</li>
<li>ntru_encrypt_string()
: <a class="el" href="ntru__encrypt_8h.html#a0bb47c0fa0dd4a4cfa0c0f7a722fd554">ntru_encrypt.h</a>
</li>
<li>ntru_get_rnd_tern_poly_num()
: <a class="el" href="ntru__rnd_8h.html#a916a55c609c172ae4e48896032b36e47">ntru_rnd.h</a>
</li>
<li>ntru_params
: <a class="el" href="ntru_8h.html#a2f326c88fc033eca78a47ee8d387c592">ntru.h</a>
</li>
<li>poly_delete()
: <a class="el" href="ntru_8h.html#a27ff2116f70bcbf5028219adcae4c5f0">ntru.h</a>
</li>
<li>poly_delete_all()
: <a class="el" href="ntru_8h.html#a83297bc2ab5b6e7ce42553570dd8268f">ntru.h</a>
</li>
<li>poly_delete_array()
: <a class="el" href="ntru_8h.html#a3f53c63383ff301b20dcede0783869a7">ntru.h</a>
</li>
<li>poly_draw()
: <a class="el" href="ntru_8h.html#a80a8ce0f2944bc3df94291ef2f781498">ntru.h</a>
</li>
<li>poly_draw_pretty()
: <a class="el" href="ntru_8h.html#aec098d00160d2d502eb1f8a7c3fa5453">ntru.h</a>
</li>
<li>poly_new()
: <a class="el" href="ntru_8h.html#a20f86085d5eb5372fd25dc270069d38c">ntru.h</a>
</li>
<li>prints()
: <a class="el" href="ntru_8h.html#a55d4ce182c335ff6cca360909a7be395">ntru.h</a>
</li>
<li>read_file()
: <a class="el" href="ntru_8h.html#a348c2a56837571f410d44631abc09dc4">ntru.h</a>
</li>
<li>string
: <a class="el" href="ntru_8h.html#a63e2e3ee7db5274c6a3929edfc07c6c9">ntru.h</a>
</li>
<li>string_delete()
: <a class="el" href="ntru_8h.html#ac1b5f66fbbbdfc7901357ddcfec52e5a">ntru.h</a>
</li>
<li>write_file()
: <a class="el" href="ntru_8h.html#a1f8eef5ea12c77ed2491d96864eb0d43">ntru.h</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

163
globals_func.html Normal file
View File

@ -0,0 +1,163 @@
<!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: Globals</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 class="current"><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="globals.html"><span>All</span></a></li>
<li class="current"><a href="globals_func.html"><span>Functions</span></a></li>
<li><a href="globals_type.html"><span>Typedefs</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="contents">
&#160;<ul>
<li>export_priv_key()
: <a class="el" href="ntru__keypair_8h.html#ab4fa7bc1bbfb224f02a5aa8c498d7107">ntru_keypair.h</a>
</li>
<li>export_public_key()
: <a class="el" href="ntru__keypair_8h.html#a4c1eb586b7b1c46d1a43147c88e0b25f">ntru_keypair.h</a>
</li>
<li>get_rnd_int()
: <a class="el" href="ntru__rnd_8h.html#ad85ebfb1cb4b4942942213b750812cf0">ntru_rnd.h</a>
</li>
<li>get_urnd_int()
: <a class="el" href="ntru__rnd_8h.html#a99e4820cab7157eb1e16109e21dac81f">ntru_rnd.h</a>
</li>
<li>import_priv_key()
: <a class="el" href="ntru__keypair_8h.html#a0d387f6329b9bf79e4f9e8286a5d3337">ntru_keypair.h</a>
</li>
<li>import_public_key()
: <a class="el" href="ntru__keypair_8h.html#a9fedb1c2bbcec20c67244e91987a7a77">ntru_keypair.h</a>
</li>
<li>ntru_create_keypair()
: <a class="el" href="ntru__keypair_8h.html#a2917137d0281aee3157e348581cef3a9">ntru_keypair.h</a>
</li>
<li>ntru_decrypt_string()
: <a class="el" href="ntru__decrypt_8h.html#aa9cc61eec0c119e48762f6078a14527b">ntru_decrypt.h</a>
</li>
<li>ntru_delete_keypair()
: <a class="el" href="ntru__keypair_8h.html#a5279c4990bc22bb9e735fe36372a6786">ntru_keypair.h</a>
</li>
<li>ntru_encrypt_string()
: <a class="el" href="ntru__encrypt_8h.html#a0bb47c0fa0dd4a4cfa0c0f7a722fd554">ntru_encrypt.h</a>
</li>
<li>ntru_get_rnd_tern_poly_num()
: <a class="el" href="ntru__rnd_8h.html#a916a55c609c172ae4e48896032b36e47">ntru_rnd.h</a>
</li>
<li>poly_delete()
: <a class="el" href="ntru_8h.html#a27ff2116f70bcbf5028219adcae4c5f0">ntru.h</a>
</li>
<li>poly_delete_all()
: <a class="el" href="ntru_8h.html#a83297bc2ab5b6e7ce42553570dd8268f">ntru.h</a>
</li>
<li>poly_delete_array()
: <a class="el" href="ntru_8h.html#a3f53c63383ff301b20dcede0783869a7">ntru.h</a>
</li>
<li>poly_draw()
: <a class="el" href="ntru_8h.html#a80a8ce0f2944bc3df94291ef2f781498">ntru.h</a>
</li>
<li>poly_draw_pretty()
: <a class="el" href="ntru_8h.html#aec098d00160d2d502eb1f8a7c3fa5453">ntru.h</a>
</li>
<li>poly_new()
: <a class="el" href="ntru_8h.html#a20f86085d5eb5372fd25dc270069d38c">ntru.h</a>
</li>
<li>prints()
: <a class="el" href="ntru_8h.html#a55d4ce182c335ff6cca360909a7be395">ntru.h</a>
</li>
<li>read_file()
: <a class="el" href="ntru_8h.html#a348c2a56837571f410d44631abc09dc4">ntru.h</a>
</li>
<li>string_delete()
: <a class="el" href="ntru_8h.html#ac1b5f66fbbbdfc7901357ddcfec52e5a">ntru.h</a>
</li>
<li>write_file()
: <a class="el" href="ntru_8h.html#a1f8eef5ea12c77ed2491d96864eb0d43">ntru.h</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

109
globals_type.html Normal file
View File

@ -0,0 +1,109 @@
<!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: Globals</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 class="current"><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="globals.html"><span>All</span></a></li>
<li><a href="globals_func.html"><span>Functions</span></a></li>
<li class="current"><a href="globals_type.html"><span>Typedefs</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="contents">
&#160;<ul>
<li>keypair
: <a class="el" href="ntru__keypair_8h.html#aacfc9254c7939584924ab9d27ba6f504">ntru_keypair.h</a>
</li>
<li>ntru_params
: <a class="el" href="ntru_8h.html#a2f326c88fc033eca78a47ee8d387c592">ntru.h</a>
</li>
<li>string
: <a class="el" href="ntru_8h.html#a63e2e3ee7db5274c6a3929edfc07c6c9">ntru.h</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

152
graph_legend.html Normal file
View File

@ -0,0 +1,152 @@
<!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: Graph Legend</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><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><!-- 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">Graph Legend</div> </div>
</div><!--header-->
<div class="contents">
<p>This page explains how to interpret the graphs that are generated by doxygen.</p>
<p>Consider the following example: </p><div class="fragment"><div class="line"><span class="comment">/*! Invisible class because of truncation */</span></div>
<div class="line"><span class="keyword">class </span>Invisible { };</div>
<div class="line"><span class="comment"></span></div>
<div class="line"><span class="comment">/*! Truncated class, inheritance relation is hidden */</span></div>
<div class="line"><span class="keyword">class </span>Truncated : <span class="keyword">public</span> Invisible { };</div>
<div class="line"></div>
<div class="line"><span class="comment">/* Class not documented with doxygen comments */</span></div>
<div class="line"><span class="keyword">class </span>Undocumented { };</div>
<div class="line"><span class="comment"></span></div>
<div class="line"><span class="comment">/*! Class that is inherited using public inheritance */</span></div>
<div class="line"><span class="keyword">class </span>PublicBase : <span class="keyword">public</span> Truncated { };</div>
<div class="line"><span class="comment"></span></div>
<div class="line"><span class="comment">/*! A template class */</span></div>
<div class="line"><span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt; <span class="keyword">class </span>Templ { };</div>
<div class="line"><span class="comment"></span></div>
<div class="line"><span class="comment">/*! Class that is inherited using protected inheritance */</span></div>
<div class="line"><span class="keyword">class </span>ProtectedBase { };</div>
<div class="line"><span class="comment"></span></div>
<div class="line"><span class="comment">/*! Class that is inherited using private inheritance */</span></div>
<div class="line"><span class="keyword">class </span>PrivateBase { };</div>
<div class="line"><span class="comment"></span></div>
<div class="line"><span class="comment">/*! Class that is used by the Inherited class */</span></div>
<div class="line"><span class="keyword">class </span>Used { };</div>
<div class="line"><span class="comment"></span></div>
<div class="line"><span class="comment">/*! Super class that inherits a number of other classes */</span></div>
<div class="line"><span class="keyword">class </span>Inherited : <span class="keyword">public</span> PublicBase,</div>
<div class="line"> <span class="keyword">protected</span> ProtectedBase,</div>
<div class="line"> <span class="keyword">private</span> PrivateBase,</div>
<div class="line"> <span class="keyword">public</span> Undocumented,</div>
<div class="line"> <span class="keyword">public</span> Templ&lt;int&gt;</div>
<div class="line">{</div>
<div class="line"> <span class="keyword">private</span>:</div>
<div class="line"> Used *m_usedClass;</div>
<div class="line">};</div>
</div><!-- fragment --><p> This will result in the following graph:</p>
<center><div class="image">
<img src="graph_legend.png" />
</div>
</center><p>The boxes in the above graph have the following meaning: </p>
<ul>
<li>
A filled gray box represents the struct or class for which the graph is generated. </li>
<li>
A box with a black border denotes a documented struct or class. </li>
<li>
A box with a grey border denotes an undocumented struct or class. </li>
<li>
A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries. </li>
</ul>
<p>The arrows have the following meaning: </p>
<ul>
<li>
A dark blue arrow is used to visualize a public inheritance relation between two classes. </li>
<li>
A dark green arrow is used for protected inheritance. </li>
<li>
A dark red arrow is used for private inheritance. </li>
<li>
A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible. </li>
<li>
A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance. </li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

1
graph_legend.md5 Normal file
View File

@ -0,0 +1 @@
387ff8eb65306fa251338d3c9bd7bfff

BIN
graph_legend.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,29 +0,0 @@
include ../common.mk
install:
$(INSTALL_DIR) "$(DESTDIR)$(INSTALL_INCLUDEDIR)"
$(INSTALL) ntru.h "$(DESTDIR)$(INSTALL_INCLUDEDIR)"/ntru.h
$(INSTALL) ntru_decrypt.h "$(DESTDIR)$(INSTALL_INCLUDEDIR)"/ntru_decrypt.h
$(INSTALL) ntru_encrypt.h "$(DESTDIR)$(INSTALL_INCLUDEDIR)"/ntru_encrypt.h
$(INSTALL) ntru_keypair.h "$(DESTDIR)$(INSTALL_INCLUDEDIR)"/ntru_keypair.h
$(INSTALL) ntru_rnd.h "$(DESTDIR)$(INSTALL_INCLUDEDIR)"/ntru_rnd.h
uninstall:
$(RM) "$(DESTDIR)$(INSTALL_INCLUDEDIR)"/ntru.h
$(RM) "$(DESTDIR)$(INSTALL_INCLUDEDIR)"/ntru_decrypt.h
$(RM) "$(DESTDIR)$(INSTALL_INCLUDEDIR)"/ntru_encrypt.h
$(RM) "$(DESTDIR)$(INSTALL_INCLUDEDIR)"/ntru_keypair.h
$(RM) "$(DESTDIR)$(INSTALL_INCLUDEDIR)"/ntru_rnd.h
doc:
doxygen
doc-pdf: doc
$(MAKE) -C latex pdf
clean:
rm -rf html/ latex/
.PHONY: clean doc doc-pdf install uninstall

View File

@ -1,60 +0,0 @@
/**
@author hasufell
\mainpage Index Page
\tableofcontents
\section intro_sec Introduction
Highly optimized C implementation of the NTRUEncrypt algorithm,
using the FLINT library.
\section mot Motivation
Modern quantum computers will enable us to ride extremely effective attacks on crypto algorithms like rsa. One known attack is the quantum algorithm called <a href="http://en.wikipedia.org/wiki/Shor%27s_algorithm">Shor's algorithm</a>. In the light of fast paced computer hardware development and known quantum algorithms, it is of importance to find and implement alternatives which are not vulnerable to these attacks.
One known alternative is called <a href="http://en.wikipedia.org/wiki/NTRUEncrypt">NTRU</a> and will be our main focus. It is lattice-based (shortest vector problem in a lattice). In fact, NTRU is a parametrised family of cryptosystems. As such it is represented by the triple (N, p, q), where N is prime, q is always larger than p and p and q are coprime. As well as four sets of polynomials: a polynomial part of the private key, a polynomial for generation of the public key, the message and a blinding value, respectively, all of degree at most N - 1. It is, in theory, very efficient, since encryption and decryption only use simple polynomial multiplication which are very fast compared to asymmetric encryption schemes.
\section goals Goals
Our main goal is to implement an alternative library of the NTRU algorithm in C and gather experience in cryptographic programming. Further, it may help to raise awareness of the need of quantum-secure encryption and enable us to contribute to already present implementations. It may even reveal problems of other implementations and help advancing them. It may as well help with diversity in crypto implementations, which is always a good thing. On top of that we will provide a command-line interface to our library and allow basic operations like key creation and encryption from stdin.
Optimizing the algorithm itself is not within our scope. However, the library may undergo heavy changes on the mathematical implementation of polynomial arithmetic, in order to optimize run-time behaviour.
\section algos Algorithms
Most of the algorithms in ntru_poly.c, ntru_decrypt.c, ntru_encrypt.c and ntru_keypair.c are based on the pseudo-code from <a href="http://www.crypto.wpi.edu/Publications/Documents/ms_corourke.pdf">Efficient NTRU Implementations by Colleen Marie O'Rourke</a>.
Further work is based on <a href="http://www.math.uni-hamburg.de/home/kuehn/moldenhauer-bsc-NTRUKryptosystem-final.pdf">Das NTRU-Kryptosystem von Anja Moldenhauer</a> and the official <a href="https://www.securityinnovation.com/uploads/Crypto/NTRUTech014.pdf">NTRU Cryptosystems Technical Report #14</a>.
\section license License
<a href="https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">LGPL-2.1</a>
\section deps Dependencies
This library was written for Linux systems. Support for windows will not be added.
\* <a href="http://www.flintlib.org">FLINT-2.4.3 or later</a> (compiled with gmp and mpfr)
\* <a href="https://developer.gnome.org/glib/stable/">glib-2.0</a>
\* <a href="https://code.google.com/p/lz4">lz4</a>
\* <a href="http://cunit.sourceforge.net">cunit</a> (for the tests only)
\* <a href="http://www.doxygen.org">doxygen</a> (for the documentation only)
\* <a href="http://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</a> (for the build only)
\section install_sec Installation
\* make
\* make check (optional, runs the test suite)
\* make install
\section usage Usage
See this API doc, the public headers are in the include/ subfolder.
This is only the external API. For the internal API please clone the repository, run 'make doc' and check the src/html subfolder.
\section perf Performance
See <a href="https://github.com/hasufell/pqc/wiki/Performance-analysis">Performance Analysis on github</a>.
\section ref References
\* <a href="https://github.com/hasufell/pqc">This library on github</a>
\* <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.25.8422&rep=rep1&type=pdf">Original NTRUEncrypt paper</a>
\* <a href="http://www.crypto.wpi.edu/Publications/Documents/ms_corourke.pdf">Efficient NTRU Implementations by Colleen Marie O'Rourke</a>
\* <a href="http://www.math.uni-hamburg.de/home/kuehn/moldenhauer-bsc-NTRUKryptosystem-final.pdf">Das NTRU-Kryptosystem von Anja Moldenhauer</a>
\* <a href="https://www.securityinnovation.com/uploads/Crypto/NTRUTech014.pdf">NTRU Cryptosystems Technical Report #14</a>
\* <a href="http://teal.gmu.edu/courses/ECE646/project/reports_2001/dsouza.pdf">The NTRU Cryptosystem: Implementation and Comparative Analysis by Rodney D'Souza</a>
\* <a href="http://en.wikipedia.org/wiki/NTRUEncrypt">Wikipedia Article</a>
*/

View File

@ -1,188 +0,0 @@
/*
* Copyright (C) 2014 FH Bielefeld
*
* This file is part of a FH Bielefeld project.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
/**
* @file ntru.h
* This file holds the public API of the most basic
* data types and operations of the pqc NTRU implementation
* and is meant to be installed on the client system.
* @brief public API, basic data types
*/
#ifndef PUBLIC_NTRU_NTRU_H_
#define PUBLIC_NTRU_NTRU_H_
#include <fmpz_poly.h>
#include <fmpz.h>
#include <stdbool.h>
#include <stdint.h>
typedef struct ntru_params ntru_params;
typedef struct string string;
/**
* NTRU cryptosystem is specified by
* the following triple.
*/
struct ntru_params {
/**
* maximal degree N - 1 for
* all polynomials
*/
uint32_t N;
/**
* large modulus
*/
uint32_t q;
/**
* small modulus
*/
uint32_t p;
};
/**
* Represents a string.
*/
struct string {
/**
* Pointer to the char array,
* holding the actual string.
* THIS IS NOT NULL TERMINATED
* (at least not necessarily,
* don't ever assume it).
*/
char *ptr;
/**
* Length of the string.
*/
size_t len;
};
/**
* Prints the given string to stdout.
*
* @param print_string the print to string
*/
void
prints(const string *print_string);
/**
* Delete the inner structure
* of the string and frees the string
* itself from the heap. Must not be
* called on stack variables.
*
* @param del_string the string to delete
*/
void
string_delete(string *del_string);
/**
* Initializes and builds a polynomial with the
* coefficient values of c[] of size len within NTRU
* parameters and returns a newly allocated polynomial.
* For an empty polynom, both c and len can be NULL/0.
*
* @param new_poly the polynomial to initialize and
* fill with coefficients [out]
* @param c array of polynomial coefficients, can be NULL
* @param len size of the coefficient array, can be 0
*/
void
poly_new(fmpz_poly_t new_poly,
int const * const c,
const size_t len);
/**
* This deletes the internal structure of a polynomial,
* and frees the pointer.
*
* @param poly the polynomial to delete
*/
void
poly_delete(fmpz_poly_t poly);
/**
* Delete the internal structure of a polynomial
* array which must be NULL terminated. It is expected
* that poly_array is not on the stack and was obtained
* by a function like ascii_to_poly().
*
* @param poly_array the polynomial array
*/
void
poly_delete_array(fmpz_poly_t **poly_array);
/**
* This deletes the internal structure of all polynomials,
* and frees the pointers.
* You must call this with NULL as last argument!
*
* @param poly the polynomial to delete
* @param ... follow up polynomials
*/
void
poly_delete_all(fmpz_poly_t poly, ...);
/**
* Draws a polynomial to stdout.
*
* @param poly draw this
*/
void
poly_draw(const fmpz_poly_t poly);
/**
* Draws a polynomial to stdout,
* in pretty format.
*
* @param poly draw this
*/
void
poly_draw_pretty(const fmpz_poly_t poly);
/**
* Reads a file and returns a newly allocated string.
*
* @param filename file to open
* @return a newly allocated string which must be freed by the caller
* or NULL on failure
*/
string *
read_file(char const * const filename);
/**
* Write a string to a file. The file will be pruned or created
* if it does not exist.
*
* @param wstring the string to write to the file
* @param filename the name of the file to write to
* @return true for success or false for failure if fopen or fclose failed
*/
bool
write_file(string const *wstring, char const * const filename);
#endif /* NTRU_NTRU_H_ */

View File

@ -1,58 +0,0 @@
/*
* Copyright (C) 2014 FH Bielefeld
*
* This file is part of a FH Bielefeld project.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
/**
* @file ntru_decrypt.h
* This file holds the public API of decryption
* of the pqc NTRU implementation and is
* meant to be installed on the client system.
* @brief public API, decryption
*/
#ifndef PUBLIC_NTRU_DECRYPT_H_
#define PUBLIC_NTRU_DECRYPT_H_
#include <ntru.h>
#include <fmpz_poly.h>
#include <fmpz.h>
/**
* Decryption of a given encrypted string.
*
* @param encr_msg the encrypted message in the form of a string
* @param priv_key the polynomial containing the private key to decrypt
* the message
* @param priv_key_inv the inverse polynome to the private key
* @param params the ntru_params
* @return the decrypted string or NULL on failure
*/
string *
ntru_decrypt_string(
const string *encr_msg,
const fmpz_poly_t priv_key,
const fmpz_poly_t priv_key_inv,
const ntru_params *params);
#endif /* PUBLIC_NTRU_DECRYPT_H_ */

View File

@ -1,59 +0,0 @@
/*
* Copyright (C) 2014 FH Bielefeld
*
* This file is part of a FH Bielefeld project.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
/**
* @file ntru_encrypt.h
* This file holds the public API of encryption
* of the pqc NTRU implementation and is
* meant to be installed on the client system.
* @brief public API, encryption
*/
#ifndef PUBLIC_NTRU_ENCRYPT_H_
#define PUBLIC_NTRU_ENCRYPT_H_
#include <ntru.h>
#include <fmpz_poly.h>
#include <fmpz.h>
/**
* Encrypt a message in the form of a null-terminated char array and
* return a string.
*
* @param msg the message
* @param pub_key the public key
* @param rnd the random poly (should have relatively small
* coefficients, but not restricted to {-1, 0, 1})
* @param params ntru_params the ntru context
* @return the newly allocated encrypted string, NULL on failure
*/
string *
ntru_encrypt_string(
const string *msg,
const fmpz_poly_t pub_key,
const fmpz_poly_t rnd,
const ntru_params *params);
#endif /* PUBLIC_NTRU_ENCRYPT_H_ */

View File

@ -1,157 +0,0 @@
/*
* Copyright (C) 2014 FH Bielefeld
*
* This file is part of a FH Bielefeld project.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
/**
* @file ntru_keypair.h
* This file holds the public API of generating,
* exporting and importing public and private keys
* of the pqc NTRU implementation and is
* meant to be installed on the client system.
* @brief public API, key handling
*/
#ifndef PUBLIC_NTRU_KEYPAIR_H_
#define PUBLIC_NTRU_KEYPAIR_H_
#include <ntru.h>
#include <fmpz_poly.h>
#include <fmpz.h>
#include <stdbool.h>
#include <stdint.h>
typedef struct keypair keypair;
/**
* This struct holds the keypair,
* both private and public components.
*/
struct keypair {
/**
* First part of the private key,
* a random polynom.
*/
fmpz_poly_t priv;
/**
* Second part of the private key,
* the priv polynom inverted.
*/
fmpz_poly_t priv_inv;
/**
* The public key, computed as:
* h = p * (Fq * g) mod q
*/
fmpz_poly_t pub;
};
/**
* Creates an NTRU key pair,
* consisting of public and private
* components.
*
* @param pair store private and public components here (the
* polynomials inside the struct will be automatically
* initialized) [out]
* @param f a random ternary polynomial
* @param g a random ternary polynomial
* @param params the NTRU context
* @return true for success, false if f or g are not invertible
* (then the caller has to try different ones)
*/
bool
ntru_create_keypair(
keypair *pair,
const fmpz_poly_t f,
const fmpz_poly_t g,
const ntru_params *params);
/**
* Export the public key to a file.
*
* @param filename the file to save the public key into
* @param pub the public key
* @param params the NTRU context
* @return true for success, false if any of the file operations failed
*/
bool
export_public_key(char const * const filename,
const fmpz_poly_t pub,
const ntru_params *params);
/**
* Export the private key to a file.
*
* @param filename the file to save the private key into
* @param priv the private key
* @param params the NTRU context
* @return true for success, false if any of the file operations failed
*/
bool
export_priv_key(char const * const filename,
const fmpz_poly_t priv,
const ntru_params *params);
/**
* Import the public key from a file.
*
* @param pub where to save the public key, must be initialized [out]
* @param filename the file to get the public key from
* @param params the NTRU context
* @return true for success, false if any of the file operations failed
*/
bool
import_public_key(fmpz_poly_t pub,
char const * const filename,
const ntru_params *params);
/**
* Import the private key from a file and store him
* along with his inverse.
*
* @param priv where to save the private key, must be initialized [out]
* @param priv_inv where to save the inverse of the private key,
* must be initialized [out]
* @param filename the file to get the private key from
* @param params the NTRU context
* @return true for success, false if any of the file operations failed
*/
bool
import_priv_key(fmpz_poly_t priv,
fmpz_poly_t priv_inv,
char const * const filename,
const ntru_params *params);
/**
* Used to free the inner structure
* of a keypair. This will not call free()
* on the pair itself.
*
* @param pair the pair to free the inner structure of
*/
void
ntru_delete_keypair(keypair *pair);
#endif /* PUBLIC_NTRU_KEYPAIR_H_ */

View File

@ -1,77 +0,0 @@
/*
* Copyright (C) 2014 FH Bielefeld
*
* This file is part of a FH Bielefeld project.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
/**
* @file ntru_rnd.h
* This file holds the public API of generating
* random ternary polynomials of the pqc NTRU
* implementation and is meant to be installed
* on the client system.
* @brief public API, random polynomials
*/
#ifndef PUBLIC_NTRU_RND_H_
#define PUBLIC_NTRU_RND_H_
#include <ntru.h>
#include <fmpz_poly.h>
#include <fmpz.h>
#include <stdint.h>
/**
* Get a random integer from /dev/random.
*
* @return random integer
*/
int
get_rnd_int(void);
/**
* Get a pseudo random integer from /dev/urandom.
*
* @return pseudo-random integer.
*/
int
get_urnd_int(void);
/**
* Get a random ternary polynomial with specified numbers
* of 1 coefficients and -1 coefficients.
*
* @param poly the resulting random polynomial [out]
* @param params the NTRU context
* @param num_ones the number of 1 coefficients
* @param num_neg_ones the number of -1 coefficients
* @param rnd_int function callback which should return
* a random integer
*/
void
ntru_get_rnd_tern_poly_num(fmpz_poly_t poly,
const ntru_params *params,
uint32_t num_ones,
uint32_t num_neg_ones,
int (*rnd_int)(void));
#endif /* PUBLIC_NTRU_RND_H_ */

155
index.html Normal file
View File

@ -0,0 +1,155 @@
<!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: Index Page</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 class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><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><!-- 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">Index Page </div> </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#intro_sec">Introduction</a></li>
<li class="level1"><a href="#mot">Motivation</a></li>
<li class="level1"><a href="#goals">Goals</a></li>
<li class="level1"><a href="#algos">Algorithms</a></li>
<li class="level1"><a href="#license">License</a></li>
<li class="level1"><a href="#deps">Dependencies</a></li>
<li class="level1"><a href="#install_sec">Installation</a></li>
<li class="level1"><a href="#usage">Usage</a></li>
<li class="level1"><a href="#perf">Performance</a></li>
<li class="level1"><a href="#ref">References</a></li>
</ul>
</div>
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>hasufell</dd></dl>
<h1><a class="anchor" id="intro_sec"></a>
Introduction</h1>
<p>Highly optimized C implementation of the NTRUEncrypt algorithm, using the FLINT library.</p>
<h1><a class="anchor" id="mot"></a>
Motivation</h1>
<p>Modern quantum computers will enable us to ride extremely effective attacks on crypto algorithms like rsa. One known attack is the quantum algorithm called <a href="http://en.wikipedia.org/wiki/Shor%27s_algorithm">Shor's algorithm</a>. In the light of fast paced computer hardware development and known quantum algorithms, it is of importance to find and implement alternatives which are not vulnerable to these attacks.</p>
<p>One known alternative is called <a href="http://en.wikipedia.org/wiki/NTRUEncrypt">NTRU</a> and will be our main focus. It is lattice-based (shortest vector problem in a lattice). In fact, NTRU is a parametrised family of cryptosystems. As such it is represented by the triple (N, p, q), where N is prime, q is always larger than p and p and q are coprime. As well as four sets of polynomials: a polynomial part of the private key, a polynomial for generation of the public key, the message and a blinding value, respectively, all of degree at most N - 1. It is, in theory, very efficient, since encryption and decryption only use simple polynomial multiplication which are very fast compared to asymmetric encryption schemes.</p>
<h1><a class="anchor" id="goals"></a>
Goals</h1>
<p>Our main goal is to implement an alternative library of the NTRU algorithm in C and gather experience in cryptographic programming. Further, it may help to raise awareness of the need of quantum-secure encryption and enable us to contribute to already present implementations. It may even reveal problems of other implementations and help advancing them. It may as well help with diversity in crypto implementations, which is always a good thing. On top of that we will provide a command-line interface to our library and allow basic operations like key creation and encryption from stdin.</p>
<p>Optimizing the algorithm itself is not within our scope. However, the library may undergo heavy changes on the mathematical implementation of polynomial arithmetic, in order to optimize run-time behaviour.</p>
<h1><a class="anchor" id="algos"></a>
Algorithms</h1>
<p>Most of the algorithms in ntru_poly.c, ntru_decrypt.c, ntru_encrypt.c and ntru_keypair.c are based on the pseudo-code from <a href="http://www.crypto.wpi.edu/Publications/Documents/ms_corourke.pdf">Efficient NTRU Implementations by Colleen Marie O'Rourke</a>.</p>
<p>Further work is based on <a href="http://www.math.uni-hamburg.de/home/kuehn/moldenhauer-bsc-NTRUKryptosystem-final.pdf">Das NTRU-Kryptosystem von Anja Moldenhauer</a> and the official <a href="https://www.securityinnovation.com/uploads/Crypto/NTRUTech014.pdf">NTRU Cryptosystems Technical Report #14</a>.</p>
<h1><a class="anchor" id="license"></a>
License</h1>
<p><a href="https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">LGPL-2.1</a></p>
<h1><a class="anchor" id="deps"></a>
Dependencies</h1>
<p>This library was written for Linux systems. Support for windows will not be added.</p><ul>
<li><a href="http://www.flintlib.org">FLINT-2.4.3 or later</a> (compiled with gmp and mpfr)</li>
<li><a href="https://developer.gnome.org/glib/stable/">glib-2.0</a></li>
<li><a href="https://code.google.com/p/lz4">lz4</a></li>
<li><a href="http://cunit.sourceforge.net">cunit</a> (for the tests only)</li>
<li><a href="http://www.doxygen.org">doxygen</a> (for the documentation only)</li>
<li><a href="http://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</a> (for the build only)</li>
</ul>
<h1><a class="anchor" id="install_sec"></a>
Installation</h1>
<ul>
<li>make</li>
<li>make check (optional, runs the test suite)</li>
<li>make install</li>
</ul>
<h1><a class="anchor" id="usage"></a>
Usage</h1>
<p>See this API doc, the public headers are in the include/ subfolder. This is only the external API. For the internal API please clone the repository, run 'make doc' and check the src/html subfolder.</p>
<h1><a class="anchor" id="perf"></a>
Performance</h1>
<p>See <a href="https://github.com/hasufell/pqc/wiki/Performance-analysis">Performance Analysis on github</a>.</p>
<h1><a class="anchor" id="ref"></a>
References</h1>
<ul>
<li><a href="https://github.com/hasufell/pqc">This library on github</a></li>
<li><a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.25.8422&amp;rep=rep1&amp;type=pdf">Original NTRUEncrypt paper</a></li>
<li><a href="http://www.crypto.wpi.edu/Publications/Documents/ms_corourke.pdf">Efficient NTRU Implementations by Colleen Marie O'Rourke</a></li>
<li><a href="http://www.math.uni-hamburg.de/home/kuehn/moldenhauer-bsc-NTRUKryptosystem-final.pdf">Das NTRU-Kryptosystem von Anja Moldenhauer</a></li>
<li><a href="https://www.securityinnovation.com/uploads/Crypto/NTRUTech014.pdf">NTRU Cryptosystems Technical Report #14</a></li>
<li><a href="http://teal.gmu.edu/courses/ECE646/project/reports_2001/dsouza.pdf">The NTRU Cryptosystem: Implementation and Comparative Analysis by Rodney D'Souza</a></li>
<li><a href="http://en.wikipedia.org/wiki/NTRUEncrypt">Wikipedia Article</a> </li>
</ul>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

39
jquery.js vendored Normal file

File diff suppressed because one or more lines are too long

BIN
nav_f.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

BIN
nav_g.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B

BIN
nav_h.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 B

460
ntru_8h.html Normal file
View File

@ -0,0 +1,460 @@
<!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 File Reference</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>
<!-- 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><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">ntru.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>public API, basic data types
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;fmpz_poly.h&gt;</code><br />
<code>#include &lt;fmpz.h&gt;</code><br />
<code>#include &lt;stdbool.h&gt;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for ntru.h:</div>
<div class="dyncontent">
<div class="center"><img src="ntru_8h__incl.png" border="0" usemap="#ntru_8h" alt=""/></div>
<map name="ntru_8h" id="ntru_8h">
</map>
</div>
</div>
<p><a href="ntru_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structntru__params.html">ntru_params</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstring.html">string</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a2f326c88fc033eca78a47ee8d387c592"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structntru__params.html">ntru_params</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#a2f326c88fc033eca78a47ee8d387c592">ntru_params</a></td></tr>
<tr class="separator:a2f326c88fc033eca78a47ee8d387c592"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63e2e3ee7db5274c6a3929edfc07c6c9"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structstring.html">string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#a63e2e3ee7db5274c6a3929edfc07c6c9">string</a></td></tr>
<tr class="separator:a63e2e3ee7db5274c6a3929edfc07c6c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a55d4ce182c335ff6cca360909a7be395"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#a55d4ce182c335ff6cca360909a7be395">prints</a> (const <a class="el" href="structstring.html">string</a> *print_string)</td></tr>
<tr class="separator:a55d4ce182c335ff6cca360909a7be395"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1b5f66fbbbdfc7901357ddcfec52e5a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#ac1b5f66fbbbdfc7901357ddcfec52e5a">string_delete</a> (<a class="el" href="structstring.html">string</a> *del_string)</td></tr>
<tr class="separator:ac1b5f66fbbbdfc7901357ddcfec52e5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20f86085d5eb5372fd25dc270069d38c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#a20f86085d5eb5372fd25dc270069d38c">poly_new</a> (fmpz_poly_t new_poly, int const *const c, const size_t len)</td></tr>
<tr class="separator:a20f86085d5eb5372fd25dc270069d38c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27ff2116f70bcbf5028219adcae4c5f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#a27ff2116f70bcbf5028219adcae4c5f0">poly_delete</a> (fmpz_poly_t poly)</td></tr>
<tr class="separator:a27ff2116f70bcbf5028219adcae4c5f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f53c63383ff301b20dcede0783869a7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#a3f53c63383ff301b20dcede0783869a7">poly_delete_array</a> (fmpz_poly_t **poly_array)</td></tr>
<tr class="separator:a3f53c63383ff301b20dcede0783869a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83297bc2ab5b6e7ce42553570dd8268f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#a83297bc2ab5b6e7ce42553570dd8268f">poly_delete_all</a> (fmpz_poly_t poly,...)</td></tr>
<tr class="separator:a83297bc2ab5b6e7ce42553570dd8268f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80a8ce0f2944bc3df94291ef2f781498"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#a80a8ce0f2944bc3df94291ef2f781498">poly_draw</a> (const fmpz_poly_t poly)</td></tr>
<tr class="separator:a80a8ce0f2944bc3df94291ef2f781498"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec098d00160d2d502eb1f8a7c3fa5453"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#aec098d00160d2d502eb1f8a7c3fa5453">poly_draw_pretty</a> (const fmpz_poly_t poly)</td></tr>
<tr class="separator:aec098d00160d2d502eb1f8a7c3fa5453"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a348c2a56837571f410d44631abc09dc4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structstring.html">string</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#a348c2a56837571f410d44631abc09dc4">read_file</a> (char const *const filename)</td></tr>
<tr class="separator:a348c2a56837571f410d44631abc09dc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f8eef5ea12c77ed2491d96864eb0d43"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru_8h.html#a1f8eef5ea12c77ed2491d96864eb0d43">write_file</a> (<a class="el" href="structstring.html">string</a> const *wstring, char const *const filename)</td></tr>
<tr class="separator:a1f8eef5ea12c77ed2491d96864eb0d43"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>public API, basic data types </p>
<p>This file holds the public API of the most basic data types and operations of the pqc NTRU implementation and is meant to be installed on the client system. </p>
<p>Definition in file <a class="el" href="ntru_8h_source.html">ntru.h</a>.</p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a2f326c88fc033eca78a47ee8d387c592"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structntru__params.html">ntru_params</a> <a class="el" href="structntru__params.html">ntru_params</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="ntru_8h_source.html#l00040">40</a> of file <a class="el" href="ntru_8h_source.html">ntru.h</a>.</p>
</div>
</div>
<a class="anchor" id="a63e2e3ee7db5274c6a3929edfc07c6c9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structstring.html">string</a> <a class="el" href="structstring.html">string</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="ntru_8h_source.html#l00041">41</a> of file <a class="el" href="ntru_8h_source.html">ntru.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a27ff2116f70bcbf5028219adcae4c5f0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void poly_delete </td>
<td>(</td>
<td class="paramtype">fmpz_poly_t&#160;</td>
<td class="paramname"><em>poly</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This deletes the internal structure of a polynomial, and frees the pointer.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">poly</td><td>the polynomial to delete </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a83297bc2ab5b6e7ce42553570dd8268f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void poly_delete_all </td>
<td>(</td>
<td class="paramtype">fmpz_poly_t&#160;</td>
<td class="paramname"><em>poly</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>...</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This deletes the internal structure of all polynomials, and frees the pointers. You must call this with NULL as last argument!</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">poly</td><td>the polynomial to delete </td></tr>
<tr><td class="paramname">...</td><td>follow up polynomials </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a3f53c63383ff301b20dcede0783869a7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void poly_delete_array </td>
<td>(</td>
<td class="paramtype">fmpz_poly_t **&#160;</td>
<td class="paramname"><em>poly_array</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete the internal structure of a polynomial array which must be NULL terminated. It is expected that poly_array is not on the stack and was obtained by a function like ascii_to_poly().</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">poly_array</td><td>the polynomial array </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a80a8ce0f2944bc3df94291ef2f781498"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void poly_draw </td>
<td>(</td>
<td class="paramtype">const fmpz_poly_t&#160;</td>
<td class="paramname"><em>poly</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Draws a polynomial to stdout.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">poly</td><td>draw this </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aec098d00160d2d502eb1f8a7c3fa5453"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void poly_draw_pretty </td>
<td>(</td>
<td class="paramtype">const fmpz_poly_t&#160;</td>
<td class="paramname"><em>poly</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Draws a polynomial to stdout, in pretty format.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">poly</td><td>draw this </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a20f86085d5eb5372fd25dc270069d38c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void poly_new </td>
<td>(</td>
<td class="paramtype">fmpz_poly_t&#160;</td>
<td class="paramname"><em>new_poly</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int const *const&#160;</td>
<td class="paramname"><em>c</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const size_t&#160;</td>
<td class="paramname"><em>len</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initializes and builds a polynomial with the coefficient values of c[] of size len within NTRU parameters and returns a newly allocated polynomial. For an empty polynom, both c and len can be NULL/0.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">new_poly</td><td>the polynomial to initialize and fill with coefficients [out] </td></tr>
<tr><td class="paramname">c</td><td>array of polynomial coefficients, can be NULL </td></tr>
<tr><td class="paramname">len</td><td>size of the coefficient array, can be 0 </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a55d4ce182c335ff6cca360909a7be395"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void prints </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structstring.html">string</a> *&#160;</td>
<td class="paramname"><em>print_string</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Prints the given string to stdout.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">print_string</td><td>the print to string </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a348c2a56837571f410d44631abc09dc4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structstring.html">string</a>* read_file </td>
<td>(</td>
<td class="paramtype">char const *const&#160;</td>
<td class="paramname"><em>filename</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reads a file and returns a newly allocated string.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>file to open </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated string which must be freed by the caller or NULL on failure </dd></dl>
</div>
</div>
<a class="anchor" id="ac1b5f66fbbbdfc7901357ddcfec52e5a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void string_delete </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structstring.html">string</a> *&#160;</td>
<td class="paramname"><em>del_string</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete the inner structure of the string and frees the string itself from the heap. Must not be called on stack variables.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">del_string</td><td>the string to delete </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a1f8eef5ea12c77ed2491d96864eb0d43"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool write_file </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structstring.html">string</a> const *&#160;</td>
<td class="paramname"><em>wstring</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char const *const&#160;</td>
<td class="paramname"><em>filename</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Write a string to a file. The file will be pruned or created if it does not exist.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wstring</td><td>the string to write to the file </td></tr>
<tr><td class="paramname">filename</td><td>the name of the file to write to </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true for success or false for failure if fopen or fclose failed </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

2
ntru_8h__incl.map Normal file
View File

@ -0,0 +1,2 @@
<map id="ntru.h" name="ntru.h">
</map>

1
ntru_8h__incl.md5 Normal file
View File

@ -0,0 +1 @@
1041a99982d79ff8aa4f99ad4b616a33

BIN
ntru_8h__incl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

193
ntru_8h_source.html Normal file
View File

@ -0,0 +1,193 @@
<!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;stdbool.h&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></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"> 39</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="ntru_8h.html#a2f326c88fc033eca78a47ee8d387c592"> 40</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="l00041"></a><span class="lineno"><a class="line" href="ntru_8h.html#a63e2e3ee7db5274c6a3929edfc07c6c9"> 41</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="l00042"></a><span class="lineno"> 42</span>&#160;</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="structntru__params.html"> 48</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structntru__params.html">ntru_params</a> {</div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="structntru__params.html#afb8425ee3db2b917b3c4e8d9b75bd3ff"> 53</a></span>&#160; uint32_t <a class="code" href="structntru__params.html#afb8425ee3db2b917b3c4e8d9b75bd3ff">N</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structntru__params.html#a29680750bda49dc93e61a752b2f2a0f7"> 57</a></span>&#160; uint32_t <a class="code" href="structntru__params.html#a29680750bda49dc93e61a752b2f2a0f7">q</a>;</div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structntru__params.html#a41b368825e1eb126604e13e8f549ec8f"> 61</a></span>&#160; uint32_t <a class="code" href="structntru__params.html#a41b368825e1eb126604e13e8f549ec8f">p</a>;</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;};</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="structstring.html"> 67</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structstring.html">string</a> {</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="structstring.html#aa1b2f3a2ddd1ed38245b8d4590aadf93"> 75</a></span>&#160; <span class="keywordtype">char</span> *<a class="code" href="structstring.html#aa1b2f3a2ddd1ed38245b8d4590aadf93">ptr</a>;</div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="structstring.html#aa6bcf0353fd5cf2f374a9b1dd0e4a73a"> 79</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structstring.html#aa6bcf0353fd5cf2f374a9b1dd0e4a73a">len</a>;</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="l00082"></a><span class="lineno"> 82</span>&#160;</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</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="l00090"></a><span class="lineno"> 90</span>&#160;</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</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="l00101"></a><span class="lineno"> 101</span>&#160;</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;<a class="code" href="ntru_8h.html#a20f86085d5eb5372fd25dc270069d38c">poly_new</a>(fmpz_poly_t new_poly,</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="keywordtype">int</span> <span class="keyword">const</span> * <span class="keyword">const</span> c,</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> len);</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;<a class="code" href="ntru_8h.html#a27ff2116f70bcbf5028219adcae4c5f0">poly_delete</a>(fmpz_poly_t poly);</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</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="l00137"></a><span class="lineno"> 137</span>&#160;</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;<a class="code" href="ntru_8h.html#a83297bc2ab5b6e7ce42553570dd8268f">poly_delete_all</a>(fmpz_poly_t poly, ...);</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</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="l00156"></a><span class="lineno"> 156</span>&#160;</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</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="l00165"></a><span class="lineno"> 165</span>&#160;</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;<span class="keywordtype">string</span> *</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</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="l00175"></a><span class="lineno"> 175</span>&#160;</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;<span class="keywordtype">bool</span></div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;<a class="code" href="ntru_8h.html#a1f8eef5ea12c77ed2491d96864eb0d43">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#l00079">ntru.h:79</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#l00075">ntru.h:75</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#l00053">ntru.h:53</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#l00061">ntru.h:61</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#l00048">ntru.h:48</a></div></div>
<div class="ttc" id="ntru_8h_html_a1f8eef5ea12c77ed2491d96864eb0d43"><div class="ttname"><a href="ntru_8h.html#a1f8eef5ea12c77ed2491d96864eb0d43">write_file</a></div><div class="ttdeci">bool 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#l00067">ntru.h:67</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#l00057">ntru.h:57</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 Sat Sep 13 2014 21:02:50 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>

173
ntru__decrypt_8h.html Normal file
View File

@ -0,0 +1,173 @@
<!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_decrypt.h File Reference</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>
<!-- 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><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">ntru_decrypt.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>public API, decryption
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="ntru_8h_source.html">ntru.h</a>&gt;</code><br />
<code>#include &lt;fmpz_poly.h&gt;</code><br />
<code>#include &lt;fmpz.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for ntru_decrypt.h:</div>
<div class="dyncontent">
<div class="center"><img src="ntru__decrypt_8h__incl.png" border="0" usemap="#ntru__decrypt_8h" alt=""/></div>
<map name="ntru__decrypt_8h" id="ntru__decrypt_8h">
<area shape="rect" id="node3" href="ntru_8h.html" title="public API, basic data types " alt="" coords="177,83,231,112"/></map>
</div>
</div>
<p><a href="ntru__decrypt_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa9cc61eec0c119e48762f6078a14527b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structstring.html">string</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__decrypt_8h.html#aa9cc61eec0c119e48762f6078a14527b">ntru_decrypt_string</a> (const <a class="el" href="structstring.html">string</a> *encr_msg, const fmpz_poly_t priv_key, const fmpz_poly_t priv_key_inv, const <a class="el" href="structntru__params.html">ntru_params</a> *params)</td></tr>
<tr class="separator:aa9cc61eec0c119e48762f6078a14527b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>public API, decryption </p>
<p>This file holds the public API of decryption of the pqc NTRU implementation and is meant to be installed on the client system. </p>
<p>Definition in file <a class="el" href="ntru__decrypt_8h_source.html">ntru_decrypt.h</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aa9cc61eec0c119e48762f6078a14527b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structstring.html">string</a>* ntru_decrypt_string </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structstring.html">string</a> *&#160;</td>
<td class="paramname"><em>encr_msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const fmpz_poly_t&#160;</td>
<td class="paramname"><em>priv_key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const fmpz_poly_t&#160;</td>
<td class="paramname"><em>priv_key_inv</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structntru__params.html">ntru_params</a> *&#160;</td>
<td class="paramname"><em>params</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Decryption of a given encrypted string.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">encr_msg</td><td>the encrypted message in the form of a string </td></tr>
<tr><td class="paramname">priv_key</td><td>the polynomial containing the private key to decrypt the message </td></tr>
<tr><td class="paramname">priv_key_inv</td><td>the inverse polynome to the private key </td></tr>
<tr><td class="paramname">params</td><td>the <a class="el" href="structntru__params.html">ntru_params</a> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the decrypted string or NULL on failure </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

View File

@ -0,0 +1,3 @@
<map id="ntru_decrypt.h" name="ntru_decrypt.h">
<area shape="rect" id="node3" href="$ntru_8h.html" title="public API, basic data types " alt="" coords="177,83,231,112"/>
</map>

View File

@ -0,0 +1 @@
9a0ebf414f722c6e4aef555926b9d319

BIN
ntru__decrypt_8h__incl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,138 @@
<!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_decrypt.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_decrypt.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="ntru__decrypt_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_DECRYPT_H_</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#define PUBLIC_NTRU_DECRYPT_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;<a class="code" href="ntru_8h.html">ntru.h</a>&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#include &lt;fmpz_poly.h&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &lt;fmpz.h&gt;</span></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"> 39</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="keywordtype">string</span> *</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<a class="code" href="ntru__decrypt_8h.html#aa9cc61eec0c119e48762f6078a14527b">ntru_decrypt_string</a>(</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="keyword">const</span> <span class="keywordtype">string</span> *encr_msg,</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keyword">const</span> fmpz_poly_t priv_key,</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keyword">const</span> fmpz_poly_t priv_key_inv,</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keyword">const</span> <a class="code" href="structntru__params.html">ntru_params</a> *params);</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* PUBLIC_NTRU_DECRYPT_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="ntru_8h_html"><div class="ttname"><a href="ntru_8h.html">ntru.h</a></div><div class="ttdoc">public API, basic data types </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#l00048">ntru.h:48</a></div></div>
<div class="ttc" id="ntru__decrypt_8h_html_aa9cc61eec0c119e48762f6078a14527b"><div class="ttname"><a href="ntru__decrypt_8h.html#aa9cc61eec0c119e48762f6078a14527b">ntru_decrypt_string</a></div><div class="ttdeci">string * ntru_decrypt_string(const string *encr_msg, const fmpz_poly_t priv_key, const fmpz_poly_t priv_key_inv, const ntru_params *params)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

173
ntru__encrypt_8h.html Normal file
View File

@ -0,0 +1,173 @@
<!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_encrypt.h File Reference</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>
<!-- 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><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">ntru_encrypt.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>public API, encryption
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="ntru_8h_source.html">ntru.h</a>&gt;</code><br />
<code>#include &lt;fmpz_poly.h&gt;</code><br />
<code>#include &lt;fmpz.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for ntru_encrypt.h:</div>
<div class="dyncontent">
<div class="center"><img src="ntru__encrypt_8h__incl.png" border="0" usemap="#ntru__encrypt_8h" alt=""/></div>
<map name="ntru__encrypt_8h" id="ntru__encrypt_8h">
<area shape="rect" id="node3" href="ntru_8h.html" title="public API, basic data types " alt="" coords="177,83,231,112"/></map>
</div>
</div>
<p><a href="ntru__encrypt_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a0bb47c0fa0dd4a4cfa0c0f7a722fd554"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structstring.html">string</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__encrypt_8h.html#a0bb47c0fa0dd4a4cfa0c0f7a722fd554">ntru_encrypt_string</a> (const <a class="el" href="structstring.html">string</a> *msg, const fmpz_poly_t pub_key, const fmpz_poly_t rnd, const <a class="el" href="structntru__params.html">ntru_params</a> *params)</td></tr>
<tr class="separator:a0bb47c0fa0dd4a4cfa0c0f7a722fd554"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>public API, encryption </p>
<p>This file holds the public API of encryption of the pqc NTRU implementation and is meant to be installed on the client system. </p>
<p>Definition in file <a class="el" href="ntru__encrypt_8h_source.html">ntru_encrypt.h</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a0bb47c0fa0dd4a4cfa0c0f7a722fd554"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structstring.html">string</a>* ntru_encrypt_string </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structstring.html">string</a> *&#160;</td>
<td class="paramname"><em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const fmpz_poly_t&#160;</td>
<td class="paramname"><em>pub_key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const fmpz_poly_t&#160;</td>
<td class="paramname"><em>rnd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structntru__params.html">ntru_params</a> *&#160;</td>
<td class="paramname"><em>params</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Encrypt a message in the form of a null-terminated char array and return a string.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>the message </td></tr>
<tr><td class="paramname">pub_key</td><td>the public key </td></tr>
<tr><td class="paramname">rnd</td><td>the random poly (should have relatively small coefficients, but not restricted to {-1, 0, 1}) </td></tr>
<tr><td class="paramname">params</td><td><a class="el" href="structntru__params.html">ntru_params</a> the ntru context </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the newly allocated encrypted string, NULL on failure </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

View File

@ -0,0 +1,3 @@
<map id="ntru_encrypt.h" name="ntru_encrypt.h">
<area shape="rect" id="node3" href="$ntru_8h.html" title="public API, basic data types " alt="" coords="177,83,231,112"/>
</map>

View File

@ -0,0 +1 @@
4626adf1f32ed42deb2e7611489d882e

BIN
ntru__encrypt_8h__incl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,138 @@
<!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_encrypt.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_encrypt.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="ntru__encrypt_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_ENCRYPT_H_</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#define PUBLIC_NTRU_ENCRYPT_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;<a class="code" href="ntru_8h.html">ntru.h</a>&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#include &lt;fmpz_poly.h&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &lt;fmpz.h&gt;</span></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"> 39</span>&#160;</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="keywordtype">string</span> *</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<a class="code" href="ntru__encrypt_8h.html#a0bb47c0fa0dd4a4cfa0c0f7a722fd554">ntru_encrypt_string</a>(</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keyword">const</span> <span class="keywordtype">string</span> *msg,</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keyword">const</span> fmpz_poly_t pub_key,</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keyword">const</span> fmpz_poly_t rnd,</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="keyword">const</span> <a class="code" href="structntru__params.html">ntru_params</a> *params);</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* PUBLIC_NTRU_ENCRYPT_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="ntru_8h_html"><div class="ttname"><a href="ntru_8h.html">ntru.h</a></div><div class="ttdoc">public API, basic data types </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#l00048">ntru.h:48</a></div></div>
<div class="ttc" id="ntru__encrypt_8h_html_a0bb47c0fa0dd4a4cfa0c0f7a722fd554"><div class="ttname"><a href="ntru__encrypt_8h.html#a0bb47c0fa0dd4a4cfa0c0f7a722fd554">ntru_encrypt_string</a></div><div class="ttdeci">string * ntru_encrypt_string(const string *msg, const fmpz_poly_t pub_key, const fmpz_poly_t rnd, const ntru_params *params)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

410
ntru__keypair_8h.html Normal file
View File

@ -0,0 +1,410 @@
<!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_keypair.h File Reference</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>
<!-- 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><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">ntru_keypair.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>public API, key handling
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="ntru_8h_source.html">ntru.h</a>&gt;</code><br />
<code>#include &lt;fmpz_poly.h&gt;</code><br />
<code>#include &lt;fmpz.h&gt;</code><br />
<code>#include &lt;stdbool.h&gt;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for ntru_keypair.h:</div>
<div class="dyncontent">
<div class="center"><img src="ntru__keypair_8h__incl.png" border="0" usemap="#ntru__keypair_8h" alt=""/></div>
<map name="ntru__keypair_8h" id="ntru__keypair_8h">
<area shape="rect" id="node3" href="ntru_8h.html" title="public API, basic data types " alt="" coords="165,83,219,112"/></map>
</div>
</div>
<p><a href="ntru__keypair_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkeypair.html">keypair</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:aacfc9254c7939584924ab9d27ba6f504"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structkeypair.html">keypair</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__keypair_8h.html#aacfc9254c7939584924ab9d27ba6f504">keypair</a></td></tr>
<tr class="separator:aacfc9254c7939584924ab9d27ba6f504"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a2917137d0281aee3157e348581cef3a9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__keypair_8h.html#a2917137d0281aee3157e348581cef3a9">ntru_create_keypair</a> (<a class="el" href="structkeypair.html">keypair</a> *pair, const fmpz_poly_t f, const fmpz_poly_t g, const <a class="el" href="structntru__params.html">ntru_params</a> *params)</td></tr>
<tr class="separator:a2917137d0281aee3157e348581cef3a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c1eb586b7b1c46d1a43147c88e0b25f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__keypair_8h.html#a4c1eb586b7b1c46d1a43147c88e0b25f">export_public_key</a> (char const *const filename, const fmpz_poly_t pub, const <a class="el" href="structntru__params.html">ntru_params</a> *params)</td></tr>
<tr class="separator:a4c1eb586b7b1c46d1a43147c88e0b25f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4fa7bc1bbfb224f02a5aa8c498d7107"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__keypair_8h.html#ab4fa7bc1bbfb224f02a5aa8c498d7107">export_priv_key</a> (char const *const filename, const fmpz_poly_t priv, const <a class="el" href="structntru__params.html">ntru_params</a> *params)</td></tr>
<tr class="separator:ab4fa7bc1bbfb224f02a5aa8c498d7107"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fedb1c2bbcec20c67244e91987a7a77"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__keypair_8h.html#a9fedb1c2bbcec20c67244e91987a7a77">import_public_key</a> (fmpz_poly_t pub, char const *const filename, const <a class="el" href="structntru__params.html">ntru_params</a> *params)</td></tr>
<tr class="separator:a9fedb1c2bbcec20c67244e91987a7a77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d387f6329b9bf79e4f9e8286a5d3337"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__keypair_8h.html#a0d387f6329b9bf79e4f9e8286a5d3337">import_priv_key</a> (fmpz_poly_t priv, fmpz_poly_t priv_inv, char const *const filename, const <a class="el" href="structntru__params.html">ntru_params</a> *params)</td></tr>
<tr class="separator:a0d387f6329b9bf79e4f9e8286a5d3337"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5279c4990bc22bb9e735fe36372a6786"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__keypair_8h.html#a5279c4990bc22bb9e735fe36372a6786">ntru_delete_keypair</a> (<a class="el" href="structkeypair.html">keypair</a> *pair)</td></tr>
<tr class="separator:a5279c4990bc22bb9e735fe36372a6786"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>public API, key handling </p>
<p>This file holds the public API of generating, exporting and importing public and private keys of the pqc NTRU implementation and is meant to be installed on the client system. </p>
<p>Definition in file <a class="el" href="ntru__keypair_8h_source.html">ntru_keypair.h</a>.</p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="aacfc9254c7939584924ab9d27ba6f504"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structkeypair.html">keypair</a> <a class="el" href="structkeypair.html">keypair</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="ntru__keypair_8h_source.html#l00042">42</a> of file <a class="el" href="ntru__keypair_8h_source.html">ntru_keypair.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ab4fa7bc1bbfb224f02a5aa8c498d7107"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool export_priv_key </td>
<td>(</td>
<td class="paramtype">char const *const&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const fmpz_poly_t&#160;</td>
<td class="paramname"><em>priv</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structntru__params.html">ntru_params</a> *&#160;</td>
<td class="paramname"><em>params</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Export the private key to a file.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>the file to save the private key into </td></tr>
<tr><td class="paramname">priv</td><td>the private key </td></tr>
<tr><td class="paramname">params</td><td>the NTRU context </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true for success, false if any of the file operations failed </dd></dl>
</div>
</div>
<a class="anchor" id="a4c1eb586b7b1c46d1a43147c88e0b25f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool export_public_key </td>
<td>(</td>
<td class="paramtype">char const *const&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const fmpz_poly_t&#160;</td>
<td class="paramname"><em>pub</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structntru__params.html">ntru_params</a> *&#160;</td>
<td class="paramname"><em>params</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Export the public key to a file.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>the file to save the public key into </td></tr>
<tr><td class="paramname">pub</td><td>the public key </td></tr>
<tr><td class="paramname">params</td><td>the NTRU context </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true for success, false if any of the file operations failed </dd></dl>
</div>
</div>
<a class="anchor" id="a0d387f6329b9bf79e4f9e8286a5d3337"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool import_priv_key </td>
<td>(</td>
<td class="paramtype">fmpz_poly_t&#160;</td>
<td class="paramname"><em>priv</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">fmpz_poly_t&#160;</td>
<td class="paramname"><em>priv_inv</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char const *const&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structntru__params.html">ntru_params</a> *&#160;</td>
<td class="paramname"><em>params</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Import the private key from a file and store him along with his inverse.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">priv</td><td>where to save the private key, must be initialized [out] </td></tr>
<tr><td class="paramname">priv_inv</td><td>where to save the inverse of the private key, must be initialized [out] </td></tr>
<tr><td class="paramname">filename</td><td>the file to get the private key from </td></tr>
<tr><td class="paramname">params</td><td>the NTRU context </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true for success, false if any of the file operations failed </dd></dl>
</div>
</div>
<a class="anchor" id="a9fedb1c2bbcec20c67244e91987a7a77"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool import_public_key </td>
<td>(</td>
<td class="paramtype">fmpz_poly_t&#160;</td>
<td class="paramname"><em>pub</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char const *const&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structntru__params.html">ntru_params</a> *&#160;</td>
<td class="paramname"><em>params</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Import the public key from a file.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pub</td><td>where to save the public key, must be initialized [out] </td></tr>
<tr><td class="paramname">filename</td><td>the file to get the public key from </td></tr>
<tr><td class="paramname">params</td><td>the NTRU context </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true for success, false if any of the file operations failed </dd></dl>
</div>
</div>
<a class="anchor" id="a2917137d0281aee3157e348581cef3a9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ntru_create_keypair </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structkeypair.html">keypair</a> *&#160;</td>
<td class="paramname"><em>pair</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const fmpz_poly_t&#160;</td>
<td class="paramname"><em>f</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const fmpz_poly_t&#160;</td>
<td class="paramname"><em>g</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structntru__params.html">ntru_params</a> *&#160;</td>
<td class="paramname"><em>params</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates an NTRU key pair, consisting of public and private components.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pair</td><td>store private and public components here (the polynomials inside the struct will be automatically initialized) [out] </td></tr>
<tr><td class="paramname">f</td><td>a random ternary polynomial </td></tr>
<tr><td class="paramname">g</td><td>a random ternary polynomial </td></tr>
<tr><td class="paramname">params</td><td>the NTRU context </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true for success, false if f or g are not invertible (then the caller has to try different ones) </dd></dl>
</div>
</div>
<a class="anchor" id="a5279c4990bc22bb9e735fe36372a6786"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ntru_delete_keypair </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structkeypair.html">keypair</a> *&#160;</td>
<td class="paramname"><em>pair</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Used to free the inner structure of a keypair. This will not call free() on the pair itself.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pair</td><td>the pair to free the inner structure of </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

View File

@ -0,0 +1,3 @@
<map id="ntru_keypair.h" name="ntru_keypair.h">
<area shape="rect" id="node3" href="$ntru_8h.html" title="public API, basic data types " alt="" coords="165,83,219,112"/>
</map>

View File

@ -0,0 +1 @@
964188e9154e9915cc8a24fecb4da5db

BIN
ntru__keypair_8h__incl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,183 @@
<!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_keypair.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_keypair.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="ntru__keypair_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="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#ifndef PUBLIC_NTRU_KEYPAIR_H_</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#define PUBLIC_NTRU_KEYPAIR_H_</span></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;<a class="code" href="ntru_8h.html">ntru.h</a>&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#include &lt;fmpz_poly.h&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &lt;fmpz.h&gt;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="preprocessor">#include &lt;stdbool.h&gt;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</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"><a class="line" href="ntru__keypair_8h.html#aacfc9254c7939584924ab9d27ba6f504"> 42</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structkeypair.html">keypair</a> <a class="code" href="structkeypair.html">keypair</a>;</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="structkeypair.html"> 49</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structkeypair.html">keypair</a> {</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="structkeypair.html#a9e9805ad001216da53f2c57accb288e1"> 54</a></span>&#160; fmpz_poly_t <a class="code" href="structkeypair.html#a9e9805ad001216da53f2c57accb288e1">priv</a>;</div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structkeypair.html#a9e63f1d275b91c9d9716fb4069461799"> 59</a></span>&#160; fmpz_poly_t <a class="code" href="structkeypair.html#a9e63f1d275b91c9d9716fb4069461799">priv_inv</a>;</div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="structkeypair.html#afa635c70f233d0b7449b4a17513646c4"> 64</a></span>&#160; fmpz_poly_t <a class="code" href="structkeypair.html#afa635c70f233d0b7449b4a17513646c4">pub</a>;</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;};</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="keywordtype">bool</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;<a class="code" href="ntru__keypair_8h.html#a2917137d0281aee3157e348581cef3a9">ntru_create_keypair</a>(</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="structkeypair.html">keypair</a> *pair,</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keyword">const</span> fmpz_poly_t f,</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keyword">const</span> fmpz_poly_t g,</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keyword">const</span> <a class="code" href="structntru__params.html">ntru_params</a> *params);</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="keywordtype">bool</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;<a class="code" href="ntru__keypair_8h.html#a4c1eb586b7b1c46d1a43147c88e0b25f">export_public_key</a>(<span class="keywordtype">char</span> <span class="keyword">const</span> * <span class="keyword">const</span> filename,</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keyword">const</span> fmpz_poly_t pub,</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keyword">const</span> <a class="code" href="structntru__params.html">ntru_params</a> *params);</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;<span class="keywordtype">bool</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;<a class="code" href="ntru__keypair_8h.html#ab4fa7bc1bbfb224f02a5aa8c498d7107">export_priv_key</a>(<span class="keywordtype">char</span> <span class="keyword">const</span> * <span class="keyword">const</span> filename,</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="keyword">const</span> fmpz_poly_t priv,</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="keyword">const</span> <a class="code" href="structntru__params.html">ntru_params</a> *params);</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;<span class="keywordtype">bool</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;<a class="code" href="ntru__keypair_8h.html#a9fedb1c2bbcec20c67244e91987a7a77">import_public_key</a>(fmpz_poly_t pub,</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="keywordtype">char</span> <span class="keyword">const</span> * <span class="keyword">const</span> filename,</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="keyword">const</span> <a class="code" href="structntru__params.html">ntru_params</a> *params);</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;<span class="keywordtype">bool</span></div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;<a class="code" href="ntru__keypair_8h.html#a0d387f6329b9bf79e4f9e8286a5d3337">import_priv_key</a>(fmpz_poly_t priv,</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; fmpz_poly_t priv_inv,</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keywordtype">char</span> <span class="keyword">const</span> * <span class="keyword">const</span> filename,</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keyword">const</span> <a class="code" href="structntru__params.html">ntru_params</a> *params);</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;<a class="code" href="ntru__keypair_8h.html#a5279c4990bc22bb9e735fe36372a6786">ntru_delete_keypair</a>(<a class="code" href="structkeypair.html">keypair</a> *pair);</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* PUBLIC_NTRU_KEYPAIR_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="ntru_8h_html"><div class="ttname"><a href="ntru_8h.html">ntru.h</a></div><div class="ttdoc">public API, basic data types </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#l00048">ntru.h:48</a></div></div>
<div class="ttc" id="ntru__keypair_8h_html_a4c1eb586b7b1c46d1a43147c88e0b25f"><div class="ttname"><a href="ntru__keypair_8h.html#a4c1eb586b7b1c46d1a43147c88e0b25f">export_public_key</a></div><div class="ttdeci">bool export_public_key(char const *const filename, const fmpz_poly_t pub, const ntru_params *params)</div></div>
<div class="ttc" id="structkeypair_html_a9e63f1d275b91c9d9716fb4069461799"><div class="ttname"><a href="structkeypair.html#a9e63f1d275b91c9d9716fb4069461799">keypair::priv_inv</a></div><div class="ttdeci">fmpz_poly_t priv_inv</div><div class="ttdef"><b>Definition:</b> <a href="ntru__keypair_8h_source.html#l00059">ntru_keypair.h:59</a></div></div>
<div class="ttc" id="ntru__keypair_8h_html_a2917137d0281aee3157e348581cef3a9"><div class="ttname"><a href="ntru__keypair_8h.html#a2917137d0281aee3157e348581cef3a9">ntru_create_keypair</a></div><div class="ttdeci">bool ntru_create_keypair(keypair *pair, const fmpz_poly_t f, const fmpz_poly_t g, const ntru_params *params)</div></div>
<div class="ttc" id="ntru__keypair_8h_html_a0d387f6329b9bf79e4f9e8286a5d3337"><div class="ttname"><a href="ntru__keypair_8h.html#a0d387f6329b9bf79e4f9e8286a5d3337">import_priv_key</a></div><div class="ttdeci">bool import_priv_key(fmpz_poly_t priv, fmpz_poly_t priv_inv, char const *const filename, const ntru_params *params)</div></div>
<div class="ttc" id="structkeypair_html_afa635c70f233d0b7449b4a17513646c4"><div class="ttname"><a href="structkeypair.html#afa635c70f233d0b7449b4a17513646c4">keypair::pub</a></div><div class="ttdeci">fmpz_poly_t pub</div><div class="ttdef"><b>Definition:</b> <a href="ntru__keypair_8h_source.html#l00064">ntru_keypair.h:64</a></div></div>
<div class="ttc" id="structkeypair_html_a9e9805ad001216da53f2c57accb288e1"><div class="ttname"><a href="structkeypair.html#a9e9805ad001216da53f2c57accb288e1">keypair::priv</a></div><div class="ttdeci">fmpz_poly_t priv</div><div class="ttdef"><b>Definition:</b> <a href="ntru__keypair_8h_source.html#l00054">ntru_keypair.h:54</a></div></div>
<div class="ttc" id="structkeypair_html"><div class="ttname"><a href="structkeypair.html">keypair</a></div><div class="ttdef"><b>Definition:</b> <a href="ntru__keypair_8h_source.html#l00049">ntru_keypair.h:49</a></div></div>
<div class="ttc" id="ntru__keypair_8h_html_a9fedb1c2bbcec20c67244e91987a7a77"><div class="ttname"><a href="ntru__keypair_8h.html#a9fedb1c2bbcec20c67244e91987a7a77">import_public_key</a></div><div class="ttdeci">bool import_public_key(fmpz_poly_t pub, char const *const filename, const ntru_params *params)</div></div>
<div class="ttc" id="ntru__keypair_8h_html_ab4fa7bc1bbfb224f02a5aa8c498d7107"><div class="ttname"><a href="ntru__keypair_8h.html#ab4fa7bc1bbfb224f02a5aa8c498d7107">export_priv_key</a></div><div class="ttdeci">bool export_priv_key(char const *const filename, const fmpz_poly_t priv, const ntru_params *params)</div></div>
<div class="ttc" id="ntru__keypair_8h_html_a5279c4990bc22bb9e735fe36372a6786"><div class="ttname"><a href="ntru__keypair_8h.html#a5279c4990bc22bb9e735fe36372a6786">ntru_delete_keypair</a></div><div class="ttdeci">void ntru_delete_keypair(keypair *pair)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

220
ntru__rnd_8h.html Normal file
View File

@ -0,0 +1,220 @@
<!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_rnd.h File Reference</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>
<!-- 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><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">ntru_rnd.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>public API, random polynomials
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="ntru_8h_source.html">ntru.h</a>&gt;</code><br />
<code>#include &lt;fmpz_poly.h&gt;</code><br />
<code>#include &lt;fmpz.h&gt;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for ntru_rnd.h:</div>
<div class="dyncontent">
<div class="center"><img src="ntru__rnd_8h__incl.png" border="0" usemap="#ntru__rnd_8h" alt=""/></div>
<map name="ntru__rnd_8h" id="ntru__rnd_8h">
<area shape="rect" id="node3" href="ntru_8h.html" title="public API, basic data types " alt="" coords="191,83,244,112"/></map>
</div>
</div>
<p><a href="ntru__rnd_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad85ebfb1cb4b4942942213b750812cf0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__rnd_8h.html#ad85ebfb1cb4b4942942213b750812cf0">get_rnd_int</a> (void)</td></tr>
<tr class="separator:ad85ebfb1cb4b4942942213b750812cf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99e4820cab7157eb1e16109e21dac81f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__rnd_8h.html#a99e4820cab7157eb1e16109e21dac81f">get_urnd_int</a> (void)</td></tr>
<tr class="separator:a99e4820cab7157eb1e16109e21dac81f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a916a55c609c172ae4e48896032b36e47"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ntru__rnd_8h.html#a916a55c609c172ae4e48896032b36e47">ntru_get_rnd_tern_poly_num</a> (fmpz_poly_t poly, const <a class="el" href="structntru__params.html">ntru_params</a> *params, uint32_t num_ones, uint32_t num_neg_ones, int(*rnd_int)(void))</td></tr>
<tr class="separator:a916a55c609c172ae4e48896032b36e47"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>public API, random polynomials </p>
<p>This file holds the public API of generating random ternary polynomials of the pqc NTRU implementation and is meant to be installed on the client system. </p>
<p>Definition in file <a class="el" href="ntru__rnd_8h_source.html">ntru_rnd.h</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ad85ebfb1cb4b4942942213b750812cf0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int get_rnd_int </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a random integer from /dev/random.</p>
<dl class="section return"><dt>Returns</dt><dd>random integer </dd></dl>
</div>
</div>
<a class="anchor" id="a99e4820cab7157eb1e16109e21dac81f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int get_urnd_int </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a pseudo random integer from /dev/urandom.</p>
<dl class="section return"><dt>Returns</dt><dd>pseudo-random integer. </dd></dl>
</div>
</div>
<a class="anchor" id="a916a55c609c172ae4e48896032b36e47"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ntru_get_rnd_tern_poly_num </td>
<td>(</td>
<td class="paramtype">fmpz_poly_t&#160;</td>
<td class="paramname"><em>poly</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structntru__params.html">ntru_params</a> *&#160;</td>
<td class="paramname"><em>params</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>num_ones</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>num_neg_ones</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int(*)(void)&#160;</td>
<td class="paramname"><em>rnd_int</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a random ternary polynomial with specified numbers of 1 coefficients and -1 coefficients.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">poly</td><td>the resulting random polynomial [out] </td></tr>
<tr><td class="paramname">params</td><td>the NTRU context </td></tr>
<tr><td class="paramname">num_ones</td><td>the number of 1 coefficients </td></tr>
<tr><td class="paramname">num_neg_ones</td><td>the number of -1 coefficients </td></tr>
<tr><td class="paramname">rnd_int</td><td>function callback which should return a random integer </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

3
ntru__rnd_8h__incl.map Normal file
View File

@ -0,0 +1,3 @@
<map id="ntru_rnd.h" name="ntru_rnd.h">
<area shape="rect" id="node3" href="$ntru_8h.html" title="public API, basic data types " alt="" coords="191,83,244,112"/>
</map>

1
ntru__rnd_8h__incl.md5 Normal file
View File

@ -0,0 +1 @@
874b3240f75de52383673655e3bc01bd

BIN
ntru__rnd_8h__incl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

147
ntru__rnd_8h_source.html Normal file
View File

@ -0,0 +1,147 @@
<!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_rnd.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_rnd.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="ntru__rnd_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="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#ifndef PUBLIC_NTRU_RND_H_</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#define PUBLIC_NTRU_RND_H_</span></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;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="ntru_8h.html">ntru.h</a>&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &lt;fmpz_poly.h&gt;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="preprocessor">#include &lt;fmpz.h&gt;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<a class="code" href="ntru__rnd_8h.html#ad85ebfb1cb4b4942942213b750812cf0">get_rnd_int</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<a class="code" href="ntru__rnd_8h.html#a99e4820cab7157eb1e16109e21dac81f">get_urnd_int</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<a class="code" href="ntru__rnd_8h.html#a916a55c609c172ae4e48896032b36e47">ntru_get_rnd_tern_poly_num</a>(fmpz_poly_t poly,</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keyword">const</span> <a class="code" href="structntru__params.html">ntru_params</a> *params,</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; uint32_t num_ones,</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; uint32_t num_neg_ones,</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordtype">int</span> (*rnd_int)(<span class="keywordtype">void</span>));</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* PUBLIC_NTRU_RND_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="ntru__rnd_8h_html_a99e4820cab7157eb1e16109e21dac81f"><div class="ttname"><a href="ntru__rnd_8h.html#a99e4820cab7157eb1e16109e21dac81f">get_urnd_int</a></div><div class="ttdeci">int get_urnd_int(void)</div></div>
<div class="ttc" id="ntru_8h_html"><div class="ttname"><a href="ntru_8h.html">ntru.h</a></div><div class="ttdoc">public API, basic data types </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#l00048">ntru.h:48</a></div></div>
<div class="ttc" id="ntru__rnd_8h_html_a916a55c609c172ae4e48896032b36e47"><div class="ttname"><a href="ntru__rnd_8h.html#a916a55c609c172ae4e48896032b36e47">ntru_get_rnd_tern_poly_num</a></div><div class="ttdeci">void ntru_get_rnd_tern_poly_num(fmpz_poly_t poly, const ntru_params *params, uint32_t num_ones, uint32_t num_neg_ones, int(*rnd_int)(void))</div></div>
<div class="ttc" id="ntru__rnd_8h_html_ad85ebfb1cb4b4942942213b750812cf0"><div class="ttname"><a href="ntru__rnd_8h.html#ad85ebfb1cb4b4942942213b750812cf0">get_rnd_int</a></div><div class="ttdeci">int get_rnd_int(void)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 13 2014 21:02:50 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>

BIN
open.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

26
search/all_0.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_0.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

4
search/all_0.js Normal file
View File

@ -0,0 +1,4 @@
var searchData=
[
['doxygen_2edox',['doxygen.dox',['../doxygen_8dox.html',1,'']]]
];

26
search/all_1.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_1.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

5
search/all_1.js Normal file
View File

@ -0,0 +1,5 @@
var searchData=
[
['export_5fpriv_5fkey',['export_priv_key',['../ntru__keypair_8h.html#ab4fa7bc1bbfb224f02a5aa8c498d7107',1,'ntru_keypair.h']]],
['export_5fpublic_5fkey',['export_public_key',['../ntru__keypair_8h.html#a4c1eb586b7b1c46d1a43147c88e0b25f',1,'ntru_keypair.h']]]
];

26
search/all_2.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_2.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

5
search/all_2.js Normal file
View File

@ -0,0 +1,5 @@
var searchData=
[
['get_5frnd_5fint',['get_rnd_int',['../ntru__rnd_8h.html#ad85ebfb1cb4b4942942213b750812cf0',1,'ntru_rnd.h']]],
['get_5furnd_5fint',['get_urnd_int',['../ntru__rnd_8h.html#a99e4820cab7157eb1e16109e21dac81f',1,'ntru_rnd.h']]]
];

26
search/all_3.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_3.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

6
search/all_3.js Normal file
View File

@ -0,0 +1,6 @@
var searchData=
[
['import_5fpriv_5fkey',['import_priv_key',['../ntru__keypair_8h.html#a0d387f6329b9bf79e4f9e8286a5d3337',1,'ntru_keypair.h']]],
['import_5fpublic_5fkey',['import_public_key',['../ntru__keypair_8h.html#a9fedb1c2bbcec20c67244e91987a7a77',1,'ntru_keypair.h']]],
['index_20page',['Index Page',['../index.html',1,'']]]
];

26
search/all_4.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_4.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

4
search/all_4.js Normal file
View File

@ -0,0 +1,4 @@
var searchData=
[
['keypair',['keypair',['../structkeypair.html',1,'keypair'],['../ntru__keypair_8h.html#aacfc9254c7939584924ab9d27ba6f504',1,'keypair():&#160;ntru_keypair.h']]]
];

26
search/all_5.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_5.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

4
search/all_5.js Normal file
View File

@ -0,0 +1,4 @@
var searchData=
[
['len',['len',['../structstring.html#aa6bcf0353fd5cf2f374a9b1dd0e4a73a',1,'string']]]
];

26
search/all_6.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_6.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

15
search/all_6.js Normal file
View File

@ -0,0 +1,15 @@
var searchData=
[
['n',['N',['../structntru__params.html#afb8425ee3db2b917b3c4e8d9b75bd3ff',1,'ntru_params']]],
['ntru_2eh',['ntru.h',['../ntru_8h.html',1,'']]],
['ntru_5fcreate_5fkeypair',['ntru_create_keypair',['../ntru__keypair_8h.html#a2917137d0281aee3157e348581cef3a9',1,'ntru_keypair.h']]],
['ntru_5fdecrypt_2eh',['ntru_decrypt.h',['../ntru__decrypt_8h.html',1,'']]],
['ntru_5fdecrypt_5fstring',['ntru_decrypt_string',['../ntru__decrypt_8h.html#aa9cc61eec0c119e48762f6078a14527b',1,'ntru_decrypt.h']]],
['ntru_5fdelete_5fkeypair',['ntru_delete_keypair',['../ntru__keypair_8h.html#a5279c4990bc22bb9e735fe36372a6786',1,'ntru_keypair.h']]],
['ntru_5fencrypt_2eh',['ntru_encrypt.h',['../ntru__encrypt_8h.html',1,'']]],
['ntru_5fencrypt_5fstring',['ntru_encrypt_string',['../ntru__encrypt_8h.html#a0bb47c0fa0dd4a4cfa0c0f7a722fd554',1,'ntru_encrypt.h']]],
['ntru_5fget_5frnd_5ftern_5fpoly_5fnum',['ntru_get_rnd_tern_poly_num',['../ntru__rnd_8h.html#a916a55c609c172ae4e48896032b36e47',1,'ntru_rnd.h']]],
['ntru_5fkeypair_2eh',['ntru_keypair.h',['../ntru__keypair_8h.html',1,'']]],
['ntru_5fparams',['ntru_params',['../structntru__params.html',1,'ntru_params'],['../ntru_8h.html#a2f326c88fc033eca78a47ee8d387c592',1,'ntru_params():&#160;ntru.h']]],
['ntru_5frnd_2eh',['ntru_rnd.h',['../ntru__rnd_8h.html',1,'']]]
];

26
search/all_7.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_7.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

15
search/all_7.js Normal file
View File

@ -0,0 +1,15 @@
var searchData=
[
['p',['p',['../structntru__params.html#a41b368825e1eb126604e13e8f549ec8f',1,'ntru_params']]],
['poly_5fdelete',['poly_delete',['../ntru_8h.html#a27ff2116f70bcbf5028219adcae4c5f0',1,'ntru.h']]],
['poly_5fdelete_5fall',['poly_delete_all',['../ntru_8h.html#a83297bc2ab5b6e7ce42553570dd8268f',1,'ntru.h']]],
['poly_5fdelete_5farray',['poly_delete_array',['../ntru_8h.html#a3f53c63383ff301b20dcede0783869a7',1,'ntru.h']]],
['poly_5fdraw',['poly_draw',['../ntru_8h.html#a80a8ce0f2944bc3df94291ef2f781498',1,'ntru.h']]],
['poly_5fdraw_5fpretty',['poly_draw_pretty',['../ntru_8h.html#aec098d00160d2d502eb1f8a7c3fa5453',1,'ntru.h']]],
['poly_5fnew',['poly_new',['../ntru_8h.html#a20f86085d5eb5372fd25dc270069d38c',1,'ntru.h']]],
['prints',['prints',['../ntru_8h.html#a55d4ce182c335ff6cca360909a7be395',1,'ntru.h']]],
['priv',['priv',['../structkeypair.html#a9e9805ad001216da53f2c57accb288e1',1,'keypair']]],
['priv_5finv',['priv_inv',['../structkeypair.html#a9e63f1d275b91c9d9716fb4069461799',1,'keypair']]],
['ptr',['ptr',['../structstring.html#aa1b2f3a2ddd1ed38245b8d4590aadf93',1,'string']]],
['pub',['pub',['../structkeypair.html#afa635c70f233d0b7449b4a17513646c4',1,'keypair']]]
];

26
search/all_8.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_8.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

4
search/all_8.js Normal file
View File

@ -0,0 +1,4 @@
var searchData=
[
['q',['q',['../structntru__params.html#a29680750bda49dc93e61a752b2f2a0f7',1,'ntru_params']]]
];

26
search/all_9.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_9.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

4
search/all_9.js Normal file
View File

@ -0,0 +1,4 @@
var searchData=
[
['read_5ffile',['read_file',['../ntru_8h.html#a348c2a56837571f410d44631abc09dc4',1,'ntru.h']]]
];

26
search/all_a.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_a.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

5
search/all_a.js Normal file
View File

@ -0,0 +1,5 @@
var searchData=
[
['string',['string',['../structstring.html',1,'string'],['../ntru_8h.html#a63e2e3ee7db5274c6a3929edfc07c6c9',1,'string():&#160;ntru.h']]],
['string_5fdelete',['string_delete',['../ntru_8h.html#ac1b5f66fbbbdfc7901357ddcfec52e5a',1,'ntru.h']]]
];

26
search/all_b.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_b.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More