15 : m_p(p), m_q(q), m_g(
g)
97 if (validateOtherPublicKey)
unsigned int PublicKeyLength() const
Provides the size of the public key.
Standard names for retrieving values by name when working with NameValuePairs.
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
Get a named value.
void Encode(byte *output, size_t outputLen, Signedness sign=UNSIGNED) const
Encode in big-endian format.
bool IsOdd() const
Determines if the Integer is odd parity.
void XTR_FindPrimesAndGenerator(RandomNumberGenerator &rng, Integer &p, Integer &q, GFP2Element &g, unsigned int pbits, unsigned int qbits)
Creates primes p,q and generator g for XTR.
void AssignFrom(const NameValuePairs &source)
Assign values to this object.
#define NAMESPACE_BEGIN(x)
bool Validate(RandomNumberGenerator &rng, unsigned int level) const
Check this object for errors.
Interface for random number generators.
void Encode(byte *encodedElement, unsigned int size)
static const Integer &CRYPTOPP_API One()
Integer representing 1.
bool VerifyPrime(RandomNumberGenerator &rng, const Integer &p, unsigned int level)
Verifies a prime number.
bool Agree(byte *agreedValue, const byte *privateKey, const byte *otherPublicKey, bool validateOtherPublicKey=true) const
Derive agreed value.
void GeneratePublicKey(RandomNumberGenerator &rng, const byte *privateKey, byte *publicKey) const
Generate a public key from a private key in this domain.
void GeneratePrivateKey(RandomNumberGenerator &rng, byte *privateKey) const
Generate private key in this domain.
Integer Squared() const
Multiply this integer by itself.
XTR-DH with key validation.
XTR_DH(const Integer &p, const Integer &q, const GFP2Element &g)
bool IsNegative() const
Determines if the Integer is negative.
unsigned int AgreedValueLength() const
Provides the size of the agreed value.
Multiple precision integer with arithmetic operations.
void DEREncode(BufferedTransformation &domainParams) const
AssignFromHelperClass< T, BASE > AssignFromHelper(T *pObject, const NameValuePairs &source)
Classes and functions for working with ANS.1 objects.
#define CRYPTOPP_SET_FUNCTION_ENTRY(name)
Classes and functions for number theoretic operations.
void DEREncode(BufferedTransformation &bt) const
Encode in DER format.
"The XTR public key system" by Arjen K.
#define pass(a, b, c, mul, X)
#define CRYPTOPP_GET_FUNCTION_ENTRY(name)
#define CRYPTOPP_UNUSED(x)
Multiple precision integer with arithmetic operations.
static const Integer &CRYPTOPP_API Zero()
Integer representing 0.
void BERDecode(const byte *input, size_t inputLen)
Decode from BER format.
GFP2Element ConvertIn(const Integer &a) const
Class file for performing modular arithmetic.
GF(p^2), optimal normal basis.
GFP2Element XTR_Exponentiate(const GFP2Element &b, const Integer &e, const Integer &p)
unsigned int PrivateKeyLength() const
Provides the size of the private key.
Interface for retrieving values given their names.
GetValueHelperClass< T, BASE > GetValueHelper(const T *pObject, const char *name, const std::type_info &valueType, void *pValue, const NameValuePairs *searchFirst=NULL)