AAGKeyGeneration.h

Go to the documentation of this file.
00001 // Copyright (C) 2005 Alexander Ushakov
00002 // Contents: Definition of class AAGProtocolInstance
00003 //
00004 // Principal Authors: Alexander Ushakov
00005 //
00006 // Revision History:
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 //-------------------------- AAGProtocolInstance ----------------------------//
00020 //---------------------------------------------------------------------------//
00021 
00022 
00023 class AAGProtocolInstance
00024 {
00025 
00027   //                                                     //
00028   //  Constructors:                                      //
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                        bool useForm = true );
00040   // Constructor for AAG-Instance
00041   // parameters must be provided by some generating procedure
00042 
00043 
00045   //                                                     //
00046   //  Accessors:                                         //
00047   //                                                     //
00049 
00050   public:
00051 
00052   vector< Word > getAlicePublicSbgp( ) const { return AlicePublicSbgp; }
00053   vector< Word > getBobPublicSbgp  ( ) const { return BobPublicSbgp; }
00054   vector< Word > getAliceConjSbgp  ( ) const { return AliceConjugatedSbgp; }
00055   vector< Word > getBobConjSbgp    ( ) const { return BobConjugatedSbgp; }
00056 
00057   Word getAliceKey ( ) const { return AliceKey; }
00058   Word getBobKey   ( ) const { return BobKey; }
00059   Word getSharedKey( ) const { return theSharedKey; }
00060 
00061 
00062   void printStats( ostream& out );
00063 
00064   static AAGProtocolInstance random( int N , int num_gens , int min_len , int max_len ,
00065                                      int AliceDecompositionLength , int BobDecompositionLength );
00066   
00067   static AAGProtocolInstance challenge( int N ,  int sg_conj_len, int c, int k, int key_len );
00068 
00069 
00071   //                                                     //
00072   //  Internal functions:                                //
00073   //                                                     //
00075 
00076   private:
00077 
00079   static Word generateHardProductOfGenerators( int num_gens , int product_length );
00080   
00081 
00083   //                                                     //
00084   //  Data members:                                      //
00085   //                                                     //
00087 
00088   private:
00089 
00090   vector< Word > AlicePublicSbgp;
00091   vector< Word >   BobPublicSbgp;
00092 
00093   Word AliceKeyDecomposition;
00094   Word   BobKeyDecomposition;
00095 
00096   Word AliceKey;
00097   Word   BobKey;
00098   
00099   vector< Word > AliceConjugatedSbgp;
00100   vector< Word >   BobConjugatedSbgp;
00101 
00102   Word theSharedKey;
00103 };
00104 
00105 
00106 //---------------------------------------------------------------------------//
00107 //------------------------------- Algorithms --------------------------------//
00108 //---------------------------------------------------------------------------//
00109 
00110 vector< Word > conjugateSubgroup_PGBF( int N , const vector< Word >& sbgp , Word w , bool useForm = true );
00111 
00112 
00113 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Mon Sep 26 18:43:45 2011 for CRyptography And Groups (CRAG) by  doxygen 1.6.1