Crypto++
Main Page
Namespaces
Classes
Files
File List
File Members
sosemanuk.h
1
#ifndef CRYPTOPP_SOSEMANUK_H
2
#define CRYPTOPP_SOSEMANUK_H
3
4
#include "
strciphr.h
"
5
6
NAMESPACE_BEGIN(CryptoPP)
7
8
//! algorithm info
9
struct
SosemanukInfo
: public
VariableKeyLength
<16, 1, 32, 1,
SimpleKeyingInterface
::UNIQUE_IV, 16>
10
{
11
static
const
char
* StaticAlgorithmName() {
return
"Sosemanuk"
;}
12
};
13
14
//! _
15
class
SosemanukPolicy
:
public
AdditiveCipherConcretePolicy
<word32, 20>,
public
SosemanukInfo
16
{
17
protected
:
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
;
25
#endif
26
27
FixedSizeSecBlock<word32, 25*4>
m_key;
28
FixedSizeAlignedSecBlock<word32, 12>
m_state;
29
};
30
31
//! <a href="http://www.cryptolounge.org/wiki/Sosemanuk">Sosemanuk</a>
32
struct
Sosemanuk
:
public
SosemanukInfo
,
public
SymmetricCipherDocumentation
33
{
34
typedef
SymmetricCipherFinal<ConcretePolicyHolder<SosemanukPolicy, AdditiveCipherTemplate<>
>,
SosemanukInfo
>
Encryption
;
35
typedef
Encryption
Decryption
;
36
};
37
38
NAMESPACE_END
39
40
#endif
Generated on Sun Aug 18 2013 19:09:19 for Crypto++ by
1.8.4