Security Scol plugin
sosemanuk.h
Go to the documentation of this file.
1// sosemanuk.h - originally written and placed in the public domain by Wei Dai
2
6
7#ifndef CRYPTOPP_SOSEMANUK_H
8#define CRYPTOPP_SOSEMANUK_H
9
10#include "strciphr.h"
11#include "secblock.h"
12
13// Clang 3.3 integrated assembler crash on Linux. Clang 3.4 due to compiler
14// error with .intel_syntax, http://llvm.org/bugs/show_bug.cgi?id=24232
15#if CRYPTOPP_BOOL_X32 || defined(CRYPTOPP_DISABLE_MIXED_ASM)
16# define CRYPTOPP_DISABLE_SOSEMANUK_ASM 1
17#endif
18
19NAMESPACE_BEGIN(CryptoPP)
20
21
23struct SosemanukInfo : public VariableKeyLength<16, 1, 32, 1, SimpleKeyingInterface::UNIQUE_IV, 16>
24{
25 CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "Sosemanuk";}
26};
27
31{
32protected:
33 std::string AlgorithmProvider() const;
34 void CipherSetKey(const NameValuePairs &params, const byte *key, size_t length);
35 void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount);
36 void CipherResynchronize(byte *keystreamBuffer, const byte *iv, size_t length);
37 bool CipherIsRandomAccess() const {return false;}
38#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
39 unsigned int GetAlignment() const;
40 unsigned int GetOptimalBlockSize() const;
41#endif
42
45};
46
59
60NAMESPACE_END
61
62#endif
Fixed size stack-based SecBlock with 16-byte alignment.
Definition secblock.h:1259
Fixed size stack-based SecBlock.
Definition secblock.h:1246
Interface for retrieving values given their names.
Definition cryptlib.h:322
Interface for algorithms that take byte strings as keys.
Definition cryptlib.h:642
Sosemanuk stream cipher implementation.
Definition sosemanuk.h:31
void CipherSetKey(const NameValuePairs &params, const byte *key, size_t length)
Key the cipher.
Definition sosemanuk.cpp:33
bool CipherIsRandomAccess() const
Flag indicating random access.
Definition sosemanuk.h:37
std::string AlgorithmProvider() const
Retrieve the provider of this algorithm.
Definition sosemanuk.cpp:22
void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount)
Operates the keystream.
void CipherResynchronize(byte *keystreamBuffer, const byte *iv, size_t length)
Resynchronize the cipher.
Definition sosemanuk.cpp:39
SymmetricCipher implementation.
Definition strciphr.h:684
Inherited by keyed algorithms with variable key length.
Definition seckey.h:166
Classes and functions for secure memory allocations.
Classes for implementing stream ciphers.
KeystreamOperation
Keystream operation flags.
Definition strciphr.h:88
virtual unsigned int GetOptimalBlockSize() const
Provides number of ideal bytes to process.
Definition strciphr.h:123
Base class for additive stream ciphers.
Definition strciphr.h:202
unsigned int GetAlignment() const
Provides data alignment requirements.
Definition strciphr.h:220
Sosemanuk stream cipher.
Definition sosemanuk.h:55
Sosemanuk stream cipher information.
Definition sosemanuk.h:24
Provides Encryption and Decryption typedefs used by derived classes to implement a symmetric cipher.
Definition seckey.h:414