From 13f7bd7ffb3150f3bdeba4ba3f8794c30ac44065 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 3 Dec 2018 08:32:22 -0500 Subject: Make GF2_32 class member of RawIDA --- ida.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'ida.cpp') diff --git a/ida.cpp b/ida.cpp index 615bf2f2..1c8b3ab2 100644 --- a/ida.cpp +++ b/ida.cpp @@ -6,14 +6,9 @@ #include "ida.h" #include "stdcpp.h" #include "algebra.h" -#include "gf2_32.h" #include "polynomi.h" #include "polynomi.cpp" -ANONYMOUS_NAMESPACE_BEGIN -const CryptoPP::GF2_32 field; -NAMESPACE_END - NAMESPACE_BEGIN(CryptoPP) #if (defined(_MSC_VER) && (_MSC_VER < 1400)) && !defined(__MWERKS__) @@ -145,7 +140,7 @@ void RawIDA::ComputeV(unsigned int i) if (m_outputToInput[i] == size_t(m_threshold) && i * size_t(m_threshold) <= 1000*1000) { m_v[i].resize(m_threshold); - PrepareBulkPolynomialInterpolationAt(field, m_v[i].begin(), m_outputChannelIds[i], &(m_inputChannelIds[0]), m_w.begin(), m_threshold); + PrepareBulkPolynomialInterpolationAt(m_gf32, m_v[i].begin(), m_outputChannelIds[i], &(m_inputChannelIds[0]), m_w.begin(), m_threshold); } } @@ -161,7 +156,7 @@ void RawIDA::AddOutputChannel(word32 channelId) void RawIDA::PrepareInterpolation() { CRYPTOPP_ASSERT(m_inputChannelIds.size() == size_t(m_threshold)); - PrepareBulkPolynomialInterpolation(field, m_w.begin(), &(m_inputChannelIds[0]), (unsigned int)(m_threshold)); + PrepareBulkPolynomialInterpolation(m_gf32, m_w.begin(), &(m_inputChannelIds[0]), (unsigned int)(m_threshold)); for (unsigned int i=0; i