<!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"/> <title>BeeCrypt: include/beecrypt/dhies.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">BeeCrypt <span id="projectnumber">4.2.1</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <h1>include/beecrypt/dhies.h</h1> </div> </div> <div class="contents"> <a href="dhies_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> * Copyright (c) 2000, 2001, 2002, 2005 X-Way Rights BV</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * This library is free software; you can redistribute it and/or</span> <a name="l00005"></a>00005 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span> <a name="l00006"></a>00006 <span class="comment"> * License as published by the Free Software Foundation; either</span> <a name="l00007"></a>00007 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span> <a name="l00008"></a>00008 <span class="comment"> *</span> <a name="l00009"></a>00009 <span class="comment"> * This library is distributed in the hope that it will be useful,</span> <a name="l00010"></a>00010 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00011"></a>00011 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00012"></a>00012 <span class="comment"> * Lesser General Public License for more details.</span> <a name="l00013"></a>00013 <span class="comment"> *</span> <a name="l00014"></a>00014 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span> <a name="l00015"></a>00015 <span class="comment"> * License along with this library; if not, write to the Free Software</span> <a name="l00016"></a>00016 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span> <a name="l00017"></a>00017 <span class="comment"> *</span> <a name="l00018"></a>00018 <span class="comment"> */</span> <a name="l00019"></a>00019 <a name="l00033"></a>00033 <span class="preprocessor">#ifndef _DHIES_H</span> <a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define _DHIES_H</span> <a name="l00035"></a>00035 <span class="preprocessor"></span> <a name="l00036"></a>00036 <span class="preprocessor">#include "beecrypt/beecrypt.h"</span> <a name="l00037"></a>00037 <span class="preprocessor">#include "beecrypt/dldp.h"</span> <a name="l00038"></a>00038 <a name="l00039"></a>00039 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00040"></a><a class="code" href="structdhies__pParameters.html">00040</a> <span class="preprocessor"></span><span class="keyword">struct </span><a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a> <a class="code" href="structdhies__pParameters.html">dhies_pParameters</a> <a name="l00041"></a>00041 #else <a name="l00042"></a>00042 struct _dhies_pParameters <a name="l00043"></a>00043 #endif <a name="l00044"></a>00044 { <a name="l00045"></a><a class="code" href="structdhies__pParameters.html#adb55ff727034936cfe67d955b0b126d7">00045</a> <span class="keyword">const</span> <a class="code" href="structdldp__p.html" title="Discrete Logarithm Domain Parameters over a prime field.">dldp_p</a>* <a class="code" href="structdhies__pParameters.html#adb55ff727034936cfe67d955b0b126d7">param</a>; <a name="l00046"></a><a class="code" href="structdhies__pParameters.html#a7951f402b99e868c01ba24d88ded6559">00046</a> <span class="keyword">const</span> <a class="code" href="structhashFunction.html">hashFunction</a>* <a class="code" href="structdhies__pParameters.html#a7951f402b99e868c01ba24d88ded6559">hash</a>; <a name="l00047"></a><a class="code" href="structdhies__pParameters.html#a0c2e4b53977c7744a5f6c25bb6724166">00047</a> <span class="keyword">const</span> <a class="code" href="structblockCipher.html" title="Holds information and pointers to code specific to each cipher.">blockCipher</a>* <a class="code" href="structdhies__pParameters.html#a0c2e4b53977c7744a5f6c25bb6724166">cipher</a>; <a name="l00048"></a><a class="code" href="structdhies__pParameters.html#af90012dc6e865b218884c443f00e2cd0">00048</a> <span class="keyword">const</span> <a class="code" href="structkeyedHashFunction.html">keyedHashFunction</a>* <a class="code" href="structdhies__pParameters.html#af90012dc6e865b218884c443f00e2cd0">mac</a>; <a name="l00049"></a><a class="code" href="structdhies__pParameters.html#a35b4f2391eb5d5eb9f5e6320c82d45b9">00049</a> <span class="keywordtype">size_t</span> <a class="code" href="structdhies__pParameters.html#a35b4f2391eb5d5eb9f5e6320c82d45b9">cipherkeybits</a>; <a name="l00050"></a><a class="code" href="structdhies__pParameters.html#a6540ed105dcf65cb00d73c6eaf917c3f">00050</a> <span class="keywordtype">size_t</span> <a class="code" href="structdhies__pParameters.html#a6540ed105dcf65cb00d73c6eaf917c3f">mackeybits</a>; <a name="l00051"></a>00051 }; <a name="l00052"></a>00052 <a name="l00053"></a>00053 <span class="preprocessor">#ifndef __cplusplus</span> <a name="l00054"></a>00054 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keyword">struct </span>_dhies_pParameters <a class="code" href="structdhies__pParameters.html">dhies_pParameters</a>; <a name="l00055"></a>00055 <span class="preprocessor">#endif</span> <a name="l00056"></a>00056 <span class="preprocessor"></span> <a name="l00057"></a>00057 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00058"></a><a class="code" href="structdhies__pContext.html">00058</a> <span class="preprocessor"></span><span class="keyword">struct </span><a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a> <a class="code" href="structdhies__pContext.html">dhies_pContext</a> <a name="l00059"></a>00059 #else <a name="l00060"></a>00060 struct _dhies_pContext <a name="l00061"></a>00061 #endif <a name="l00062"></a>00062 { <a name="l00063"></a><a class="code" href="structdhies__pContext.html#a90dfa73fbb1f1a406413e27df94223ac">00063</a> <a class="code" href="structdldp__p.html" title="Discrete Logarithm Domain Parameters over a prime field.">dldp_p</a> <a class="code" href="structdhies__pContext.html#a90dfa73fbb1f1a406413e27df94223ac">param</a>; <a name="l00064"></a><a class="code" href="structdhies__pContext.html#a6bab0b936bd3005bac23286a6d4e3c8f">00064</a> <a class="code" href="structmpnumber.html">mpnumber</a> <a class="code" href="structdhies__pContext.html#a6bab0b936bd3005bac23286a6d4e3c8f">pub</a>; <a name="l00065"></a><a class="code" href="structdhies__pContext.html#a959ed4e7a85a229d1b626aa75399854e">00065</a> <a class="code" href="structmpnumber.html">mpnumber</a> <a class="code" href="structdhies__pContext.html#a959ed4e7a85a229d1b626aa75399854e">pri</a>; <a name="l00066"></a><a class="code" href="structdhies__pContext.html#acf17d0cf577805cfde28002e17b6dc4f">00066</a> <a class="code" href="structhashFunctionContext.html">hashFunctionContext</a> <a class="code" href="structdhies__pContext.html#acf17d0cf577805cfde28002e17b6dc4f">hash</a>; <a name="l00067"></a><a class="code" href="structdhies__pContext.html#a0a11cf17ca9a5850c139d03cb1511a92">00067</a> <a class="code" href="structblockCipherContext.html" title="Holds a pointer to a blockcipher as well as its parameters.">blockCipherContext</a> <a class="code" href="structdhies__pContext.html#a0a11cf17ca9a5850c139d03cb1511a92">cipher</a>; <a name="l00068"></a><a class="code" href="structdhies__pContext.html#a66d5bd9922aba530d67536a2513be66e">00068</a> <a class="code" href="structkeyedHashFunctionContext.html">keyedHashFunctionContext</a> <a class="code" href="structdhies__pContext.html#a66d5bd9922aba530d67536a2513be66e">mac</a>; <a name="l00069"></a><a class="code" href="structdhies__pContext.html#aa167a110062a6063fe395a2ccbb3ace5">00069</a> <span class="keywordtype">size_t</span> <a class="code" href="structdhies__pContext.html#aa167a110062a6063fe395a2ccbb3ace5">cipherkeybits</a>; <a name="l00070"></a><a class="code" href="structdhies__pContext.html#a8c84a4ceb8168771dfe537fe17714aa8">00070</a> <span class="keywordtype">size_t</span> <a class="code" href="structdhies__pContext.html#a8c84a4ceb8168771dfe537fe17714aa8">mackeybits</a>; <a name="l00071"></a>00071 }; <a name="l00072"></a>00072 <a name="l00073"></a>00073 <span class="preprocessor">#ifndef __cplusplus</span> <a name="l00074"></a>00074 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keyword">struct </span>_dhies_pContext <a class="code" href="structdhies__pContext.html">dhies_pContext</a>; <a name="l00075"></a>00075 <span class="preprocessor">#endif</span> <a name="l00076"></a>00076 <span class="preprocessor"></span> <a name="l00077"></a>00077 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00078"></a>00078 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { <a name="l00079"></a>00079 <span class="preprocessor">#endif</span> <a name="l00080"></a>00080 <span class="preprocessor"></span> <a name="l00081"></a>00081 <a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a> <a name="l00082"></a>00082 <span class="keywordtype">int</span> <a class="code" href="dhies_8h.html#a28cc2c3cfccc99fee986772f189a4aaf">dhies_pUsable</a>(<span class="keyword">const</span> <a class="code" href="structdhies__pParameters.html">dhies_pParameters</a>*); <a name="l00083"></a>00083 <a name="l00084"></a>00084 <a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a> <a name="l00085"></a>00085 <span class="keywordtype">int</span> <a class="code" href="dhies_8h.html#a80c7fc4283f3f3c9d9315deec3a6e3af">dhies_pContextInit</a> (<a class="code" href="structdhies__pContext.html">dhies_pContext</a>*, <span class="keyword">const</span> <a class="code" href="structdhies__pParameters.html">dhies_pParameters</a>*); <a name="l00086"></a>00086 <a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a> <a name="l00087"></a>00087 <span class="keywordtype">int</span> <a class="code" href="dhies_8h.html#a67d0f4f538fc04834ee5ed36b699d2df">dhies_pContextInitDecrypt</a>(<a class="code" href="structdhies__pContext.html">dhies_pContext</a>*, <span class="keyword">const</span> <a class="code" href="structdhies__pParameters.html">dhies_pParameters</a>*, <span class="keyword">const</span> <a class="code" href="structmpnumber.html">mpnumber</a>*); <a name="l00088"></a>00088 <a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a> <a name="l00089"></a>00089 <span class="keywordtype">int</span> <a class="code" href="dhies_8h.html#a897bef73ab35ca2aa56e1b168fdadded">dhies_pContextInitEncrypt</a>(<a class="code" href="structdhies__pContext.html">dhies_pContext</a>*, <span class="keyword">const</span> <a class="code" href="structdhies__pParameters.html">dhies_pParameters</a>*, <span class="keyword">const</span> <a class="code" href="structmpnumber.html">mpnumber</a>*); <a name="l00090"></a>00090 <a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a> <a name="l00091"></a>00091 <span class="keywordtype">int</span> <a class="code" href="dhies_8h.html#a812329806f62ee9c8d1ae3a4d77a62cd">dhies_pContextFree</a> (<a class="code" href="structdhies__pContext.html">dhies_pContext</a>*); <a name="l00092"></a>00092 <a name="l00093"></a>00093 <a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a> <a name="l00094"></a>00094 <a class="code" href="structmemchunk.html">memchunk</a>* <a class="code" href="dhies_8h.html#ae4c99c0674cffed68b9ae304a60f3e36">dhies_pContextEncrypt</a>(<a class="code" href="structdhies__pContext.html">dhies_pContext</a>*, <a class="code" href="structmpnumber.html">mpnumber</a>*, <a class="code" href="structmpnumber.html">mpnumber</a>*, <span class="keyword">const</span> <a class="code" href="structmemchunk.html">memchunk</a>*, <a class="code" href="structrandomGeneratorContext.html">randomGeneratorContext</a>*); <a name="l00095"></a>00095 <a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a> <a name="l00096"></a>00096 <a class="code" href="structmemchunk.html">memchunk</a>* <a class="code" href="dhies_8h.html#a7c56de01d62afa426ed65216e52e4f95">dhies_pContextDecrypt</a>(<a class="code" href="structdhies__pContext.html">dhies_pContext</a>*, <span class="keyword">const</span> <a class="code" href="structmpnumber.html">mpnumber</a>*, <span class="keyword">const</span> <a class="code" href="structmpnumber.html">mpnumber</a>*, <span class="keyword">const</span> <a class="code" href="structmemchunk.html">memchunk</a>*); <a name="l00097"></a>00097 <a name="l00098"></a>00098 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00099"></a>00099 <span class="preprocessor"></span>} <a name="l00100"></a>00100 <span class="preprocessor">#endif</span> <a name="l00101"></a>00101 <span class="preprocessor"></span> <a name="l00102"></a>00102 <span class="preprocessor">#endif</span> </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated on Sun Apr 10 2011 20:49:30 for BeeCrypt by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address> </body> </html>