1
#ifndef CRYPTOPP_SOSEMANUK_H
2
#define CRYPTOPP_SOSEMANUK_H
6
NAMESPACE_BEGIN(CryptoPP)
9
struct SosemanukInfo : public VariableKeyLength<16, 1, 32, 1, SimpleKeyingInterface::UNIQUE_IV, 16>
11
static const char * StaticAlgorithmName() {return "Sosemanuk";}
15
class SosemanukPolicy : public AdditiveCipherConcretePolicy<word32, 20>, public SosemanukInfo
18
void CipherSetKey(const NameValuePairs ¶ms, const byte *key, size_t length);
19
void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount);
20
void CipherResynchronize(byte *keystreamBuffer, const byte *iv, size_t length);
21
bool CipherIsRandomAccess() const {return false;}
22
#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X64
23
unsigned int GetAlignment() const;
24
unsigned int GetOptimalBlockSize() const;
27
FixedSizeSecBlock<word32, 25*4> m_key;
28
FixedSizeAlignedSecBlock<word32, 12> m_state;
31
//! <a href="http://www.cryptolounge.org/wiki/Sosemanuk">Sosemanuk</a>
32
struct Sosemanuk : public SosemanukInfo, public SymmetricCipherDocumentation
34
typedef SymmetricCipherFinal<ConcretePolicyHolder<SosemanukPolicy, AdditiveCipherTemplate<> >, SosemanukInfo> Encryption;
35
typedef Encryption Decryption;