Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | List of all members
ECIES< EC, HASH, COFACTOR_OPTION, DHAES_MODE, LABEL_OCTETS > Class Template Reference

Elliptic Curve Integrated Encryption Scheme. More...

#include <eccrypto.h>

Inheritance diagram for ECIES< EC, HASH, COFACTOR_OPTION, DHAES_MODE, LABEL_OCTETS >:
[legend]
Collaboration diagram for ECIES< EC, HASH, COFACTOR_OPTION, DHAES_MODE, LABEL_OCTETS >:
[legend]

Public Member Functions

CRYPTOPP_STATIC_CONSTEXPR const char *CRYPTOPP_API StaticAlgorithmName ()
 

Additional Inherited Members

- Public Types inherited from DL_ES< DL_Keys_EC< EC >, DL_KeyAgreementAlgorithm_DH< EC::Point, COFACTOR_OPTION >, DL_KeyDerivationAlgorithm_P1363< EC::Point, DHAES_MODE, P1363_KDF2< HASH > >, DL_EncryptionAlgorithm_Xor< HMAC< HASH >, DHAES_MODE, LABEL_OCTETS >, ECIES< EC > >
typedef PK_FinalTemplate< DL_DecryptorImpl< SchemeOptions > > Decryptor
 implements PK_Decryptor interface More...
 
typedef PK_FinalTemplate< DL_EncryptorImpl< SchemeOptions > > Encryptor
 implements PK_Encryptor interface More...
 
- Public Types inherited from DL_Keys_EC< EC >
typedef DL_PublicKey_EC< EC > PublicKey
 
typedef DL_PrivateKey_EC< EC > PrivateKey
 

Detailed Description

template<class EC, class HASH = SHA1, class COFACTOR_OPTION = NoCofactorMultiplication, bool DHAES_MODE = true, bool LABEL_OCTETS = false>
class ECIES< EC, HASH, COFACTOR_OPTION, DHAES_MODE, LABEL_OCTETS >

Elliptic Curve Integrated Encryption Scheme.

Template Parameters
COFACTOR_OPTIONcofactor multiplication option
HASHHashTransformation derived class used for key drivation and MAC computation
DHAES_MODEflag indicating if the MAC includes additional context parameters such as u·V, v·U and label
LABEL_OCTETSflag indicating if the label size is specified in octets or bits

ECIES is an Elliptic Curve based Integrated Encryption Scheme (IES). The scheme combines a Key Encapsulation Method (KEM) with a Data Encapsulation Method (DEM) and a MAC tag. The scheme is IND-CCA2, which is a strong notion of security. You should prefer an Integrated Encryption Scheme over homegrown schemes.

The library's original implementation is based on an early P1363 draft, which itself appears to be based on an early Certicom SEC-1 draft (or an early SEC-1 draft was based on a P1363 draft). Crypto++ 4.2 used the early draft in its Integrated Ecryption Schemes with NoCofactorMultiplication, DHAES_MODE=false and LABEL_OCTETS=true.

If you desire an Integrated Encryption Scheme with Crypto++ 4.2 compatibility, then use the ECIES template class with NoCofactorMultiplication, DHAES_MODE=false and LABEL_OCTETS=true.

If you desire an Integrated Encryption Scheme with Bouncy Castle 1.54 and Botan 1.11 compatibility, then use the ECIES template class with NoCofactorMultiplication, DHAES_MODE=true and LABEL_OCTETS=false.

The default template parameters ensure compatibility with Bouncy Castle 1.54 and Botan 1.11. The combination of IncompatibleCofactorMultiplication and DHAES_MODE=true is recommended for best efficiency and security. SHA1 is used for compatibility reasons, but it can be changed if desired. SHA-256 or another hash will likely improve the security provided by the MAC. The hash is also used in the key derivation function as a PRF.

Below is an example of constructing a Crypto++ 4.2 compatible ECIES encryptor and decryptor.

    AutoSeededRandomPool prng;
    DL_PrivateKey_EC<ECP> key;
    key.Initialize(prng, ASN1::secp160r1());
    ECIES<ECP,SHA1,NoCofactorMultiplication,true,true>::Decryptor decryptor(key);
    ECIES<ECP,SHA1,NoCofactorMultiplication,true,true>::Encryptor encryptor(decryptor);
See also
DLIES, Elliptic Curve Integrated Encryption Scheme (ECIES), Martínez, Encinas, and Ávila's A Survey of the Elliptic Curve Integrated Encryption Schemes
Since
Crypto++ 4.0, Crypto++ 5.7 for Bouncy Castle and Botan compatibility

Definition at line 618 of file eccrypto.h.

Member Function Documentation

template<class EC , class HASH = SHA1, class COFACTOR_OPTION = NoCofactorMultiplication, bool DHAES_MODE = true, bool LABEL_OCTETS = false>
CRYPTOPP_STATIC_CONSTEXPR const char* CRYPTOPP_API ECIES< EC, HASH, COFACTOR_OPTION, DHAES_MODE, LABEL_OCTETS >::StaticAlgorithmName ( )
inline

Definition at line 627 of file eccrypto.h.


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