Crypto++  5.6.3
Free C++ class library of cryptographic schemes
Classes | Public Types | Static Public Member Functions | Static Public Attributes | List of all members
RC2 Class Reference

The RC2 stream cipher. More...

+ Inheritance diagram for RC2:

Classes

class  Decryption
 Class specific methods used to operate the cipher in the reverse direction. More...
 
class  Encryption
 Class specific methods used to operate the cipher in the forward direction. More...
 

Public Types

typedef BlockCipher Encryption
 implements the BlockCipher interface
 
typedef BlockCipher Decryption
 implements the BlockCipher interface
 

Static Public Member Functions

static const char * StaticAlgorithmName ()
 
static size_t StaticGetValidKeyLength (size_t keylength)
 Provides a valid key length for the cipher provided by a static function. More...
 

Static Public Attributes

static const int DEFAULT_EFFECTIVE_KEYLENGTH = 1024
 
static const int MAX_EFFECTIVE_KEYLENGTH = 1024
 
static const int BLOCKSIZE
 The block size of the cipher provided as a constant.
 
static const int MIN_KEYLENGTH
 The minimum key length used by the cipher provided as a constant. More...
 
static const int MAX_KEYLENGTH
 The maximum key length used by the cipher provided as a constant. More...
 
static const int DEFAULT_KEYLENGTH
 The default key length used by the cipher provided as a constant. More...
 
static const int KEYLENGTH_MULTIPLE
 The key length multiple used by the cipher provided as a constant. More...
 
static const int IV_REQUIREMENT
 The default IV requirements for the cipher provided as a constant. More...
 
static const int IV_LENGTH
 The default initialization vector length for the cipher provided as a constant. More...
 

Detailed Description

The RC2 stream cipher.

See also
RC2 on the Crypto Lounge.

Definition at line 27 of file rc2.h.

Member Function Documentation

static size_t VariableKeyLength< D, N, M, 1 , SimpleKeyingInterface::NOT_RESYNCHRONIZABLE , 0 >::StaticGetValidKeyLength ( size_t  keylength)
inlinestaticinherited

Provides a valid key length for the cipher provided by a static function.

Parameters
keylengththe size of the key, in bytes

If keylength is less than MIN_KEYLENGTH, then the function returns MIN_KEYLENGTH. If keylength is greater than MAX_KEYLENGTH, then the function returns MAX_KEYLENGTH. If keylength is a multiple of KEYLENGTH_MULTIPLE, then keylength is returned. Otherwise, the function returns keylength rounded down to the next smaller multiple of KEYLENGTH_MULTIPLE.

keylength is provided in bytes, not bits.

Definition at line 190 of file seckey.h.

Member Data Documentation

const int VariableKeyLength< D, N, M, 1 , SimpleKeyingInterface::NOT_RESYNCHRONIZABLE , 0 >::MIN_KEYLENGTH
staticinherited

The minimum key length used by the cipher provided as a constant.

MIN_KEYLENGTH is provided in bytes, not bits

Definition at line 165 of file seckey.h.

const int VariableKeyLength< D, N, M, 1 , SimpleKeyingInterface::NOT_RESYNCHRONIZABLE , 0 >::MAX_KEYLENGTH
staticinherited

The maximum key length used by the cipher provided as a constant.

MAX_KEYLENGTH is provided in bytes, not bits

Definition at line 168 of file seckey.h.

const int VariableKeyLength< D, N, M, 1 , SimpleKeyingInterface::NOT_RESYNCHRONIZABLE , 0 >::DEFAULT_KEYLENGTH
staticinherited

The default key length used by the cipher provided as a constant.

DEFAULT_KEYLENGTH is provided in bytes, not bits

Definition at line 171 of file seckey.h.

const int VariableKeyLength< D, N, M, 1 , SimpleKeyingInterface::NOT_RESYNCHRONIZABLE , 0 >::KEYLENGTH_MULTIPLE
staticinherited

The key length multiple used by the cipher provided as a constant.

MAX_KEYLENGTH is provided in bytes, not bits

Definition at line 174 of file seckey.h.

const int VariableKeyLength< D, N, M, 1 , SimpleKeyingInterface::NOT_RESYNCHRONIZABLE , 0 >::IV_REQUIREMENT
staticinherited

The default IV requirements for the cipher provided as a constant.

The default value is NOT_RESYNCHRONIZABLE. See IV_Requirement in cryptlib.h for allowed values.

Definition at line 178 of file seckey.h.

const int VariableKeyLength< D, N, M, 1 , SimpleKeyingInterface::NOT_RESYNCHRONIZABLE , 0 >::IV_LENGTH
staticinherited

The default initialization vector length for the cipher provided as a constant.

IV_LENGTH is provided in bytes, not bits. The default implementation uses 0.

Definition at line 181 of file seckey.h.


The documentation for this class was generated from the following file: