BeeCrypt  4.2.1
dhies.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2000, 2001, 2002, 2005 X-Way Rights BV
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  */
19 
33 #ifndef _DHIES_H
34 #define _DHIES_H
35 
36 #include "beecrypt/beecrypt.h"
37 #include "beecrypt/dldp.h"
38 
39 #ifdef __cplusplus
41 #else
42 struct _dhies_pParameters
43 #endif
44 {
45  const dldp_p* param;
49  size_t cipherkeybits;
50  size_t mackeybits;
51 };
52 
53 #ifndef __cplusplus
54 typedef struct _dhies_pParameters dhies_pParameters;
55 #endif
56 
57 #ifdef __cplusplus
59 #else
60 struct _dhies_pContext
61 #endif
62 {
69  size_t cipherkeybits;
70  size_t mackeybits;
71 };
72 
73 #ifndef __cplusplus
74 typedef struct _dhies_pContext dhies_pContext;
75 #endif
76 
77 #ifdef __cplusplus
78 extern "C" {
79 #endif
80 
83 
92 
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif
Discrete Logarithm Domain Parameters over a prime field.
Definition: dldp.h:54
Holds information and pointers to code specific to each cipher.
Definition: beecrypt.h:644
int dhies_pContextFree(dhies_pContext *)
Holds a pointer to a blockcipher as well as its parameters.
Definition: beecrypt.h:760
Definition: beecrypt.h:235
Definition: beecrypt.h:436
Definition: memchunk.h:28
Definition: dhies.h:58
Definition: beecrypt.h:355
dldp_p param
Definition: dhies.h:63
keyedHashFunctionContext mac
Definition: dhies.h:68
int dhies_pContextInitEncrypt(dhies_pContext *, const dhies_pParameters *, const mpnumber *)
BeeCrypt API, headers.
Definition: beecrypt.h:494
int dhies_pContextInit(dhies_pContext *, const dhies_pParameters *)
const blockCipher * cipher
Definition: dhies.h:47
int dhies_pContextInitDecrypt(dhies_pContext *, const dhies_pParameters *, const mpnumber *)
hashFunctionContext hash
Definition: dhies.h:66
size_t mackeybits
Definition: dhies.h:70
#define BEECRYPTAPI
Definition: api.h:52
Discrete Logarithm domain parameters, headers.
const keyedHashFunction * mac
Definition: dhies.h:48
mpnumber pri
Definition: dhies.h:65
Definition: mpnumber.h:36
const dldp_p * param
Definition: dhies.h:45
const hashFunction * hash
Definition: dhies.h:46
Definition: beecrypt.h:301
int dhies_pUsable(const dhies_pParameters *)
memchunk * dhies_pContextEncrypt(dhies_pContext *, mpnumber *, mpnumber *, const memchunk *, randomGeneratorContext *)
memchunk * dhies_pContextDecrypt(dhies_pContext *, const mpnumber *, const mpnumber *, const memchunk *)
Definition: dhies.h:40
mpnumber pub
Definition: dhies.h:64
size_t cipherkeybits
Definition: dhies.h:49
size_t cipherkeybits
Definition: dhies.h:69
blockCipherContext cipher
Definition: dhies.h:67
size_t mackeybits
Definition: dhies.h:50