Security Scol plugin
modes.h
Go to the documentation of this file.
1// modes.h - originally written and placed in the public domain by Wei Dai
2
5
6#ifndef CRYPTOPP_MODES_H
7#define CRYPTOPP_MODES_H
8
9#include "cryptlib.h"
10#include "secblock.h"
11#include "misc.h"
12#include "strciphr.h"
13#include "argnames.h"
14#include "algparam.h"
15
16// Issue 340
17#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
18# pragma GCC diagnostic push
19# pragma GCC diagnostic ignored "-Wconversion"
20# pragma GCC diagnostic ignored "-Wsign-conversion"
21#endif
22
23#if CRYPTOPP_MSC_VERSION
24# pragma warning(push)
25# pragma warning(disable: 4231 4275)
26# if (CRYPTOPP_MSC_VERSION >= 1400)
27# pragma warning(disable: 6011 6386 28193)
28# endif
29#endif
30
31NAMESPACE_BEGIN(CryptoPP)
32
33
47
49class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CipherModeBase : public SymmetricCipher
50{
51public:
52 virtual ~CipherModeBase() {}
53
54 // Algorithm class
55 std::string AlgorithmProvider() const {
56 return m_cipher != NULLPTR ? m_cipher->AlgorithmProvider() : "C++";
57 }
58
61 size_t MinKeyLength() const {return m_cipher->MinKeyLength();}
62
65 size_t MaxKeyLength() const {return m_cipher->MaxKeyLength();}
66
69 size_t DefaultKeyLength() const {return m_cipher->DefaultKeyLength();}
70
79 size_t GetValidKeyLength(size_t keylength) const {return m_cipher->GetValidKeyLength(keylength);}
80
85 bool IsValidKeyLength(size_t keylength) const {return m_cipher->IsValidKeyLength(keylength);}
86
90 unsigned int OptimalDataAlignment() const {return m_cipher->OptimalDataAlignment();}
91
96 unsigned int IVSize() const {return BlockSize();}
97
100 virtual IV_Requirement IVRequirement() const =0;
101
105 void SetCipher(BlockCipher &cipher)
106 {
108 this->m_cipher = &cipher;
109 this->ResizeBuffers();
110 }
111
117 void SetCipherWithIV(BlockCipher &cipher, const byte *iv, int feedbackSize = 0)
118 {
119 this->ThrowIfInvalidIV(iv);
120 this->m_cipher = &cipher;
121 this->ResizeBuffers();
122 this->SetFeedbackSize(feedbackSize);
123 if (this->IsResynchronizable())
124 this->Resynchronize(iv);
125 }
126
127protected:
128 CipherModeBase() : m_cipher(NULLPTR) {}
129 inline unsigned int BlockSize() const
130 {
131 CRYPTOPP_ASSERT(m_register.size() > 0);
132 return static_cast<unsigned int>(m_register.size());
133 }
134 virtual void SetFeedbackSize(unsigned int feedbackSize)
135 {
136 if (!(feedbackSize == 0 || feedbackSize == BlockSize()))
137 throw InvalidArgument("CipherModeBase: feedback size cannot be specified for this cipher mode");
138 }
139
140 virtual void ResizeBuffers();
141
142 BlockCipher *m_cipher;
143 SecByteBlock m_register;
144};
145
148template <class POLICY_INTERFACE>
149class CRYPTOPP_NO_VTABLE ModePolicyCommonTemplate : public CipherModeBase, public POLICY_INTERFACE
150{
151 unsigned int GetAlignment() const {return m_cipher->OptimalDataAlignment();}
152 void CipherSetKey(const NameValuePairs &params, const byte *key, size_t length);
153};
154
155template <class POLICY_INTERFACE>
156void ModePolicyCommonTemplate<POLICY_INTERFACE>::CipherSetKey(const NameValuePairs &params, const byte *key, size_t length)
157{
158 m_cipher->SetKey(key, length, params);
159 ResizeBuffers();
160 int feedbackSize = params.GetIntValueWithDefault(Name::FeedbackSize(), 0);
161 SetFeedbackSize(feedbackSize);
162}
163
165class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CFB_ModePolicy : public ModePolicyCommonTemplate<CFB_CipherAbstractPolicy>
166{
167public:
168 CRYPTOPP_STATIC_CONSTEXPR const char* CRYPTOPP_API StaticAlgorithmName() {return "CFB";}
169
170 virtual ~CFB_ModePolicy() {}
171 CFB_ModePolicy() : m_feedbackSize(0) {}
173
174protected:
175 unsigned int GetBytesPerIteration() const {return m_feedbackSize;}
176 bool CanIterate() const {return m_feedbackSize == BlockSize();}
177 void Iterate(byte *output, const byte *input, CipherDir dir, size_t iterationCount);
178 void TransformRegister();
179 void CipherResynchronize(const byte *iv, size_t length);
180 void SetFeedbackSize(unsigned int feedbackSize);
181 void ResizeBuffers();
182 byte * GetRegisterBegin();
183
184 SecByteBlock m_temp;
185 unsigned int m_feedbackSize;
186};
187
196inline void CopyOrZero(void *dest, size_t dsize, const void *src, size_t ssize)
197{
198 CRYPTOPP_ASSERT(dest);
199 CRYPTOPP_ASSERT(dsize >= ssize);
200
201 if (src != NULLPTR)
202 memcpy_s(dest, dsize, src, ssize);
203 else
204 memset(dest, 0, dsize);
205}
206
208class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE OFB_ModePolicy : public ModePolicyCommonTemplate<AdditiveCipherAbstractPolicy>
209{
210public:
211 CRYPTOPP_STATIC_CONSTEXPR const char* CRYPTOPP_API StaticAlgorithmName() {return "OFB";}
212
213 bool CipherIsRandomAccess() const {return false;}
215
216protected:
217 unsigned int GetBytesPerIteration() const {return BlockSize();}
218 unsigned int GetIterationsToBuffer() const {return m_cipher->OptimalNumberOfParallelBlocks();}
219 void WriteKeystream(byte *keystreamBuffer, size_t iterationCount);
220 void CipherResynchronize(byte *keystreamBuffer, const byte *iv, size_t length);
221};
222
224class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CTR_ModePolicy : public ModePolicyCommonTemplate<AdditiveCipherAbstractPolicy>
225{
226public:
227 CRYPTOPP_STATIC_CONSTEXPR const char* CRYPTOPP_API StaticAlgorithmName() {return "CTR";}
228
229 virtual ~CTR_ModePolicy() {}
230 bool CipherIsRandomAccess() const {return true;}
232
233protected:
234 virtual void IncrementCounterBy256();
235 unsigned int GetAlignment() const {return m_cipher->OptimalDataAlignment();}
236 unsigned int GetBytesPerIteration() const {return BlockSize();}
237 unsigned int GetIterationsToBuffer() const {return m_cipher->OptimalNumberOfParallelBlocks();}
238 void WriteKeystream(byte *buffer, size_t iterationCount)
239 {OperateKeystream(WRITE_KEYSTREAM, buffer, NULLPTR, iterationCount);}
240 bool CanOperateKeystream() const {return true;}
241 void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount);
242 void CipherResynchronize(byte *keystreamBuffer, const byte *iv, size_t length);
243 void SeekToIteration(lword iterationCount);
244
245 // adv_simd.h increments the counter
246 mutable SecByteBlock m_counterArray;
247};
248
250class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE BlockOrientedCipherModeBase : public CipherModeBase
251{
252public:
254 void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params);
255 unsigned int MandatoryBlockSize() const {return BlockSize();}
256 bool IsRandomAccess() const {return false;}
257 bool IsSelfInverting() const {return false;}
259 {return m_cipher->IsForwardTransformation();}
260 void Resynchronize(const byte *iv, int length=-1)
261 {memcpy_s(m_register, m_register.size(), iv, ThrowIfInvalidIVLength(length));}
262
263protected:
264 bool RequireAlignedInput() const {return true;}
265 virtual void ResizeBuffers();
266
267 SecByteBlock m_buffer;
268};
269
271class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE ECB_OneWay : public BlockOrientedCipherModeBase
272{
273public:
274 CRYPTOPP_STATIC_CONSTEXPR const char* CRYPTOPP_API StaticAlgorithmName() {return "ECB";}
275
276 void SetKey(const byte *key, size_t length, const NameValuePairs &params = g_nullNameValuePairs)
277 {m_cipher->SetKey(key, length, params); BlockOrientedCipherModeBase::ResizeBuffers();}
279 unsigned int OptimalBlockSize() const {return static_cast<unsigned int>(BlockSize() * m_cipher->OptimalNumberOfParallelBlocks());}
280 void ProcessData(byte *outString, const byte *inString, size_t length);
281};
282
284class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CBC_ModeBase : public BlockOrientedCipherModeBase
285{
286public:
287 CRYPTOPP_STATIC_CONSTEXPR const char* CRYPTOPP_API StaticAlgorithmName() {return "CBC";}
288
290 bool RequireAlignedInput() const {return false;}
291 unsigned int MinLastBlockSize() const {return 0;}
292};
293
295class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CBC_Encryption : public CBC_ModeBase
296{
297public:
298 void ProcessData(byte *outString, const byte *inString, size_t length);
299};
300
303class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CBC_CTS_Encryption : public CBC_Encryption
304{
305public:
306 CRYPTOPP_STATIC_CONSTEXPR const char* CRYPTOPP_API StaticAlgorithmName() {return "CBC/CTS";}
307
308 void SetStolenIV(byte *iv) {m_stolenIV = iv;}
309 unsigned int MinLastBlockSize() const {return BlockSize()+1;}
310 size_t ProcessLastBlock(byte *outString, size_t outLength, const byte *inString, size_t inLength);
311
312protected:
313 void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params)
314 {
315 CBC_Encryption::UncheckedSetKey(key, length, params);
316 m_stolenIV = params.GetValueWithDefault(Name::StolenIV(), static_cast<byte *>(NULLPTR));
317 }
318
319 byte *m_stolenIV;
320};
321
323class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CBC_Decryption : public CBC_ModeBase
324{
325public:
326 virtual ~CBC_Decryption() {}
327 void ProcessData(byte *outString, const byte *inString, size_t length);
328
329protected:
330 virtual void ResizeBuffers();
331
332 SecByteBlock m_temp;
333};
334
337class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CBC_CTS_Decryption : public CBC_Decryption
338{
339public:
340 unsigned int MinLastBlockSize() const {return BlockSize()+1;}
341 size_t ProcessLastBlock(byte *outString, size_t outLength, const byte *inString, size_t inLength);
342};
343
345template <class CIPHER, class BASE>
346class CipherModeFinalTemplate_CipherHolder : protected ObjectHolder<CIPHER>, public AlgorithmImpl<BASE, CipherModeFinalTemplate_CipherHolder<CIPHER, BASE> >
347{
348public:
354 static std::string CRYPTOPP_API StaticAlgorithmName()
355 {return CIPHER::StaticAlgorithmName() + "/" + BASE::StaticAlgorithmName();}
356
359 {
360 this->m_cipher = &this->m_object;
361 this->ResizeBuffers();
362 }
363
369 CipherModeFinalTemplate_CipherHolder(const byte *key, size_t length)
370 {
371 this->m_cipher = &this->m_object;
372 this->SetKey(key, length);
373 }
374
381 CipherModeFinalTemplate_CipherHolder(const byte *key, size_t length, const byte *iv)
382 {
383 this->m_cipher = &this->m_object;
384 this->SetKey(key, length, MakeParameters(Name::IV(), ConstByteArrayParameter(iv, this->m_cipher->BlockSize())));
385 }
386
394 CipherModeFinalTemplate_CipherHolder(const byte *key, size_t length, const byte *iv, int feedbackSize)
395 {
396 this->m_cipher = &this->m_object;
397 this->SetKey(key, length, MakeParameters(Name::IV(), ConstByteArrayParameter(iv, this->m_cipher->BlockSize()))(Name::FeedbackSize(), feedbackSize));
398 }
399
400 // Algorithm class
401 std::string AlgorithmProvider() const {
402 return this->m_cipher->AlgorithmProvider();
403 }
404};
405
408template <class BASE>
410{
411public:
415
420 {this->SetCipher(cipher);}
421
427 CipherModeFinalTemplate_ExternalCipher(BlockCipher &cipher, const byte *iv, int feedbackSize = 0)
428 {this->SetCipherWithIV(cipher, iv, feedbackSize);}
429
436 std::string AlgorithmName() const
437 {return (this->m_cipher ? this->m_cipher->AlgorithmName() + "/" : std::string("")) + BASE::StaticAlgorithmName();}
438
439 // Algorithm class
440 std::string AlgorithmProvider() const
441 {return this->m_cipher->AlgorithmProvider();}
442};
443
447
451template <class CIPHER>
457
466
471template <class CIPHER>
477
487
489
493template <class CIPHER>
499
508
511
515template <class CIPHER>
521
530
534template <class CIPHER>
540
542
551
555template <class CIPHER>
561
564
573
578template <class CIPHER>
584
587
597
598NAMESPACE_END
599
600// Issue 340
601#if CRYPTOPP_MSC_VERSION
602# pragma warning(pop)
603#endif
604
605#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
606# pragma GCC diagnostic pop
607#endif
608
609#endif
Classes for working with NameValuePairs.
AlgorithmParameters MakeParameters(const char *name, const T &value, bool throwIfNotUsed=true)
Create an object that implements NameValuePairs.
Definition algparam.h:508
Standard names for retrieving values by name when working with NameValuePairs.
Base class for additive stream ciphers with SymmetricCipher interface.
Definition strciphr.h:298
Base class information.
Definition simple.h:40
Interface for one direction (encryption or decryption) of a block cipher.
Definition cryptlib.h:1283
Block cipher mode of operation default implementation.
Definition modes.h:251
bool IsForwardTransformation() const
Determines if the cipher is being operated in its forward direction.
Definition modes.h:258
bool IsSelfInverting() const
Determines whether the cipher is self-inverting.
Definition modes.h:257
bool IsRandomAccess() const
Determines whether the cipher supports random access.
Definition modes.h:256
unsigned int MandatoryBlockSize() const
Provides the mandatory block size of the cipher.
Definition modes.h:255
void Resynchronize(const byte *iv, int length=-1)
Resynchronize with an IV.
Definition modes.h:260
CBC-CTS block cipher mode of operation decryption operation.
Definition modes.h:338
unsigned int MinLastBlockSize() const
Provides the size of the last block.
Definition modes.h:340
CBC-CTS block cipher mode of operation encryption operation.
Definition modes.h:304
unsigned int MinLastBlockSize() const
Provides the size of the last block.
Definition modes.h:309
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params)
Sets the key for this object without performing parameter validation.
Definition modes.h:313
CBC block cipher mode of operation decryption operation.
Definition modes.h:324
CBC block cipher mode of operation encryption operation.
Definition modes.h:296
CBC block cipher mode of operation default implementation.
Definition modes.h:285
IV_Requirement IVRequirement() const
Minimal requirement for secure IVs.
Definition modes.h:289
unsigned int MinLastBlockSize() const
Provides the size of the last block.
Definition modes.h:291
Base class for feedback based stream ciphers with SymmetricCipher interface.
Definition strciphr.h:568
Base class for feedback based stream ciphers in the reverse direction with SymmetricCipher interface.
Definition strciphr.h:664
Base class for feedback based stream ciphers in the forward direction with SymmetricCipher interface.
Definition strciphr.h:655
CFB block cipher mode of operation.
Definition modes.h:166
bool CanIterate() const
Flag indicating iteration support.
Definition modes.h:176
IV_Requirement IVRequirement() const
Minimal requirement for secure IVs.
Definition modes.h:172
unsigned int GetBytesPerIteration() const
Provides number of bytes operated upon during an iteration.
Definition modes.h:175
CTR block cipher mode of operation.
Definition modes.h:225
unsigned int GetBytesPerIteration() const
Provides number of bytes operated upon during an iteration.
Definition modes.h:236
unsigned int GetAlignment() const
Provides data alignment requirements.
Definition modes.h:235
unsigned int GetIterationsToBuffer() const
Provides buffer size based on iterations.
Definition modes.h:237
bool CipherIsRandomAccess() const
Flag indicating random access.
Definition modes.h:230
void WriteKeystream(byte *buffer, size_t iterationCount)
Generate the keystream.
Definition modes.h:238
IV_Requirement IVRequirement() const
Minimal requirement for secure IVs.
Definition modes.h:231
bool CanOperateKeystream() const
Flag indicating.
Definition modes.h:240
Block cipher mode of operation information.
Definition modes.h:50
unsigned int IVSize() const
Returns length of the IV accepted by this object.
Definition modes.h:96
size_t GetValidKeyLength(size_t keylength) const
Returns a valid key length for the algorithm.
Definition modes.h:79
void SetCipherWithIV(BlockCipher &cipher, const byte *iv, int feedbackSize=0)
Set external block cipher and IV.
Definition modes.h:117
size_t MaxKeyLength() const
Returns largest valid key length.
Definition modes.h:65
size_t DefaultKeyLength() const
Returns default key length.
Definition modes.h:69
void SetCipher(BlockCipher &cipher)
Set external block cipher.
Definition modes.h:105
virtual IV_Requirement IVRequirement() const =0
Minimal requirement for secure IVs.
unsigned int OptimalDataAlignment() const
Provides input and output data alignment for optimal performance.
Definition modes.h:90
std::string AlgorithmProvider() const
Retrieve the provider of this algorithm.
Definition modes.h:55
size_t MinKeyLength() const
Returns smallest valid key length.
Definition modes.h:61
bool IsValidKeyLength(size_t keylength) const
Returns whether keylength is a valid key length.
Definition modes.h:85
Block cipher mode of operation aggregate.
Definition modes.h:347
CipherModeFinalTemplate_CipherHolder(const byte *key, size_t length, const byte *iv, int feedbackSize)
Construct a CipherModeFinalTemplate.
Definition modes.h:394
CipherModeFinalTemplate_CipherHolder()
Construct a CipherModeFinalTemplate.
Definition modes.h:358
static std::string CRYPTOPP_API StaticAlgorithmName()
Provides the name of this algorithm.
Definition modes.h:354
CipherModeFinalTemplate_CipherHolder(const byte *key, size_t length)
Construct a CipherModeFinalTemplate.
Definition modes.h:369
CipherModeFinalTemplate_CipherHolder(const byte *key, size_t length, const byte *iv)
Construct a CipherModeFinalTemplate.
Definition modes.h:381
CipherModeFinalTemplate_ExternalCipher()
Construct a default CipherModeFinalTemplate.
Definition modes.h:414
std::string AlgorithmName() const
Provides the name of this algorithm.
Definition modes.h:436
CipherModeFinalTemplate_ExternalCipher(BlockCipher &cipher)
Construct a CipherModeFinalTemplate.
Definition modes.h:419
CipherModeFinalTemplate_ExternalCipher(BlockCipher &cipher, const byte *iv, int feedbackSize=0)
Construct a CipherModeFinalTemplate.
Definition modes.h:427
Used to pass byte array input as part of a NameValuePairs object.
Definition algparam.h:25
ECB block cipher mode of operation default implementation.
Definition modes.h:272
unsigned int OptimalBlockSize() const
Provides the input block size most efficient for this cipher.
Definition modes.h:279
void SetKey(const byte *key, size_t length, const NameValuePairs &params=g_nullNameValuePairs)
Sets or reset the key of this object.
Definition modes.h:276
IV_Requirement IVRequirement() const
Minimal requirement for secure IVs.
Definition modes.h:278
An invalid argument was detected.
Definition cryptlib.h:203
Block cipher mode of operation common operations.
Definition modes.h:150
Interface for retrieving values given their names.
Definition cryptlib.h:322
T GetValueWithDefault(const char *name, T defaultValue) const
Get a named value.
Definition cryptlib.h:392
CRYPTOPP_DLL int GetIntValueWithDefault(const char *name, int defaultValue) const
Get a named value with type int, with default.
Definition cryptlib.h:424
OFB block cipher mode of operation.
Definition modes.h:209
unsigned int GetIterationsToBuffer() const
Provides buffer size based on iterations.
Definition modes.h:218
unsigned int GetBytesPerIteration() const
Provides number of bytes operated upon during an iteration.
Definition modes.h:217
bool CipherIsRandomAccess() const
Flag indicating random access.
Definition modes.h:213
IV_Requirement IVRequirement() const
Minimal requirement for secure IVs.
Definition modes.h:214
Uses encapsulation to hide an object in derived classes.
Definition misc.h:228
bool IsResynchronizable() const
Determines if the object can be resynchronized.
Definition cryptlib.h:740
IV_Requirement
Secure IVs requirements as enumerated values.
Definition cryptlib.h:719
@ UNIQUE_IV
The IV must be unique.
Definition cryptlib.h:721
@ RANDOM_IV
The IV must be random and possibly predictable.
Definition cryptlib.h:723
@ NOT_RESYNCHRONIZABLE
The object does not use an IV.
Definition cryptlib.h:729
@ UNPREDICTABLE_RANDOM_IV
The IV must be random and unpredictable.
Definition cryptlib.h:725
virtual void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params)=0
Sets the key for this object without performing parameter validation.
void ThrowIfInvalidIV(const byte *iv)
Validates the IV.
Definition cryptlib.cpp:86
virtual void SetKey(const byte *key, size_t length, const NameValuePairs &params=g_nullNameValuePairs)
Sets or reset the key of this object.
Definition cryptlib.cpp:58
virtual void Resynchronize(const byte *iv, int ivLength=-1)
Resynchronize with an IV.
Definition cryptlib.h:783
void ThrowIfResynchronizable()
Validates the object.
Definition cryptlib.cpp:80
virtual void ProcessData(byte *outString, const byte *inString, size_t length)=0
Encrypt or decrypt an array of bytes.
virtual size_t ProcessLastBlock(byte *outString, size_t outLength, const byte *inString, size_t inLength)
Encrypt or decrypt the last block of data.
Definition cryptlib.cpp:217
Interface for one direction (encryption or decryption) of a stream cipher or cipher mode.
Definition cryptlib.h:1291
word64 lword
Large word type.
Definition config_int.h:158
Abstract base classes that provide a uniform interface to this library.
CipherDir
Specifies a direction for a cipher to operate.
Definition cryptlib.h:123
Utility functions for the Crypto++ library.
void memcpy_s(void *dest, size_t sizeInBytes, const void *src, size_t count)
Bounds checking replacement for memcpy()
Definition misc.h:525
void CopyOrZero(void *dest, size_t dsize, const void *src, size_t ssize)
Initialize a block of memory.
Definition modes.h:196
Classes and functions for secure memory allocations.
Classes for implementing stream ciphers.
KeystreamOperation
Keystream operation flags.
Definition strciphr.h:88
@ WRITE_KEYSTREAM
Write the keystream to the output buffer, input is NULL.
Definition strciphr.h:90
CBC mode with ciphertext stealing, external cipher.
Definition modes.h:593
CBC-CTS block cipher mode of operation.
Definition modes.h:580
CBC mode, external cipher.
Definition modes.h:569
CBC block cipher mode of operation.
Definition modes.h:557
CFB mode, external cipher, providing FIPS validated cryptography.
Definition modes.h:483
CFB block cipher mode of operation providing FIPS validated cryptography.
Definition modes.h:473
CFB mode, external cipher.
Definition modes.h:462
CFB block cipher mode of operation.
Definition modes.h:453
CTR mode, external cipher.
Definition modes.h:526
CTR block cipher mode of operation.
Definition modes.h:517
Block cipher mode of operation information.
Definition modes.h:45
ECB mode, external cipher.
Definition modes.h:547
ECB block cipher mode of operation.
Definition modes.h:536
OFB mode, external cipher.
Definition modes.h:504
OFB block cipher mode of operation.
Definition modes.h:495
Provides Encryption and Decryption typedefs used by derived classes to implement a symmetric cipher.
Definition seckey.h:414