AAGProtocolInstance::AAGProtocolInstance( int N , const vector< Word >& aSbgp, const vector< Word >& bSbgp, const Word& aDecomp, const Word& bDecomp, bool useForm ) : AlicePublicSbgp( aSbgp ), BobPublicSbgp( bSbgp ), AliceKeyDecomposition( aDecomp ), BobKeyDecomposition( bDecomp ) { AliceKey = constructKey( N , AlicePublicSbgp , aDecomp , useForm ); // *Dump::dump_out << "A" << endl; BobKey = constructKey( N , BobPublicSbgp , bDecomp , useForm ); // *Dump::dump_out << "B" << endl; BobConjugatedSbgp = conjugateSubgroup_PGBF( N , BobPublicSbgp , AliceKey , useForm ); // *Dump::dump_out << "C" << endl; AliceConjugatedSbgp = conjugateSubgroup_PGBF( N , AlicePublicSbgp , BobKey , useForm ); // *Dump::dump_out << "D" << endl; if (useForm ) theSharedKey = shortenBraid( N , AliceKey * BobKey * AliceKey.inverse( ) * BobKey.inverse( ) ); else theSharedKey = AliceKey * BobKey * AliceKey.inverse( ) * BobKey.inverse( ); }
template<> void WXML::construct(wstring &str) { constructKey(str); constructProperty(str); if (constructValue(str) == true) constructChildren(str); }