Crypto++ 8.9 Free C++ class library of cryptographic schemes

luc.h
Go to the documentation of this file.
1 // luc.h - originally written and placed in the public domain by Wei Dai
2
3 /// \file luc.h
4 /// \brief Classes for the LUC cryptosystem
5 /// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
6 /// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
7 /// defined later in this .h file may be of more practical interest.
8 /// \since Crypto++ 2.1
9
10 #ifndef CRYPTOPP_LUC_H
11 #define CRYPTOPP_LUC_H
12
13 #include "cryptlib.h"
14 #include "gfpcrypt.h"
15 #include "integer.h"
16 #include "algebra.h"
17 #include "secblock.h"
18
19 #if CRYPTOPP_MSC_VERSION
20 # pragma warning(push)
21 # pragma warning(disable: 4127 4189)
22 #endif
23
24 #include "pkcspad.h"
25 #include "integer.h"
26 #include "oaep.h"
27 #include "dh.h"
28
29 #include <limits.h>
30
31 NAMESPACE_BEGIN(CryptoPP)
32
33 /// \brief The LUC function.
34 /// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
35 /// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
36 /// defined later in this .h file may be of more practical interest.
37 /// \since Crypto++ 2.1
38 class LUCFunction : public TrapdoorFunction, public PublicKey
39 {
40 typedef LUCFunction ThisClass;
41
42 public:
43 virtual ~LUCFunction() {}
44
45 /// \brief Initialize a LUC public key with {n,e}
46 /// \param n the modulus
47 /// \param e the public exponent
48 void Initialize(const Integer &n, const Integer &e)
49 {m_n = n; m_e = e;}
50
51 void BERDecode(BufferedTransformation &bt);
52 void DEREncode(BufferedTransformation &bt) const;
53
54 Integer ApplyFunction(const Integer &x) const;
55 Integer PreimageBound() const {return m_n;}
56 Integer ImageBound() const {return m_n;}
57
58 bool Validate(RandomNumberGenerator &rng, unsigned int level) const;
59 bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const;
60 void AssignFrom(const NameValuePairs &source);
61
62 // non-derived interface
63 const Integer & GetModulus() const {return m_n;}
64 const Integer & GetPublicExponent() const {return m_e;}
65
66 void SetModulus(const Integer &n) {m_n = n;}
67 void SetPublicExponent(const Integer &e) {m_e = e;}
68
69 protected:
70 Integer m_n, m_e;
71 };
72
73 /// \brief The LUC inverse function.
74 /// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
75 /// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
76 /// defined later in this .h file may be of more practical interest.
77 /// \since Crypto++ 2.1
78 class InvertibleLUCFunction : public LUCFunction, public TrapdoorFunctionInverse, public PrivateKey
79 {
80 typedef InvertibleLUCFunction ThisClass;
81
82 public:
83 virtual ~InvertibleLUCFunction() {}
84
85 /// \brief Create a LUC private key
86 /// \param rng a RandomNumberGenerator derived class
87 /// \param modulusBits the size of the modulus, in bits
88 /// \param eStart the desired starting public exponent
89 /// \details Initialize() creates a new keypair using a starting public exponent of 17.
90 /// \details This function overload of Initialize() creates a new keypair because it
91 /// takes a RandomNumberGenerator() as a parameter. If you have an existing keypair,
92 /// then use one of the other Initialize() overloads.
93 void Initialize(RandomNumberGenerator &rng, unsigned int modulusBits, const Integer &eStart=17);
94
95 /// \brief Initialize a LUC private key with {n,e,p,q,dp,dq,u}
96 /// \param n modulus
97 /// \param e public exponent
98 /// \param p first prime factor
99 /// \param q second prime factor
100 /// \param u q<sup>-1</sup> mod p
101 /// \details This Initialize() function overload initializes a private key from existing parameters.
102 void Initialize(const Integer &n, const Integer &e, const Integer &p, const Integer &q, const Integer &u)
103 {m_n = n; m_e = e; m_p = p; m_q = q; m_u = u;}
104
105 void BERDecode(BufferedTransformation &bt);
106 void DEREncode(BufferedTransformation &bt) const;
107
108 Integer CalculateInverse(RandomNumberGenerator &rng, const Integer &x) const;
109
110 bool Validate(RandomNumberGenerator &rng, unsigned int level) const;
111 bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const;
112 void AssignFrom(const NameValuePairs &source);
113 /*! parameters: (ModulusSize, PublicExponent (default 17)) */
114 void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &alg);
115
116 // non-derived interface
117 const Integer& GetPrime1() const {return m_p;}
118 const Integer& GetPrime2() const {return m_q;}
119 const Integer& GetMultiplicativeInverseOfPrime2ModPrime1() const {return m_u;}
120
121 void SetPrime1(const Integer &p) {m_p = p;}
122 void SetPrime2(const Integer &q) {m_q = q;}
123 void SetMultiplicativeInverseOfPrime2ModPrime1(const Integer &u) {m_u = u;}
124
125 protected:
126 Integer m_p, m_q, m_u;
127 };
128
129 /// \brief LUC cryptosystem
130 /// \since Crypto++ 2.1
131 struct LUC
132 {
133 static std::string StaticAlgorithmName() {return "LUC";}
134 typedef LUCFunction PublicKey;
135 typedef InvertibleLUCFunction PrivateKey;
136 };
137
138 /// \brief LUC encryption scheme
139 /// \tparam STANDARD signature standard
140 /// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
141 /// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
142 /// defined later in this .h file may be of more practical interest.
143 /// \since Crypto++ 2.1
144 template <class STANDARD>
145 struct LUCES : public TF_ES<LUC, STANDARD>
146 {
147 };
148
149 /// \brief LUC signature scheme with appendix
150 /// \tparam STANDARD signature standard
151 /// \tparam H hash transformation
152 /// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
153 /// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
154 /// defined later in this .h file may be of more practical interest.
155 /// \since Crypto++ 2.1
156 template <class STANDARD, class H>
157 struct LUCSS : public TF_SS<LUC, STANDARD, H>
158 {
159 };
160
161 // analogous to the RSA schemes defined in PKCS #1 v2.0
162 typedef LUCES<OAEP<SHA1> >::Decryptor LUCES_OAEP_SHA_Decryptor;
163 typedef LUCES<OAEP<SHA1> >::Encryptor LUCES_OAEP_SHA_Encryptor;
164
165 typedef LUCSS<PKCS1v15, SHA1>::Signer LUCSSA_PKCS1v15_SHA_Signer;
166 typedef LUCSS<PKCS1v15, SHA1>::Verifier LUCSSA_PKCS1v15_SHA_Verifier;
167
168 // ********************************************************
169
170 /// \brief LUC GroupParameters precomputation
171 /// \details No actual precomputation is performed
172 /// \since Crypto++ 2.1
173 class DL_GroupPrecomputation_LUC : public DL_GroupPrecomputation<Integer>
174 {
175 public:
176 virtual ~DL_GroupPrecomputation_LUC() {}
177
178 const AbstractGroup<Element> & GetGroup() const {CRYPTOPP_ASSERT(false); throw 0;}
179 Element BERDecodeElement(BufferedTransformation &bt) const {return Integer(bt);}
180 void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {v.DEREncode(bt);}
181
182 // non-inherited
183 void SetModulus(const Integer &v) {m_p = v;}
184 const Integer & GetModulus() const {return m_p;}
185
186 private:
187 Integer m_p;
188 };
189
190 /// \brief LUC Precomputation
191 /// \since Crypto++ 2.1
192 class DL_BasePrecomputation_LUC : public DL_FixedBasePrecomputation<Integer>
193 {
194 public:
195 virtual ~DL_BasePrecomputation_LUC() {}
196
197 // DL_FixedBasePrecomputation
198 bool IsInitialized() const {return m_g.NotZero();}
199 void SetBase(const DL_GroupPrecomputation<Element> &group, const Integer &base)
200 {CRYPTOPP_UNUSED(group); m_g = base;}
201 const Integer & GetBase(const DL_GroupPrecomputation<Element> &group) const
202 {CRYPTOPP_UNUSED(group); return m_g;}
203 void Precompute(const DL_GroupPrecomputation<Element> &group, unsigned int maxExpBits, unsigned int storage)
204 {CRYPTOPP_UNUSED(group); CRYPTOPP_UNUSED(maxExpBits); CRYPTOPP_UNUSED(storage);}
205 void Load(const DL_GroupPrecomputation<Element> &group, BufferedTransformation &storedPrecomputation)
206 {CRYPTOPP_UNUSED(group); CRYPTOPP_UNUSED(storedPrecomputation);}
207 void Save(const DL_GroupPrecomputation<Element> &group, BufferedTransformation &storedPrecomputation) const
208 {CRYPTOPP_UNUSED(group); CRYPTOPP_UNUSED(storedPrecomputation);}
209 Integer Exponentiate(const DL_GroupPrecomputation<Element> &group, const Integer &exponent) const;
210 Integer CascadeExponentiate(const DL_GroupPrecomputation<Element> &group, const Integer &exponent, const DL_FixedBasePrecomputation<Integer> &pc2, const Integer &exponent2) const
211 {
212 CRYPTOPP_UNUSED(group); CRYPTOPP_UNUSED(exponent); CRYPTOPP_UNUSED(pc2); CRYPTOPP_UNUSED(exponent2);
213 // shouldn't be called
214 throw NotImplemented("DL_BasePrecomputation_LUC: CascadeExponentiate not implemented");
215 }
216
217 private:
218 Integer m_g;
219 };
220
221 /// \brief LUC GroupParameters specialization
222 /// \since Crypto++ 2.1
223 class DL_GroupParameters_LUC : public DL_GroupParameters_IntegerBasedImpl<DL_GroupPrecomputation_LUC, DL_BasePrecomputation_LUC>
224 {
225 public:
226 virtual ~DL_GroupParameters_LUC() {}
227
228 // DL_GroupParameters
229 bool IsIdentity(const Integer &element) const {return element == Integer::Two();}
230 void SimultaneousExponentiate(Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const;
231 Element MultiplyElements(const Element &a, const Element &b) const
232 {
233 CRYPTOPP_UNUSED(a); CRYPTOPP_UNUSED(b);
234 throw NotImplemented("LUC_GroupParameters: MultiplyElements can not be implemented");
235 }
236 Element CascadeExponentiate(const Element &element1, const Integer &exponent1, const Element &element2, const Integer &exponent2) const
237 {
238 CRYPTOPP_UNUSED(element1); CRYPTOPP_UNUSED(exponent1); CRYPTOPP_UNUSED(element2); CRYPTOPP_UNUSED(exponent2);
239 throw NotImplemented("LUC_GroupParameters: MultiplyElements can not be implemented");
240 }
241
242 // NameValuePairs interface
243 bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
244 {
245 return GetValueHelper<DL_GroupParameters_IntegerBased>(this, name, valueType, pValue).Assignable();
246 }
247
248 private:
249 int GetFieldType() const {return 2;}
250 };
251
252 /// \brief GF(p) group parameters that default to safe primes
253 /// \since Crypto++ 2.1
254 class DL_GroupParameters_LUC_DefaultSafePrime : public DL_GroupParameters_LUC
255 {
256 public:
257 typedef NoCofactorMultiplication DefaultCofactorOption;
258
259 protected:
260 unsigned int GetDefaultSubgroupOrderSize(unsigned int modulusSize) const {return modulusSize-1;}
261 };
262
263 /// \brief LUC HMP signature algorithm
264 /// \since Crypto++ 2.1
265 class DL_Algorithm_LUC_HMP : public DL_ElgamalLikeSignatureAlgorithm<Integer>
266 {
267 public:
268 CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "LUC-HMP";}
269
270 virtual ~DL_Algorithm_LUC_HMP() {}
271
272 void Sign(const DL_GroupParameters<Integer> &params, const Integer &x, const Integer &k, const Integer &e, Integer &r, Integer &s) const;
273 bool Verify(const DL_GroupParameters<Integer> &params, const DL_PublicKey<Integer> &publicKey, const Integer &e, const Integer &r, const Integer &s) const;
274
275 size_t RLen(const DL_GroupParameters<Integer> &params) const
276 {return params.GetGroupOrder().ByteCount();}
277 };
278
279 /// \brief LUC signature keys
280 /// \since Crypto++ 2.1
281 struct DL_SignatureKeys_LUC
282 {
283 typedef DL_GroupParameters_LUC GroupParameters;
284 typedef DL_PublicKey_GFP<GroupParameters> PublicKey;
285 typedef DL_PrivateKey_GFP<GroupParameters> PrivateKey;
286 };
287
288 /// \brief LUC-HMP, based on "Digital signature schemes based on Lucas functions" by Patrick Horster, Markus Michels, Holger Petersen
289 /// \tparam H hash transformation
290 /// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
291 /// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
292 /// defined later in this .h file may be of more practical interest.
293 /// \since Crypto++ 2.1
294 template <class H>
295 struct LUC_HMP : public DL_SS<DL_SignatureKeys_LUC, DL_Algorithm_LUC_HMP, DL_SignatureMessageEncodingMethod_DSA, H>
296 {
297 };
298
299 /// \brief LUC encryption keys
300 /// \since Crypto++ 2.1
301 struct DL_CryptoKeys_LUC
302 {
303 typedef DL_GroupParameters_LUC_DefaultSafePrime GroupParameters;
304 typedef DL_PublicKey_GFP<GroupParameters> PublicKey;
305 typedef DL_PrivateKey_GFP<GroupParameters> PrivateKey;
306 };
307
308 /// \brief LUC Integrated Encryption Scheme
309 /// \tparam COFACTOR_OPTION cofactor multiplication option
310 /// \tparam HASH HashTransformation derived class used for key drivation and MAC computation
311 /// \tparam DHAES_MODE flag indicating if the MAC includes additional context parameters such as <em>u·V</em>, <em>v·U</em> and label
312 /// \tparam LABEL_OCTETS flag indicating if the label size is specified in octets or bits
313 /// \sa CofactorMultiplicationOption
314 /// \since Crypto++ 2.1, Crypto++ 5.7 for Bouncy Castle and Botan compatibility
315 template <class HASH = SHA1, class COFACTOR_OPTION = NoCofactorMultiplication, bool DHAES_MODE = true, bool LABEL_OCTETS = false>
316 struct LUC_IES
317 : public DL_ES<
318 DL_CryptoKeys_LUC,
319 DL_KeyAgreementAlgorithm_DH<Integer, COFACTOR_OPTION>,
320 DL_KeyDerivationAlgorithm_P1363<Integer, DHAES_MODE, P1363_KDF2<HASH> >,
321 DL_EncryptionAlgorithm_Xor<HMAC<HASH>, DHAES_MODE, LABEL_OCTETS>,
322 LUC_IES<> >
323 {
324 CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "LUC-IES";} // non-standard name
325 };
326
327 // ********************************************************
328
329 /// \brief LUC-DH
330 typedef DH_Domain<DL_GroupParameters_LUC_DefaultSafePrime> LUC_DH;
331
332 NAMESPACE_END
333
334 #if CRYPTOPP_MSC_VERSION
335 # pragma warning(pop)
336 #endif
337
338 #endif
algebra.h
Classes for performing mathematics over different fields.
AbstractGroup
Abstract group.
Definition: algebra.h:27
BufferedTransformation
Interface for buffered transformations.
Definition: cryptlib.h:1657
DH_Domain
Diffie-Hellman domain.
Definition: dh.h:26
DL_Algorithm_LUC_HMP
LUC HMP signature algorithm.
Definition: luc.h:266
DL_Algorithm_LUC_HMP::Verify
bool Verify(const DL_GroupParameters< Integer > &params, const DL_PublicKey< Integer > &publicKey, const Integer &e, const Integer &r, const Integer &s) const
Verify a message using a public key.
Definition: luc.cpp:30
DL_Algorithm_LUC_HMP::RLen
size_t RLen(const DL_GroupParameters< Integer > &params) const
Retrieve R length.
Definition: luc.h:275
DL_Algorithm_LUC_HMP::Sign
void Sign(const DL_GroupParameters< Integer > &params, const Integer &x, const Integer &k, const Integer &e, Integer &r, Integer &s) const
Sign a message using a private key.
Definition: luc.cpp:23
DL_BasePrecomputation_LUC
LUC Precomputation.
Definition: luc.h:193
DL_BasePrecomputation_LUC::Load
void Load(const DL_GroupPrecomputation< Element > &group, BufferedTransformation &storedPrecomputation)
Retrieve previously saved precomputation.
Definition: luc.h:205
DL_BasePrecomputation_LUC::Save
void Save(const DL_GroupPrecomputation< Element > &group, BufferedTransformation &storedPrecomputation) const
Save precomputation for later use.
Definition: luc.h:207
DL_BasePrecomputation_LUC::Precompute
void Precompute(const DL_GroupPrecomputation< Element > &group, unsigned int maxExpBits, unsigned int storage)
Perform precomputation.
Definition: luc.h:203
DL_BasePrecomputation_LUC::SetBase
void SetBase(const DL_GroupPrecomputation< Element > &group, const Integer &base)
Set the base element.
Definition: luc.h:199
DL_BasePrecomputation_LUC::CascadeExponentiate
Integer CascadeExponentiate(const DL_GroupPrecomputation< Element > &group, const Integer &exponent, const DL_FixedBasePrecomputation< Integer > &pc2, const Integer &exponent2) const
Exponentiates an element.
Definition: luc.h:210
DL_BasePrecomputation_LUC::IsInitialized
bool IsInitialized() const
Determines whether this object is initialized.
Definition: luc.h:198
DL_BasePrecomputation_LUC::GetBase
const Integer & GetBase(const DL_GroupPrecomputation< Element > &group) const
Get the base element.
Definition: luc.h:201
DL_ES
Discrete Log (DL) encryption scheme.
Definition: pubkey.h:2362
DL_ElgamalLikeSignatureAlgorithm
Interface for Elgamal-like signature algorithms.
Definition: pubkey.h:1407
DL_FixedBasePrecomputation
DL_FixedBasePrecomputation interface.
Definition: eprecomp.h:61
DL_GroupParameters_IntegerBasedImpl
Integer-based GroupParameters default implementation.
Definition: gfpcrypt.h:183
DL_GroupParameters_LUC_DefaultSafePrime
GF(p) group parameters that default to safe primes.
Definition: luc.h:255
DL_GroupParameters_LUC
LUC GroupParameters specialization.
Definition: luc.h:224
DL_GroupParameters_LUC::GetVoidValue
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
Get a named value.
Definition: luc.h:243
DL_GroupParameters_LUC::SimultaneousExponentiate
void SimultaneousExponentiate(Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const
Exponentiates a base to multiple exponents.
Definition: luc.cpp:45
DL_GroupParameters
Interface for Discrete Log (DL) group parameters.
Definition: pubkey.h:782
DL_GroupParameters::GetGroupOrder
virtual Integer GetGroupOrder() const
Retrieves the order of the group.
Definition: pubkey.h:909
DL_GroupPrecomputation_LUC
LUC GroupParameters precomputation.
Definition: luc.h:174
DL_GroupPrecomputation_LUC::DEREncodeElement
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const
Encodes element in DER format.
Definition: luc.h:180
DL_GroupPrecomputation_LUC::BERDecodeElement
Element BERDecodeElement(BufferedTransformation &bt) const
Decodes element in DER format.
Definition: luc.h:179
DL_GroupPrecomputation_LUC::GetGroup
const AbstractGroup< Element > & GetGroup() const
Retrieves AbstractGroup interface.
Definition: luc.h:178
DL_GroupPrecomputation
DL_GroupPrecomputation interface.
Definition: eprecomp.h:20
DL_PrivateKey_GFP
Discrete Log (DL) private key in GF(p) groups.
Definition: gfpcrypt.h:614
DL_PublicKey_GFP
Discrete Log (DL) public key in GF(p) groups.
Definition: gfpcrypt.h:578
DL_PublicKey
Interface for Discrete Log (DL) public keys.
Definition: pubkey.h:1059
DL_SS
Discrete Log (DL) signature scheme.
Definition: pubkey.h:2342
Integer
Multiple precision integer with arithmetic operations.
Definition: integer.h:50
Integer::DEREncode
void DEREncode(BufferedTransformation &bt) const
Encode in DER format.
Integer::NotZero
bool NotZero() const
Determines if the Integer is non-0.
Definition: integer.h:338
Integer::Two
static const Integer & Two()
Integer representing 2.
Integer::ByteCount
unsigned int ByteCount() const
Determines the number of bytes required to represent the Integer.
InvertibleLUCFunction
The LUC inverse function.
Definition: luc.h:79
InvertibleLUCFunction::GetVoidValue
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
Get a named value.
Definition: luc.cpp:213
InvertibleLUCFunction::Initialize
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}.
Definition: luc.h:102
InvertibleLUCFunction::AssignFrom
void AssignFrom(const NameValuePairs &source)
Assign values to this object.
Definition: luc.cpp:222
InvertibleLUCFunction::Validate
bool Validate(RandomNumberGenerator &rng, unsigned int level) const
Check this object for errors.
Definition: luc.cpp:180
InvertibleLUCFunction::CalculateInverse
Integer CalculateInverse(RandomNumberGenerator &rng, const Integer &x) const
Calculates the inverse of an element.
Definition: luc.cpp:172
InvertibleLUCFunction::Initialize
void Initialize(RandomNumberGenerator &rng, unsigned int modulusBits, const Integer &eStart=17)
Create a LUC private key.
Definition: luc.cpp:137
InvertibleLUCFunction::GenerateRandom
void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &alg)
Definition: luc.cpp:114
LUCFunction
The LUC function.
Definition: luc.h:39
LUCFunction::PreimageBound
Integer PreimageBound() const
Returns the maximum size of a message before the trapdoor function is applied.
Definition: luc.h:55
LUCFunction::Initialize
void Initialize(const Integer &n, const Integer &e)
Initialize a LUC public key with {n,e}.
Definition: luc.h:48
LUCFunction::ImageBound
Integer ImageBound() const
Returns the maximum size of a representation after the trapdoor function is applied.
Definition: luc.h:56
NameValuePairs
Interface for retrieving values given their names.
Definition: cryptlib.h:327
NotImplemented
A method was called which was not implemented.
Definition: cryptlib.h:238
PK_FinalTemplate
Template implementing constructors for public key algorithm classes.
Definition: pubkey.h:2198
PrivateKey
Interface for private keys.
Definition: cryptlib.h:2546
PublicKey
Interface for public keys.
Definition: cryptlib.h:2541
RandomNumberGenerator
Interface for random number generators.
Definition: cryptlib.h:1440
TF_ES
Trapdoor Function (TF) encryption scheme.
Definition: pubkey.h:2290
TF_SS
Trapdoor Function (TF) Signature Scheme.
Definition: pubkey.h:2316
TrapdoorFunction
Applies the trapdoor function.
Definition: pubkey.h:126
TrapdoorFunctionInverse
Applies the inverse of the trapdoor function.
Definition: pubkey.h:179
cryptlib.h
Abstract base classes that provide a uniform interface to this library.
dh.h
Classes for Diffie-Hellman key exchange.
gfpcrypt.h
Classes and functions for schemes based on Discrete Logs (DL) over GF(p)
integer.h
Multiple precision integer with arithmetic operations.
LUC_DH
DH_Domain< DL_GroupParameters_LUC_DefaultSafePrime > LUC_DH
LUC-DH.
Definition: luc.h:330
CryptoPP
Crypto++ library namespace.
oaep.h
Classes for optimal asymmetric encryption padding.
pkcspad.h
Classes for PKCS padding schemes.
secblock.h
Classes and functions for secure memory allocations.
DL_CryptoKeys_LUC
LUC encryption keys.
Definition: luc.h:302
DL_SignatureKeys_LUC
LUC signature keys.
Definition: luc.h:282
EnumToType
Converts an enumeration to a type suitable for use as a template parameter.
Definition: cryptlib.h:141
LUC_HMP
LUC-HMP, based on "Digital signature schemes based on Lucas functions" by Patrick Horster,...
Definition: luc.h:296
LUC_IES
LUC Integrated Encryption Scheme.
Definition: luc.h:323
LUCES
LUC encryption scheme.
Definition: luc.h:146
LUC
LUC cryptosystem.
Definition: luc.h:132
LUCSS
LUC signature scheme with appendix.
Definition: luc.h:158
CRYPTOPP_ASSERT
#define CRYPTOPP_ASSERT(exp)
Debugging and diagnostic assertion.
Definition: trap.h:68