Updated documentation
parent
10c96e5a95
commit
9993ffe200
34
esign.h
34
esign.h
|
|
@ -1,11 +1,12 @@
|
||||||
|
// esign.h - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
//! \file esign.h
|
||||||
|
//! \brief Classes providing ESIGN signature schemes as defined in IEEE P1363a
|
||||||
|
//! \since Crypto++ 5.0
|
||||||
|
|
||||||
#ifndef CRYPTOPP_ESIGN_H
|
#ifndef CRYPTOPP_ESIGN_H
|
||||||
#define CRYPTOPP_ESIGN_H
|
#define CRYPTOPP_ESIGN_H
|
||||||
|
|
||||||
/** \file
|
|
||||||
This file contains classes that implement the
|
|
||||||
ESIGN signature schemes as defined in IEEE P1363a.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include "pubkey.h"
|
#include "pubkey.h"
|
||||||
#include "integer.h"
|
#include "integer.h"
|
||||||
|
|
@ -14,7 +15,9 @@
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
//! _
|
//! \class ESIGNFunction
|
||||||
|
//! \brief ESIGN trapdoor function using the public key
|
||||||
|
//! \since Crypto++ 5.0
|
||||||
class ESIGNFunction : public TrapdoorFunction, public ASN1CryptoMaterial<PublicKey>
|
class ESIGNFunction : public TrapdoorFunction, public ASN1CryptoMaterial<PublicKey>
|
||||||
{
|
{
|
||||||
typedef ESIGNFunction ThisClass;
|
typedef ESIGNFunction ThisClass;
|
||||||
|
|
@ -51,7 +54,9 @@ protected:
|
||||||
Integer m_n, m_e;
|
Integer m_n, m_e;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! _
|
//! \class InvertibleESIGNFunction
|
||||||
|
//! \brief ESIGN trapdoor function using the private key
|
||||||
|
//! \since Crypto++ 5.0
|
||||||
class InvertibleESIGNFunction : public ESIGNFunction, public RandomizedTrapdoorFunctionInverse, public PrivateKey
|
class InvertibleESIGNFunction : public ESIGNFunction, public RandomizedTrapdoorFunctionInverse, public PrivateKey
|
||||||
{
|
{
|
||||||
typedef InvertibleESIGNFunction ThisClass;
|
typedef InvertibleESIGNFunction ThisClass;
|
||||||
|
|
@ -85,7 +90,10 @@ protected:
|
||||||
Integer m_p, m_q;
|
Integer m_p, m_q;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! _
|
//! \class EMSA5Pad
|
||||||
|
//! \brief EMSA5 padding method
|
||||||
|
//! \tparam T Mask Generation Function
|
||||||
|
//! \since Crypto++ 5.0
|
||||||
template <class T>
|
template <class T>
|
||||||
class EMSA5Pad : public PK_DeterministicSignatureMessageEncodingMethod
|
class EMSA5Pad : public PK_DeterministicSignatureMessageEncodingMethod
|
||||||
{
|
{
|
||||||
|
|
@ -109,7 +117,9 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//! EMSA5, for use with ESIGN
|
//! \class P1363_EMSA5
|
||||||
|
//! \brief EMSA5 padding method, for use with ESIGN
|
||||||
|
//! \since Crypto++ 5.0
|
||||||
struct P1363_EMSA5 : public SignatureStandard
|
struct P1363_EMSA5 : public SignatureStandard
|
||||||
{
|
{
|
||||||
typedef EMSA5Pad<P1363_MGF1> SignatureMessageEncodingMethod;
|
typedef EMSA5Pad<P1363_MGF1> SignatureMessageEncodingMethod;
|
||||||
|
|
@ -122,7 +132,11 @@ struct ESIGN_Keys
|
||||||
typedef InvertibleESIGNFunction PrivateKey;
|
typedef InvertibleESIGNFunction PrivateKey;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! ESIGN, as defined in IEEE P1363a
|
//! \class ESIGN
|
||||||
|
//! \brief ESIGN signature scheme, IEEE P1363a
|
||||||
|
//! \tparam H HashTransformation derived class
|
||||||
|
//! \tparam STANDARD Signature encoding method
|
||||||
|
//! \since Crypto++ 5.0
|
||||||
template <class H, class STANDARD = P1363_EMSA5>
|
template <class H, class STANDARD = P1363_EMSA5>
|
||||||
struct ESIGN : public TF_SS<STANDARD, H, ESIGN_Keys>
|
struct ESIGN : public TF_SS<STANDARD, H, ESIGN_Keys>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue