Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

dhaes.h

Go to the documentation of this file.
00001 /* 00002 * Copyright (c) 2000, 2001, 2002 Virtual Unlimited, B.V. 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 * 00018 */ 00019 00033 #ifndef _DHAES_H 00034 #define _DHAES_H 00035 00036 #include "beecrypt.h" 00037 #include "dldp.h" 00038 00039 typedef struct 00040 { 00041 const dldp_p* param; 00042 const hashFunction* hash; 00043 const blockCipher* cipher; 00044 const keyedHashFunction* mac; 00045 size_t cipherkeybits; 00046 size_t mackeybits; 00047 } dhaes_pParameters; 00048 00049 typedef struct 00050 { 00051 dldp_p param; 00052 mpnumber pub; 00053 mpnumber pri; 00054 hashFunctionContext hash; 00055 blockCipherContext cipher; 00056 keyedHashFunctionContext mac; 00057 size_t cipherkeybits; 00058 size_t mackeybits; 00059 } dhaes_pContext; 00060 00061 #ifdef __cplusplus 00062 extern "C" { 00063 #endif 00064 00065 BEECRYPTAPI 00066 int dhaes_pUsable(const dhaes_pParameters*); 00067 00068 BEECRYPTAPI 00069 int dhaes_pContextInit (dhaes_pContext*, const dhaes_pParameters*); 00070 BEECRYPTAPI 00071 int dhaes_pContextInitDecrypt(dhaes_pContext*, const dhaes_pParameters*, const mpnumber*); 00072 BEECRYPTAPI 00073 int dhaes_pContextInitEncrypt(dhaes_pContext*, const dhaes_pParameters*, const mpnumber*); 00074 BEECRYPTAPI 00075 int dhaes_pContextFree (dhaes_pContext*); 00076 00077 BEECRYPTAPI 00078 memchunk* dhaes_pContextEncrypt(dhaes_pContext*, mpnumber*, mpnumber*, const memchunk*, randomGeneratorContext*); 00079 BEECRYPTAPI 00080 memchunk* dhaes_pContextDecrypt(dhaes_pContext*, const mpnumber*, const mpnumber*, const memchunk*); 00081 00082 #ifdef __cplusplus 00083 } 00084 #endif 00085 00086 #endif

Generated on Sun Aug 8 18:15:27 2004 for BeeCrypt by doxygen 1.3.8