10 #define CRYPTOPP_LUC_H 18 #if CRYPTOPP_MSC_VERSION 19 # pragma warning(push) 20 # pragma warning(disable: 4127 4189) 57 bool GetVoidValue(
const char *
name,
const std::type_info &valueType,
void *pValue)
const;
108 bool GetVoidValue(
const char *
name,
const std::type_info &valueType,
void *pValue)
const;
138 template <
class STANDARD>
149 template <
class STANDARD,
class H>
204 throw NotImplemented(
"DL_BasePrecomputation_LUC: CascadeExponentiate not implemented");
220 void SimultaneousExponentiate(
Element *results,
const Element &base,
const Integer *exponents,
unsigned int exponentsCount)
const;
224 throw NotImplemented(
"LUC_GroupParameters: MultiplyElements can not be implemented");
229 throw NotImplemented(
"LUC_GroupParameters: MultiplyElements can not be implemented");
235 return GetValueHelper<DL_GroupParameters_IntegerBased>(
this,
name, valueType, pValue).Assignable();
283 struct LUC_HMP :
public DL_SS<DL_SignatureKeys_LUC, DL_Algorithm_LUC_HMP, DL_SignatureMessageEncodingMethod_DSA, H>
302 template <
class HASH = SHA1,
class COFACTOR_OPTION = NoCofactorMultiplication,
bool DHAES_MODE = true,
bool LABEL_OCTETS = false>
306 DL_KeyAgreementAlgorithm_DH<Integer, COFACTOR_OPTION>,
307 DL_KeyDerivationAlgorithm_P1363<Integer, DHAES_MODE, P1363_KDF2<HASH> >,
308 DL_EncryptionAlgorithm_Xor<HMAC<HASH>, DHAES_MODE, LABEL_OCTETS>,
321 #if CRYPTOPP_MSC_VERSION 322 # pragma warning(pop) virtual ~DL_GroupPrecomputation_LUC()
NoCofactorMultiplication DefaultCofactorOption
DL_PrivateKey_GFP< GroupParameters > PrivateKey
void Initialize(RandomNumberGenerator &rng, unsigned int modulusBits, const Integer &eStart=17)
Create a LUC private key.
void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &alg)
const Integer & GetModulus() const
Trapdoor Function (TF) encryption scheme.
#define CRYPTOPP_STATIC_CONSTEXPR
const Integer & GetModulus() const
LUC HMP signature algorithm.
DL_GroupParameters_LUC GroupParameters
InvertibleLUCFunction ThisClass
void Precompute(const DL_GroupPrecomputation< Element > &group, unsigned int maxExpBits, unsigned int storage)
#define NAMESPACE_BEGIN(x)
Converts an enumeration to a type suitable for use as a template parameter.
LUCSS< PKCS1v15, SHA >::Signer LUCSSA_PKCS1v15_SHA_Signer
DL_PublicKey_GFP< GroupParameters > PublicKey
Abstract base classes that provide a uniform interface to this library.
const Integer & GetBase(const DL_GroupPrecomputation< Element > &group) const
LUC GroupParameters specialization.
bool IsInitialized() const
LUCES< OAEP< SHA > >::Encryptor LUCES_OAEP_SHA_Encryptor
LUCES< OAEP< SHA > >::Decryptor LUCES_OAEP_SHA_Decryptor
virtual ~DL_BasePrecomputation_LUC()
const Integer & GetMultiplicativeInverseOfPrime2ModPrime1() const
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const
Interface for random number generators.
LUC Integrated Encryption Scheme.
Discrete Log (DL) encryption scheme.
Integer PreimageBound() const
Returns the maximum size of a message before the trapdoor function is applied.
Classes for performing mathematics over different fields.
Interface for private keys.
bool IsIdentity(const Integer &element) const
Determines if an element is an identity.
Interface for Discrete Log (DL) public keys.
const Integer & GetPublicExponent() const
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
Get a named value.
GF(p) group parameters that default to safe primes.
Discrete Log (DL) signature scheme.
size_t RLen(const DL_GroupParameters< Integer > ¶ms) const
Classes and functions for secure memory allocations.
void SetModulus(const Integer &v)
void SetBase(const DL_GroupPrecomputation< Element > &group, const Integer &base)
const Integer & GetPrime1() const
Integer CalculateInverse(RandomNumberGenerator &rng, const Integer &x) const
Calculates the inverse of an element.
Applies the inverse of the trapdoor function.
LUC signature scheme with appendix.
Classes for PKCS padding schemes.
const Integer & GetPrime2() const
A method was called which was not implemented.
CRYPTOPP_STATIC_CONSTEXPR const char * StaticAlgorithmName()
Interface for Elgamal-like signature algorithms.
Classes for Diffie-Hellman key exchange.
const AbstractGroup< Element > & GetGroup() const
bool Validate(int, bool, const char *)
Multiple precision integer with arithmetic operations.
Integer-based GroupParameters default implementation.
static const Integer &CRYPTOPP_API Two()
Integer representing 2.
Applies the trapdoor function.
Classes and functions for schemes based on Discrete Logs (DL) over GF(p)
DL_GroupParameters_LUC_DefaultSafePrime GroupParameters
#define CRYPTOPP_ASSERT(exp)
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
Get a named value.
The LUC inverse function.
Discrete Log (DL) public key in GF(p) groups.
Element CascadeExponentiate(const Element &element1, const Integer &exponent1, const Element &element2, const Integer &exponent2) const
void Load(const DL_GroupPrecomputation< Element > &group, BufferedTransformation &storedPrecomputation)
void DEREncode(BufferedTransformation &bt) const
Encode in DER format.
void DEREncode(BufferedTransformation &bt) const
Integer CascadeExponentiate(const DL_GroupPrecomputation< Element > &group, const Integer &exponent, const DL_FixedBasePrecomputation< Integer > &pc2, const Integer &exponent2) const
void SetPrime2(const Integer &q)
static std::string StaticAlgorithmName()
LUC-HMP, based on "Digital signature schemes based on Lucas functions" by Patrick Horster...
DL_PublicKey_GFP< GroupParameters > PublicKey
Discrete Log (DL) private key in GF(p) groups.
#define CRYPTOPP_UNUSED(x)
virtual ~DL_GroupParameters_LUC()
void SetPrime1(const Integer &p)
CRYPTOPP_STATIC_CONSTEXPR const char * StaticAlgorithmName()
void AssignFrom(const NameValuePairs &source)
Assign values to this object.
void Initialize(const Integer &n, const Integer &e, const Integer &p, const Integer &q, const Integer &u)
Initialize a LUC private key with {n,e,p,q,dp,dq,u}.
Element MultiplyElements(const Element &a, const Element &b) const
Multiple precision integer with arithmetic operations.
void BERDecode(BufferedTransformation &bt)
void SetPublicExponent(const Integer &e)
Interface for public keys.
Integer ImageBound() const
Returns the maximum size of a message after the trapdoor function is applied.
void SetMultiplicativeInverseOfPrime2ModPrime1(const Integer &u)
Element BERDecodeElement(BufferedTransformation &bt) const
DL_PrivateKey_GFP< GroupParameters > PrivateKey
LUCSS< PKCS1v15, SHA >::Verifier LUCSSA_PKCS1v15_SHA_Verifier
virtual ~InvertibleLUCFunction()
DH_Domain< DL_GroupParameters_LUC_DefaultSafePrime > LUC_DH
LUC-DH.
void Save(const DL_GroupPrecomputation< Element > &group, BufferedTransformation &storedPrecomputation) const
InvertibleLUCFunction PrivateKey
unsigned int GetDefaultSubgroupOrderSize(unsigned int modulusSize) const
unsigned int ByteCount() const
Determines the number of bytes required to represent the Integer.
virtual ~DL_Algorithm_LUC_HMP()
void SetModulus(const Integer &n)
virtual Integer GetGroupOrder() const
Retrieves the order of the group.
void Initialize(const Integer &n, const Integer &e)
Initialize a LUC public key with {n,e}.
Interface for retrieving values given their names.
Template implementing constructors for public key algorithm classes.
bool Validate(RandomNumberGenerator &rng, unsigned int level) const
Check this object for errors.
Trapdoor Function (TF) Signature Scheme.