diff --git a/mars.cpp b/mars.cpp index aa7693e6..af7e12fd 100644 --- a/mars.cpp +++ b/mars.cpp @@ -58,7 +58,7 @@ void MARS::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, by unsigned int i; word32 a, b, c, d, l, m, r, t; const word32 *k = m_k; - + Block::Get(inBlock)(a)(b)(c)(d); a += k[0]; b += k[1]; c += k[2]; d += k[3]; @@ -109,7 +109,7 @@ void MARS::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, by const word32 *k = m_k; Block::Get(inBlock)(d)(c)(b)(a); - + d += k[36]; c += k[37]; b += k[38]; a += k[39]; for (i=0; i<8; i++) diff --git a/mars.h b/mars.h index 3a59c1e8..b8b4e2c3 100644 --- a/mars.h +++ b/mars.h @@ -13,7 +13,7 @@ NAMESPACE_BEGIN(CryptoPP) //! \class MARS_Info //! \brief MARS block cipher information -struct MARS_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 56, 4> +struct MARS_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 8> { static const char *StaticAlgorithmName() {return "MARS";} };