diff --git a/BGEAttack.cpp b/BGEAttack.cpp index 92f6f5f..add605a 100644 --- a/BGEAttack.cpp +++ b/BGEAttack.cpp @@ -314,7 +314,7 @@ int BGEAttack::deriveBset(Bset & bset, GenericAES & aes, bool permissive){ return 0; } -NTL::GF2X BGEAttack::characteristicPolynomial(mat_GF2X_t m){ +NTL::GF2X BGEAttack::characteristicPolynomial(mat_GF2X_t & m){ // This is recursive function, so if size is 2, return result directly if (m.n==1){ return m.x[0][0]; // should never reach this point, but lets be defensive diff --git a/BGEAttack.h b/BGEAttack.h index beeee5c..de0ce36 100644 --- a/BGEAttack.h +++ b/BGEAttack.h @@ -293,7 +293,7 @@ class BGEAttack { protected: // used internally for comptuting characteristic polynomial - GF2X characteristicPolynomial(mat_GF2X_t m); + GF2X characteristicPolynomial(mat_GF2X_t & m); }; } /* namespace attack */ diff --git a/NTLUtils.cpp b/NTLUtils.cpp index 2892f65..f7e48a7 100644 --- a/NTLUtils.cpp +++ b/NTLUtils.cpp @@ -28,6 +28,7 @@ using namespace NTL; void dumpArray(ostream& out, const char * input, size_t len){ size_t i; + boost::io::ios_flags_saver ifs(out); for (i=0; i #include #include +#include #include "md5.h" NTL_CLIENT @@ -199,6 +200,7 @@ std::string dumpVector2str(NTL::vec_GF2E& a); template void dumpVectorT(T * a, size_t len){ unsigned int i; + boost::io::ios_flags_saver ifs(cout); for (i=0; i