Crypto++  6.0
Free C++ class library of cryptographic schemes
Classes | Macros | Typedefs | Enumerations | Functions
pubkey.h File Reference

This file contains helper classes/functions for implementing public key algorithms. More...

Go to the source code of this file.

Classes

class  TrapdoorFunctionBounds
 Provides range for plaintext and ciphertext lengths. More...
 
class  RandomizedTrapdoorFunction
 Applies the trapdoor function, using random data if required. More...
 
class  TrapdoorFunction
 Applies the trapdoor function. More...
 
class  RandomizedTrapdoorFunctionInverse
 Applies the inverse of the trapdoor function, using random data if required. More...
 
class  TrapdoorFunctionInverse
 Applies the inverse of the trapdoor function. More...
 
class  PK_EncryptionMessageEncodingMethod
 Message encoding method for public key encryption. More...
 
class  TF_Base< TFI, MEI >
 The base for trapdoor based cryptosystems. More...
 
class  PK_FixedLengthCryptoSystemImpl< BASE >
 Public key trapdoor function default implementation. More...
 
class  TF_CryptoSystemBase< INTFACE, BASE >
 Trapdoor function cryptosystem base class. More...
 
class  TF_DecryptorBase
 Trapdoor function cryptosystems decryption base class. More...
 
class  TF_EncryptorBase
 Trapdoor function cryptosystems encryption base class. More...
 
class  PK_SignatureMessageEncodingMethod
 Interface for message encoding method for public key signature schemes. More...
 
struct  PK_SignatureMessageEncodingMethod::HashIdentifierLookup
 
struct  PK_SignatureMessageEncodingMethod::HashIdentifierLookup::HashIdentifierLookup2< H >
 
class  PK_DeterministicSignatureMessageEncodingMethod
 Interface for message encoding method for public key signature schemes. More...
 
class  PK_RecoverableSignatureMessageEncodingMethod
 Interface for message encoding method for public key signature schemes. More...
 
class  DL_SignatureMessageEncodingMethod_DSA
 Interface for message encoding method for public key signature schemes. More...
 
class  DL_SignatureMessageEncodingMethod_NR
 Interface for message encoding method for public key signature schemes. More...
 
class  PK_MessageAccumulatorBase
 Interface for message encoding method for public key signature schemes. More...
 
class  PK_MessageAccumulatorImpl< HASH_ALGORITHM >
 Interface for message encoding method for public key signature schemes. More...
 
class  TF_SignatureSchemeBase< INTFACE, BASE >
 Trapdoor Function (TF) Signature Scheme base class. More...
 
class  TF_SignerBase
 Trapdoor Function (TF) Signer base class. More...
 
class  TF_VerifierBase
 Trapdoor Function (TF) Verifier base class. More...
 
struct  TF_CryptoSchemeOptions< T1, T2, T3 >
 Trapdoor Function (TF) scheme options. More...
 
struct  TF_SignatureSchemeOptions< T1, T2, T3, T4 >
 Trapdoor Function (TF) signature scheme options. More...
 
class  TF_ObjectImplBase< BASE, SCHEME_OPTIONS, KEY_CLASS >
 Trapdoor Function (TF) base implementation. More...
 
class  TF_ObjectImplExtRef< BASE, SCHEME_OPTIONS, KEY >
 Trapdoor Function (TF) signature with external reference. More...
 
class  TF_ObjectImpl< BASE, SCHEME_OPTIONS, KEY_CLASS >
 Trapdoor Function (TF) signature scheme options. More...
 
class  TF_DecryptorImpl< SCHEME_OPTIONS >
 Trapdoor Function (TF) decryptor options. More...
 
class  TF_EncryptorImpl< SCHEME_OPTIONS >
 Trapdoor Function (TF) encryptor options. More...
 
class  TF_SignerImpl< SCHEME_OPTIONS >
 Trapdoor Function (TF) encryptor options. More...
 
class  TF_VerifierImpl< SCHEME_OPTIONS >
 Trapdoor Function (TF) encryptor options. More...
 
class  MaskGeneratingFunction
 Mask generation function interface. More...
 
class  P1363_MGF1
 P1363 mask generation function. More...
 
class  P1363_KDF2< H >
 P1363 key derivation function. More...
 
class  DL_BadElement
 Exception thrown when an invalid group element is encountered. More...
 
class  DL_GroupParameters< T >
 Interface for Discrete Log (DL) group parameters. More...
 
class  DL_GroupParametersImpl< GROUP_PRECOMP, BASE_PRECOMP, BASE >
 Base implementation of Discrete Log (DL) group parameters. More...
 
class  DL_Key< T >
 Base class for a Discrete Log (DL) key. More...
 
class  DL_PublicKey< T >
 Interface for Discrete Log (DL) public keys. More...
 
class  DL_PrivateKey< T >
 Interface for Discrete Log (DL) private keys. More...
 
class  DL_KeyImpl< PK, GP, O >
 Discrete Log (DL) key base implementation. More...
 
class  DL_PrivateKeyImpl< GP >
 Discrete Log (DL) private key base implementation. More...
 
class  DL_PrivateKey_WithSignaturePairwiseConsistencyTest< BASE, SIGNATURE_SCHEME >
 
class  DL_PublicKeyImpl< GP >
 Discrete Log (DL) public key base implementation. More...
 
class  DL_ElgamalLikeSignatureAlgorithm< T >
 Interface for Elgamal-like signature algorithms. More...
 
class  DeterministicSignatureAlgorithm
 Interface for deterministic signers. More...
 
class  DL_KeyAgreementAlgorithm< T >
 Interface for DL key agreement algorithms. More...
 
class  DL_KeyDerivationAlgorithm< T >
 Interface for key derivation algorithms used in DL cryptosystems. More...
 
class  DL_SymmetricEncryptionAlgorithm
 Interface for symmetric encryption algorithms used in DL cryptosystems. More...
 
class  DL_Base< KI >
 Discrete Log (DL) base interface. More...
 
class  DL_SignatureSchemeBase< INTFACE, KEY_INTFACE >
 Discrete Log (DL) signature scheme base implementation. More...
 
class  DL_SignerBase< T >
 Discrete Log (DL) signature scheme signer base implementation. More...
 
class  DL_VerifierBase< T >
 Discret Log (DL) Verifier base class. More...
 
class  DL_CryptoSystemBase< PK, KI >
 Discrete Log (DL) cryptosystem base implementation. More...
 
class  DL_DecryptorBase< T >
 Discrete Log (DL) decryptor base implementation. More...
 
class  DL_EncryptorBase< T >
 Discrete Log (DL) encryptor base implementation. More...
 
struct  DL_SchemeOptionsBase< T1, T2 >
 Discrete Log (DL) scheme options. More...
 
struct  DL_KeyedSchemeOptions< T1, T2 >
 Discrete Log (DL) key options. More...
 
struct  DL_SignatureSchemeOptions< T1, T2, T3, T4, T5 >
 Discrete Log (DL) signature scheme options. More...
 
struct  DL_CryptoSchemeOptions< T1, T2, T3, T4, T5 >
 Discrete Log (DL) crypto scheme options. More...
 
class  DL_ObjectImplBase< BASE, SCHEME_OPTIONS, KEY >
 Discrete Log (DL) base object implementation. More...
 
class  DL_ObjectImpl< BASE, SCHEME_OPTIONS, KEY >
 Discrete Log (DL) object implementation. More...
 
class  DL_SignerImpl< SCHEME_OPTIONS >
 Discrete Log (DL) signer implementation. More...
 
class  DL_VerifierImpl< SCHEME_OPTIONS >
 Discrete Log (DL) verifier implementation. More...
 
class  DL_EncryptorImpl< SCHEME_OPTIONS >
 Discrete Log (DL) encryptor implementation. More...
 
class  DL_DecryptorImpl< SCHEME_OPTIONS >
 Discrete Log (DL) decryptor implementation. More...
 
class  DL_SimpleKeyAgreementDomainBase< T >
 Discrete Log (DL) simple key agreement base implementation. More...
 
class  DL_KeyAgreementAlgorithm_DH< ELEMENT, COFACTOR_OPTION >
 Diffie-Hellman key agreement algorithm. More...
 
class  PK_FinalTemplate< BASE >
 Template implementing constructors for public key algorithm classes. More...
 
struct  EncryptionStandard
 Base class for public key encryption standard classes. More...
 
struct  SignatureStandard
 Base class for public key signature standard classes. More...
 
class  TF_ES< KEYS, STANDARD, ALG_INFO >
 Trapdoor Function (TF) encryption scheme. More...
 
class  TF_ES< KEYS, STANDARD, ALG_INFO >
 Trapdoor Function (TF) encryption scheme. More...
 
class  TF_SS< KEYS, STANDARD, H, ALG_INFO >
 Trapdoor Function (TF) Signature Scheme. More...
 
class  TF_SS< KEYS, STANDARD, H, ALG_INFO >
 Trapdoor Function (TF) Signature Scheme. More...
 
class  DL_SS< KEYS, SA, MEM, H, ALG_INFO >
 Discrete Log (DL) signature scheme. More...
 
class  DL_SS< KEYS, SA, MEM, H, ALG_INFO >
 Discrete Log (DL) signature scheme. More...
 
class  DL_ES< KEYS, AA, DA, EA, ALG_INFO >
 Discrete Log (DL) encryption scheme. More...
 

Macros

#define MAYBE_RETURN(x)   CRYPTOPP_UNUSED(x)
 

Typedefs

typedef std::pair< const byte *, unsigned int > HashIdentifier
 
typedef EnumToType< CofactorMultiplicationOption, NO_COFACTOR_MULTIPLICTIONNoCofactorMultiplication
 
typedef EnumToType< CofactorMultiplicationOption, COMPATIBLE_COFACTOR_MULTIPLICTIONCompatibleCofactorMultiplication
 
typedef EnumToType< CofactorMultiplicationOption, INCOMPATIBLE_COFACTOR_MULTIPLICTIONIncompatibleCofactorMultiplication
 

Enumerations

enum  CofactorMultiplicationOption { NO_COFACTOR_MULTIPLICTION, COMPATIBLE_COFACTOR_MULTIPLICTION, INCOMPATIBLE_COFACTOR_MULTIPLICTION }
 Methods for avoiding "Small-Subgroup" attacks on Diffie-Hellman Key Agreement. More...
 

Functions

void P1363_MGF1KDF2_Common (HashTransformation &hash, byte *output, size_t outputLength, const byte *input, size_t inputLength, const byte *derivationParams, size_t derivationParamsLength, bool mask, unsigned int counterStart)
 

Detailed Description

This file contains helper classes/functions for implementing public key algorithms.

The class hierachies in this header file tend to look like this:

                  x1
                 +--+
                 |  |
                y1  z1
                 |  |
            x2<y1>  x2<z1>
                 |  |
                y2  z2
                 |  |
            x3<y2>  x3<z2>
                 |  |
                y3  z3

The TF_ prefix means an implementation using trapdoor functions on integers.

The DL_ prefix means an implementation using group operations in groups where discrete log is hard.

Definition in file pubkey.h.

Enumeration Type Documentation

◆ CofactorMultiplicationOption

Methods for avoiding "Small-Subgroup" attacks on Diffie-Hellman Key Agreement.

Additional methods exist and include public key validation and choice of prime p.

See also
Methods for Avoiding the "Small-Subgroup" Attacks on the Diffie-Hellman Key Agreement Method for S/MIME
Enumerator
NO_COFACTOR_MULTIPLICTION 

No cofactor multiplication applied.

COMPATIBLE_COFACTOR_MULTIPLICTION 

Cofactor multiplication compatible with ordinary Diffie-Hellman.

Modifies the computation of ZZ by including j (the cofactor) in the computations and is compatible with ordinary Diffie-Hellman.

INCOMPATIBLE_COFACTOR_MULTIPLICTION 

Cofactor multiplication incompatible with ordinary Diffie-Hellman.

Modifies the computation of ZZ by including j (the cofactor) in the computations but is not compatible with ordinary Diffie-Hellman.

Definition at line 2041 of file pubkey.h.