Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

strciphr.h File Reference


Detailed Description

This file contains helper classes for implementing stream ciphers.

All this infrastructure may look very complex compared to what's in Crypto++ 4.x, but stream ciphers implementations now support a lot of new functionality, including better performance (minimizing copying), resetting of keys and IVs, and methods to query which features are supported by a cipher.

Here's an explanation of these classes. The word "policy" is used here to mean a class with a set of methods that must be implemented by individual stream cipher implementations. This is usually much simpler than the full stream cipher API, which is implemented by either AdditiveCipherTemplate or CFB_CipherTemplate using the policy. So for example, an implementation of SEAL only needs to implement the AdditiveCipherAbstractPolicy interface (since it's an additive cipher, i.e., it xors a keystream into the plaintext). See this line in seal.h:

typedef SymmetricCipherFinalTemplate<ConcretePolicyHolder<SEAL_Policy, AdditiveCipherTemplate<> > > Encryption;

AdditiveCipherTemplate and CFB_CipherTemplate are designed so that they don't need to take a policy class as a template parameter (although this is allowed), so that their code is not duplicated for each new cipher. Instead they each get a reference to an abstract policy interface by calling AccessPolicy() on itself, so AccessPolicy() must be overriden to return the actual policy reference. This is done by the ConceretePolicyHolder class. Finally, SymmetricCipherFinalTemplate implements the constructors and other functions that must be implemented by the most derived class.

Definition in file strciphr.h.

#include "seckey.h"
#include "secblock.h"

Go to the source code of this file.

Classes

class  AbstractPolicyHolder
class  ConcretePolicyHolder
struct  AdditiveCipherAbstractPolicy
struct  AdditiveCipherConcretePolicy
struct  AdditiveCipherConcretePolicy::KeystreamOutput
class  AdditiveCipherTemplate
struct  CFB_CipherAbstractPolicy
struct  CFB_CipherConcretePolicy
struct  CFB_CipherConcretePolicy::RegisterOutput
class  CFB_CipherTemplate
class  CFB_EncryptionTemplate
class  CFB_DecryptionTemplate
class  SymmetricCipherFinalTemplate

Enumerations

enum  KeystreamOperation { WRITE_KEYSTREAM, XOR_KEYSTREAM, XOR_KEYSTREAM_INPLACE }


Generated on Mon Apr 19 18:12:34 2004 for Crypto++ by doxygen 1.3.6-20040222