aboutsummaryrefslogtreecommitdiffstats
path: root/modules/eng_aep/hw_aep.h
blob: 6e690e4a865a6b50c0bcfd8cb4a5eb9e3279885d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*************************************************
* AEP Interface Header File                      *
* (C) 1999-2006 The Botan Project                *
*************************************************/

#ifndef BOTAN_EXT_HW_AEP_H__
#define BOTAN_EXT_HW_AEP_H__

#include <botan/types.h>

namespace Botan {

namespace AEP {

const u32bit MAX_MODULO_BITS = 2048;

const u32bit ALREADY_INIT = 0x10000191;

extern "C" {

u32bit AEP_Initialize(void*);
u32bit AEP_Finalize();

u32bit AEP_OpenConnection(u32bit*);
u32bit AEP_CloseConnection(u32bit);

u32bit AEP_ModExp(u32bit, const void*, const void*, const void*, void*,
                  u32bit*);
u32bit AEP_ModExpCrt(u32bit, const void*, const void*, const void*,
                     const void*, const void*, const void*, void*,
                     u32bit*);

u32bit AEP_GenRandom(u32bit, u32bit, u32bit, void*, u32bit*);

typedef u32bit (*AEP_get_bignum_size_fn)(void*, u32bit*);
typedef u32bit (*AEP_read_bignum_fn)(void*, u32bit, byte*);
typedef u32bit (*AEP_write_bignum_fn)(void*, u32bit, byte*);

u32bit AEP_SetBNCallBacks(AEP_get_bignum_size_fn, AEP_read_bignum_fn,
                          AEP_write_bignum_fn);

}

}

}

#endif