Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Typedefs | Enumerations | Functions | Variables
cryptlib.h File Reference

Abstract base classes that provide a uniform interface to this library. More...

#include "config.h"
#include "stdcpp.h"
#include "trap.h"
Include dependency graph for cryptlib.h:

Go to the source code of this file.

Classes

struct  EnumToType< ENUM_TYPE, VALUE >
 Converts an enumeration to a type suitable for use as a template parameter. More...
 
class  Exception
 Base class for all exceptions thrown by the library. More...
 
class  InvalidArgument
 An invalid argument was detected. More...
 
class  InvalidDataFormat
 Input data was received that did not conform to expected format. More...
 
class  InvalidCiphertext
 A decryption filter encountered invalid ciphertext. More...
 
class  NotImplemented
 A method was called which was not implemented. More...
 
class  CannotFlush
 Flush(true) was called but it can't completely flush its buffers. More...
 
class  OS_Error
 The operating system reported an error. More...
 
class  DecodingResult
 Returns a decoding results. More...
 
class  NameValuePairs
 Interface for retrieving values given their names. More...
 
class  NameValuePairs::ValueTypeMismatch
 Thrown when an unexpected type is encountered. More...
 
class  Clonable
 Interface for cloning objects. More...
 
class  Algorithm
 Interface for all crypto algorithms. More...
 
class  SimpleKeyingInterface
 Interface for algorithms that take byte strings as keys. More...
 
class  BlockTransformation
 Interface for the data processing part of block ciphers. More...
 
class  StreamTransformation
 Interface for the data processing portion of stream ciphers. More...
 
class  HashTransformation
 Interface for hash functions and data processing part of MACs. More...
 
class  BlockCipher
 Interface for one direction (encryption or decryption) of a block cipher. More...
 
class  SymmetricCipher
 Interface for one direction (encryption or decryption) of a stream cipher or cipher mode. More...
 
class  MessageAuthenticationCode
 Interface for message authentication codes. More...
 
class  AuthenticatedSymmetricCipher
 Interface for one direction (encryption or decryption) of a stream cipher or block cipher mode with authentication. More...
 
class  AuthenticatedSymmetricCipher::BadState
 Exception thrown when the object is in the wrong state for the operation. More...
 
class  RandomNumberGenerator
 Interface for random number generators. More...
 
class  Waitable
 Interface for objects that can be waited on. More...
 
class  BufferedTransformation
 Interface for buffered transformations. More...
 
class  BufferedTransformation::BlockingInputOnly
 Exception thrown by objects that have not implemented nonblocking input processing. More...
 
struct  BufferedTransformation::NoChannelSupport
 Exception thrown when a filter does not support named channels. More...
 
struct  BufferedTransformation::InvalidChannelName
 Exception thrown when a filter does not recognize a named channel. More...
 
class  CryptoMaterial
 Interface for crypto material, such as public and private keys, and crypto parameters. More...
 
class  CryptoMaterial::InvalidMaterial
 Exception thrown when invalid crypto material is detected. More...
 
class  GeneratableCryptoMaterial
 Interface for generatable crypto material, such as private keys and crypto parameters. More...
 
class  PublicKey
 Interface for public keys. More...
 
class  PrivateKey
 Interface for private keys. More...
 
class  CryptoParameters
 Interface for crypto prameters. More...
 
class  AsymmetricAlgorithm
 Interface for asymmetric algorithms. More...
 
class  PublicKeyAlgorithm
 Interface for asymmetric algorithms using public keys. More...
 
class  PrivateKeyAlgorithm
 Interface for asymmetric algorithms using private keys. More...
 
class  KeyAgreementAlgorithm
 Interface for key agreement algorithms. More...
 
class  PK_CryptoSystem
 Interface for public-key encryptors and decryptors. More...
 
class  PK_Encryptor
 Interface for public-key encryptors. More...
 
class  PK_Encryptor::InvalidPlaintextLength
 Exception thrown when trying to encrypt plaintext of invalid length. More...
 
class  PK_Decryptor
 Interface for public-key decryptors. More...
 
class  PK_SignatureScheme
 Interface for public-key signers and verifiers. More...
 
class  PK_SignatureScheme::InvalidKeyLength
 Exception throw when the private or public key has a length that can't be used. More...
 
class  PK_SignatureScheme::KeyTooShort
 Exception throw when the private or public key is too short to sign or verify. More...
 
class  PK_MessageAccumulator
 Interface for accumulating messages to be signed or verified. More...
 
class  PK_Signer
 Interface for public-key signers. More...
 
class  PK_Verifier
 Interface for public-key signature verifiers. More...
 
class  SimpleKeyAgreementDomain
 Interface for domains of simple key agreement protocols. More...
 
class  AuthenticatedKeyAgreementDomain
 Interface for domains of authenticated key agreement protocols. More...
 
class  BERDecodeErr
 Exception thrown when an ASN.1 BER decoing error is encountered. More...
 
class  ASN1Object
 Interface for encoding and decoding ASN1 objects. More...
 

Typedefs

typedef EnumToType< ByteOrder, LITTLE_ENDIAN_ORDERLittleEndian
 Provides a constant for LittleEndian. More...
 
typedef EnumToType< ByteOrder, BIG_ENDIAN_ORDERBigEndian
 Provides a constant for BigEndian. More...
 
typedef HashTransformation HashFunction
 

Enumerations

enum  CipherDir { ENCRYPTION, DECRYPTION }
 Specifies a direction for a cipher to operate. More...
 
enum  ByteOrder { LITTLE_ENDIAN_ORDER = 0, BIG_ENDIAN_ORDER = 1 }
 Provides the byte ordering. More...
 

Functions

CRYPTOPP_DLL RandomNumberGenerator &CRYPTOPP_API NullRNG ()
 Random Number Generator that does not produce random numbers. More...
 
CRYPTOPP_DLL BufferedTransformationTheBitBucket ()
 An input discarding BufferedTransformation. More...
 

Variables

const unsigned long INFINITE_TIME = ULONG_MAX
 Represents infinite time. More...
 
CRYPTOPP_DLL const NameValuePairsg_nullNameValuePairs
 An empty set of name-value pairs. More...
 
CRYPTOPP_DLL const std::string DEFAULT_CHANNEL
 Default channel for BufferedTransformation. More...
 
CRYPTOPP_DLL const std::string AAD_CHANNEL
 Channel for additional authenticated data. More...
 

Detailed Description

Abstract base classes that provide a uniform interface to this library.

Definition in file cryptlib.h.

Typedef Documentation

Provides a constant for BigEndian.

Definition at line 133 of file cryptlib.h.

Definition at line 1091 of file cryptlib.h.

Provides a constant for LittleEndian.

Definition at line 131 of file cryptlib.h.

Enumeration Type Documentation

enum ByteOrder

Provides the byte ordering.

Big-endian and little-endian modes are supported. Bi-endian and PDP-endian modes are not supported.

Enumerator
LITTLE_ENDIAN_ORDER 

byte order is little-endian

BIG_ENDIAN_ORDER 

byte order is big-endian

Definition at line 124 of file cryptlib.h.

enum CipherDir

Specifies a direction for a cipher to operate.

See also
BlockTransformation::IsForwardTransformation(), BlockTransformation::IsPermutation(), BlockTransformation::GetCipherDirection()
Enumerator
ENCRYPTION 

the cipher is performing encryption

DECRYPTION 

the cipher is performing decryption

Definition at line 104 of file cryptlib.h.

Function Documentation

Random Number Generator that does not produce random numbers.

Returns
reference that can be passed to functions that require a RandomNumberGenerator

NullRNG() returns a reference that can be passed to functions that require a RandomNumberGenerator but don't actually use it. The NullRNG() throws NotImplemented when a generation function is called.

See also
ClassNullRNG, PK_SignatureScheme::IsProbabilistic()

Definition at line 402 of file cryptlib.cpp.

Here is the caller graph for this function:

An input discarding BufferedTransformation.

Returns
a reference to a BufferedTransformation object that discards all input

Definition at line 79 of file cryptlib.cpp.

Here is the caller graph for this function:

Variable Documentation

CRYPTOPP_DLL const std::string AAD_CHANNEL

Channel for additional authenticated data.

AAD_CHANNEL is equal to "AAD"

Definition at line 60 of file cryptlib.cpp.

CRYPTOPP_DLL const std::string DEFAULT_CHANNEL

Default channel for BufferedTransformation.

DEFAULT_CHANNEL is equal to an empty string

Definition at line 59 of file cryptlib.cpp.

CRYPTOPP_DLL const NameValuePairs& g_nullNameValuePairs

An empty set of name-value pairs.

Definition at line 76 of file cryptlib.cpp.

const unsigned long INFINITE_TIME = ULONG_MAX

Represents infinite time.

Definition at line 111 of file cryptlib.h.