Menu

#46 Salsa20 broken since 5.6.0

open
nobody
salsa (1)
5
2014-11-10
2014-11-10
Dr. Geek
No

The class Salsa20_Policy defined in line 16 of salsa.h misses a public inheritance of Salsa20_Info since 5.6.0.

while compiling the following code,

#include <salsa.h>

int main(int argc, char*[] argv)
{
  CryptoPP::Salsa20::Decryption lrDecrypt;
  return 0;
}
~~~~~

it generates the following errors:

1>d:\cryptopp_5_6_2\strciphr.h(282) : error C2039: 'DEFAULT_KEYLENGTH' : is not a member of 'CryptoPP::SymmetricCipherFinal<BASE,INFO>'
1> with
1>
1> BASE=CryptoPP::ConcretePolicyHolder<CryptoPP::Salsa20_Policy,CryptoPP::AdditiveCipherTemplate<CryptoPP::AbstractPolicyHolder<CryptoPP::AdditiveCipherAbstractPolicy,CryptoPP::SymmetricCipher>>>,
1> INFO=CryptoPP::Salsa20_Info
1>

....

it can be fixed by changing line 16 of salsa.h to the following:

:::c+
class CRYPTOPP_NO_VTABLE Salsa20_Policy : public AdditiveCipherConcretePolicy<word32, 16="">, public Salsa20_Info
~~~~

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.