BeeCrypt
4.2.1
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
include
beecrypt
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
40
struct
BEECRYPTAPI
dhies_pParameters
41
#else
42
struct _dhies_pParameters
43
#endif
44
{
45
const
dldp_p
*
param
;
46
const
hashFunction
*
hash
;
47
const
blockCipher
*
cipher
;
48
const
keyedHashFunction
*
mac
;
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
58
struct
BEECRYPTAPI
dhies_pContext
59
#else
60
struct _dhies_pContext
61
#endif
62
{
63
dldp_p
param
;
64
mpnumber
pub
;
65
mpnumber
pri
;
66
hashFunctionContext
hash
;
67
blockCipherContext
cipher
;
68
keyedHashFunctionContext
mac
;
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
81
BEECRYPTAPI
82
int
dhies_pUsable
(
const
dhies_pParameters
*);
83
84
BEECRYPTAPI
85
int
dhies_pContextInit
(
dhies_pContext
*,
const
dhies_pParameters
*);
86
BEECRYPTAPI
87
int
dhies_pContextInitDecrypt
(
dhies_pContext
*,
const
dhies_pParameters
*,
const
mpnumber
*);
88
BEECRYPTAPI
89
int
dhies_pContextInitEncrypt
(
dhies_pContext
*,
const
dhies_pParameters
*,
const
mpnumber
*);
90
BEECRYPTAPI
91
int
dhies_pContextFree
(
dhies_pContext
*);
92
93
BEECRYPTAPI
94
memchunk
*
dhies_pContextEncrypt
(
dhies_pContext
*,
mpnumber
*,
mpnumber
*,
const
memchunk
*,
randomGeneratorContext
*);
95
BEECRYPTAPI
96
memchunk
*
dhies_pContextDecrypt
(
dhies_pContext
*,
const
mpnumber
*,
const
mpnumber
*,
const
memchunk
*);
97
98
#ifdef __cplusplus
99
}
100
#endif
101
102
#endif
Generated by
1.8.4