00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _AAGKeyGeneration_h_
00010 #define _AAGKeyGeneration_h_
00011
00012 #include "Word.h"
00013
00014 #include <vector>
00015 using namespace std;
00016
00017
00018
00019
00020
00021
00022
00023 class AAGProtocolInstance
00024 {
00025
00027
00028
00029
00031
00032 public:
00033
00034 AAGProtocolInstance( int N ,
00035 const vector< Word >& aSbgp,
00036 const vector< Word >& bSbgp,
00037 const Word& aDecomp,
00038 const Word& bDecomp );
00039
00040
00041
00042
00044
00045
00046
00048
00049 public:
00050
00051 vector< Word > getAlicePublicSbgp( ) const { return AlicePublicSbgp; }
00052 vector< Word > getBobPublicSbgp ( ) const { return BobPublicSbgp; }
00053 vector< Word > getAliceConjSbgp ( ) const { return AliceConjugatedSbgp; }
00054 vector< Word > getBobConjSbgp ( ) const { return BobConjugatedSbgp; }
00055
00056 Word getAliceKey ( ) const { return AliceKey; }
00057 Word getBobKey ( ) const { return BobKey; }
00058 Word getSharedKey( ) const { return theSharedKey; }
00059
00060 static AAGProtocolInstance random( int N , int num_gens , int min_len , int max_len ,
00061 int AliceDecompositionLength , int BobDecompositionLength );
00062
00063
00065
00066
00067
00069
00070 private:
00071
00072 vector< Word > AlicePublicSbgp;
00073 vector< Word > BobPublicSbgp;
00074
00075 Word AliceKeyDecomposition;
00076 Word BobKeyDecomposition;
00077
00078 Word AliceKey;
00079 Word BobKey;
00080
00081 vector< Word > AliceConjugatedSbgp;
00082 vector< Word > BobConjugatedSbgp;
00083
00084 Word theSharedKey;
00085 };
00086
00087
00088
00089
00090
00091
00092 vector< Word > conjugateSubgroup_PGBF( int N , const vector< Word >& sbgp , Word w );
00093
00094
00095 #endif