TripleDecompositionKeyGeneration.h

Go to the documentation of this file.
00001 // Copyright (C) 2005 Alexander Ushakov
00002 // Contents: Definition of class TripleDecompositionProtocolInstance
00003 //
00004 // Principal Authors: Alexander Ushakov
00005 //
00006 // Revision History:
00007 //
00008 
00009 #ifndef _TripleDecompositionProtocolInstance_h_
00010 #define _TripleDecompositionProtocolInstance_h_
00011 
00012 #include "tuples.h"
00013 #include "Word.h"
00014 #include "ThRightNormalForm.h"
00015 
00016 
00017 #include <vector>
00018 using namespace std;
00019 
00020 
00021 //---------------------------------------------------------------------------//
00022 //-------------------- TripleDecompositionProtocolInstance ------------------//
00023 //---------------------------------------------------------------------------//
00024 
00025 
00027 
00034 class TripleDecompositionProtocolInstance
00035 {
00036   
00038   //                                                     //
00039   //  Constructors:                                      //
00040   //                                                     //
00042   
00043  public:
00044 
00046   TripleDecompositionProtocolInstance( int braid_rank ,
00047                                        quadruple< Word , Word , Word , Word > conjugators ,
00048                                        quintuple< Word , Word , Word , Word , Word > privateKeyA ,
00049                                        quintuple< Word , Word , Word , Word , Word > privateKeyB );
00050   
00051   
00053   //                                                     //
00054   //  Accessors:                                         //
00055   //                                                     //
00057 
00058  public:
00059   
00061 
00066   static TripleDecompositionProtocolInstance random( int braid_rank , int baseLenth , int keyLength );
00067 
00069   int  getBraidRank  ( ) const { return theRank; }
00070 
00071 
00073   quintuple< Word , Word , Word , Word , Word > getPrivateKeyA( ) const { return thePrivateKeyA; }
00075   quintuple< Word , Word , Word , Word , Word > getPrivateKeyB( ) const { return thePrivateKeyB; }
00076 
00077 
00079   triple< Word , Word , Word > getPublicKeyA( ) const { return thePublicKeyA; }
00081   triple< Word , Word , Word > getPublicKeyB( ) const { return thePublicKeyB; }
00082 
00083 
00085   ThRightNormalForm getSharedKey( ) const { return theSharedKey; }
00086 
00088   //                                                     //
00089   //  Internal functions:                                //
00090   //                                                     //
00092 
00093  private:
00094   
00096   static Word randomWord( int lowerIndex , int upperIndex , int len );
00097   
00098   
00100   //                                                     //
00101   //  Data members:                                      //
00102   //                                                     //
00104 
00105  private:
00106 
00108   int theRank;
00109   
00110   
00112 
00116   quintuple< Word , Word , Word , Word , Word > thePrivateKeyA;
00117 
00118 
00120 
00124   quintuple< Word , Word , Word , Word , Word > thePrivateKeyB;
00125   
00126   
00128 
00132   triple< Word , Word , Word > thePublicKeyA;
00133 
00135 
00139   triple< Word , Word , Word > thePublicKeyB;
00140   
00141   
00143 
00147   quadruple< Word , Word , Word , Word > theConjugators;
00148   
00149 
00151   ThRightNormalForm theSharedKey;
00152 };
00153 
00154 
00155 #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