-
Notifications
You must be signed in to change notification settings - Fork 0
/
TwoTableAttack.h
33 lines (30 loc) · 986 Bytes
/
TwoTableAttack.h
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
/*
* =====================================================================================
*
* Filename: 2TableAttack.h
*
* Description: 2 Table Attack
*
* Version: 1.0
* Created: 10/06/2008 04:44:49 PM
* Revision: none
* Compiler: gcc
*
* Author: Bryce Allen (bda), [email protected]
* Company:
*
* =====================================================================================
*/
class TwoTableAttack : public ElgamalAttack {
private:
MpzTable t1;
MpzTable t2;
bool oneTable;
public:
TwoTableAttack (ElgamalCryptosystem *e, unsigned int bits1, unsigned int bits2);
~TwoTableAttack ();
bool buildTable (gmp_randstate_t rstate);
size_t crackMessage (MpzList *results, const ElgamalCipherText ct,
gmp_randstate_t rstate, size_t maxResults=0);
const char* getAttackName () const { return "2table"; }
};