00001 // Copyright (C) 2005 Alexander Ushakov 00002 // Contents: Definition of class ShftConjKeyInstance 00003 // 00004 // Principal Authors: Alexander Ushakov 00005 // 00006 // Revision History: 00007 // 00008 00009 #ifndef _ShftConjKeyGeneration_h_ 00010 #define _ShftConjKeyGeneration_h_ 00011 00012 #include "Word.h" 00013 00014 #include <vector> 00015 using namespace std; 00016 00017 00018 //---------------------------------------------------------------------------// 00019 //-------------------------- ShftConjKeyInstance ----------------------------// 00020 //---------------------------------------------------------------------------// 00021 00022 00023 class ShftConjKeyInstance 00024 { 00025 00027 // // 00028 // Constructors: // 00029 // // 00031 00032 public: 00033 00035 ShftConjKeyInstance( int braid_rank , Word publicKeyA , Word privateKey ); 00036 00037 00039 // // 00040 // Accessors: // 00041 // // 00043 00044 public: 00045 00047 00052 static ShftConjKeyInstance random( int braid_rank , int baseLenth , int keyLength ); 00053 00055 int getBraidRank ( ) const { return theRank ; } 00057 Word getPrivateKey( ) const { return thePrivateKey; } 00059 pair< Word , Word > getPublicKey ( ) const { return thePublicKey ; } 00060 00061 00063 // // 00064 // Data members: // 00065 // // 00067 00068 private: 00069 00071 int theRank; 00072 00074 pair< Word , Word > thePublicKey; 00075 00077 Word thePrivateKey; 00078 }; 00079 00080 00081 //---------------------------------------------------------------------------// 00082 //------------------------------- Algorithms --------------------------------// 00083 //---------------------------------------------------------------------------// 00084 00085 00086 Word generatorShift( const Word& w ); 00087 00088 00089 #endif